General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 21st, 2003, 03:33 PM
Lvanhoff Lvanhoff is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 Lvanhoff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cart form tag numbering

Hello,
I have a problem that seems huge to me, being a non programmer, but maybe someone in your group has a thought about it? I would sure appreciate it!

I don't know anything about using PHP and don't know if it's even the right solution. I use Dreamweaver 4.

I am developing a website for my photography company and have Adobe Online Photo Album to generate web galleries for my clients to view their photos from their event. I am using Americart (but not stuck on that) for the shopping cart. The Photo Album does a fine job of generating the albums, but I need to automate the shopping cart add in peice. I did it manually for 80 photos and it took forever. In other words, I have an easy table containing the 4 sizes of photos they can purchase of the photo above, each of the sizes an "add to cart" button within the table, within a form tag. The tedious part is that I then have to go in an change each photo number within the form tag for each photo, for each of the four sizes.

There must be a way to have the shopping cart table, just a small bit of code, to take the first photo number and automatically increase each number by one within each form tag, for each size. In other words, I want that table which actually has four form tags within it, one for each size, to automatically increase the photo number by one and drop itself into the designated spot on my already generated html pages which have been generated by Online Photo Album.

Doesn't it seem that there would be a relatively straightforward way to do this? Given that I will have many rolls per week of film to get onto my site, I just can't see spending several hours each roll to change all those photo numbers in each table...

Any help would be so VERY VERY much appreciated!! THANKS IN ADVANCE FOR ANY THOUGHTS! Even just some direction about what universe of code this solution would live in would be helpful!

The sample photo album I have created which I hand coded the shopping cart is at http://www.tri-visions.com/clientaccess/neil/index.html
Laura van Hoff
Lvanhoff@sbcglobal.net
www.tri-visions.com

Reply With Quote
  #2  
Old June 21st, 2003, 07:44 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
sure there is an easy way to do it.

you can do it with php and must change your pages to .php or send .html through php processor

place this code in your page.
PHP Code:
<?php $number = ( int )1?>


then for your images,...use this

PHP Code:
<?php
echo "<img src='/path/to/image" $number ".jpg' alt='' >";
$number++;
?>
__________________
-- Jason

Reply With Quote
  #3  
Old June 22nd, 2003, 12:01 AM
Lvanhoff Lvanhoff is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 Lvanhoff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Jason,

Sorry to be so uninformed but I have never had any experience whatsoever with PHP. Can you give me a bit more of an overview on that concept? It's exactly what I was looking for, but I don't understand how to impelement it.

Could you perhaps show me with my page where and how I would utilize this?

I have upgraded to Dreamweaver MX and it looks like it has an easy way to incorprate PHP but I don't have the foggiest clue about PHP...I'd like to learn though.

Thanks so much in advance for your help and for the suggestion offered.

Reply With Quote
  #4  
Old June 22nd, 2003, 01:13 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
I think you are looking for a dynamic solution,....but what you asked for is only the tip of the iceberg

the code I posted,..
PHP Code:
<?php

echo "<img src='/path/to/image_" $number ".jpg' alt='' >";
$number++;

?>


All this does is print your image tag and add the "_1" to it automatically.


I think what you are looking for a an image upload script,...or maybe something that will parse through an image directory and rename the files to filename_01.jpg, etc, etc.

try looking on www.devscripts.com

Reply With Quote
  #5  
Old June 22nd, 2003, 01:15 AM
Lvanhoff Lvanhoff is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 7 Lvanhoff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks...much appreciated.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Cart form tag numbering


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway