public function getAllProductsTax($productTypeId, $pref_id = 0, $country_id = 0) { // 税合計 $total = 0; $max = $this->getMax($productTypeId); for ($i = 0; $i <= $max; $i++) { $price = $this->cartSession[$productTypeId][$i]['price']; $quantity = $this->cartSession[$productTypeId][$i]['quantity']; $tax = SC_Helper_TaxRule_Ex::sfTax($price, $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], $this->cartSession[$productTypeId][$i]['productsClass']['product_class_id'], $pref_id, $country_id); $total += $tax * $quantity; } return $total; }
/** * 設定情報に基づいて税金付与した金額を返す * * @param int $price 計算対象の金額 * @param int $product_id 商品ID * @param int $product_class_id 商品規格ID * @param int $pref_id 都道府県ID * @param int $country_id 国ID * @return double 税金付与した金額 */ public static function sfCalcIncTax($price, $product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) { return $price + SC_Helper_TaxRule_Ex::sfTax($price, $product_id, $product_class_id, $pref_id, $country_id); }