Re: Adding Multiple Items to Shopping Cart from a Results page
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 15364
interpreted = N
texte = At 10:25 AM -0800 12/3/97, Jim McDonald is rumored to have typed:> List Subscribers:>> We need to be able to click on multiple Add To Cart items on a single>page and not have to keep going> back and forth to the same page to add additional items. There are>currently four steps involved in the> process of adding items from a found list. Is there any way to allow a>user to add multiple items to the> shopping cart at one time from a given page or must they continually have>to go back and forth?Here's what I do:I have a page that generates a list of orderable items. It's in a SEARCHcontext, so I utilize the FOUNDITEMS loop function to call up the SKU andTITLE fields. I put the items inside a form, and put a checkbox next toeach item so that the code looks:
The customer will check off whatever they want to order and hit the submitbutton to go to the Cart.html page.At the top of the CART.html page (befor the tag), I put thefollowing code:[FORMVARIABLES name=ORD&exact=F][ADDLINEITEM CART=[CART]&SKU=[VALUE]&db=MYDB.db]quantity=1[/ADDLINEITEM][/FORMVARIABLES]The [FORMVARIABLES] loop goes through all of the submitted arguments thatstart with ORD (which is all of the items that the customer wants to buy)and adds them to the shopping cart using the ADDLINEITEM context.Then I display the content of the cart in the of the template, withoptions to edit quantity, etc.MichaelMichael Winston *By Phone!: (503)/652/8815 x341Internet Coordinator *By e-mail!: michaelw@dhorse.comDark Horse Comics, Inc. *By web!: http://www.dhorse.com/
Associated Messages, from the most recent to the oldest:
At 10:25 AM -0800 12/3/97, Jim McDonald is rumored to have typed:> List Subscribers:>> We need to be able to click on multiple Add To Cart items on a single>page and not have to keep going> back and forth to the same page to add additional items. There are>currently four steps involved in the> process of adding items from a found list. Is there any way to allow a>user to add multiple items to the> shopping cart at one time from a given page or must they continually have>to go back and forth?Here's what I do:I have a page that generates a list of orderable items. It's in a SEARCHcontext, so I utilize the FOUNDITEMS loop function to call up the SKU andTITLE fields. I put the items inside a form, and put a checkbox next toeach item so that the code looks:
The customer will check off whatever they want to order and hit the submitbutton to go to the Cart.html page.At the top of the CART.html page (befor the tag), I put thefollowing code:[FORMVARIABLES name=ORD&exact=F][ADDLINEITEM CART=
[cart]&SKU=[VALUE]&db=MYDB.db]quantity=1[/ADDLINEITEM][/FORMVARIABLES]The
[formvariables] loop goes through all of the submitted arguments thatstart with ORD (which is all of the items that the customer wants to buy)and adds them to the shopping cart using the ADDLINEITEM context.Then I display the content of the cart in the of the template, withoptions to edit quantity, etc.MichaelMichael Winston *By Phone!: (503)/652/8815 x341Internet Coordinator *By e-mail!: michaelw@dhorse.comDark Horse Comics, Inc. *By web!: http://www.dhorse.com/
Michael Winston
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:
Does webcatalog recognise NULL values? (1998)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
Document Contains No Data! (1997)
[group] ? (1997)
PDF Tools (2006)
web delivery (1997)
watch out for format_to_days on NT (1997)
On a related topic (2006)
Math (1997)
verify online (1997)
Help! WebCat2 bug (1997)
FREE Stuff .. (2003)
WCS Newbie question (1997)
Re:Searching for ALL / empty form field (1997)
[WebDNA] Send Mail and Outlook Express (2008)
popups, netscape vs explorer (1997)
relational db question (2002)
Emailer setup (1997)
searchable list archive (1997)
Re[2]: Re[2]: Bugs still *not* fixed as promised ... (2000)