Hi Kevin!
Currently there is no way to EDIT your option values/names. You would need to do this via the admin. If you change the names and import then you'll end up with both sets of values.
-chadd
Printable View
Did you create a new product type? There is an entry for v_products_type, but music products are type = 2 (if memory serves). You can set the product type with the current version of EP4.
If you are talking about adding NEW tables, then there would be custom coding for EP to use these. Perhaps I don't fully understand what you are doing ....
-chadd
Yeah, sorry, i added a NEW product type, with extra tables (SIMILAR to music's record companies and genres, but with DVD Studios and dvd genres). which EP files would i have to mess with?
It should be very doable if you have a good grasp of PHP.
You will work mostly with admin/includes/functions/extra_functions/easypopulate_4_functions.php
If you look at that closely, it is here that you define your file formats and queries.
Then you'd have to edit both the easypopulate_4_import.php and easypopulate_4_export.php files. If your tables
are very similar to the music tables, you should be able to follow the code.
Hope that helps.
-chadd
awesome! thanks a lot, i'll check it out. though i'll probably be posting again if i end up ripping my hair out...
So, so far i have made it so that dvd type shows up in the configure options, and the proper fields export on to the spreadsheet. the ONLY thing i can't quite get to work is the import. I don't know how much you feel like combing through code, but this is what i have modified: (from record_companies and music_genre)
Code:// HERE ==========================>
// BEGIN: studios
if (isset($filelayout['v_studios_name']) ) {
if ( isset($v_studios_name) && ($v_studios_name != '') && (mb_strlen($v_studios_name) <= $studio_name_max_len) ) {
$sql = "SELECT studios_id AS studiosID FROM ".TABLE_STUDIOS." WHERE studios_name = '".addslashes(ep_4_curly_quotes($v_studios_name))."' LIMIT 1";
$result = ep_4_query($sql);
if ( $row = mysql_fetch_array($result) ) {
$v_studios_id = $row['studiosID']; // this id goes into the product_dvd_extra table
$sql = "UPDATE ".TABLE_STUDIOS." SET
studios_image = '".addslashes($v_studios_image)."',
last_modified = CURRENT_TIMESTAMP
WHERE studios_id = '".$v_studios_id."'";
$result = ep_4_query($sql);
foreach ($langcode as $lang) {
$l_id = $lang['id'];
$sql = "UPDATE ".TABLE_STUDIOS_INFO." SET
studios_url = '".addslashes($items[$filelayout['v_studios_url_'.$lid]])."'
WHERE studios_id = '".$v_studios_id."' AND languages_id = '".$lid."'";
$result = ep_4_query($sql);
}
} else { // It is set to autoincrement, do not need to fetch max id
$sql = "INSERT INTO ".TABLE_STUDIOS." (studios_name, studios_image, date_added, last_modified)
VALUES ('".addslashes(ep_4_curly_quotes($v_studios_name))."', '".addslashes($v_studios_image)."', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)";
$result = ep_4_query($sql);
$v_studios_id = mysql_insert_id(); // id is auto_increment, so can use this function
foreach ($langcode as $lang) {
$l_id = $lang['id'];
$sql = "INSERT INTO ".TABLE_STUDIOS_INFO." (studios_id, languages_id, studios_url)
VALUES ('".addslashes($v_studios_id)."',".(int)$l_id.",'".addslashes($items[$filelayout['v_studios_url_'.$lid]])."')"; // seems we are skipping manufacturers url
$result = ep_4_query($sql);
}
}
} else { // $v_studios_name == '' or name length violation
if (mb_strlen($v_studios_name) > $studio_name_max_len) {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_STUDIOS_NAME_LONG, $v_studios_name, $studio_name_max_len);
$ep_error_count++;
continue;
}
$v_studios_id = 0; // studios_id = '0' for no assigned artists
}
}
// END: studios
// HERE ==========================>
// BEGIN: dvd_genre
if (isset($filelayout['v_dvd_genre_name']) ) {
if ( isset($v_dvd_genre_name) && ($v_dvd_genre_name != '') && (mb_strlen($v_dvd_genre_name) <= $dvd_genre_name_max_len) ) {
$sql = "SELECT dvd_genre_id AS dvd_genreID FROM ".TABLE_DVD_GENRE." WHERE dvd_genre_name = '".addslashes($v_dvd_genre_name)."' LIMIT 1";
$result = ep_4_query($sql);
if ( $row = mysql_fetch_array($result) ) {
$v_dvd_genre_id = $row['dvd_genreID']; // this id goes into the product_dvd_extra table
} else { // It is set to autoincrement, do not need to fetch max id
$sql = "INSERT INTO ".TABLE_DVD_GENRE." (dvd_genre_name, date_added, last_modified)
VALUES ('".addslashes($v_dvd_genre_name)."', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)";
$result = ep_4_query($sql);
$v_dvd_genre_id = mysql_insert_id(); // id is auto_increment
}
} else { // $v_dvd_genre_name == '' or name length violation
if (mb_strlen($v_dvd_genre_name) > $dvd_genre_name_max_len) {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_DVD_GENRE_NAME_LONG, $v_dvd_genre_name, $dvd_genre_name_max_len);
$ep_error_count++;
continue;
}
$v_dvd_genre_id = 0; // chadd - zencart uses genre_id = '0' for no assigned artists
}
}
// END: dvd_genre
// insert new, or update existing, product
if ($v_products_model != "") { // products_model exists!
// First we check to see if this is a product in the current db.
$result = ep_4_query("SELECT products_id FROM ".TABLE_PRODUCTS." WHERE (products_model = '".addslashes($v_products_model)."') LIMIT 1");
if (mysql_num_rows($result) == 0) { // new item, insert into products
$v_date_added = ($v_date_added == 'NULL') ? CURRENT_TIMESTAMP : $v_date_added;
$sql = "SHOW TABLE STATUS LIKE '".TABLE_PRODUCTS."'";
$result = ep_4_query($sql);
$row = mysql_fetch_array($result);
$max_product_id = $row['Auto_increment'];
if (!is_numeric($max_product_id) ) {
$max_product_id = 1;
}
$v_products_id = $max_product_id;
if ($v_studios_name <> '') {
$v_products_type = 6; // 6 = dvd
} else {
$v_products_type = 1; // 1 = standard product
}
$query = "INSERT INTO ".TABLE_PRODUCTS." SET
products_model = '".addslashes($v_products_model)."',
products_type = '".(int)$v_products_type."',
products_price = '".$v_products_price."',";
if ($ep_supported_mods['uom'] == true) { // price UOM mod
$query .= "products_price_uom = '".$v_products_price_uom."',";
}
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$query .= "products_upc = '".addslashes($v_products_upc)."',";
}
if ($ep_supported_mods['gpc'] == true) { // Google Product Category for Google Merhcant Center - chadd 10-1-2011
$query .= "products_gpc = '".addslashes($v_products_gpc)."',";
}
if ($ep_supported_mods['msrp'] == true) { // Manufacturer's Suggested Retail Price
$query .= "products_msrp = '".$v_products_msrp."',";
}
if ($ep_supported_mods['gppi'] == true) { // Group Pricing Per Item
$query .= "products_group_a_price = '".$v_products_group_a_price."',";
$query .= "products_group_b_price = '".$v_products_group_b_price."',";
$query .= "products_group_c_price = '".$v_products_group_c_price."',";
$query .= "products_group_d_price = '".$v_products_group_d_price."',";
}
if ($ep_supported_mods['excl'] == true) { // Exclusive Product custom mod
$query .= "products_exclusive = '".addslashes($v_products_exclusive)."',";
}
if (count($custom_fields) > 0) {
foreach ($custom_fields as $field) {
$value ='v_'.$field;
$query .= "$field = '".addslashes($$value)."',";
}
}
$query .= "products_image = '".addslashes($v_products_image)."',
products_weight = '".$v_products_weight."',
products_discount_type = '".$v_products_discount_type."',
products_discount_type_from = '".$v_products_discount_type_from."',
product_is_call = '".$v_product_is_call."',
products_sort_order = '".$v_products_sort_order."',
products_quantity_order_min = '".$v_products_quantity_order_min."',
products_quantity_order_units = '".$v_products_quantity_order_units."',
products_priced_by_attribute = '".$v_products_priced_by_attribute."',
product_is_always_free_shipping = '".$v_product_is_always_free_shipping."',
products_tax_class_id = '".$v_tax_class_id."',
products_date_available = $v_date_avail,
products_date_added = $v_date_added,
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = '".$v_products_quantity."',
master_categories_id = '".$v_categories_id."',
manufacturers_id = '".$v_manufacturers_id."',
products_status = '".$v_db_status."',
metatags_title_status = '".$v_metatags_title_status."',
metatags_products_name_status = '".$v_metatags_products_name_status."',
metatags_model_status = '".$v_metatags_model_status."',
metatags_price_status = '".$v_metatags_price_status."',
metatags_title_tagline_status = '".$v_metatags_title_tagline_status."'";
$result = ep_4_query($query);
if ($result == true) {
// need to change to an log file, this is gobbling up memory! chadd 11-14-2011
if ($ep_feedback == true) {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_NEW_PRODUCT, $v_products_model);
}
$ep_import_count++;
// PRODUCT_DVD_EXTRA
if ($v_products_type == '6') {
$sql_dvd_extra = ep_4_query("SELECT * FROM ".TABLE_PRODUCT_DVD_EXTRA." WHERE (products_id = '".$v_products_id."') LIMIT 1");
if (mysql_num_rows($sql_dvd_extra) == 0) { // new item, insert into products
$query = "INSERT INTO ".TABLE_PRODUCT_DVD_EXTRA." SET
products_id = '".$v_products_id."',
studios_id = '".$v_studios_id."',
dvd_genre_id = '".$v_dvd_genre_id."'";
$result = ep_4_query($query);
}
}
} else {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_NEW_PRODUCT_FAIL, $v_products_model);
$ep_error_count++;
continue; // new categories however have been created by now... Adding into product table needs to be 1st action?
}
// needs to go into log file chadd 11-14-2011
if ($ep_feedback == true) {
foreach ($items as $col => $summary) {
if ($col == $filelayout['v_products_model']) continue;
$display_output .= print_el_4($summary);
}
}
} else { // existing product, get the id from the query and update the product data
// if date added is null, let's keep the existing date in db..
$v_date_added = ($v_date_added == 'NULL') ? $row['v_date_added'] : $v_date_added; // if NULL, use date in db
$v_date_added = zen_not_null($v_date_added) ? $v_date_added : CURRENT_TIMESTAMP; // if updating, but date added is null, we use today's date
$row = mysql_fetch_array($result);
$v_products_id = $row['products_id'];
$row = mysql_fetch_array($result);
// CHADD - why is master_categories_id not being set on update???
$query = "UPDATE ".TABLE_PRODUCTS." SET
products_price = '".$v_products_price."',";
if ($ep_supported_mods['uom'] == true) { // price UOM mod
$query .= "products_price_uom = '".$v_products_price_uom."',";
}
if ($ep_supported_mods['upc'] == true) { // UPC Code mod
$query .= "products_upc = '".addslashes($v_products_upc)."',";
}
if ($ep_supported_mods['gpc'] == true) { // Google Product Category for Google Merhcant Center - chadd 10-1-2011
$query .= "products_gpc = '".addslashes($v_products_gpc)."',";
}
if ($ep_supported_mods['msrp'] == true) { // Manufacturer's Suggested Retail Price
$query .= "products_msrp = '".$v_products_msrp."',";
}
if ($ep_supported_mods['gppi'] == true) { // Group Pricing Per Item
$query .= "products_group_a_price = '".$v_products_group_a_price."',";
$query .= "products_group_b_price = '".$v_products_group_b_price."',";
$query .= "products_group_c_price = '".$v_products_group_c_price."',";
$query .= "products_group_d_price = '".$v_products_group_d_price."',";
}
if ($ep_supported_mods['excl'] == true) { // Exclusive Products custom mod
$query .= "products_exclusive = '".addslashes($v_products_exclusive)."',";
}
if (count($custom_fields) > 0) {
foreach ($custom_fields as $field) {
$value ='v_'.$field;
$query .= "$field = '".addslashes($$value)."',";
}
}
$query .= "products_image = '".addslashes($v_products_image)."',
products_weight = '".$v_products_weight."',
products_discount_type = '".$v_products_discount_type."',
products_discount_type_from = '".$v_products_discount_type_from."',
product_is_call = '".$v_product_is_call."',
products_sort_order = '".$v_products_sort_order."',
products_quantity_order_min = '".$v_products_quantity_order_min."',
products_quantity_order_units = '".$v_products_quantity_order_units."',
products_priced_by_attribute = '".$v_products_priced_by_attribute."',
product_is_always_free_shipping = '".$v_product_is_always_free_shipping."',
products_tax_class_id = '".$v_tax_class_id."',
products_date_available = $v_date_avail,
products_date_added = $v_date_added,
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = '".$v_products_quantity."',
manufacturers_id = '".$v_manufacturers_id."',
products_status = '".$v_db_status."',
metatags_title_status = '".$v_metatags_title_status."',
metatags_products_name_status = '".$v_metatags_products_name_status."',
metatags_model_status = '".$v_metatags_model_status."',
metatags_price_status = '".$v_metatags_price_status."',
metatags_title_tagline_status = '".$v_metatags_title_tagline_status."'".
" WHERE (products_id = '".$v_products_id."')";
$result = ep_4_query($query);
if ($result == true) {
// needs to go into a log file chadd 11-14-2011
if ($ep_feedback == true) {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT, $v_products_model);
foreach ($items as $col => $summary) {
if ($col == $filelayout['v_products_model']) continue;
$display_output .= print_el_4($summary);
}
}
// PRODUCT_DVD_EXTRA
if ($v_products_type == '6') {
$sql_dvd_extra = ep_4_query("SELECT * FROM ".TABLE_PRODUCT_DVD_EXTRA." WHERE (products_id = '".$v_products_id."') LIMIT 1");
if (mysql_num_rows($sql_dvd_extra) == 1) { // update
$query = "UPDATE ".TABLE_PRODUCT_DVD_EXTRA." SET
studios_id = '".$v_studios_id."',
dvd_genre_id = '".$v_dvd_genre_id."'
WHERE products_id = '".$v_products_id."'";
$result = ep_4_query($query);
}
}
$ep_update_count++;
} else {
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT_FAIL, $v_products_model);
$ep_error_count++;
}
}
WAIT WAIT ! i figured it out, i didn't need to copy most of that over again a second time. i got it totally working! awesomesauce. thanks man!
Bit quiet around here folks! Anyone got any suggestions for this?
I've checked the csv files on the (Linux) server and their owner group setting is:as opposed toCode:apache:apache
for the rest of the site files. I changed one of the CSVs toCode:myowner:psacln
but trying to downloading this file resulted in the same error.Code:myowner:psacln
Anybody?...
Try right-clicking the link and selecting "save target/link as". You may also try to change the permissions on your temp folder.
This can really depend on how php is run on your server (DSO, suPHP, FCGI, etc.) ... perhaps someone else has a better answer. IF all else fails, you should be able to pull them down with FTP even though that's really inconvenient.
-chadd
Hi Chadd,
I tried the right-click method and get the same result. My temp dir permissions are already set to 777 and owner-group is correct. I thought the issue may be the fact that the created files are owner-group "apache : apache" instead of "myowner : psacln", which all of the other files in my zen cart and EP4 installation are. However, changing all the owner-groups doesn't fix the problem.
Anybody else had this issue?
(ps is there any way of turning off these smileys so that a : followed by a p isn't turned into an icon?)
Easy Populate 4 Documentation
Is there a definitive set of docs for this version of the addon?
The wiki page (http://www.zen-cart.com/wiki/index.php/Easy_Populate) does not apply to version 4, and as far as I can see, there is no equivalent documentation for version 4.
There are some docs in Github, and 102 pages of posts here in the forum, as well as older info in the wiki, but it would make life a lot easier if there was an actual set of up-to-date docs somewhere for getting started, testing and then easy reference.
I would really like to see a nice clean table listing the columns and showing, at least, for each:
- Column heading
- Data type (string, int, float etc)
- Required/optional
- Unique (Y/N)
- Notes (covering all the ways of using that column, restrictions etc)
Cheers,
gavin
OK, csv file download problem solved.
There is an .htaccess file in the admin directory (or whatever you have named yours).
In there, by default, only certain file types are allowed in direct HTTP requests:
You just need to add "csv" in there too:Code:# but now allow just *certain* necessary files:
<FilesMatch "(^$|^favicon.ico$|.*\.(php|js|css|jpg|gif|png)$)">
Order Allow,Deny
Allow from all
</FilesMatch>
I don't know if there is an instruction anywhere in the EP4 docs to alter this, or if this update should be part of the install process?...Code:# but now allow just *certain* necessary files:
<FilesMatch "(^$|^favicon.ico$|.*\.(php|js|css|jpg|gif|png|csv)$)">
Order Allow,Deny
Allow from all
</FilesMatch>
Always a simple answer. Always a bugger finding it.
:smile:
Hey K9!
Good catch! The other time I've seen this occur is when your config.php file has some extra slashes in the path directives. This sometimes happens with auto installer in cpanel.
I'll be sure to add your discover to the doc **when** I can get around to finishing them.
-chadd
Can anyone help with this please?
My install of Easy Populate is working fine, but is missing from the 'configuration' menu.
I downloaded what looks to be the latest version from http://www.zen-cart.com/downloads.php?do=file&id=868
I've tried to upload the SQL patch to no avail.
MySQL v5.0.9
Zen Cart v1.5.1
EP v1.2.5.7c
Cheers Chadd.
Now, I am on my way to using this software, I just don't have a manual. I don't want to start throwing switches to see what happens and I don't want to sift through a million forum posts. Can you tell me where to read basic instructions on how to insert and update product attributes?
(In particular, the fields:
products_attributes.options_values_price
products_options.products_options_name
products_options_values.products_options_values_name).
Thanks,
Gav
There are basic instruction on how to import attributes in the README.txt file that was included in the zip you downloaded from github.
Be sure to use Dr. Bytes MySQL Backup Tool... this way you can experiment without and roll back should something go awry.
Also, it is really recommended that you create a mirror of your live install for experimentation and testing. I always create LIVE, MIRROR and TESTING sites. This does take more time and effort initially, but it can really save your behind.
I also use the AutoMySQLBackup VER 2.5.1 to do daily MySQL backups. The script is quite good, and will rotate your old backups according to the schedule you want (daily, weekly, monthly).
-chadd
Thanks for the reply. I'm unsure if I should upgrade or not. I'm a bit puzzled as the documentation says "NO streaming upload or download" but at the same time "To download your exported file, you will need to "right-click, save-as". Download is a must-have feature for me as I need the flle with all product URLs for Google Shopping products feed.
Update to my last post...
So I've upgraded to EP4 now. I am getting seriously confused though. When I go to 'Tools' > 'Easy Populate 4', I don't see any option to download my inventory with all the product URLs. Any file I can download via EP4 doesn't have them, I can only get the product URLs via the older version of EP.
I am also now getting huge files down with 7-8,000 items when there only should be 5,300 items in my store. I don't understand why the system is not purging all my existing inventory and replacing it with the 5300 items in my upload?
I've tried to add custom fields including weight and barcode to my product database but that doesn't seem to have worked at all. They all just show as 'FALSE' in the EP4 window. I see there is a field for 'Product UPC Code' under 'Custom Products Fields' but that has 'FALSE' next to it and I have no idea what I'm supposed to do with that.
I am getting really muddled now and I seem to be compounding my problems by adding in extra unknowns and issues. All I want to do is upload my inventory with the weights and barcodes specified for each item, and then download it with the product URLs appended.
Now attempting to purge my entire inventory and start from scratch by deleting categories, but it seemed to be too much for the server as the admin page became inaccessible and eventually my site went down altogether for a time, with 'WARNING: An Error occurred, please refresh the page and try again.' Tried to work around by creating extra database users in MySQL and editing /includes/configure.php to the rotating users tweak as on http://www.zen-cart.com/showthread.p...728#post144728 but that didn't work either so I had to switch back. It seems my shop works fine so long as I never try to update the inventory. There has to be an easier way than this... :sighs:
Hi,
If you want to clear out your inventory, but the admin delete is timing out, then you need to do a search for the SQL commands that you can run via the SQL patch feature to remove them.
Note that when you delete an item from the admin, it also deletes the associated photo. You may not want that.
Adding a custom field is a two part process... first you need to add the field to the data base via phpMyAdmin from within your cpanel, once you've done that, then you need to enter it in the EP4 configuration page.
Also note: Database field name CANNOT have spaces in them, which is what you look to have done.
EP4 DOES handle file upload and downloads. But it doesn't STREAM the file at run time, meaning the data is exported to a file in your temp directory, and then from there you can download it.
Also, if you have a large import file, and a low end shared server/hosting environment, then you should use the SPLIT feature after you upload the file to break your import file into manageable chunks. Much work when into improving the performance of EP4, and I have tested with with another user importing 900,000 records... in this case we broke the file into 50,000 chunks and those import in about 200 seconds. He had a dedicated server which is much more powerful that the typical shared hosting. So try for the default of 2,000 record breaks when you split.
Note that this version is not an "upgrade" to the other out there, but a rewrite with many core changes to the code.
Hope this helps...
Hi Chad,
I'm a new Zenner and built a site using this mod on 1.51. I try to learn as much as possible before doing especially since I'm not a programmer. Most features and functions work and I thank you for building this mod. I would like to take advantage of the additional product fields and have gone through this entire thread searching for why my listed fields still come up "FALSE" under Tools/EP4. In reading post #'s 205, 378, 479, 621, 786, 789, etc., you mention creating those new fields in the SQL database. Unfortunately, when I go there with MyPHP admin in C-Panel and see the structure and field entries for all the existing databases, I'm completely lost with what to do. Any assistance would be appreciated.
OK, now getting somewhere.
I did a fresh install of ZC 1.5.1, with all example products.
Then installed Backup MySQL Plugin, backed up the DB, installed EP4 (all ok).
Then I generated one of each of the 11 types of export file for a copies of the original product data.
As I am specifically interested in creating and updating attributes and attribute prices, I then ran several tests on the file "Attrib-Detailed-EP2013Jun18-134609.csv":
1. Deleted all except for 5 rows showing "MG200MMS" in v_products_model (ie all 5 varieties of a single product).
Altered all the values for v_options_values_price.
Uploaded and imported - all test values appeared correctly in the front end. (Great! - first time this far).
2. Starting with the same 5 rows, I then emptied all columns except
v_products_model
v_products_options_name
v_products_options_values_name
v_options_values_price
These are the ones I am interested in.
This failed and generated the following errors:
3. I then tried deleting out all columns except for the four I'm interested in.Code:Output page top:
Warning File Import Completed with issues.
Warning An SQL error has occured. Please check your input data for tabs within fields and delete these.
If this error continues, please forward your error log to the Easy Populate maintainer
Output page bottom:
Import Results
Filename: Attrib-Detailed-EP2013-test2-a.csv
SKIPPED! - Attribute Entry on Model: MG200MMS - Not Found!
SKIPPED! - Attribute Entry on Model: MG200MMS - Not Found!
SKIPPED! - Attribute Entry on Model: MG200MMS - Not Found!
SKIPPED! - Attribute Entry on Model: MG200MMS - Not Found!
SKIPPED! - Attribute Entry on Model: MG200MMS - Not Found!
Finished Processing Import File
Updated records: 0
New Imported records: 0
Errors Detected: 5
Warnings Detected: 0
Memory Usage: 6322296
Memory Peak: 6463696
Execution Time: 0.0096170902252197 seconds.
Same errors as above.
Can you tell me which columns are required and which are optional?
I want to minimise as much as possible the size of the spreadsheet.
Thanks,
gav
Hello Chad – I have created 2 user defined fields using the How to add new product fields? thread from
http://www.zen-cart.com/showthread.p...Product-Fields
The fields are created in a table called products_extra_stuff.
Even though I am adding the 2 field names under admin>Configuration>Easy Populate 4 User Defined Products Fields(separated with commas, no spaces), they are defined as false under admin>Tools>Easy Populate 4.
Is there something that I have missed? Or should I be adding something else to EP4 code or this is not possible with EP4?
Really need this to upload data.
Kevin,
User defined PRODUCTS fields only apply to the PRODUCTS table. Can you put those fields in the products table? If you do that, it will work.
NOW, if you brave and want to dive into the code, it shouldn't be TOO hard to follow the my lead. The next release of EP4 (crosses fingers) will have this more simplified. I moved all the custom stuff to user defined fields.
-chadd
Thanks for the prompt reply.
When would the next version be out?
Any lead into where to start diving would be greatly appreciated.
ps. everyone says try to keep any additional fields away from the core tables. That's why I chose to create a new table!
Thanks for the reply.
I've learned the hard way about images being deleted when an item is deleted from admin. That is not something I want at all, not sure what to do about that though.
I've looked in phpMyAdmin to try to find where the User Defined Product Fields are supposed to to go, without success.
None of the database field names were entered with spaces.
Well... you don't HAVE to follow that advice. For coding changes, be sure to use the over rides, but if you are simply adding a couple fields that are very specific to the products data, put them in the PRODUCTS database. Things will be MUCH simpler, you'll have fewer SQL requests, and actually LESS core modifications.
Next version? Weeks... Months? Depends on my work load and if I can get some free time. Next version will be submitted to the zencart downloads, so I want to be sure it's solid and well documented.
-chadd
That's exactly what I did.
Thank you. Chad
Thanks for the great software. I used to use an old version of Easy Populate on an old store. I'm setting up a new store at the moment and this version of Easy Populate is Looking very promising! MUCH MUCH faster. A lot less memory usage on my VPS.
Will test it out tomorrow! Thanks already for ALL your work. I program a lot of stuff in my freetime and I know how much work a project like this is. You are a blessing for the community!
CEON URI mapping and Easy Populate
Im having a problem with these 2 mods. When I export all my products using easy populate, the URL column is blank. Its blank in phpmyadmin as well which is normal behavior I guess with CEON?
But how can I do an export so all products include a URL? Im doing this for a shopping comparison site feed.
Read this about Product URL:
http://www.zen-cart.com/showthread.p...s-Products-Url
Not what you'd expect.
I am working on an update that export a products cpath (what you normally see when you're on a product page), I will have to do some research to see what Conor did in his URI mapping mod, but I think he uses some of his own tables and core modifications....
-chadd
Wow! Amazing timing. I just came here looking for a way to get Ceon URI and EP4 to play together! :D
Yes, Conor added his own tables. I have manipulated Ceon URIs manually before, but it's been a long time. If memory serves, he links to the actual Prod ID. I think what I did was dump his Prod URI table (using phpMyAdmin), then dump the ZC Prod URI table, then line the two files up by Prod ID. Once you have the info, you can manipulate it, split up again, and import back.
I have been wondering for a long time why EP4 does not use the actual Prod IDs (or Cat IDs)? I really, really like to use (and occasionally manipulate) those bits of information. Extremely useful stuff. I guess it could too easily lead to screwing things up?
Anyway, I'm bummed to see there is no easy way to import/export Ceon URIs yet.
Chadd, the update you describe working on (export cpath) is super exciting! I would get a ton of use out of it, especially if it worked with Ceon URI! How far off in the future is your update?
Chargin, I'm guessing Chadd's update won't be ready in the next 24 hours, so I'm probably going to try to figure out how to do it manually. If you are comfortable with manipulating the database directly, I'll be happy to relay some instructions after I figure it out.
Feznizzle that sounds good, if you can give us an outline.
I looked at phpmyadmin and was thinking excel might work with an export but it all seemed too hard....
Id love to get chadd's mod when hes ready though.
Thanks guys.
Chadd (or anybody!),
I've been searching thru this thread, trying to find a way to get EP4 to export product_ID. But I can't seem to find a way to do it. Can you tell me an easy way to do it?
Next question... in EP4, what triggers the connection between product info (name, description, price, etc) and the controlling poduct_id? Is it product model? No, I don't think so. I'm thinking Product Name?
Man, I really need an easy way to access those ID's. Please help!
Thanks,
Mike
NM the question about what triggers the connection... I see model numbers control everything. Wow. That is rough, if you have thousands and thousands of products as I do. I don't control the model numbers, manufacturers do. A model # for a widget from Manufacturer #1 could easily conflict with Manufacturer #2.
Wow. This is a bummer! The only thing I am sure won't conflict is ZC ID.
For a moment there, I thought getting product id was going to be easy.
I went to: Configuration/Easy Populate 4
Clicked on: User Defined Products Fields
And added: v_products_id
But it showed up as FALSE on the Tools/Easy Populate 4 page. What am I doing wrong?
AWESOME!!! Chadd, I love you!!! This mod rules! :D
Anybody else that wants to do this, simply go to Configuration/Easy Populate 4/User Defined Products Fields and add: products_id (not v_products_id).
Chargin, all you have to do is get EP to provide you with product ID (see above). Then you can go export the Ceon URI table via phpMyAdmin (as you describe above... I recommend you export as Open Document Spreadsheet to stay compatible with EP4).
Once you have both files open (your phpMyAdmin and your EP4) sort both files by ID# and line them up. Edit the URIs, then using your phpMyAdmin file as template, import the edited data.
Good luck!
As much as I hate to admit it, I am stuck at a simple point in using EP 4. I have it installed and I downloaded a product to learn on. I want to change the price from $10.99 to $11. I open in Excel, change the price and save the file. I save it as the same name it was originally called PriceQuantity-EP2013Jul01-161941.csv. I had changed the configuration of my Easy Populate 4 in the configuration to the name of my admin directory for Zen Cart, let's call it bigbob/ Then I tried to download the test product into my desktop then opened Excel and changed the price from $10.99 to $11. I saved it with the original name and as a .csv file, and used Easy Populate 4 in my admin panel to upload it. It did go to bigbob/ but that is where it stays. So, I think I don't have the right destination. I have looked in a variety of places (including the WIKI) but I think I don't have it configured to save in the right place, I think it needs to be more specific than just the name of my admin file. I do have the right model number on it, I did download it as a model/price/quantity file. I am using Zen Cart v 1.5.1 Please tell me what the address should be to load it back to my admin area with the changed price on it. Thanks.
Never mind the above, I tried out Apsona Shop Admin and got it going right away. I will be using that one, so I don't need the above question answered.
Hello,
In the Italian language there are problems to import a character, č, ů, ě, ň, etc..
For the moment I solved it by replacing with my management software.
The problem of easypopulate4.0 still exists or has been resolved?
sorry for my english.
Hi I am trying to work out if this mod will do what I want before I install. I have read through this full thread and am still confused. I am using ZC 139h and stock by attributes. will this mod allow me to update the product quantities for each attribute. For example I have product 1145 available in small med and large. I want to be able to update the quantities from a suppliers csv file. I am confused by the need to have unique product ids. In the database the table products just shows the total stock combined. There is also another table for stock with attributes stock but I don't know how to match these tables.
Hi,
I have not used the stock by attribute mod. If this mod uses custom tables to track stock, then I don't think EP4 (or any EP version) will help.
Perhaps another zenner has an answer or can suggest another mod.
EP4 uses the products_model as it's main key to link the various databases. If you don't use products_model numbers, then EP4 won't work for you...
-chadd
Hi Bran,
If you could create a CSV file for me with your full language represented, I could do some testing for you. Note that your database collation can affect how character data is stored.
be sure to zip your CSV file before attaching it. Give me a dozen products or so. Also, which mod are you using for Italian?
-chadd
So Propster, as written, no it will not import to Stock by attributes.
It would require a little more work. The Stock By Attributes table does (the version I'm using) include a reference back to the product id, which is also in the products table. Couple that information with the products_model info and you have references to the data that you need in the stock by attributes table. Thing is that table works a lot like (well basically is) the attributes table does, in that there are multiple entries tied to a single object. One of the differences/difficulties is that the data stored for a single stocked item (all the associated attributes) is not the same for all versions of Stock By Atttributes if I am correct. So any "manual" or instructions related to that portion may not be consistent across all versions. Being possible, I would say yes. Quick and easy, I would say relatively no.
But a start would be to look through some of the other import/export functions that work similarily and identify what information is needed to work both directions (import/export). And then carry on. It does seem that the code is robust with the various types of export reports, so this would just be one more report type.
Oh yes, the total # of items would be affected by EP 4 or others, but stock by attributes has it's own quantities and depending again on the installed version, the total may get reset or other things may change depending on how the SBA works, but this mod does not currently interface with the SBA table.
Wow thanks for the speedy response. So basically stock with attributes creates a new table in the database. what I am looking for is a method of linking the entries in this table with the product discription so that i can update the quantities from the inventory supplied. I don't mind creating a lookup table in excell to achieve this. I am just looking for a way to update quantities without having to go through the admin and enter the information manually
Perhaps Chadster can help with the "format" or setup needed within the program, but looking at the Stock by Attributes table in my database (Table Prefix)products_with_attributes_stock, I have 5 columns:
Stock_id (This is used specifically to identify a unique item's stock),
products_id (Which ties back to the (Table Prefix)products table),
stock_attributes (Which identifies which one or more attributes are associated with the stock_id),
quantity (The total number of items that match the stock_attributes for this product_id and stock_id), and
sort (supposedly to be used to sort the particular stock_id when viewing the products_id, though I don't know if or when that is enforced).
So, perhaps the easiest way to implement this is to only be able to deal with existing items that have a stock_id and not to have to add a new one attribute to an item.
In my list, I have a number for a products_id, and one or more numbers in the stock_attributes, these numbers correspond back to the product itself (which to use this mod requires a model number) and a designated attribute (red, black, whatever you have chosen) that is listed in the (Table Prefix)products_attributes table. So, there are ties back to each of those attributes. By exporting the (table prefix)products_with_attributes_stock table substituting the applicable product name (or model number as desired/needed) and the applicable attribute, the user (you) can intelligently understand what product is being referenced. Include in that output the stock_id and the quantity as a minimum, then when importing the data, (going back to probably using the model number) with the stock_id in the downloaded data, the upload is quite easy because there is only one item in the table that has that stock_id; however, it may also be possible (less likely for a user to make an error) to use the model number and the associated attributes to find in the table the one row that has that product_id and only that one attribute combination (it is possible though not desired to have a product_id that has less attributes identified than those that would be sold, but I think that comes through attempting to incorrectly modify the number of attributes while adjusting quantities at the same time, ie. user error. :) )
That's the basic flow/thought process that I see, and although I have just yesterday tried to update a single item using the Full-EP file format, I did look through a bit of the main controller for EP 4 to see what I might need to do to ensure it worked. I would think that Chadster could identify the areas that would need to be worked in to add the above functionality.
Also take a look at a post I put up earlier on a different thread. It takes you to one of the other threads about one/two versions of SBA that are recognized out there. http://www.zen-cart.com/showthread.p...46#post1208146
I implemented the method I described and was able to create SQL that I could use/copy into the admin panel and update the table(s) with the desired information. It is dirty sort of like what you were referring to (using a reference table or something) and is somewhat the foundation to EP, but it also does not afford any type of real checks so would want to implement cautiously. (That means BACKUP, BACKUP, BACKUP and test/check after taking action.)
Hey guys,
There MAY be some small hope to do this. But, believe me, the attribute importing code is quite complex.
But, look at the DETAILED attribute export. This is a "special" file as it is one-to-one. When you export this file and look at the first columns, and examine the import code, you see that this is a very basic key lookup and replace loop.
That is why I made the creation of the values different than the updating.
I would be possible to modify the DETAILED attribute export code to also incorporate the SBA tables in a similar manner, and then do the same for the Import code.
Unfortunately, I don't have time right now. Day job + 3 demanding clients and their projects have me inundated.... and I'm trying to get EP4's update to github and the zencart team.
-chadd
Fully understood about having (or not having) the time. Part of the reason to try to document the process that might be needed and talk about what we have to work with. For me, the above direction may be enough to develop the code (same here time permitting), but just because I get my version to work doesn't mean that it would work for other versions of SBA, which to be honest I'm not 100% sure which version I installed. (2 years ago and I didn't take good notes like I should have about what specifically I installed and did to make it work, but it does or I have to make some manual tweaks once in a while.)
That said, thanks for the insight into where to look "next". Probably may end up as a mix of a couple of the routines, but would seem that in general a one-to-one would at least get the specific table updated. Would still need to pull from other tables to provide user friendly info, but seems even each of those is a one-to-one relationship.
Huh, actually, just took a look at the detailed attribute export file and for products that only have one attribute, this would be the way to go, would just have to add in the SQL to also capture the info in the SBA table so that it could be fed back. For mutliple attributes, though would have to probably build to the point of an SBA input just like when using the mod, ie, enter product, enter attributes that don't exist, assign attribute(s) to product, then populate the quantities of the product(s) that have the attribute(s). The only potential problem I see, is that the total quantity of an item would not be updated/synchronized by this process if the associated code isn't brought in/activated to perform a synchronization after import. In the interim though, I think that after population, the user could go into the admin panel and activate that operation.
Prior to this version of ZenCart, I used the "paid" version of Easy Pop which allowed assign the Product ID
Why no longer matters as I am accepting this is not posible in EP 4.
However, my Zen Cart currnently thinks I have the maximum number of product ID (214........)
I know this number cannot be changed.
And I have found that because of this, using the current Zen Cart and Easy Pop 4, I cannot add new product, etiher via EP4 or "manually"
I am concernter that if I just go into the SQL DB and reset the number, it will start using numbers already assigned to existing products and it will be an even bigger mess (if that is possible)
We do have other add on in use, but I know from past experience (and the error log) that they are not the problem.
Any suggestions.
Thank you for your consideration
Wheat
Essentially it sounds like you need to "clean" your database, which is a function available under the tools->Store Manager section of the admin panel.
Yes, your concern is valid about randomly assigning the product Id. As for using EP to assign the product_id, it is possible, but which is easier to "remember" when working on the data, item #2 or RosyRedFlowers? Also, as a programmer, basically by forcing the data table to accept this new product #52, can cause that table to obtain errors (something like, though not necessarily because of, the problems you are experiencing. ) It does take a little more planning by the store operator to make it work, but the resulting functionality is tremendous. And actually, EP might be able to fix your issue.
If you were to download all of the table data from your store, you could copy your store program code to another location, from there copy the existing database, wipe out the data within the applicable product tables, then upload (through EP) all of the product data again. If all data and associated referenc information is properly reset, the this would resolve your problem also, but seriously, back up back up, BACKUP and a number of other concerns to possibly do things this way. I still think the database compression/cleanup described above would be the best bet, if not at least a great start.
Thank you, I do understand what you are saying. However the issue is that ZenCart has a "hard coded" maximum number. For some reason buried back in about 2008 - my system "thought" it had reached that number.
The first line of the error report mention that number -
Fortunately I had a copy of the "other" EZ Pop and was able to find determine what the highest Prod ID really was. Once I knew that, the DB had to be manually edited (cannot be done thru any of the ZenCart Admin Pages) Equally. Fortunately once I realized what the problem - my other half was able to resolve the issue.
I had to delete one product and then change the product number to be incremented as products are added and it is all good until I do something else terminally stupid on purpose or accidentally.
Meanwhile because I am sometimes more adventurous than I should be, my SO wrote something so that the entire DB is backed up daily, zipped and sent via email so I always have a copy no older than 24 hours available.
Thank you for your thoughts, they make help with some other occasional issues.
Enjoy The Making
Wheat
Previous to EP4, I used the paid version. So sorry for all the "born a blonde, but white haired now" questions.
Is there something I can do to have the report include the master category number
Thank you for your time
Wheat
Okay, a couple of things, I can't imagine that the maximum number of products in your store can be 218 or whatever low number showed in this thread. After that, I find it difficult to have perhaps millions of products that are active in a single store.
As for the auto_number. As you said if you are able to find the "actual" next number, then you should go into your mySQLadmin panel and reset the auto_number to "that" number. Thing is, if not mistaken, the total number of items is limited by the server not so much Zen-Cart. If you are unable to use the standard Zen-Cart add product functionality, then this version of EP is most likely also not going to work.
Not sure what you mean by the master category number. You can export just about anything you want from the database. If I'm not mistaken though I thought the master category was named something else and included in the detailed download of the products. Once you have downloaded Chaddruski's version of EP, you could do whatever you want with it to export additional data if so desired, but at ones own risk.
HI, my first post here, so if this is covered already please say.
I have an export csv file from Litecommerce, it exposrts category setup separated with slashes, as one field.
in other words, I get one csv field with the categories separated by slashes
topcat1/subcat1/subcat2
rather than the separately delimited category names that easypopulate expects.
if its not already solved, can anyone direct me to the easypopulate code that reads the csv data category fields, so I could possibly
split the incoming litecommerce data format above, with the slashes, into [for instance] the 3 separate fields which easypopulate would expect
for the above example.
i can do php
thanks
Don't know if addressed earlier, but the file in your admin directory ending with import processes the information obtained by the sql query in the functions file found in admin/functions/extra_functions.
May want to create a new file name prefix to process your osfiles and in parallel a new sql query section to handle the situation you have. This way won't break the existing code.
Actually, it would be much easier if you simply did a search/replace on "/" and replaced with "^"
NOTE: My version of EP uses ONE column for the category path. This is a large change from other versions. This was done to support multiple languages.
so: v_categories_name_1 refers to LANGUAGE 1, and v_categories_name_2 refers to LANGUAGE 2, not a subcategory.
Hope that helps.
-chadd
Though my contribution may. Have been significantly smaller, hopefully you realize that if you have more than the one file to worry about, that you could implement the swap of the / for ^ in the code on that one field using a new import section. Being partial to ZenCart, not only would that added functionality help others convert to ZenCart, but it would save you from having to remember or make note of what was done to bring the file(s)/filetype(s) into ZenCart. :)
Good luck!
Hi chadd
I've got the ^ separator split now, ep4 imports category correctly, ......but the max length of the ep4 categories field is 32, can I manually make that field longer in the db without messing anything up?
And is there a limitation in your EP4 code otherwise, that limits that categories names total length to 32, before its split?
thanks
Only answering what I have an answer for: regarding the field length, it is not an EP4 setting, just something that has been made viewable to help the "admin". Regarding modifying the length check the following thread found by a google search:
http://www.zen-cart.com/showthread.p...ame-max-length
If I had my guess based on the flexibility that has been incorporated thus far into EP4, is that if the import programming cuts off data, it would be to the limit of the current database setting and not some arbitrary value, and would be such that each cat^subcat would be such, not the entire string length or it "waits" for the receiving database to perform the chop. Chadd probably can provide that type of info off the top of his head, while I'd have to look into the code to confirm or deny that, though in writing import functionality I don't recall coming across any such limiter.
Btw, I apologize that my response may seem curt or rude, I absolutely had no intention in it being so. I was rereading and thinking about it and could see how it might be interpreted as such.
Btw, congrats on getting the formatting to support the import formatting. That much closer to a totally zen experience. :)
chadd and other !
I am exporting from litecommerce cart, get the csv category string with / instead of ^.
I've successfully modified the code around lines 685 of easypopulate_4_import.php
as
$categories_delimiter = "/"; // add this to configuration variables
// get all defined categories
foreach ($langcode as $key => $lang) {
// iso-8859-1
// $categories_names_array[$lang['id']] = explode($categories_delimiter,$items[$filelayout['v_categories_name_'.$lang['id']]]);
// utf-8 ^
//jph mod separator x2f is / in hex asc
$categories_names_array[$lang['id']] = mb_split('\x2f',$items[$filelayout['v_categories_name_'.$lang['id']]]);
This imports fine now, categories work, now can have the zencart experience with Litecommerce v2.1 data. Hope this helps someone else with an old litecommerce setup, because import into X-cart [their modern version] is a limited option. btw haven't imported more than one product at a time yet into zencart, but I don't foresee any probs. THansk so much for this EP4 version!
If you adjust the categories name length via phpMyAdmin and alter the length, EP4 will see that and adjust accordingly.
There is error catching code in EP4 in regards to category name lengths that will prevent a product from being created if a category name exceeds that supported by the database ... not having this would result in bad things :p
-chadd
Hi, please tell me why I have no option to install EP in my admin!!
I don't even know which version of EP I have uploaded. It was at the top of http://www.zen-cart.com/downloads.php?do=file&id=868 page and it says "This is an update to Langers version". I put the tempEP folder in the public html folder and maintained directory structure for the admin files. I also ran the install_sql script in admin. Why do I not see anything in admin please - neither in Tools nor Configuration. Therefore, I have no option to install EP.
help please!
i forgot to say that my zencart version is 1.5
So if you had downloaded the plugin from the URL provided, then the applicable help forum is: http://www.zen-cart.com/showthread.p...-2-5-4-support
That is a different version of Easy Populate than what is covered by this support forum. Assistance on installation of that product (Easy Populate 1.2.5.4) should be directed there.
The version applicable to this forum has not yet been posted to Zen-Cart as it is still relatively a beta (test) product though is planning to post an updated version to Zen-Cart.
Hello, I just installed this and have it up and running, but I downloaded a file so that I could make sure I've added certain attributes to certain items. I noticed that the attribute default order is different than what I set it to in Admin. Can someone explain why or how this works? I have 100s of charms, and I group them by type (sports, animals, food, etc...) I try to set each type to a specific number to making adding in new items easier. For example, my animals are 500, all animal charms are 500 so that they default into the same group but alphabetically. Hope that makes sense, but when I look at file, they are given a specific number not all the same one. Can I keep using the same number for uploading? Thanks!
If you could give a little more information it would help to answer your question.
Which type of file did you download (Basic product, detlailed product,, basic attribute, detailed attribute, etc.)?
The unique number that you are talking about 500 for animal charms, in what field do you usually type that numberr? (Is it in the modelname, the sort order, etc...)?
In the file you mentioned that there is a different number for each item, if you go to the top of the file for that column, what is the name at the top of the column? (Data field name)
The sort order was mentioned, could you explain the concern more? Is the information listed in your file not sorted in the order desired, is the data not correct to allow sorting, etc?
Regarding this plugin, when downloading a file it provides what is in the database. It does not make new infromation in the downloaded file, so the numbers and other information seen already exists in your database that way. When uploading a new file, some new information is created just like it would be if the item(s) were entered from the admin panel.
Probably the one important part about using this tool for populating the database is that it requires a different model entry for each item otherwise the wrong item may get updated when uploading new information.
I think by answering the above questions more people will be able to help answer your questions. :)
Aack! Some EP4 functionality seem to have pooped out on me!
Earlier today, I used it to upload a group of 10 prods to my site, worked like a charm. I subsequently uploaded "price breaks" for all of the same products, some data failed to go in.
When I originally uploaded the products (successfully), I had inserted a random price of 1. When I inserted the "price break" file, it appeared to go in correctly. My generic prices were all replaced with the correct price. And "v_products_discount_type" (2) appeared to go in because all of the products had the price break chart show up.
However, none of the price break data worked. The price break chart that shows up on the product page is blank.
I took a few shots of my admin page, cobbled them together into a single image so you can see all my settings and the reported result of my import. And I will attach the OpenOffice file so you can see it.
Please... can someone help me to get EP4 back on track?
Thanks,
Mike
Attachment 12874
+++++++++++
I was unable to attach my OpenOffice file. I don't think it was my file format, so I guess that doesn't matter. But maybe it is my column headers?
Here they are:
v_products_model v_status v_products_price v_products_discount_type v_products_discount_type_from v_discount_qty_1 v_discount_price_1 v_discount_qty_2 v_discount_price_2 v_discount_qty_3 v_discount_price_3
I will answer those questions later because I have since tried to upload a file of products only to receive the "No model field in Record. This line was not imported." when, in fact, I have model numbers in there. I researched it on here, but what someone suggested about copying to a new file only the columns that have info, did not work for me...and most other postings are in regards to a different version of EP. I have followed everything to a T.... and tried multiple times but no luck. HELP!
Bump!
Can somebody please take a look at my post above? If you pm me your paypal email, I'd love to buy you some coffee for helping me out!
So, my luck someone is already answering your question while I write this.
I'll say this, I have not used the price break feature of EP4, so the specifics of which piece of data should be where are foreign to me at the moment. Additionally, there is some conflicting information provided in the writeup of the problem. It looks like a single update was provided to your database, and you received two different results (again by what was reported): 1) ...appeared to go in because all of the products had the price break chart show up.
2) However, none of the price break data worked. The price break chart that shows up on the product page is blank.
Potentially I could understand that to mean that the table appeared but it didn't contain any data. Is it possible that the value attempted to be shown was a value of zero, but because of the presentation method doesn't force a 0 to be shown, but instead blank?
I would suggest that you try to investigate by looking at the data in your mySQLadmin to determine what the value should be for that attribute/somewhere else that would show the information that ends up showing or being combined to show what is desired.
I know you were concerned about your headings, based on previous posts, would want to look at/for any leading/trailing spaces that would cause the data not to be collected.
Was the price break data that was provided a change of an existing price break, or new data not previously present? A long shot thought is are you suure that the new data was applied to only the "one" product and didn't get applied to something else not expected/reviewed?
I'm sorry Lilley, I totally missed your response. I had too narrow of a view because I didn't see any of my text copied. So, if I am correct about how the program works, if the heading does not match the heading expected, then the program considers it not present regardless of the list of data below it. This could be because of an extra space before or after the text of the heading, a change of capitalization, or some modification made to the heading that I have not covered.
Regarding a "new" file, my thoughts on that is to download/export the type of file you are wanting to work with, then remove the "unnecessary" data and fill in the information you are trying to bring in. Don't "touch" the headings and try to do one line of the data you are working with as a test, if that works as expected, then import as much as you need, at least that way only the one item is potentially affected.
As for then only working with the columns of interest, from the downloaded good file, you can delete the other columns that are not needed.
The other thing to consider reviewing is that the newly saved csv file has the expected structure to support import. (Quotes where they should be, the appropriate divider between entries such as a comma, etc...) This would be by looking at the newly created CSV not necessarily by looking at OpenOffice (or the program of choice).
Been using the Advanced Easy Populate on v1.3.9. Does anyone know if it will still work in v1.5.1?
Is Easy Populate 4.0 better? What is the difference?
Ok, hopefully can help me out. I am trying to upload product pictures to my site and when I go to the consumer side I have no images. I believe I have the right info listed under v_products_images as =CONCATENATE("/images/zanders/part1";G2;".gif"). If you would like a sample of what I have please send me a private message with an email address and I will send you a test file.
Basically my model number and image name have the same number which is the G2.
Any help is greatly appreciated.
Thanks
Mark
So it sounds like you have good info on the screen (file path looks correct), but that the end result of importing the info to the database is that the cart can't "find" what it has identified in the database.
Have you looked at the exported file (using a text editor not your spreadsheet program) to identify that the data to be imported reflects what is expected? (Ie, not the concatenate function)?
No, still unresolved! Still hoping to buy someone some coffee! :D
Yes, a table appeared but it contained no data. The data I was trying to insert was new, not a replacement for existing data.
I don't think a value of zero was inserted because, right after posting, I decided to go thru and manually insert price breaks the hard way (using ZC admin functionality). No price break tables existed yet, despite the fact that an empty price break chart was showing up.
I went back thru and searched for trailing/leading spaces, found none. In fact, I searched the entire file, found no spaces anywhere.
Your question about new data applying to only "one" product is intriguing. I will poke around and see, but I'm fairly certain that the model numbers are unique, thus it should not have applied to the wrong prod.
This brings me to my one and only gripe about this mod. Why in the world does it tie everything to model number??? Makes zero sense to me, why not just use the system already in place, created naturally by ZC? If I abandon this mod, that will be the reason.
Even if we set aside the simple fact that two dif manufacturers might have the exact same model number, there are still plenty of logical reasons to *not* have unique model numbers. One of my websites sells parts for medical equipment. Some of those parts can fit on multiple machines. So one model number may have as many as 10 unique description pages, all with unique titles (Mod# 444 - 2" circular blade for cast saw; Mod# 444 - 2" circular blade for autopsy saw;) and unique –application specific– product information.
I would love to change the default controller from model to prod_id... is there a way to do that?
Okay, so to address first the original issue. When you went back to produce/modify the price break for the items that you had imported, was there or was there not data that related to what you imported?
Again, because I am not specifically familiar with price breaking, the next question would be if the table name convention for the table in your database equal the name expected by the mod?
As for model number issues, my thought on it if I were to start from scratch is this: what piece of information do I have control over that is not affected by the routines of ZenCart, typically wouldn't change, would be more likely to be unique and such that I can reuse the file regardless of the cart to which the file is being applied without increasing the data fields in the cart.
Model Number could be one of those; however, in your case, have many products that are the same thing (same model, but different descriptions which of course necessitates that you keep your list up-to-date as to how that product can be applied.)
The other issue though is that, if the product_id is used or even another attribute, you would need to have a way to differentiate between data for existing items and data to indicate a new item. (Ie, either the number for the product_id or a designation such as NEW, a negative number, or a value of zero to indicate that the item is to be added.
As for this mod, one thing Chadderuski has done is make the program relatively modifiable to add additional methods of exporting and importing data. Perhaps the hard part is understanding that there is a sequence of events necessary to make that happen, like to add attributes to a product, first or in parallel have to have a product and an attribute to apply, and then to apply the attribute. (Or maybe it is already encoded to do both actions in one, I haven't gotten into the meat of that part yet myself as I have/had been working on a stock by attributes direction.) He has also asked in times past for additional input on things desired, so I would think that your input would still be of benefit, but I know (and like myself) that he has some other priorities currently above this mod as it stands. A new update is in the works with clearer documentation, and from the sounds of it there is a major code change, so it may be difficult at the moment to incorporate a change immediately.
Back to the problem though, was also thinking what information was/is in the datafile that was sent on to EP4 for processing as it relates to your price break? Was there an equation, a value, etc.? And what I was referring to about a value of zero being provided is something like price is 1, price break is 1, thinking that 1-1=0 and therefore a value may not be displayed.
That's alright. Sorry, I tend to address things in the abstract until I have facts. Yes, the CSV file that is then uploaded to your cart to be imported. Did it contain the file path as you wanted it?
If so, the next thing would be to see if the file exists exactly where it is described exactly as written (capitalization, etc.)?
Also, I just took a look at one of my downloads from this program, the path I have for an image in the images folder is simply the name of the image. If I have a photo YYY.jpg in the images/XXX folder then all I had in the v_products_image column was XXX/YYY.jpg
So, I think part of your problem is having /images/ at the beginning of your image name.
This may be more evident if as is suggested by the code author that you add a product and other settings into ZenCart first, then download that information to use as a sort of template. Is very useful.
Thanks for this great Mod. I am currently working with the price break to update some products. In Zen Cart when creating a discount there's this option "Discount Qty Applies to Mixed Attributes" which allows for Yes or No. Unfortunately, I do not see in the file where to indicate that I want to applied discount to mixed attributes. Can someone guide me on how to achieve this task? I have a feeling it might have something to do with this "products_mixed_discount_quantity" from the products table but I do not see it in the file.
Thanks in advance.
I don't know if you do or plan to have any image handler mods or what permissions you have set in your .htaccess file, but from personal experience it is suggested that the extension for your files should all be lowercase. As stated to me, that's the standard to which files are named. I know that I have also discovered that for example, my cell phone typically sets the extension as uppercase and I have to rename the file before uploading (or of course could do so after uploading, but it's much easier to correct on the front end than the back end.)
Glad you figured it out though!!!
Actually, the default value is yes for "Discount Qty Applies to Mixed Attributes" is yes so simply uploading the default file (without modification) works. I wanted to make sure that the yes radio button is activated upon upload and it works. My issue is resolved without any code adjustment. Thanks!
I just integrated this into my Zen Cart and I'm only having one issue. My description is getting cut off after having set my configuration up to convert quotes. Here is the description that is getting cut off:
When I import this it is only getting as far as this: Convenient, self-adhesive Target Spots create instant##...Code:Convenient, self-adhesive Target Spots create instant##bulls eyes for all types of target practice! The##high-contrast, fluorescent red color lets you see a##sharper sight picture and bullet holes more clearly##for better scores and smaller groups. Try all sizes##for different distances and uses – rifle, shotgun,##handguns and even archery. All Target Spots##have a self-adhesive backing for easy use.
then it gets cut off. I can't figure out why it might be getting cut off, or what is causing it to be cut off. If someone could help out I would really appreciate it.
Also, is there a place in the code of the module I can change the code to look for certain tags and convert them if found?
I have multiple wholesalers and would eventually like to add all of them to my site. The problem is that some wholesalers may carry the same product but they may call it a a different model number. Is there an Easy Populate Header (ex. v_products_model) that I can use that would have 1 model set up for all wholesalers. Example 1 wholesaler has a Savage Model Number of 19220 and another has it listed as a straight 19220. Is it possible that I can upload both and it will add up available inventory of both wholesalers.
Hope this makes sense.
Thanks
Mark
Is there a way to make this work with Cross Sell?
I'm using Cross Sell Plus Advanced Sell Combo
Been pondering this for a few days. Curious, what happens if you were to add more text before the first ##? I hadn't found anything that considered ## to be an escape sequence. If it still imports only to that point then probably would want to change the ## to something else either before import or in the process of importing. I seem to recall that recently some discussion was had about how/where to code for replacement of characters. Also, be sure to review the csv that is used to import and verify that the text is not cut off in there when saving your csv. If the first suggested test results in being cutoff then there is a variable associated with that field that limits the length of text, if it is not cutoff then there is something that considers ## as an end of the text.