PrestaShop - insert products script

有些话、适合烂在心里 提交于 2019-12-12 00:27:19

问题


I am looking for sql or php script which shows how to insert integrated data represents product with its attributes, images etc. to PrestaShop database. Does anyone know steps of this process - I mean name of tables and columns I need to fill.


回答1:


Read the source!! You have access to every classes, so just take a look at Product.php and ObjectModel.php and you will have every infos you need about the fields and the tables.

If your goal is to insert products, you don't need to write any sql queries. I would recommend to use the methods provided to avoid any errors.




回答2:


I'm not recommend use the ObjectModel (Prestashop Classes), this is too slow for big imports (+10000 products with categories and features), SQL inserts is the fastest method, but this is not easy task, you need fill a lot of tables:

  • ps_product
  • ps_product_lang
  • ps_product_shop
  • ps_stock_available
  • ps_category_product
  • ps_image
  • ps_product_download

Luck!



来源:https://stackoverflow.com/questions/16068141/prestashop-insert-products-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!