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 SEARCH context, so I utilize the FOUNDITEMS loop function to call up the SKU and TITLE fields. I put the items inside a form, and put a checkbox next to each item so that the code looks:
[SEARCH] [FOUNDITEMS] [TITLE] [/FOUNDITEMS] [/SEARCH]
The customer will check off whatever they want to order and hit the submit button to go to the Cart.html page.At the top of the CART.html page (befor the tag), I put the following 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 that start 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, with options to edit quantity, etc.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark Horse Comics, Inc. *By web!: http://www.dhorse.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Adding Multiple Items to Shopping Cart from a Results page (Michael Winston 1997)
  2. Adding Multiple Items to Shopping Cart from a Results page (Jim McDonald 1997)
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 SEARCH context, so I utilize the FOUNDITEMS loop function to call up the SKU and TITLE fields. I put the items inside a form, and put a checkbox next to each item so that the code looks:
[search] [founditems] [TITLE] [/FOUNDITEMS] [/SEARCH]
The customer will check off whatever they want to order and hit the submit button to go to the Cart.html page.At the top of the CART.html page (befor the tag), I put the following 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 that start 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, with options to edit quantity, etc.MichaelMichael Winston *By Phone!: (503)/652/8815 x341 Internet Coordinator *By e-mail!: michaelw@dhorse.com Dark 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:

Almost a there but..bye bye NetCloak (1997) [WebDNA] timestamp conversion (2011) Savant and WebDNA on Windows 98? (2002) Include files (1998) Last Day of the Month (2005) PROBLEMS WITH PROTECT TAG (2004) More news on 5.0 (2003) Format question WC Mac f3 (1997) Need some Java Script Code (2003) SendMail context not working on CentOS 4 (2007) WebDNA 5.1 is now available! (2003) expired beta (1997) If search results are blank... (2003) I'm Sorry - OFF TOPIC (2000) Order not created error (1997) Is grep not working with umlauts? (2002) Search returns all, not 20 (1997) is 'template' a reserved webcat tag? (2000) MacFinder -- a new WebDNA web site (1998) Conveting Characters to Graphics (1997)