luiskar Posted May 13, 2017 Share Posted May 13, 2017 (edited) I'm trying to create a product in prestashop from the database. I have created the most simplest product in Prestashop (only name, price and category) with id_product x and I have looked for in the database what tables have that value in id_product, and create the same row with id_product x+1, but it doesn't show in Prestashop Panel. The tables I write are the following: ps_category_product ps_layered_price_index ps_product ps_product_lang ps_product_shop ps_specific_price ps_stock_available Any ideas what am I missing? EDIT: I used the Prestashop API Edited May 20, 2017 by luiskar (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted May 13, 2017 Share Posted May 13, 2017 Why directly in database? You should use PHP code to create a new Product object and then save it, you'll make sure everything is properly saved. Link to comment Share on other sites More sharing options...
luiskar Posted May 13, 2017 Author Share Posted May 13, 2017 Why directly in database? You should use PHP code to create a new Product object and then save it, you'll make sure everything is properly saved. I will create a program in c# to create a product taking information from other database. In order to do that I need to know in what tables I need to create the rows Link to comment Share on other sites More sharing options...
Daresh Posted May 13, 2017 Share Posted May 13, 2017 Maybe consider using the API? I found some code for C#: https://github.com/Bukimedia/PrestaSharp Link to comment Share on other sites More sharing options...
luiskar Posted May 13, 2017 Author Share Posted May 13, 2017 (edited) Maybe consider using the API? I found some code for C#: https://github.com/Bukimedia/PrestaSharp Perfect, This is more easy. Edited May 13, 2017 by luiskar (see edit history) 1 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