Jump to content

[SOLVED] Mass update price from MYSQL... help.


Recommended Posts

Hi, i need tu update some price of my products.

How can I do it by MYSQL?

 

EX.

all prices of category 1 should be price * 1,35

 

I use mysql for change description/title... ecc...

 

UPDATE `ps_product_lang` SET `name` = replace(name,"xxxxx","yyyyy") WHERE `ps_product_lang`.`id_lang` =1;

 

 

but i cannot update price with formula.

 

thanks

Edited by ietax (see edit history)
Link to comment
Share on other sites

Hello,

 

If you are looking to just change the price for all categories of 1 do this:

 

UPDATE ps_product SET price = (place amount here) WHERE id_category_default = 1;

 

The prices are in the ps_product table.  I would recommend backing up you database before starting to do mass SQL statement changes.

 

Good luck,

 

Josh

Link to comment
Share on other sites

Ok, thanks.. solved

I used this SQL for update price only on category number 61

 

UPDATE `ps_product` SET `price` = `price` * 2.5 WHERE `id_category_default` LIKE '5'

 

I generated a HTML/PHP page where i insert category number and "numer" for do it when I need.

Edited by ietax (see edit history)
Link to comment
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
×
×
  • Create New...