We are importing prices to oc_product.inkoop
I have a SQL script that is updating the price depending category ID. This is running fine.
My question:
How can I edit the script so it's updating the prices for all products in all the child categories?
Sample structure:
test = category id 77
test > test1 > test2 > test3
I need to update also: test1, test2, test3 prices.
Now only test is updated.
The below sample is for updating the price of products in a parent category.
Code: Select all
$sql = "UPDATE oc_product, oc_product_to_category
SET oc_product.price = ROUND (oc_product.inkoop * 1.10,2)
WHERE oc_product.product_id = oc_product_to_category.product_id
AND oc_product_to_category.category_id = 77;";