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

EasyPopulate 4.0 Support Thread

Sticky

Views: 733,130

Results 2,361 to 2,380 of 3,671
13 Apr 2016, 3:20 PM
#2361
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

EasyPopulate 4.0 Support Thread

Here's the thing that stick out to me. When importing, the message is:

UPDATED! - Model: JimJim | 23997 | Todler Siz | 2T,3T,4T,4 |

The attribute name is 'Todler Size:' not 'Todler Siz'

I checked the attribute name in the db, hoping to find some odd character or spacing, but no.

I tried exporting from the retail site, adding an attribute value and importing back into the retail site. I get the same issue above of the message saying UPDATED but the attribute name being wrong.

I'm using Open Office and even opened the csv file in a text editor to confirm the file formatting is correct.

It seems as if it's reading the csv file incorrectly, but that doesn't make sense. Any way to test or troubleshoot the import process? Meaning is there a way to determine where the attribute name is getting mis-read?

14 Apr 2016, 10:19 AM
#2362
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

How wrong are the attribute names? Always only so wide (x characters?) is there an indication in the upper right corner about mb_string or some similar function not be supported.

The basic attribute import is performed in admin/easypopulate_4_attrib.php. Now in review of that file, I see that I didn't update the queries like I did everywhere else, but I also just tried an import with Todler size: as the option name and had no truncation...##

Some reasons that truncation can occur (come to mind anyways) are, 1) unescaped characters that get processed as some other character, but if such a character "combination" were a sql problem, then it should be reported as an error. 2) the option name field is shorter than the text length‎ though even so, the data should appear in the database even if truncated. 3) in part wondering if the truncation is merely visual with the full document(s) available but for some other reason not actually lmported.

One thing not discussed, but I suspect is correct, the filename when this issue has been occurring. Up to and including the letters ep, is it in anyway different than what was downloaded? The end of the filename can be whaterver is allowable by the storage system, but the beginning (capitalization not included) needs to match that of the filter to be applied.

14 Apr 2016, 4:56 PM
#2363
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

mc12345678:

One thing not discussed, but I suspect is correct, the filename when this issue has been occurring. Up to and including the letters ep, is it in anyway different than what was downloaded? The end of the filename can be whaterver is allowable by the storage system, but the beginning (capitalization not included) needs to match that of the filter to be applied.

Never assume...you know what they say. That was the issue, I had not followed the proper naming convention. When I do, it works! Imagine that.

Follow-up question. Is there a way to export/import an product with attributes in one file? As it stands, it's two steps and two files currently.

14 Apr 2016, 6:18 PM
#2364
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

jeking:

Never assume...you know what they say. That was the issue, I had not followed the proper naming convention. When I do, it works! Imagine that.

Follow-up question. Is there a way to export/import an product with attributes in one file? As it stands, it's two steps and two files currently.
Well, it got me thinking, thought perhaps after the last issue that was discussed in the instructions and overlooked would have prompted reading the instructions. :P

Yes it is possible, but is it truly desireable?
Small example, table 1 has two fields. One is the primary key, the other is the data. Table 2 also has two fields, one field is the primary key, the other is a data field but that field represents rows of data. So:
T1:
f1, f2
1, x
2, y
3, z
4, w

T2:
F1, F2
1, a,b,c
2, d,e,f
3, a,b,c
4, g,h,i

Now the resulting table (spreadsheet) for combining the two:
F1(f1), f2,F2split
1, x, a
1, x, b
1, x, c
2, y, d
2, y, e
2, y, f
3, z, a
3, z, b
3, z, c
4, w, g
4, w, h
4, w, i

Now, which one of these scenarios is easier to address, understand, and not necessarily make a mistake? Also, to accomplish the same functionality as existing, every upload of the attributes would require all attributes to be included every time in their entirety otherwise the absence of an attribute row would cause deletion of that attribute. Further, on each row every piece of data would have to be compared against the applicable table(s) for existence then update or add the additional data applicable. Sure alternatively can bring information into memory and do a comparison from that perspective instead of a sql statement for each evolution with the applicable data eventually applied with an appropriate sql statement.

This particular approach becomes resource and time intensive. If you have looked back a few pages you'll see that there is an add-on to EP4 to support the product type bookx. That code takes an approach like this. The individual that worked hard to put it together. Thing is, as anticipated because of taking this "do it all at once" approach the processing is slow. At one point the thought was expressed that it is somehow ZCs fault, but it has nothing to do with ZC as one can see in review of the EP4 code EP4 more directly interfaces with mySql than it does with ZC and ZC doesn't "control" mySql, just interfaces with it.

The approach that chadderuski took in development of EP4 more closely matches the original database tables and is why such large bulk changes can be made so quickly. There is a "trade-off" of using this approach. For onsey, twosey updates, it may not be worth the effort to split the input to such simple tables and it may be more worth doing the update within ZC. But in mass quantities, EP4 is a huge savings.... just sayin' :P

15 Apr 2016, 1:37 PM
#2365
hamagawa avatar

hamagawa

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

The first time when I access .../easypopulate_4.php, it show this.
Attachment 16213

Then I edit easypopulate_4.php and remove line 100.
Attachment 16214

And the pages is working now.
Attachment 16215

What wrong actually? Any solution to solve this other than I remove line 100?
Thank you.

15 Apr 2016, 1:44 PM
#2366
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

The first image didn't provide any useful information to diagnose the problem, but having removed the require for the language file and seeing the results of removing the language's load line, it would appear that you're missing the language file in the admin/languages/YOUR_LANGUAGE/ directory...

Also, the code could be written to check for the existence of the language file and if not found default to the English language like other aspects of ZC. I'll add that to the list of changes for the next change.

22 Apr 2016, 5:36 PM
#2367
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I am trying to import a file I exported just to test and which I click import I just get a blank page. I have tried searching this thread but I was unabel to find a similar problem.

Install of Zen Cart and easy populate are both freshly installed yesterday

Contents of the file are as such
for some reason I cannot attach the file so sorry this is the only way I can figure how to display it.

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
RM1-1043-000B	1		RM1-1043-000B	HP LaserJet 4345mfp Fuser Assembly					0	0	0	0	1	1	0	0		4/22/2016 16:18	50		Printers & Printer Parts	--none--	1	0	0	0	0	0			

Thank you in advance!

22 Apr 2016, 5:45 PM
#2368
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

From where did you obtain the EP4 fileset?

Is the information above copied from the file itself (.csv file) or from your data sheet editor?

A blank screen should result in an error log being generated in the logs directory. Feel free to post the contents, but also be sure to obscure your admin folder name (replace with admin).

22 Apr 2016, 6:12 PM
#2369
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I downloaded from github p[age

the error in log is

[22-Apr-2016 18:10:35 UTC] PHP Fatal error: Call to undefined function mb_strlen() in /chroot/home/azcompu1/azcomputing.co/html/XXXXX/easypopulate_4_import.php on line 950

The information is pulled from the csv file created by an export

mc12345678:

From where did you obtain the EP4 fileset?

Is the information above copied from the file itself (.csv file) or from your data sheet editor?

A blank screen should result in an error log being generated in the logs directory. Feel free to post the contents, but also be sure to obscure your admin folder name (replace with admin).

22 Apr 2016, 6:40 PM
#2370
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

Would that be from the page referenced in the first post of this thread? If so, good. :) I'm working on a few changes and let's me know that it is a stable version being reported.

Interesting that the last report of a mb_ related function didn't include any issue with that function, but might as well do something to address it.

If you open admin/easypopulate_4_import.php then search for:

if (mb_strlen($v_products_name[$l_id]) > $products_name_max_len) {

Replace with:

if ((function_exists('mb_strlen') && mb_strlen($v_products_name[$l_id]) > $products_name_max_len) || (!function_exists('mb_strlen') && strlen($v_products_name[$l_id]) > $products_name_max_len)) {

This way, if mb_strlen exists, the comparison will be made using a multi-byte string length function, and if not then the length will be determined by the standard strlen function.

22 Apr 2016, 6:45 PM
#2371
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Yes on the first page of this post , that seemed to advance past this line and on to the next!

[22-Apr-2016 18:44:00 UTC] PHP Fatal error: Call to undefined function mb_strlen() in /chroot/home/azcompu1/azcomputing.co/html/XXXXX/easypopulate_4_import.php on line 979

22 Apr 2016, 7:23 PM
#2372
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I fixed several errors by using the code you gave, now I get a different error...

[22-Apr-2016 19:19:43 UTC] PHP Fatal error: Call to undefined function mb_split() in /chroot/home/azcompu1/azcomputing.co/html/XXXXX/easypopulate_4_import.php on line 1112

22 Apr 2016, 7:43 PM
#2373
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

AZComp:

Yes on the first page of this post , that seemed to advance past this line and on to the next!

So I updated one of the branches that I am working on, but the specific code changes (line numbers do not agree with the ZC version) are provided at this commit

22 Apr 2016, 7:46 PM
#2374
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

AZComp:

I fixed several errors by using the code you gave, now I get a different error...

Comment out line 1112 by adding ```
//



Text you are looking for is at line 1112: 

$categories_names_array[$lang['id']] = mb_split(preg_quote($categories_delimiter), $items[$filelayout['v_categories_name_' . $lang['id']]]);


I'll come up with a better solution than that later, but let's get you going. :)
22 Apr 2016, 8:09 PM
#2375
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Thank you for all of your help! One more strlen edit and im working, imported 6000 items!

22 Apr 2016, 8:36 PM
#2376
azcomp avatar

azcomp

New Zenner

Join Date:
Feb 2010
Posts:
63
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I do get the following errors, and it is missing about 80 lines of products

File Import Completed.
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

[22-Apr-2016 20:34:32 UTC] PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /chroot/home/azcompu1/azcomputing.co/html/xxxxxxx/easypopulate_4_import.php on line 765
[22-Apr-2016 20:34:32 UTC] PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /chroot/home/azcompu1/azcomputing.co/html/xxxxxxx/easypopulate_4_import.php on line 1470

22 Apr 2016, 11:35 PM
#2377
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

AZComp:

I do get the following errors, and it is missing about 80 lines of products

Sorry I didn't see this earlier (last message I had received was the one before this because I had not visited the site between posting of the two recent messages).

Actually the error log that is discussed in that window is the debug.txt file that is now included in your list of files when accessing the admin panel for EP4...

This is most likely a result of data existing in the file that is not "escaped"... Be nice to see what is in that log to understand what was returned to cause this error so that it can be prevented in the future.

23 Apr 2016, 11:25 AM
#2378
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

Another thing, very minor in nature. When posting code content for example, in the future could you please use the # button instead of the quote (balloon) button? When replying to the above messages the content has been removed, and from past experience, if I try to copy and paste directly from the screen with my current device, it adds a hashtag for each space. Long story short, it would make directly referencing a piece of provided information easier if the code button (#) were used instead. :)

27 Apr 2016, 9:51 PM
#2379
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

After successfully getting our store online and using easy populate for a good number of years, we had done some core upgrades and got away from using it in 2008. We are now needing to do mass updating to most of our products and we have installed the newest version on our 1.5.4 store as it was packaged.

As a result of our SEO reports we are finding that we not only need to edit product titles but we also need to edit model numbers and descriptions. We noticed that there is the ability to export using our products_ID as the primary key. When selecting just that and exporting various data, what is missing from each of them is the V_products_ID column.

We added products_ID to the custom export field and we are now getting that Collumn in our exports.

However, after editing a couple of products for title name and model number and attempting a test import, the import results in zero products being updated. If we change the primary key back to model number and edit and import, Then the import updates products successfully, however, if we change the model number it creates the product as a new product and duplicates it in our product database.

We now understand that if the primary key is the model number and the model number is changed it will result in a new product being created. Is there something I am missing in the configuration set up or is this a bug that the products_ID export does not import?

Thank you for any time and consideration to this issue…

27 Apr 2016, 10:08 PM
#2380
carbonless avatar

carbonless

Zen Follower

Join Date:
Jan 2007
Location:
Illinois, USA
Posts:
329
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Side note: we are not getting any errors displayed when trying to import the file that was exported with the products_ID column. Additionally the few changes that we did make did not increase the length of the title or model numbers.