Liquid cannot access shopify subscription variables like product.selling_plan_groups

Solved
sum0mer
Shopify Partner
4 0 2

I'm trying to develop shopify subscription feature following this doc: https://shopify.dev/tutorials/storefront-ux-guidelines-for-subscriptions

However, though the product has selling_plan_groups that displayed in the admin console, in the product detail page, the following liquid expression print nothing:

{{product.requires_selling_plan}}
{{product.selling_plan_groups.length}}

Anyone knows what may cause this? Thank you

Brian_S
Excursionist
12 0 4

I'm having the same issue 

dev2021
New Member
1 0 1

Has anybody solved this yet? Without this I can't test my storefront changes to support subscriptions nor can I easily create subscription contracts in order to create subscription management in my admin app

Brian_S
Excursionist
12 0 4

@Nick  any chance you could help forward this post to the right internal product person or engineer in Shopify?  Would be greatly appreciated!

0 Likes
Nick
Community Moderator
Community Moderator
3790 362 747

Hi @Brian_S and everyone else, 

I am not 100% sure as I am not on the teams that would work with this, but I am wondering if you might not be able to access it because it is still in beta. 

Just to confirm if you are using dev stores that have beta scopes applied? I'm wondering if this tutorial might be of use to explain this also. 

I will also pass this along to the relevant team!

Nick | Community Moderator @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Brian_S
Excursionist
12 0 4

Thanks so much for the reply Nick! Yea - I've applied and been accepted into the Beta program. I have access to the API's and have an admin app set up to crate selling plan groups (and have set them up on my dev store) but that data's not accessible in my liquid templates.  I bet @sum0mer has been accepted to the beta program as well, otherwise he wouldn't have been able to get to the point it sounds like he's at either.  

I've been through all the tutorials and docs very thoroughly = )

 

If I had to guess, when I was accepted into the beta maybe my API access was turned on but my dev store wasn't flagged properly. 

 

I was added to the Beta program on Nov 9th for this app and store: 

Dev store: https://bundleco-store.myshopify.com/
App: https://partners.shopify.com/1785859/apps/4489951

 

I tried pinging Shopify Support but they told me they dont handle this stuff and that I should ping the Forum.

 

Anybody you could think to forward me on to would be greatly appreciated! Sounds like it's possibly a problem for more folks than just me. 

 

0 Likes
Philibert_Dugas
Shopify Staff
Shopify Staff
11 6 4

This is an accepted solution.

Hey folks, glad to see you all working with the APIs

In order to make selling plans accessible in the storefront, the store needs to be set up in a way that's "eligible" for processing subscriptions.

Our current restrictions are the following, although we're working actively on removing those restrictions:

* The shop must-have Shopify Payments activated (test mode works too)
* Must not have any `checkout.liquid` customizations
* Must not have any Shopify Scripts published

You can also find those eligibility requirements here: https://help.shopify.com/en/manual/products/subscriptions/setup#eligibility-requirements

One easy way to verify if the shop is configured correctly is to execute the following GraphQL request (available on the API version: Release Candidate 2021-01)


{
  shop {
    features {
      eligibleForSubscriptions
    }
  }
}

 

Brian_S
Excursionist
12 0 4

@Philibert_Dugas thank you so much!

I hadn't seen that eligibility list yet.  And the eligibility API request is great - my store was definitely not eligible bc I was using the "Bogus Gateway" payment method. With Shopify Payments in Test Mode I'm now eligible 

 

Thanks again to both you and Nick! 

0 Likes
mubashir_tb
Tourist
6 0 0

How can I active Shopify Payment on Test mode?
Do I need any credit card for it?

0 Likes
Brian_S
Excursionist
12 0 4

@mubashir_tb 

go to your store's Settings -> Payments -> Manage Shopify Payments and at the bottom you should see an "Enable Test Mode" checkbox. 

 

This link should open you to the settings page (if you're logged in) where the checkbox will be at the very bottom

https://[your-store-here].myshopify.com/admin/settings/payments/shopify-payments

 

You can use test card numbers and there are specific card numbers to trigger specific events: https://help.shopify.com/en/manual/payments/shopify-payments/testing-shopify-payments