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:
HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997)
[sendmail] questions... (1997)
Trouble with carts (2000)
No data - More Info (1997)
Emailer error 550? (1999)
Multiple FlushDatabases (2000)
Emailer again & again (1997)
[Reload mydata.db] (1998)
webcat NT (1998)
Authorize.net (2001)
Re:What file? (1997)
Showing Results Alphabetically in Columns (top to bottom) (2002)
Here's how to kill a Butler Database. (1997)
Editing the search string (1997)
Internet Explorer and caching (2000)
SM: Update on this please: Paymethod question (1999)
WebCat editing, SiteGuard WAS:SiteAssociative lookup style? (1997)
formatting a number (1999)
Add to Cart & List of Products (1997)
RequiredFields parameter (1998)