How can I show the product weight on the product page in a collapsible tab?

sspross
Shopify Partner
4 0 0

Hi all, is there a way to display the product weight (I have no variations, but I guess there is still a technical one) in a collapsible tab (richtext field, I guess)?

 

I can access it in a custom liquid field via `{{ product.first_available_variant.weight | weight_with_unit }}`. But this I can not use in a richtext field. And the "current selected" variation is not available as a dynamic source.

 

Is there a nice solution for this?

Replies 5 (5)

sspross
Shopify Partner
4 0 0

  Uff, my solution so far: Adding a custom_liquid block to the collapsible tab...

 

Screenshot 2024-03-08 at 17.02.15.jpeg

Screenshot 2024-03-08 at 16.59.22.jpeg

diego_ezfy
Shopify Partner
2967 571 895

Hello @sspross@sspross,

Please share:
1. your store URL;
2. page URL with the issue you mention;
3. storefront password (if your store has one).

If the store is not online yet, kindly share the preview URL.


sspross
Shopify Partner
4 0 0

I'm just playing around in a test store. I'm just asking if there is a simpler solution to get more dynamic sources of the product than just the meta fields.

diego_ezfy
Shopify Partner
2967 571 895

@sspross 

Have you tried adding your code to a custom block in the product page?

s1.jpg

sspross
Shopify Partner
4 0 0

Using a custom liquid block works. But I want to use a special block like "collapsible block" and there is only a richtext option, no liquid code. But I'm wondering about the whole "dynamic source" thing. Shouldn't be all the product properties be available as {{product.xy}} as a dynamic source in a richtext field? It's so strange that "only" {{product.title}} and {{product.vendor}} and ALL custom meta fields are available, but not "standard" product properties. That's just something I don't get my head around... 

Of course I can edit the template and write some liquid code there, or create my own "collapsible block" which supports liquide code. But I'm just wondering about the dynamic source thingy above... all custom meta fields, but not "standard" product properties...