Skip to content

Instantly share code, notes, and snippets.

@curiouscrusher
Created May 16, 2018 21:07
Show Gist options
  • Save curiouscrusher/d2ea6eb113d2d34ec2c42ea3b8341739 to your computer and use it in GitHub Desktop.
Save curiouscrusher/d2ea6eb113d2d34ec2c42ea3b8341739 to your computer and use it in GitHub Desktop.
Quickly create a re-order button on order.liquid
{% 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