GX-Bug #56054 » DiscountFix.patch
src/includes/modules/order_total/ot_subtotal_no_tax.php (date 1523038536000) | ||
---|---|---|
39 | 39 |
global $order, $xtPrice; |
40 | 40 |
|
41 | 41 |
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { |
42 |
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) { |
|
43 |
// BOF GM_MOD: |
|
44 |
$sub_total_price = $order->info['subtotal'] + $order->info['deduction']; |
|
45 |
$sub_total_price = $sub_total_price - round($sub_total_price / 100 * $_SESSION['customers_status']['customers_status_ot_discount'], 2); |
|
46 |
$sub_total_price -= $order->info['deduction']; |
|
47 |
} else { |
|
48 |
$sub_total_price = $order->info['subtotal']; |
|
49 |
} |
|
42 |
|
|
50 | 43 |
$this->output[] = array('title' => $this->title . ':', |
51 |
'text' => '<b>' . $xtPrice->xtcFormat($sub_total_price+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), true).'</b>',
|
|
52 |
'value' => $xtPrice->xtcFormat($sub_total_price+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), false));
|
|
44 |
'text' => '<b>' . $xtPrice->xtcFormat($order->info['subtotal']+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), true).'</b>',
|
|
45 |
'value' => $xtPrice->xtcFormat($order->info['subtotal']+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), false));
|
|
53 | 46 |
} |
54 | 47 |
} |
55 | 48 |
|
src/includes/modules/order_total/ot_discount.php (date 1523038773000) | ||
---|---|---|
35 | 35 |
|
36 | 36 |
function process() { |
37 | 37 |
global $order, $xtPrice; |
38 |
// echo 'xx'; |
|
38 |
|
|
39 | 39 |
$this->title = $_SESSION['customers_status']['customers_status_ot_discount'] . ' % ' . SUB_TITLE_OT_DISCOUNT; |
40 | 40 |
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount']!='0.00') { |
41 | 41 |
// BOF GM_MOD: |
42 | 42 |
$discount_price = round($xtPrice->xtcFormat($order->info['subtotal'], false) / 100 * $_SESSION['customers_status']['customers_status_ot_discount']*-1, 2); |
43 |
$order->info['subtotal'] = $order->info['subtotal'] + $discount_price; |
|
43 | 44 |
$this->output[] = array('title' => $this->title . ':', |
44 | 45 |
'text' => $xtPrice->xtcFormat($discount_price,true), |
45 | 46 |
'value' => $discount_price); |