Update payment.vue

newValidatedPromos contains both validated and revalidated promos so can replace the existing promos in the lineitems.
This commit is contained in:
hiteshkumar87 2023-11-23 19:18:15 +05:30
parent 8b9c5ad8d8
commit 359c8204ce

View file

@ -350,8 +350,8 @@ export default {
const taxedVaps = mapTaxedLineItemsToStoreFormat(taxedLineItems, availableVaps);
// Add items that were not in the store yet but added via query string promo validation
lineItems.promos = lineItems.promos ?? [];
lineItems.promos.push(...newValidatedPromos);
//newValidatedPromos contains both validated and revalidated promos.
lineItems.promos = Array.from(newValidatedPromos);
const vapsToAddToCart = getVapsThatNeedToBeAddedToSatisfyPromos(
newValidatedPromos,
taxedVaps,