1.3.8a, EP 1.2.5.4
Hi Guys,
Stumbled across a somewhat odd bug. Have added a v_product_length, v_product_width, v_product_height column to my EP csv file as per lankees tutorial. (OzPost module installed).
Everything installed and works fine, no errors. Three new columns populate fine in the database.
HOWEVER, when I click "Download Complete tab-delimited .txt file to edit (Attributes Not Included)" the three new fields are over overwritten by the data in the v_product_weight field.
Example:
Product weight 1.5kg, H = 20cm, W = 18cm, L = 40cm (uploads fine, correct in database)
Run download, fields are overwritten to weight = 1.5kg, H = 1.5, W = 1.5, L = 1.5 in the csv file (but NOT the database)
This creates an issue when I go to load the csv back up to the database as I either need to manually change the H,W,L fields or its overwritten to the weight value when uploaded. Fun.
I did notice this bit of code from the original EP mod. Don't know if this legacy code may be causing an issue?
Line 1272 (or thereabouts):
// PROCESS UPLOAD FILE
//*******************************
//*******************************
// langer - input: $readed
// 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_products_height'
);
Note length, width, height at the end - I didn't copy these in - langer was already playing with them in the original EP mod.
Thoughts anyone?