Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Darkwander
I will have to look at the dates again when I have some open time. In the interim, you can turn of the "was added to our catalog" ...
Re: EasyPopulate 4.0 Support Thread
Thanks for the contribution.
I just wanted to see if I could get more of your input on the .htaccess. I saw your script on page 14 and used it, but I was still unsuccessful in downloading the file. I was able to create and delete but not download.
Thanks,
TOG
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
TheOnyxGuy
Thanks for the contribution.
I just wanted to see if I could get more of your input on the .htaccess. I saw your script on page 14 and used it, but I was still unsuccessful in downloading the file. I was able to create and delete but not download.
Thanks,
TOG
You may have to right-click the download link and select "save target/save link as" depending on your browser and operating system.
I believe that .htaccess file was for when you put your temp inside your admin directory for added security.
-chadd
Re: EasyPopulate 4.0 Support Thread
Yep, my temp I placed in the admin, and permissions are set 755, and I placed the .htaccess (just like on pg14 nothing added or rmvd) in the temp folder. I just tried to do the right click like you mentioned and it saved the error page, that I would've got had I just clicked on it, as a .csv. So when I open it up in LibreOffice I get html source of the page. Upload, create, and delete work but not the download.
Is it safe enough to leave it out of the admin folder?
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
TheOnyxGuy
Yep, my temp I placed in the admin, and permissions are set 755, and I placed the .htaccess (just like on pg14 nothing added or rmvd) in the temp folder. I just tried to do the right click like you mentioned and it saved the error page, that I would've got had I just clicked on it, as a .csv. So when I open it up in LibreOffice I get html source of the page. Upload, create, and delete work but not the download.
Is it safe enough to leave it out of the admin folder?
You should also check your configure.php files. Depending on your installation, I've seen errors that needed to be corrected. Namely, extra '\\' in the url's
correct:
http:\\www.yourstore.com\youradmin\easyphpopulate_4.php
incorrect:
http:\\http://www.yourstore.com\\youradmin\...populate_4.php
If you have that extra double-whack, you will need to edit your configure.php files and correct them.
Alternatively, your .htaccess file is not being read. Don't know how to advise you on correcting it if this is the case, sorry.
-chadd
Re: EasyPopulate 4.0 Support Thread
Ok thanks, appreciate you're input. I will look into the config's and if I resolve it I'll let you know.
Thanks,
TOG
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chadderuski
I will have to look at the dates again when I have some open time. In the interim, you can turn of the "was added to our catalog" ...
Okay dokie, i might have a look at the coding too, see if i can see anything that is causing the problem, however be warned my coding skills are pretty basic... :)
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
igi2011
OK here's how I did it - my example shows the field I wanted to add (products_family), obviously yours will be different :)
There are three files to edit:
YOUR-ADMIN-FOLDER/includes/functions/extra_functions/easypopulate_4_functions.php
YOUR-ADMIN-FOLDER/easypopulate_4.php
and YOUR-ADMIN-FOLDER/easypopulate_4_import.php
You're using the existing 'upc' field each time to create a new product field.
Firstly open YOUR-ADMIN-FOLDER/includes/functions/extra_functions/easypopulate_4_functions.php. Search for
if ($ep_supported_mods['upc'] == true) { // UPC Mod
$filelayout[] = 'v_products_upc';
}
Now make a copy of this code directly underneath and change this to
if ($ep_supported_mods['family'] == true) { // Products Family Mod
$filelayout[] = 'v_products_family';
}
so you now have
if ($ep_supported_mods['upc'] == true) { // UPC Mod
$filelayout[] = 'v_products_upc';
}
if ($ep_supported_mods['family'] == true) { // Products Family Mod
$filelayout[] = 'v_products_family';
}
Now find the following a few lines further down:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$filelayout_sql .= 'p.products_upc as v_products_upc,';
}
Copy this chunk of code and change as before, so you now have:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$filelayout_sql .= 'p.products_upc as v_products_upc,';
}
if ($ep_supported_mods['family'] == true) { // Products Family mod
$filelayout_sql .= 'p.products_family as v_products_family,';
}
Now open YOUR-ADMIN-FOLDER/easypopulate_4.php and search for 'upc' again - around line 90
$ep_supported_mods['upc'] = ep_4_check_table_column(TABLE_PRODUCTS,'products_upc'); // upc = UPC Code, added by Chadd
Make a copy so you now have
$ep_supported_mods['upc'] = ep_4_check_table_column(TABLE_PRODUCTS,'products_upc'); // upc = UPC Code, added by Chadd
$ep_supported_mods['family'] = ep_4_check_table_column(TABLE_PRODUCTS,'products_family'); // Products Family
Finally open YOUR-ADMIN-FOLDER/easypopulate_4_import.php and search for 'upc' again, there are four edits to make here, here's what mine looks like with the 'family' fields added (the line numbers may be slightly out)
Line 26:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod - chadd
$default_these[] = 'v_products_upc';
}
if ($ep_supported_mods['family'] == true) { // UPC Code mod - chadd
$default_these[] = 'v_products_family';
}
Line 150:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod- chadd
$sql .= 'p.products_upc as v_products_upc,';
}
if ($ep_supported_mods['family'] == true) { // products_family
$sql .= 'p.products_family as v_products_family,';
}
Line 594:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$query .= "products_upc = '".addslashes($v_products_upc)."',";
}
if ($ep_supported_mods['family'] == true) { // products_family
$query .= "products_family = '".addslashes($v_products_family)."',";
}
Line 660:
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$query .= "products_upc = '".addslashes($v_products_upc)."',";
}
if ($ep_supported_mods['family'] == true) { // family
$query .= "products_family = '".addslashes($v_products_family)."',";
}
Hope this helps - this should work for the fields in the products table, but it might need a bit of tweaking for the field you have in the description table (not sure myself as I haven't tried it)
THANKS chadd for this GREAT contribution!
Today I hv installed the latest version chaddro-EasyPopulate-4.0-f4314dc for my ZC1.50, and it works fine for my basic use.
However, there is another reason for me to arrived here, as I just installed the 'related product', and I really need EP4 for a quick update of the new product field (products_family).
As posted by igi2011, thanks for code, it works for at least the Export side. When I tried to Upload the CSV with changes on the products_family, it is Not updated. I wonder where is the mistake..
I've double confirmed the mod on the 3 suggested file.. Any idea, pls?
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
songseng
THANKS chadd for this GREAT contribution!
Today I hv installed the latest version chaddro-EasyPopulate-4.0-f4314dc for my ZC1.50, and it works fine for my basic use.
However, there is another reason for me to arrived here, as I just installed the 'related product', and I really need EP4 for a quick update of the new product field (products_family).
As posted by igi2011, thanks for code, it works for at least the Export side. When I tried to Upload the CSV with changes on the products_family, it is Not updated. I wonder where is the mistake..
I've double confirmed the mod on the 3 suggested file.. Any idea, pls?
Songseng,
You no longer have to make edits to the code if you want to add a custom field to your products table. The latest version of EP4 on github adds a new configuration variable for "User Defined Products Fields" ... just list your "products_family" here, and then add the column "v_products_family" to your spreadsheet.
When you return to the EP4 page, you will see an entry for your User Defined Fields and "True" if detected or "False" if not...
Hope this helps!
-chadd
ps: your EP4 version should be 4.0.22 (or later) for this feature
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chadderuski
Songseng,
You no longer have to make edits to the code if you want to add a custom field to your products table. The latest version of EP4 on github adds a new configuration variable for "User Defined Products Fields" ... just list your "products_family" here, and then add the column "v_products_family" to your spreadsheet.
When you return to the EP4 page, you will see an entry for your User Defined Fields and "True" if detected or "False" if not...
Hope this helps!
-chadd
ps: your EP4 version should be 4.0.22 (or later) for this feature
Yes it's EP4 4.0.22 Beta.
Feel great with the "User Defined Products Fields", thats make job more easy and quick.
So I restored the 3 original files. Fill in "User Defined Products Fields" with 'products_family'. I was able to Export the v_products_family data without adding the column "v_products_family" manually to the spreadsheet. Meaning after the Export, I could see "v_products_family" in my CSV straight away.
BUT:
-I wasn't able to see User Defined Fields set to "True" if detected or "False" if not. I'm looking into Configuration > Easy Populate 4 > User Defined Products Fields. It's still showing the 'products_family' as I filled in before.
-After the Upload, the product family field is still Not updated.
I tried manually adding the "v_products_family" to the CSV and upload again, but it's still the same.
Chadd, correct me if I don't follow your steps, appreciate your hints again :blush: