Show information, when item contained in product bundle is disabled

This commit is contained in:
Martin Gross
2019-05-24 12:30:31 +02:00
parent 59beba5069
commit d39964b021

View File

@@ -900,6 +900,12 @@ class ItemUpdateGeneral(ItemDetailMixin, EventPermissionRequiredMixin, UpdateVie
def get_context_data(self, **kwargs):
ctx = super().get_context_data()
ctx['plugin_forms'] = self.plugin_forms
if not ctx['item'].active and ctx['item'].bundled_with.count() > 0:
messages.info(self.request, _("You disabled this item, but it is still part of a product bundle. "
"Your participants won't be able to buy the bundle unless you remove this "
"item from it."))
return ctx