addlineitems within formvariable loop

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16007
interpreted = N
texte = How does Addlineitem know what to add to the shopping cart file?Here's what I have so far: The following code brings up a list of all the products in the database and allows a user to click on a checkbox to select which items to put into the shopping cart.
[search db=rainman.db&geNUMBERdata=0&NUMBERsort=1&NUMBERsortsdir=as&cart=[cart]&max=50] [foundItems] Product: [Number]
[/foundItems] [/search] The output.tmpl page has the following: [FormVariables] [name] [AddLineItem cart=[cart]&sku=[sku]&db=rainman.db] Number=[Number] [/addlineitem] [/FormVariables]I'd like this page to add the checked items to the shopping cart. Thank you, - Tom---------------------------------------------------------------------->Date: 11 Feb 1998 15:00:42 -0800 >From: John Hill >Subject: Re: Adding multiple items to Cart at one time, & append context >problem > >Yes, you can use checkboxes. In general, the idea is to have the product >checkbox input fields have a distinct name (like add_product) and have each >of their values be their sku number. Then, when they're ready to add the items >to their cart, link to a page with an embedded [formwariables] loop that loops >through all the form variables named add_product and perform an embedded >[addlineitem] on the sku for each one. After that, you can use the [orderfile] >context to display the contents of the shopping cart on the same page. > >There's no reason WC should be adding bad characters to the end of the field. >My guess is that the character is in the form data that's being submitted. > >John. > >>In the TeaRoom example, instead of having Add to Cart links in the >>Action Collumn is it possible to use checkboxes so you could check >>several items to add to the cart at once? >> >>Also, when I use the append context to add records to a database >>it adds a bad character between the end of the record and the tab >>that separates the records. When I pasted the bad character into Key >>Caps on my mac it showed up as the Page Up character. >> >>Is there any way to prevent WebCatalog from adding this character to my >>database? >> >> Thanks for all you help, >> >> - Tom >> >> >> Tom Leitner >> MediaCity Web Design Associated Messages, from the most recent to the oldest:

    
  1. Re: addlineitems within formvariable loop (Grant Hulbert 1998)
  2. addlineitems within formvariable loop (Tom Leitner 1998)
How does Addlineitem know what to add to the shopping cart file?Here's what I have so far: The following code brings up a list of all the products in the database and allows a user to click on a checkbox to select which items to put into the shopping cart. [cart]> [search db=rainman.db&geNUMBERdata=0&NUMBERsort=1&NUMBERsortsdir=as&cart=[cart]&max=50] [founditems] Product: [Number]
[/foundItems] [/search] The output.tmpl page has the following: [formvariables] [name] [AddLineItem cart=[cart]&sku=[sku]&db=rainman.db] Number=[Number] [/addlineitem] [/FormVariables]I'd like this page to add the checked items to the shopping cart. Thank you, - Tom---------------------------------------------------------------------->Date: 11 Feb 1998 15:00:42 -0800 >From: John Hill >Subject: Re: Adding multiple items to Cart at one time, & append context >problem > >Yes, you can use checkboxes. In general, the idea is to have the product >checkbox input fields have a distinct name (like add_product) and have each >of their values be their sku number. Then, when they're ready to add the items >to their cart, link to a page with an embedded [formwariables] loop that loops >through all the form variables named add_product and perform an embedded >[addlineitem] on the sku for each one. After that, you can use the [orderfile] >context to display the contents of the shopping cart on the same page. > >There's no reason WC should be adding bad characters to the end of the field. >My guess is that the character is in the form data that's being submitted. > >John. > >>In the TeaRoom example, instead of having Add to Cart links in the >>Action Collumn is it possible to use checkboxes so you could check >>several items to add to the cart at once? >> >>Also, when I use the append context to add records to a database >>it adds a bad character between the end of the record and the tab >>that separates the records. When I pasted the bad character into Key >>Caps on my mac it showed up as the Page Up character. >> >>Is there any way to prevent WebCatalog from adding this character to my >>database? >> >> Thanks for all you help, >> >> - Tom >> >> >> Tom Leitner >> MediaCity Web Design Tom Leitner

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:

WebCatalog for Postcards ? (1997) japanese characters (1997) Problems with SELECT MULTIPLE (1999) RE: [WebDNA] Upload file to mysql (2017) Multi-processor Mac info ... (1997) Rhapsody? (1997) Webstar 1.3.1 PPC (1997) Problem in 4.0 store thankyou page (2000) Possible Bug in 2.0b15.acgi (1997) HTML Editors (1997) template not found error (1998) showif field is number (1997) Location of Webcat site in folder hierarchy (1997) Append..... doesn't (2000) Setting up shop (1997) Open source store builder (Merchant Maker?) (2003) WebCatalog Hosting (1996) Item options w/ price adjustment (1997) WebCat2 beta 11 - new prefs ... (1997) Web Catalog vs. ICAT (1997)