Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% if has_items %}
- <script>
- document.addEventListener("DOMContentLoaded", function(event) {
- {% for item in cart.items %}
- $('.cart-item--quantity:nth-child({{ forloop.index }})')
- .empty()
- .append({{ item.quantity }})
- .append('<input type="hidden" value="{{ item.quantity }}" name="updates[]" id="updates_{{ item.key }}">');
- {% endfor %}
- });
- </script>
- {% endif %}
Add Comment
Please, Sign In to add comment