Warning: The supplied file is for showing examples only, do not use it in your store since it will cause errors if you don't have all of the add-on mods installed that this file includes. Make the changes shown here in your copy of easypopulate.php!
This is how you do it for easy populate v1.2.5.4 or 1.2.5.5, it's similar for other versions but there might be more or fewer additions of fields as described below.
Find the name of the field that you would like to add if you don't already know it. To do this, go to phpMyAdmin, click on the zen_products table, on the Structure tab you will see all of the fields that easy populate is able to use. If you don't use phpMyAdmin you can query the structure of the products table.
Now that you know what field names you need, open your copy of admin/easypoplulate.php in a text editor and search for v_products_weight. It will appear 7 times throughout this file. It's part of an array of fields that will be used, you can see that all of the one starting with v_ are in the database table zen_products.
The order of the fields in that array correspond to where in the csv file the field will appear. So copy the entire line including v_products_weight and paste it where you want in the array. Make sure you copy everything, if you forget a comma you'll cause an error. Replace v_products_weight to v_yourfield (the field name using underscores instead of spaces), as well as p.products_weight to p.yourfield when it's in the line(3 of the 7 lines).
After your first 5 alterations (around line 388, 455, 598, 1286, and 1434) you will come to the lines around line 1925. They look different, but still just copy and paste like the other 5 lines.
On around line 1959 copy only this part of the line:
'", products_weight="'.zen_db_input($v_products_weight) .
and paste it where you want, changing products_weight and v_products_weight. That is your last alteration. Save the file and upload to the admin folder on your server.
Navigate to easy populate in the tools drop down in the admin panel. Download a complete tab-delimited file and open in your spreadsheet app to see the new fields that you added.
You'll notice that I have added map_enabled to the included file. In the product creation page in the admin this is a radio button, so you can check boxes and select radio buttons, 0 is off and 1 is on.
The mods that are used in the included file are msrp, map price, auction sites attributes (ASA), and dual pricing.
The version that the included admin/easypopulate file is from is 1.2.5.4


Reply With Quote

