The Adventure Assurance Program enables all eligible 2020-21 Ikon Pass products to be bought with confidence as 2020-21 Ikon Pass holders will be able to defer the purchase price paid for their unused 20/21 Ikon Pass by April 11, 2021 for a credit to be applied toward their purchase of any single 2021-22 Ikon Pass product. Sweet Days Await Us. 4 DAYS TOTAL AT SELECT DESTINATIONS. The remaining ${{totalPaymentPrice.toFixed(2)}} will be charged on the following schedule:
', created() { this.dates = window.datesArray this.paymentPrices = window.priceArray this.paymentPlanProductIds = window.productArray this.modalDescription = window.modalDescription this.widgetDescription = window.widgetDescription this.buildPaymentSchedule() }, computed: { productId() { return this.$store.getters['products/selectedProduct'].Id }, selectedAttributeValueIds() { return this.selectedAttributes .filter(function (attribute) { return !attribute.IsDisabled }) .map(function (obj) { return obj.SelectedValueId; }); }, selectedAttributes() { return this.$store.getters['products/selectedProductAttributes'] }, numberOfPayments() { return this.dates.length }, isPaymentPlanProduct() { let _this = this let foundProductId = this.paymentPlanProductIds.find(function (pid) { return pid === _this.productId; }); if (foundProductId){ return true } else { return false } }, }, methods: { buildPaymentSchedule() { this.paymentDetails = [] let paymentPriceRecord = null this.totalPaymentPrice = 0 this.totalDeposit = 0 //First we must determine which of the selected attributes have payment prices and calculate a total payment price for them let _this = this this.selectedAttributeValueIds.forEach(function (attributeId, index) { paymentPriceRecord = null paymentPriceRecord = _this.paymentPrices.filter(p => { return p.id.toString() === attributeId }) if (paymentPriceRecord && paymentPriceRecord.length > 0) { _this.totalPaymentPrice += paymentPriceRecord[0].paymentPrice _this.totalDeposit += paymentPriceRecord[0].deposit } }) if (_this.totalPaymentPrice > 0) { //Determine monthly payment let thisPayment = +(_this.totalPaymentPrice / _this.dates.length) _this.monthlyPayment = Math.floor(thisPayment * 100) / 100 //Determine if there is a remainder amount _this.paymentRemainder = +(_this.totalPaymentPrice - (_this.monthlyPayment * _this.dates.length)).toFixed(2) //Then we create payment record for each configured date _this.dates.forEach(function (paymentDate, index) { if (index === _this.dates.length - 1 && _this.paymentRemainder > 0) { let lastPayment = _this.monthlyPayment + _this.paymentRemainder _this.paymentDetails.push({ date: paymentDate, amount: `$${lastPayment.toFixed(2)}` }) } else { _this.paymentDetails.push({ date: paymentDate, amount: `$${_this.monthlyPayment.toFixed(2)}` }) } }) //Add a total amount row _this.paymentDetails.push({ date: 'TOTAL', amount: `$${_this.totalPaymentPrice.toFixed(2)}` }) } }, }, watch: { selectedAttributeValueIds: { immediate: true, deep: false, handler(newValue, oldValue) { this.buildPaymentSchedule() }, }, } }) // ]]>.