-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
djdavedawson
Thank you for the quick response.
I will start digging into the export for some ideas and to get a feel for how it's written.
As a related followup question, is there a simple way to change the "User Defined Products Fields" to use v_products_description instead of v_products ?
Thanks Again MC
~D
Clarification of "language", the prefix of v_, as used within Easy Populate, is associated with a field within a table. It appears though by context that the question is if the User Defined *Products* Fields can instead be User Defined *Products Description* Fields. So, the "direct" way would be to modify the use/assignment of the table to the User defined ($custom_fields) in both the export and import routines, though currently because the products_description table is language dependent such queries are done within a separate loop when a products_description related field is needed/used instead of pulling in all of the associated data when querying for product specific information. Would need to add a little more to the applicable section of code to actually make use of those custom fields (User defined) against the products_description.
So for example to support the export, the query related information to generate the "header" of the file is located in admin/includes/modules/easypopulate_4_filelayout.php, the custom_fields would still need to be included in $file_layout relatively as they currently are, though would need to be addressed as part of a language dependence and be further generated to support the language identifier. Hhowever, within the same file the custom_fields are assigned against the products table through code similar to below, such that in the full product export (if not most of the areas) look for this or something like it where the actual field data is pulled/identified:
Code:
if (count($custom_fields) > 0) { // User Defined Products Fields
foreach ($custom_fields as $field) {
if ($chosen_key != 'v_' . $field) {
$filelayout_sql .= 'p.'.$field.' as v_'.$field.',';
}
}
unset($field);
}
Basically, and without a truly deep dive the above code would need to be commented out because the associated fields would no longer be a part of the product table.
Then in the export file the additional field(s) would need to be addressed as part of the language loop(s). All of the fields from the products_description table are retrieved; however, not all are specifically used (but because they are available they could be tapped into somewhere at/around line 375 of admin/easypopulate_4_export.php within the foreach loop. doing something like this:
Code:
foreach ($custom_fields as $custom_field) {
$row['v_' . $custom_field . '_' . $lid2] = $row2[$custom_field];
}
This would then be processed such that the array key would be verified against the file_layout records and pushed to the export file... Then a similar reverse process would be needed for the import. But, "unfortunately" it is not as quick of a fix as I had originally considered, but it is still doable.
Hope that helps at least a little.
-
Re: EasyPopulate 4.0 Support Thread
Hi
Speaking of custom fields, do you think ti would be possible to also add some modifiers to priceqty file layout?
This file is quite good to manage import / export prices / stocks, specials, etc... as the name of the file suggests :)
But with a notifier, one could easily add some more or less fields to it.
Recently I had to do it, and making a new file layout for a couple of fields, would almost duplicate the same file operations, it 's not worth it. I think...maybe I'm wrong, because I have a huuuuuge filelayout for books that takes all the courage of making another one. Actually never try to make a simple one.
Anyway, a suggestion.
Best regards
-
Re: EasyPopulate 4.0 Support Thread
I maybe missing something but I keep doing something wrong. Using Easy Populate 4.0.28 with v1.5.4.
Download my database - open in Open Office spreadsheet take a few products and alter them - save as a csv to the file name given on the download with just these products - upload - import. Either get errors or get new duplicated files.
The question is do I have to save the whole database again with the same file reference (eg: Full-EP2018Apr13-113512.csv) or do I rename it to something else to import either the complete file or the few amended ones. What format do you rename it to also?
Sorry to be vague but I have read through the instructions so many times and I still can't manage it.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
stringplayer
I maybe missing something but I keep doing something wrong. Using Easy Populate 4.0.28 with v1.5.4.
Download my database - open in Open Office spreadsheet take a few products and alter them - save as a csv to the file name given on the download with just these products - upload - import. Either get errors or get new duplicated files.
The question is do I have to save the whole database again with the same file reference (eg: Full-EP2018Apr13-113512.csv) or do I rename it to something else to import either the complete file or the few amended ones. What format do you rename it to also?
Sorry to be vague but I have read through the instructions so many times and I still can't manage it.
The "important" part of the filename is everything up to and including the letters EP. Anything after that is up to you. (extension needs to be .csv)
The first part of the filename let's EP4 know what types of fields to expect so that it can process properly.
Don't recall the full feature availability of 4.0.28 with the current version being 4.0.36, but the process is basically logic based. The field list basically needs a single anchor point (primary key) and one column of data to be modified. Every row of data is attempted to be processed from top to bottom.
Your edited data file should look very similar in format to the original saved file if you were to look at each with a plain text editor. Be sure to follow the Open Office or Libre instructions to save as/export the file in UTF8 csv format.
-
Re: EasyPopulate 4.0 Support Thread
Hi again
Thanks very much. I am now getting the hang of it. Just a few more questions.
How do I mark a product on the spreadsheet to delete before importing.
How do I mark a product status to off on the spreadsheet before importing.
If I rearrange the lines of the spreadsheet order of the products does it make any difference when importing (keeping the product on the original lines).
When putting a new product onto the spreadsheet is there anything that has to be done such as the index number etc or does it make its own when imported.
I think that will be it once I have these answers. Much appreciated.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
The "important" part of the filename is everything up to and including the letters EP. Anything after that is up to you. (extension needs to be .csv)
The first part of the filename let's EP4 know what types of fields to expect so that it can process properly.
Don't recall the full feature availability of 4.0.28 with the current version being 4.0.36, but the process is basically logic based. The field list basically needs a single anchor point (primary key) and one column of data to be modified. Every row of data is attempted to be processed from top to bottom.
Your edited data file should look very similar in format to the original saved file if you were to look at each with a plain text editor. Be sure to follow the Open Office or Libre instructions to save as/export the file in UTF8 csv format.
Bolded text should answer the question about sequencing.
Quote:
Originally Posted by
stringplayer
Hi again
Thanks very much. I am now getting the hang of it. Just a few more questions.
How do I mark a product on the spreadsheet to delete before importing.
How do I mark a product status to off on the spreadsheet before importing.
If I rearrange the lines of the spreadsheet order of the products does it make any difference when importing (keeping the product on the original lines).
When putting a new product onto the spreadsheet is there anything that has to be done such as the index number etc or does it make its own when imported.
I think that will be it once I have these answers. Much appreciated.
May I suggest searching the readme.txt file for two different words: the first delete (identifies how to completely delete a product), the second disable (identifies how to disable a product though this also would be easier seen/understood if an export of the database was performed, a product disabled and the export again performed to see what changed and how.)
As adding a product, it still somewhat depends on whether you've upgraded or not, but the primary key (anchor field) basically determines what to do... the historical method of using EP was to use the model field. Each product to have its own model, no 2 products to have the same model. If two products have the same model, then when importing, they would both get updated which could/would cause some undesired issues depending on how much data (number of fields) was updated.
Now as far as deleting. Are you sure you really want to delete the product? Unless you are using the products_id as a primary key, then deleting the product followed by importing a new product (with the same information) will cause a new products_id to be created which is quite literally a new product even if it is called the same thing as before, weighs the same, is described the same, etc...
-
Re: EasyPopulate 4.0 Support Thread
1.5.5f fresh install with Easy Populate 4.0.37.6 - 02-08-2017
The import button is showing import error instead of the import button.
What could be the cause and fix?
-
Re: EasyPopulate 4.0 Support Thread
In the meantime I rolled back to an older Easy populate version and it works.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wtfbbq
1.5.5f fresh install with Easy Populate 4.0.37.6 - 02-08-2017
The import button is showing import error instead of the import button.
What could be the cause and fix?
The reported/expected cause is that the delimiter between fields was either inconsistent or non-matching for the review of the file. There are/were some database updates incorporated into that version that would need to be executed (top right corner would have offered an update option from a previous version).
Would need to know that the database was updated and then would recommend presenting the first few lines of the csv file to further identify the issue.
-
Re: EasyPopulate 4.0 Support Thread
Almost there. When I enter a jpg from images folder under v_products_image (such as e120.jpg) it does not show. What am I missing.
Thank very much.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
stringplayer
Almost there. When I enter a jpg from images folder under v_products_image (such as e120.jpg) it does not show. What am I missing.
Thank very much.
e120.jpg would need to exist in the 'IMAGES' directory at the base of the directory: images/e120.jpg. If it does not exist, then the image would not be displayed. Verify from the store front (when viewing the related product) about what the path to the image is and also verify within your ftp program that the image has been stored in the images directory not images/images or images/some-folder...
The information that is to go into the v_products_image field is related to the path of the image based on where it is stored in the images folder. Another idea, which is always helpful, is to export one or more products and then look at the format of the information captured in the file to reproduce it in your csv file.
-
Re: EasyPopulate 4.0 Support Thread
Is there a newer version? I pulled the zip from the first post at github.
Database was updated. I compared a blank generated csv from the fresh install to another csv generated from another older cart version. Nothing was different on the columns.
Quote:
Originally Posted by
mc12345678
The reported/expected cause is that the delimiter between fields was either inconsistent or non-matching for the review of the file. There are/were some database updates incorporated into that version that would need to be executed (top right corner would have offered an update option from a previous version).
Would need to know that the database was updated and then would recommend presenting the first few lines of the csv file to further identify the issue.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wtfbbq
Is there a newer version? I pulled the zip from the first post at github.
Database was updated. I compared a blank generated csv from the fresh install to another csv generated from another older cart version. Nothing was different on the columns.
There is one that is still in some development found at https://github.com/mc12345678/Easypopulate-4.0 that has added a few features including export of the file to exclude duplicate model numbers/product_id (won't export linked product), auto-detects the field delimiter in the import file, and a few other things.
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Zen Cart Version: 1.5.5e
Easy Populate 4.0.36.ZC - 07-05-2016
PHP Version: 5.6.30 (Zend: 2.6.0)
When attempting to import products using an Excel CSV file, I get this error:
"ERROR: Import file does not exist:"
I can see the file in my temp folder, so I know it's there.
Any suggestions?
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
fcutler4
Zen Cart Version: 1.5.5e
Easy Populate 4.0.36.ZC - 07-05-2016
PHP Version: 5.6.30 (Zend: 2.6.0)
When attempting to import products using an Excel CSV file, I get this error:
"ERROR: Import file does not exist:"
I can see the file in my temp folder, so I know it's there.
Any suggestions?
Couple of things, is this an upgraded version from a previous use? (if so was the update link on the right side of the screen used?)
When reviewing the configuration settings for Easy Populate V4, what are the settings for the folder location of the file(s)? (Ie. admin or catalog and then folder name?)
(If set for admin, then the file is sought: DIR_FS_ADMIN . $tempdir . $file['name']
if set for catalog, then here: DIR_FS_CATALOG . $tempdir . $file['name'];
Where $tempdir is EASYPOPULATE_4_CONFIG_TEMP_DIR (which is in the configuration section) and $file['name'] is the name of the file as it was posted (potentially sanitized) from the main page, so the filename could be/have been altered which would also result in the file "not being found". (ie. what is the filename?)
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Thanks for the quick response. I really appreciate that!
In answer to the upgrade question, yes it was upgraded, along with an upgrade to the latest zen version, and we moved to a new URL, shop.killerbeehobby.com. This was done for me by someone else, so I don't know if they used the upgrade button.
The configuration setting is-- Upload Directory: admin/easypopulate4/
Where would I find the EP folder to examine the DIR_FS_ADMIN and DIR_FS_CATALOG? Looked around in C Panel and couldn't find them.
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
fcutler4
Thanks for the quick response. I really appreciate that!
In answer to the upgrade question, yes it was upgraded, along with an upgrade to the latest zen version, and we moved to a new URL, shop.killerbeehobby.com. This was done for me by someone else, so I don't know if they used the upgrade button.
The configuration setting is-- Upload Directory: admin/easypopulate4/
Where would I find the EP folder to examine the DIR_FS_ADMIN and DIR_FS_CATALOG? Looked around in C Panel and couldn't find them.
So, DIR_FS_ADMIN and DIR_FS_CATALOG would be found in YOUR_ADMIN/includes/configure.php. The actual admin directory is no longer expected to remain in the EP4 configuration information. This was a change from earlier versions so that the admin directory would not be stored in the database (isn't in any default ZC install).
If your temp directory is actually in the admin directory, then in the configuration section, should see;
Uploads Directory Admin/Catalog: true
Uploads Directory: easypopulate4/
Or, when attempting to set the uploads directory again, if the prefix admin/ represents your actual admin directory's name, then it should get removed from the entry as part of the coding to save the path.
-
2 Attachment(s)
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Thanks again for the quick response.
As for the configuration settings, I don't see the "Uploads Directory Admin/Catalog: true" anywhere.
Here are some screenshots:
Attachment 17894
Attachment 17895
Here is what I found in the configure.php:
/**
* NOTE about DIR_FS_ADMIN
* The value for DIR_FS_ADMIN is now auto-detected.
* In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
*/
AND
define('DIR_FS_CATALOG', '/home2/z8c4y4q3/shop.killerbeehobby.com/');
Where would I find EASYPOPULATE_4_CONFIG_TEMP_DIR?
Thanks again!
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Suggestion would be to select the un-install EP4 link in the top right. This will clear the settings in the configuration menu for EP4, then select the install option that will appear and again set the temporary directory to easypopulate4/
It looks like somehow the upgrade operations were not executed to update the configuration menu which would have also placed EASYPOPULATE_4_CONFIG_TEMP_DIR in the database as one of the configuration options described.
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
fcutler4
Thanks again for the quick response.
As for the configuration settings, I don't see the "Uploads Directory Admin/Catalog: true" anywhere.
Here are some screenshots:
Attachment 17894
Attachment 17895
Here is what I found in the configure.php:
/**
* NOTE about DIR_FS_ADMIN
* The value for DIR_FS_ADMIN is now auto-detected.
* In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
*/
AND
define('DIR_FS_CATALOG', '/home2/z8c4y4q3/shop.killerbeehobby.com/');
Where would I find EASYPOPULATE_4_CONFIG_TEMP_DIR?
Thanks again!
Ok, in the Configuration "Easy Populate 4"
Upload Directory should be "temp/"
Upload Directory Admin/Catalog should be set to "true"
Easy Populate Screen should say
Upload Directory: admin/temp/
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
mc12345678
Suggestion would be to select the un-install EP4 link in the top right. This will clear the settings in the configuration menu for EP4, then select the install option that will appear and again set the temporary directory to easypopulate4/
It looks like somehow the upgrade operations were not executed to update the configuration menu which would have also placed EASYPOPULATE_4_CONFIG_TEMP_DIR in the database as one of the configuration options described.
The result of this should change the contents shown in the first image above to include Uploads Directory Admin/Catalog and options available of true or false.
If not, then the admin/includes/functions/extra_functions file from the fileset has not been updated to the version included in the fileset. At which point that file (and any others that were not updated/uploaded) would need to be uploaded and the un-install/install process performed again.
As wmorris pointed out, there are three pieces of information being looked at. 2 are to be found by navigating to the admin->configuration->Easy Populate V4 (first picture), the other 1 is found on the Easy Populate V4 menu screen found at admin->Tools->Easy Populate V4 right side of the screen (shown in second picture).
-
2 Attachment(s)
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Thank you again mc12345678 and wmorris.
It appears you were correct in surmising that the EASYPOPULATE_4_CONFIG_TEMP_DIR is missing.
See the screenshots that I took after using the "un-install EP4" button:
Attachment 17901
Attachment 17902
I'll do as you suggest, add the file, and redo the un-install and re-install.
Where should the file be inserted, just to make sure I put it in the correct place?
Thanks again. I'm looking forward to using this great add-on once again. It's such an awesome tool!
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
fcutler4
Thank you again mc12345678 and wmorris.
It appears you were correct in surmising that the EASYPOPULATE_4_CONFIG_TEMP_DIR is missing.
See the screenshots that I took after using the "un-install EP4" button:
Attachment 17901
Attachment 17902
I'll do as you suggest, add the file, and redo the un-install and re-install.
Where should the file be inserted, just to make sure I put it in the correct place?
Thanks again. I'm looking forward to using this great add-on once again. It's such an awesome tool!
The files from the download are arranged to go to the correct location if copied as a group from the source to your store. All files and folders in the admin directory of the download are to go into the admin directory of your site. Copying them over in that way (instead of one file at a time) minimizes the potential of misplacement or other issues.
That said, the above screen shot is expected if have only done the uninstall (as what was described above). There should be a link available to install (seen in second image) which should also change what is/was seen in the image (if the files are up-to-date).
-
4 Attachment(s)
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
OK, here's what I've done, but I'm still getting the same error.
1. Hit Un-Install EP4 button
2. Downloaded latest version of EP4 from the zen cart link. Loaded all files via Filezilla to my store directory following the correct file structure. Double checked it to ensure everything was in the correct place.
3. Refreshed the Zen Cart Easy Populate page.
4. Hit Install EP 4. The following screen shots show the EP4 configuration settings. Uploads Directory Admin/Catalog shows "true," and uploads directory is "temp/." As you recall, the Uploads Directory Admin/Catalog line was not showing up before, but now it is.
Attachment 17904
Attachment 17905
5. Uploaded a CVS File. A red warning came across the top of the screen saying, "File uploaded successfully: import today 6.3.2018.cvs. Import file to database or see below for more."
6. Hit "Import" There was a green bar across the top of the screen stating "File Import Completed."
7. In spite of all of that, however, there was an error at the bottom of the screen, so I'm still getting the same "Import file does not exist"error.
What am I missing? If there is any other screenshot you need to help me troubleshoot, please let me know.
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Here are a couple more screen shots.
Attachment 17908Attachment 17909
-
Re: EasyPopulate 4.0 Support Thread
Have you tried a file that doesn't have a space in the filename?
-
1 Attachment(s)
Re: EasyPopulate 4.0 Support Thread
Thank you, mc12345678! Trying the import with a filename without spaces worked!
Attachment 17910
Greatly appreciate all you have done to help me through this!
Best wishes!
Frank
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
fcutler4
Thank you, mc12345678! Trying the import with a filename without spaces worked!
Attachment 17910
Greatly appreciate all you have done to help me through this!
Best wishes!
Frank
Welcome. Remember if wanting to use an import "rule" other than what is done for importing "all" product, that the filename actually is part of the process...
-
Re: EasyPopulate 4.0 Support Thread
I'm getting a MySQL error where categories are not being properly created. The products are being imported.
The error at the top says "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"
-- what's the best way to get the error file to the right person?
I've downloaded the latest version from GitHub & am running ZC 1.5.5.e.
I saw the post about the filename having spaces - my file upload doesn't have spaces.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
DesignByKiltz
I'm getting a MySQL error where categories are not being properly created. The products are being imported.
The error at the top says "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"
-- what's the best way to get the error file to the right person?
I've downloaded the latest version from GitHub & am running ZC 1.5.5.e.
I saw the post about the filename having spaces - my file upload doesn't have spaces.
PM sent, though there is some code that has been pushed to the development related github repository at: https://github.com/mc12345678/EasyPo...517c76b5163500
This should resolve the sql error that is reported.
-
Re: EasyPopulate 4.0 Support Thread
Hi Zenners,
How can I use a Cron job to auto import a daily uploaded CSV file using easy populate 4 in Zen Cart 1.5.5f ?
Thanks in advance,
Cyd
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Any suggestions would be greatly appreciated.
Running (Easy Populate 4.0.22 - Beta 6-10-2012) for 4 years now without any glitches.
The first thing you are going to say is "Upgrade" but that's no an option on this installation.
I am creating a new Upgraded site next month ZC 1.5.5f which works fine with "php 7.2 & Database Maria DB 10.2" but I really need for this current installation to work thru September.
Extensively researched this in the ZC forums and Googled. The only hint I got was maybe strict mode was being enforced.
HISTORY:
1:
Running (Easy Populate 4.0.22 - Beta 6-10-2012) for 4 years now without any glitches.
2:
Upgraded to PHP 5.6 and Database Maria DB 10.2 (I'm told same as MySQL 5.7) engines.
3:
Began experiencing a glitch including this EP4 issue.
Enabling site wide SSL fixed the other glitch.
4:
I export all products with EP4 and then never touching the csv file immediately import it
5:
Don't understand why I get the "Tabs" warning which I never got before and then the SQL error which I never got before. (see step 7)
6:
Was hoping for a work around..... Like maybe just delete that field from the code?
Is the "products_tax_class_id" mapped to the "v_tax_class_title" column?
7:
ERROR MESSAGES:
Warning File Import Completed with issues. (NOTE: Does not complete because of SQL error)
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
(You are presently using: v1.5.1) (PHP version 5.6)
++++++++++++++++++++++++++++++++++++++
MySQL error 1366: Incorrect integer value: '' for column 'products_tax_class_id' at row 1
When executing:
UPDATE products SET
products_price = '2.8',products_image = 'K3202.jpg',
products_weight = '0',
products_discount_type = '0',
products_discount_type_from = '0',
product_is_call = '0',
products_sort_order = '0',
products_quantity_order_min = '12',
products_quantity_order_units = '12',
products_priced_by_attribute = '0',
product_is_always_free_shipping = '0',
products_tax_class_id = '',
products_date_available = NULL,
products_date_added = '2016-02-03 00:00:00',
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = '88822',
manufacturers_id = '0',
products_status = '1',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = '0' WHERE (products_id = '3401')
++++++++++++++++++++++++++++++++++++
EXPORTED FILE: Full-EP2018Aug13-041014.csv
v_products_model v_products_type v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_specials_price v_specials_date_avail v_specials_expires_date
v_products_price v_products_weight v_product_is_call v_products_sort_order v_products_quantity_order_min v_products_quantity_order_units v_products_priced_by_attribute
v_product_is_always_free_shipping v_date_avail v_date_added v_products_quantity v_manufacturers_name v_categories_name_1 v_tax_class_title v_status
1100 1 01101.jpg 1101 MAGNET 2 0 0 1 12 12 0 0 1/1/2014 22:22 0 Magnets --none-- 1
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
linuxguy2
Any suggestions would be greatly appreciated.
Running (Easy Populate 4.0.22 - Beta 6-10-2012) for 4 years now without any glitches.
The first thing you are going to say is "Upgrade" but that's no an option on this installation.
I am creating a new Upgraded site next month ZC 1.5.5f which works fine with "php 7.2 & Database Maria DB 10.2" but I really need for this current installation to work thru September.
Extensively researched this in the ZC forums and Googled. The only hint I got was maybe strict mode was being enforced.
HISTORY:
1:
Running (Easy Populate 4.0.22 - Beta 6-10-2012) for 4 years now without any glitches.
2:
Upgraded to PHP 5.6 and Database Maria DB 10.2 (I'm told same as MySQL 5.7) engines.
3:
Began experiencing a glitch including this EP4 issue.
Enabling site wide SSL fixed the other glitch.
4:
I export all products with EP4 and then never touching the csv file immediately import it
5:
Don't understand why I get the "Tabs" warning which I never got before and then the SQL error which I never got before. (see step 7)
6:
Was hoping for a work around..... Like maybe just delete that field from the code?
Is the "products_tax_class_id" mapped to the "v_tax_class_title" column?
7:
ERROR MESSAGES:
Warning File Import Completed with issues. (NOTE: Does not complete because of SQL error)
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
(You are presently using: v1.5.1) (PHP version 5.6)
++++++++++++++++++++++++++++++++++++++
MySQL error 1366: Incorrect integer value: '' for column 'products_tax_class_id' at row 1
When executing:
UPDATE products SET
products_price = '2.8',products_image = 'K3202.jpg',
products_weight = '0',
products_discount_type = '0',
products_discount_type_from = '0',
product_is_call = '0',
products_sort_order = '0',
products_quantity_order_min = '12',
products_quantity_order_units = '12',
products_priced_by_attribute = '0',
product_is_always_free_shipping = '0',
products_tax_class_id = '',
products_date_available = NULL,
products_date_added = '2016-02-03 00:00:00',
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = '88822',
manufacturers_id = '0',
products_status = '1',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = '0' WHERE (products_id = '3401')
++++++++++++++++++++++++++++++++++++
EXPORTED FILE: Full-EP2018Aug13-041014.csv
v_products_model v_products_type v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_specials_price v_specials_date_avail v_specials_expires_date
v_products_price v_products_weight v_product_is_call v_products_sort_order v_products_quantity_order_min v_products_quantity_order_units v_products_priced_by_attribute
v_product_is_always_free_shipping v_date_avail v_date_added v_products_quantity v_manufacturers_name v_categories_name_1 v_tax_class_title v_status
1100 1 01101.jpg 1101 MAGNET 2 0 0 1 12 12 0 0 1/1/2014 22:22 0 Magnets --none-- 1
Ummm, not sure which upgrade is considered to not be "possible", but that is one of the reasons that upgrades were performed to the EP4 software.
With the more recent support software, things like providing an empty quote when a number is expected no longer are considered acceptable practice.
Further, performing the upgrade of EP4 is relatively easy: upload new files, access the EP4 admin screen, select the update option on the top right corner. If there becomes a time to return to a previous version (not recommended) then selecting the uninstall in the upper right corner, followed by removal of the EP4 files and reinstall of the old files with reinstall would put things back to how they are/were.
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
To answer at least one of the questions:
Quote:
Is the "products_tax_class_id" mapped to the "v_tax_class_title" column?
If the v_tax_class_title is provided, then the associated tax_class_id is pulled from ZC using the EP4 function: ep_4_get_tax_title_class_id. But, the reason that an issue is being seen is that the 0 or empty quotes from the export is not converted to an integer on import. So, if wanted to try to "patch" the software instead of using an up-to-date version, could cast that and any other data expected to be an integer (ie. Those typically ending with _id). So instead of the inline
Code:
='" . $v_tax_class_id ."'
Could instead use:
Code:
='" . (int)$v_tax_class_id ."'
Though, even then the single quote wouldn't be necessary because the content to be stored is a number not a string, so would use:
Code:
=" . (int)$v_tax_class_id ."
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
mc12345678
To answer at least one of the questions:
If the v_tax_class_title is provided, then the associated tax_class_id is pulled from ZC using the EP4 function: ep_4_get_tax_title_class_id. But, the reason that an issue is being seen is that the 0 or empty quotes from the export is not converted to an integer on import. So, if wanted to try to "patch" the software instead of using an up-to-date version, could cast that and any other data expected to be an integer (ie. Those typically ending with _id). So instead of the inline
Code:
='" . $v_tax_class_id ."'
Could instead use:
Code:
='" . (int)$v_tax_class_id ."'
Though, even then the single quote wouldn't be necessary because the content to be stored is a number not a string, so would use:
Code:
=" . (int)$v_tax_class_id ."
I had previously setup the tax options but hadn't been using it when entering products.
If I change the "--none--" to "Taxable Goods" EP4 works as advertised.
I'll need to test and see it that steps on anything in the rest of the ordering process.
THANKS for pointing me in the right direction.
I got so used to leaving that field set to "--none--" I did not see the trees for the forest. :blush:
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Hi, A lot rusty on all fronts. Just installed Easypopulate 4 on v1.5.1 . On trying to run from Tools/Easy Populate 4 I get "This page isn’t working
blah blah is currently unable to handle this request.
HTTP ERROR 500"
Anyone have any ideas what might be happening. Have created a /temp in the admin area. Cheers
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
Gippo
Hi, A lot rusty on all fronts. Just installed Easypopulate 4 on v1.5.1 . On trying to run from Tools/Easy Populate 4 I get "This page isn’t working
blah blah is currently unable to handle this request.
HTTP ERROR 500"
Anyone have any ideas what might be happening. Have created a /temp in the admin area. Cheers
Error log in the logs directory? (format of: myDebug-xxx) note that the log may contain admin directory information so if posted, recommend obscuring.)
-
Re: EasyPopulate 4.0 Support Thread | ERROR: Import file does not exist:
Quote:
Originally Posted by
mc12345678
Error log in the logs directory? (format of: myDebug-xxx) note that the log may contain admin directory information so if posted, recommend obscuring.)
If there is nothing interesting in the ZC logs folder you might check the system logs folder in root. i.e. /
In my experiences with EP4 if the temp directory isn't correct it will throw a warning that no temp folder is available.
In addition to the logs can you post a screen shot of the screen that fails?
Do all the other Admin functions still work? If so carefully go back through your EP4 installation. Probably just a misstep.
Also what version of PHP is running.
-
Re: EasyPopulate 4.0 Support Thread
Today products_sort_order failed with:
Stock Zen Cart 1.55f installed Easy Populate v4 on Linux with SQL 5.7 and php 7.1
Error:
MySQLi error 1366: Incorrect integer value: '' for column 'products_sort_order' at row 1
When executing:
INSERT INTO zen_products SET
...
product_is_call = 0,
products_sort_order = '',
products_quantity_order_min = 0,
...
Found in:
admin/easypopulate_4_import.php
Line 1039 and again 1190
$query = $db->bindVars($query, ':products_sort_order:', $v_products_sort_order, 'string');
And the fix:
$query = $db->bindVars($query, ':products_sort_order:', $v_products_sort_order, 'integer');
- Be sure to correct both lines/instances.
Also:
products_sort_order in the db table is already set for int(11) NULL - NoDefault - 0
-
Re: EasyPopulate 4.0 Support Thread
Hi
Maybe this as been answered hundreds of time, but by search it's not easy to find.
I've started working in a different way. Now the a lot products are already online in a "general" category.
So, I'll be updating and not inserting.
This process will create a linked category. Is there a way around it ?
Thanks
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
Hi
Maybe this as been answered hundreds of time, but by search it's not easy to find.
I've started working in a different way. Now the a lot products are already online in a "general" category.
So, I'll be updating and not inserting.
This process will create a linked category. Is there a way around it ?
Thanks
Yes and no. Can't recall someone indicating that just because they "updated" the record(s) (submitted the same file exported as an import where each record has a unique primary key) that the product became linked.
So, here's how a linked product can be generated when using just EP4 (I can't at the moment speak for the bookx addition you've made) when reviewing the import file:
If a record has a primary key that matches an existing primary key in the database but the category is different, a linked product will be created/updated.
Note, if at import the database doesn't contain the associated primary key, but the file has two entries in it where each has a different category, then when the second record is encountered, that second record will cause the product to be linked to the new category and all associated data will be updated to match the most recent occurrence.
That's really all that will create a linked product.
So to avoid generating linked product, always use a unique primary key for each individual product. EP4 has two types of primary key available with the possibility to code additional: products_model and products_id.
To remove linked product, I suggest rereading the instructions, but by setting a row's status to 7, then the category identified on that row will become the master_categories_id. The current master_categories_id will be unlinked from the product. If there are multiple linked categories for a single product then it may be advisable to use this process for all records and then to "add" those desired to be linked after the linkages have been reduced down to a single master_categories_id. There are a number of ways to work through this situation, but that particular method would resolve the situation for all cases.
If you are getting linked product on import, either the primary_key data already exists or is duplicated in the import or there is something wrong with the bookx addition.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
To remove linked product, I suggest rereading the instructions, but by setting a row's status to 7
Wonderful!
Status 7 works perfectly!
Thanks!
-
Re: EasyPopulate 4.0 Support Thread
zencart 156
php 7.3
EasyPopulate V4
When clicking on easy populate in the admin i get an an error. If someone could assist me or lead me in the right direction i would appreciate it.
[17-Dec-2018 19:27:53 Europe/Berlin] Request URI: /xxxxxx.com/power/easypopulate_4.php, IP address: ::1
#1 sizeof() called at [C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php:655]
[17-Dec-2018 19:27:53 Europe/Berlin] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php on line 655
[17-Dec-2018 19:27:53 Europe/Berlin] Request URI: /xxxxxx.com/power/easypopulate_4.php, IP address: ::1
#1 sizeof() called at [C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php:661]
[17-Dec-2018 19:27:53 Europe/Berlin] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php on line 661
Code:
$file_count = 0;
//Display the information needed to start use of a filetype.
(line 655) $plural_state = "<strong>" . (sizeof($val) > 1 ? EP_DESC_PLURAL : EP_DESC_SING) . "</strong>";
if (EP4_SHOW_ALL_FILETYPES != 'Hidden') {
echo "<tr><td colspan=\"8\">" . sprintf($filenames_merged[$key], "<strong>" . $key . "</strong>", $plural_state) . "</td></tr>";
echo "<tr><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_FILENAME . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_SIZE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DATE_TIME . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_TYPE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_SPLIT . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_IMPORT . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DELETE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DOWNLOAD . "</th>\n";
}
(line 661) for ($i = 0; $i < sizeof($val); $i++) {
if (EP4_SHOW_ALL_FILETYPES != 'Hidden' || (EP4_SHOW_ALL_FILETYPES == 'Hidden' && ($files[$i] != ".") && ($files[$i] != "..") && preg_match("/\.(sql|gz|csv|txt|log)$/i", $files[$i]) )) {
$file_count++;
echo '<tr><td>' . $files[$val[$i]] . '</td>
<td align="right">' . filesize($upload_dir . $files[$val[$i]]) . '</td>
<td align="center">' . date("Y-m-d H:i:s", filemtime($upload_dir . $files[$val[$i]])) . '</td>';
$ext = strtolower(end(explode('.', $files[$val[$i]])));
// file type
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chadlly2003
zencart 156
php 7.3
EasyPopulate V4
When clicking on easy populate in the admin i get an an error. If someone could assist me or lead me in the right direction i would appreciate it.
[17-Dec-2018 19:27:53 Europe/Berlin] Request URI: /xxxxxx.com/power/easypopulate_4.php, IP address: ::1
#1 sizeof() called at [C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php:655]
[17-Dec-2018 19:27:53 Europe/Berlin] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php on line 655
[17-Dec-2018 19:27:53 Europe/Berlin] Request URI: /xxxxxx.com/power/easypopulate_4.php, IP address: ::1
#1 sizeof() called at [C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php:661]
[17-Dec-2018 19:27:53 Europe/Berlin] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\xxxxxx.com\power\easypopulate_4.php on line 661
Code:
$file_count = 0;
//Display the information needed to start use of a filetype.
(line 655) $plural_state = "<strong>" . (sizeof($val) > 1 ? EP_DESC_PLURAL : EP_DESC_SING) . "</strong>";
if (EP4_SHOW_ALL_FILETYPES != 'Hidden') {
echo "<tr><td colspan=\"8\">" . sprintf($filenames_merged[$key], "<strong>" . $key . "</strong>", $plural_state) . "</td></tr>";
echo "<tr><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_FILENAME . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_SIZE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DATE_TIME . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_TYPE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_SPLIT . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_IMPORT . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DELETE . "</th><th>" . EASYPOPULATE_4_DISPLAY_EXPORT_TABLE_TITLE_DOWNLOAD . "</th>\n";
}
(line 661) for ($i = 0; $i < sizeof($val); $i++) {
if (EP4_SHOW_ALL_FILETYPES != 'Hidden' || (EP4_SHOW_ALL_FILETYPES == 'Hidden' && ($files[$i] != ".") && ($files[$i] != "..") && preg_match("/\.(sql|gz|csv|txt|log)$/i", $files[$i]) )) {
$file_count++;
echo '<tr><td>' . $files[$val[$i]] . '</td>
<td align="right">' . filesize($upload_dir . $files[$val[$i]]) . '</td>
<td align="center">' . date("Y-m-d H:i:s", filemtime($upload_dir . $files[$val[$i]])) . '</td>';
$ext = strtolower(end(explode('.', $files[$val[$i]])));
// file type
Don't know what version is being used or what changes have been made, but:
Go up a few lines before 655 to this code which is just after the start of the foreach loop:
Code:
(EP4_SHOW_ALL_FILETYPES != 'false' ? $val = $filetypes[$key] : '');
and change it to
Code:
(EP4_SHOW_ALL_FILETYPES != 'false' ? $val = ((isset($filetypes[$key]) || array_key_exists($key, $filetypes)) ? $filetypes[$key] : array()) : '');
-
Re: EasyPopulate 4.0 Support Thread
Can someone post a correct CSV file for category import with multi level categories?
I did a simple 1 main 3 sub cat creation within admin and then export. There was nothing for parent_id. Created my new file and imported but it does not assign parent id.
Only thing I could find on subject was the readme file on Github but it was unclear
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
FlipC
Can someone post a correct CSV file for category import with multi level categories?
I did a simple 1 main 3 sub cat creation within admin and then export. There was nothing for parent_id. Created my new file and imported but it does not assign parent id.
Only thing I could find on subject was the readme file on Github but it was unclear
Are you sure you're posting to the correct forum thread? The parent_id is not included in the export of the category information, neither the meta nor the model/category file(s).
Category assignment (generation of a category) is done through the product assignment. The details about the category are handled through either of the two other catefory files.
The format for a category designation using this plugin is to use the carat (^) between each category starting at the top of the tree such that if say there were women's shoes as compared to men's shoes, with shoes being a main category off of the store, then the categories field would have shoes^men\'s for shoes that are to be assigned as men's shoes, and shoes^women\'s for shoes to be assigned as women's shoes.
The code will determine the parent id for each category based on finding the category or identifying the need to create it. At the last category in the path, the product is to be assigned to that last category when the product is first created. If it already exists then it is linked to that category, basically.
-
1 Attachment(s)
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Are you sure you're posting to the correct forum thread? The parent_id is not included in the export of the category information, neither the meta nor the model/category file(s).
Category assignment (generation of a category) is done through the product assignment. The details about the category are handled through either of the two other catefory files.
The format for a category designation using this plugin is to use the carat (^) between each category starting at the top of the tree such that if say there were women's shoes as compared to men's shoes, with shoes being a main category off of the store, then the categories field would have shoes^men\'s for shoes that are to be assigned as men's shoes, and shoes^women\'s for shoes to be assigned as women's shoes.
The code will determine the parent id for each category based on finding the category or identifying the need to create it. At the last category in the path, the product is to be assigned to that last category when the product is first created. If it already exists then it is linked to that category, basically.
This may be redundant but when I first started using EP4 I too struggled with importing "Categories" and a csv file Download/Upload that allowed for entering new Category ID's. IMHO the documentation is a bit vague on this for some of us.
As MC pointed out it can be done thru a Full-EP2018Dec20-230629.csv file.
Just create a new product with a new category and a new category with ID will be created.
I don't use sub categories but the readme says to use the carat (^) to add those.
The README.txt file ( included in attachment) in the zEasyPopulate-4.master-ZC.zip plugin download (section 3) spells that out.
The attached file would create a new Category called "Prod 001". The system will assign a new Category ID.
Be mindful of the settings in the Admin area ( Layout Settings > Categories with 0 Products Status ).
See these two files in the attached zip.
Hope this helps a bit.
-
Re: EasyPopulate 4.0 Support Thread
Hi all
I have just loaded a new v156 with ep4
It is the same EP4 I have on my current site which has v155d
The new install doesn't want to accept my old files for uploading products - is it because v156 is using DB Collation: utf8mb4 and the older v155d is using DB Collation: utf8?
All my other settings are exactly the same
Thx
Russel
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
Hi all
I have just loaded a new v156 with ep4
It is the same EP4 I have on my current site which has v155d
The new install doesn't want to accept my old files for uploading products - is it because v156 is using DB Collation: utf8mb4 and the older v155d is using DB Collation: utf8?
All my other settings are exactly the same
Thx
Russel
Possibly, what message(s) are received? Certainly an interesting possible issue. Definitely want to be able to take advantage of the extended character set.
Now something interestingly said was same EP4 version on both sites, please elaborate.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Possibly, what message(s) are received? Certainly an interesting possible issue. Definitely want to be able to take advantage of the extended character set.
Now something interestingly said was same EP4 version on both sites, please elaborate.
I just downloaded from ZC 1.5.5f and imported into ZC 1.5.6 with EasyPopulate-4.master-ZC from the Plugin's page.
On occasion clicking "import" from the red banner immediately after uploading the product file doesn't always work for me.
Using "import" from the form has always worked for me.
Double check the name of the file you are importing for spaces and characters like %$ etc..
-
Re: EasyPopulate 4.0 Support Thread
Hi
I usually upload the CSV via FileZilla and then go into EP4 and use import
First couple of lines of error code is :
"MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2329,
language_id = 1,
categories_name = 'Desktop Components'
MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2330,
language_id = 1,
categories_name = 'Graphics & Video Cards'
MySQLi error 1366: Incorrect integer value: '' for column 'products_sort_order' at row 1
When executing:
INSERT INTO zen49_products SET
products_model = 'mAF710-2048D3LD4',"
Russel
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
Hi
I usually upload the CSV via FileZilla and then go into EP4 and use import
First couple of lines of error code is :
"MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2329,
language_id = 1,
categories_name = 'Desktop Components'
MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2330,
language_id = 1,
categories_name = 'Graphics & Video Cards'
MySQLi error 1366: Incorrect integer value: '' for column 'products_sort_order' at row 1
When executing:
INSERT INTO zen49_products SET
products_model = 'mAF710-2048D3LD4',"
Russel
The information at this link may help.
https://www.zen-cart.com/showthread....ms-Not-Working
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
linuxguy2
Use the upload feature in ZC and see if that clears up your issue...
-
Re: EasyPopulate 4.0 Support Thread
The reason I have been using easy populate for the last 10 years, first on OSCommerce and for the last 2 years in Zencart is that it creates the categories and sub categories on the fly as I have over 10 000 items on my site under 65 main categories
I am using exactly the same file that I used on my previous site from the same version of EP 4.0.36.ZC - 07-05-2016
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
Hi
I usually upload the CSV via FileZilla and then go into EP4 and use import
First couple of lines of error code is :
"MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2329,
language_id = 1,
categories_name = 'Desktop Components'
MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2330,
language_id = 1,
categories_name = 'Graphics & Video Cards'
MySQLi error 1366: Incorrect integer value: '' for column 'products_sort_order' at row 1
When executing:
INSERT INTO zen49_products SET
products_model = 'mAF710-2048D3LD4',"
Russel
This aspect of the code has been this way for a long time; however, has only relatively recently become an issue as a result of more stringent mysql processing. I have a fix applied to a more recent version; however, there is still at least one issue to finish addressing before publishing the change.
I'll put together a fix for this against 4.0.36 within a few hours and post it back to here.
The issue though is the absence of a default value for categories_description and EP4 has basically "ignored" the field when storing a new category instead of recognizing that the field has no default and go ahead and place an empty value into the field. That is something I'll put together as a patch for 4.0.36.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
Hi
I usually upload the CSV via FileZilla and then go into EP4 and use import
First couple of lines of error code is :
"MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2329,
language_id = 1,
categories_name = 'Desktop Components'
MySQLi error 1364: Field 'categories_description' doesn't have a default value
When executing:
INSERT INTO zen49_categories_description SET
categories_id = 2330,
language_id = 1,
categories_name = 'Graphics & Video Cards'
MySQLi error 1366: Incorrect integer value: '' for column 'products_sort_order' at row 1
When executing:
INSERT INTO zen49_products SET
products_model = 'mAF710-2048D3LD4',"
Russel
Quote:
Originally Posted by
mc12345678
This aspect of the code has been this way for a long time; however, has only relatively recently become an issue as a result of more stringent mysql processing. I have a fix applied to a more recent version; however, there is still at least one issue to finish addressing before publishing the change.
I'll put together a fix for this against 4.0.36 within a few hours and post it back to here.
The issue though is the absence of a default value for categories_description and EP4 has basically "ignored" the field when storing a new category instead of recognizing that the field has no default and go ahead and place an empty value into the field. That is something I'll put together as a patch for 4.0.36.
Gave myself more time than I needed.
Please see the patch posted here: https://github.com/mc12345678/EasyPo...d8ece049540e49
This is based off of the 4.0.36.ZC fileset and incorporates a default value. I had started a new issue for this problem, see issue #48.
-
Re: EasyPopulate 4.0 Support Thread
Sorry, patch did not work - after trying to import a file the screen goes blank and I have to go back a page to get back to EP4
-
Re: EasyPopulate 4.0 Support Thread
Hi again
By searching on Google about this same error, it seems my host has "STRICT_TRANS_TABLES" set on mySQL which could cause this error?
I have tried to remove this setting according to their instructions, but it seems that they have to do it, so I have sent them a request to do so
Russel
-
Re: EasyPopulate 4.0 Support Thread
I think I found the problem - on my old website the value of Categories_description in the NULL column is set to NO, on the new website it is set to YES?
-
Re: EasyPopulate 4.0 Support Thread
Maybe the error is that I used Softaculous to load the new site? After I have updated the stock on my old site to list new adverts on Bid or Buy for the next week I will load another v156 from a direct download and see if I get the same errors
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
Maybe the error is that I used Softaculous to load the new site? After I have updated the stock on my old site to list new adverts on Bid or Buy for the next week I will load another v156 from a direct download and see if I get the same errors
Well, that method doesn't exactly help things other than allowing those in the forum to possibly discover more quickly the errors with their installation package. One thing of note, whenever a screen goes blank there is likely an error message related to it in the logs folder. While total time to move an existing installation out of the way to discovery of a missing parentheses by execution of the code (would have likely been faster just to look at the patch itself) was about 20 minutes, I have pushed the revised patch to: https://github.com/mc12345678/EasyPo...n_import_patch
The issue is definitely a missing sql assignment when adding a new category. Again it was something that has existed in this software since before I started helping with it, but systems had generally been flexible enough to understand what to do and not cause a problem, but now are becoming stricter (which is good overall). Unfortunately users had not been making the issue known so changes could not be made for a problem not described... It has been addressed in an upcoming release and the above patch has been verified to work. Of course there are a number of things to be done with that code to tighten it up, but that's addressed in the next release.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
I think I found the problem - on my old website the value of Categories_description in the NULL column is set to NO, on the new website it is set to YES?
So this new patch fixes this issue?
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
I think I found the problem - on my old website the value of Categories_description in the NULL column is set to NO, on the new website it is set to YES?
Quote:
Originally Posted by
Russalpcs
So this new patch fixes this issue?
Right question for the wrong issue.
The patch will eliminate the blank screen that was received because of the programming error (missing a character). It will eliminate the debug log provided earlier about not having a default value for categories_description.
The "issue" described by the two above posts was the difference between the settings of the categories_description between the old and new sites. The value or setting in question is whether the field categories_description can or can not be set to null. Neither of those settings identifies a default value, just the allowance of the value to be null or not.
The patch provided ensures that when creating a row of category data that the categories_description field will have content. Under the "old" database that content had to be something other than null. Now in the new database it could be null. In both cases, basically there should have always been *something* sent. The value being sent now with the patch is an empty set of quotes: ''.
So, will the patch change the settings of your database? No, that was never the intent. The patch is to provide some default value for new categories because Zen Cart doesn't need to have such a default value during normal operation, therefore there hasn't been one assigned.
-
Re: EasyPopulate 4.0 Support Thread
My host changed the setting of "STRICT_TRANS_TABLES" off, now it uploads perfectly!
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
Russalpcs
My host changed the setting of "STRICT_TRANS_TABLES" off, now it uploads perfectly!
So was that executed with the patch installed or the originally distributed 4.0.36 version?
-
Re: EasyPopulate 4.0 Support Thread
Hi
Warning: Feature Request
Wouldn't be nice to public declare the EP4 version so other modules could know what version is installed ?
Right now, it's only declared var $curver, but only available inside easypopulate_4.php ( as I can tell)
I'm working on getting update info from git latest releases using the git api. But to compare, I don't know what version is presently installed ( without of course, editing manually the file).
Because I use Bookx -> that uses ep4bookx -> that uses ep4, it's a way to know if git updates are available, also choosing the fork ro branch ( and pretending that I don't know the updates on ep4book)
...actually, it would be a good practice for every module to announce "publicly" to others, that is there ( just the version) ... I think.
Some define() or database-> configuration only in "read mode"...
Thanks
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
Hi
Warning: Feature Request
Wouldn't be nice to public declare the EP4 version so other modules could know what version is installed ?
Right now, it's only declared var $curver, but only available inside easypopulate_4.php ( as I can tell)
I'm working on getting update info from git latest releases using the git api. But to compare, I don't know what version is presently installed ( without of course, editing manually the file).
Because I use Bookx -> that uses ep4bookx -> that uses ep4, it's a way to know if git updates are available, also choosing the fork ro branch ( and pretending that I don't know the updates on ep4book)
...actually, it would be a good practice for every module to announce "publicly" to others, that is there ( just the version) ... I think.
Some define() or database-> configuration only in "read mode"...
Thanks
Not entirely sure what the need is.
The version information is kept up in the base file: admin/easypopulate_4.php, that when processed provides a local notification of an update being available from the ZC site. There is a notifier that follows the version information where it would be possible to determine what the current installed version is and whether a new version is available based on $new_version_details ¡== False.
It sounds like though that the ep4bookx module requires ep4, so as I said, I'm not sure I understand the need of adding something to the database that is available during normal operation. If some other software somewhere is to know about the version change outside of the use of EP4, then sure would think a database field would be the "easiest" to maintain and make available. Both that or a file with a define generally involve loading that information with each page load, regardless of the application being loaded. It's of little impact with a single item, but many single items make a big item.
Now, if want to understand more about how to capture that information during the use of EP4, can easily offer that information. Last I looked at the EP4bookx portion of the mod, there were some areas of potential coding improvement to make it a little easier to maintain and to modify.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Not entirely sure what the need is.
The version information is kept up in the base file: admin/easypopulate_4.php, that when processed
That's it. When is not processed, there's no way to know what version is installed.
Example: I can check https://api.github.com/repos/mc12345...e-4.0/releases
And get / chose all that info about release updates or even use a different fork url, etc...
But with no zencart information about what version is installed ( file or database), I can't compare if there's a update or not.
I'm working on Bookx module that doesn't process ep4, but (in my case) uses ep4 heavily through ep4bookx, it's a way to know on bookx tools panel IF there's some changes on the modules he uses.
"ep4": {
"installed": "",
"url": "",
"html_url": null,
"last_release": null
},
I can get all the other info, but I can't compare.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
That's it. When is not processed, there's no way to know what version is installed.
Example: I can check
https://api.github.com/repos/mc12345...e-4.0/releases
And get / chose all that info about release updates or even use a different fork url, etc...
But with no zencart information about what version is installed ( file or database), I can't compare if there's a update or not.
I'm working on Bookx module that doesn't process ep4, but (in my case) uses ep4 heavily through ep4bookx, it's a way to know on bookx tools panel IF there's some changes on the modules he uses.
"ep4": {
"installed": "",
"url": "",
"html_url": null,
"last_release": null
},
I can get all the other info, but I can't compare.
So let me ask this, can the bookx tools panel exist without EP4 being installed?
Where is the above additional array being kept, if at all?
-
1 Attachment(s)
Re: EasyPopulate 4.0 Support Thread
Well.... the world could live happily without this, but for some reason, I've went this way ( complicating again) , but this is want I want to achieve, and I'm achieving, but to compare releases, I need to know what version is install.
Note: Of course I cant write the version, using ftp, notepad++
For the thousands and thousands of bookx users, the universe needs this :laugh::laugh:
Attachment 18253
-
Re: EasyPopulate 4.0 Support Thread
For now, if there's a new release, it's a link to the relelase link... but it couls also download the zip tarball or , ( since ep4 / ep4bookx) don't change any admin files, it could be extended to install ... but that's not my goal for now.
Just to know if there's an update and why.
-
Re: EasyPopulate 4.0 Support Thread
I'm thinking that I could create a file that could be commonly pulled from outside software as well as EP4 to provide the version information instead of a database or always loaded define. That way there is no additional burden to the remainder of the site other than the existence of an additional file. Would likely place as a module file. Consider the use of
admin/includes/modules/easypopulate_4_version.php
With the processing contents of something like the existing line in the base module:
Code:
<?php
/**
* Header related information to describe the relationship to EasyPopulate 4
* @author mc12345678 https://mc12345678.com
**/
$curver_detail = '4.0.36';
And then the easypopulate_4.php file where that line exists to be changed to:
Code:
require DIR_WS_MODULES . 'easypopulate_4_version.php';
-
Re: EasyPopulate 4.0 Support Thread
Yeap, that would be nice, Thanks.
Like I said, I actually haven't dig into how or if other modules declared that they are present, but I think it's nice.
No need to add extra info all over the place, but saying: module x.x.x is present.
ok thanks.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
For now, if there's a new release, it's a link to the relelase link... but it couls also download the zip tarball or , ( since ep4 / ep4bookx) don't change any admin files, it could be extended to install ... but that's not my goal for now.
Just to know if there's an update and why.
Oh, so you're wanting to know when there is a github update without concern about a Zen Cart update?
If using the github information, understand that while I've been using that as a feature to provide information to those following github, at least when I use the release section, it is to identify a version that is provided to Zen Cart, typically with the same content as was submitted to Zen Cart (basically keeping the same information in two places). But that doesn't mean that such an action will always occur and doesn't really resolve the issue of updates of some minor level being provided before a release... Seems it would be better for you if that is the goal to possibly track the commit number that was used to download/compare your software and whatever information is available about the difference in that and the master to see if there is an update that was made in github...
The name used in the github release is different than the version information made available through the ZC download, and while the goal is to maintain consistency, there is no requirement at least on the github side.
Just thinking that using
Code:
$new_version_details = plugin_version_check_for_updates(2069, $curver_detail);
from the EP4 file would be the way to pull the desired information. This information would become available when using EP4, which could be used to populate whatever is desired to use for tracking:
"ep4": {
"installed": "",
"url": "",
"html_url": null,
"last_release": null
},
... If the program is installed and the field is not populated, then direct user to access the program one time and come back to the "panel". Now the panel is up-to-date because the program was accessed and populated the desired field.
Or using the thought above of an admin/easypopulate_4_version.php file can reproduce the operation performed in admin/easypopulate_4.php to pull from the ZC server if an update is available. That is unless the "direction" of ZC plugin version information is expected to be in the database then... I've just been trying to keep this to have a relatively low profile with interface to the database only necessary to support it's database operations.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
Yeap, that would be nice, Thanks.
Like I said, I actually haven't dig into how or if other modules declared that they are present, but I think it's nice.
No need to add extra info all over the place, but saying: module x.x.x is present.
ok thanks.
No problem.
Note though that the simple string like '4.0.36' is not the same as the github title of: EasyPopulate V4 4.0.36 ZC Release, or the tag of: v4.0.36.ZC
Will have to account for those differences in your comparison if using the github information...
-
Re: EasyPopulate 4.0 Support Thread
Yeap, I see what you mean. I've add a section to change the git api urls to track fork updates. So it's up to the user ( me ) to choose.
So it simple gathers the latest release from the release page of his ( my ) choice.
However, while giving the information that one can use ep4 to facilitate products management, IF ep4 is not installed or git url is empty, it's silent.
About zencart plugin download section.... yes, if someone downloads from there and the version name (don't know how it works), ( tag_name in git), is different, it will say that there's an update... and that's wrong info, or wrong source info. So a no no situation.
That's why I want to start with a empty json file (except for bookx it self).
If a module git api url is posted ( in a form), I guess it means that a user ( me ), wants to use that repository. Then I guess it makes sense to say there's a update, even if that info is not entirely correct, but server the purpose of change to that repository track.
But, yes, not very good.
I'll have to check that plugin_version_check_for_updates function to see what comes up.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mesnitu
Yeap, I see what you mean. I've add a section to change the git api urls to track fork updates. So it's up to the user ( me ) to choose.
So it simple gathers the latest release from the release page of his ( my ) choice.
However, while giving the information that one can use ep4 to facilitate products management, IF ep4 is not installed or git url is empty, it's silent.
About zencart plugin download section.... yes, if someone downloads from there and the version name (don't know how it works), ( tag_name in git), is different, it will say that there's an update... and that's wrong info, or wrong source info. So a no no situation.
That's why I want to start with a empty json file (except for bookx it self).
If a module git api url is posted ( in a form), I guess it means that a user ( me ), wants to use that repository. Then I guess it makes sense to say there's a update, even if that info is not entirely correct, but server the purpose of change to that repository track.
But, yes, not very good.
I'll have to check that plugin_version_check_for_updates function to see what comes up.
Easiest way to check its output, is to change the version number in your EP4 file to less than the current, then possibly add say at line 89:
Code:
trigger_error('version response data: ' . print_r($new_version_details, true), E_USER_WARNING);
then could change it back to 4.0.36 and run it to see what the resulting log file has, then remove the content from that line. (Line 89 was blank in version 4.0.36)
-
2 Attachment(s)
Re: EasyPopulate 4.0 Support Thread
I'm still getting this error from a freshly exported csv. The database was updated and I tried uninstalling and reinstalling the plugin.
Any ideas to fix this?
Attachment 18255Attachment 18256
-
Re: EasyPopulate 4.0 Support Thread
Can you show at least the first two lines of your raw csv?
The "import error" is a result of not finding that the csv has "consistent" separators matching those supported by the code. By separator I mean comma, tab, semi-colon, etc... between each field.
-
Re: EasyPopulate 4.0 Support Thread
Note also, if I remember correctly that detection was only added to the github repo where there may still be an issue with importing categories. I've been trying over the last couple of weeks to flush that out; however, the distribution of ZC 1.5.6 has taken up much of my time. :(
-
Re: EasyPopulate 4.0 Support Thread
Code:
v_products_model,v_products_type,v_products_image,v_products_name_1,v_products_description_1,v_products_url_1,v_specials_price,v_specials_date_avail,v_specials_expires_date,v_products_price,v_products_weight,v_product_is_call,v_products_sort_order,v_products_quantity_order_min,v_products_quantity_order_units,v_products_priced_by_attribute,v_product_is_always_free_shipping,v_date_avail,v_date_added,v_products_quantity,v_manufacturers_name,v_categories_name_1,v_tax_class_title,v_status,v_metatags_products_name_status,v_metatags_title_status,v_metatags_model_status,v_metatags_price_status,v_metatags_title_tagline_status,v_metatags_title_1,v_metatags_keywords_1,v_metatags_description_1
"1T8302 MSP","1","engine/aclbearings.jpg","ACL Thrust Washer Set Mazdaspeed Protege","","","","","","4","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
"4B8300 MSP","1","engine/aclbearings.jpg","ACL Rod Bearing Set Mazdaspeed Protege","ACL Aluglide aluminum.","","","","","26.43","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
"5M8302 MSP","1","engine/aclbearings.jpg","ACL Main Bearing Set Mazdaspeed Protege","ACL Aluglide aluminum.","","","","","50.5","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wtfbbq
Code:
v_products_model,v_products_type,v_products_image,v_products_name_1,v_products_description_1,v_products_url_1,v_specials_price,v_specials_date_avail,v_specials_expires_date,v_products_price,v_products_weight,v_product_is_call,v_products_sort_order,v_products_quantity_order_min,v_products_quantity_order_units,v_products_priced_by_attribute,v_product_is_always_free_shipping,v_date_avail,v_date_added,v_products_quantity,v_manufacturers_name,v_categories_name_1,v_tax_class_title,v_status,v_metatags_products_name_status,v_metatags_title_status,v_metatags_model_status,v_metatags_price_status,v_metatags_title_tagline_status,v_metatags_title_1,v_metatags_keywords_1,v_metatags_description_1
"1T8302 MSP","1","engine/aclbearings.jpg","ACL Thrust Washer Set Mazdaspeed Protege","","","","","","4","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
"4B8300 MSP","1","engine/aclbearings.jpg","ACL Rod Bearing Set Mazdaspeed Protege","ACL Aluglide aluminum.","","","","","26.43","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
"5M8302 MSP","1","engine/aclbearings.jpg","ACL Main Bearing Set Mazdaspeed Protege","ACL Aluglide aluminum.","","","","","50.5","1","0","0","1","1","0","0","","2017-10-28 08:28:00","8","ACL Bearing","Mazdaspeed^Mazdaspeed Protege 2003-03.5^Engine^Engine Bearings","Taxable Goods","1","0","0","0","0","0","","",""
Are you able to tell when you downloaded the software? The above content visually looks right. I'm wondering if there was a logic error in the version obtained where the error was displayed for a file that met the conditions and not when it didn't.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Are you able to tell when you downloaded the software? The above content visually looks right. I'm wondering if there was a logic error in the version obtained where the error was displayed for a file that met the conditions and not when it didn't.
I tried 2 nights ago with a fresh download and compared it to an 11-2018 download with same results.
I posted back in April 2018 with the same problem. I fixed it by using an older version I had. The Zencart version was on 1.5.5, either e or f .
I no longer have that older version so I cannot revert to that one.
Is there a specific PHP version this has to run on?
-
Re: EasyPopulate 4.0 Support Thread
I just tested the current zip on github with a clean install of 1.5.6a and it still shows the same import error.
-
Re: EasyPopulate 4.0 Support Thread
Luckily, I found the older version that works is still available in the plugin section of the forum.
This one still works fine and works with 1.5.6a.
EasyPopulate V4 - Version: 4.0.36.ZC
The version on GIT HUB Easy Populate 4.0.37.6 - 02-08-2017 does not work and has the import error.
If you have time maybe you can look into this issue and find what is the problem.
In the meantime the solution for anyone with the same problem is to use the version listed above.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wtfbbq
Luckily, I found the older version that works is still available in the plugin section of the forum.
This one still works fine and works with 1.5.6a.
EasyPopulate V4 - Version: 4.0.36.ZC
The version on GIT HUB Easy Populate 4.0.37.6 - 02-08-2017 does not work and has the import error.
If you have time maybe you can look into this issue and find what is the problem.
In the meantime the solution for anyone with the same problem is to use the version listed above.
I do have a number of updates to push to the github version, and as I said, I believe that there was at one point a reverse logic applied to the file check. I've added two significant features that I need to be sure to test before posting the full change to the ZC site. One is using the admin sanitization during import of the file data, another is the use of identifying a language by its two letter designation instead of using its languages_id, while maintaining the possibility of the old method. Ie. Once again expanding on the capability to maximize existing processes.
Not sure if I purposefully left that issue as the current load or not. Wouldn't put it past me to do that so that the use of the incomplete code wouldn't bungle someone's database. I can take the heat for there being software that doesn't "do" anything better than it knowingly messing up someone's database.
-
Re: EasyPopulate 4.0 Support Thread
In the last week, there have been at least two posts about difficulty with importing files. The message import error appears where the import button typically is. In both cases the files to be imported have had a space in the filename.
It is recommended that filenames not include spaces. I intend to see what it would take to support a filename having a space, even if that is a method to rename the file.
-
Re: EasyPopulate 4.0 Support Thread
I have v 1.5.5D we will be upgrading to 1.5.6 soon. what I want to do is change shipping weights on items in bulk for different product types, will this mod able me to do that? Also, I see that a lot of people are saying that the new version doesn't work right, so I should download EasyPopulate V4 - Version: 4.0.36.ZC is this correct?Thank you =)
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
WiccanWitch420
I have v 1.5.5D we will be upgrading to 1.5.6 soon. what I want to do is change shipping weights on items in bulk for different product types, will this mod able me to do that? Also, I see that a lot of people are saying that the new version doesn't work right, so I should download EasyPopulate V4 - Version: 4.0.36.ZC is this correct?Thank you =)
It would be possible to use this to make bulk edit of shipping weight by product type (need to filter on product type and then make the desired change(s)). I'm not sure I follow with the versioning issues. This plugin EasyPopulate Version 4 is currently offered as version 4.0.36.ZC. There is an update being worked on on github, which is to be released shortly after a little more testing is done. There also is a patch for the current EP4 version which is discussed within the last few posts.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
It would be possible to use this to make bulk edit of shipping weight by product type (need to filter on product type and then make the desired change(s))
You can use this to easily update the weight of products. It's one of the columns in the csv, so download, edit the values and import.
-
Re: EasyPopulate 4.0 Support Thread
Zen Cart 1.5.6 & Easy Populate 4.0.36.ZC bug uploading non latin UTF-8 characters
Multilingual with English and Hebrew characters:
1. I am able to download a CSV file in which characters in both languages appear correctly
2. On the upload of the CSV file, the English characters are correctly updated and added to the database , HOWEVER with Hebrew, text strings are cut short after the following two characters: "ג" (Gimmel) and "ע" (Ayn). The Hebrew language is RTL or written right to left.
If I have a product name "עגביות מספר 1" (tomato number 1), all of the text to the left of the character "ע" is omitted once uploaded. The same applies to category names.
I have been looking at the code easypopulate_4_import.php, and it contains reference to the mb_split function, however it isn't clear why only categories names to mention that the problem I am having persists on category names as well. Could the utf-8 conversion of smart-quotes, em-dash, and ellipsis be interfering in some manner?
I have contributed the Hebrew language packages a while ago that I intend to update shortly.
Thanks in advance,
Eran Ariel
-
Re: EasyPopulate 4.0 Support Thread
Been trying to think about this. Need to look at the language pack to see its settings as relates to the database along with the returned data associated with the plugin. Note that generally speaking, as written mb_split and the other mb_ functions only really comes into play when utf8 is involved.
Would need to trace down execution about what happens to the imported text to see what operation is truncating it. I have seen that Russian also has had a similar issue.
Does the same problem occur in the product description or is it only in the product and category names?
-
Re: EasyPopulate 4.0 Support Thread
The problem occurs in both, the product and category names. Here is some code from the easy populate import file:
foreach ($langcode as $lang) {
if (!function_exists('mb_split')) {
// iso-8859-1
$categories_names_array[$lang['id']] = explode($categories_delimiter,$items[$filelayout['v_categories_name_'.$lang['id']]]);
} else {
// utf-8
$categories_names_array[$lang['id']] = mb_split(preg_quote($categories_delimiter), $items[$filelayout['v_categories_name_' . $lang['id']]]);
}
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
eranariel
The problem occurs in both, the product and category names. Here is some code from the easy populate import file:
foreach ($langcode as $lang) {
if (!function_exists('mb_split')) {
// iso-8859-1
$categories_names_array[$lang['id']] = explode($categories_delimiter,$items[$filelayout['v_categories_name_'.$lang['id']]]);
} else {
// utf-8
$categories_names_array[$lang['id']] = mb_split(preg_quote($categories_delimiter), $items[$filelayout['v_categories_name_' . $lang['id']]]);
}
The question also asked about other fields such as products_description, is that field also affected?
Since you already have the language installed and having this issue, perhaps you could run a few tests for me.
Could you modify a portion of the above code to the following:
Code:
} else {
// utf-8
$categories_names_array[$lang['id']] = mb_split(preg_quote($categories_delimiter), $items[$filelayout['v_categories_name_' . $lang['id']]]);
trigger_error('category: ' . $items[$filelayout['v_categories_name_' . $lang['id']]] . ' category array: ' . print_r($categories_names_array[$lang['id']], true), E_USER_WARNING);
}
Then import at least one line of product information that contain the character(s) involved.
After import check the logs directory for a myDebug-adm-xxxx file generated at about the time of attempting to import.
Post the contents of the file, but omit or rename the admin directory (can use admin as the folder name).
Expectation if all is correct on the server is information related to the category name. If nothing is generated, then that too is a piece of useful information and will have to work backwards a little.
Note when posting the contents, please use [CODE][/CODE] tags around the contents. The tags can be generated by pressing the # button in the message box toolbar when responding.
-
Re: EasyPopulate 4.0 Support Thread
Yes, I will try...and thank you
-
Re: EasyPopulate 4.0 Support Thread
And yes, the question relates to all fields, however this is the only reference in the respective file that relates to the mb_split function.
-
Re: EasyPopulate 4.0 Support Thread
OK, I tested with the edited code on one product, which didn't upload to its respective category. Below is the log file:
Code:
[19-Feb-2019 21:20:10 America/Chicago] Request URI: /admin/easypopulate_4.php, IP address: 67.86.152.229
#1 fgetcsv() called at [public_html/admin/easypopulate_4_import.php:44]
#2 include_once(/public_html/admin/easypopulate_4_import.php) called at [/public_html/admin/easypopulate_4.php:289]
--> PHP Warning: fgetcsv() expects parameter 1 to be resource, null given in /public_html/admin/easypopulate_4_import.php on line 44.
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
eranariel
OK, I tested with the edited code on one product, which didn't upload to its respective category. Below is the log file:
Code:
[19-Feb-2019 21:20:10 America/Chicago] Request URI: /admin/easypopulate_4.php, IP address: 67.86.152.229
#1 fgetcsv() called at [public_html/admin/easypopulate_4_import.php:44]
#2 include_once(/public_html/admin/easypopulate_4_import.php) called at [/public_html/admin/easypopulate_4.php:289]
--> PHP Warning: fgetcsv() expects parameter 1 to be resource, null given in /public_html/admin/easypopulate_4_import.php on line 44.
That appears to be caused by a an issue with the file. Specifically that is expected to be the case if the file is considered not there, specifically can occur with 4.0.36.ZC if the filename would be sanitized by strict sanitization by the ZC software because the appropriate sanitizer code has not yet been incorporated to the distribution.
So, I recommend using a filename that is very similar to what was provided on export, no spaces, no special characters. Afterall, this issue just reported appears different than what we are trying to work.
-
Re: EasyPopulate 4.0 Support Thread
v1.5.5f php 7.1
I have the same products on different sites (.com and ccTLD) - the only difference is the description varies for each site, all else is the same (part number, image file etc.).
Question: can I do a full EP export from the master site, then delete all columns except for part number, quantity and status (in stock/out of stock) and then import that modified file into a second site such that it modifies/updates ONLY the Quantity and Status of a Part Number and maintains everything else in the database as it is/was?
cheers, Mike
-
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
shags38
v1.5.5f php 7.1
I have the same products on different sites (.com and ccTLD) - the only difference is the description varies for each site, all else is the same (part number, image file etc.).
Question: can I do a full EP export from the master site, then delete all columns except for part number, quantity and status (in stock/out of stock) and then import that modified file into a second site such that it modifies/updates ONLY the Quantity and Status of a Part Number and maintains everything else in the database as it is/was?
cheers, Mike
If by part number you mean products_model or products_id where whichever is used is unique (different for every product) then yes.
Where two rows of data have the same master key (products_model or products_id by default), the last one that is discovered will become the current information for all product that have that same master key.