Jump to content

Fixed Price Coupons


bsmither

Recommended Posts

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.

 

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...