Jump to content

[SOLVED] how to raise prices?


Recommended Posts

It is not possible in the Back Office. The only way is to run an SQL query like this:

UPDATE `ps_product` SET `price` = `price` + (`price` * 0.06)



This code will increase the price of all products by 6%. Change ps_ to your database prefix. Remember to back up the ps_product table before executing the query in case anything goes wrong.

Link to comment
Share on other sites

It is not possible in the Back Office. The only way is to run an SQL query like this:

UPDATE `ps_product` SET `price` = `price` + (`price` * 0.06)



This code will increase the price of all products by 6%. Change ps_ to your database prefix. Remember to back up the ps_product table before executing the query in case anything goes wrong.



Isnt it possible with Sales & Discounts module??

anyway thanks
Link to comment
Share on other sites

  • 1 month later...

I realised my code to change it back after increasing it is not correct as it reduces the final price by 6% so the prices will end up wrong

Eg you increase a product costing 100 original by 6% the new price would be 106

But using the code i gave it would deduct 6% of 106 off the price which would give you an price of 99.37 instead of the 100 you started with.

Im sure there is a way to work this out but my sql skills arent up to the task im afraid.

Link to comment
Share on other sites

  • 1 month later...

My math skills aren't as good as they used to be, but I think this SQL query will undo the percentage increase. Make a backup of your ps_product table, then try running the following query to undo the 6% increase:

UPDATE `ps_product` SET `price` = `price` / 1.06

Link to comment
Share on other sites

My math skills aren't as good as they used to be, but I think this SQL query will undo the percentage increase. Make a backup of your ps_product table, then try running the following query to undo the 6% increase:

UPDATE `ps_product` SET `price` = `price` / 1.06




yeah, this will work and same for the increase:

UPDATE `ps_product` SET `price` = `price` * 1.06

Link to comment
Share on other sites

It is not possible in the Back Office. The only way is to run an SQL query like this:

UPDATE `ps_product` SET `price` = `price` + (`price` * 0.06)



This code will increase the price of all products by 6%. Change ps_ to your database prefix. Remember to back up the ps_product table before executing the query in case anything goes wrong.




Can you please tell me if this also changes the product prices in the active orders that were aleady places but not processed yet?
Link to comment
Share on other sites

From looking at the database, it would appear that those prices won't change. Once an order is placed, the product prices and order total are hardcoded in the ps_order_detail table instead of read from the ps_product table.



Thanks, I will try that.
Link to comment
Share on other sites

From looking at the database, it would appear that those prices won't change. Once an order is placed, the product prices and order total are hardcoded in the ps_order_detail table instead of read from the ps_product table.


One more question.. If I delete a product that has been ordered by a customer from my catalog, will that product stay in his order so I can process it? According to this reply, it should be so, but I am not sure about the product pictures.


thank you
Link to comment
Share on other sites

I haven't tried it, but looking at the ps_order_detail table, it seems the product name, price, quantity discount, EAN13, reference, supplier reference, weight, tax name, tax rate, ecotax, download hash, download number and download deadline become hardcoded with the order. All other product information is linked by ID, so images and other information will be lost when deleting the product.

Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...
  • 7 months later...
  • 4 years later...

Hello

I used this update query and I see the price changed inside the phpMyAdmin and also increased inside the Prestashop SQL Manager in the admin interface.

However strange enough I see the price did not change in the Product catalog and not changed on the front end page.

Is there any explanation for that?

 

Link to comment
Share on other sites

×
×
  • Create New...