Re: Adding discount to cart

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28868
interpreted = N
texte = yeah 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 ------------------------------------------------------------- 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: Adding discount to cart (John Butler 2000)
  2. Re[2]: Adding discount to cart (jpeacock@univpress.com 2000)
  3. Re: Adding discount to cart (John Butler 2000)
  4. Re: Adding discount to cart (Rob Schmidt 2000)
  5. Re: Adding discount to cart (John Butler 2000)
  6. Re: Adding discount to cart (jpeacock@univpress.com 2000)
  7. Adding discount to cart (Rob Schmidt 2000)
yeah 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 ------------------------------------------------------------- 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 John Butler

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:

Exclude by date - multiple (1997) Zipcodes (1998) IIS4b2 and WebCatalog b19 (1997) EIMS Problems (1997) Help! WebCat2 bug (1997) showif comparison begins w/ and contains (1997) One per customer (2000) Search returns all, not 20 (1997) Dark Horse Comics success story (1997) Summing fields (1997) the dreaded unitShipCost (2003) Emailer and encryption (1997) Re:E-Mailer (WebCatb15acgiMac) (1997) How is it done? (1998) quotes and truncating? (1997) Nesting Search Within Tag? (1997) taxrate - off by 1 cent (1997) Bug or syntax error on my part? (1997) PROBLEM (1997) [SHOWIF AND/OR] (1997)