Forums / Setting Up Categories, Products, Attributes / mass price change for all products in a specific category

mass price change for all products in a specific category

Started by chaiavi on 8 Dec 2010, 1:18 PM · Views: 18,167

Results 21 to 22 of 22
5 May 2019, 1:14 PM
#21
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

mass price change for all products in a specific category

mc12345678:

Something "like" but different. In that case would AND the two criteria.

UPDATE products SET products_price = products_price * 1.01 WHERE master_categories_id = 79 AND products_price > 300.00;

> 
> If you wanted to modify additional fields (not just to update products_price), the field along with assignment would be separated by a comma.

Thanks so much for the help! I ran the script, and said that it ran successfully - but no change in price in the effected category or appropriate product...Even after refreshing or running the price update tool...Any ideas?
5 May 2019, 2:28 PM
#22
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: mass price change for all products in a specific category

AquaticAddiction:

Thanks so much for the help! I ran the script, and said that it ran successfully - but no change in price in the effected category or appropriate product...Even after refreshing or running the price update tool...Any ideas?
Well, you said that you wanted to specify a specific category in which to make the change(s). The use of master_categories_id does not target all product "shown" in a category, but instead those that have a base assignment to that category. This means that product linked to the category are not affected.

If you are in phpMyAdmin or a similar database accessing tool you could run a select query to confirm which product meet the criteria or even part of the criteria (e.g. The master_categories_id)

SELECT * FROM products WHERE master_categories_id = 79;

This will display all of the information in the products table for each product that is assigned to master_categories_id of 79. I suspect that the product in question is not present in the list.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...