Zen Cart Logo
Forums / Addon Admin Tools / EasyPopulate 4.0 Support Thread

EasyPopulate 4.0 Support Thread

Sticky

Views: 733,353

Results 2,941 to 2,960 of 3,671
17 Dec 2018, 6:36 PM
#2941
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
743
Plugin Contributions:
0

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

 $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
17 Dec 2018, 7:18 PM
#2942
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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

$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:

(EP4_SHOW_ALL_FILETYPES != 'false' ? $val = $filetypes[$key] : '');


and change it to

(EP4_SHOW_ALL_FILETYPES != 'false' ? $val = ((isset($filetypes[$key]) || array_key_exists($key, $filetypes)) ? $filetypes[$key] : array()) : '');

27 Dec 2018, 11:41 PM
#2943
flipc avatar

flipc

New Zenner

Join Date:
May 2004
Posts:
9
Plugin Contributions:
0

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

28 Dec 2018, 1:30 AM
#2944
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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.

28 Dec 2018, 5:10 PM
#2945
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

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.

29 Dec 2018, 12:50 PM
#2946
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

29 Dec 2018, 3:05 PM
#2947
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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.

29 Dec 2018, 5:12 PM
#2948
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

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..

29 Dec 2018, 5:33 PM
#2949
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

29 Dec 2018, 5:49 PM
#2950
linuxguy2 avatar

linuxguy2

Zen Follower

Join Date:
Sep 2013
Location:
Texas
Posts:
315
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

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.php?214462-Easy-Populate-Import-Items-Not-Working

29 Dec 2018, 6:09 PM
#2952
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

29 Dec 2018, 8:18 PM
#2953
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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.

29 Dec 2018, 9:05 PM
#2954
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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

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/EasyPopulate-4.0/commit/6f27ebee433016572283a0141dd8ece049540e49

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.

30 Dec 2018, 7:53 AM
#2955
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

30 Dec 2018, 8:06 AM
#2956
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

30 Dec 2018, 9:31 AM
#2957
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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?

30 Dec 2018, 10:31 AM
#2958
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

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

30 Dec 2018, 11:41 AM
#2959
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: EasyPopulate 4.0 Support Thread

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/EasyPopulate-4.0/compare/mc12345678:v4.0.36.ZC...v4.0.36-categories_description_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.

30 Dec 2018, 12:56 PM
#2960
russalpcs avatar

russalpcs

New Zenner

Join Date:
Dec 2016
Location:
South Africa
Posts:
34
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

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?