Jump to content

How to associate a supplier to all products in the store


Recommended Posts

Hi there,

 

I have a problem, I imported products without adding a default supplier. Now how can I associate a supplier that I have created in the shop through a query? I notice that ps_product_shop does not have a column for id_supplier but ps_product table has it. 

 

How to assign a supplier to all the products and make it default?

Link to comment
Share on other sites

You can execute the following SQL statement using phpmyadmin.  This will update every product to use supplier ID 1.  So before you execute this statement, make sure you know what supplier ID you want to use, and then replace '1' with that ID.

UPDATE `ps_product` SET `id_supplier` = '1';

Note: Since id_supplier is store in ps_product and not ps_product_shop, this means that when using multi-store, a product can only be defined to a single supplier for all stores in multi-store

Link to comment
Share on other sites

  • 4 years later...

I have this issue, but the other way around: I have set id_supplier in psdy_product to 1. Now supplier with id=1 is default supplier for 2765 products, but, it is not set as Selected supplier. Have to do that manually, and when I do, the check-box for default supplier appears instantly. If I go to psdy_product_supplier I can only see 4 items there, the 4 products for which I have set manually selected supplier. Using Prestashop 1.7 can anybody help me also add all the products in the psdy_product_supplier ? Thanks

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...