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:

Re:ListFields and [name] (1997) Cookies (1999) Where's Cart Created ? (1997) instant cookies? (1999) [WebDNA] Intranet site request (2010) Negative Quantity to Shopping Cart (2005) Setting up shop (1997) Banner system (2000) ReturnRaw context (1997) WebCat2b13MacPlugIn - syntax to convert date (1997) Emailer Set Up (1997) Replace Statement (1997) search form problem.. (1997) syntax question, not in online refernce (1997) emailer settings and control questions (1997) Re:Emailer tracking (1997) math on date? (1997) 2.1b3 --> way slow (1997) nesting limits? (1998) RE: strip .0 off off IPaddress (1998)