Re: Price override

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 60055
interpreted = N
texte = Alan, I don't have your code so I don't know your exact situation. But if your worried about being able to do multiple discounts, or, if you have multiple variables that create a discount, know that you don't need to keep the lineitem price at default, as the default price is always in the database for reference. Discounting is a bit tricky when it comes to protecting against cracking. I think it was John P. (and probably others) who described to me a few years ago that discounts work best when they are always created on the fly from the base price in the .db and the given variables. They need to be recalculated upon any editing of the cart and need to be invonurable to back stepping or refreshing. This may be difficult to understand at first as it was for me. I think you are familiar with the modular coding philosophy. I like to put most all of my discounting in a module (.inc file) to be referenced when needed. For instance, For one site I worked on, I incorporated all these types of discounts. 1. Tabled discount - Each product has a table of prices based on quantity. Most every product that is added or changed goes through riggers of checking against this table (really doesn't slow anything down). 2. Date based discount for a certain category of product - Any of this particular category of product gets discounted when the date is between a certain range. 3. Category discount also based on quantity - If 6 or more of this category of product is added to the cart, there is a 15 percent discount to all the lineitems in the cart that are of that category. 4. Subtotal Discount - A 5 tiered discount based on subtotal. 5. Various promotional discounts - I use the method John described for this type of discount... ie. "grand opening discount" is what is seen as a line item in the cart. Basically, when the cart is edited, this module is triggered (other than the subtotal discount) and the orderfile prices are re-caculated based on category, date, contents of cart and base price of product. Having said all that, you may very well be O.K. with the direction you are going as you may not need a picture perfect orderfile that is saved. If you think that you may want access to the orderfile in the future for "Order history" or future payment through a gateway, its best to proceed with the philosophy of keeping the orderfile in tact. I guess I felt the need to speak that warning because I have had to charge a significant amount to some of my customers to correct the code used for the orderfile to impliment new features. Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Price override ( Alan White 2004)
  2. Re: Price override - solved ( Daryl Mitchell 2004)
  3. Re: Price override - solved ( Stuart Tremain 2004)
  4. Re: Price override ( Donovan Brooke 2004)
  5. Re: Price override ( John Peacock 2004)
  6. Re: Price override ( Alan White 2004)
  7. Re: Price override - solved ( Donovan Brooke 2004)
  8. Re: Price override - solved ( Daryl Mitchell 2004)
  9. Re: Price override ( Donovan Brooke 2004)
  10. Re: Price override - solved ( Daryl Mitchell 2004)
  11. Re: Price override ( Daryl Mitchell 2004)
  12. Re: Price override ( Daryl Mitchell 2004)
  13. Re: Price override ( Donovan Brooke 2004)
  14. Re: Price override ( Alan White 2004)
  15. Re: Price override ( Stuart Tremain 2004)
  16. Re: Price override ( "Sal D'Anna" 2004)
  17. Re: Price override ( Donovan Brooke 2004)
  18. Price override ( Daryl Mitchell 2004)
Alan, I don't have your code so I don't know your exact situation. But if your worried about being able to do multiple discounts, or, if you have multiple variables that create a discount, know that you don't need to keep the lineitem price at default, as the default price is always in the database for reference. Discounting is a bit tricky when it comes to protecting against cracking. I think it was John P. (and probably others) who described to me a few years ago that discounts work best when they are always created on the fly from the base price in the .db and the given variables. They need to be recalculated upon any editing of the cart and need to be invonurable to back stepping or refreshing. This may be difficult to understand at first as it was for me. I think you are familiar with the modular coding philosophy. I like to put most all of my discounting in a module (.inc file) to be referenced when needed. For instance, For one site I worked on, I incorporated all these types of discounts. 1. Tabled discount - Each product has a table of prices based on quantity. Most every product that is added or changed goes through riggers of checking against this table (really doesn't slow anything down). 2. Date based discount for a certain category of product - Any of this particular category of product gets discounted when the date is between a certain range. 3. Category discount also based on quantity - If 6 or more of this category of product is added to the cart, there is a 15 percent discount to all the lineitems in the cart that are of that category. 4. Subtotal Discount - A 5 tiered discount based on subtotal. 5. Various promotional discounts - I use the method John described for this type of discount... ie. "grand opening discount" is what is seen as a line item in the cart. Basically, when the cart is edited, this module is triggered (other than the subtotal discount) and the orderfile prices are re-caculated based on category, date, contents of cart and base price of product. Having said all that, you may very well be O.K. with the direction you are going as you may not need a picture perfect orderfile that is saved. If you think that you may want access to the orderfile in the future for "Order history" or future payment through a gateway, its best to proceed with the philosophy of keeping the orderfile in tact. I guess I felt the need to speak that warning because I have had to charge a significant amount to some of my customers to correct the code used for the orderfile to impliment new features. Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <- Graphic Design, Custom Tags and Labels -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Donovan Brooke

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:

Max Record length (1997) [WebDNA] Cicada - WebDNA_CICADA_6.1.b02 - gratz and request...! (2009) [REPLACE] inside [FOUNDITEMS] (1998) Passing info in [Addlineitem] (1997) Email Newsletters (2003) PSC recommends what date format yr 2000??? (1997) Document Contains No Data! (1997) URGENT: Can't email orders - HELP #2 (1998) RE: ANother SHOWIF problem (1997) [WebDNA] users.db (2009) [WebDNA] Search using CL (2017) Listserver problem (1997) [OT] Death Clock (2003) suffix mapping, use of cache, etc. (1997) Who's going to MacWorld? (1999) OT (maybe) Setting up local (non internet) test computers (2000) Frames and WebCat (1997) How far do [showif]s go? (1997) The beginning (1997) Setting up shop (1997)