Jump to content

Change weight filter decimals


Zionnnn

Recommended Posts

I have changed the weight in localization from kg to g. Which now also shows on the front-end in the filter with slider. But I would like to remove the decimals:

image.png.6ad5d438af71571e962f1746c62d8e05.png

I tried adjusting the product.tpl with this:

{if isset($product.weight) && ($product.weight != 0)}
  <meta property="product:weight:value" content="{$product.weight|intval}">
  <meta property="product:weight:units" content="{$product.weight_unit}">
{/if}

But no luck. Any other suggestions?

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