Re:my First Ship table

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21024
interpreted = N
texte = Okay, I took your advice and changed a lot of things around and finally got this lookup to work if I write it into invoice.tplCourier [lookup db=customShipping.txt&lookInField=sam&value=[math][lineitems][quantity]+[/lineitems]0[/math][shipVia]&returnField=shipCost¬Found=555]it works it displays 7.75 --- perfect.However my formulas.db has the exact same lookup....shipCost [lookup db=customShipping.txt&lookInField=sam&value=[math][lineitems][quantity]+[/lineitems]0[/math][shipVia]&returnField=shipCost¬Found=555]I has ZERO effect on shipTotal or ShipCost. It won't even return 555I checked the following things...WebCatalog does see formulas.db as a database after I flusheddatabases and reloaded and it says 2 fields 3 records which it has... What is different about the looking up from formulas.db and doing the lookup on invoice.tpl. I need the value to be passed on to shipTotal so the value can be totales and passed on smoothly. Any Ideas?Tim it went...>>I guess what I don't understand is when exactly webcat looks into>>Formulas.db, when an item is added to the cart, or when the shopping cart>>is submitted to Invoice.tpl.>>Both times. For instance, when you Add to the cart, the formula is>evaluated to get the proper [price], [unitShipCost] and [taxable] for that>lineitem. When you ShowCart or Purchase, the formulas for [taxRate] and>[shipCost] are evaluated for the whole cart (but individual lineitems are>never touched once they have been added to the cart).>>>What I am trying to do in formulas.db is have it total up quantity, and>>match that total to the [shipMeth] field and return [shipCost] which will>>then become [shipTotal] on invoice.tpl and be added to [subTotal] for the>>[grandTotal]>>Have you tried seeing what this formula displays when you drop it into your>invoice page in such a way that it is visible to you? For instance,>[shipMeth] is not a cart variable, so I don't know where that would be>coming from. Perhaps you meant eqShipMethdatarq=[shipVia]?>>Try simplifying this by putting every little piece of WebDNA onto separate>lines in your template so you can see what they evaluate to individually.>This way you don't have to try to be a magician and figure out what's going>on invisibly inside the formula.>>Also, where's the beginning [Search part of your formula?>>>shipCost>>>> db=CustomShipping.db&eqShipMethdatarq=[ShipMeth]&eqQuantitydatarq=[math][lineit>>ems][quantity]+[/lineitems]0[/math]][FoundItems][shipCost][/FoundItems][/Search>>]>>Technical Support | ==== eCommerce and Beyond ====>Pacific Coast Software | WebCatalog, WebMerchant,>11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,>San Diego, CA 92128 | Typhoon>619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re:my First Ship table (PCS Technical Support 1998)
  2. Re:my First Ship table (Tim Taylor 1998)
  3. Re:my First Ship table (PCS Technical Support 1998)
  4. Re:my First Ship table (Tim Taylor 1998)
Okay, I took your advice and changed a lot of things around and finally got this lookup to work if I write it into invoice.tplCourier [lookup db=customShipping.txt&lookInField=sam&value=[math][lineitems][quantity]+[/lineitems]0[/math][shipVia]&returnField=shipCost¬Found=555]it works it displays 7.75 --- perfect.However my formulas.db has the exact same lookup....shipCost [lookup db=customShipping.txt&lookInField=sam&value=[math][lineitems][quantity]+[/lineitems]0[/math][shipVia]&returnField=shipCost¬Found=555]I has ZERO effect on shipTotal or ShipCost. It won't even return 555I checked the following things...WebCatalog does see formulas.db as a database after I flusheddatabases and reloaded and it says 2 fields 3 records which it has... What is different about the looking up from formulas.db and doing the lookup on invoice.tpl. I need the value to be passed on to shipTotal so the value can be totales and passed on smoothly. Any Ideas?Tim it went...>>I guess what I don't understand is when exactly webcat looks into>>formulas.db, when an item is added to the cart, or when the shopping cart>>is submitted to Invoice.tpl.>>Both times. For instance, when you Add to the cart, the formula is>evaluated to get the proper [price], [unitShipCost] and [taxable] for that>lineitem. When you ShowCart or Purchase, the formulas for [taxRate] and>[shipCost] are evaluated for the whole cart (but individual lineitems are>never touched once they have been added to the cart).>>>What I am trying to do in formulas.db is have it total up quantity, and>>match that total to the [shipMeth] field and return [shipCost] which will>>then become [shipTotal] on invoice.tpl and be added to [subTotal] for the>>[grandTotal]>>Have you tried seeing what this formula displays when you drop it into your>invoice page in such a way that it is visible to you? For instance,>[shipMeth] is not a cart variable, so I don't know where that would be>coming from. Perhaps you meant eqShipMethdatarq=[shipVia]?>>Try simplifying this by putting every little piece of WebDNA onto separate>lines in your template so you can see what they evaluate to individually.>This way you don't have to try to be a magician and figure out what's going>on invisibly inside the formula.>>Also, where's the beginning [Search part of your formula?>>>shipCost>>>> db=CustomShipping.db&eqShipMethdatarq=[ShipMeth]&eqQuantitydatarq=[math][lineit>>ems][quantity]+[/lineitems]0[/math]][founditems][shipCost][/FoundItems][/Search>>]>>Technical Support | ==== eCommerce and Beyond ====>Pacific Coast Software | WebCatalog, WebMerchant,>11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,>San Diego, CA 92128 | Typhoon>619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Tim Taylor

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:

What about an ends with operator? (2000) ShowIf & HideIf Question? (1998) Speed Optimization - Mac (1997) randomness (1997) Sku numbers (1997) Webcatalog installation on debian ? (2003) HELP WITH DATES (1997) Sorting by date (1997) WebCatalog NT (1996) [WebDNA] php/mySQL version of WebDNA Speed Test? (2009) WebDNA 6 (2004) Need relative path explanation (1997) Trouble with Netscape (1998) Sense/Disallow HTML tags during $Append (1997) WebCat2 several catalogs? (1997) What am I missing (1997) WebTen? (1997) & in Lookups (1997) when is date system date or order date? (1997) WebDelivery: One step closer !! (1997)