Re: How can I Add several Items into the cart at once?
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13682
interpreted = N
texte = >How would you suggest I use the showif to see if the checkbox has been>clicked? Is there someway to pass this info with the submit button?WebCatalog makes every form variable available to you upon submit, so in your case there are 6 checkboxes named box1, box2, etc. If you put [box1] into your shoppingcart.tmpl, it will either display cdp005001H or it will display [box1]. Web browsers are weird; if a checkbox is unchecked, then it's as though it doesn't exist in your form at all, so that's why WebCatalog displays literally [box1].The following lines mean if box1 has a value other than literally [box1], then add the sku associated with box1 to the cart[ShowIf [box1]![raw][box1][/raw]][AddLineItem cart=[cart]&db=Photos.db&sku=[box1]]sku=[box1][/AddLineItem][/ShowIf][ShowIf [box2]![raw][box2][/raw]][AddLineItem cart=[cart]&db=Photos.db&sku=[box2]]sku=[box2][/AddLineItem][/ShowIf]I also really like the idea of using frames, so you can have a little contents of cart frame somewhere that gets updated every time they click a add button, but it leaves the main frame unchanged.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>How would you suggest I use the showif to see if the checkbox has been>clicked? Is there someway to pass this info with the submit button?WebCatalog makes every form variable available to you upon submit, so in your case there are 6 checkboxes named box1, box2, etc. If you put [box1] into your shoppingcart.tmpl, it will either display cdp005001H or it will display [box1]. Web browsers are weird; if a checkbox is unchecked, then it's as though it doesn't exist in your form at all, so that's why WebCatalog displays literally [box1].The following lines mean if box1 has a value other than literally [box1], then add the sku associated with box1 to the cart[ShowIf [box1]!
[raw][box1][/raw]][AddLineItem cart=
[cart]&db=Photos.db&sku=[box1]]sku=[box1][/AddLineItem][/ShowIf][ShowIf [box2]!
[raw][box2][/raw]][AddLineItem cart=
[cart]&db=Photos.db&sku=[box2]]sku=[box2][/AddLineItem][/ShowIf]I also really like the idea of using frames, so you can have a little contents of cart frame somewhere that gets updated every time they click a add button, but it leaves the main frame unchanged.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Grant Hulbert
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:
A little syntax help (1997)
ListFiles (1998)
100% cpu load (2006)
Grep help (2004)
Monthly Help File (1997)
Document Contains no data, or showcart error. (1997)
Silly date question (2006)
[WebDNA] [ot] Snow Leopard Server - Mac Mini (2010)
[interpret] inside the db field? (1997)
WebDNA for Dummies (2004)
when is date system date or order date? (1997)
Summing fields (1997)
Max Record length (1997)
Credit Card Number checking (1997)
Searchable WebCat (etc.) Docs ? (1997)
Running 2 two WebCatalog.acgi's (1996)
Satisfy Me ! was: Why can't support be satisfying topurchasers? (2000)
WebCatalog for Postcards ? (1997)
PSC recommends what date format yr 2000??? (1997)
Setting variables. (1998)