Widget: respect item.allow_waitinglist

This commit is contained in:
Raphael Michel
2020-07-21 09:46:30 +02:00
parent b6a343a623
commit ca4db5f628
2 changed files with 2 additions and 1 deletions

View File

@@ -215,6 +215,7 @@ class WidgetAPIProductList(EventListMixin, View):
'price': price_dict(item, item.display_price) if not item.has_variations else None,
'min_price': item.min_price if item.has_variations else None,
'max_price': item.max_price if item.has_variations else None,
'allow_waitinglist': item.allow_waitinglist,
'free_price': item.free_price,
'avail': [
item.cached_availability[0],

View File

@@ -254,7 +254,7 @@ Vue.component('availbox', {
return this.item.has_variations ? this.variation.avail : this.item.avail;
},
waiting_list_show: function () {
return this.avail[0] < 100 && this.$root.waiting_list_enabled;
return this.avail[0] < 100 && this.$root.waiting_list_enabled && this.item.allow_waitinglist;
},
waiting_list_url: function () {
if (this.item.has_variations) {