I have a promotion set up for buy X get Y where if an order total is greater than 300 they get Y for free (if it's added to the cart). This works just fine. However, I also have another auto discount for 20% off that I don't want to go towards that $300 total. For example, right now if someone adds $320 to their cart their cart total is $256 - but they are still able to to get the free product which I do NOT want to happen. Basically I need for the 20% discount to happen, THEN if the discounted total is over $300 they are eligible for the Buy X Get Y. Any idea what I am doing wrong?
Discount being applied after another discount?
- Hello,The fix requires updating a file on your web server. In the file:www/administrator/components/com_awocoupon/awocoupon/library/class-awocoupon-library-discount.php, around line 1111 is this:
<?php
if ( ! empty( $coupon_row->min_value_incurrency ) && round( $this->product_total, 4 ) < $coupon_row->min_value_incurrency ) {
?>Right before that, please add this:<?php
$this->product_total = 0;
foreach ( $this->cart->items_breakdown as $item ) {
$this->product_total += $item[ 'product_price' ];
}
?>That should fix it.