Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
If the field along the top of the first row is present, then whatever data is provided below it will be attempted to be applied. If in this case the value is blank, then it will try to store a blank value. Relatively recently almost all fields have been made optional.
I'll take a look to see if that field when blank should default to 0 but the above still generally applies. I'm preparing a new version to post which addresses identified and discovered issues.
Hey!
I just tried to do some testing..
(sorry I forgot to add: Is the latest vers in the first post of this thread? Just so I know I installed the latest one...)
So since the bug log said "MySQLi error 1366: Incorrect integer value: '' for column 'products_discount_type' at row 1"
I added v_products_discount_type in the top field and I entered "0" in the CSV files (just like a majority of the items were entered with I imported the file and checked their fields)
But that threw an error.
Then I though to add products_discount_type into the config>easy pop4>User Defined Products Fields
Then I get another error "MySQLi error 1110: Column 'products_discount_type' specified twice"
Re: EasyPopulate 4.0 Support Thread
As to the other questions, the code does not inspect your admin form to identify anything that may have been added or modified. It was manually put together to consider the base product information with the ability to expand on the use of additional product table fields as user identified fields. So if your additional dimensional fields have been added to the products table then in the EP4 configuration, if you go to the user defined fields you will want to add each desired field. When entering the field(s), separate each by a comma. The field should be entered as shown in the database (do not use the prefix of v_ unless it exists in the database). For example if the field is called products_length, then products_length should be entered in the user defined entry. Export of the products data will produce a v_products_length column and then whatever data is entered into that field for a row will be populated in the database with that information.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
dimsumgurl
Hey!
I just tried to do some testing..
(sorry I forgot to add: Is the latest vers in the first post of this thread? Just so I know I installed the latest one...)
So since the bug log said "MySQLi error 1366: Incorrect integer value: '' for column 'products_discount_type' at row 1"
I added v_products_discount_type in the top field and I entered "0" in the CSV files (just like a majority of the items were entered with I imported the file and checked their fields)
But that threw an error.
Then I though to add products_discount_type into the config>easy pop4>User Defined Products Fields
Then I get another error "MySQLi error 1110: Column 'products_discount_type' specified twice"
What error was thrown when the value of 0 was entered? Did it have to do with the field just below it in the above sql query?
BTW, good testing. That's the point of the first step of the readme.txt file.
Some things can be predetermined and are known to be required a specific way in order for ZC to function. Some things are/can be modified related to a default store and therefore are not "locked in". Again, will look at that field to see what's going on but the way it is supposed to work is to pull the default value(s) from the database and replace whatever default value with whatever is entered in the csv file if the field is provided in the file, otherwise if the field is not present then to not push the value(s) to the database and allow the database to auto-populate the field with the default value if it's a new record or to leave it alone if the record already exists.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
What error was thrown when the value of 0 was entered? Did it have to do with the field just below it in the above sql query?
BTW, good testing. That's the point of the first step of the readme.txt file.
Some things can be predetermined and are known to be required a specific way in order for ZC to function. Some things are/can be modified related to a default store and therefore are not "locked in". Again, will look at that field to see what's going on but the way it is supposed to work is to pull the default value(s) from the database and replace whatever default value with whatever is entered in the csv file if the field is provided in the file, otherwise if the field is not present then to not push the value(s) to the database and allow the database to auto-populate the field with the default value if it's a new record or to leave it alone if the record already exists.
I did two testings:
1. The config>easy pop4>User Defined Products Fields is left blank
I added new column and put v_products_discount_type and below entered "0" for my newly created model number. I get the follow in the error log
PHP Code:
MySQLi error 1366: Incorrect integer value: '' for column 'products_discount_type_from' at row 1
When executing:
INSERT INTO products SET
products_model = 'wooly',
products_type = 1,
products_price = '255', products_image = '',
products_weight = '5',
products_discount_type = '0',
products_discount_type_from = '',
product_is_call = '0',
products_sort_order = '0',
products_quantity_order_min = 1,
products_quantity_order_units = 1,
products_priced_by_attribute = '0',
product_is_always_free_shipping = '0',
products_tax_class_id = 1,
products_date_available = NULL,
products_date_added = '2016-09-26 20:25:00',
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = 5,
master_categories_id = 65,
manufacturers_id = 10,
products_status = '1',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = '0'
2. config>easy pop4>User Defined Products Fields has "products_discount_type" entered
I then exported a copy of the CSV so the v_products_discount_type column shows up.
I do the same thing as in adding a new item etc
I import that file and got error that says
PHP Code:
MySQLi error 1110: Column 'products_discount_type' specified twice
When executing:
INSERT INTO products SET
products_model = 'wooly',
products_type = 1,
products_price = '55', products_discount_type = '0', products_image = '',
products_weight = '6',
products_discount_type = '0',
products_discount_type_from = '',
product_is_call = '0',
products_sort_order = '0',
products_quantity_order_min = 1,
products_quantity_order_units = 1,
products_priced_by_attribute = '0',
product_is_always_free_shipping = '0',
products_tax_class_id = 1,
products_date_available = NULL,
products_date_added = '2016-09-26 20:25:56',
products_last_modified = CURRENT_TIMESTAMP,
products_quantity = 5,
master_categories_id = 65,
manufacturers_id = 10,
products_status = '1',
metatags_title_status = '0',
metatags_products_name_status = '0',
metatags_model_status = '0',
metatags_price_status = '0',
metatags_title_tagline_status = '0'
What i am confused is, how is the integer wrong when all the other items have "0" too??
Re: EasyPopulate 4.0 Support Thread
Slow down a little and rereview the two errors, the one first reported and the one that occurred after resolving the first and before trying to provide the user_defined field.
The first error had to do with: products_discount_type, the second because of products_discount_type_from which is a different field. Originally both had '', then after resolving the first issue, only the second one had ''. Again will look at how both of those fields should behave, but this is/was the first report of that "issue".
As discussed elsewhere here, either those familiar with the plugin have self corrected it, had someone else do so without reporting the issue, have moved on to something else, or have operated in a way that didn't bring that to the surface. Regardless of their reasons, thank you for reporting this.
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
mc12345678
Slow down a little and rereview the two errors, the one first reported and the one that occurred after resolving the first and before trying to provide the user_defined field.
The first error had to do with: products_discount_type, the second because of products_discount_type_from which is a different field. Originally both had '', then after resolving the first issue, only the second one had ''. Again will look at how both of those fields should behave, but this is/was the first report of that "issue".
As discussed elsewhere here, either those familiar with the plugin have self corrected it, had someone else do so without reporting the issue, have moved on to something else, or have operated in a way that didn't bring that to the surface. Regardless of their reasons, thank you for reporting this.
Oh my, Thanks for pointing that out to me. I guess I got tired eyes from looking at too many codes and trying to figure this out for too long I'm not reading the error properly.
I will go back and add the products_discount_type_from field and go from there...
But like you said, if the field isn't in the CSV, it should just default "0" right? Because right now it's basically forcing me to include every field untill it's all complete before it can import a new items that I am trying to transfer from...
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
dimsumgurl
Oh my, Thanks for pointing that out to me. I guess I got tired eyes from looking at too many codes and trying to figure this out for too long I'm not reading the error properly.
I will go back and add the products_discount_type_from field and go from there...
But like you said, if the field isn't in the CSV, it should just default "0" right? Because right now it's basically forcing me to include every field untill it's all complete before it can import a new items that I am trying to transfer from...
Well, there's a couple of things for me to look at before I can comment on how it is expected to operate as compared to how it is operating. But I would like to take a moment to point out that now that you see how to add a single product, adding multiple should be relatively easy in comparison. Sort of the tree/forrest thing. So you have a column that you would end liking to have all the same value. Your working with a spreadsheet. Copy/paste, done. Focus on the fields/data necessary first and then fill in the fluff, can even resequence the columns to suit so that the columns to end up needing such a "global" copy and paste are on the right side. Take the row before, highlight the cells, drag down (depending on how "intelligent" the editor is it may increment one or more fields, but that's the workbook editor not EP4).
Another side note, understand that if your plan is to add one product at a time (just for discussion), then I would say that the product probably should be added using a different method. There is a sort of trade off in using something like this depending on how much is being added/modified.
Re: EasyPopulate 4.0 Support Thread
Had an opportunity to look and am in the process of applying corrections.
Comes down to this: in the quest of rewriting EP4 to provide data sanitization, at one point or another some of the fields for import were posed as strings instead of their respective float or integer as so far found. So I'm going through all of the import records to be sure that the data type of the input matches the datatype of the database as applied against a default database.
In the case of the above issue, the field being empty was treated as an empty string '' instead of an empty integer 0. That is why the empty field (not imported in the file) caused the error/issue. Now that discovered and the code is consistent, it's a lot easier to address and correct all at once. Still takes some time, but a lot easier...
Again, thank you for pointing out that issue. It's really the only way to see things get corrected (when they are a problem) or to know/learn why they are the way they are.
Re: EasyPopulate 4.0 Support Thread
Hey, I have a question. I have over 50 files that I have imported. If I delete those files does it remove any of my products? I just updated my Quantity of products today. If I delete file also will it remove any of my products?
Thanks
Wade
Re: EasyPopulate 4.0 Support Thread
Quote:
Originally Posted by
wmorris
Hey, I have a question. I have over 50 files that I have imported. If I delete those files does it remove any of my products? I just updated my Quantity of products today. If I delete file also will it remove any of my products?
Thanks
Wade
The presence (or absence) of the file(s) on the server has no direct effect on the database. Certainly opening EP4 to see no files may leave one feeling empty as well, but it will not remove or adjust any information in the database by being deleted (just like the that there is no change by uploading the file(s)).
That said, it may be worth maintaining a certain amount of history of operations/changes, but they do not have to stay on your server.
For others desiring to use EP4 to delete a product, change the status of the product to 9, then import the file/product and it and all of its linked versions will be removed from the database. To reassign a product's master_category_id which will remove it from the previously designated category, use a value of 7 as the product's status and the product's master_category_id will become that of the category for the current row.