Tom Muck

Flash Remoting | Community MX | CMXtraneous
Home page
All articles | DWTeam | Flash Remoting | Basic-Ultradev | Community MX
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Auto Sku

Auto Sku

Generate a sku automatically when adding a product

At or around line 122 of CWProductAction.php in the admin section change this:

header("Location: " . $cartweaver->thisLocation . "?product_ID=" . $row_rsCWGetNewProdId["product_ID"] . "&addsku=ADD#addsku");
exit();

to this:

/*************************************************************************
AUTO SKU CREATION:
**************************************************************************/
$_POST["SKU_MerchSKUID"] = $_POST["product_MerchantProductID"];
$_POST["product_ID"] = $row_rsCWGetNewProdId["product_ID"];
$_POST["SKU_Price"] = 0;
$_POST["SKU_Weight"] = 0;
$_POST["SKU_Stock"] = 0;
$_POST["SKU_ShowWeb"] = 0;
$_POST["SKU_Sort"] = 0;
$_POST["addsku"] = true;
$_GET["product_ID"] = $_POST["product_ID"];
/* END AUTO SKU */
//header("Location: " . $cartweaver->thisLocation . "?product_ID=" . $row_rsCWGetNewProdId["product_ID"] . "&addsku=ADD#addsku");
//exit();

Back to Cartweaver PHP FAQ, code changes, and samples

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2010 Tom Muck | Dreamweaver Extensions