From 4b6642d76ce6add24ec6d77953c188bee7664cef Mon Sep 17 00:00:00 2001 From: Damien Metzger Date: Mon, 22 Jul 2013 14:09:07 +0200 Subject: [PATCH] // Small optimization --- classes/order/Order.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/order/Order.php b/classes/order/Order.php index 6d624e8cc..ab500d99e 100644 --- a/classes/order/Order.php +++ b/classes/order/Order.php @@ -254,10 +254,10 @@ class OrderCore extends ObjectModel public function __construct($id = null, $id_lang = null) { parent::__construct($id, $id_lang); - if ($this->id_customer) + if ($this->id_customer && Context::getContext()->controller->controller_type != 'admin') { $customer = new Customer((int)($this->id_customer)); - $this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)($customer->id_default_group)); + $this->_taxCalculationMethod = Group::getPriceDisplayMethod((int)$customer->id_default_group); } else $this->_taxCalculationMethod = Group::getDefaultPriceDisplayMethod();