krisdv Posted October 6, 2016 Share Posted October 6, 2016 Hi, How is it possible to adjust the digits on the product price to only 2 decimals. I noticed that in a recent update (https://github.com/PrestaShop/PrestaShop/pull/5836 ) it changed to 6 but now my google merchant account disables my products because the list price 329.00 doesn't correspond with the prices in the source code 328.999999 how can this be reversed. Do I have to update all the files again affected by the above mentioned change? Link to comment Share on other sites More sharing options...
Apium Posted October 6, 2016 Share Posted October 6, 2016 (edited) Where does the price value get created for Google Merchant? At that location in the code, you could round that value and that should work! That might even be a one-liner, as rounding is simply round($value, 2) in PHP. That is, assuming you want the default rounding behaviour. You can find out more about these here http://php.net/manual/en/function.round.php Edited October 6, 2016 by Apium (see edit history) Link to comment Share on other sites More sharing options...
krisdv Posted October 6, 2016 Author Share Posted October 6, 2016 Google robot is just scanning the product page, in this case it finds, var productPrice=328.999999 while I have the product uploaded in Google with a product price of 329.00 I have searched product.tpl to modify the code but it doesn't look the be in there. Link to comment Share on other sites More sharing options...
kingcheetah Posted February 8, 2018 Share Posted February 8, 2018 i had the same problem and i found a solution for that: Product.tpl in your theme folder, modify <span id="our_price_display" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span> to <span id="our_price_display" itemprop="price" content="{convertPrice price=$productPrice|floatval}">{convertPrice price=$productPrice|floatval}</span> Now Google approves this 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