Re: Duplicate Items in the Cart

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16496
interpreted = N
texte = >I have a client that is complaining, that if he adds a item to a cart >then goes back to the selection page and adds the the same item again, he >ends up with the item duplicated in the shopping cart page, rather than >just having the item listed only once with the quantity set at two. I >realize that the problem is that the cart is a text file, and appending >the same item twice will generate two lineitems. However I thought maybe >someone has a workaround for this situation. Any ideas and suggestion >will be greatly appreciated.It works this way to handle the case where visitors put 2 items in the cart, such as shoes, with different colors (or other attributes):1 Tennis Shoe -- Red 1 Tennis Shoe -- WhiteYou can change your templates so that you first look through all the [LineItems] for a matching sku, and if one matches you do a [SetLineItem] to increment the quantity, but if none match then you do an [AddLineItem] to put another item in the cart.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Duplicate Items in the Cart (Michael Winston 1998)
  2. Re: Duplicate Items in the Cart (Paul Willis 1998)
  3. Re: Duplicate Items in the Cart (Grant Hulbert 1998)
  4. Duplicate Items in the Cart (Jose A. Gordo 1998)
>I have a client that is complaining, that if he adds a item to a cart >then goes back to the selection page and adds the the same item again, he >ends up with the item duplicated in the shopping cart page, rather than >just having the item listed only once with the quantity set at two. I >realize that the problem is that the cart is a text file, and appending >the same item twice will generate two lineitems. However I thought maybe >someone has a workaround for this situation. Any ideas and suggestion >will be greatly appreciated.It works this way to handle the case where visitors put 2 items in the cart, such as shoes, with different colors (or other attributes):1 Tennis Shoe -- Red 1 Tennis Shoe -- WhiteYou can change your templates so that you first look through all the [lineitems] for a matching sku, and if one matches you do a [setlineitem] to increment the quantity, but if none match then you do an [addlineitem] to put another item in the cart.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Grant Hulbert

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:

[WebDNA] TCPConnect/cURL alternative for windows? (2010) [WebDNA] Date: header on emails - timezone problem perhaps (emai) Ok here is a question? (1997) WebCat2 - Getting to the browser's username/password data (1997) Practice runs ? (1997) [lookup] [search] Issue (2005) A little syntax help (1997) suggestion (1997) Possible Shownext from Listfiles???? (2000) Location of Webcat site in folder hierarchy (1997) [WebDNA] HTML/OS vs. WebDNA ? (2008) Re:2nd WebCatalog2 Feature Request (1996) SiteGaurd file Cache vs webcatalog cache (1997) WebCat editing, SiteGuard WAS:SiteAssociative lookup style? (1997) Forumulas.db & Variables (2002) [WriteFile] problems (1997) Formulas.db (2001) Country & Ship-to address & other fields ? (1997) [OT] HTML render (2003) [WebDNA] Win 10 FastCGI not running (2019)