Kolopsia Posted December 17, 2017 Share Posted December 17, 2017 Hello, I need to run sql query to round prices, around 5000 products its causing dismatch in google shopping and i have to fix this. example of current prices: 320.48 1189.90 56.19 Prestashop version 1.6.11 and i do have access to phpmyadmin so just need the query. Thanks Link to comment Share on other sites More sharing options...
Vince Posted December 18, 2017 Share Posted December 18, 2017 Which is the PrestaShop version which you are using? Link to comment Share on other sites More sharing options...
NemoPS Posted December 18, 2017 Share Posted December 18, 2017 It really depends on your products, if you use attributes you will have to round their impact as well, it gets tricky. It would be easier to fix the output Link to comment Share on other sites More sharing options...
Kolopsia Posted December 18, 2017 Author Share Posted December 18, 2017 I have very few products with price impact depending on the attribute so that wont be a problem i just need to remove or round the decimals with a sql query, i tried this from other thread but it didnt do anything ? Also tried it on ps_product_shop UPDATE `ps_product` SET `price` = (SELECT (CEILING((`price`)*2)/2)) Link to comment Share on other sites More sharing options...
Vince Posted December 18, 2017 Share Posted December 18, 2017 49 minutes ago, Kolopsia said: I have very few products with price impact depending on the attribute so that wont be a problem i just need to remove or round the decimals with a sql query, i tried this from other thread but it didnt do anything ? Also tried it on ps_product_shop UPDATE `ps_product` SET `price` = (SELECT (CEILING((`price`)*2)/2)) Hello, PrestaShop was design price field as a decimal number with the decimals 6 numbers. And the price it should be like this number.xxxxx. So in this case the best solution is process from PHP or Javascript at front-end not database. 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