Re: Calculate UnitShipCost in Formulas.db
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 24827
interpreted = N
texte = >On 11/25/1999 2:14 PM, Rodolfo de la Garza at>listas@edifika.com wrote:>>> I look at the archive and docs and I understand the >> unitshipcost is calculated when the user add a item>> to the shoppingcart.tmpl. at that time I don't know >> in wich city the user want the product to be >> delivered, in the shoppingcart.tmpl there are an >> option to select the city and then they pass to the >> invoice.tmpl. I have in the formulas.db this:>>>>unitShipCost [Lookup db=products.db&lookInField=sku&>>value=[sku]&returnField=unitShipCost]*[lookup >>db=ShipCosts.db&value=[city]&lookinfield=ShipCity&>>returnfield=ShipFactor]>>I'm pretty sure that since the ShipToCity isn't set>until they enter it in shoppingcart.tmpl, you will>have to set the unitShipCost in a [setlineitems]>context on invoice.tmpl rather than in formulas.db.>>Either that, or maybe if you use the actual ShipToCity>field that is used by the shopping cart/order file,>the formula might calculate it correctly -- right now>you're using [city] instead of [shiptocity]>>Hope this isn't the blind leading the blind...Chris,I tried this and doesn't work.in the invoice.tmpl I put inside the [lineitems] context something like:[line items][SetLineItem cart=[cart]&index=[lineindex]&db=products.db]unitShipCost=[math][unitShipCost]*[lookup db=FactorFlete.db&value=[shipVia]&lookinfield=ShipCity&returnfield=ShipFactor][/math][/SetLineItem]$[format thousands .2f][unitShipCost][/format][/lineitems]It show the unitShipCost I have in the database but not the one calculated into the [setlineitems] context.What I'm doing wrong?ThanksRodolfo>>>__________________________________________________>Do You Yahoo!?>Thousands of Stores. Millions of Products. All in one place.>Yahoo! Shopping: http://shopping.yahoo.com>>------------------------------------------------------------->Brought to you by CommuniGate Pro - The Buzz Word Compliant MessagingServer.>To end your Mail problems go to
.>>This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
>On 11/25/1999 2:14 PM, Rodolfo de la Garza at>listas@edifika.com wrote:>>> I look at the archive and docs and I understand the >> unitshipcost is calculated when the user add a item>> to the shoppingcart.tmpl. at that time I don't know >> in wich city the user want the product to be >> delivered, in the shoppingcart.tmpl there are an >> option to select the city and then they pass to the >> invoice.tmpl. I have in the formulas.db this:>>>>unitShipCost [Lookup db=products.db&lookInField=sku&>>value=[sku]&returnField=unitShipCost]*[lookup >>db=ShipCosts.db&value=[city]&lookinfield=ShipCity&>>returnfield=ShipFactor]>>I'm pretty sure that since the ShipToCity isn't set>until they enter it in shoppingcart.tmpl, you will>have to set the unitShipCost in a [setlineitems]>context on invoice.tmpl rather than in formulas.db.>>Either that, or maybe if you use the actual ShipToCity>field that is used by the shopping cart/order file,>the formula might calculate it correctly -- right now>you're using [city] instead of [shiptocity]>>Hope this isn't the blind leading the blind...Chris,I tried this and doesn't work.in the invoice.tmpl I put inside the [lineitems] context something like:[line items][SetLineItem cart=[cart]&index=[lineindex]&db=products.db]unitShipCost=[math][unitShipCost]*[lookup db=FactorFlete.db&value=[shipVia]&lookinfield=ShipCity&returnfield=ShipFactor][/math][/SetLineItem]$[format thousands .2f][unitShipCost][/format][/lineitems]It show the unitShipCost I have in the database but not the one calculated into the [setlineitems] context.What I'm doing wrong?ThanksRodolfo>>>__________________________________________________>Do You Yahoo!?>Thousands of Stores. Millions of Products. All in one place.>Yahoo! Shopping: http://shopping.yahoo.com>>------------------------------------------------------------->Brought to you by CommuniGate Pro - The Buzz Word Compliant MessagingServer.>To end your Mail problems go to .>>This message is sent to you because you are subscribed to> the mailing list .>To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to >-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Rodolfo de la Garza
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:
searching numbers (1998)
Some shell fun (2004)
test (2008)
credit card authorization question (1997)
WebCat b15 Mac plug-in (1997)
[protect] on NT? (1997)
[redirect] w/o showing args? (1999)
f2 download problems (1997)
using showpage and showcart commands (1996)
using webdna to determine pixel parameters (2000)
New Plug-in and Type 11 errors (1997)
color and size options (1997)
WebCat2.0 acgi vs plugin (1997)
Cannot calculate prices (1997)
Search 1 Field Twice? (2004)
Forms (1997)
2nd Request for help/advice on variable pricing + MORE (2000)
webmerchant/mac auth. rejects zipcode (1998)
WebCat2b12 forgets serial # (1997)
4.5 Upgrade (2003)