I’m looking to add a section to your product pages that will allow you to input the weight/ unit of each product, under the product description. You can also include this screenshot, which shows exactly where you’re looking to have that section added!
Does this affect the pricing or is just an extra info?
Just extra information
Then you can just add product metafields and populate it with liquid.
So create a product metafield of type integer or number, populate it with a value in the products section and then from the customizer open the product template, add a custom liquid block and add this code
{{ product.metafields.custom.weight }}
Or
{{ product.metafields.custom.weight.value }}
Here weight is an example name for your metafield.
Or add a text block and pull dynamic value using the bin icon inside the block.
I have created meta field it shows that there are no products using that but as in shipment section I have added the weight of each product or if I use {{product.weight}} it shows invalid
You can find metafield under settings —> custom data. Open product metafields and add a metafield value as explained before.
Then open a product and below where you add price and variants of a product just around that you will find the metafield you created. Click on it and give it a value. Then add it to front end like explained before from the customizer in the product template under product information section.
You can do this by adding a product metafield and displaying it as a small section under the product description.
High-level approach:
-
Create a Product metafield (for example: Weight / Unit).
-
Enter the weight value for each product (e.g.
500 g,1 kg,12 oz). -
Output that metafield below the product description on the product page using either:
-
the Theme Editor (if supported), or
-
a small, safe Liquid snippet in the product section.
-
This is the best practice because:
-
It’s editable per product
-
No hardcoding is required
-
It keeps your content structured and SEO-friendly
If you share:
-
your theme name/version
-
or confirm whether you want this as a reusable section or just text under the description
Best regards,
Devcoder ![]()
Hi @seo.vibesoft,
You can create a custom metafield (weight/unit) for each product in the Shopify admin, and then display it under the product description in your theme’s product template code. This is the cleanest and most recommended method.
- Shopify Admin me Online Store > Themes > Actions > Edit Code
- Go ( main-product.liquid ) File and Paste this code.
-
{% if product.metafields.custom.weight_unit != blank %} <p class="product-weight"> Weight/Unit: {{ product.metafields.custom.weight_unit }} </p> {% endif %}
Do you have any problem so tell me please!
