Post by straightlight » Fri Dec 08, 2017 12:15 am

Followed are the list of files where the order totals detection needs to be adjusted:

Code: Select all

catalog/controller/extension/payment/amazon_login_pay.php
catalog/controller/api/cart.php
catalog/controller/checkout/cart.php
catalog/controller/common/cart.php
catalog/controller/checkout/confirm.php
catalog/model/extension/payment/divido.php
catalog/controller/extension/payment/g2apay.php
catalog/controller/extension/payment/klarna_account.php
catalog/controller/extension/payment/klarna_checkout.php
catalog/model/extension/payment/klarna_checkout.php
catalog/controller/extension/payment/klarna_invoice.php
catalog/controller/api/order.php
catalog/controller/api/payment.php
catalog/controller/checkout/payment_method.php
catalog/controller/extension/payment/pilibaba.php
catalog/controller/extension/payment/pp_braintree.php
catalog/controller/extension/payment/pp_express.php
catalog/model/extension/payment/pp_express.php
Find all instances of:

Code: Select all

foreach ($results as $result) {
				if ($this->config->get('total_' . $result['code'] . '_status')) {
					$this->load->model('extension/total/' . $result['code']);

					// We have to put the totals in an array so that they pass by reference.
					$this->{'model_extension_total_' . $result['code']}->getTotal($total_data);
				}
			}
replace with:

Code: Select all

foreach ($results as $result) {
				if (isset($result['code'])) {
					$code = $result['code'];
				} else {
					$code = $result['key'];
				}
				
				if ($this->config->get('total_' . $code . '_status')) {
					$this->load->model('extension/total/' . $code);

					// We have to put the totals in an array so that they pass by reference.
					$this->{'model_extension_total_' . $code}->getTotal($total_data);
				}
			}

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 9 guests