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

Various Problems (1997) WebDNA Solutions ... sorry! (1997) Trouble with formula.db + more explanation (1997) Problems passing [SKU] with $Replace in 2.0 (1997) [SHOWIF AND/OR] (1997) Download URL & access on the fly ? (1997) Re:Authenticate (1998) Setting up shop (1997) SKU lookup (1997) Re:quit command on NT (1997) Smith Micro - no competition (2000) minimalist shopping cart. (1997) Tip: Image Maps (Server-Side) with WebCatalog (1997) Emailer (WebCat2) (1997) Re:listfiles-looking for slick solution (1997) Security Question (1997) Opinion: [input] should be called [output] ... (1997) caching -check- (2001) WebCat2 Append problem (B14Macacgi) (1997) [WebDNA] [OT] Need to add second SSL host - what are my options? (2010)