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:
if (DISPLAY_PRICE_WITH_TAX != 'true')
{
$orderTotal -= $order->info['tax'];
}
[B]// 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
[/B] return array('totalFull'=>[B]$orderTotalFull,[/B]'orderTotal'=>$orderTotal, 'orderTaxGroups'=>$orderTaxGroups, 'orderTax'=>$orderTotalTax, 'shipping'=>$order->info['shipping_cost'], 'shippingTax'=>$order->info['shipping_tax']);
[B]// eof: calculate Order Total less shipping and tax
[/B] }
Next, change the code by reversing the commented code in the function collect_post from:
// left for total order amount vs qualified order amount just switch the commented lines
[B]//[/B] if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
if (strval($order_total['orderTotal']) < $coupon_result->fields['coupon_minimum_order']) {
to be:
// left for total order amount vs qualified order amount just switch the commented lines
if ($order_total['totalFull'] < $coupon_result->fields['coupon_minimum_order']) {
[B]//[/B] 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 ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!