Adding tax to shipping:
Change this section:
/* Calculate Tax */
$tallyTaxAmt = 0;
$tallyTaxAmt = $tallyTaxAmt + ($_SESSION["cartSubtotal"] * $row_rsCWGetBillTo["stprv_Tax"]);
$_SESSION["taxAmt"] = $tallyTaxAmt;
/* For Shipping, set ship to StProv Shipping extension */
$_SESSION["shipExtension"] = $row_rsCWGetShipTo["stprv_Ship_Ext"];
/* ============================================================= */
/* Calculate SHIPPING [ START ]================================ */
/* ============================================================= */
/* [ Call Shipping include file ] ..................................................
All shipping calculations are handled by the CWFunShipping.php include file */
$shipType = $_SESSION["shipCalcType"];
include("CWLibrary/CWFunShipping.php");
/* ============================================================= */
/* Calculate ORDER TOTAL [ START ]============================= */
/* ============================================================= */
$tallyOrder = 0;
$tallyOrder += ( $_SESSION["cartSubtotal"] + $_SESSION["taxAmt"] ) + $_SESSION["shipTotal"];
$_SESSION["orderTotal"] = $tallyOrder;
/* Calculate ORDER TOTAL [ END ]=============================== */
To this:
/* For Shipping, set ship to StProv Shipping extension */
$_SESSION["shipExtension"] = $row_rsCWGetShipTo["stprv_Ship_Ext"];
/* ============================================================= */
/* Calculate SHIPPING [ START ]================================ */
/* ============================================================= */
/* [ Call Shipping include file ] ..................................................
All shipping calculations are handled by the CWFunShipping.php include file */
$shipType = $_SESSION["shipCalcType"];
include("CWLibrary/CWFunShipping.php");
/* ============================================================= */
/* Calculate ORDER TOTAL [ START ]============================= */
/* ============================================================= */
$tallyOrder = 0;
/* Calculate Tax */
$tallyTaxAmt = 0;
$tallyTaxAmt = $tallyTaxAmt + (($_SESSION["cartSubtotal"] + $_SESSION["shipTotal"]) * $row_rsCWGetBillTo["stprv_Tax"]);
$_SESSION["taxAmt"] = $tallyTaxAmt;
$tallyOrder += ( $_SESSION["cartSubtotal"] + $_SESSION["taxAmt"] + $_SESSION["shipTotal"]);
$_SESSION["orderTotal"] = $tallyOrder;
/* Calculate ORDER TOTAL [ END ]=============================== */