Here it is...
<?php
// WA eCart AddToCart
if (isset($_POST["wholesaleCart_1_ATC"]) || isset($_POST["wholesaleCart_1_ATC_x"])) {
$ATC_itemID = $_POST["wholesaleCart_1_ID_Add"];
$ATC_AddIfIn = 4;
$ATC_RedirectAfter = "checkout/cart.php";
$ATC_RedirectIfIn = "";
$ATC_itemName = "".((isset($_POST["prodname"]))?$_POST["prodname"]:"") ."";// column binding
$ATC_itemDescription = "Test Description";// column binding
$ATC_itemThumbnail = "".((isset($_POST["thumbnailimg"]))?$_POST["thumbnailimg"]:"") ."";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["wholesaleCart_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".((isset($_POST["grandTotal"]))?$_POST["grandTotal"]:"") ."");// column binding
$ATC_itemS = floatval("".((isset($_POST["qty_item_Small"]))?$_POST["qty_item_Small"]:"") ."");// column binding
$ATC_itemM = floatval("".((isset($_POST["qty_item_Medium"]))?$_POST["qty_item_Medium"]:"") ."");// column binding
$ATC_itemL = floatval("".((isset($_POST["qty_item_Large"]))?$_POST["qty_item_Large"]:"") ."");// column binding
$ATC_itemXL = floatval("".((isset($_POST["qty_item_XLarge"]))?$_POST["qty_item_XLarge"]:"") ."");// column binding
$ATC_itemXXL = floatval("".((isset($_POST["qty_item_XXLarge"]))?$_POST["qty_item_XXLarge"]:"") ."");// column binding
$ATC_itemXXXL = floatval("".((isset($_POST["qty_item_XXXLarge"]))?$_POST["qty_item_XXXLarge"]:"") ."");// column binding
$ATC_itemSinglePrice = floatval("".((isset($_POST["single_price"]))?$_POST["single_price"]:"") ."");// column binding
$ATC_itemOS = floatval("".((isset($_POST["qty_item_N/A"]))?$_POST["qty_item_N/A"]:"") ."");// column binding
$ATC_itemSM = floatval("".((isset($_POST["qty_item_S/M"]))?$_POST["qty_item_S/M"]:"") ."");// column binding
$ATC_itemML = floatval("".((isset($_POST["qty_item_M/L"]))?$_POST["qty_item_M/L"]:"") ."");// column binding
$ATC_itemp24 = floatval("".((isset($_POST["qty_item_24"]))?$_POST["qty_item_24"]:"") ."");// column binding
$ATC_itemp26 = floatval("".((isset($_POST["qty_item_26"]))?$_POST["qty_item_26"]:"") ."");// column binding
$ATC_itemp28 = floatval("".((isset($_POST["qty_item_28"]))?$_POST["qty_item_28"]:"") ."");// column binding
$ATC_itemp30 = floatval("".((isset($_POST["qty_item_30"]))?$_POST["qty_item_30"]:"") ."");// column binding
$ATC_itemp32 = floatval("".((isset($_POST["qty_item_32"]))?$_POST["qty_item_32"]:"") ."");// column binding
$ATC_itemstyleNo = "".((isset($_POST["skuno"]))?$_POST["skuno"]:"") ."";// column binding
$ATC_itemcolors = "".((isset($_POST["color"]))?$_POST["color"]:"") ."";// column binding
$ATC_itemXL2 = floatval("".((isset($_POST["qty_item_XL"]))?$_POST["qty_item_XL"]:"") ."");// column binding
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$wholesaleCart->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemS, $ATC_itemM, $ATC_itemL, $ATC_itemXL, $ATC_itemXXL, $ATC_itemXXXL, $ATC_itemSinglePrice, $ATC_itemOS, $ATC_itemSM, $ATC_itemML, $ATC_itemp24, $ATC_itemp26, $ATC_itemp28, $ATC_itemp30, $ATC_itemp32, $ATC_itemstyleNo, $ATC_itemcolors, $ATC_itemXL2);
if ($ATC_RedirectAfter != "" && $wholesaleCart->redirStr == "") {
$wholesaleCart->redirStr = $ATC_RedirectAfter;
}
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}
}
}
?>