Re: Associative lookup style? + bit more

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10836
interpreted = N
texte = >>Using the above input form in the shoppingcart.tmpl didn't work. > >I might be wrong about ciel(). Try [format .0f]...[/format] instead. B16 >will definitely have ciel() back in it, though. >ciel works! > >>The formula for shipCost still ends up with zero. Does the formula for >>shipcost only get invoked when moving from the shoppingcart.tmpl -> >>invoice.tmpl? > >No, all formulas are evaluated at $Add, $Remove, $ShowCart, and $Purchase >times. WebCatalog has no idea you are going to an invoice page -- they're >all just templates to it.Well, the formula.db doesnt seem to be invoking on $ShowCart action from our invoice.tmpl. In there I have the following input forms (first one doesn't work in the shoppingcart.tmpl, but does here...hmmph!). The other one is a variable used to simplify the formula below it:Then I have in the formula.db:shipCost [hideif [math][totalWeight]>.5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=half_lb][/hideif][showif [math][totalWeight]>.5[/math]][hideif][math][totalWeight]>5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=[math]ciel([totalWeight])[/math]][/hideif][showif [math][totalWeight]>5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[math][wheretoshipto]&ret urnField=5]+(ciel([totalWeight])-5)*[lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=addl_lb][/math][/showif][/showif]NOTE: I put the above massive formula in the final_invoice.tmpl to see it displayed alongside what [shipCost] thinks it should be. The formula above produces the proper shipcost value, but the [shipCost] is still 0 from the formula database. So, something is funny.Curt ---------------------------------------------------------------------- | William Curt Eggemeyer Curt@mail.bzzzzzz.com | | BeeHive Technologies, Inc. | | http://www.bzzzzzz.com with a WebCam in Pasadena, California | ---------------------------------------------------------------------- Associated Messages, from the most recent to the oldest:

    
>>Using the above input form in the shoppingcart.tmpl didn't work. > >I might be wrong about ciel(). Try [format .0f]...[/format] instead. B16 >will definitely have ciel() back in it, though. >ciel works! > >>The formula for shipCost still ends up with zero. Does the formula for >>shipcost only get invoked when moving from the shoppingcart.tmpl -> >>invoice.tmpl? > >No, all formulas are evaluated at $Add, $Remove, $ShowCart, and $Purchase >times. WebCatalog has no idea you are going to an invoice page -- they're >all just templates to it.Well, the formula.db doesnt seem to be invoking on $ShowCart action from our invoice.tmpl. In there I have the following input forms (first one doesn't work in the shoppingcart.tmpl, but does here...hmmph!). The other one is a variable used to simplify the formula below it:[math][lineitems][quantity]*[textB]+[/lineItems]0)[/math]>Then I have in the formula.db:shipCost [hideif [math][totalWeight]>.5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=half_lb][/hideif][showif [math][totalWeight]>.5[/math]][hideif][math][totalWeight]>5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=[math]ciel([totalWeight])[/math]][/hideif][showif [math][totalWeight]>5[/math]][lookup db=country_cost_list.db&lookInField=country&value=[math][wheretoshipto]&ret urnField=5]+(ciel([totalWeight])-5)*[lookup db=country_cost_list.db&lookInField=country&value=[wheretoshipto]&returnFie ld=addl_lb][/math][/showif][/showif]NOTE: I put the above massive formula in the final_invoice.tmpl to see it displayed alongside what [shipCost] thinks it should be. The formula above produces the proper shipcost value, but the [shipCost] is still 0 from the formula database. So, something is funny.Curt ---------------------------------------------------------------------- | William Curt Eggemeyer Curt@mail.bzzzzzz.com | | BeeHive Technologies, Inc. | | http://www.bzzzzzz.com with a WebCam in Pasadena, California | ---------------------------------------------------------------------- w curt eggemeyer

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:

WebCat2b15MacPlugIn - [authenticate] not [protect] (1997) form posts expiring instantly... why? (2000) Merging databases (1997) template not found error (1998) Applescript, WebDNA, and PDF (1997) WebCatalog Upgrade Pricing? (1997) WebDNA 6 (2004) Simple way to create unique SKU (1997) Hard Questions ? (1997) How to add 60 minutes to current time and have it properly (2005) Interfacing a webcat front end registartion to CommunigatePRO (2000) How does WebCatalog search the database? (1997) [format 40s]text[/format] doesn't work (1997) Couple of techno questions (1999) MySQL Wildcard Trouble (2006) Zip Code Lookups (1999) 2nd WebCatalog2 Feature Request (1996) Date search - yes or no (1997) Text variables do not show (1999) Emailer setup (1997)