I'm currently trying to find away to pass some custom data to each one of my shopify order confirmations. Specifically I need to pass a custom URL that will be displayed in the order confirmation email. According to the shopify documentation I can receive a property from a product and pass it to my confirmation form like so.
{% assign property_size = item.properties | size %}
{% if property_size > 0 %}
{% for p in item.properties %}
{% assign first_character_in_key = p.first | truncate: 1, '' %}
{% unless p.last == blank or first_character_in_key == '_' %}
{{ p.first }}:
{% if p.last contains '/uploads/' %}
<a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
{% else %}
{{ p.last }}
{% endif %}
<br>
{% endunless %}
{% endfor %}
{% endif %}
Using this I figure I can pass a custom url by doing something like this:
mycustomurl.com/linepropertyitem
My problem is that each line property includes the tittle of the line property item and the input value. So my url using this method would be
mycustomurl.com/linepropertyitem = linepropertyitemtext
Any ideas or pointers how this can be done?
which wouldn't work in a URL.
line_item
or you need custom data for the whole order? If you need custom data for the whole order it's better to use cart attributes instead help.shopify.com/en/themes/customization/cart/… – drip