Re: addlineitems within formvariable loop

This WebDNA talk-list message is from

1998


It keeps the original formatting.
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 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ 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?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 | Typhoon 619/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:

unable to launch acgi in WebCat (1997) WebCat2 beta 11 - new prefs ... (1997) ShowIF Question (2000) Formulas.db question (2002) SIMS setup (1998) Type 2 errors with WebCatalog.acgi (1997) Formatting of email on NT (1998) AAgghh!! Help, please. SSL strikes again. (1997) FoundItems Question (1998) [OT] Looking for WC web dev help (2003) GuestBook example (1997) Dates - Search and Sorting (1999) carriage returns in data (1997) A little syntax help (1997) Strange Form Occurrence on Log In Pages (2005) [SHOWIF AND/OR] (1997) State Coalition Approves Internet Sales Tax Plan (2002) Location of Webcat site in folder hierarchy (1997) Mime Headers for Mail (1998) Software Update OSX (2003)