Jump to content
eagleg

Changing all prices to the same

Recommended Posts

Is there a sql command to change all items in my store to the same price ? IE 11.95?

Thanks!

Share this post


Link to post
Share on other sites
UPDATE 'products' SET 'products_price'='11.95' WHERE 1

in phpmyadmin, or else.

Share this post


Link to post
Share on other sites
UPDATE products p INNER JOIN products_to_categories p2c ON p.products_id = p2c.products_id
 SET products_price = '11.95'
 WHERE p2c.categories_id = 11

Change 11.95 and 11 as necessary. 

You may want to do something like a

SELECT p.*
 FROM products p INNER JOIN products_to_categories p2c ON p.products_id = p2c.products_id
 WHERE p2c.categories_id = 11

before running the update query to verify that you are changing the right products. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
17 hours ago, eagleg said:

Is there a sql command to change all items in my store to the same price ? IE 11.95?

This isn't answering your question exactly, but I think a better way is to use the Easy Populate addon. Changing from the database can be dangerous if you are not familiar with it and it can't be easily undone. With Easy Populate, you just reverse the changes in the feed and re-upload to undo the changes.

There are also a few addons that deal specifically with updating prices. I can't recall the names currently but searching the addons for update prices should return some of them.

Edited by Jack_mcs

Share this post


Link to post
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

×