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:

Google does it... can WebDNA? Showing only the section (2003) Expected behavior? (1998) [WriteFile] problems (1997) PIXO support (1997) Web*SSL and WebCatalog (1997) Help! WebCat2 bug (1997) adding second sku (2000) WebCatalog2 Feature Feedback (1996) Multiple prices per product (2004) [isfile] ? (1997) Banner ads (2000) about this server and links to who (1997) WebDNA equivalent for $REQUEST_URI (2004) triggers (2003) Size limit for tmpl editor ? (1997) Logging purchases (1997) WebCat editing, SiteGuard & SiteEdit (1997) emailer (1997) multi-paragraph fields (1997) E-mailer error codes (1997)