HaCos Posted June 11, 2016 Share Posted June 11, 2016 Hello, Last week i updated all my products tax rate by 1% . As a result, the end user price (with tax included) is not rounded. Any idea how to make it round? Thanks in advance, C Link to comment Share on other sites More sharing options...
shokinro Posted June 11, 2016 Share Posted June 11, 2016 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. Link to comment Share on other sites More sharing options...
HaCos Posted June 15, 2016 Author Share Posted June 15, 2016 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 More sharing options...
shokinro Posted June 15, 2016 Share Posted June 15, 2016 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 More sharing options...
HaCos Posted June 16, 2016 Author Share Posted June 16, 2016 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 More sharing options...
shokinro Posted June 17, 2016 Share Posted June 17, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now