Jump to content

Using SQL to import products on the WebShop


LukaAcron

Recommended Posts

I'm manually updating importing products into the database with a php file using SQL. I'm updating the tables:

-ps_product

- ps_prduct_shop

- ps_product_lang

- ps_category_product

 

The product gets shown in the back office and it's accessible through url on the web page.

The only problem is that the product doesn't show in the category section of the web page. I guess that there are more tables that i should update.

 

I hope somebody knows which tables should be updated so that the products will apear normly:

 

Thank you.

Link to comment
Share on other sites

I would always recommend using the "proper" Prestashop objects when manipulating the database (e.g. Product) as that way you're guaranteed that any changes in the underlying structure will be catered for - otherwise you face issues like the one you're experiencing!

 

My own xml importer using objects so I don't HAVE to know what tables to update ;)

 

If you want to continue down your route then I suggest that you install a copy of MySQL Workbench (It's free from Oracle) and then you can study the database relationships by opening up /docs/dev/dbmodel.mwb

Link to comment
Share on other sites

  • 1 year later...

I would always recommend using the "proper" Prestashop objects when manipulating the database (e.g. Product) as that way you're guaranteed that any changes in the underlying structure will be catered for - otherwise you face issues like the one you're experiencing!

 

My own xml importer using objects so I don't HAVE to know what tables to update ;)

 

If you want to continue down your route then I suggest that you install a copy of MySQL Workbench (It's free from Oracle) and then you can study the database relationships by opening up /docs/dev/dbmodel.mwb

I have wrote a php script which grabs 1000's of products from an xml feed reformats the data to suit prestashop's product information updates the data into a locally hosted database table it then splits the data into a products table and a combinations table and grabs out a products and combinations.csv. I would like to set it up so my local database update's into my prestashop data base resulting in a fully automated product import. I am just learning how to do this as i go along so Could you elaborate and describe the objects you mention? where might they be found? and which ones am i interested in?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...