"Variant can only be purchased with a selling plan" error
Sections
Issue
A "Variant can only be purchased with selling plan" error appears when adding a product that should be configured for subscription to the cart.
Environment
Resolution
This error can occur when there are multiple product forms on a page and the subscription widget is not injected into the correct form. This can be fixed by injecting a line of code into the correct form.
Look for the product form in your Shopify Theme's product template file (ex: product.liquid
or main-product.liquid
) and inject the following code snippet to render the widget:
<div class="rc-widget-injection-parent" style="display: initial;"></div>
Place the code snippet in the form, either directly below:
<form id="add-item-form" action="/cart/add" method="post" data-productid="{{product.id}}">
Or below:
{% form 'product', product, data-productid: product.id, class: productClasses %}
This solution specifies the correct product form on the product page and resolves the error.
If the widget appears and the error persists, contact the Recharge Support team for additional troubleshooting.