// function to check if the coupon is valid for a specific price plan function isCouponValidForPlan(couponCode, pricePlanId) { let coupons = [ { code: "PROMO1", validFor: ["pro", "Budget"], }, ]; let selectedCoupon = coupons.find((coupon) => coupon.code === couponCode); if (!selectedCoupon) { return false; } return selectedCoupon.validFor.includes(pricePlanId); } // example usage let couponCode = "PROMO1"; let pricePlanId = "pro"; let isValid = isCouponValidForPlan(couponCode, pricePlanId); if (isValid) { // coupon is valid for the selected price plan // apply the coupon to the order } else { // coupon is not valid for the selected price plan // show an error message to the user }
top of page

2 in 1 high high chair. Can disassemble and be used as chair and side table also.

2 in 1 chair

R400,00Price
    bottom of page