Re: Reload adding to cart
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 39234
interpreted = N
texte = At 1:23 PM 10/10/01, Donovan Brooke wrote:>Then I must have some syntax wrong? see anything?>>[showif [shop]=decipher]> [orderfile cart=[cart]]> [lineitems]> [showif [url][theSKU][/url]=[sku]][text]shop=update[/text][/showif]> [showif [url][theSKU][/url]![sku]][text]shop=add[/text][/showif]> [/lineitems]> [/orderfile]>[/showif]I think your problem is that as you go through the cart, each lineitem is going to reset the variable. You only want to reset it if the item being added is already in the cart.Try this:[showif [shop]=decipher][text]shop=add[/text] [orderfile cart=[cart]] [lineitems] [showif [url][theSKU][/url]=[sku]][text]shop=update[/text][/showif] [/lineitems] [/orderfile][/showif]This way the shop variable isn't being reset with every lineitem; only if you have a duplicate in the cart.HTH,-- Maurice Rickardhttp://mauricerickard.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
At 1:23 PM 10/10/01, Donovan Brooke wrote:>Then I must have some syntax wrong? see anything?>>[showif [shop]=decipher]> [orderfile cart=[cart]]> [lineitems]> [showif [url][theSKU][/url]=[sku]][text]shop=update[/text][/showif]> [showif [url][theSKU][/url]![sku]][text]shop=add[/text][/showif]> [/lineitems]> [/orderfile]>[/showif]I think your problem is that as you go through the cart, each lineitem is going to reset the variable. You only want to reset it if the item being added is already in the cart.Try this:[showif [shop]=decipher][text]shop=add[/text] [orderfile cart=[cart]] [lineitems] [showif [url][theSKU][/url]=[sku]][text]shop=update[/text][/showif] [/lineitems] [/orderfile][/showif]This way the shop variable isn't being reset with every lineitem; only if you have a duplicate in the cart.HTH,-- Maurice Rickardhttp://mauricerickard.com/-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Maurice Rickard
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:
Free WebDNA snippets (Extending WebCatalog) (1997)
Custom Convertchars Database (2004)
Verifying both name and password (was: New Problem) (1997)
[WebDNA] INCLUDE file= in the footer (2009)
international time (1997)
writing checkboxes to a database (2000)
NYC-based WebDNA programmers (2003)
First postarg not taking in $Commands (1997)
Show if file exists (2004)
Make sure I understand this??? (1997)
CSS (2001)
[WebDNA] Not even sure what to ask for help on. . . :( (2008)
textA (1998)
Big Databases (1997)
SKU Question (1999)
show all problem (1997)
more on quicktime test stuff (1997)
Automatic thumbnail images (1998)
creating a 60 fields database (1997)
Generating Report Totals (1997)