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:

FoundItems Question (1998) Date Range search (1997) expired beta (1997) [WebDNA] Screen Resolution - detection & redirect (2012) sendmail for email (was Netforms) (1998) help (2003) [WebDNA] server admin newbie: what does webdna need owner to be to allow writing? (2010) Date format problems (1997) Checking two required fields (1998) Emailer (WebCat2) (1997) Search group and ww (2003) In Digest Dijon (2000) Help name our technology! (1997) Help! WebCat2 bug (1997) [price] maddness (2002) [WebDNA] Downloadable docs (2011) ShipCost and TaxRate problems (1998) the dreaded unitShipCost (2003) Format of Required fields error message (1997) Comments in db? (1997)