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:
RE: Nesting [ListFiles] (1998)
Getting Emailer to send mail (1997)
still having shipCost.db Problem (1997)
Clear command and ShoppingCart.tmpl (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
adding up in a db (1997)
wrong input values? (1997)
WebCatalog [FoundItems] Problem - LONG - (1997)
WebCat .pdf file is still messed up... (2000)
[ShowNext] feature in 2.0 (1997)
New Shipping Options? (2001)
price totals (2003)
Fwd: more ! testing (1997)
changing names of Graphic files (2002)
Frames and WebCat (1997)
Cancel Subscription (1996)
Re2: Calculating multiple shipping... (1997)
Using Plug-In while running 1.6.1 (1997)
WebCat2b13MacPlugIn - [include] (1997)
[WebDNA] How about a timer feature? (2009)