Example #1
0
 public static function initPricesComputation($id_customer = NULL)
 {
     global $cookie;
     if ($id_customer) {
         $customer = new Customer(intval($id_customer));
         if (!Validate::isLoadedObject($customer)) {
             die(Tools::displayError());
         }
         self::$_taxCalculationMethod = Group::getPriceDisplayMethod(intval($customer->id_default_group));
     } elseif ($cookie->id_customer) {
         $customer = new Customer(intval($cookie->id_customer));
         self::$_taxCalculationMethod = Group::getPriceDisplayMethod(intval($customer->id_default_group));
     } else {
         self::$_taxCalculationMethod = Group::getDefaultPriceDisplayMethod();
     }
 }
Example #2
0
 public static function initPricesComputation()
 {
     global $cookie;
     self::$_taxCalculationMethod = $cookie->id_customer ? Group::getPriceDisplayMethod(intval($cookie->id_customer)) : Group::getDefaultPriceDisplayMethod();
 }