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:

Fiskars (2003) ImageMagick (2005) RE:DatabaseHelper (1997) mod_webcatalog2.so (2003) Setting up WebCatalog with Retail Pro data (1996) Error Messages Returned to User (1997) Pref settings? (1998) Date fun with MySQL (2004) Line items in table cells (1997) Emailer help....! (1997) Emailer setup (1997) Setting up shop (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) searching for a variable range with in a found set (2002) WebCat cannot handle compatible search parameters? (1997) Auto entering Friday's date in a field (2002) WebCatalog2 Feature Feedback (1996) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Subtotal help (1997) How to break a search ... (2002)