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, knowthat you don't need to keep the lineitem price at default, as thedefault price is always in the database for reference.Discounting is a bit tricky when it comes to protecting againstcracking. I think it was John P. (and probably others) who describedto me a few years ago that discounts work best when they are alwayscreated on the fly from the base price in the .db and the givenvariables. They need to be recalculated upon any editing of the cartand 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 thanthe subtotal discount) and the orderfile prices are re-caculated basedon category, date, contents of cart and base price of product.Having said all that, you may very well be O.K. with the direction youare 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 futurefor "Order history" or future payment through a gateway, its best toproceed with the philosophy of keeping the orderfile in tact.I guess I felt the need to speak that warning because I have had tocharge a significant amount to some of my customers to correct the codeused 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:
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, knowthat you don't need to keep the lineitem price at default, as thedefault price is always in the database for reference.Discounting is a bit tricky when it comes to protecting againstcracking. I think it was John P. (and probably others) who describedto me a few years ago that discounts work best when they are alwayscreated on the fly from the base price in the .db and the givenvariables. They need to be recalculated upon any editing of the cartand 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 thanthe subtotal discount) and the orderfile prices are re-caculated basedon category, date, contents of cart and base price of product.Having said all that, you may very well be O.K. with the direction youare 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 futurefor "Order history" or future payment through a gateway, its best toproceed with the philosophy of keeping the orderfile in tact.I guess I felt the need to speak that warning because I have had tocharge a significant amount to some of my customers to correct the codeused 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)