[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:

Summary search -- speed (1997) WebMerchant & CC Response (2002) Make sure I understand this??? (1997) RE: Languages (1997) Showing unopened cart (1997) are we ready to fix random sort? - Or did that already happen? (2000) Search Debugging (2004) OT - SCP on OSX (2005) Fun with dates (1997) [cart] (1998) case number with spaces. (2000) Error Lob.db records error message not name (1997) grep matching (2003) Multiple matches in a search (2004) More on the email templates (1997) SiteEdit NewFile.html ? (1997) Problems setting MIME Headers (1998) is sku a REQUIRED field on NT (1997) Access Denied! But why? (1997) Formulas.db / Quantity Discount problem (1998)