Shop Pay Theme Changes - Converting Product HTML Form to Liquid

The snippet provided in this document was designed to render using Liquid syntax. If a theme’s product form is in HTML, you will need to update this to Liquid in order for the snippet to render properly.

HTML form example
<form ​action​=​"/cart/add"​ ​method​=​"post"​ ​data-productid​="​ {{ product.id }}" class​=​"addtocartForm"​>

To be converted to Liquid
{%- form 'product', product, data-productid: product.id, class: 'addtocartForm' -%}

Note: The form product takes care of adding action=”/cart/add” and method=”post” automatically to the generated HTML.

Return to the Shop Pay Installments Troubleshooting - Table of Contents