Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zakhardage/8737856 to your computer and use it in GitHub Desktop.
Save zakhardage/8737856 to your computer and use it in GitHub Desktop.
This is a workaround solution to the problem of Shopify line item properties getting truncated and stripped of their line breaks on the Orders page. I convert line item properties to unique cart attributes to move the information to the Order Notes section of the Orders page.
{{ p.first }}{% endunless %}: {{ p.last | newline_to_br }}
<textarea class="hidden" id="{{ p.first | handle }}-{{ item.product.handle }}" name="attributes[{{ p.first | handle }}-{{ item.product.handle }}]" cols="10" rows="10">{{ p.last }}</textarea>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment