Created
May 16, 2018 21:07
-
-
Save curiouscrusher/d2ea6eb113d2d34ec2c42ea3b8341739 to your computer and use it in GitHub Desktop.
Quickly create a re-order button on order.liquid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign reorder_url = "" %} | |
{% for line_item in order.line_items %} | |
{% capture reorder_url %}{{ reorder_url | append: line_item.variant_id | append: ':' | append: line_item.quantity | append: ',' }}{% endcapture %} | |
{% endfor %} | |
<a href="{{ '/cart/' | append: reorder_url }}" class="btn">reorder</a></td> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment