Skip to content

Instantly share code, notes, and snippets.

@Arsey
Created February 17, 2014 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arsey/9050657 to your computer and use it in GitHub Desktop.
Save Arsey/9050657 to your computer and use it in GitHub Desktop.
<?php
while ($TRows = mysql_fetch_array($TSettings)) {
if ($TRows['field_name'] == 'Product Status') {
$SelSql .= ", CASE 1 WHEN products.products_status = 1 THEN 'Active' WHEN products.products_status = 0 THEN 'Inactive' ELSE 'Discontinued' END";
}
if ($TRows['field_name'] == 'Stock Quantity') {
$SelSql .= ", products.products_quantity";
}
if ($TRows['field_name'] == 'Manufacturer') {
$SelSql .= ", manufacturers.manufacturers_name";
}
if ($TRows['field_name'] == 'Product Name') {
$SelSql .= ", products_description.products_name";
}
if ($TRows['field_name'] == 'Product Subtitle') {
$SelSql .= ", products.products_subtitle";
}
if ($TRows['field_name'] == 'Product Condition') {
$SelSql .= ", products.products_condition";
}
if ($TRows['field_name'] == 'Product Model') {
$SelSql .= ", products.products_model";
}
if ($TRows['field_name'] == 'Product Description') {
$SelSql .= ", products_description.products_description";
}
if ($TRows['field_name'] == 'SKU') {
$SelSql .= ", CONCAT('DSD', products_sku.products_sku)";
}
if ($TRows['field_name'] == 'UPC') {
$SelSql .= ", products.upc";
}
if ($TRows['field_name'] == 'ISBN') {
$SelSql .= ", products.isbn";
}
if ($TRows['field_name'] == 'Wholesale Price') {
$SelSql .= ", products_groups.customers_group_price";
}
if ($TRows['field_name'] == 'MSRP') {
$SelSql .= ", products.products_price";
}
if ($TRows['field_name'] == 'MAP Price') {
$SelSql .= ", products.products_map_price";
}
if ($TRows['field_name'] == 'Product Weight') {
$SelSql .= ", products.products_weight";
}
if ($TRows['field_name'] == 'Dimensional Weight') {
$SelSql .= ", products.products_dimweight";
}
if ($TRows['field_name'] == 'Ship Method') {
$SelSql .= ", products.products_ship_method";
}
if ($TRows['field_name'] == 'Ship Price') {
$SelSql .= ", products.products_ship_price";
}
if ($TRows['field_name'] == 'Ship ETA') {
$SelSql .= ", products.products_date_available";
}
if ($TRows['field_name'] == 'Ship Exception') {
$SelSql .= ", products.sh_except";
}
if ($TRows['field_name'] == 'Category') {
$SelSql .= ", CONCAT('Cat---',categories_description.categories_id) ";
}
if ($TRows['field_name'] == 'Subcategory') {
$SelSql .= ", categories_description.categories_name";
}
if ($TRows['field_name'] == 'Product Specifications') {
$SelSql .= ", products_description.products_specs";
}
if ($TRows['field_name'] == 'Primary Image') {
$SelSql .= ", products.products_image";
}
if ($TRows['field_name'] == 'Image Name1') {
$SelSql .= ", products.products_image_xl_1";
}
if ($TRows['field_name'] == 'Image Name2') {
$SelSql .= ", products.products_image_xl_2";
}
if ($TRows['field_name'] == 'Image Name3') {
$SelSql .= ", products.products_image_xl_3";
}
if ($TRows['field_name'] == 'Image Name4') {
$SelSql .= ", products.products_image_xl_4";
}
if ($TRows['field_name'] == 'Date Added') {
$SelSql .= ", products.products_date_added";
}
if ($TRows['field_name'] == 'Special Notes') {
$SelSql .= ", products.imp_notes";
}
if ($TRows['field_name'] == 'Map Required') {
$SelSql .= ", products.products_map";
}
if ($TRows['field_name'] == 'Package Contents') {
$SelSql .= ", products.package_contents";
}
if ($TRows['field_name'] == 'Product Length') {
$SelSql .= ", products.products_length";
}
if ($TRows['field_name'] == 'Product Width') {
$SelSql .= ", products.products_width";
}
if ($TRows['field_name'] == 'Product Height') {
$SelSql .= ", products.products_height";
}
if ($TRows['field_name'] == 'Product Cost') {
$SelSql .= ", products.products_cost";
}
if ($TRows['field_name'] == 'Dropship fee') {
$SelSql .= ", products.dropship_fee";
}
if ($TRows['field_name'] == 'Product ID') {
$SelSql .= ", products.products_id";
}
if ($TRows['field_name'] == 'Product Vendor') {
$SelSql .= ", vendors.vendors_name";
}
if ($TRows['field_name'] == 'Supplier Model') {
$SelSql .= ", products.supplier_model";
}
if ($TRows['field_name'] == 'Product Actual Quantity') {
$SelSql .= ", products.products_actual_quantity";
}
if ($TRows['field_name'] == 'Zipcode') {
$SelSql .= ", products.prodzip";
}
if ($TRows['field_name'] == '3PL Fee') {
$SelSql .= ", products.products_3pl_fee";
}
if ($TRows['field_name'] == 'Fulfill Charge') {
$SelSql .= ", products.fulfill_charge";
}
if ($TRows['field_name'] == 'Flatship Fee') {
$SelSql .= ", products.flatship_fee";
}
if ($TRows['field_name'] == 'Product Warranty') {
$SelSql .= ", products.product_warranty";
}
if ($TRows['field_name'] == 'Ebay Cat ID') {
$SelSql .= ", categories.ebay_cat";
}
if ($TRows['field_name'] == 'ASIN') {
$SelSql .= ", products.asin";
}
if ($TRows['field_name'] == 'Bullet Point 1') {
$SelSql .= ", bulletdata.bulletline1";
}
if ($TRows['field_name'] == 'Bullet Point 2') {
$SelSql .= ", bulletdata.bulletline2";
}
if ($TRows['field_name'] == 'Bullet Point 3') {
$SelSql .= ", bulletdata.bulletline3";
}
if ($TRows['field_name'] == 'Bullet Point 4') {
$SelSql .= ", bulletdata.bulletline4";
}
if ($TRows['field_name'] == 'Bullet Point 5') {
$SelSql .= ", bulletdata.bulletline5";
}
if ($TRows['field_name'] == 'Color') {
$SelSql .= ", bulletdata.color";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment