Sylius: Disabling obsoletes or irrelevant variants

Created on 29 Sep 2017  路  5Comments  路  Source: Sylius/Sylius

| Q | A
| ---------------- | -----
| Bug report? | no
| Feature request? | yes
| BC Break report? | no
| RFC? | yes
| Sylius version | 1.1

Hi
Following a discussion on slack with @psihius and @pjedrzejewski, I open this issue to discuss on the possibility of disabling variants that are not sold anymore for products.

At the moment, if a product has a variant, it's available in the channel(s) where this product is published. If you don't want this variant to be available anymore, you can delete the variant, but not if it has been ordered (which seems logical - even if it can be discussed)

So, it would be useful to have the ability to disable a variant when it's not available anymore.

One extension of this feature would be the ability to publish variants based on the channel : in my case, some variants would be available in some countries, but not in some other countries, based on legal stuff.

I'm not familiar enough (yet) with Sylius to implement this (and don't have the time until 2 ou 3 weeks), but I would be more than happy to collaborate on this.

Feature Stale

Most helpful comment

+1 for this feature as we cannot delete or disable ordered variants :/

All 5 comments

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@pamil What happened with this feature. I think is important to have.

+1 for this feature as we cannot delete or disable ordered variants :/

+1 Currently we have to delete the variant from all orders to delete the variant

We're facing the same issue. To get around the issue temporarily, we've modified the Product/Show/variants.html.twig file in our theme to check if a variant is out of stock and if so, don't show it. It's a bit hacky, but means we can mark a variant as being "tracked" with zero stock to hide it from the page.

It would be nice to be able to Enable / Disable variants in the same way as products however.

Was this page helpful?
0 / 5 - 0 ratings