Re: Associative lookup style? + bit more

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10804
interpreted = N
texte = >like $Add?sku=[sku]&textA=[weight]. On your shopping cart page (the one >previous to the invoice page) put the following: > >value=[math]ciel([lineItems][quantity]*[textA]+[/lineItems]0)[/math]Using the above input form in the shoppingcart.tmpl didn't work. I think it is because we get the quantities for each product type ordered in that same template (I guess you can have one input value depend on another in the same web page)? I tried placing this input form at the bottom before the submit button and after the input form for the quantities, but totalWeight kept getting 0. I then moved this form to the invoice.tmpl and it worked. however (below)....>------ Formulas.db ------ >shipCost [lookup db=countries.db&lookInField=country&value=[shipToCountry]&returnField= >[totalWeight]]>So change your fieldnames in countries.db from one_lb to 1 and two_lb to 2, etc. >That way you can use a calculation to tell you which field to look in.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? If so, can I do it with another input form for the shipcost in the final_invoice.tmpl instead, and blank shipCost out of the formula.db? I know totalweight is getting set right, because on the final_invoice.tmpl I display it, so the formula is not getting invoked.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:

    
>like $Add?sku=[sku]&textA=[weight]. On your shopping cart page (the one >previous to the invoice page) put the following: > >value=[math]ciel([lineitems][quantity]*[textA]+[/lineItems]0)[/math]Using the above input form in the shoppingcart.tmpl didn't work. I think it is because we get the quantities for each product type ordered in that same template (I guess you can have one input value depend on another in the same web page)? I tried placing this input form at the bottom before the submit button and after the input form for the quantities, but totalWeight kept getting 0. I then moved this form to the invoice.tmpl and it worked. however (below)....>------ formulas.db ------ >shipCost [lookup db=countries.db&lookInField=country&value=[shipToCountry]&returnField= >[totalWeight]]>So change your fieldnames in countries.db from one_lb to 1 and two_lb to 2, etc. >That way you can use a calculation to tell you which field to look in.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? If so, can I do it with another input form for the shipcost in the final_invoice.tmpl instead, and blank shipCost out of the formula.db? I know totalweight is getting set right, because on the final_invoice.tmpl I display it, so the formula is not getting invoked.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:

Displaying raw values (1998) WebCat2.0b15-to many nested [xx] tags (1997) linetiems in thankyou.tpl (1997) [WebDNA] TCPconnect and Bitcoin rate (2017) Multiple security dbs (1997) Search Questions (2000) Bug? (1997) Resume Catalog ? (1997) Grep search not working (2002) WebCat for mass emailings (1997) multiple search commands (1997) Product Comparison (2000) can WC render sites out? (1997) [WebDNA] TCPConnect w/ user:pass (2009) [searchString] (1997) Line ending nuisance (2005) Fun with dates (1997) [WriteFile] problems (1997) WebCat2 Append problem (B14Macacgi) (1997) Webcat2, WebCommerce, Mod 10 etc. (1997)