Hiding options for some of the variants in a product

Highlighted
New Member
1 0 0

Hi All,

we are working on a Shopify website which is running on "Minimal" theme. planning to launch soon.

for subscription-based products, we have installed an app " ReCharge Recurring Billing & Subscriptions" which works fine for us, but we are looking for an option to hide "Subscribe and Save" option for some of the variants.

when we contacted the app support team, they provided with a simple theoretical explanation saying we have to use a javascript to facilitate such an option here.

is the  link which I found on their website. but doesn't give any examples.

https://support.rechargepayments.com/article/356-subscription-rules-based-on-variant-s

so we have a product A and it has 5 variants namely P,Q,R,S,T

so when a customer arrives into that product page, he will have those 5 options in the dropdown list which are those P,Q,R,S,T.

each variant will have two options such  as "One-time purchase "and "Subscribe and Save"

I would like to display these two options for the variants P, Q  only. for other 3 variants, I would like display only One-Time purchase. 

In the link above provided, it mentions making changes in subscription-product.liquid .

since I am new to this technology, i want to know how do we achieve this using Javascript? Like which particular section of the code we need to edit to reflect these changes on the website?

Please help.

0 Likes
Highlighted
New Member
1 0 0

I have the same challenge. Did you ever find a solution? If so, could you share the snippet of code?

0 Likes
Highlighted
New Member
4 0 0

Hello, 

I know this is an old post but I am trying to figure out this very thing for my shop. Did you ever out together the correct code for this issue? Thanks! 

0 Likes