Jump to content

Change all products prices at once by SQL command


Recommended Posts

HI,

 

I'm using Prestashop 1.6.0.14

 

I tried to change all products prices by these SQL commands  :

UPDATE ps_product_shop SET price = price*0.1;
UPDATE ps_product SET price = price*0.1;

My goal is to change prices like :

 

1,000,000

 

To :

 

100,000

 

The SQL command ran successfully! But I don't see any changes!

 

Prices is not changed  :(

 

Any helps would be appreciated.

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

What about cache?

 

I cleared cache in Advanced Parameters > Performance and then Clear Cache. But nothing changed! ( I also cleared browser caches by Ctrl + F5)

 

Do you use any specific prices? 

 

The default Irans currency is Rial (IRR) in PS.

 

I need to change Rial to Toman. ( Toman is also an Iran unofficial currency)

 

10 Rials = 1 Toman

 

So I need to change all prices to Toman. ( Rial price * 0.1 = Toman price) 

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

  • 1 month later...

As Tuk66 said, what you did was the right thing. And if it didn't work for you the problem is somewhere in the details - that only you know.

 

The logical thing to do after such a command would be to look with phpmyadmin to see whether the database fields were really changed.

 

If you want you can also try Prestools. It is a free and easy way to mass update prices, a few hundred at a time.

Link to comment
Share on other sites

  • 2 weeks later...

Any attributes on your products ?? 

 

check ps_product_attribute and ps_product_attribute_shop tables and as tuk66 ps_specifc_price. 

 

if you are not using neither attributes and specific prices, truncate all listed tables above, including ps_product_attribute_combination 

 

or update price column in this table to 0.

 

Hope it works.

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...