See all offers
Free shipping, cash on delivery
Free shipping, cash on delivery
Shop now
Welcome to our store
Welcome to our store
Shop now
Free shipping, cash on delivery
Shop now
Welcome to our store
Shop now
Free shipping, cash on delivery
Shop now
Welcome to our store
Shop now
See all offers (2)
See all offers (2)
Home
New in
Sweater
Tops
Dreeses
Jacket&Coat
Pants
Suits
Shoes
Christmas gifts
More links
Log in
Create an account
${(data.data && data.data.count) > 999 ? '999+' : (data.data && data.data.count)}
${(data.data && data.data.count) > 999 ? '999+' : (data.data && data.data.count)}
Search
Home
New in
Sweater
Tops
Dreeses
Jacket&Coat
Pants
Suits
Shoes
Christmas gifts
Log in
function setSearchUrl(searchValue) { return Promise.resolve({ url: '/search?q=' + searchValue }); } exportFunction('setSearchUrl', setSearchUrl);
${function() { if (data === undefined || typeof data !== 'string' || data == '') return ''; const searchEmpty = ("Your search for \"{test}\" did not yield any results.").replace('{test}', data); return `
View more
${searchEmpty}
`; }()}
Home
/
My account
Login
Please enter email and password.
${data.errors && data.errors[0]}
Email
Email is required.
Enter a valid email address
Password
Password is required.
Password must be between 6-16 characters long.
Forgot password?
Sign in
Don't have an account?
Create one
${ Object.keys((data && data.login_setting) || {}) .map(type => `
`) .join("") }
Login for more discounts
${function() { const force_image_size = "1.5"; const product_hover_on = true; const product_show_sale_label = true; const product_save_type = "amount"; const badge1 = "New"; const badge2 = ""; const badge3 = ""; const product_title_mobile_hide = false; const product_title_style = "full"; const enable_collection_thumb_image = true; const variantNames = ["color"]; const thumbMaxNum = 4; const suffix_id = Math.random().toFixed(6).slice(-6); const url = data.withinUrl; const productId = data.id; const price = data.price; const productAvailable = data.available; const productVariants = data.variants || []; const images = data.images || []; const image = data.image || {}; const imageWidth = image.width; let imageHeight = image.height; let image2 = data.secondImage; let imageHoverOn = !!image2.src; if (force_image_size !== 'natural') { imageHeight = imageWidth * force_image_size; } let compareAtPrice = data.compare_at_price; let offRatio = data.off_ratio; let discountMaxUrl = url; const showFrom = data.price_min != data.price_max ? true : false; for (let i = 0; i < productVariants.length; i++) { const variant = productVariants[i]; if (variant.price == price && compareAtPrice < variant.compare_at_price) { compareAtPrice = variant.compare_at_price; offRatio = variant.off_ratio; variant.available && (discountMaxUrl = variant.withinUrl); } } const soldOutText = "Sold out"; let soldOn = false; let saleOn = false; if (productAvailable) { if (product_show_sale_label && +price < +compareAtPrice) { saleOn = true; } } else { soldOn = true; } const diffPrice = compareAtPrice - price; const saveLabelContent = product_save_type == 'percent' ? (offRatio + '%') : `
`; let saveText = "Save {off_ratio}"; saveText = saveText.replace('{off_ratio}', saveLabelContent); const productTitle = data.title; const variantValues = []; const showVariants = []; if (data.need_variant_image && enable_collection_thumb_image && variantNames.length > 0) { for (let i = 0; i < (data.options || []).length; i++) { const option = data.options[i]; const optionName = option.name.toLowerCase(); if (variantNames.includes(optionName)) { for (let j = 0; j < productVariants.length; j++) { const variant = productVariants[j]; const value = variant.options[i].value; if (!variantValues.includes(value)) { variantValues.push(value); showVariants.push(variant); } } break; } } } return `
${saleOn ? saveText : soldOutText}
${badge1}
${badge2}
${badge3}
${ "title" === 'subtitle' ? data.brief : data.title }
From
${saveText}
${showVariants.map((item, idx) => { let showMoreHtml = ''; if (idx == thumbMaxNum) { showMoreHtml += `
+${showVariants.length - thumbMaxNum}
`; } return ` ${showMoreHtml}
`; }).join('') }
`; }()}
${function() { const defaultSelectedVariant = data.variants.find(v => v.available) || data.variants[0]; const defaultIndex = !!defaultSelectedVariant ? data.images.findIndex(img => img.src == (defaultSelectedVariant.image && defaultSelectedVariant.image.src)) : -1; const initialSlide = defaultIndex == -1 ? 0 : defaultIndex; const attrs = data.images.length > 1 ? 'slide controls' : ''; return `
`; }()}
${data.title}
${data.brief}
${function() { const defaultSelectedVariant = data.variants.find(v => v.available) || data.variants[0]; return `
${("Save {off_ratio}").replace('{off_ratio}', ("amount") == 'percent' ? defaultSelectedVariant.off_ratio + '%' : `
` )}
-
`; }()}
${function(){ const defaultSelectedVariant = data.variants.find(v => v.available) || data.variants[0]; let status_lan = "Add to cart"; if ((defaultSelectedVariant && !defaultSelectedVariant.available) || (!defaultSelectedVariant && !data.available)) { status_lan = "Sold out"; } return `
Quantity
${status_lan}
Buy now
` }()}
${function() { return data.product.options.map((option, index) => { const optionName = option.name || ''; const optionId = option.id || ''; let isThumbImage = !!option.showThumbImage; const thumbStyle = "image_with_text"; const thumbType = isThumbImage ? thumbStyle.replace(/_/g, '-') : 'text'; const variantType = null; const selectedVariantVal = data.selectedOptions && data.selectedOptions.length && data.selectedOptions.find(v => v.name === optionName).value[0] || ''; const isSelected = (value) => { const selected = (data.selectedOptions || []).find(v => v.name === optionName); return selected && selected.value.length && selected.value[0] == value; }; const getThumbImage = (value) => { const options = data.product.options || []; const option = options.find(o => o.name === optionName); if (option.thumbImages) { const thumbImage = option.thumbImages.find(t => t.value === value); if (thumbImage && thumbImage.image) { return { src: thumbImage.image.src, alt: thumbImage.image.alt }; } } return {src: '', alt: ''}; }; return `
${optionName.slice(0, 1).toUpperCase() + optionName.slice(1).toLowerCase()} :
${selectedVariantVal}
${option.values.map((value, idx) => { return `
${value}
${value}
` }).join('')}
`; }).join(''); }()}
${data.value || ''}
${("Save {off_ratio}").replace('{off_ratio}', ("amount") == 'percent' ? data.variant.off_ratio + '%' : `
` )}
-
-
You may also like
${ data == 1 ? ("1 product was added to your cart!") : ("{count} products were added to your cart!").replace('{count}', data) }
${data.title}
${data.options.map(option => option.value).join(' / ')}
${(data.parsedProperties || []).map((propertie)=>{ if (propertie.isImage){ return `
${propertie.name}:
View image
` }else{ return `
${propertie.name}: ${propertie.value}
` } }).join('')}
${data.product.title}
${data.variant.options.map(option => option.value).join(' / ')}
${(data.product.parsedProperties || []).map((propertie)=>{ if (propertie.isImage){ return `
${propertie.name}:
View image
` }else{ return `
${propertie.name}: ${propertie.value}
` } }).join('')}
${data.data.item_count == 1 ? ("Cart subtotal (1 product)") : ("Cart subtotal ( {count} products)").replace('{count}', data.data.line_items.reduce((res, item) => res + Number(item.quantity), 0))}
${("Save {off_ratio}").replace('{off_ratio}', `
`)}
Taxes and shipping calculated at checkout
View cart
Continue shopping
const TAG = "spz-custom-popup"; const DISPLAY_TYPE = { POPUP: "PTT_POPUP" // 弹窗 }; const API = { LIST: `/api/storefront/promotion/placement/list`, // 获取弹窗列表 REPORT: `/api/storefront/promotion/placement/data/report` // 上报数据 }; const DISPLAY_DEVICE = { PC_AND_MOBILE: "PD_PC_MOBILE", // PC和移动端 PC: "PD_PC", // PC MOBILE: "PD_MOBILE" // 移动端 }; const REPORT_EVENT = { CLICK: "PE_CLICK", // 点击事件 IMPRESSION: "PE_IMPRESSION" // 曝光事件 }; class SpzCustomPopup extends SPZ.BaseElement { constructor(element) { super(element); this.popupList_ = []; // 弹窗数据 this.popupZIndex = 1050; // 弹窗层级 // 节流处理 每5s内多次点击 算一次点击上报 this.throttleReport = this.win.SPZCore.Types.throttle( this.win, (data) => { this.reportData(data) }, 5000 ) } static deferredMount() { return false; } buildCallback() { this.action_ = SPZServices.actionServiceForDoc(this.element); this.templates_ = SPZServices.templatesForDoc(this.element); this.xhr_ = SPZServices.xhrFor(this.win); this.setupAction_(); this.viewport_ = this.getViewport(); } mountCallback() { this.fetchData_(); } // 接口请求,获取数据 fetchData_() { const id = window.SHOPLAZZA.meta.page.template_type === 51 ? window.SHOPLAZZA.meta.page.resource_id : 0; return this.xhr_.fetchJson(API.LIST, { method: 'POST', body: { page_id: window.SHOPLAZZA.meta.page.template_type, placement_type: DISPLAY_TYPE.POPUP, discount_id: id } }).then((res) => { // 请求成功 执行render this.doRender_(res.list); }).catch((err) => { console.error(err); }); } // 渲染dom doRender_(data) { this.popupList_ = data || []; if (this.popupList_.length > 0) { this.popupList_.forEach((item) => { item.config = JSON.parse(item.config); }) } return this.templates_ .findAndRenderTemplate(this.element, { list: this.popupList_ }) .then((el) => { const children = this.element.querySelector('*:not(template)'); children && SPZCore.Dom.removeElement(children); this.element.appendChild(el); }) .then(() => { // 遍历显示弹窗 this.popupList_.forEach((item) => { this.showPopup_(item); }); }) } showPopup_(popup) { // 展示弹窗 符合展示条件的弹窗 const $popup = document.querySelector(`#popup-${popup.id}`); $popup && SPZ.whenApiDefined($popup).then((api)=> { const isPC = this.viewport_.getWidth() >= 960; const isMobile = this.viewport_.getWidth() < 960; const isMatchPCDevice = popup.device === DISPLAY_DEVICE.PC_AND_MOBILE || popup.device === DISPLAY_DEVICE.PC; const isMatchMobileDevice = popup.device == DISPLAY_DEVICE.PC_AND_MOBILE || popup.device === DISPLAY_DEVICE.MOBILE; if((isPC && isMatchPCDevice) || (isMobile && isMatchMobileDevice)) { // 根据推送时间 延迟展示弹窗 setTimeout(() => { api.open(); }, popup.delay_seconds * 1000); } }) } // 上报数据 async reportData(data) { this.xhr_.fetchJson(API.REPORT, { method: "POST", body: { placement_id: data.placement_id, event: data.event } }); } setupAction_() { this.registerAction('handleTrack', async(invocation) => { // 如果是主题编辑器则不用处理 if(window.top !== window.self) { return; } const data = invocation.args; const event = data.event; // 点击上报 节流处理 if(event === REPORT_EVENT.CLICK) { await this.throttleReport(data); } else { this.reportData(data); } }); } triggerEvent_(name, data) { const event = SPZUtils.Event.create(this.win, `${ TAG }.${ name }`, data || {}); this.action_.trigger(this.element, name, event); } isLayoutSupported(layout) { return layout == SPZCore.Layout.CONTAINER; } } SPZ.defineElement(TAG, SpzCustomPopup);
${function(){ return data.originData.list.map((item) => { const parseConfig = item.config; const shopUrl = parseConfig.button.url; let modalSize = ''; if(+parseConfig.width.value <= 600){ modalSize = 'small'; } else if(+parseConfig.width.value > 600 && +parseConfig.width.value <= 800){ modalSize = 'middle'; } else { modalSize = 'large'; } const imagePosition = parseConfig?.image?.position || 'top'; const wrapHeightMap = { small: 'min-height:360px;', middle: 'min-height:480px;', large: 'min-height:600px;' }; const image_size_top_map = { small: 'height:208px;', middle: 'height:295px;', large: 'height:346px;' }; const content_size_right_map = { small: 'padding-top: 68px;', middle: 'padding-top: 72px;', large: 'padding-top: 76px;' }; const content_size_top_map = { small: 'padding: 20px 16px;', middle: 'padding: 40px 16px;', large: 'padding: 40px 16px;' }; positionMap = { top: { imageStyle:`width:100%;${image_size_top_map[modalSize]}`, contentStyle:`margin-top:0;padding: 16px;${content_size_top_map[modalSize]}`, wrapStyle: 'flex-direction:column;', }, left: { imageStyle:'width:50%;height:100%;', contentStyle:`width:50%;padding:16px;${content_size_right_map[modalSize]}`, wrapStyle: 'flex-direction:row;', }, right: { imageStyle:'width:50%;height:100%;', contentStyle:'width:50%;padding:16px;margin-top:0;', wrapStyle: 'flex-direction:row-reverse;' }, none: { imageStyle:'display: none', contentStyle:'width:100%;', wrapStyle: 'width:100%;' } } const keys = ['text_title','description_text','content_discount','text_content','button','activity_desc']; let sortKeys = []; parseConfig.section.forEach(item => { if(keys.includes(item)){ sortKeys.push(item) } }) const maskPercent = item.config.mask.value/100; const backgroundSize = parseConfig.background.presentation_rule === 'fill' ? 'cover' : 'contain'; const pcImage = (parseConfig.background.url && parseConfig.background.upload) ? parseConfig.background.url : ''; const mobileImage = (parseConfig.background.mobile_url && parseConfig.background.upload) ? parseConfig.background.mobile_url : ''; const color1 = parseConfig.background.color; const color2 = parseConfig.background.color2 || parseConfig.background.color; const backgroundStyle = `background: url(//img.staticdj.com/${pcImage}) center / ${backgroundSize} no-repeat, linear-gradient(180deg, ${color1} 0%, ${color2} 100%);`; const backgroundMobileStyle = `background: url(//img.staticdj.com/${mobileImage}) center / ${backgroundSize} no-repeat, linear-gradient(180deg, ${color1} 0%, ${color2} 100%);`; return `
${item.placement_template == 'PT_POPUP_BUY_X_GET_Y' ? `
${sortKeys.map(key => { if(key == 'text_title'){ return `
${parseConfig.text_title.value}
` }else if(key == 'text_content'){ return `
${parseConfig.text_content.value}
` }else if(key == 'button'){ return `
${parseConfig.button.text}
${parseConfig.button.text}
` } }).join('')}
` : ``} ${item.placement_template == 'PT_POPUP_BUY_X_GET_Y' ? `
${sortKeys.map(key => { if(key == 'text_title'){ return `
${parseConfig.text_title.value}
` }else if(key == 'text_content'){ return `
${parseConfig.text_content.value}
` }else if(key == 'button'){ return `
${parseConfig.button.text}
${parseConfig.button.text}
` } }).join('')}
` : ``} ${item.placement_template == 'PT_POPUP_REBATE_M_N_DISCOUNT' ? `
${sortKeys.map(key => { if(key == 'text_title'){ return `
${parseConfig.text_title.value}
` }else if(key == 'description_text'){ return `
${parseConfig.description_text.value}
` }else if(key == 'content_discount'){ return `
${parseConfig.content_discount.replace_texts.map((text) => { return `
${text}
` }).join('')}
` }else if(key == 'button'){ return `
${parseConfig.button.text}
${parseConfig.button.text}
` }else if(key == 'activity_desc'){ return `
${parseConfig.activity_desc.value}
` } }).join('')}
`: ``} ${item.placement_template == 'PT_POPUP_REBATE_M_N_DISCOUNT' ? `
${sortKeys.map(key => { if(key == 'text_title'){ return `
${parseConfig.text_title.value}
` }else if(key == 'description_text'){ return `
${parseConfig.description_text.value}
` }else if(key == 'content_discount'){ return `
${parseConfig.content_discount.replace_texts.map((text) => { return `
${text}
` }).join('')}
` }else if(key == 'button'){ return `
${parseConfig.button.text}
${parseConfig.button.text}
` }else if(key == 'activity_desc'){ return `
${parseConfig.activity_desc.value}
` } }).join('')}
`: ``}
`; }).join(''); }()}