[WebDNA] Formulas question

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107804
interpreted = N
texte = --000e0ce0b2e85a5af704b40fc56f Content-Type: text/plain; charset=ISO-8859-1 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] [lineItems] [format 6.2f][price][/format] Remove Item [/lineItems] Any ideas would be appreciated -- Dave Stengel http://www.mobilinksoftware.com 209.820.1300 dave@mobilinkpro.com --000e0ce0b2e85a5af704b40fc56f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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=3D= [a=20 number] manually in the URL when its added to cart, but if I change the qua= ntity on ShoppingCart or Invoice.tpl the price remains whatever the price was=20 when it was first added to cart.

Does anyone know =A0a way I can loop though the lineite= ms and update the price as the quantity for that lineitem is updated or cha= nged?

[SetLineItem cart=3D[cart]&index=3D[line= index]]quantity=3D[interpret][quantity[lineindex]][/interpret]&textA=3D= [url][lookup db=3Ddb/product.db&lookinfield=3Dsku&value=3D[url][sku= ][/url]&returnfield=3Dtitle][/url][/SetLineItem] =A0 =A0

[lineItems]
<INPUT TYPE=3D"TEXT"= NAME=3D"quantity[lineIndex]" SIZE=3D"3" VALUE=3D"= [quantity]">
[format 6.2f][price][/format]
<= A HREF=3D"ShoppingCart.tpl?command=3Dremove&db=3Ddb/product.db&= ;index=3D[lineIndex]&cart=3D[cart]">Remove Item</A>
[/lineItems]

Any ideas would be appreciated

--
Dave Stengel
http://www.mobilinksoftware.com
209.820.1300
dave@mobilinkpro.com


--000e0ce0b2e85a5af704b40fc56f-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Formulas question (Donovan Brooke 2011)
  2. [WebDNA] Formulas question (Dave Stengel 2011)
--000e0ce0b2e85a5af704b40fc56f Content-Type: text/plain; charset=ISO-8859-1 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] [lineitems] [format 6.2f][price][/format] [cart]">Remove Item [/lineItems] Any ideas would be appreciated -- Dave Stengel http://www.mobilinksoftware.com 209.820.1300 dave@mobilinkpro.com --000e0ce0b2e85a5af704b40fc56f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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=3D= [a=20 number] manually in the URL when its added to cart, but if I change the qua= ntity on ShoppingCart or Invoice.tpl the price remains whatever the price was=20 when it was first added to cart.

Does anyone know =A0a way I can loop though the lineite= ms and update the price as the quantity for that lineitem is updated or cha= nged?

[SetLineItem cart=3D[cart]&index=3D[line= index]]quantity=3D[interpret][quantity[lineindex]][/interpret]&textA=3D= [url][lookup db=3Ddb/product.db&lookinfield=3Dsku&value=3D[url][sku= ][/url]&returnfield=3Dtitle][/url][/SetLineItem] =A0 =A0

[lineitems]
<INPUT TYPE=3D"TEXT"= NAME=3D"quantity[lineIndex]" SIZE=3D"3" VALUE=3D"= [quantity]">
[format 6.2f][price][/format]
<= A HREF=3D"ShoppingCart.tpl?command=3Dremove&db=3Ddb/product.db&= ;index=3D[lineIndex]&cart=3D[cart]">Remove Item</A>
[/lineItems]

Any ideas would be appreciated

--
Dave Stengel
http://www.mobilinksoftware.com
209.820.1300
dave@mobilinkpro.com


--000e0ce0b2e85a5af704b40fc56f-- Dave Stengel

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:

Multiple prices (1997) Need relative path explanation (1997) Sort Order on a page search (1997) WC Database Format (1997) Requiring that certain fields be completed (1997) Formating found categories (1997) Secure Server (1997) OT Cookie limit (2001) [WebDNA] Mass email using WebDNA (2008) security (1997) Who on the list is available for contract work? (2000) Using Plug-In while running 1.6.1 (1997) setting taxable to true (1997) Summing fields (1997) Queertrons? (1997) Yet another db manager (2004) math on date? (1997) File Upload (1997) RAM variables (1997) WebCat2 beta 11 - new prefs ... (1997)