Zen Follower
- Join Date:
- Jan 2009
- Posts:
- 201
- Plugin Contributions:
- 2
proposed easy populate mods
I have been asking for help in making a mod to Easy Populate so
that I can include v_product_is_call to the product upload file.
Here are the mods to Admin/easypopulate.php that I think MIGHT
accomplish what I want to do. Could someone knowledgeable with
Easy Populate please review the proposed changes and tell me
whether the proposed changes are correct and sufficient to do
what I want. I really appreciate the support.
Here are the changes: Line numbers shown are the beginning of
section of code that is modified.
1276 // langer - input: $readed
// johnboycr - added v_product_is_call to the array
// these are the fields that will be defaulted to the current values in the database if they are not found in the incoming file
// langer - why not qry products table and use result array??
$default_these = array(
'v_products_image',
// redundant image mods removed
'v_categories_id',
'v_products_price',
'v_products_quantity',
'v_products_weight',
'v_date_added',
'v_date_avail',
'v_instock',
'v_tax_class_title',
'v_manufacturers_name',
'v_manufacturers_id',
'v_products_dim_type',
'v_products_length',
'v_products_width',
'v_product_is_call',
'v_products_height'
);
1430 $sql = "SELECT
p.products_id as v_products_id,
p.products_model as v_products_model,
p.products_image as v_products_image,
p.products_price as v_products_price,
p.products_weight as v_products_weight,
p.products_date_added as v_date_added,
p.products_date_available as v_date_avail,
p.products_tax_class_id as v_tax_class_id,
p.products_quantity as v_products_quantity,
p.product_is_call as v_product_is_call,
p.manufacturers_id as v_manufacturers_id,
subc.categories_id as v_categories_id
FROM
".TABLE_PRODUCTS." as p,
".TABLE_CATEGORIES." as subc,
".TABLE_PRODUCTS_TO_CATEGORIES." as ptoc
WHERE
p.products_id = ptoc.products_id AND
p.products_model = '" . zen_db_input($items[$filelayout['v_products_model']]) . "' AND
ptoc.categories_id = subc.categories_id
";
$result = ep_query($sql);
$row = mysql_fetch_array($result);
$product_is_new = true;
1727 // johnboycr - if null, make product_is_call = 0
if (trim($v_product_is_call) == '') {
$v_product_is_call = 0;
}