diff --git a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue index a77bde39d..44ff5a6ed 100644 --- a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue +++ b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue @@ -53,6 +53,7 @@ export default { props: { cmsWidgetName: String, lineItems: Array, + activePromos: null, }, data() { return {}; @@ -76,7 +77,11 @@ export default { return this.getCmsContent(this.cmsWidgetName, "SubheaderText"); }, afterpayPrice() { - const allLineItems = getArrayOfAllLineItems(this.lineItems); + let allLineItems = getArrayOfAllLineItems(this.lineItems); + if (this.activePromos) { + allLineItems = allLineItems?.filter((item) => item.partType !== "PROMO_DISCOUNT"); + } + let price = baseMixin.methods.getTierOnePackagePrice( baseMixin.methods.filterOutFees(allLineItems) ); @@ -86,11 +91,9 @@ export default { price += baseMixin.methods.getTotalLineItemPrice(lineItem); }); - if (this.lineItems.promos) { - const promos = getPromosThatMatchLineItemsOnOrder( - this.lineItems.promos, - allLineItems - ); + if (this.activePromos) { + let allLineItems = getArrayOfAllLineItems(this.lineItems); + const promos = getPromosThatMatchLineItemsOnOrder(this.activePromos, allLineItems); promos.forEach((promo) => { price += baseMixin.methods.getTotalLineItemPrice(promo); }); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 8f9d256e0..212378d03 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -44,6 +44,7 @@