forked from CGM_Public/pretix_original
Widget: Original price for variations
This commit is contained in:
@@ -304,7 +304,7 @@ Vue.component('variation', {
|
|||||||
+ '</div>'
|
+ '</div>'
|
||||||
|
|
||||||
+ '<div class="pretix-widget-item-price-col">'
|
+ '<div class="pretix-widget-item-price-col">'
|
||||||
+ '<pricebox :price="variation.price" :free_price="item.free_price" :original_price="item.original_price"'
|
+ '<pricebox :price="variation.price" :free_price="item.free_price" :original_price="orig_price"'
|
||||||
+ ' :field_name="\'price_\' + item.id + \'_\' + variation.id" v-if="$root.showPrices">'
|
+ ' :field_name="\'price_\' + item.id + \'_\' + variation.id" v-if="$root.showPrices">'
|
||||||
+ '</pricebox>'
|
+ '</pricebox>'
|
||||||
+ '<span v-if="!$root.showPrices"> </span>'
|
+ '<span v-if="!$root.showPrices"> </span>'
|
||||||
@@ -321,6 +321,12 @@ Vue.component('variation', {
|
|||||||
item: Object,
|
item: Object,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
orig_price: function () {
|
||||||
|
if (this.variation.original_price) {
|
||||||
|
return this.variation.original_price;
|
||||||
|
}
|
||||||
|
return this.item.original_price;
|
||||||
|
},
|
||||||
quota_left_str: function () {
|
quota_left_str: function () {
|
||||||
return django.interpolate(strings["quota_left"], [this.variation.avail[1]]);
|
return django.interpolate(strings["quota_left"], [this.variation.avail[1]]);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user