Re: [WebDNA] Formulas question

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107805
interpreted = N
texte = Dave Stengel wrote: > I've got a simple Shopping cart that I'm trying to get prices to update > based on the [LineIndex]quantity and my Price Formula. > I've checked my Formula and it updates the price correctly if I add > Quantity=[a number] manually in the URL when its added to cart, but if I > change the quantity on ShoppingCart or Invoice.tpl the price remains > whatever the price was when it was first added to cart. > > Does anyone know a way I can loop though the lineitems and update the > price as the quantity for that lineitem is updated or changed? > > [SetLineItem > cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpret]&textA=[url][lookup > db=db/product.db&lookinfield=sku&value=[url][sku][/url]&returnfield=title][/url][/SetLineItem] Hi Dave, The formulas.db only works when adding a product to the cart. For updating prices, use [setLineitem..] with the 'password' and 'price' params. (price being any calculation you like) http://docs.webdna.us/pages.html?context=SetLineItemContext.html HTH, Donovan -- Donovan Brooke Euca Design Center www.euca.us www.keepitturning.co Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Formulas question (Donovan Brooke 2011)
  2. [WebDNA] Formulas question (Dave Stengel 2011)
Dave Stengel wrote: > I've got a simple Shopping cart that I'm trying to get prices to update > based on the [LineIndex]quantity and my Price Formula. > I've checked my Formula and it updates the price correctly if I add > Quantity=[a number] manually in the URL when its added to cart, but if I > change the quantity on ShoppingCart or Invoice.tpl the price remains > whatever the price was when it was first added to cart. > > Does anyone know a way I can loop though the lineitems and update the > price as the quantity for that lineitem is updated or changed? > > [SetLineItem > cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpret]&textA=[url][lookup > db=db/product.db&lookinfield=sku&value=[url][sku][/url]&returnfield=title][/url][/SetLineItem] Hi Dave, The formulas.db only works when adding a product to the cart. For updating prices, use [setLineitem..] with the 'password' and 'price' params. (price being any calculation you like) http://docs.webdna.us/pages.html?context=SetLineItemContext.html HTH, Donovan -- Donovan Brooke Euca Design Center www.euca.us www.keepitturning.co Donovan Brooke

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:

Listfiles not listing mounted volume (2002) Using Cookie for client specific info? (1997) searching numbers (1998) Stumped (1999) Adding up line items. (2000) [WebDNA] Can I do something with webdna to pass-protect an (2009) RE: protect tag on NT (1997) EIMS Problems (1997) too many nested ... problem (1997) Item counting? (1998) Working HTML email (2001) What file? (1997) Setting up shop (1997) Pgp&emailer (1997) Sorting Numbers (1997) emails sent twice (2001) WebCat2 Append problem (B14Macacgi) (1997) date formatting for CC card expiration date check (1998) [redirect] question (2005) More on the email templates (1997)