How to Add Weight with Unit

Updated: August 09, 2021

Share:

In order to provide you more knowledge about weight_with_unit filter, in today post, I will guide you on how to add weight with unit in Shopify.

How to add weight with unit in Shopify

Weight with unit introduction

As you know about, you can use weight_with-unit filter to convert it into your store’s weight format or your weight unit that is configured on the variant. In addition, it can work well with the weight_in-unit attribute as well as weight_with_unit filter.

How to format product variant’s weight

You can easily format the variant’s weight of the product.

Input


{{ product.variants.first.weight | weight_with_unit }}

Output


24.0 kg

Take note that this unit can be overridden by being passed into filters. This is helpful in case the product variants have their own unit.

Input


{{ variant.weight | weight_with_unit: variant.weight_unit }}

Output


52.9 lb

Conclusion

After reading this post, we hope that you can understand more about weight_with_unit filter. Also, this review helps you answer well your question on how to add weight with unit in Shopify.

Recommend for you
Image Description
Abandoned Cart Recovery [Free]

Setup Abandoned cart recovery in 1-click

Learn more
Image Description
SEO Suite [Free]

Auto-optimize website elements and structure in one-click.

Learn more
proofo
Boost Sales [Free]

Boost sales: Sales Pop, Trust badges, Countdown timer, more

Learn more
Image Description
Photo Reviews [Free]

Use photo reviews to boost sales

Learn more

Comments for How to Add Weight with Unit



Subscribe

Stay in the know

Get special offers on the latest news from AVADA.

40k subscribers has been joined!

Earn $10 in reward now!

comment
iphone
go up