Re[2]: Adding discount to cart

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28869
interpreted = N
texte = The method I suggested (originally courtesy of Grant years ago) is much cleaner since WebCat deals with all of the totals for you. Why reinvent the commonly understood accounting concepts of SubTotal and TaxableTotal when WebCat will do it for you. You can even use this method for gift certificates quite easily, including the unusual case where the customer must pay tax on the entire amount, not the discounted amount (hint &Taxable=N).John Peacock ____________________Reply Separator____________________ Subject: Re: Adding discount to cart Author: (WebCatalog Talk) Date: 3/10/00 3:35 PMyeah I ended up handling each of those elements with a new custom variable... each of which is generated on the fly every time (discSubTot, discTaxTot, etc.) -JohnRob Schmidt wrote:> I have to calculate tax on the subtotal so I think your method below would fall short on that account. The discount has to be incorporated in the standard [subtotal] or else figuring of taxtotal, grandtotal etc is going to get whacky. > > >If they user gets a discount I store that fact in a header in the cart file (and also their discount rate stored in a header). If so then on the shopping cart page I display another table row after the subtotal which shows yer discount is [math](totalDiscount=[subtotal]*[discountRate])[/math] then another table row with yer discounted subtotal is [math][subtotal]-[totalDiscount][/math]... (I hand tweak all the rest as well - [discGrand], etc.) > > > >-John > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re[2]: Adding discount to cart (jpeacock@univpress.com 2000)
The method I suggested (originally courtesy of Grant years ago) is much cleaner since WebCat deals with all of the totals for you. Why reinvent the commonly understood accounting concepts of SubTotal and TaxableTotal when WebCat will do it for you. You can even use this method for gift certificates quite easily, including the unusual case where the customer must pay tax on the entire amount, not the discounted amount (hint &Taxable=N).John Peacock ____________________Reply Separator____________________ Subject: Re: Adding discount to cart Author: (WebCatalog Talk) Date: 3/10/00 3:35 PMyeah I ended up handling each of those elements with a new custom variable... each of which is generated on the fly every time (discSubTot, discTaxTot, etc.) -JohnRob Schmidt wrote:> I have to calculate tax on the subtotal so I think your method below would fall short on that account. The discount has to be incorporated in the standard [subtotal] or else figuring of taxtotal, grandtotal etc is going to get whacky. > > >If they user gets a discount I store that fact in a header in the cart file (and also their discount rate stored in a header). If so then on the shopping cart page I display another table row after the subtotal which shows yer discount is [math](totalDiscount=[subtotal]*[discountRate])[/math] then another table row with yer discounted subtotal is [math][subtotal]-[totalDiscount][/math]... (I hand tweak all the rest as well - [discGrand], etc.) > > > >-John > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to jpeacock@univpress.com

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:

WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) RE: High ASCII inside [LOOKUP] inside [LISTWORDS] (1998) Ampersand (1997) database size? (1997) Using Plug-In while running 1.6.1 (1997) WebCat2: Items xx to xx shown, etc. (1997) OT - SMSI complaint (2001) WC2b12: Yes, Formulas.db is for real (1997) Multiple prices (1997) Need Sample Template - just purchased (1997) Site Builder & IE Mac (2004) WebCat2b12 - nesting [tags] (1997) How To question on setting up downloads (1997) Date search - yes or no (1997) WebDNA 5.0 is now shipping (2003) Re:2nd WebCatalog2 Feature Request (1996) [BoldWords] WebCat.acgib15Mac (1997) RE: Shopping Cart Questions (1998) Enhancement Request for WebCatalog-NT (1996) No messages for a week? (2000)