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][unitShipCo st]*[lookup db=FactorFlete.db&value=[shipVia]&lookinfield=ShipCity&returnfield=ShipFact or][/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? Thanks Rodolfo > > >__________________________________________________ >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 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 > ------------------------------------------------------------- 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:

    
  1. Re: Calculate UnitShipCost in Formulas.db (Smith Micro Support 1999)
  2. Re: Calculate UnitShipCost in Formulas.db (Rodolfo de la Garza 1999)
  3. Re: Calculate UnitShipCost in Formulas.db (Chris Vargas 1999)
  4. Calculate UnitShipCost in Formulas.db (Rodolfo de la Garza 1999)
>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][unitShipCo st]*[lookup db=FactorFlete.db&value=[shipVia]&lookinfield=ShipCity&returnfield=ShipFact or][/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? Thanks Rodolfo > > >__________________________________________________ >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 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 > ------------------------------------------------------------- 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:

removing programming logic white space (2003) Re:2nd WebCatalog2 Feature Request (1996) attn: smitmicro - cart limitation (2002) Summary layout (1997) Next (1997) PSC recommends what date format yr 2000??? (1997) Recovering/resetting old admin password (2005) WebCat2 - many [carts] on one template page? (1997) PCS Frames (1997) Summing fields in a search/founditems context?? (2000) WebCatalog 4.0 has been released! (2000) PCS Frames (1997) Bug Report, maybe (1997) Comments in db? (1997) WebDNA Solutions --> Date format suggestions (1998) no global [username] or [password] displayed ... (1997) spawn (1998) [WebDNA] AJAX WebDNA module (2009) WebCat2b12 - nesting [tags] (1997) Format question WC Mac f3 (1997)