Cart interactions
Interactions with a customer’s cart are enabled by including form tags in block or template code.
Additional form tag parameters
return_to
By default, when submitting a form a page reload is triggered and the customer is returned to the current page. To specify a different page for the customer to be sent to on form submit, pass a URL as the value of the return_to
param.
syntax
{% form "clear_cart", return_to: '/home' %}
<input type="submit" value="clear" />
{% endform %}
You can also pass the url as a variable:
syntax
{% assign url = '/my-page' %}
{% form "clear_cart", return_to: url %}
<input type="submit" value="clear" />
{% endform %}