Zen-Cart 1.3.8
quantity_discount version 1.8
It works fine but I get a strange display as you can see in the attachment.
Is there an error in the php?
PHP Code:
function process() {
global $db, $order, $currencies;
$od_amount = $this->calculate_deductions();
if ($od_amount['total'] > 0) {
reset($order->info['tax_groups']);
while (list($key, $value) = each($order->info['tax_groups'])) {
$tax_rate = zen_get_tax_rate_from_desc($key);
if ($od_amount[$key]) {
$order->info['tax_groups'][$key] -= $od_amount[$key];
$order->info['total'] -= $od_amount[$key];
}
}
$order->info['total'] = $order->info['total'] - $od_amount['total'];
$this->title = '<a href="javascript:alert(\'' . $this->explanation . '\');">' . $this->title . '</a>';
$this->output[] = array('title' => $this->title . ':',
'text' => '-' . $currencies->format($od_amount['total'], true, $order->info['currency'], $order->info['currency_value']),
'value' => $od_amount['total']);
}
}
Because the text that one can read:
<a href="javascript:alert( inside the box should not be there.
Hoeveelheidskorting:'> is under the box and only Hoeveelheidskorting: has has to displayed and in the box.
Furthermore and that is the big problem <a href="javascript:alert( triggers a Forbidden page on the server when I want change the status of the order. Removing the ( fixes it.
Also I have to type a - in front of the amount or it will add the discount in stead of deducting it.
So far I always fix it manually but if it would be automatic, it would be nicer.
Bookmarks