New Zenner
- Join Date:
- Jul 2017
- Location:
- United States
- Posts:
- 10
- Plugin Contributions:
- 0
EasyPopulate 4.0 Support Thread
Reviresco:
She-Loves-Color-Secret-Shop-2021.csv
Still trying to get this to work.
Views: 733,322
New Zenner
Reviresco:
She-Loves-Color-Secret-Shop-2021.csv
Still trying to get this to work.
Totally Zenned
Reviresco:
I've changed the menu option Import Language Override to language_id, and I'm still getting the same result: when I click the Import button, I get redirected to the admin main page and nothing has been imported; also no errors anywhere. This also happens if I click the Delete button.
mc12345678:
What's the name of the file? I am assuming that it has a space in it...
Reviresco:
She-Loves-Color-Secret-Shop-2021.csv
Reviresco:
Still trying to get this to work.
While I have it (version 4.0.36.13/ZC) working with ZC 1.5.7x I am not seeing the above issue(s) occurring... I could see a possible problem if files in a site's directory were in some way "locked" down, for example, clicking the delete button for a file that is prevented from being deleted, possibly. I don't see anything special about the filename that would prevent deletion (as stated typical/historical issues with filenames as far as preventing something from happening) has been spaces in the filename or some other character that is not accepted by the filesystem where the file has been stored.
The only other time that I have seen ZC 1.5.7 respond the way that is described is when a form (user input area) is set to provide information in the browser address bar instead of passing the information along in the background. In EP4 the links that are like this "problem" area are the clickable links below the filters (they export data) and the download link adjacent to each stored filename. Even those in that situation feed back to the same file. Feeding back to the same file actually is a good thing as it actually eliminates a problem.
Perhaps attempt to upload the files again? I know Chadderuski used to suggest verifying file load to include possibly building a temporary site, loading the files to it and then attempt to upload and import the file(s).
Basically either I need to be able to see the issue in action or I need to be able to reproduce it in order to find a solution.
New Zenner
mc12345678:
While I have it (version 4.0.36.13/ZC) working with ZC 1.5.7x I am not seeing the above issue(s) occurring... I could see a possible problem if files in a site's directory were in some way "locked" down, for example, clicking the delete button for a file that is prevented from being deleted, possibly. I don't see anything special about the filename that would prevent deletion (as stated typical/historical issues with filenames as far as preventing something from happening) has been spaces in the filename or some other character that is not accepted by the filesystem where the file has been stored.
The only other time that I have seen ZC 1.5.7 respond the way that is described is when a form (user input area) is set to provide information in the browser address bar instead of passing the information along in the background. In EP4 the links that are like this "problem" area are the clickable links below the filters (they export data) and the download link adjacent to each stored filename. Even those in that situation feed back to the same file. Feeding back to the same file actually is a good thing as it actually eliminates a problem.
Perhaps attempt to upload the files again? I know Chadderuski used to suggest verifying file load to include possibly building a temporary site, loading the files to it and then attempt to upload and import the file(s).
Basically either I need to be able to see the issue in action or I need to be able to reproduce it in order to find a solution.
Here's what the form looks like:
<form name="import_form" action="https://www.mysite.com/my-shop/my-admin/index.php?cmd=easypopulate_4.php" method="post"><input type="hidden" name="securityToken" value="securitytokenhere"><input type="hidden" name="import" value="She-Loves-Color-Secret-Shop-2021.csv"><input type="submit" name="import_button" value="Import"></form>
New Zenner
<form name="import_form" action="https://www.mysite.com/my-shop/my-admin/index.php?cmd=easypopulate_4.php" method="post"><input type="hidden" name="securityToken" value="securitytokenhere"><input type="hidden" name="import" value="She-Loves-Color-Secret-Shop-2021.csv"><input type="submit" name="import_button" value="Import"></form> ```Reviresco:
Here's what the form looks like:
When I change (in the browser console):
index.php?cmd=easypopulate_4.php
to just:
easypopulate_4.php
it works.
What's the best way to change this? Is it a global setting I need to change in Zen Cart? Htaccess? Something else? All the links in the admin "Tools" dropdown menu use the "index.php?cmd=xxxx" format.
Totally Zenned
<form name="import_form" action="https://www.mysite.com/my-shop/my-admin/index.php?cmd=easypopulate_4.php" method="post"><input type="hidden" name="securityToken" value="securitytokenhere"><input type="hidden" name="import" value="She-Loves-Color-Secret-Shop-2021.csv"><input type="submit" name="import_button" value="Import"></form> ```Reviresco:
Here's what the form looks like:
That is the content expected...
Reviresco:
When I change (in the browser console):
index.php?cmd=easypopulate_4.php
to just:
easypopulate_4.php
it works.
What's the best way to change this? Is it a global setting I need to change in Zen Cart? Htaccess? Something else? All the links in the admin "Tools" dropdown menu use the "index.php?cmd=xxxx" format.
Hmmm.. What specific version/sub-version of ZC 1.5.7 is installed?
New Zenner
mc12345678:
That is the content expected...
Hmmm.. What specific version/sub-version of ZC 1.5.7 is installed?
"You are presently using: v1.5.7"
New Zenner
Okay here's how I got it to work:
In easypopulate_4.php, change:
zen_draw_form('import_form', basename($_SERVER['SCRIPT_NAME']), /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL')
to:
zen_draw_form('import_form', FILENAME_EASYPOPULATE_4, /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL')
and also do the same with the forms "delete_form" and "split_form"
Changing basename($_SERVER['SCRIPT_NAME']) to ```
basename($_SERVER['SCRIPT_NAME'], '.php')
Totally Zenned
mc12345678:
That is the content expected...
Hmmm.. What specific version/sub-version of ZC 1.5.7 is installed?
Also, is the file: admin/includes/extra_datafiles/easypopulate_4_filenames.php
having the content:
<?php
// $Id: easypopulate_filenames.php, v4.0.35.ZC.2 10-03-2016 mc12345678 $
define('FILENAME_EASYPOPULATE_4', 'easypopulate_4');
Loaded to the server?
(I'm not where I can test system response without that file, so this is a little bit of a possible reason or as otherwise known: a guess. :))
Totally Zenned
Reviresco:
Okay here's how I got it to work:
In easypopulate_4.php, change:
zen_draw_form('import_form', basename($_SERVER['SCRIPT_NAME']), /$parameters = /'', 'post', /$params =/ '', $request_type == 'SSL')
>
> to:
>
> ```
zen_draw_form('import_form', FILENAME_EASYPOPULATE_4, /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL')
and also do the same with the forms "delete_form" and "split_form"
Changing
basename($_SERVER['SCRIPT_NAME'])to ```
basename($_SERVER['SCRIPT_NAME'], '.php')
The best solution is to upgrade as soon as possible to 1.5.7c. There are a number of corrections that are implemented and considered necessary.
As to "this issue", the correction I believe is located in admin/includes/application_bootstrap.php (with possibility of other areas of the system affected/touched):
changing:
$serverScript = basename($_SERVER['SCRIPT_NAME']);
$PHP_SELF = isset($_SERVER['SCRIPT_NAME']) ? $serverScript : 'home.php';
$PHP_SELF = isset($_GET['cmd']) ? basename($_GET['cmd'] . '.php') : $PHP_SELF;
$PHP_SELF = htmlspecialchars($PHP_SELF);
$_SERVER['SCRIPT_NAME'] = str_replace($serverScript, '', $_SERVER['SCRIPT_NAME']) . $PHP_SELF;
To:
$serverScript = basename($_SERVER['SCRIPT_NAME']);
$PHP_SELF = isset($_SERVER['SCRIPT_NAME']) ? $serverScript : 'home.php';
if (basename($PHP_SELF, '.php') === 'index') {
$PHP_SELF = isset($_GET['cmd']) ? basename($_GET['cmd'] . '.php') : $PHP_SELF;
}
$PHP_SELF = htmlspecialchars($PHP_SELF);
$_SERVER['SCRIPT_NAME'] = str_replace($serverScript, '', $_SERVER['SCRIPT_NAME']) . $PHP_SELF;
There may be other places where a change may be necessary to support the above; however, EP4 has not required the change described above to work in up-to-date systems.
Zen Follower
i notice this is for .csv, i have a supplier that offers an .xml of products, is there a module for these or can this module be altered easily to work with .xml?
New Zenner
I'm afraid I need a bit of advice here. I'm using Easy Populate 4.0.37.13, with the SBA mod. Does anyone know what import/export options in EP I should use to take a category with 300 products, all with 4 or 5 attributes (sizes), all with different stock levels, from one website, and copy it into another website? I foresee problems in that the options and attributes have different id numbers on each site, and I can imagine it all crashing horribly. The export site is on ZC 1.5.7b, the import site on 1.5.7c, both with the correct SBA version, (SBA for 1.5.7b, and SBA for 1.5.7c) and both with EP 4.0.37.13. Are there any steps I should take before attempting it ? Thanks.
Totally Zenned
flappingfish:
i notice this is for .csv, i have a supplier that offers an .xml of products, is there a module for these or can this module be altered easily to work with .xml?
"Easily" would be a matter of perspective; however, I can envision where the current "file read" code may be positioned to a function with some "trigger" being added to identify what the source is for the filetype and support properly moving through the file. While this operation is perhaps easier in newer PHP versions, it remains important to note that the process would work best by stepping into/through the file rather than loading it entirely into memory. The file reading occurs in a few of the modules as well as the main import file. There is also a field delimiter test that is performed against files that may need to be altered to exclude such xml files or provide an equivalent test if necessary.
Totally Zenned
cefyn:
I'm afraid I need a bit of advice here. I'm using Easy Populate 4.0.37.13, with the SBA mod. Does anyone know what import/export options in EP I should use to take a category with 300 products, all with 4 or 5 attributes (sizes), all with different stock levels, from one website, and copy it into another website? I foresee problems in that the options and attributes have different id numbers on each site, and I can imagine it all crashing horribly. The export site is on ZC 1.5.7b, the import site on 1.5.7c, both with the correct SBA version, (SBA for 1.5.7b, and SBA for 1.5.7c) and both with EP 4.0.37.13. Are there any steps I should take before attempting it ? Thanks.
So, the first question is why is the database being "manually" transferred from one site to another by a process other than transferring the entire database?
As far as the concern of matching product and designations, yes that is/would be a concern and for reasons that are described above.
Note also, that the SBA "filter" does not create/remove relationships of product attributes to/from product. It supports modifying the data associated with an existing relationship.
There is guidance in the README about the following: A way to reproduce attributes in one store from another using EP4:
That would at least get the attributes established, but then would need to go generate the SBA relationships. Then would suggest exporting the new SBA relationship file and compare/align data for a proper update.
I'm relatively certain that the question has been asked before in here with details provided. I've spent a little time trying to search on "SBA" or "stock by attributes". There are posts associated to each of those 2 search "terms", but I haven't dug into all/most of them and also haven't cross referenced when the SBA import/export was incorporated to narrow down the window of applicable dates. Maybe if it is found it can be linked back from this area.
New Zenner
Thanks for your reply, mc. The database it's being copied from has 5000 products. There's an easy way to do it. Copied and uploaded the products with EP, used the native function admin/attributes controller/copy options to a whole category, and then just updated stock quantities with EP.
Totally Zenned
cefyn:
Thanks for your reply, mc. The database it's being copied from has 5000 products. There's an easy way to do it. Copied and uploaded the products with EP, used the native function admin/attributes controller/copy options to a whole category, and then just updated stock quantities with EP.
Glad that worked. Note that I had asked the question of why because 1) in following the standard ZC process for updating, the database is retained from one location to the other and 2) understand that if the same content is carried across multiple sites that as far as the internet is concerned, you're competing against yourself and the two sites having the same content will likely (eventually) cause a change in rankings. They may each have the same or different products_id; however, with ranking being content centric these two sites would initially grossly have the same content.
Again, understand that EP4 does not (yet) recreate the SBA variants which can be independently stocked from the total stock of the product. If the variants exist in the database, then yes natively copying should support duplication of the variants that can then be updated with EP4.
New Zenner
The products will be removed from one site after the transfer. You're right, there's no point in having any identical content, it'll get ignored at best. As for the rest of it easier said than done. I can read the downloaded EP files and edit them manually. I was able to get all the products uploaded somehow, but the files that EP is generating are showing "CSV unknown delimiter" and the SBA EP files aren't updating stock. I notice you've discussed something like this before in regards to a Japanese language pack. Manual edit in SBA I'm afraid.
Totally Zenned
cefyn:
The products will be removed from one site after the transfer. You're right, there's no point in having any identical content, it'll get ignored at best. As for the rest of it easier said than done. I can read the downloaded EP files and edit them manually. I was able to get all the products uploaded somehow, but the files that EP is generating are showing "CSV unknown delimiter" and the SBA EP files aren't updating stock. I notice you've discussed something like this before in regards to a Japanese language pack. Manual edit in SBA I'm afraid.
What I've found is this: the product import will likely have invalid csv delimiter reports if the software has not been updated (top right corner should show an update clickable link). The sba import may have a similar report in a given condition, but this is an issue when data is exported and then not "corrected" within the applicable spreadsheet. If exported, downloaded, corrected and then uploaded, the import works. It is resolved in the next update, but I've been preoccupied with something else recently which has delayed my updating of the instruction for distrubution. I can post the fix for the sba issue separately if that is the only csv delimiter issue... Otherwise need to review the first four lines of the csv file tovalidate formatting, delimeter being used, etc. Those are what the software reviews to provide that notification.
If the sba file is showing that it is acceptable to import, but the stock is not being updated, then please identify the process to get the sba file and populating its stock. Even with the csv delimiter issue, I have seen that stock updates. Include discussion of the filename for the import file.
New Zenner
Thanks mc, that worked. I updated the EP database, exported Stock of items with attributes including SBA, corrected quantities, uploaded, imported, and all stock with attributes updated correctly. All files were identified as csv by EP. Thanks for all your work on zen cart, it is very much appreciated.
Totally Zenned
cefyn:
Thanks mc, that worked. I updated the EP database, exported Stock of items with attributes including SBA, corrected quantities, uploaded, imported, and all stock with attributes updated correctly. All files were identified as csv by EP. Thanks for all your work on zen cart, it is very much appreciated.
No problem, glad that it worked... Wondering what needs to be done to "better" identify the need to do that update... The link is normally not present and only shows under specific conditions... I suspect it could be more "flashy" but also is something that should be executed after uploading updated files... :/
New Zenner
I am having an issue with ZC 1.5.7c and EP 4.0.37.13.
I have tried to import categories from 1.3.9h in several languages and got the result "File uploaded Successfully: CategoryMeta-EP2021-08-24-121946.csv Issues with the CSV file delimiter(s)"
Lower in the EP page in the table it says "CSV Unknown Delimiter" and "Import Error".
So I tried to remove all the languages from the categories CSV and left only the main language which is EN and again tried to upload and I get the same result.
Have checked the file in OO and also in Notepad++ to make sure of the delimiter etc'.
Both ZC and EP are latest versions and on SG hosting.
Any ideas?
Fields marked required must be completed.
Tell staff why this post should be reviewed.