<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<BR> > From: peter@pajamian.dhs.org<BR>> On 22/11/10 19:49, Rick Bragg wrote:<BR>> > On Wed, 2010-11-17 at 09:16 -0800, Marty Tennison wrote:<BR>> >> Starting a new thread for discount specs....<BR>> >><BR>> >> I just got done implementing this in our system so it's fresh in my mind. If <BR>> >> this is something anyone is interested in I'll be happy to elaborate and/or <BR>> >> collaborate on the spec and share my experiences. <BR>> >><BR>> >> ================================================================<BR>> >><BR>> >> Discounts have 3 major parts. <BR>> >> 1) Discounts<BR>> >> 2) Rules<BR>> >> 3) Actions<BR>> >><BR>> >><BR>> >> DISCOUNTS:<BR>> >> Discounts have one or more rules.<BR>> >> Discounts have one or more actions.<BR>> >> Discounts can be active or inactive<BR>> <BR>> Great idea<BR>> <BR>> >> DISCOUNT_ACTIONS:<BR>> >> Actions have a type, operator and value<BR>> >> Action types are actually modules (subs) that can be plugged in as new actions <BR>> >> are needed<BR>> >> Action types: (ideas)<BR>> >> 1) Percentage of subtotal<BR>> >> 2) Fixed amount<BR>> >> 3) Free Shipping<BR>> >> 4) Discount sku by fixed amount<BR>> >> 5) Discount sku by percentage<BR>> >> 6) Discount sku by (amt * qty)<BR>> >> 7) Display message<BR>> >> 8) Log something<BR>> >> 9) Deactivate discount (make discount a single use coupon)<BR>> >> Action Operator:<BR>> >> 1) (only used to enter SKU if needed for item 4,5,6 above)<BR>> >> Action Values:<BR>> >> <user defined input> ie: .65, 5 etc...<BR>> <BR>> percentage and fixed amounts can be combined into a single action. I<BR>> usually just use the % character at the end of the amount to<BR>> differentiate, and I do something like this to normalize it:<BR>> <BR>> if ($amount =~ s/%$//) {<BR>> $amount = $price * $amount / 100;<BR>> }<BR>> <BR>> Of course there are also ways to make this infinitely more complex, with<BR>> sales such as, "buy two t-shirts (could be any of 50 distinct t-shirt<BR>> skus) and get a free cap", or even, "get this perfume set for only $10<BR>> with your order of $100 or more" (what do you do if the perfume set is<BR>> not in the cart, do you add it automatically, prompt the customer, or<BR>> discard the discount?), etc.<BR><BR>
Automatically put something that is not free in their cart? ZOINKS! Naaaa, I know what you saying :-)<BR>
<BR>
Our system has these kind of deals, and invariably the best thing to do is keep the customer informed. Like I mentioned, we have this perpetual deal so the cart is always egging the customer to buy more... just a little bit more and you can get this too! or, now you qualify for...<BR>
<BR>
I've been meaning to reply to Marty's thread when I get more time. I should have time on Friday to add something meaningful to this.<BR>
<BR>
Paul<BR>
<BR>
<BR>
<BR>                                            </body>
</html>