How do I get the ReCharge app to work on product pages?
Quickly update your theme after app installation by pasting a short code snippet into the product form file to ensure seamless subscription functionality—full step-by-step video included.
Last updated 4 months ago
The ReCharge app needs a quick manual update to work properly.
You should only do this after you've fully installed the ReCharge app and it has added all of the snippets to your theme files. To confirm this, you should see these files in your theme's "Snippets" directory:
subscription-account-login.liquid
subscription-cart-footer.liquid
subscription-product.liquid
subscription-theme-footer.liquid
In your Shopify admin, navigate to the Edit code, then find and click into the component-form-product.liquid file within the Snippets directory.
Find the line which includes the code below:
{%- form 'product', product, data-productid: product.id, id: product_form_id, class: product_form_id, novalidate: 'novalidate', data-type: 'add-to-cart-form' -%}Paste the code below under that line — save your update and check to ensure ReCharge is working as expected!
{% if product.available and request.page_type == 'product' %}
{% render 'subscription-product' with product as product %}
{% endif %}👀 Video screencapture of the process of adding ReCharge code to your theme