bsmither Posted February 3, 2013 Share Posted February 3, 2013 Would someone who has mastered the creation of fixed-price coupons, and they seem to work for you, please participate in this experiment: * You should have a product that costs 50.00 * Create a 5.00 coupon with Allowed Uses of 2 * Assign this coupon to that product. As a customer, place 12 of these items in your cart and checkout. During checkout, enter this coupon's code. You should see a 10.00 discount having been applied. Please reply if you get something other than the 10.00 discount. Quote Link to comment Share on other sites More sharing options...
fairview Posted February 3, 2013 Share Posted February 3, 2013 I have a $8.33 total discount reflected on the checkout page. The unit price on the checkout page changed from $50.00 to $41.67 ($8.33 per item...) The total price changed to $500.00 (from $600.00). The subtotal ($500) plus shipping (flat at $7.95) creates a grand total of $507.95 (the original price less 8.33 discount on 12 items plus shipping...) I have upgraded to 5.2.1 oops.. this is a mess. I felt as if the coupons were working, when applied as a percentage or as a fixed price for all items. Obviously, this isn't working. Quote Link to comment Share on other sites More sharing options...
fairview Posted February 3, 2013 Share Posted February 3, 2013 when I unapplied to the individual product, the coupon worked as follows: 1 total discount reflected: $5.00, product price is still $50.00 2 total price is 600 (correct) plus shipping of 7.95 (correct) less 5 (discount) for a total of 602.95. so the coupon worked when not applied to a specific product. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 3, 2013 Author Share Posted February 3, 2013 Thank you for your research. Are you comfortable with making edits to the CubeCart files? Quote Link to comment Share on other sites More sharing options...
fairview Posted February 4, 2013 Share Posted February 4, 2013 sure - do you have a solution? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 4, 2013 Author Share Posted February 4, 2013 In the file /class/cart.class.php, near line 1152, find:private function _applyProductDiscount(&$price, $product_id, $quantity = 1) { In two places, about 20 and 30 lines down, find:$discount = (($price / $quantity) < $data['value']) ? ($price / $quantity) * $available : $data['value'] * $available; On a newline after each of those lines, add this:$discount = $discount / $quantity; Again, thank you for your willingness to experiment. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.