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:
download a file (2001)
ShowIf & HideIf Question? (1998)
Nested tags count question (1997)
Post arguments problem mac? (1997)
Alternating colors (1997)
Cancel Subscription (1996)
Major Security Hole IIS NT (1998)
ShipCost and TaxRate problems (1998)
Forbidden CGI Error (1997)
Lets make a deal (2000)
[SearchString] usage (1997)
WebCat/CyberStudio Compatibility (1998)
Lineitems not showing up in ThankYou page (2006)
[SHOWIF AND/OR] (1997)
graphics server, SSL, Netscape 4.0 (off topic) (1998)
tcp connect includes (1999)
Attn: Bug in GeneralStore example b15 (1997)
[showif],[refferer],[include] in errormessages.db (2002)
Return records from another (1997)
WebCat2.0 acgi vs plugin (1997)