
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??
Bookmarks