Re: Rich text Metafield Between Price and Variant Options

Rich text Metafield Between Price and Variant Options

mrzmyr
Tourist
8 0 1

Hi, 

I would like to have an option between the Product Price and the variant options ("Test"):

 

Screen01.png

 

And I want to have it connected to a metafield (rich text)
I added a rich text metafield, but I cant select it inside of the Dropdown:

Screen02.png

 

I also tried to add a Category Metafield with rich text but that didn't work either

Any advises how I can add the function?

Many thx 🙂

 

 

Replies 10 (10)

Shadab_dev
Shopify Partner
861 47 87

I am sure you have added a product metafield. Now the part where you want to add that metafield value, add a rich text block there and connect dynamic source from there. 

 

Or you can take a custom liquid block and code to get the data. 

 

You can add the code in custom liquid block like

 

products.metafields.what-ever-name-you-have-set for you rich text metafield.

 

Please reach out via mail for info or customizations.

 

Thanks

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
mrzmyr
Tourist
8 0 1

Bildschirmfoto 2024-10-24 um 12.22.57.png


I can only add  "text" as a block there.
When I want to connect the metafield value it doesnt work. The metafield option I created doesn't show up in the selectable options.

Shadab_dev
Shopify Partner
861 47 87

I am not sure about this but this could be the reason since you have created a rich-text metafield but trying to add on text field. It should show the option since both are text but it might be the problem. 

 

Why not create a multi-line product metafield and try.

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
mrzmyr
Tourist
8 0 1

I have tested the same thing with a multi-line product metafield but same result 🥲

mrzmyr
Tourist
8 0 1

Bildschirmfoto 2024-10-25 um 15.15.41.png

And the text entry field on the side also look like a rich ext field 😄

Shadab_dev
Shopify Partner
861 47 87

Well then this might need some looking up for which i will need collaborator access to your store. If you are ok with this, please try reaching out via mail for a convenient conversation.

By the way just so you know i tried a single line text type metafield and its working. Also multi line text. So from the customizer in the product template add a custom liquid block between orice and variants and inside that add this code

{{ product.metafields.custom.r_text }}

Change r_text to whatever you named your multi-line text metafield. Lets see how this goes.


Thanks
Shadab

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
mrzmyr
Tourist
8 0 1

Mhhhh... Maybe I fcked up some code when I tried to add something there 😄

Shadab_dev
Shopify Partner
861 47 87

Probably

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
mrzmyr
Tourist
8 0 1

Okay I added a new theme to test it in a new one and I couldn't add the meta field there as well 🫠

And I tried out your code for the Custom Liquid and now it looks like that 😄

 

Bildschirmfoto 2024-10-29 um 09.47.00.png



Shadab_dev
Shopify Partner
861 47 87

Well yes honestly @mrzmyr this is a start. I don't remember it well but I got this as well most probably on rich text, so try this out with multi-line text or single line text

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.