diff --git a/src/pretix/presale/views/widget.py b/src/pretix/presale/views/widget.py index 6588d7807..c0b6cbc44 100644 --- a/src/pretix/presale/views/widget.py +++ b/src/pretix/presale/views/widget.py @@ -272,6 +272,7 @@ class WidgetAPIProductList(EventListMixin, View): '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, + 'mandatory_priced_addons': item.mandatory_priced_addons, 'free_price': item.free_price, 'avail': [ item.cached_availability[0], diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js index 247f09c0c..7c3d1fc2e 100644 --- a/src/pretix/static/pretixpresale/js/widget/widget.js +++ b/src/pretix/static/pretixpresale/js/widget/widget.js @@ -307,7 +307,8 @@ Vue.component('pricebox', { price: Object, free_price: Boolean, field_name: String, - original_price: String + original_price: String, + mandatory_priced_addons: Boolean, }, computed: { display_price: function () { @@ -329,6 +330,9 @@ Vue.component('pricebox', { }, priceline: function () { if (this.price.gross === "0.00") { + if (this.mandatory_priced_addons) { + return "\xA0"; // nbsp, because an empty string would cause the HTML element to collapse + } return strings.free; } else { return this.$root.currency + " " + this.display_price; @@ -375,7 +379,8 @@ Vue.component('variation', { // Price + '