public static function getProductTax($productPrice = 0, $productId = 0) { global $tableprefix; $productTax = 0; $taxpercentage = 0; $taxSettings = clsTax::getTaxsettings(); $enable_tax = $taxSettings['enable_tax']; $taxpercentage = $taxSettings['defaulttax_rate']; $productTaxable = clsTax::chkTaxEnableProduct($productId); if ($productTaxable == 'Y') { if ($enable_tax == "2") { $productTax = $productPrice * ($taxpercentage / 100); } } return $productTax; }
} ?> </p> </td> <td valign="top" align="center"> <?php // get Shipping price of each product $shippingControl = clsGenerateShippingControl::getShippingControlProduct($product_id, $product_option_id, $userid, $destination_country, $destination_state, $destination_zip); if (count($shippingControl) > 0) { // render shipping price select control echo $shippingControl['selectControl']; $shippingtotal = $shippingtotal + $shippingControl['shipppingPrice']; } $productTax = clsTax::getProductTaxByState($price, $product_id, $shippingtotal, $destination_state, $destination_state, $destination_country, $destination_country); // $productTax = clsTax::getProductTax($price, $product_id); $taxamount = $taxamount + $productTax; //Set tax to Session $_SESSION["TAX_DETAILS"][$product_option_id] = $productTax; ?> </td> </tr> <?php $cartitems .= "," . $rw["cart_id"]; //if click continue shopping its redirect to corresponding category //store last added product category if (trim($redirect) == '') { $redirect = $rw["product_category"]; }