How to change the status of Product in Websites from the database instead of magento's admin panel? I use magento 2.2.5 community edition.
Thank you in advance
Solved! Go to Solution.
Nope, I think (without testing) that it is located inside catalog_product_website and then assign website_id to product_id
Hello @socratis_kontopoulos
Please follow below steps:
# First find the ID of the product status attribute in the EAV table: SELECT * FROM eav_attribute where entity_type_id = 4 AND attribute_code = 'status' # Then use that status attribute ID ($id) while querying the product entity table: UPDATE catalog_product_entity_int SET value = 2 WHERE attribute_id = $id
Please reindex and cache flush after these changes.
Hello @socratis_kontopoulos
Can update product status based on website as:
UPDATE catalog_product_entity_int cpei, catalog_product_entity cpe SET value = '2' WHERE cpe.entity_id = cpei.entity_id AND attribute_id = "80" AND cpei.store_id = "store_id"
Thank you for instance answer
Hello!
I want to find a link between catalog_product_entity_int and catalog_product_entity
I have a product which I have the sku and entity_id that are in catalog_product_entity but I can not refer to it catalog_product_entity_int
I have used this way but It does not work
select * from catalog_product_entity_int where attribute_id='80' and value_id='xyz';
I have used instead of value_id also value and entity_id ; where xyz in entity_id in catalog_product_entity but there is no link between them
Anyone has an idea; thanks in advance