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

EasyPopulate 4.0 Support Thread

Sticky

Views: 733,344

Results 3,101 to 3,120 of 3,671
9 Jan 2020, 2:52 PM
#3101
pingfah avatar

pingfah

New Zenner

Join Date:
Mar 2019
Location:
Cornwall
Posts:
33
Plugin Contributions:
0

EasyPopulate 4.0 Support Thread

Hi, I am having a little problem with EP4.

I have ZC1.5.6c, installed from that version, not upgraded. I also have Ultimate URLs and Dynamic Filter installed.

EP4 is installed, and I have imported a bunch of products, no problem, all worked great. It is when I have come to add some attributes that the problem has occurred. I have created a one line/product file for ease of testing, I upload & import the file and I get the following 2 error messages at the top of the page:

**1. File Import Completed with issues.

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

**

Then at the bottom of the page the error is listed thusly:

SKIPPED! - Primary key: v_products_model:bcard - Not Found! Unable to apply attributes.

The product does exist, it has a master category assigned correctly, and I have opened the file in Notepad++ and checked for any tabs, and also made sure the file is converted to UTF8.

Here is the contents of the file (which is named "attrib-basic-ep-test.csv"):

v_products_model,v_products_options_type,v_products_options_name_1,v_products_options_values_name_1
bcard,1,First Name,TEXT

Can anybody shed any light on this?

12 Jan 2020, 4:30 AM
#3102
amiablesoul avatar

amiablesoul

New Zenner

Join Date:
Dec 2019
Location:
US
Posts:
1
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Just a guess here, maybe v_products_model should be v_products_id?

12 Jan 2020, 1:48 PM
#3103
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I added a field to the product, and I want to add the value of this field through the batch table, which files do I need to modify?
Where do I need to modify this plugin and add this field

12 Jan 2020, 3:15 PM
#3104
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

I added a field to the product, and I want to add the value of this field through the batch table, which files do I need to modify?
Where do I need to modify this plugin and add this field

Product table fields desired to be exported and imported that are not part of the base code are addressed in the user defined field in configuration->easy populate v4. Simply add the field's name into the text box. If multiple are used, then separate them by a comma. This is covered in the instruction.

12 Jan 2020, 4:03 PM
#3105
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

Pingfah:

Hi, I am having a little problem with EP4.

I have ZC1.5.6c, installed from that version, not upgraded. I also have Ultimate URLs and Dynamic Filter installed.

EP4 is installed, and I have imported a bunch of products, no problem, all worked great. It is when I have come to add some attributes that the problem has occurred. I have created a one line/product file for ease of testing, I upload & import the file and I get the following 2 error messages at the top of the page:

**1. File Import Completed with issues.

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

**

Then at the bottom of the page the error is listed thusly:

SKIPPED! - Primary key: v_products_model:bcard - Not Found! Unable to apply attributes.

The product does exist, it has a master category assigned correctly, and I have opened the file in Notepad++ and checked for any tabs, and also made sure the file is converted to UTF8.

Here is the contents of the file (which is named "attrib-basic-ep-test.csv"):

v_products_model,v_products_options_type,v_products_options_name_1,v_products_options_values_name_1
bcard,1,First Name,TEXT

> 
> 
> Can anybody shed any light on this?

> **amiablesoul:**
>
> Just a guess here, maybe v_products_model should be v_products_id?
Really, really sorry for not responding sooner. I have no reason, only excuses.

While there is a lot of good information in the above post and as a result I would like to say that the issue is fully on the code, I have come to realize that there are a few things possibly missing and as a result I am asking questions to try to gain information not to doubt anything provided.

So the below are in no particular order but each could be either the single cause or in combination with other things.

As pointed out by amiablesoul, there is an option in the software to change the primary_key from the default products_model to products_id. It is also possible that the error message is incomplete and inaccurate identifying the desire to use the products_model instead of properly identifying that the products_id is the item to be found. This issue is corrected in an upcoming release.

The statement about "converting to UTF8" does not identify in what program the conversion was made. If Excel was used to specifically save the csv data as utf8, then it is a "known" issue that it adds a BOM character to the beginning of the file and that actually will cause the field to not be readable. Please, for those that wish to blame this software, there simply are too many ways that data can be incorrectly provided to be able to then evaluate all of the possibilities (and still not identify how the data was incorrectly formatted) instead of following recommended processes or just keeping it simple. In fact I have yet to find a way to discover by review of the import file whether the csv file was generated by Excel or other programs such as Open Office or similar consistently. Yes, there are occasions where a character may be found that signifies the data coming from Excel, but even those are addressed in this code by converting such characters to standard utf8 equivalent.
As part of the processing of the data, a message was generated indicating that there was a problem with the sql statement. This program generates a debug log of its own in the associated import/export file. The contents of that file may be helpful in determining the cause/issue.
Another thing which is suggested in the start of the instructions is to basically initially work with unedited data. This will help step through the process that works in your environment to consistently get the desired results. So. Suggestion would be to export some amount of data, open it with your preferred editor, save it with a new filename and no changes and then attempt import (after upload) of that data. Then review the results. If there are issues, then would suggest simply reimporting the original file to validate operation. 

So, what appears correct? I see that the filename matches the expected format to support processing the attributes correctly. I "see" the proper columns and what appears to be correct dividers between data; however, the issue may be with other data inserted by the conversion that is not visible but instead is electronic data not displayed as visible characters. I do see that text is not bounded by quotes, though this is not required it can have an effect *if* that internal text had special characters in it as well... (meaning in this case it does not appear to be an issue)
There doesn't appear to be any spaces in any of the headings nor field data, but that would require review specifically of the file itself.

So... while there may be some initial "setup" of concern, perhaps can see that there are a lot of ways things can go wrong, but reproducibility of it going right is actually easy.
13 Jan 2020, 3:28 PM
#3106
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

Product table fields desired to be exported and imported that are not part of the base code are addressed in the user defined field in configuration->easy populate v4. Simply add the field's name into the text box. If multiple are used, then separate them by a comma. This is covered in the instruction.

I added fields in the background, but the batch table still cannot be imported.
Is there a need to modify the program elsewhere?

Attachment 18792
Attachment 18793

13 Jan 2020, 5:00 PM
#3107
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

I added fields in the background, but the batch table still cannot be imported.
Is there a need to modify the program elsewhere?

Attachment 18792
Attachment 18793
If the field products_family exists in the product's table and the row contains the primary key that has been chosen, then import of that data should work or a message is provided about it not working.

To further test, I would recommend exporting one or more product that already have information in that field to see that it is exported and to provide a sort of example.

There is no other code modification necessary to support that in an otherwise functional system.

13 Jan 2020, 5:39 PM
#3108
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

If the field products_family exists in the product's table and the row contains the primary key that has been chosen, then import of that data should work or a message is provided about it not working.

To further test, I would recommend exporting one or more product that already have information in that field to see that it is exported and to provide a sort of example.

There is no other code modification necessary to support that in an otherwise functional system.

This field is exported but cannot be imported

13 Jan 2020, 5:50 PM
#3109
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

If the field products_family exists in the product's table and the row contains the primary key that has been chosen, then import of that data should work or a message is provided about it not working.

To further test, I would recommend exporting one or more product that already have information in that field to see that it is exported and to provide a sort of example.

There is no other code modification necessary to support that in an otherwise functional system.

The import did not prompt any errors, but there was no value in the database.

Attachment 18794

13 Jan 2020, 5:52 PM
#3110
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

This field is exported but cannot be imported
If not I would expect some reason to be provided. Perhaps the CSV file is not formatted properly, perhaps the primary key used (default is products_model) is listed for more than one product such that an update is not going to the correct product. In this case would suggest changing the primary key to products_id.

13 Jan 2020, 5:54 PM
#3111
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

The import did not prompt any errors, but there was no value in the database.

Attachment 18794

And after the file was uploaded to the server, the file was then imported? (upload places the file on the server, import processes the file to push the content to the database.) this part has been misunderstood by some before.

13 Jan 2020, 6:13 PM
#3112
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

And after the file was uploaded to the server, the file was then imported? (upload places the file on the server, import processes the file to push the content to the database.) this part has been misunderstood by some before.

The import did not prompt any errors, but there was no value in the database

Attachment 18795

13 Jan 2020, 6:16 PM
#3113
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

And after the file was uploaded to the server, the file was then imported? (upload places the file on the server, import processes the file to push the content to the database.) this part has been misunderstood by some before.

Is this set up correctly?
Attachment 18796

13 Jan 2020, 7:23 PM
#3114
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

Is this set up correctly?
Attachment 18796

That looks correct to support import by products_model. Might suggest changing the primary_key to products_id, exporting then updating the products_family field for the items with the appropriate products_id. Note, that if you are wanting to add new product, I recommend the use of new_blank as the promary key. Then new product that do not have a products_id will be given one.

14 Jan 2020, 5:40 PM
#3115
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

That looks correct to support import by products_model. Might suggest changing the primary_key to products_id, exporting then updating the products_family field for the items with the appropriate products_id. Note, that if you are wanting to add new product, I recommend the use of new_blank as the promary key. Then new product that do not have a products_id will be given one.

I installed this plug-in, you can try, see where the problem is, I want to through the batch scale, batch import keywords.
I added custom fields and the content could not be imported

https://www.zen-cart.com/downloads.php?do=file&id=1357

16 Jan 2020, 6:00 PM
#3116
jiji2018 avatar

jiji2018

Zen Follower

Join Date:
Apr 2018
Posts:
121
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

That looks correct to support import by products_model. Might suggest changing the primary_key to products_id, exporting then updating the products_family field for the items with the appropriate products_id. Note, that if you are wanting to add new product, I recommend the use of new_blank as the promary key. Then new product that do not have a products_id will be given one.

What does new_blank and primary_key mean, I do n’t quite understand?

18 Jan 2020, 8:18 PM
#3117
zoomnbyu avatar

zoomnbyu

New Zenner

Join Date:
Jan 2020
Location:
Omaha, NE
Posts:
4
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

In process of moving from Oscommerce to Zen Cart. Part of process is using Easy Populate to export default Zen Cart product database to use as spreadsheet template. Installed EP 4.0, shows up in tools, but when I try to export I get an immediate 500 error. Same thing happens no matter what option I try. We do have the zen cart directory set up below the top level domain but pretty sure I've put temp directories for EP to copy to.

Thoughts?

Zoom

18 Jan 2020, 8:27 PM
#3118
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

zoomnbyu:

In process of moving from Oscommerce to Zen Cart. Part of process is using Easy Populate to export default Zen Cart product database to use as spreadsheet template. Installed EP 4.0, shows up in tools, but when I try to export I get an immediate 500 error. Same thing happens no matter what option I try. We do have the zen cart directory set up below the top level domain but pretty sure I've put temp directories for EP to copy to.

Thoughts?

Zoom
Check the logs directory for myDebug-adm related files to see what is going on. May be a permissions issue of the folder used as a destination, may be something else.

18 Jan 2020, 8:45 PM
#3119
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jiji2018:

What does new_blank and primary_key mean, I do n’t quite understand?
I believe you were asking about the differences between new_blank and products_id, but I'll describe both.

In order to identify a single product in the database, there must be some field that contains information specific to that product. That is a generic description of a primary_key. It is possible for a table/product/object to be identified by a combination of fields to identify a unique field or primary_key for that thing.

The primary key is most important when importing. This way the field can be used to match up with the item in the database. Zen Cart does not require products_model to be unique, so it is possible that two product could have the same products_model. But, every product is given a products_id.

By providing the products_id and the data to be updated, that product can receive the desired update. But, the database normally manages products_id assignment such that a historical product remains a part of the database in some way.

So there came a request by someone to allow the generation of a product by assigning a products_id and there also was a desire to just be able to create product without being worried about a unique products_model. So, a method was developed to allow product management specifically by products_id such that if the products_id were empty on import, that row of data would be ignored just like it is when working with products_model as a primary_key. But... then there was the concern of how to create a new product without knowing the latest/next products_id... So, the use of a blank entry as the products_id identifier seemed like the right way to go and it had to be specifically set...

So now, if the primary_key is set to blank_new, for any product that has the products_id field, if the products_id field is empty, a new product will be attempted to be created. If the primary_key is set simply to products_id, then a blank entry for products_id field will cause that row to be ignored.

18 Jan 2020, 8:47 PM
#3120
zoomnbyu avatar

zoomnbyu

New Zenner

Join Date:
Jan 2020
Location:
Omaha, NE
Posts:
4
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Ty for the quick reply. Below is the log text and I'm probably missing something obvious. The xxxx is just my paranoidly covering the admin folder name.

[18-Jan-2020 14:11:49 America/Chicago] Request URI: /zen-cart/xxxxxxxxxx/easypopulate_4.php?export=full, IP address: 68.15.228.173
#1 require() called at [/home2/tsantoro/public_html/zen-cart/xxxxxxxxxx/easypopulate_4_export.php:92]
#2 include_once(/home2/tsantoro/public_html/zen-cart/xxx/easypopulate_4_export.php) called at [/home2/tsantoro/public_html/zen-cart/joinT-mtL-Buses/easypopulate_4.php:286]
--> PHP Warning: require(/home2/tsantoro/public_html/zen-cart/xxxxxxxxxx/includes/modules/easypopulate_4_filelayout.php): failed to open stream: No such file or directory in /home2/tsantoro/public_html/zen-cart/xxxxxxxxxxx/easypopulate_4_export.php on line 92.

[18-Jan-2020 14:11:49 America/Chicago] PHP Fatal error: require(): Failed opening required '/home2/tsantoro/public_html/zen-cart/xxxxxxxxxxxx/includes/modules/easypopulate_4_filelayout.php' (include_path='.:/opt/php56/lib/php') in /home2/tsantoro/public_html/zen-cart/xxxxxxxxxxx/easypopulate_4_export.php on line 92