Kuba_ Posted July 11, 2013 Share Posted July 11, 2013 Hello, Some days ago I've been looking for good method to import XML products into PrestaShop. I do found only modules with payment required, so I decided to write some small class to do this. XML reading code is not included, you have to do it on your own (eg. using SimpleXML built-in into php), but this class allows you to import products easily from any source like xml's, xls's or any format you want, because this simple code injects items directly into database. This is the first version only with several methods, but in the future it probably will be developed forward. Regards. PrestaProduct.class.php 5 Link to comment Share on other sites More sharing options...
LuisPL Posted July 21, 2013 Share Posted July 21, 2013 This is exactly what i was looking for but the search module can not find the new product inserted any ideas why? is it also possible to create new category if the category id is not found? by the way thanks i really appreciated it. Link to comment Share on other sites More sharing options...
Kuba_ Posted July 21, 2013 Author Share Posted July 21, 2013 Hi Luis. I'm very happy that you found it cool. Probably, product doesn't appear in the search module - because it needs to be inserted into one more table in database called ps_product_search or something similar. I'm not sure for this name but look for something like that. There are 'search indexes' and keywords for presta search engine so you need to add product to this table too. I forget to do this, but you can do it easily I think. Maybe in the future I'll write next version for this script to make it better. Ad.2 At this moment it's not possible to create categories from this code. It's hardcoded to insert product to desired category described by ID. Maybe in the future I'll add this function to script v2. Regards! Link to comment Share on other sites More sharing options...
LuisPL Posted July 23, 2013 Share Posted July 23, 2013 cześć Kuba can you help with the v2 of you script i need it badly thanks. Link to comment Share on other sites More sharing options...
alchifer Posted October 28, 2013 Share Posted October 28, 2013 you have to reindex de search in "preferences - search - indexation" it generates a url that u can link every time you want reset de indexation Link to comment Share on other sites More sharing options...
Beluga Posted October 31, 2013 Share Posted October 31, 2013 Kuba: would you like to update the class to use PDO instead of the deprecated mysql_ methods: http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers Link to comment Share on other sites More sharing options...
criacaosites Posted November 18, 2013 Share Posted November 18, 2013 I can't import the images, somebody can help me? Link to comment Share on other sites More sharing options...
sdc0d3c Posted April 13, 2014 Share Posted April 13, 2014 Hello, does this class work with product's combinations? I would like to add four combinations to every product.Thanks you for sharing this class. Link to comment Share on other sites More sharing options...
criacaosites Posted April 13, 2014 Share Posted April 13, 2014 Hello, does this class work with product's combinations? I would like to add four combinations to every product. Thanks you for sharing this class. No, you have to write a code for this task 1 Link to comment Share on other sites More sharing options...
sdc0d3c Posted April 16, 2014 Share Posted April 16, 2014 No, you have to write a code for this task Do you know what table should I add the products combination to? Is it ps_product_attribute_combination? Or is there any other table? Link to comment Share on other sites More sharing options...
criacaosites Posted May 31, 2014 Share Posted May 31, 2014 Do you know what table should I add the products combination to? Is it ps_product_attribute_combination? Or is there any other table? You have to create the attribute name, attribute value for get the code, after you have to create the product attribute and configure the combination Link to comment Share on other sites More sharing options...
rajlaskar Posted March 13, 2015 Share Posted March 13, 2015 You have to create the attribute name, attribute value for get the code, after you have to create the product attribute and configure the combination Hi criacaosites I think i have to create attibutes in these tables ps_attribute_group ps_attribute_group_lang ps_attribute_group_shop ps_attribute ps_attribute_lang ps_attribute_shop ps_attribute_impact Then assign that attibute in this tables for combination ps_product_attribute ps_product_attribute_combination ps_product_attribute_image ps_product_attribute_shop any enlightment in this regard would be a great help for me, Thank you Link to comment Share on other sites More sharing options...
criacaosites Posted March 13, 2015 Share Posted March 13, 2015 Hi criacaosites I think i have to create attibutes in these tables ps_attribute_group ps_attribute_group_lang ps_attribute_group_shop ps_attribute ps_attribute_lang ps_attribute_shop ps_attribute_impact Then assign that attibute in this tables for combination ps_product_attribute ps_product_attribute_combination ps_product_attribute_image ps_product_attribute_shop any enlightment in this regard would be a great help for me, Thank you Tank you, i for this tip. i solved this problem some time ago. i did finish my module bulk import amazon to prestashop and focalprice to prestashop with this class. Link to comment Share on other sites More sharing options...
rajlaskar Posted March 13, 2015 Share Posted March 13, 2015 Tank you, i for this tip. i solved this problem some time ago. i did finish my module bulk import amazon to prestashop and focalprice to prestashop with this class. Hi can you please share the attribute & combination creation part, rest i can handle, Thank you Link to comment Share on other sites More sharing options...
Deepan88 Posted August 24, 2015 Share Posted August 24, 2015 Hi, Could you share the attributes creation and combination process? 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