Example #1
0
 /**
  * Return the product tax rate using the tax rules system
  *
  * @param integer $product_id
  * @param integer $country_id
  * @param $state_id
  * @param $zipcode
  * @return Tax
  * @deprecated since 1.5
  */
 public static function getProductTaxRateViaRules($product_id, $country_id, $state_id, $zipcode)
 {
     Tools::displayAsDeprecated();
     if (!isset(self::$_product_tax_via_rules[$product_id . '-' . $country_id . '_' . $state_id . '_' . $zipcode])) {
         $tax_rate = JeproshopTaxRulesGroupModelTaxRulesGroup::getTaxesRate((int) JeproshopProductModelProduct::getTaxRulesGroupIdByProductId((int) $product_id), (int) $country_id, (int) $state_id, $zipcode);
         self::$_product_tax_via_rules[$product_id . '_' . $country_id . '_' . $zipcode] = $tax_rate;
     }
     return self::$_product_tax_via_rules[$product_id . '_' . $country_id . '_' . $zipcode];
 }