numero = 16009
interpreted = N
texte = >How does Addlineitem know what to add to the shopping cart file?It uses the sku you specify, and looks for that in the database.> [foundItems]> The problem here is that you'll end up with a boatload of sku form variables, all named exactly sku, one for each checkbox that was clicked. It's OK to have a bunch of variables with the same name, but it can be confusing.> [FormVariables] > [name]> [AddLineItem cart=[cart]&sku=[sku]&db=rainman.db]Try changing this to[FormVariables name=sku][AddLineItem cart=[cart]&sku=[value]&db=rainman.dn]I haven't had time to test it, but the idea is to list out all the variables named sku and grab each of their [value]s to stuff into the [AddLineItem].Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Re: addlineitems within formvariable loop (Grant Hulbert 1998)
>How does Addlineitem know what to add to the shopping cart file?It uses the sku you specify, and looks for that in the database.> [founditems]> The problem here is that you'll end up with a boatload of sku form variables, all named exactly sku, one for each checkbox that was clicked. It's OK to have a bunch of variables with the same name, but it can be confusing.> [formvariables] > [name]> [AddLineItem cart=[cart]&sku=[sku]&db=rainman.db]Try changing this to[FormVariables name=sku][AddLineItem cart=[cart]&sku=[value]&db=rainman.dn]I haven't had time to test it, but the idea is to list out all the variables named sku and grab each of their [value]s to stuff into the [addlineitem].Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Grant Hulbert
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...