Jump to content

Display decimals just for shipping cost, or hide .00 for products price


Recommended Posts

Hi,

 

I have all my product prices rounded, but the shipping costs are with decimals. Is there any way of displaying decimals just in the shopping cart shipping cost and total cost?

 

If I configure the shop to display decimals, they will be always displayed (products shopping cart, product page with ".00"), but if I configure it to not display decimals, it will round the shipping cost.

 

Thanks,

xavi

Link to comment
Share on other sites

Try something like

{capture assign=productPriceCaptured}{convertPrice price=$productPrice}{/capture}
{assign var="productPriceCaptured" value=str_replace('.00', '', $productPriceCaptured)}
{assign var="productPriceCaptured" value=str_replace(',00', '', $productPriceCaptured)}
{$productPriceCaptured}
Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...

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...