Trouble with adding multiple items to cart
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23697
interpreted = N
texte = I seem to be having trouble getting multiple items selected on a productpage to be added to a cart. I am trying to use a [formvariable] contextto manipulate the items from the previous page, with no luck. If, inthe form, I make multiple selections by putting quantities into variousfields called quantity, the items are added to that cart in thefollowing fashion. The number of items whose quantities are greaterthan 0 times the total number of items on the page. For instance, ifthere are nine items that appear on the product page, and I change thequantity of two of them, I get 18 items added to the cart. If I make aquantity change in all 9 items, I get 81 matches. Here is the code thatI have to date:[formvariables name=quantity][showif [value]>0][addlineitem cart=[cart]&sku=[formvariablesname=sku][value][/formvariables]&db=../databases/touchofglass.db]quantity=1[/addlineitem][/showif][/formvariables]What I want to do is this. If someone makes a quantity change in any ofthe product's quantity field, I want that item to be added to the cartalone. Once I can acheive that, it is my goal to have the quantities ofeach item appear as a seperate lineitem, so the preferences for it canbe changed. In other words, if someone visits the page with nine itemson it, and changes the quantity for two products on the page, say itemnumber 19901 & 19902, and sets the quantity of each item to 3, I want atotal of 6 lineitems to show up (three for each item). The other itemswhich still have a zero next to them should not be added at all.I hope this makes sense.If anyone can point me in the right direction, I would be appreciative.I have been working on this for about the past 6 hours straight, andhave tried many different approaches. This seems like the mostpromising so far, but I might be far off.Thanks in advance for any help.
Associated Messages, from the most recent to the oldest:
I seem to be having trouble getting multiple items selected on a productpage to be added to a cart. I am trying to use a [formvariable] contextto manipulate the items from the previous page, with no luck. If, inthe form, I make multiple selections by putting quantities into variousfields called quantity, the items are added to that cart in thefollowing fashion. The number of items whose quantities are greaterthan 0 times the total number of items on the page. For instance, ifthere are nine items that appear on the product page, and I change thequantity of two of them, I get 18 items added to the cart. If I make aquantity change in all 9 items, I get 81 matches. Here is the code thatI have to date:[formvariables name=quantity][showif [value]>0][addlineitem cart=
[cart]&sku=[formvariablesname=sku][value][/formvariables]&db=../databases/touchofglass.db]quantity=1[/addlineitem][/showif][/formvariables]What I want to do is this. If someone makes a quantity change in any ofthe product's quantity field, I want that item to be added to the cartalone. Once I can acheive that, it is my goal to have the quantities ofeach item appear as a seperate lineitem, so the preferences for it canbe changed. In other words, if someone visits the page with nine itemson it, and changes the quantity for two products on the page, say itemnumber 19901 & 19902, and sets the quantity of each item to 3, I want atotal of 6 lineitems to show up (three for each item). The other itemswhich still have a zero next to them should not be added at all.I hope this makes sense.If anyone can point me in the right direction, I would be appreciative.I have been working on this for about the past 6 hours straight, andhave tried many different approaches. This seems like the mostpromising so far, but I might be far off.Thanks in advance for any help.
Dennis J. Bonsall, Jr.
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Mozilla/4. and Browser Info.txt (1997)
Listserver problem (1997)
Typhoon and Netpresenz? (1999)
Three new problems ... (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
Resume Catalog ? (1997)
Help name our technology! (1997)
Search results templates (1996)
can WC render sites out? (1997)
[OrderFile] being testy (2000)
FYI: virus alert (1996)
question: webdelivery folder and file (1997)
multiple search commands (1997)
sendmail and CGatePro - Not working (2003)
Bug or syntax error on my part? (1997)
Secure server question (1997)
Generating Report Totals (1997)
still having shipCost.db Problem (1997)
Summing fields (1997)
Useful snippet (2003)