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:

b12 cannot limit records returned and more. (1997) Download URL & access on the fly ? (1997) Bug? (1997) WebCat2 several catalogs? (1997) test (2004) Webcat2, WebCommerce, Mod 10 etc. (1997) International Orders (1998) Sendmail strangie (2002) webcatalog for linux (1998) Changing price for a SLU based on options (size, etc.) (1997) include bug????? (1997) Banners (1997) Interfacing WC with mail server (1998) PSC recommends what date format yr 2000??? (1997) table max? (2001) problems with 2 tags shakur (1997) Running _every_ page through WebCat ? (1997) Export database record - another idea (2005) Max Record length restated as maybe bug (1997) really wierd browser truncating (1997)