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:

[tcpsend] (2001) Multiple fields on 1 input (1997) WebCatalog can't find database (1997) What am I doing wrong? (2000) serial number generation (1997) I'm tired of all this! (2000) The max=0 issue is a bug ... CALL TO ACTION (2000) Apache2 connector (2003) Newbie needs advice to learn to use WebDNA (2003) Anyone using unix? Having problems... (2000) process SSI (1998) Anyone using unix? Having problems... (2000) Multiple shipping databases (1997) Sort Order on a page search (1997) WebCatalog [FoundItems] Problem - LONG - (1997) Math with Time (1997) Multiple security dbs (1997) webdelivery.html and webna (1997) email and W* 4.x (2000) Exact word search - continued (1998)