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

EasyPopulate 4.0 Support Thread

Sticky

Views: 733,321

Results 1,981 to 2,000 of 3,671
15 Jun 2015, 3:30 AM
#1981
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

EasyPopulate 4.0 Support Thread

lruskauff:

It has been a few years since I used ezpopulate but I remember it showing the records as they came in, or the products I should say. You can also use phpmyadmin from you cpanel to see if anything was entered but it prob wasn't if you don't see anything.

Did you try adding one or two items into zencart directly and then using ezpopulate to export the data? You can then use this as a master file to compare w the file u are using.

I actually did exactly this to start it out. This is why I'm pretty surprised that nothing happened. I added a few items to my catalog, defined the categories I would be using, then exported a csv with EP4. I then appended the rest of my catalog to that csv following the format that was already there. That was what I uploaded with EP4 into my catalog.

15 Jun 2015, 4:01 AM
#1982
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I'm actually going to install it tomorrow because I once again need it so I will let you know if I run into the same thing. Maybe someone can help before then. You might want to add some more into too. Hope you solve it soon.

Linda

15 Jun 2015, 4:35 AM
#1983
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

I got it to work! Stupid mistake on my part, I had messed up the csv formatting somewhere along the way. Not sure when or how, but it's probably what I get for trying to do the export past 2am.

15 Jun 2015, 5:48 AM
#1984
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Glad to hear that. If it was anything specific, please share. I may run into the same problem tomorrow.

15 Jun 2015, 5:57 AM
#1985
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

lruskauff:

Yes, more details are needed. But I was just directing them to something they could try themselves. Not sure why you quoted me?

There was no reason for two people to say the same thing two different ways when the one was fine as it was and appeared to be more than likely the cause.

But see now that something else came into play as well, but yes the suggestion was to start from the beginning and be descriptive as possible to support quick and straightforward resolution.

Glad all is working so far for all. :)

15 Jun 2015, 6:25 AM
#1986
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Location:
WA
Posts:
559
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

MS12345678: I'm sorry, I didn't see any other response. I must not have gone back thru the thread enough. I just finally figured out ( or thought I did ) how things are layed out in the forum. Maybe I'll try another view. Thank you for the help.

15 Jun 2015, 6:45 AM
#1987
tk42one avatar

tk42one

New Zenner

Join Date:
Jun 2015
Posts:
27
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

lruskauff:

Glad to hear that. If it was anything specific, please share. I may run into the same problem tomorrow.

Nothing specific. The instructions are clear enough and if followed it should turn out fine. Like I said earlier, I was just working super late and probably saved it wrong or something.

15 Jun 2015, 12:17 PM
#1988
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

lruskauff:

MS12345678: I'm sorry, I didn't see any other response. I must not have gone back thru the thread enough. I just finally figured out ( or thought I did ) how things are layed out in the forum. Maybe I'll try another view. Thank you for the help.

No apologies necessary for offering assistance to another. Not sure what other "view" you are considering.

In regards to the issue that was supported, the description of reproducing the problem was not really there, indicating the need to "start from scratch", which ws suggested. After that the and had further input not been provided, the list of possibilities of the problem's cause expand significantly and one reason why I posted the way I did. :)

Round thing about it is that based on other posts, I recognize the concerns about posting etiquette, none of which appears to be an issue here.

16 Jun 2015, 12:40 AM
#1989
hugostiglitz avatar

hugostiglitz

New Zenner

Join Date:
Mar 2015
Location:
Queensland, Australia
Posts:
11
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Just checking in to see if there is any movement on the v_options_values_price_w issue?

Thanks,

17 Jun 2015, 5:43 PM
#1992
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Spent a day bashing my head on importing price breaks and finally conceded defeat :-)

I started using the lastest EP from github on ZenCart 1.54 - I have been using variations for a long time. I also tried the 4.0.29 update without any success either.

I have a script that parses my data and exports to the appropriate format - spent a long doing that when I first started and have had it down to a fine art until now.

I can easily bulk import the basic records but when it comes to the price breaks it appears to import correctly, but when you look at a product there is no additional pricing. I have tried making sure the file is identical to the original - even making sure that it renders numerals to 3 decimal places.

If I manually add a few prices to a product and then EXPORT from ZenCart, or just import without, I can manually adjust the prices in a plain text editor and it imports the changes back. But despite appearing to completely replicate the file, if I try with my own clean file, it fails (with no apparent errors)

I have posted a couple of demo files here :

http://www.reetspetit.com/Other

The first 3 starting 2015_ are the 3 generated from my code.

2015_Full-EP_Products15_06_17-184924.csv - this will import OK
2015_Remove_file_Products15_06_17-184924.csv - this works OK
2015_PriceBreaks-EP_Products15_06_17-184924.csv - this will not modify the prices or add quantity discounts

PriceBreaks-EP2015Jun17-192419.csv - export from the above imports
PriceBreaks-EP-edited.csv - manually edited. This WILL add/change prices

If you diff 2015_PriceBreaks-EP_Products15_06_17-184924.csv and PriceBreaks-EP-edited.csv the only difference are the prices, and the 'Edited' file was done manually using mcedit.

There is no obvious difference that I can see.....

Any help gratefully appreciated !

B. Rgds
John

17 Jun 2015, 6:01 PM
#1993
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

Code "response" for some opertions are filename dependent.

This is described in the instructions.

17 Jun 2015, 6:36 PM
#1994
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

mc12345678:

Code "response" for some opertions are filename dependent.

This is described in the instructions.

From README.txt:

  1. File names act as a switch inside the script for Importing. Namely: PriceBreaks-EP, CategoryMeta-EP, Featured-EP, SBA-Stock-EP, and Attrib-Basic-EP/Attrib-Detailed-EP ... these import files must have names that start with this string.
17 Jun 2015, 8:10 PM
#1995
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

Oh FFS ^&(("$&()£&%(^&"$*(^""$( swear bang crash.

Sorry - I have been using the same format for some time - probably 4 years - and just had not realised that it had changed. Thank you pointing it out.

I had read the 'README.txt' but must have glazed over the filename - when you look at it on github, the end of the line is missed off so I only saw :

"5) File names act as a switch inside the script for Importing. Namely: PriceBreaks-EP, CategoryMeta-EP, Featured-EP, SBA-S"

So I wrongly assumed that it was the same rule as before and that so long as the file name CONTAINED this it would be OK.

I even started debugging and saw that it picked up the file as an import file and didn't see any other errors whilst it was processing.

Can I make a suggestion that there should be some form of sanity checking on the filename ? As far as I could see it all went through OK and reported that it had succeeded in the import, which obviously is a complete lie.

If I can figure where to do it I'll try and do a patch myself.

Thanks for the rapid response.

B. Rgds
John

17 Jun 2015, 8:47 PM
#1996
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

Yosameti Sam at his worst. :)

I pulled that from the bottom of the github screen.

What I see can be done, though the code structure doesn't necessarily support such a clear separation of function is to provide notification on import of which "filetype" is being processed.

Alternatively and probably more user friendly/understandable is to have in the admin panel different "windows" ssociated with each filetype by name... An example of the expected filenme prefix shown.

That I think would take things the step further that would help those that have not read the instructions.

Btw, if 5 waas the last one to see/read, then there is a lot to go. The file is included in the download so should be able to read it from desktop.

17 Jun 2015, 9:28 PM
#1997
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

LOL :-)

I think I start to understand.

It all starts to go wrong at this point in the import file :

1407 if ( strtolower(substr($file['name'],0,14)) == "pricebreaks-ep") {

First, that is probably a change from the version I was using and does indeed only check the START of the filename string whereas before it parsed the whole string probably something like this :

$filename = "test-file-pricebreaks-EP-myname.csv";

if (stristr($filename,"pricebreaks-ep")) {
echo "We found it";
}

That is case insensitive and find the filename anywhere in the string.

Second is that that if it FAILS that test, it jumps through to 1459 and carries on regardless... arrrrggghhhh !!!!!!!! That means it misses some vital bits, but still appears to work.

That is really bad..... it ought to gracefully die and notify the user that 'Filename is incorrect" when it fails the file check (and that occurs in several places). I'm no php coder, but it ain't rocket science....

Not sure how you want to fix it, but it is badly broken :-)

Happy to test anything if you want to try and resolve it.

B. Rgds
John

17 Jun 2015, 10:58 PM
#1998
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: EasyPopulate 4.0 Support Thread

So, in a way I beg to differ that it is broken... That is akin to renaming a zip file of a text document to have an extension of .txt, then trying to open the document in a standard text editor expecting to be able to read the text as originally written.

File opens fine, there is some content provided, but it all did not work as "expected"...

EP4 was written to offer some greater flexibility, assuming that the operator(s) followed the instructions...

Sure, the filenaming could check for presence of words, but then it will be that the chosen text is "wrong", then ever more users will have to change their filename convention after that change.

Okay, all that aside, with the current filenme convention, when a directory is sorted by filename, each file "type" remains together and actully is sorted by date, so "restoration" of a state is easily identifiable. Then there is the saving of a modified file, go to the end of the filename, and do what is desired with it. If the files are sorted by modified date, the the result similar to prefixing the file with a date is obtained, identifying what file was changed and when. Presumably shortly after the change, the file is uploaded to effect the change. An added benefit of the "loose" action within the code is that fields that are not routinely a part of one of the special cases can also be included and will be processed. There are though some things that are relatively specific to the special name mostly requiring different queries compared to the product/product description.

Lastly, the code is modifiable to suit unique desires/needs. The code suggested could be individually incorporated, but in the grand ease of use and instruction, to me I struggle to see how that would provide an overall improvement.

18 Jun 2015, 12:59 PM
#1999
reetp avatar

reetp

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

Re: EasyPopulate 4.0 Support Thread

No, it is much simpler than that.

Your analogy is wrong - it is like opening a zip with a text editor, the editor allowing you to open the file, and edit it...... without throwing an error !

If a decision process runs and does not complete correctly for whatever reason then an error should be thrown advising the user. The assumption is the user is dumb (that's me !) and everything you can do to stop them making stupid errors should be encouraged - hence a million different error checks throughout Zencart.

In this instance the filename was incorrect which caused the program to carry on and report that everything was OK when clearly it wasn't.... (the data was right - just the filename being wrong)

That cost me a day of running around based on information reported by the process that was clearly wrong. It said it worked, when clearly it had not. That isn't right.

I'm not trying to be negative - I'd just like to see the code improved to the benefit of all as it is an indispensable tool for Zencart.

Here's a patch to check the filenames and log an error - it may not be perfect but it is about there - also miles quicker than running through all the code for a simple failure :-)

You can see my comment line - sometimes it checks for the filename, others it does a anything else check with <>

Either way, if the name is checked at the start then it gives a fast response to the problem. If you have new sections / filenames then just add the name to the array. Using stristr would give you more flexibility as per my note, but I have left as is for now.

It's also dead simple.....

--- easypopulate_4_import-orig.php 2015-06-18 11:18:05.000000000 +0200
+++ easypopulate_4_import.php 2015-06-18 14:00:21.000000000 +0200
@@ -8,6 +8,37 @@

$file = array('name' => $_GET['import']);
$display_output .= sprintf(EASYPOPULATE_4_DISPLAY_LOCAL_FILE_SPEC, $file['name']);

+/*

    • These are the filenames that we look for

+strtolower(substr($file['name'],0,11)) == "featured-ep")
+strtolower(substr($file['name'],0,15)) == "attrib-basic-ep"
+strtolower(substr($file['name'],0,18)) == "attrib-detailed-ep")
+strtolower(substr($file['name'],0,15)) == "sba-detailed-ep")
+strtolower(substr($file['name'],0,12)) == "sba-stock-ep")
+strtolower(substr($file['name'],0,15)) <> "categorymeta-ep")
+strtolower(substr($file['name'],0,7)) <> "attrib-")
+strtolower(substr($file['name'],0,4)) <> "sba-")
+strtolower(substr($file['name'],0,14)) == "pricebreaks-ep")
+*/
+
+
+$fileNameArray = array ("featured-ep", "attrib-basic-ep", "attrib-detailed-ep", "sba-detailed-ep", "categorymeta-ep", "attrib-", "sba-", "pricebreaks-ep");
+$discoveredFile = false;
+
+foreach ($fileNameArray as $key) {
+

  • $length = strlen ($key);
  • // probably better to do stristr but all the lines then need changing further down
  • if (strtolower(substr($file['name'],0,$length)) == $key) {
  •   $discoveredFile = true;
    
  •   }
    

+}
+
+if ($discoveredFile == true) { // we'll proceed

$ep_update_count = 0; // product records updated 
$ep_import_count = 0; // new products records imported

@@ -1637,5 +1668,17 @@
} else {
$messageStack->add("File Import Completed.", 'success');
}
+}
+else {

  • $display_output .= '<h3>Finished Processing Import File</h3>';
  • $display_output .= '<br /><h3 style="color:red">Filename is wrong</h3> ';
  • $display_output .= '<br />Please check that the filename <b>starts</b> with the correct term';
  • $display_output .= '<br />The following are the permissible names :';
  • foreach ($fileNameArray as $key) {
  •   $display_output .= "<br />" . $key;
    
  • }
  • $messageStack->add("File Import Failed.", 'error');

+} // End file check loop
} // END FILE UPLOADS
-?>
\ No newline at end of file
+?>

And a small patch to easypopulate.php itself to clear a small warning that was annoying me :-)

--- easypopulate_4-orig.php 2015-06-17 19:03:42.000000000 +0200
+++ easypopulate_4.php 2015-06-18 14:47:28.000000000 +0200
@@ -28,9 +28,9 @@
$ep_music = (int)EASYPOPULATE_4_CONFIG_MUSIC_DATA; // 0-Disable, 1-Enable
$ep_uses_mysqli = (PROJECT_VERSION_MAJOR > '1' || PROJECT_VERSION_MINOR >= '5.3' ? true : false--- easypopulate_4-orig.php 2015-06-17 19:03:42.000000000 +0200
+++ easypopulate_4.php 2015-06-18 14:14:01.000000000 +0200
@@ -30,7 +30,7 @@

@set_time_limit($ep_execution); // executin limit in seconds. 300 = 5 minutes before timeout, 0 means no timelimit

-if (!$error) {
+if (!isset($error)) {
$upload_max_filesize=ini_get("upload_max_filesize");
if (preg_match("/([0-9]+)K/i",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]*1024;
if (preg_match("/([0-9]+)M/i",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]10241024;);

-@set_time_limit($ep_execution); // executin limit in seconds. 300 = 5 minutes before timeout, 0 means no timelimit
+@set_time_limit($ep_execution); // execution limit in seconds. 300 = 5 minutes before timeout, 0 means no timelimit

-if (!$error) {
+if (!isset($error)) {
$upload_max_filesize=ini_get("upload_max_filesize");
if (preg_match("/([0-9]+)K/i",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]*1024;
if (preg_match("/([0-9]+)M/i",$upload_max_filesize,$tempregs)) $upload_max_filesize=$tempregs[1]10241024;

I'd have a go on github but not very experienced with it.... and I am not sure which repo to follow - is chaddro still working on this ?

B. Rgds
John

21 Jun 2015, 3:13 PM
#2000
ranger_lp avatar

ranger_lp

Zen Follower

Join Date:
Feb 2004
Location:
New York
Posts:
269
Plugin Contributions:
1

Re: EasyPopulate 4.0 Support Thread

Did anyone ever come up with a fix for this being displayed on the bottom of the page?

. https://www.evoluted.net Layout: Manny . https://www.tenka.co.uk REQUIREMENTS ============ This script requires PHP and GD2 if you wish to use the thumbnail functionality. INSTRUCTIONS ============ 1) Unzip all files 2) Edit this file, making sure everything is setup as required. 3) Upload to server 4) ?????? 5) Profit! CONFIGURATION ============= Edit the variables in this section to make the script work as you require. Start Directory - To list the files contained within the current directory enter '.', otherwise enter the path to the directory you wish to list. The path must be relative to the current directory. / $startdir = DIR_FS_CATALOG . $tempdir; / Show Thumbnails? - Set to true if you wish to use the scripts auto-thumbnail generation capabilities. This requires that GD2 is installed. / $showthumbnails = true; / Show Directories - Do you want to make subdirectories available? If not set this to false / $showdirs = true; / Force downloads - Do you want to force people to download the files rather than viewing them in their browser? / $forcedownloads = false; / Hide Files - If you wish to hide certain files or directories then enter their details here. The values entered are matched against the file/directory names. If any part of the name matches what is entered below then it is now shown. / $hide = array( 'dlf', 'index.php', 'Thumbs', '.htaccess', '.htpasswd', 'fileList.php' ); / Show index files - if an index file is found in a directory to you want to display that rather than the listing output from this script? / $displayindex = false; / Allow uploads? - If enabled users will be able to upload files to any viewable directory. You should really only enable this if the area this script is in is already password protected. / $allowuploads = false; / Overwrite files - If a user uploads a file with the same name as an existing file do you want the existing file to be overwritten? / $overwrite = false; / Index files - The follow array contains all the index files that will be used if $displayindex (above) is set to true. Feel free to add, delete or alter these / $indexfiles = array ( 'index.html', 'index.htm', 'default.htm', 'default.html' ); / File Icons - If you want to add your own special file icons use this section below. Each entry relates to the extension of the given file, in the form => . These files must be located within the dlf directory. / $filetypes = array ( 'png' => 'jpg.gif', 'jpeg' => 'jpg.gif', 'bmp' => 'jpg.gif', 'jpg' => 'jpg.gif', 'gif' => 'gif.gif', 'zip' => 'archive.png', 'rar' => 'archive.png', 'exe' => 'exe.gif', 'setup' => 'setup.gif', 'txt' => 'text.png', 'htm' => 'html.gif', 'html' => 'html.gif', 'fla' => 'fla.gif', 'swf' => 'swf.gif', 'xls' => 'xls.gif', 'doc' => 'doc.gif', 'sig' => 'sig.gif', 'fh10' => 'fh10.gif', 'pdf' => 'pdf.gif', 'psd' => 'psd.gif', 'rm' => 'real.gif', 'mpg' => 'video.gif', 'mpeg' => 'video.gif', 'mov' => 'video2.gif', 'avi' => 'video.gif', 'eps' => 'eps.gif', 'gz' => 'archive.png', 'asc' => 'sig.gif', ); / That's it! You are now ready to upload this script to the server. Only edit what is below this line if you are sure that you know what you are doing! */ error_reporting(0); if(!function_exists('imagecreatetruecolor')) $showthumbnails = false; $leadon = $startdir; if($leadon=='.') $leadon = ''; if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/'; $startdir = $leadon; if($_GET['dir']) { //check this is okay. if(substr($_GET['dir'], -1, 1)!='/') { $_GET['dir'] = $_GET['dir'] . '/'; } $dirok = true; $dirnames = split('/', $_GET['dir']); for($di=0; $di
File
Size
Last Modified
'.$files[$i].''; $thumb2 = ' onmouseover="o('.$i.', ''.urlencode($leadon . $files[$i]).'');" onmouseout="f('.$i.');"'; } if($filetypes[$ext]) { $icon = $filetypes[$ext]; } $filename = $files[$i]; if(strlen($filename)>43) { $filename = substr($files[$i], 0, 40) . '...'; } $fileurl = $leadon . $files[$i]; if(!$forcedownloads) { $fileurl = $_SESSION['PHP_SELF'] . '?dir=' . urlencode($leadon) . '&download=' . urlencode($files[$i]); } $fileurl = "../".$tempdir.$files[$i]; ?>
0KB
Jan 01 1970 01:00:00 AM

Thanks in advance

Tony