Hassle-free returns. 30-day postage paid returns
Hassle-free returns. 30-day postage paid returns
hastowl
Search
Log in
Create an account
Home
Hot Sale
Sweatshirts & Hoodies
Pants
Two Piece
Shorts
Jackets
Shoes
New In
More links
Home
Hot Sale
Sweatshirts & Hoodies
Pants
Two Piece
Shorts
Jackets
Shoes
New In
More links
hastowl
Log in
Create an account
Search
Home
Hot Sale
Sweatshirts & Hoodies
Pants
Two Piece
Shorts
Jackets
Shoes
New In
Home
Hot Sale
Sweatshirts & Hoodies
Pants
Two Piece
Shorts
Jackets
Shoes
New In
Log in
Home
/
Casual fleece printed trousers
1/2
1/2
Casual fleece printed trousers
$41.87
$54.83
Color
: 
Purple
Purple
Please select a color
Size
S
M
L
XL
2XL
3XL
4XL
5XL
Please select a size
Quantity
Add to cart
Buy now
Barcode:
Description
Season : Spring , Autumn , Winter
Color : Purple , Green , Blue
Occasion : Street
Style : Casual , Basics
Length : Long
Size Chart
cm
Size
S
M
L
XL
2XL
3XL
4XL
5XL
waist
69
74
79
84
89
94
99
104
hipline
101
106
111
116
121
126
131
136
Length
106
107
108
109
110
111
112
113
inch
Size inch
S
M
L
XL
2XL
3XL
4XL
5XL
waist
27.2
29.1
31.1
33.1
35.0
37.0
39.0
40.9
hipline
39.8
41.7
43.7
45.7
47.6
49.6
51.6
53.5
Length
41.7
42.1
42.5
42.9
43.3
43.7
44.1
44.5
${function(){ const isRTL = originData.isRTL; const isMobile = originData.isMobile; const inProductDetail = originData.inProductDetail; if (!inProductDetail) { return `
Flash sale cannot be displayed here. Please move it to the product detail area. (This prompt will not be displayed on the client-side)
`; } const flashsaleData = originData.flashsaleData; const image_domain = originData.image_domain; const discount_info = flashsaleData.discount_info; const setting = flashsaleData.product_setting; if (!discount_info || !setting) return ``; const displayType = setting.display_type; const banner = setting.banner; const productDisplay = setting.product_display; const bannerConfig = JSON.parse(banner.config); const productDisplayConfig = JSON.parse(productDisplay.config); const colorConfig = productDisplayConfig.color; const countdownConfig = productDisplayConfig.countdown; let titleIcon = ``; let bgImg = ``; const deg = `${isRTL ? -90 : 90}deg`; const { banner_bg_start, banner_bg_end, banner_text } = colorConfig; let bgStyle = `background: linear-gradient(${deg}, ${banner_bg_start} 0%, ${banner_bg_end} 100%);`; let bannerColor = `color: ${banner_text};` if (banner.type === "TYPE_CUSTOM") { const { desktop, mobile, image_render } = bannerConfig; const bgSize = image_render === "fill" ? "background-size: cover;background-position: center;" : "background-position: center;background-size: auto 100%;"; if (isMobile && mobile) { bgStyle = `background: URL(${image_domain + mobile});${bgSize}`; } else if (!isMobile && desktop) { bgStyle = `background: URL(${image_domain + desktop});${bgSize}`; } } else { if (banner.type === "TYPE_ONE") { titleIcon = productDisplay.text ? `
` : ""; bgImg = `
` } if (banner.type === "TYPE_TWO") { titleIcon = productDisplay.text ? `
` : "" } } const { sale_bar_background_color, progress_sale_bar_background_color_start, progress_sale_bar_background_color_end } = colorConfig; const rate = discount_info.discount_sales_rate; const progressBarStyle = `background: linear-gradient(${deg}, ${progress_sale_bar_background_color_start} 0%, ${progress_sale_bar_background_color_end} 100%);`; const saleCount = productDisplay.sales_progress.format === "FORMAT_NUMBER" ? discount_info.discount_sales : `${rate}%`; const progressBarDom = productDisplay.sales_progress.enabled && rate > 0 ? `
${saleCount}
sold
` : ``; const { countdown_bg, countdown_text } = colorConfig; const { end_opened, end_format } = countdownConfig; const tempMap = { "DD_SSS": "DD:HH:mm:ss:SSS", "HH_SSS": "HH:mm:ss:SSS", "DD_ss": "DD:HH:mm:ss", "HH_ss": "HH:mm:ss" } const isShowDD = [tempMap.DD_SSS, tempMap.DD_ss].includes(end_format); const isShowSSS = [tempMap.DD_SSS, tempMap.HH_SSS].includes(end_format); const countdown = discount_info.ends_remaining_seconds; const countdownDom = end_opened ? `
${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}
${titleIcon}
${productDisplay.text}
${progressBarDom}
${countdownDom}
${flashSaleDesc}
`}()}
${function(){ const dd = data.dd; const hh = data.hh; const mm = data.mm; const ss = data.ss; const sss = data.SSS; const hours = data.d * 24 + data.h; return `
${dd}D
·
${hours}
${hh}
:
${mm}
:
${ss}
.
${sss}
` }()}
class SpzCustomDiscountFlashsale extends SPZ.BaseElement { constructor(element) { super(element); this.xhr_ = SPZServices.xhrFor(this.win); this.getFlashSaleApi = "\/api\/storefront\/promotion\/flashsale\/display_setting\/product_setting"; this.timer = null; this.variantId = "6a09d7b3-d4ac-4dd4-b271-80da3b3736dc"; // 促销活动数据 this.flashsaleData = {} } isLayoutSupported(layout) { return layout == SPZCore.Layout.CONTAINER; } buildCallback() { this.templates_ = SPZServices.templatesForDoc(); this.viewport_ = this.getViewport(); // 挂载bind函数 解决this指向问题 this.render = this.render.bind(this); this.resize = this.resize.bind(this); this.switchVariant = this.switchVariant.bind(this); } mountCallback() { // 获取数据 this.getData(); this.element.onclick = (e) => { const cur = this.win.document.querySelector(".app_discount_flashsale_desc"); if (this.flashsaleData.product_setting.is_redirection && appDiscountUtils.inProductBody(this.element) && e.target !== cur) { this.win.open(`/promotions/discount-default/${this.flashsaleData.discount_info.id}`); } } // 绑定 this.viewport_.onResize(this.resize); // 监听子款式切换,重新渲染 this.win.document.addEventListener('dj.variantChange', this.switchVariant); } unmountCallback() { // 解绑 this.viewport_.removeResize(this.resize); this.win.document.removeEventListener('dj.variantChange', this.switchVariant); // 清除定时器 if (this.timer) { clearTimeout(this.timer); this.timer = null; } } resize() { if (this.timer) { clearTimeout(this.timer) this.timer = null; } this.timer = setTimeout(() => { this.render(); }, 200) } switchVariant(event) { const variant = event.detail.selected; if (variant.product_id == 'deca6cd7-beaa-4465-9736-b3706d702e0c' && variant.id != this.variantId) { this.variantId = variant.id; this.getData(); } } getData() { const reqBody = { product_id: "deca6cd7-beaa-4465-9736-b3706d702e0c", product_type: "", variant_id: this.variantId } this.flashsaleData = {}; this.win.fetch(this.getFlashSaleApi, { method: "POST", body: JSON.stringify(reqBody), headers: { "Content-Type": "application/json" } }).then(async (response) => { if (response.ok) { this.flashsaleData = await response.json(); this.render(); } else { this.clearDom(); } }).catch(err => { this.clearDom(); }); } clearDom() { const children = this.element.querySelector('*:not(template)'); children && SPZCore.Dom.removeElement(children); } render() { this.templates_ .findAndRenderTemplate(this.element, { isMobile: appDiscountUtils.judgeMobile(), isRTL: appDiscountUtils.judgeRTL(), inProductDetail: appDiscountUtils.inProductBody(this.element), flashsaleData: this.flashsaleData, image_domain: this.win.SHOPLAZZA.image_domain, }) .then((el) => { this.clearDom(); this.element.appendChild(el); }) } } SPZ.defineElement('spz-custom-discount-flashsale', SpzCustomDiscountFlashsale);