You can try this ...
Update the code in:
/includes/modules/order_total/ot_coupon.php
And add the code in RED to the function get_order_total:
Code:
if (DISPLAY_PRICE_WITH_TAX != 'true')
{
$orderTotal -= $order->info['tax'];
}
// bof: calculate Order Total less shipping and tax
// change what total is used for Discount Coupon Minimum
$orderTotalFull = $order->info['total'];
//echo 'Current $orderTotalFull: ' . $orderTotalFull . ' shipping_cost: ' . $order->info['shipping_cost'] . '<br>';
$orderTotalFull -= $order->info['shipping_cost'];
//echo 'Current $orderTotalFull less shipping: ' . $orderTotalFull . '<br>';
$orderTotalFull -= $orderTotalTax;
//echo 'Current $orderTotalFull less taxes: ' . $orderTotalFull . '<br>';
// add $orderTotalFull to array
return array('totalFull'=>$orderTotalFull,'orderTotal'=>$orderTotal, 'orderTaxGroups'=>$orderTaxGroups, 'orderTax'=>$orderTotalTax, 'shipping'=>$order->info['shipping_cost'], 'shippingTax'=>$order->info['shipping_tax']);
// eof: calculate Order Total less shipping and tax
}
Next, change the code by reversing the commented code in the function collect_post from:
Code:
// left for total order amount vs qualified order amount just switch the commented lines
// if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
to be:
Code:
// left for total order amount vs qualified order amount just switch the commented lines
if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
// if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
and see if this now works for you based on the Total of the Order (less shipping and tax) vs the Total of the Products allowed ...
Bookmarks