Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
jimmie
i have a custom field in products table called barcode(also known as UPC), when i export this field the values look like this 7.34995E+11, and it imports like this
In what application does it change to that? I would not expect the CSV file downloaded from the server and opened with a plain text editor to look like that. If the spreadsheet program is used, then it appears that this column should be identified to be treated as text upon import rather than numbers if it allows.
Re: EasyPopulate 4.0 Support Thread
i open it with microsoft excel
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
jimmie
i open it with microsoft excel
Definitely Excel is taking that long set of numbers and changing the display of them scientific. That column though should be treated as text on import.
I did an Internet search for: excel import csv column as text
And came up with a lot of good results.
Re: EasyPopulate 4.0 Support Thread
Im trying to set up a simple cron job to import a CSV.
However, upon trying to run the command php ep4_cron.php import=myproducts.csv, the system throws a bunch of these types of errors.
Notice: Undefined index: securityToken in [myadmin]/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE' in easypopulate_4_import.php on line 2493
Any thoughts on how to properly get this to work? There doesnt not seem to be much of any documentations at all.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chibipaw
Im trying to set up a simple cron job to import a CSV.
However, upon trying to run the command php ep4_cron.php import=myproducts.csv, the system throws a bunch of these types of errors.
Notice: Undefined index: securityToken in [myadmin]/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE' in easypopulate_4_import.php on line 2493
Any thoughts on how to properly get this to work? There doesnt not seem to be much of any documentations at all.
It's relatively new and incorporated to help someone that had asked for the possibility and didn't know how to put together the bits that would be necessary for its execution, so yes, little to no documentation other than what is in the file itself.
As for the warnings received, that's because the language file is not pulled into the cron and not into the import portion. Furthermore it's because the import file does more than just import, it also prepares text to be exported, but does not actually export text.
So, to get those messages to go away, I am thinking the following would work.
In line 332 of admin/ep4_cron.php add the following:
Code:
if (isset($_SESSION['language']) && file_exists(DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/easypopulate_4.php')) {
require DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/easypopulate_4.php';
} else {
require DIR_FS_ADMIN . DIR_WS_LANGUAGES . 'english'. '/easypopulate_4.php';
}
With the require for the import file being at line 339 as it may seem.
My ISP is having some serious issues so I am limited on what I can test, confirm, and manipulate basically by what my cell phone can do or what can be done with limited cell phone data tethering.
Re: EasyPopulate 4.0 Support Thread
Looks likes that bit of code actually worked.
Still spews a lot of similar errors, but the csvs were processed. I'll just redirect the garbage into /dev/null and hope it will get clean up at some point.
The good thing is, it's working.
Now that we're on the topic of automation. Any thoughts about crontabbing status of categories ?
I'm thinking of doing something like this right after the cron ep4_cron job to toggle the status of the category.
mysql --user=[username] --password=[password] < [script pathway]
覧覧祐CRIPT覧覧覧
update products set catagories_status=1 where catagories_id = [product to be toggled];
Quote:
Originally Posted by
mc12345678
It's relatively new and incorporated to help someone that had asked for the possibility and didn't know how to put together the bits that would be necessary for its execution, so yes, little to no documentation other than what is in the file itself.
As for the warnings received, that's because the language file is not pulled into the cron and not into the import portion. Furthermore it's because the import file does more than just import, it also prepares text to be exported, but does not actually export text.
So, to get those messages to go away, I am thinking the following would work.
In line 332 of admin/ep4_cron.php add the following:
Code:
if (isset($_SESSION['language']) && file_exists(DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/easypopulate_4.php')) {
require DIR_FS_ADMIN . DIR_WS_LANGUAGES . $_SESSION['language'] . '/easypopulate_4.php';
} else {
require DIR_FS_ADMIN . DIR_WS_LANGUAGES . 'english'. '/easypopulate_4.php';
}
With the require for the import file being at line 339 as it may seem.
My ISP is having some serious issues so I am limited on what I can test, confirm, and manipulate basically by what my cell phone can do or what can be done with limited cell phone data tethering.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
chibipaw
Looks likes that bit of code actually worked.
Still spews a lot of similar errors, but the csvs were processed. I'll just redirect the garbage into /dev/null and hope it will get clean up at some point.
The good thing is, it's working.
Now that we're on the topic of automation. Any thoughts about crontabbing status of categories ?
I'm thinking of doing something like this right after the cron ep4_cron job to toggle the status of the category.
mysql --user=[username] --password=[password] < [script pathway]
—————SCRIPT——————
update products set catagories_status=1 where catagories_id = [product to be toggled];
Don't know why, but I kind of get the feeling that the concept of open source *community* is not fully understood...
The error messages/problems won't fix themselves and probably will go undiscussed/undiscovered for quite a while if 1) everyone follows suit with dumping the "garbage" and 2) not providing the log files to potentially allow correction of the issue(s). Sure the issue could still be on either side (the code or the server), but one will never know if the information is not shared. I had thought that my previous description of the origin of this code section would encourage discussion rather than just ignoring what is going on.
All that aside, the query suggested won't do what is desired or thought unless that "simple" line is to get intrepretted correctly based on what is provided.
The status of a category is in the categories table. The status of a product is in the products table. A category's status condition is or can be independent of the product. Adjusting the product's condition based on the category being modified potentially has some nuances as a product can have a category as its master category or it can be linked to the category with some other category being the master. In either case, changing the status of the product changes it in all locations. If the desire is to "hide" a product from a specific category but not everywhere, then the products_to_categories table may need adjustment to remove the link from the product to that category or to change the master category as part of that.
Just understand that the overall desire is always to resolve issues and not ignore them. The easiest thing to do on your side is to provide back logs (with the admin directory obscured) so that at least if there is something amiss with the code it can be corrected whether you adopt the changes or not.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Don't know why, but I kind of get the feeling that the concept of open source *community* is not fully understood...
The error messages/problems won't fix themselves and probably will go undiscussed/undiscovered for quite a while if 1) everyone follows suit with dumping the "garbage" and 2) not providing the log files to potentially allow correction of the issue(s). Sure the issue could still be on either side (the code or the server), but one will never know if the information is not shared. I had thought that my previous description of the origin of this code section would encourage discussion rather than just ignoring what is going on.
All that aside, the query suggested won't do what is desired or thought unless that "simple" line is to get intrepretted correctly based on what is provided.
The status of a category is in the categories table. The status of a product is in the products table. A category's status condition is or can be independent of the product. Adjusting the product's condition based on the category being modified potentially has some nuances as a product can have a category as its master category or it can be linked to the category with some other category being the master. In either case, changing the status of the product changes it in all locations. If the desire is to "hide" a product from a specific category but not everywhere, then the products_to_categories table may need adjustment to remove the link from the product to that category or to change the master category as part of that.
Just understand that the overall desire is always to resolve issues and not ignore them. The easiest thing to do on your side is to provide back logs (with the admin directory obscured) so that at least if there is something amiss with the code it can be corrected whether you adopt the changes or not.
Trust me I know the nature of open source projects But I dont think lecturing people will improve upon it the nature of it.
At least I posted a excerpt of the logs, could have been simply nothing like most people.
But Ooof, lets move on.
Anyways, I've gotten the category toggling working with the bit of mysql script listed earlier. Lets consider that incident closed.
Focusing back to ep4_cron.php. Since Im not a coder, I'll leave this for those who are more capable than I am.
ZC: 1.5.5f
AWS Linux 4.14.146-93.123.amzn1.x86_64 #1 SMP
DB: MariaDB 10.3.8
Php 7.1.32
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Constant BOX_CONFIGURATION_REWARD_POINTS already defined in /home/shopping/fakeadmin/includes/languages/english/extra_definitions/reward_points_definitions.php on line 5
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Constant TEXT_PREVIOUS_EXPORTS already defined in /home/shopping/fakeadmin/includes/languages/english/extra_definitions/shipping_export.php on line 33
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Constant EP4_ADMIN_TEMP_DIRECTORY already defined in /home/shopping/fakeadmin/ep4_cron.php on line 84
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_SPECIALS_HEADING - assumed 'EASYPOPULATE_4_SPECIALS_HEADING' in /home/shopping/fakeadmin/ep4_cron.php on line 124
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_SHORT_DESC - assumed
'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_SHORT_DESC' in /home/shopping/fakeadmin/ep4_cron.php on line 175
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_UNIT_MEAS - assumed
'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_UNIT_MEAS' in /home/shopping/fakeadmin/ep4_cron.php on line 179
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_UPC - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_UPC' in /home/shopping/fakeadmin/ep4_cron.php on line 183
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_GOOGLE_CAT - assumed
'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_GOOGLE_CAT' in /home/shopping/fakeadmin/ep4_cron.php on line 187
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_MSRP - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_MSRP' in /home/shopping/fakeadmin/ep4_cron.php on line 191
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_MAP - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_MAP' in /home/shopping/fakeadmin/ep4_cron.php on line 195
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_GP - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_GP' in /home/shopping/fakeadmin/ep4_cron.php on line 199
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_EXCLUSIVE - assumed
'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_EXCLUSIVE' in /home/shopping/fakeadmin/ep4_cron.php on line 203
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_DPM - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_DPM' in /home/shopping/fakeadmin/ep4_cron.php on line 207
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_SBA - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_SBA' in /home/shopping/fakeadmin/ep4_cron.php on line 211
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_CEON - assumed 'EASYPOPULATE_4_DISPLAY_STATUS_PRODUCT_CEON' in /home/shopping/fakeadmin/ep4_cron.php on line 215
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_HEADING - assumed 'EASYPOPULATE_4_DISPLAY_HEADING' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 23
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_LOCAL_FILE_SPEC - assumed 'EASYPOPULATE_4_DISPLAY_LOCAL_FILE_SPEC' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 26
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: v_status in /home/shopping/fakeadmin/easypopulate_4_import.php on line 301
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: in /home/shopping/fakeadmin/easypopulate_4_import.php on line 301
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: v_status in /home/shopping/fakeadmin/easypopulate_4_import.php on line 414
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: in /home/shopping/fakeadmin/easypopulate_4_import.php on line 414
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined variable: v_status in /home/shopping/fakeadmin/easypopulate_4_import.php on line 686
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined variable: v_status in /home/shopping/fakeadmin/easypopulate_4_import.php on line 689
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:07 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT - assumed 'EASYPOPULATE_4_DISPLAY_RESULT_UPDATE_PRODUCT' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 1752
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: v_status in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2281
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2281
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Undefined index: securityToken in /home/shopping/fakeadmin/includes/classes/class.admin.zcObserverLogEventListener.php on line 158
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_TITLE' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2493
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_RECORDS_UPDATE - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_RECORDS_UPDATE' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2520
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_RECORDS_IMPORT - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_RECORDS_IMPORT' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2522
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_ERRORS - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_ERRORS' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2524
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_WARNINGS - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_NUM_WARNINGS' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2526
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_MEM_USE - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_MEM_USE' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2529
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_MEM_PEAK - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_MEM_PEAK' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2531
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Notice: Use of undefined constant EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_EXEC_TIME - assumed 'EASYPOPULATE_4_DISPLAY_IMPORT_RESULTS_EXEC_TIME' in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2537
[26-Oct-2019 23:37:08 America/Los_Angeles] PHP Fatal error: Uncaught Error: Call to a member function add() on null in /home/shopping/fakeadmin/easypopulate_4_import.php:2547
Stack trace:
#0 /home/shopping/fakeadmin/ep4_cron.php(332): require()
#1 {main}
thrown in /home/shopping/fakeadmin/easypopulate_4_import.php on line 2547
Re: EasyPopulate 4.0 Support Thread
Is the 1.56c version now supported?
Re: EasyPopulate 4.0 Support Thread
Is the 1.56c version now supported?