Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
we are a store who provides 3D scanning service for our customers and we are using shopify to process the POS checkout and customer management.
Our working flow is that the customer finishes the 3D scanning in our local shop, we store the 3D data and upload the link to a custom metaObjects via an shopify app developed by us and running locally in our server.
The Costomer Model Data contains a meta object for each individual order(and scanning). Now I would like to extract the info and show the link in the checkout thank-you page, so that the customer can view the 3D model or download it in any time.
However, I can't retrieve the metaObject from the exposed liquid objects in this page. According to https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status, checkout and shop libquid objects are accessible. When I try
{{ checkout.order.metafields.custom_model_data.<handle> | json}}
I got a response like
[
"gid://shopify/Metaobject/<id>",
"gid://shopify/Metaobject/<id>"
]
and if I try to use such code
{{shop.metaobjects.customer_model_data.<handle> | json}
I got nothing, it's an empty object.
I have checked that the metaObject content is active and it's accessible by the shop. Did I miss something? I have spent on this issue for a long while, thanks a lot in advance for any help.
Best regards
First this is an array I think you should use for loop and try .value to get the metaobject details.
I have the same problem, the .value doesn't output anything.
<pre>{{ product.metafields.custom.color_and_slug }}</pre>
this gets me
["gid://shopify/Metaobject/125980836177","gid://shopify/Metaobject/126178918737"]
{% for metaobject in product.metafields.custom.color_and_slug %}
{{ metaobject.product_color.value }}
{{ metaobject.product.value }}
{% endfor %}
I've tried with, without value. , with values. without values. if i put any text the loop doesn't happen.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024