FROM CACHE - en_header

Fields missing in Liquid Variant Object

_gogo
Tourist
4 0 1

For some themes I've noticed that the selling_plan_allocations and requires_selling_plan are missing. However, the docs do say that these fields exist here https://shopify.dev/docs/themes/liquid/reference/objects/variant/#variant-selling_plan_allocations

 

I've tried to locate the fields through the product and all_products object, but they're missing in both.

I'm getting the objects like this

const productData = {{ all_products[product.handle] | json }};
const product = {{ product | json}};

So in the above, when i access product.variants, selling_plan_allocations and requires_selling_plan fields are missing in the variant object.

 

It seems to be missing these fields only in some themes. Why is that the case?

 

Thanks in advance!

 

Replies 2 (2)
sillycube
Shopify Partner
712 16 108

I have the same issue. My test store cannot find the fields selling_plan_allocations & requires_selling_plan fields. I tried to add a subscription plan with Recharge for the product. But still can't see the fields on the variant

 

Can you find out the cause?

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview
sillycube
Shopify Partner
712 16 108

After researching for a day, I found out that the payment gateway is the cause. When I was using Bogus gateway, these fields were not shown. After that, I switch to Shopify payment with test mode on, and these fields appear.

 

Thanks for the instant support from Awtomatic. I guess it's related to the Eligibility requirements.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview