grsinternet Posted April 5, 2020 Share Posted April 5, 2020 I have 10mln products. Product has only name and price. Importing via standard PS import form it takes 1sec for 100products. It means I would have to sit all day and import manually products to database. Instead of that I want to generate SQL files to do it faster, directly to database. I have found that PrestaShop 1.7.6.4 creates records in these tables for products: ps_category_product ps_product ps_product_lang ps_product_shop ps_stock_available If I will create similar records in my SQL files as PS does on import. Will it work correctly? Or there are other alternatives for this? Thanks! Link to comment Share on other sites More sharing options...
luishuaymana Posted April 5, 2020 Share Posted April 5, 2020 En la importación de PS estándar demora porque recorre linea por linea. Tienes que crear una consulta con insert masivo. Es mucho mejor practico y rápido en la carga de mysql. Ejemplo : insert into (nombre, precio) values ( "nombre1", "precio1"), ( "nombre2", "precio2"), ( "nombre3", "precio3"); etc... 1 Link to comment Share on other sites More sharing options...
Rhobur Posted April 11, 2020 Share Posted April 11, 2020 There's more tables involved, I would export the SQL results and import them using the CSV product/combination structure PS shows you in Advanced Parameters->Import. Either this or writing a php script which will call the PS functions for adding products. Or, finding a module for it, there might be some free ones. 1 Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 14, 2020 Share Posted April 14, 2020 Apart from tables which you have mentioned, there are following tables as well. ps_image ps_image_lang ps_image_shop Inserting the data in above tables will be very challenging using the SQL. >> In case, you are having product combinations (attributes) then there are more tables as well. >> Apart from that, I am not sure how you are going to manager the product reference key (i.e. MySQL generated product id in other tables) So its advised to use the default import feature OR try some addons for the same. 1 Link to comment Share on other sites More sharing options...
grsinternet Posted April 14, 2020 Author Share Posted April 14, 2020 very appreciate for help. For all of you guys! I will try to setup PS on powerful server to use default PS import and will see what happens! Take care! 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