Variants cannot be deleted once they are in an order. This persists even when the order is paid and shipped, and even after the order cycle the variant was in is closed.
A user should be able to delete a variant at anytime.
Variants that have been ordered become undeletable.
I don't know of a workaround. The stock on hand can be set to 0 so the variant doesn't show in the shop, but there seems to be no way to delete the variant.
The way the issue is described I don't think this is a bug. Variants, once they have been in a cart, cannot be deleted. We need the record to persist so past orders make sense. 'Delete' would really mean 'Hide from Enterprise Product List' which is a feature request.
If you mean you cannot delete the variant from the order/cart or delete the variant from the OC then it might be a bug and needs more exploration.
I clarifed the name - I'm talking about deleted in the enterprise's product list. This was a change with the new version - which is why I positioned it as a bug. Something that used to be possible is no longer possible. There is no workaround and It is prompting user calls.
@tschumilas any chance you could do a screen recording or capture of this bug? It'd be great to see what happens on the screen.
This might also need a bug 'label' would you describe this as any of the following:
bug-s1
The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.
bug-s2
The bug is affecting any of the non-critical features described in S1 and there is no workaround.
bug-s3
The bug is stopping a critical or non-critical feature but there is a usable workaround.
bug-s4
The bug is annoying, but doesn't prevent from using the platform. Not so many users are impacted.
bug-s5
We can live with it... Few users are impacted.
@tschumilas @Erioldoesdesign if I'm following correctly this is a duplicate of: https://github.com/openfoodfoundation/openfoodnetwork/issues/5947 which is rated s3. During delivery train we indeed have chosen to chase more severe bugs given that we can assign products that people want to delete to a dummy enterprise until someone puts this bugs in the list prioritized s3.
So I'm closing here but feel free to reopen if needed :)
@RachL I'm not sure if this is exactly a duplicate of #5947 so I've added more detail to #5947 to specifically reference variants. It's not possible (I think?) to delete a variant of a top level product by moving it to a dummy enterprise. So there is in fact no workaround for deleting a variant. I think that possibly makes #5947 even more of a priority @tschumilas
Indeed @emilyjeanrogers is correct. I also cannot delete an ordered variant. And I cannot use the workaround for a variant a user wants deleted. I think this makes this an s2. Also reiterating that we are still getting user requests and unhappiness about this. And I'm assuming its the same issue as 5947 - but I'm leaving this here just in case. Also asking - is it a papercut by chance?
In the UK we say that if you want a Product/Variant deleted then contact support. Then we assign it to a another enterprise on behalf of the user.
To me that makes it an S3.
@lin-d-hop How do you assign a variant to another enterprise without moving the whole product and all the other variants within that product? I haven't figured out how to do that and assumed it wasn't possible. I've included screengrabs for what happens when I try to delete a variant in #5947 .
@tschumilas yes I've assumed that #5947 is the same as this, and added my comments over there.
Yes indeed I think 5947 is the same. Thanks for your comment there. I'll re-open 5947 if its closed - I don't know if there is another way to link issues.
I think there is no way to only assign one variant to another enterprise. This is done for the whole product. So if a user wants just a few variants deleted, the entire product has to moved, then all the variants re-created.
I think this makes this an s2.
Case: an enterprise sells 20 kinds of jam. These are listed as variants. They are no longer making rhubarb jam and want it deleted from their variant list. OFN Support needs to delete all the jam variants, and recreate the product with all variants except rhubarb. Considering how typical this case is - I'm really hoping we can see this as an S2 (or maybe provide courtesy drugs for support teams ). Just joking of course - but I am really wondering about our criteria for s2 - shouldn't the criteria in some way take into account the burden on our limited, and often unpaid, support resources?
Considering how typical this case is - I'm really hoping we can see this as an S2 (or maybe provide courtesy drugs for support teams ).
LOL! Can we specify our drug of choice??
@emilyjeanrogers @tschumilas can you give us more quantitative information to assess the problem like:
That would help us to know more about the load. I understand it can be a pain to not be able to use the "select all" button in the OC, but we should be careful about raising things as s2. it takes quite a lot of focus out of the pipe. And with current upgrades we might face more serious s2 than this one.
We all want this to be fixed, but we might have bigger things to catch.
@sigmundpetersen while we figure this out I've removed that item from dev ready.
I've had the request to delete variants 12 times so far. 6 of those were in one hub. Another hub with 75 producers asked - but she is very competent with OFN and has it in hand. But noting this is the end of our season here - so most producers have stopped selling. This will scale up when we head into late winter and producers get their product lists into shape for the next season. The requests I've had were all producers who have large (over 150) products and multiple variants with many products - so using 'select all' is impractical, and re-assining the whole product and recreating all the variants except one are both not very plausible solutions. A dev could do a search on our database to see how many users have lists of over 100 products, and how many products have 5 or more variants?
Noting also that the product uplift will help with the problem because a producer will be able to search only for stock on hand. So products with 0 on hand will be de-filtered. Right now the reason producer want to delete is partly because the product list isn't very searchable, and with lists of over 100 products, its pretty hard to manage. I think some producers will move to managing products via import instead - it gives them flexibility. But of course this depends on getting a download file....
I totally appreciate that an s2 takes focus out of the pipe. Do we want to do similar metrics across other s2s to compare? would that help set priorities? Just brainstorming.
I can replicate this as well, and I think there's something nasty going on. Also whatever this case is, there are no specs that cover it...
@tschumilas are there multiple currencies configured on Canada? I think this might be related to currencies in some way...
No - not even sure its possible to configure mutliple currencies - is it?

We only have a single currency in Aus and can't delete variants here either.
just checking - is more feedback needed on this issue or should that label be removed?
Any more feedback needed on this @RachL ?
Should we lower the severity or move to Dev Ready?
Alright, we decided at delivery train to do a spike on this one to understand the complexity of the potential tech solution. according to the results of the spike, we will decide when is best to tackle this one. This is now moved to dev ready, but as a spike only.
Alright, I think it's fixed. Pretty sure it's the same root cause of #5947 as well.
I've missed that this was fixed, so we still treated support question on that topic by changing owners of products.
I think this created a mess that is tough to follow, so I will reopen this one on the next support request. Ping @Cecilia-Hn
fixed? I missed that too. users will be happy to know!!
I missed that also, this is a great news for users, thanks !
Most helpful comment
@emilyjeanrogers @tschumilas can you give us more quantitative information to assess the problem like:
So far
That would help us to know more about the load. I understand it can be a pain to not be able to use the "select all" button in the OC, but we should be careful about raising things as s2. it takes quite a lot of focus out of the pipe. And with current upgrades we might face more serious s2 than this one.
We all want this to be fixed, but we might have bigger things to catch.
@sigmundpetersen while we figure this out I've removed that item from dev ready.