Re: Adding discount to cart

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 28852
interpreted = N
texte = 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.)-JohnRob Schmidt wrote:> I need to factor in a discount to an order which is a percentage of the subtotal. This need to be displayed each time the cart is viewed. This percentage may be zero and should thus be hidden. I've searched the list archives and I gather the best way to do this is by adding a lineitem in the cart - perhaps an item with a SKU of DISCxxx and negative price. Thinking about this briefly it seems that any time something is added, modified or removed, first the discount lineitem would have to be deleted and then after other changes to the cart, recalculated and added on as the last line item. The cart could then be displayed with the discount incorporated. > > Can someone pls tell me other tactics/considerations for doing this discount thing and outline the elegant solutions they've come up with? TIA. > > ------------------------------------------------------------- > 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)
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.)-JohnRob Schmidt wrote:> I need to factor in a discount to an order which is a percentage of the subtotal. This need to be displayed each time the cart is viewed. This percentage may be zero and should thus be hidden. I've searched the list archives and I gather the best way to do this is by adding a lineitem in the cart - perhaps an item with a SKU of DISCxxx and negative price. Thinking about this briefly it seems that any time something is added, modified or removed, first the discount lineitem would have to be deleted and then after other changes to the cart, recalculated and added on as the last line item. The cart could then be displayed with the discount incorporated. > > Can someone pls tell me other tactics/considerations for doing this discount thing and outline the elegant solutions they've come up with? TIA. > > ------------------------------------------------------------- > 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:

payflowpro broken on WebDNA 5.1? (2003) Multiple prices (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) $append (1998) (2004) Suffix or Line? (1999) Re1000001: Setting up shop (1997) HTML encoding in URLs (1997) The evolved Server Configuration Queston (2000) Need relative path explanation (1997) Reversed words (1997) OK, here goes... (1997) [INCLUDE] Limitations (1998) SSL and reg web* (1997) [listfiles] (1998) CyberSource component for WebCatalog? (2000) RE: type 2 errors with ssl server (1997) Apache won't load after v5 install (more) (2003) Re2: frames & carts (1997) Multiple prices (1997)