Articles on: Getting started

Selling plan not passing

The selling plan not passing on the product page and/or main cart page is a really big issue because if the selling plan doesn't get passed, the customer won't be able to checkout till it gets passed.

Here is a step-by-step guide to resolve this issue.


Validation


Loop already provides a one-click action to start showing the selling plan name on the cart. Clicking this button, we insert our code snippet into their cart file.

Validation 1:


Go to the checkout page after adding at least one subscription item to your shopping cart. The selling plan is successfully passing if you see "Recurring subtotal" at the conclusion of the right-side panel that shows order amount information; if not, it says "Selling plan is not passing."

Validation 2:


Open the Loop admin page and go to the Subscription widget > Installation > Add selling plan label. When you click "Add selling plan label to cart," it will be added if it hasn't already. If the cart implementation is customized, it can fail; in that case, see the section below that addresses solutions.

Validation 3:


Check the Network Payload to see if the selling plan passes or not, if not, in that case, see the section below that addresses solutions.


Resolution


The resolution steps below are generic to help anyone resolve similar issues across any theme.

Go to Shopify > Sales channel > Online store.
Next, go to Themes > Current theme > Edit code



Go to loop-widget.js in your theme code.
Here, we will update the loop properties, that is, insert selling plan value in all the products whose id is productId

//insert selling plan value in all the product from whose id is productId document.querySelectorAll(`form[data-product-id="${productId}"]`).forEach((form) => { if (form) { const existingInput = form.querySelector('input[name="selling_plan"]'); 
if (existingInput) { form.removeChild(existingInput); } const hiddenInput = document.createElement("input"); hiddenInput.type = "hidden"; hiddenInput.name = "selling_plan"; hiddenInput.value = selectedSellingPlanId;form.appendChild(hiddenInput); } });




Even if the product form has data-productId = {productId} and even if the product form doesn’t have data-productId, then, in theme, if we face this issue, we can just add this and it will solve our problem of the selling plan not passing.



Now, the selling plan has been passed further.


Still Need help?


There is no need to worry. We are here to assist you. Please contact us at support@loopwork.co or feel free to reach out to us through the chat by clicking on the support beacon located at the bottom right corner.

Regards,

Loop Subscription Team 🙂

Updated on: 25/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!