Shopify themes, liquid, logos, and UX
Hi, I am looking to display the image from the following file metafield on the thankyou page. Is there a way of doing this please?
Thanks 🙂
order.metafields.my_fields.safe_place_photo
Try this
{% assign safePlacePhoto = order.attributes.metafields.my_fields.safe_place_photo %}
{% if safePlacePhoto != blank %}
<img src="{{ safePlacePhoto | img_url: 'master' }}" alt="Safe Place Photo">
{% endif %}
Hi @LittlePaddocks ,
This is Richard from PageFly - Shopify Page Builder App.
You can you html into metafield. So, you just call metafield nameBest regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
Hi @PageFly-Richard & @Guleria .
I have added the below code using the additional scripts section in checkout settings. But it still doesn't seem to be showing. Any advice please?
Thanks 🙂
<script>
Shopify.Checkout.OrderStatus.addContentBox(
{% assign safePlacePhoto = order.attributes.metafields.my_fields.safe_place_photo %}
{% if safePlacePhoto != blank %}
<img src="{{ safePlacePhoto | img_url: 'master' }}" alt="Safe Place Photo">
{% endif %}
)
</script>
Try this one
<script>
{% if order.attributes %}
Shopify.Checkout.OrderStatus.addContentBox(
'<p>{{ attributes ['metafields.my_fields.safe_place_photo'] }}</p>',
)
{% endif %}
</script>
@Guleria Thanks for the suggestion, I have added it in, and the content box is displaying but unfortunately still no image... 🙂
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025