Jump to content

round product prices after tax


HaCos

Recommended Posts

what do you mean it is not rounded? is it displayed price?

it might be related to your currency displaying format that is configured at back office - Localization - Currencies.

Hi shokinro, 

 

I mean that before this change, for example a product that had 23% had base price 113,00813 which gives us end user price at 139. Now that i had to update the tax from 23 to 24, the end user price is 140,13. I am looking for a query to make this round, like 140.

Link to comment
Share on other sites

so you want to give user the price without floating points like 140 instead of 140.13?

in that case you can specify the tax include price instead of base price on product price editing page. You can set tax include price to 140, so it will calculate price before tax.

Link to comment
Share on other sites

so you want to give user the price without floating points like 140 instead of 140.13?

Yeap

 

in that case you can specify the tax include price instead of base price on product price editing page. You can set tax include price to 140, so it will calculate price before tax.

 

This would work if it was only for 1 product. I want to apply this in all my active products. So i am looking for a query that will round all the after-tax prices.

Link to comment
Share on other sites

you can try to use sql to update price as following

UPDATE ps_product SET price = price * x / y where id_product = 1

where x, is your previous tax rate for example 0.08(8%) and y is new tax rate for example 0.09(9%).

 

you can try with a specific product first for example id_product =1. remove the condition from sql statement when you confirmed 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...