Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?=

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55436
interpreted = N
texte = Clint Davis wrote: > I have a client that wants to implement a discount code that would allow > customers to purchase one book and receive the next for 99¢. This is only > good on ONE book - if you buy 4 books, you pay full price for 3 of them and > 99¢ for the fourth. I figure I can work something out, but it seems like it > might take a lot of if/then statements for some error-checking. > > Has anyone written something like this? Yes. Its not that scary really but will take a good amount of code. you can use the formulas.db or a setlineitem. Customer gives code on checkout or whatever, do a lookup to a "purchased" database (or the orders db)for the value of the header (will have to be recorded). if the value is a correct value (lookup to a database for best security), write the code to a header. Then, to discount properly, loop through lineitems. If more than one book exists, discount one of them. The later part of the logic needs to be a complete system on the "invoice page" (or a page after all cart editing has been done) so that if the user refreshes or backs up and goes there again, the system will reassess the correct discount. P.S., I'm now accepting work if anyone has too much on their plate. I have a couple bigger quotes out there so I can't guarantee long term assistance as of right now but I probably have a couple weeks. Thanks, Donovan > > To complicate matters further, the offer can only be used once per customer. > I figure I'll set a cookie for that, but it's not fool-proof. This has to be > done because all customers will be using the same discount code. IMHO, I would stay away from the "fool-proof" if you don't want your customers to keep getting the discount. ;-) -- =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, and Pre-Press Consultation -> 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: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  2. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  3. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  4. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  5. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
  6. Re: Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Donovan Brooke 2004)
  7. Discounts: Buy One, Get One =?ISO-8859-1?Q?99=A2?= ( Clint Davis 2004)
Clint Davis wrote: > I have a client that wants to implement a discount code that would allow > customers to purchase one book and receive the next for 99¢. This is only > good on ONE book - if you buy 4 books, you pay full price for 3 of them and > 99¢ for the fourth. I figure I can work something out, but it seems like it > might take a lot of if/then statements for some error-checking. > > Has anyone written something like this? Yes. Its not that scary really but will take a good amount of code. you can use the formulas.db or a setlineitem. Customer gives code on checkout or whatever, do a lookup to a "purchased" database (or the orders db)for the value of the header (will have to be recorded). if the value is a correct value (lookup to a database for best security), write the code to a header. Then, to discount properly, loop through lineitems. If more than one book exists, discount one of them. The later part of the logic needs to be a complete system on the "invoice page" (or a page after all cart editing has been done) so that if the user refreshes or backs up and goes there again, the system will reassess the correct discount. P.S., I'm now accepting work if anyone has too much on their plate. I have a couple bigger quotes out there so I can't guarantee long term assistance as of right now but I probably have a couple weeks. Thanks, Donovan > > To complicate matters further, the offer can only be used once per customer. > I figure I'll set a cookie for that, but it's not fool-proof. This has to be > done because all customers will be using the same discount code. IMHO, I would stay away from the "fool-proof" if you don't want your customers to keep getting the discount. ;-) -- =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, and Pre-Press Consultation -> 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:

[time] math Q (2003) Searching multiple fields (1997) Help! WebCat2 bug (1997) EmailCompleted Clean Up (2001) WebCat2 Append problem (B14Macacgi) (1997) Updating fields from different platforms (1998) Comments in db? (1997) Some ThankYou page problems (1997) OT - Need A Good Address Parser (2000) [ShowNext] feature in 2.0 (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) return missing item (was:WebCat Sales) (1997) Tab Charactor (1997) [offtopic]P1: How to make webcatalog more stable. - LONG (1999) apostrophe in search item (1997) A zip code search (1998) So many lookers, hey smith micro (2003) WebCat2final1 crashes (1997) RE: [WebDNA] directory protection questions (2008) webcat- multiple selection in input field (1997)