How to render the value of a meta-object entry (e.g. text) that is embedded within a product metafield?
Setting up the meta object with its inputs:
Setting the meta object as a value in a meta field:
Example. Product page:
Code:
{% assign product = line_item.product %}
{% assign license_assignment_id = product.metafields.custom.tipo_de_licencia %}
License Assignment ID: {{ license_assignment_id }}
{% if license_assignment_id %}
{% assign license_object = shop.metaobjects[license_assignment_id] %}
{% if license_object %}
{% assign terminos_contractuales = license_object.fields %}
{% if terminos_contractuales %}
License Name: {{ terminos_contractuales.nombre_de_la_licencia }}
Contract Clauses: {{ terminos_contractuales.clausulas_del_contrato }}
{% else %}
No license details available.
{% endif %}
{% else %}
Unable to load the license object.
{% endif %}
{% else %}
No license type
{% endif %}
Rendered text:
![]()





