Buy $69.98 Free shipping
ATHETIER CHRISTMAS TREE
$29.95
$59.99
Save
$30.04
$28.95-$97.95
Save
${(function () {
return automatic_discount_list.map((item) => {
// 樥ççąťĺ
const template_type = item.discount[0].template_type;
// ćŻĺŚćžç¤şčŞĺ¨ććŁ
const is_show_automatic_discount = item.discount[0].product_enabled;
// ćŻĺŚčˇłč˝Źč˝ĺ°éĄľ
const is_redirection = item.discount[0].is_redirection;
// ććŁĺžć
const discount_icon = item.discount_icon;
// 珏ä¸ä¸ŞčŞĺ¨ććŁ
const first_automatic_discount = item.discount[0];
// ćžç¤şćĺ ĺąç¤ş
const isFold = (item.discount[0].display_type || DISPLAY_TYPE.DTE_FOLD) === DISPLAY_TYPE.DTE_FOLD;
// ććŹć°çť
const text_arr = item.discount[0].config.texts;
// č˝ĺ°éĄľéžćĽ
const first_landing_url = `/promotions/discount-default/${first_automatic_discount.discount_id}`;
// čŞĺ¨ććŁćťć°
const automatic_discount_total = item.discount.length;
// ćŻĺŚćžç¤şććŁĺžć
const isHasDiscountIcon = discount_icon ? true : false;
// ćŻĺŚćžç¤şććŁĺžć ä¸ć¨Ąççąťĺä¸ä¸ştag
const isHasDiscountIconWithNoTag = (template_type != 'tag' && isHasDiscountIcon)? true : false;
// ććŹé˘č˛
let text_color = DEFAULT_CONFIG.TEXT_COLOR;
// čćŻé˘č˛
const bgFn = (curBg) => template_type === "text" ? "transparent" : curBg;
let bg_color = bgFn(DEFAULT_CONFIG.BG);
// čžšćĄé˘č˛
const borderFn = (curBorder) => template_type == "tag" ? curBorder : "initial";
let border_color = borderFn(DEFAULT_CONFIG.BORDER_COLOR);
// 樥çé
罎
let template_config = first_automatic_discount.template_config;
// ĺ
ĺşćšćĄ
try {
if(template_config.length !== 0){
template_config = JSON.parse(template_config);
text_color= isHasDiscountIconWithNoTag ? template_config.color[template_type].icon_text_color : template_config.color[template_type].text_color;
bg_color = bgFn(template_config.color[template_type].background_color);
const arrayRgba = bg_color.split(",");
arrayRgba.splice(3, 1, " 1)");
border_color = borderFn(`${arrayRgba.join(",")}`);
}
} catch (error) {
console.error('template_config_error', error);
template_config = {
color: {
[template_type]: {
icon_text_color: DEFAULT_CONFIG.TEXT_COLOR,
text_color: DEFAULT_CONFIG.TEXT_COLOR,
background_color: DEFAULT_CONFIG.BG
}
}
};
}
// ć çž
const isTag = template_type == 'tag';
// ćĺĺ横ĺš
const isTextAndBanner = template_type == 'text' || template_type == 'banner';
// ćĺć ˇĺź
const textStyle = `color: ${text_color}; background-color: transparent; border: none;`;
// ć çžć ˇĺź
const labelStyle = `color: ${text_color};border: 1px solid ${border_color};background-color:${bg_color};padding: 4px;`;
// 横ĺš
ć ˇĺź
const bannerStyle = `color: ${text_color};border: none; background-color:${bg_color}`;
// ĺ¤ĺąć ˇĺźĺ¨ć çžć ˇĺźä¸ä¸ĺąç¤şé˘č˛é
罎ďźé¤ĺźć çžçąťĺďźé˘č˛é˝ĺŻäťĽĺ¨ĺ¤ĺąčŚç
let outerStyle = '';
if (template_type == 'text') {
outerStyle = textStyle;
} else if (template_type == 'tag') {
outerStyle = "border: none;";
} else if (template_type == 'banner') {
outerStyle = bannerStyle;
}
/**
* 1. ć çžä¸ĺŽćŻĺçŹć ˇĺźĺąç¤şç
* 2. ćĺ ďźć¨Şĺĺ¸ĺąďźćĺĺ横ĺš
ďźĺĺšśćä¸čĄććŹďź ć çžďźĺçŹć ˇĺźĺ¤ç
* 3. ĺšłéşďźçşľĺĺ¸ĺąďźćĺă横ĺš
ĺć çžďź ć çžďźĺçŹć ˇĺźĺ¤ç
*/
let txtHtml = ``;
if (isFold) {
if(isTag) {
// ć çž
const spanText = text_arr.map((text) => {
return `${text}`;
}).join('');
txtHtml = `
`
}
})()}
${spanText}
`;
} else {
// ćĺĺ横ĺš
txtHtml = `
${first_automatic_discount.config.text}
`;
}
} else {
// ćĺĺ横ĺš
, ä˝ć çžćčŞĺˇąçć ˇĺź
const spanText = text_arr.map((text) => {
return `${text}`;
}).join('');
// é˝ćŻçşľĺĺ¸ĺąďźć çžćé´čˇ, ĺ¤ć´ťĺ¨ĺ¤ĺąçş§ć¨Şĺĺ¸ĺą
txtHtml = `${spanText}
`;
}
/**
* ćžç¤şĺžć çĺ¤ć
*/
const discount_type = item.discount_type;
const isShowRebateIcon = ["DT_REBATE_CTQ_OTP", "DT_REBATE_CTQ_OTR", "DT_REBATE_CTA_OTP", "DT_REBATE_CTA_OTR", "DT_M_N_DISCOUNT"].includes(discount_type) && isTextAndBanner
const isShowBxgyIcon = ["DT_BUY_ONE_GET_ONE", "DT_BUY_X_GET_Y"].includes(discount_type)
const isShowBundleIcon = ["DT_CLASSIC_BUNDLE","DT_MIX_MATCH_BUNDLE"].includes(discount_type);
/**
* 渲ćä¸ććĄćć˝ĺąçććŁĺ襨
*/
const discount_list_html = (curItem) => {
return `
${function() {
return curItem.discount.map(childItem => {
return `
`}).join('');
}()}
`;
}
return `
`;
}).join('');
})()}
${childItem.config.text}
${childItem.config.text}
Flash sale cannot be displayed here. Please move it to the product detail area.
(This prompt will not be displayed on the client-side)
${saleCount}
sold
${function() {
if (banner.type === "TYPE_TWO") return `
`
return ``;
}()}
` : ``;
const flashSaleDesc = discount_info.limit_user_product_discount > -1 ? `
Promo products limited to ${discount_info.limit_user_product_discount} item per person
` : "";
return `
${bgImg}
${countdownDom}
${flashSaleDesc}
${titleIcon}
${productDisplay.text}
${progressBarDom}
${dd}D
¡
${hours}
${hh}
:
${mm}
:
${ss}
.
${sss}
Discount
đ
Merry Christmasđ
Quantity
To display this card to customers, you need to go to "Booster & Store Conversion" to turn on the trust enhancement feature.
${data.module_title}
${item.title}