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:
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)