Use this ZenCart Shopping Cart PHP/MySQL script to create an on-the-fly, tab-delimited plain text (.txt) file that our site can visit daily to automatically upload and update your items at Cheaper By The Day. All you need to do is copy this file into your ROOT cart directory, and make sure you have the correct path to your sites images ($imageURL). Once you have it up and running, Sign In at Cheaper By The Day, go to Edit Your Profile, and submit the link to your script.
$category_information = " SELECT categories.categories_id AS curCatID, categories.parent_id AS parentCatID, categories_description.categories_name AS catName FROM categories, categories_description WHERE categories.categories_id = categories_description.categories_id "; $catIndex = array(); $catTempDes = array(); $catTempPar = array(); $processCat = mysqli_query($GLOBALS["___mysqli_ston"], $category_information); while ($catRow = mysqli_fetch_object($processCat)) { $catKey = $catRow->curCatID; $catName = $catRow->catName; $catParID = $catRow->parentCatID; if($catName != "") { $catTempDes[$catKey]=$catName; $catTempPar[$catKey]=$catParID; } } foreach($catTempDes as $curID=>$des) { $catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex); }
$zenCart = " SELECT products.products_id AS product_ID, products_to_categories.categories_id AS category_ID, products.products_price AS price, products_description.products_description AS description, manufacturers.manufacturers_name AS manufacturer, concat( '" . $imageURL . "' ,products.products_image) AS image_URL, products_description.products_name AS title FROM products, products_description, products_to_categories left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id ) WHERE products.products_id=products_description.products_id AND products.products_id=products_to_categories.products_id AND products_status = '1' ORDER BY products.products_id ASC ";
product_id - A unique alphanumeric identifier for the item - your internal ID code. - e.g. 01flx
categories - The item's category and subcategory separated by a '|'. When possible, match these with the categories used at Cheaper By The Day (use form below). - e.g. computers | pda & handhelds
days - The number of days duration you would like the price to be reduced from your maximum price, to the minimum price. You can choose either a 3, 5, 7, or 10 day listing. - e.g. 5
max_price - The highest price you would like to sell your item for. Do not include the dollar sign. - e.g. 75.68
min_price - The lowest price you would like to sell your item for. - e.g. 54.35
shipping_us* - The amount you will charge for shipping within the Continental US - e.g. 5.99
alaska_hawaii* - The amount you will charge when shipping to Alaska and Hawaii - e.g. 0.00 (A value of 0.00 would indicate that you do not offer shipping to this location.)
canada* - The amount you will charge when shipping to Canada - e.g. 7.85
shipping_notes* - Additional shipping information that you would like to include. Maximum length of 80 characters.
description* - The description of the item.
brand* - The brand name, manufacturer, or publisher of the product. Maximum length of 30 characters. - e.g. Sony
condition* - The condition of the product. Acceptable values are new, used, and refurbished.
image_url* - The URL of an associated, full-sized image for the item. (Must include the http:// portion.) - e.g. http://www.yourwebsite.com/image1.jpg
title - The title of the item. Maximum length of 60 characters.
* Can be left blank, but the field must still exist.