Skip to content

Commit

Permalink
🔥 Disable christmas coupon functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Dec 31, 2024
1 parent 17deb02 commit e375bec
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/mixins/coupon.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
import {
CHRISTMAS_CAMPAIGN_MIN_SPEND,
CHRISTMAS_CAMPAIGN_COUPON,
} from '@/constant/index';

export default {
computed: {
mixinCoupon() {
return this.$route.query.coupon || '';
},
},
methods: {
getApplicableCoupon({ cartCoupon, checkoutPrice }) {
if (this.mixinCoupon || cartCoupon) {
return this.mixinCoupon || cartCoupon;
}
return checkoutPrice > CHRISTMAS_CAMPAIGN_MIN_SPEND
? CHRISTMAS_CAMPAIGN_COUPON
: '';
const queryCoupon = this.$route.query.coupon || '';
return queryCoupon || cartCoupon || undefined;
},
},
};

0 comments on commit e375bec

Please sign in to comment.