This should work for you ...
Edit the file:
/includes/modules/order_total/ot_coupon.php
and add the code in RED:
Code:
if (strval($orderTotalDetails['orderTotal']) >= $coupon->fields['coupon_minimum_order'])
{
if ($coupon->fields['coupon_type'] == 'F' || $coupon->fields['coupon_type'] == 'O') {
global $cart;
$products = $_SESSION['cart']->get_products();
$coupon_product_count = 0;
for ($i=0; $i<sizeof($products); $i++) {
if (is_product_valid($products[$i]['id'], $coupon->fields['coupon_id'])) {
$coupon_product_count += $_SESSION['cart']->get_quantity($products[$i]['id']);
}
}
//$messageStack->add_session('checkout_payment', 'Coupon cont: ' . $coupon_product_count, 'caution');
}
switch($coupon->fields['coupon_type'])
Then edit the line:
Code:
case 'F':
$od_amount['total'] = zen_round($coupon->fields['coupon_amount'] * ($orderTotalDetails['orderTotal']>0) * $coupon_product_count, $currencyDecimalPlaces);
$od_amount['type'] = $coupon->fields['coupon_type']; // amount off 'F' or amount off and free shipping 'O'
$ratio = $od_amount['total']/$orderTotalDetails['orderTotal'];
break;
Bookmarks