Merge pull request #1782 from Safelite/feature/CSR-1977-ajc
CSR-1977: update copy in promotions-helper
This commit is contained in:
commit
0ce58dbcb4
1 changed files with 8 additions and 8 deletions
|
|
@ -331,10 +331,10 @@ export function getNewlyInactivatedPromos(oldInactivePromos, newInactivePromos)
|
||||||
|
|
||||||
export function createPromoSuccessAlert(promoCode) {
|
export function createPromoSuccessAlert(promoCode) {
|
||||||
return {
|
return {
|
||||||
messageHeadline: "Promo applied!",
|
messageHeadline: "Promo code applied!",
|
||||||
messageCopy: `Promo "${getPromoCodeWithoutBundleIdentifier(
|
messageCopy: `Promo code ${getPromoCodeWithoutBundleIdentifier(
|
||||||
promoCode.toUpperCase()
|
promoCode.toUpperCase()
|
||||||
)}" was successfully applied to your cart.`,
|
)} was successfully applied to your cart.`,
|
||||||
type: "alert-success",
|
type: "alert-success",
|
||||||
isDismissible: true,
|
isDismissible: true,
|
||||||
shouldAutoFade: true,
|
shouldAutoFade: true,
|
||||||
|
|
@ -343,19 +343,19 @@ export function createPromoSuccessAlert(promoCode) {
|
||||||
|
|
||||||
export function createPromoErrorAlert(promoCode, errorCode = null, additionalInfo) {
|
export function createPromoErrorAlert(promoCode, errorCode = null, additionalInfo) {
|
||||||
const alert = {
|
const alert = {
|
||||||
messageHeadline: "Promo error",
|
messageHeadline: "Promo code error",
|
||||||
type: "alert-danger",
|
type: "alert-danger",
|
||||||
shouldAutoFade: false,
|
shouldAutoFade: false,
|
||||||
isDismissible: true,
|
isDismissible: true,
|
||||||
};
|
};
|
||||||
if (stackingPromoErrorCodes.includes(errorCode)) {
|
if (stackingPromoErrorCodes.includes(errorCode)) {
|
||||||
alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier(
|
alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier(
|
||||||
promoCode.toUpperCase()
|
promoCode.toUpperCase()
|
||||||
)}" cannot be combined with "${additionalInfo[0].toUpperCase()}"`;
|
)} cannot be combined with ${additionalInfo[0].toUpperCase()}`;
|
||||||
} else {
|
} else {
|
||||||
alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier(
|
alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier(
|
||||||
promoCode.toUpperCase()
|
promoCode.toUpperCase()
|
||||||
)}" is not valid`;
|
)} is not valid`;
|
||||||
}
|
}
|
||||||
return alert;
|
return alert;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue