Re: ShipCost formula (for weight *and* quantities)?
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 22039
interpreted = N
texte = >Just realized my shipcost formula is not properly accounting for line items>that have a quantity of more than one! (ooops!)Your formula looks OK at first glance, so try putting [WriteFile] insidethe formula to write out the interior of the [math] context so you can seethe whole equation as it would be 'seen' by the math context.[lookup db=ShipCosts.db&lookInField=weight&value=[math][lineItems]([lookupdb=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/lineItems]0[/math]&returnField=[shipVia]][WriteFilefile=debugFormula.txt][lineItems]([lookupdb=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/lineItems]0[/WriteFile]Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>Just realized my shipcost formula is not properly accounting for line items>that have a quantity of more than one! (ooops!)Your formula looks OK at first glance, so try putting
[writefile] insidethe formula to write out the interior of the
[math] context so you can seethe whole equation as it would be 'seen' by the math context.[lookup db=ShipCosts.db&lookInField=weight&value=
[math][lineitems]([lookupdb=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/lineItems]0[/math]&returnField=[shipVia]][WriteFilefile=debugFormula.txt]
[lineitems]([lookupdb=pricing.db&lookInField=sku&value=[sku]&returnField=weight]*[quantity])+[/lineItems]0[/WriteFile]Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
PCS Technical Support
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:
Card clearance, problems - solutions? (1997)
Summing a field full of numbers ... (1997)
WC TableGrinder (1997)
Limiting user access to .tmpl files (1997)
Looping control (1997)
For those of you not on the WebCatalog Beta... (1997)
cybercash on OSX - was Executing remote AppleScript (2000)
WCS Newbie question (1997)
Sendmail problem (2002)
5.0 Pricing (2003)
Getting total number of items ordered (1997)
how to use WebCat w. SSL & CyberCash (1998)
[WebDNA] php/mySQL version of WebDNA Speed Test? (2009)
Need help!! on searching in two databases. (1998)
CMS - Formatting Content (2004)
Using EIMS instead of Emailer (1998)
Separate SSL Server (1997)
RE: 2nd WebCatalog2 Feature Request (1996)
Webcat/Webmerchant part II (1998)
ShowNext truncating passed variable?? (1997)