julle Posted August 13, 2010 Share Posted August 13, 2010 Hi,I want to add a product text field to each product without having to edit the "5. customize" tab for every product.can I add my text fields to the csv attributes and import them for every product?thanks,/Julle. Link to comment Share on other sites More sharing options...
rocky Posted August 13, 2010 Share Posted August 13, 2010 No, PrestaShop's CSV import doesn't allow you to import customisation fields. Link to comment Share on other sites More sharing options...
julle Posted August 28, 2010 Author Share Posted August 28, 2010 Ok Thanks!I solved it in the end by writing a script to update the database tables: INSERT INTO `ps_customization_field_lang` VALUES (1,3,''),(1,2,''),(1,1,'Upper text'), (2,3,''),(2,2,''),(2,1,'Middle text'), (3,3,''),(3,2,''),(3,1,'Lower text'); where: (6,1,'lower text'), #6 = id customized field, 1=language (english), "text for field" INSERT INTO `ps_customization_field` VALUES (1,1,1,0), (2,1,1,0), (3,1,1,0); where: (6,9,1,0), #6 = id customization field, 9= product id , 1 type, 0 required UPDATE ps_product SET customizable='1';UPDATE ps_product SET text_fields='3'; Link to comment Share on other sites More sharing options...
Velocity Posted September 20, 2012 Share Posted September 20, 2012 (edited) Just for clarifying the issue for people that didnt understand very good previous explanation (and for my own in a future when i will forgot this ) For mass textfield customization you have to: (Ex. 1 textfield in only 1 lang). 1) find the id_product (XXX) of the first product you just import (or have previously imported) UPDATE ps_product (customizable, text_fields) VALUES (1, 1) WHERE id_product > XXX; 2) Insert a row in ps_customization_field for each product for each customization: INSERT INTO ps_customization_field VALUES (id_product, id_product, 1,1); 3) Insert another row in ps_customization_field_lang for each product custo field with the name of the customization: INSERT INTO ps_customization_field_lang VALUES (id_product, id_lang, 'CUSTOM_NAME'); Hope this help! Edited September 20, 2012 by Velocity (see edit history) Link to comment Share on other sites More sharing options...
monxu Posted February 28, 2013 Share Posted February 28, 2013 Hello, in point 3) Insert another row in ps_customization_field_lang for each product custo field with the name of the customization: INSERT INTO ps_customization_field_lang VALUES (id_product, id_lang, 'CUSTOM_NAME'); In this table are not "id_product", what can i do a text_field in all products? please help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now