- ๐ฉ๐ชGermany rgpublic Dรผsseldorf ๐ฉ๐ช ๐ช๐บ
I still think this is badly needed. It's not really a great solution to just hide the message via CSS as this will suppress ANY (probably important) error message. There's not an easy other way either to get rid of this message for template/theme authors. And I don't see any likelihood to have this solved in Commerce Core in the forseeable future.
I've attached a patch who tries to solve this a little less aggressively than what was originally propose in the issue description. I tried to use best practices to make this as little intrusive as possible. I'm using a service decorator and I'm only decorating the problematic function that really generates the unwanted message in the first place. If in the future the Drupal Commerce team includes any other important functionality in the Event Subscriber that won't get thrown out.
In addition, I've made this behavior completely configurable, of course. What are y'all thinking about this? Good idea? Safe to go in?
- Status changed to Postponed
almost 2 years ago 8:54pm 29 January 2023 - ๐ณ๐ฟNew Zealand andyd328 Lyttelton, NZ ๐ณ๐ฟ
Hi rgpublic,
Thanks for the patch and thoughts, I agree that suppressing the add to cart message is needed, I've been hoping that it will get into Commerce core and not need anything here.
Have you seen https://www.drupal.org/project/commerce/issues/3317738 โจ Add an option to disable the add to cart message on a certain order type Fixed what do you think about trying to see if that can get it into commerce core? It looks like a nice discrete change to Commerce could solve this use case.
Kind regards,
Andy
- ๐ฉ๐ชGermany rgpublic Dรผsseldorf ๐ฉ๐ช ๐ช๐บ
@AndyD328: Got you. I've subscribed and commented over there. Thanks for the pointer.
- Status changed to Closed: won't fix
over 1 year ago 7:19pm 23 May 2023 - ๐ณ๐ฟNew Zealand andyd328 Lyttelton, NZ ๐ณ๐ฟ
Closing this as 3317738 has now been committed to commerce core. Thanks everyone!