requiresSellingPlan on a variant level

requiresSellingPlan is set on a product level, but I would like it set on a variant level. Is this possible?

For example a product has 2 variants and I’d like one to enforce requiring a selling plan and one not to. The use-case is using pre-order selling plans when 1 size is sold out. For example:

T shirt product

  • Size S (sold out, create a pre-order selling plan and enforce requiresSellingPlan=true on that variant)
  • Size M (still in stock, no pre-order selling plan and should NOT enforce requiresSellingPlan=true)

Without being able to control this on a variant level I’m struggling to see how pre-order selling plans can be an effective way to allow pre-orders of specific variants.

Does anybody know any workarounds or any Shopifolk around to comment?

Thanks

There is this exact property on a variant level –https://shopify.dev/docs/api/liquid/objects/variant#variant-requires_selling_plan

Product does have this property too, but for product it means

Returns true if the variant’s product is set to require a selling_plan when being added to the cart. Returns false if not.

Unfortunately I am pretty sure this is just a boolean returned on the variant level but informed by the product level setting. Meaning there’s no way to have that be true on one variant and false on another variant under the same product. Right?

I am trying to have 2 variants under the same product have different requireSellingPlans

Nope, you’re wrong.

I have exactly the config you want on this product:
https://8vbgtwzt38nwi0f3-23104437.shopifypreview.com/products/absolut-vodka-700ml

Original has subscription plan, Lime does not.

You just need to assign them like this in subscription app:

So you can easily assign one plan to one variant and a different plan to another variant of the same product.

I think you’re talking about assigning selling plans & selling plan groups to different variants. I agree – I am able to do that. For example on a tshirt the size M could have a selling plan and the size L could not have a selling plan. No problem, that works.

What I am in need of is something in addition to this and very specifically being able to require a selling plan on 1 variant and not require a selling plan on another variant.

For example I need size M of the tshirt to require a selling plan (i.e. impossible to add to cart without a selling plan), this behavior requires setting requiresSellingPlan to true on the product level. The issue is that I need size L to be purchasable without a selling plan.

I am not using a subscription app, I am doing this all directly with the shopify graphql admin API and creating selling plan groups with that.

Appreciate your time on this.

Ah, sorry, looks like I did not ay enough attention.

It seems you’re right, though it’s pretty strange to have a property on a variant in Liquid when it’s not actually a variant parameter And the wording like this. (not the first time though).

Probably related to publication status as subscription is only available to online store and requiring subscription unpublishes product elsewhere..

Should be able to kinda control this on the storefront, but…

You’d be better off asking at https://community.shopify.dev/

Oh interesting I did not know that requiring a selling plan un publishes the product from all other sales channels. Do you know where in the docs it says this? That kind of changes everything I’m trying to do.

Found it, thanks for the tip: Build a selling plan

Selling plans are available only through the online store sales channel. Products that are marked as “subscription only” are unpublished from other sales channels.

They should update the docs to stop saying “subscription only”, it’s confusing as selling plans can support either subscription or pre-order. But in this case I think they mean any product marked as requiresSellingPlan=true.

1 Like