Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I want to add data from two Product fields to the line item listing in the order confirmation email:
{% assign line_date = line.product.metafields.custom.class_date_and_time | date: '%b %d, %Y' %}
{% assign line_loc = line.product.metafields.custom.location.value.name.value %}
I also know that I can access the location metafield as an object. If I adjust the access path to reach just the location metafield (line.product.metafields.custom.location), the variable is assigned the Location metabobject (gid://shopify/Metaobject/xxxxxxxxxx). When I try to access Location.name is where things fall apart.
There are two differences that I can see, that might be important:
Also, this exact code works perfectly in card-product.liquid, where I add data from the location metaobject to the product card.
{% assign loc = card_product.metafields.custom.location.value.name.value %}
So I suppose I have two questions:
And I'm using the Dawn theme if that's important.
I appreciate any insight on this one.
I'm have the exact same problem. Did you figure this one out?
Cheers
Did anyone have any luck with this one?
Same same, help!
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024