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:
form data submission gets truncated (1997)
email code (1998)
Running _every_ page through WebCat ? (1997)
Closing db's & caching templates (was: Shippingcalculations) (1997)
writing db to disk (1997)
emailer error type 103 (1997)
It finally happened ... (2003)
[CART] inside a [LOOP] (1997)
emailer (1997)
[WebDNA] 30 Minute Cookies (2016)
Store Builder shipping methods (2003)
WebCat2b13MacPlugIn - [include] (1997)
Redirect frame targets (1998)
[WebDNA] WebDNA Crashing or Not **YES** (2008)
Visitor info (2000)
WebCat2 - Getting to the browser's username/password data (1997)
Sort Order on a page search (1997)
A Global Variable (1997)
showif comparison begins w/ and contains (1997)
Upload files script (2003)