Modify instead of Add
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 31628
interpreted = N
texte = I'm using the following logic on a shopping cart page.This is my first day with webcatalog so bear with me :)[showif [action]=Add] [addlineitem db=wiring.db&cart=[cart]&sku=[url][sku][/url]]quantity=1[/addlineitem][/showif][showif [action]=Remove][removelineitem db=wiring.db&cart=[cart]&index=[index]][/showif][showif [action]=quantity][SetLineItem db=wiring.db&cart=[cart]&index=[index]]quantity=[new_quant][/SetLineItem][/ShowIf]The quantity logic basically works by re-calling the cart.tpl with a modified (user entered)quantity.But... what if I add an item, go back to browsing my catalog, browse to an identical itemin my catalog, and click the add button again. Yes, I do want to buy a 2nd whatever, butdidn't know it the first time I hit the cart page.Now when I go to my cart I have two identical line items for the same product.Does anyone have a set of tags (or the logic for), reading through a cart, checkingto see if two sku's match, adding the quantities together, and processing it as asetlineitem instead of an addlineitem?thanks,-David-- David B. Gersh - RHCEDirector of Web Servicesdbg@clarityconnect.com________________________________________________________All non-web related questions to help@clarityconnect.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
Associated Messages, from the most recent to the oldest:
I'm using the following logic on a shopping cart page.This is my first day with webcatalog so bear with me :)[showif [action]=Add] [addlineitem db=wiring.db&cart=[cart]&sku=[url][sku][/url]]quantity=1[/addlineitem][/showif][showif [action]=Remove][removelineitem db=wiring.db&cart=[cart]&index=[index]][/showif][showif [action]=quantity][SetLineItem db=wiring.db&cart=[cart]&index=[index]]quantity=[new_quant][/SetLineItem][/ShowIf]The quantity logic basically works by re-calling the cart.tpl with a modified (user entered)quantity.But... what if I add an item, go back to browsing my catalog, browse to an identical itemin my catalog, and click the add button again. Yes, I do want to buy a 2nd whatever, butdidn't know it the first time I hit the cart page.Now when I go to my cart I have two identical line items for the same product.Does anyone have a set of tags (or the logic for), reading through a cart, checkingto see if two sku's match, adding the quantities together, and processing it as asetlineitem instead of an addlineitem?thanks,-David-- David B. Gersh - RHCEDirector of Web Servicesdbg@clarityconnect.com________________________________________________________All non-web related questions to help@clarityconnect.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
David Gersh
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:
How to Sort Summ data ? (1997)
HELP WITH DATES (1997)
really annoying feature (2001)
Quotation Marks in Database (1998)
Passwords, Subscription, DBs, oh my! (2000)
RE: ShowNext Command (1997)
bug in [SendMail] (1997)
include bug????? (1997)
expired beta (1997)
breaking words (1997)
[WebDNA] WebDNA not running after 10.6.3 update (2010)
emailer (1997)
Verifying both name and password (was: THANKS) (1997)
problem serving foreign languages text (1997)
[OT] BBedit Blank Line removal (2003)
Upgrade to 3.07 problems (2000)
[showif]'s inside [search] params? (2000)
Showing unopened cart (1997)
RE: Going to anchors within a template page (1997)
[WebDNA] Captcha question (and free code) (2009)