spannerman Posted November 27, 2006 Share Posted November 27, 2006 Hello Amanda and all others who use Easy Discount, I wonder if you could possibly help me with a few pointers as to where to start with the logic required to give the discount I need on my store. The case is this: Have installed Happy Hour Specials mod which allows an item to be discounted by setting a specials price on a timed schedule. I am going to load the HHS table with 313 items, each to be discounted for 24 hrs (48 in the case of a weekend). The site will then set the "Design of the Day" as a Special, automatically discounted by £2. All our products have a base price of £15, with ordinary osC modifiers for variations in price. What I also require is that if a customer buys the "Design of the Day" (valid only on that day of course) they get another £2 off 1 other item added to their cart. Reading through this thread I feel that the logic would be along the lines below but how to start writing the code for it? I apologise, but I'm not a programmer, I'm a script butcher! I can cut 'n paste with the best of them! Logic: 1) Check if there's anything in the cart. 2) See if what is in the cart is a "Special" - read from HHS Table and checked for date - set a variable saying "DOTD Purchased" = True 3) Check for other items in cart - "If $cart count > 1" 4) Apply £2 Discount via ED to subtotal. "If DOTD Purchased" = True then apply discount. I would also assume that I need the code for steps 1, 2 & 3 in application_top so it's always evaluated, since they can add the Special to the cart at any time during their visit, then the code for step 4 in Shopping_Cart.php to apply the discount. Am I on the right lines for this and where do I start?? We show all prices including Tax so Tax calculation not required. We offer free shipping within the UK, and fixed price shipping addition to ROTW so that is not an issue either. We also offer Volume discount and Customer Loyalty discount but since the discount I want to offer is a fixed £2 and not a percentage, that shouldn't be an issue either. Any help much appreciated. Simon Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.