Re: .. more on sliding discounts...
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 12459
interpreted = N
texte = >an extra line containing a discount >(calculated using the total number of products ordered) can be added to >the end of an order file so that it is included in the subtotal (and >therefore has the correct tax applied to it)! Can subTotal or Grand Total >have formulas 'assigned' to them? Is there a way of charging tax on the >shipCost as well as the subTotal ( we have to charge tax on shipping >charges in the UK!)?There is an [AddLineItem] context that lets you put more items in the cart at will. Use this, combined with a little [lineitems] loop that uses [math] to add up the number of items in the cart.If you want to add tax to shipping, I suppose you could modify the [unitshipcost] formula to add the tax at the moment the product is added to the cart. But that means if the visitor ever changes the taxRate (by changing the destination, or something else that affects the taxRate), the unitShopCosts already in the cart would be wrong.Another way would be to add another lineitem to the bottom of the cart that represents the tax on shipping. You'll probably have to fake up a SKU called shiptax or something like that.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
>an extra line containing a discount >(calculated using the total number of products ordered) can be added to >the end of an
order file so that it is included in the subtotal (and >therefore has the correct tax applied to it)! Can subTotal or Grand Total >have formulas 'assigned' to them? Is there a way of charging tax on the >shipCost as well as the subTotal ( we have to charge tax on shipping >charges in the UK!)?There is an
[addlineitem] context that lets you put more items in the cart at will. Use this, combined with a little
[lineitems] loop that uses
[math] to add up the number of items in the cart.If you want to add tax to shipping, I suppose you could modify the [unitshipcost] formula to add the tax at the moment the product is added to the cart. But that means if the visitor ever changes the taxRate (by changing the destination, or something else that affects the taxRate), the unitShopCosts already in the cart would be wrong.Another way would be to add another lineitem to the bottom of the cart that represents the tax on shipping. You'll probably have to fake up a SKU called shiptax or something like that.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Grant Hulbert
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:
Navigator Parsing (1997)
price on detail, but not shoppingcart (1997)
handling cookies in and out of secure space (2000)
[WebDNA] Calculate Cube root (2012)
Wanted: WebCatalog Programmer (2000)
Mac Lockup Problems (1998)
[OT] HTML EMAIL program wanted (1999)
Problems getting parameters passed into email. (1997)
pop up menu's (1998)
textarea text truncated by browser (2000)
Setting up shop (1997)
Why don't Typhoon & Firesite work together? (and webcat) (1998)
Roundup function? (1997)
Compressed cookies? (2003)
clean(); (2004)
Sendmail html/text and CCS problem (2003)
WebCatalog for guestbook ? (1997)
Error Log.db --however (1997)
Templates on Unix & CGI on Mac? (1997)
Banners and sort of random display (1997)