When creating a product with variants, the variants all have their DisplayOnSite value set to false. This value also appears immutable in the back end.
Is there a way for us to enable/disable specific product variants? I want to be able to disable for instance certain colors or sizes of a product once they are (temporarily) out of stock or unavailable for whatever other reason.
you can create a variant field that says out of stock and just not render that in the front-end but use it IN the front-end to remove out of stock variants :)
Yeah, that's what I figured, but since product variants are actually products, they have the 'DisplayOnSite' property which is exactly what I need.
It's just a shame that this field is automatically set to false (which I suppose I could changed by adding a step to the SaveProduct pipeline) and can not be changed in the back end. If only there would be a checkbox before every variant that's hooked up to the DisplayOnSite product property I'd be happy...
Enabling/disabling product variants
When creating a product with variants, the variants all have their DisplayOnSite value set to false. This value also appears immutable in the back end.
Is there a way for us to enable/disable specific product variants? I want to be able to disable for instance certain colors or sizes of a product once they are (temporarily) out of stock or unavailable for whatever other reason.
you can create a variant field that says out of stock and just not render that in the front-end but use it IN the front-end to remove out of stock variants :)
Yeah, that's what I figured, but since product variants are actually products, they have the 'DisplayOnSite' property which is exactly what I need.
It's just a shame that this field is automatically set to false (which I suppose I could changed by adding a step to the SaveProduct pipeline) and can not be changed in the back end. If only there would be a checkbox before every variant that's hooked up to the DisplayOnSite product property I'd be happy...
Yes i could almost assume that :) but that is not the case :-( Sorry for the inconveniece.
We're adding this to the backlog so the behavior around displaying products will be more consistent between families and variants.
Thanks for the info, for now I'll just add a boolean variant property and check them when displaying products.
is working on a reply...