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:

Email truncation test (1998) Custom WebCat Prefs ... (1997) Search wbrk word break param (1998) WebCat2 - [format thousands] (1997) Search Questions (2000) Can a database get stomped by simultaneous access? (1997) Order not created error (never mind) (1997) [OT] Might be of interest... (2006) WebDNA+unixODBC+MS SQL (2005) [WebDNA] Cookie behavior (2010) Q: Japanese Kanji code support? (2000) PIXO support (1997) ShowNext example for GeneralStore (1997) Help!!!! Purchases not going through! FIXED! (1997) [date] formatting bug inside [orderfile]? (1998) setting cookies with [setcookie] (1998) WebCat b13 CGI -shownext- (1997) Quit revisited (1997) WebDNA-Talk Digest mode broken (1997) Just Testing (1997)