Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Avoid notice on checkout confirmation
Browse files Browse the repository at this point in the history
Ensures that the shipping tax group exists before adding to it.
This avoids a notice that otherwise appears on the checkout
confirmation page.
  • Loading branch information
ecartz committed Feb 20, 2021
1 parent 101e58a commit 8513a95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/modules/order_total/ot_shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function process() {
$shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

$order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
if (!isset($order->info['tax_groups']["$shipping_tax_description"])) {
Guarantor::guarantee_subarray($order->info, 'tax_groups')["$shipping_tax_description"] = 0;
}
$order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
$order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

Expand Down

0 comments on commit 8513a95

Please sign in to comment.