What I'd like to try is to change the code so that when the coupon is for a dollar amount AND there is more than one product, the coupon will ignore the group discount. Can anyone help?
I'm assuming it would be in this function?
Code:
/**
* Method used to produce final figures for deductions. This information is used to produce the output<br>
* shown on the checkout pages
*
*/
function process() {
global $order, $currencies;
$order_total = $this->get_order_total();
$od_amount = $this->calculate_deductions($order_total['total']);
$this->deduction = $od_amount['total'];
if ($od_amount['total'] > 0) {
reset($order->info['tax_groups']);
$tax = 0;
while (list($key, $value) = each($order->info['tax_groups'])) {
if ($od_amount['tax_groups'][$key]) {
$order->info['tax_groups'][$key] -= $od_amount['tax_groups'][$key];
$tax += $od_amount['tax_groups'][$key];
}
}
if ($od_amount['type'] == 'S') $order->info['shipping_cost'] = 0;
$order->info['total'] = $order->info['total'] - $od_amount['total'];
if (DISPLAY_PRICE_WITH_TAX != 'true') {
$order->info['total'] -= $tax;
}
$order->info['tax'] = $order->info['tax'] - $tax;
// if ($this->calculate_tax == "Standard") $order->info['total'] -= $tax;
if ($order->info['total'] < 0) $order->info['total'] = 0;
$this->output[] = array('title' => $this->title . ': ' . $this->coupon_code . ' :',
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total']);
}
}
/**
Bookmarks