Answer the question
In order to leave comments, you need to log in
How to bulk replace the SKU of Opencart products?
There is a task to replace the SKU of products in a certain category. There are more than 1000 such products on the search. Handles sorting through everything is a dreary business. How to speed up the process? Maybe there is some query in the database or some module?
Answer the question
In order to leave comments, you need to log in
UPDATE товаров SET SKU = заменить WHERE категории = определенной
1) Get a list of product ids of the desired category:
SELECT `product_id` FROM `oc_product_to_category` WHERE `category_id` = '1111'
2) Next
UPDATE `oc_product` SET `sku` = '2222' WHERE `product_id` = '$id'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question