Skip to content

Instantly share code, notes, and snippets.

View markgenest's full-sized avatar

Mark Genest markgenest

View GitHub Profile
@freakdesign
freakdesign / order-to-cart.liquid
Last active September 15, 2022 20:53
Add a previous Shopify order to the cart
{% if order.line_items.size > 0 %}
<p>
<button class="btn place-same-order">Add order to cart</button>
<script>
(function(){
/* Check for the button */
var buttonOrder = document.getElementsByClassName('place-same-order') || false;
if(!buttonOrder){ return }