Find Duplicates in Cart

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37397
interpreted = N
texte = When visitors add an item to their cart, the quantity should be updated if the same item is already in their cart. I found some code in the archives to check for duplicates, but I'm having considerable trouble integrating it with the system below.I've made the code from the archives work where a single item is added to the cart each time. But my system below lists all items on a single page, and the visit uses a checkbox to select which items they would like to add.I adapted this code from the Tiny Store example.============= BEGIN CODE SNIPPET =============
[search db=restaurants.db&neVisibledatarq=[blank]] [founditems] [/founditems] [/search]
============= END CODE SNIPPET =============The following code appears on the cart.html page and adds each item to the cart.============= BEGIN CODE SNIPPET ============= [orderfile cart=[cart]][formvariables name=item&exact=f][math show=f]the_index=[getchars start=6][name][/getchars][/math] [AddLineItem db=restaurants.db&cart=[cart]&SKU=[url][value][/url]]quantity=[Interpret][qty_[math]the_index[/math]][/Interpret]&textA=[Interpret][name_[math]the_index[/math]][/Interpret]&textB=[Interpret][certvalue_[math]the_index[/math]][/Interpret][/AddLineItem][/formvariables][/orderfile]============= END CODE SNIPPET ============= -- _______________________Clint Davis Webmaster Gray Loon Marketing Group 812.422.9999cdavis@grayloon.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:

    
  1. Re: Find Duplicates in Cart (John Peacock 2001)
  2. Re: Find Duplicates in Cart (Clint Davis 2001)
  3. Re: Find Duplicates in Cart (John Peacock 2001)
  4. Find Duplicates in Cart (Clint Davis 2001)
When visitors add an item to their cart, the quantity should be updated if the same item is already in their cart. I found some code in the archives to check for duplicates, but I'm having considerable trouble integrating it with the system below.I've made the code from the archives work where a single item is added to the cart each time. But my system below lists all items on a single page, and the visit uses a checkbox to select which items they would like to add.I adapted this code from the Tiny Store example.============= BEGIN CODE SNIPPET =============
[cart] method=post>[search db=restaurants.db&neVisibledatarq=[blank]] [founditems] [/founditems] [/search]
============= END CODE SNIPPET =============The following code appears on the cart.html page and adds each item to the cart.============= BEGIN CODE SNIPPET ============= [orderfile cart=[cart]][formvariables name=item&exact=f][math show=f]the_index=[getchars start=6][name][/getchars][/math] [AddLineItem db=restaurants.db&cart=[cart]&SKU=[url][value][/url]]quantity=[interpret][qty_[math]the_index[/math]][/Interpret]&textA=[interpret][name_[math]the_index[/math]][/Interpret]&textB=[interpret][certvalue_[math]the_index[/math]][/Interpret][/AddLineItem][/formvariables][/orderfile]============= END CODE SNIPPET ============= -- _______________________Clint Davis Webmaster Gray Loon Marketing Group 812.422.9999cdavis@grayloon.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/ Clint Davis

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:

Can't access [OrderFile] OSXS WC4 (2000) eMail volume (2000) [no_cache]?! (2000) Locking up with WebCatalog... (1997) case sensitivity in lookups (1997) WebCat consulting $ (1998) Forms Search Questions (1997) [WebDNA] Hmmm ... (2008) WC2.0 Memory Requirements (1997) Re[2]: Using the sendmail command on CGate Pro (Unix) (2000) Plugin or CGI or both (1997) New Guestbook Source (1997) protect tag on NT IIS (1997) Webcatalog acgi conflict? (1999) search with funny characters (2003) [WebDNA] filter out the exclaimation point (2017) Shopping cart not being assigned (1999) RE: Renaming textA (1998) Forwarding Orders Via Email (1998) total number of matches (1999)