Retro Wings Viking Celtic Comfort Knit Leggings

1 sold
const TAG = "spz-custom-product-automatic"; class SpzCustomProductAutomatic extends SPZ.BaseElement { constructor(element) { super(element); this.variant_id = 'afe0ca84-2d2e-4682-9156-dfef2b0d0884'; this.isRTL = SPZ.win.document.dir === 'rtl'; this.isAddingToCart_ = false; // 加购中状态 } 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.init(); // 监听事件 this.bindEvent_(); } async init() { this.handleFitTheme(); const data = await this.getDiscountList(); this.renderApiData_(data); } async getDiscountList() { const productId = 'c6761a7a-2395-4d2f-9ca7-2438520980b2'; const variantId = this.variant_id; const productType = 'default'; const reqBody = { product_id: productId, variant_id: variantId, discount_method: "DM_AUTOMATIC", customer: { customer_id: window.C_SETTINGS.customer.customer_id, email: window.C_SETTINGS.customer.customer_email }, product_type: productType } const url = `/api/storefront/promotion/display_setting/text/list`; const data = await this.xhr_.fetchJson(url, { method: "post", body: reqBody }).then(res => { return res; }).catch(err => { this.setContainerDisabled(false); }) return data; } async renderDiscountList() { this.setContainerDisabled(true); const data = await this.getDiscountList(); this.setContainerDisabled(false); // 重新渲染 抖动问题处理 this.renderApiData_(data); } clearDom() { const children = this.element.querySelector('*:not(template)'); children && SPZCore.Dom.removeElement(children); } async renderApiData_(data) { const parentDiv = document.querySelector('.automatic_discount_container'); const newTplDom = await this.getRenderTemplate(data); if (parentDiv) { parentDiv.innerHTML = ''; parentDiv.appendChild(newTplDom); } else { console.log('automatic_discount_container is null'); } } doRender_(data) { const renderData = data || {}; return this.templates_ .findAndRenderTemplate(this.element, renderData) .then((el) => { this.clearDom(); this.element.appendChild(el); }); } async getRenderTemplate(data) { const renderData = data || {}; return this.templates_ .findAndRenderTemplate(this.element, { ...renderData, isRTL: this.isRTL }) .then((el) => { this.clearDom(); return el; }); } setContainerDisabled(isDisable) { const automaticDiscountEl = document.querySelector('.automatic_discount_container_outer'); if(isDisable) { automaticDiscountEl.setAttribute('disabled', ''); } else { automaticDiscountEl.removeAttribute('disabled'); } } // 绑定事件 bindEvent_() { window.addEventListener('click', (e) => { let containerNodes = document.querySelectorAll(".automatic-container .panel"); let bool; Array.from(containerNodes).forEach((node) => { if(node.contains(e.target)){ bool = true; } }) // 是否popover面板点击范围 if (bool) { return; } if(e.target.classList.contains('drowdown-icon') || e.target.parentNode.classList.contains('drowdown-icon')){ return; } const nodes = document.querySelectorAll('.automatic-container'); Array.from(nodes).forEach((node) => { node.classList.remove('open-dropdown'); }) // 兼容主题 this.toggleProductSticky(true); }) // 监听变体变化 document.addEventListener('dj.variantChange', async(event) => { // 重新渲染 const variant = event.detail.selected; if (variant.product_id == 'c6761a7a-2395-4d2f-9ca7-2438520980b2' && variant.id != this.variant_id) { this.variant_id = variant.id; this.renderDiscountList(); } }); } // 兼容主题 handleFitTheme() { // top 属性影响抖动 let productInfoEl = null; if (window.SHOPLAZZA.theme.merchant_theme_name === 'Wind' || window.SHOPLAZZA.theme.merchant_theme_name === 'Flash') { productInfoEl = document.querySelector('.product-info-body .product-sticky-container'); } else if (window.SHOPLAZZA.theme.merchant_theme_name === 'Hero') { productInfoEl = document.querySelector('.product__info-wrapper .properties-content'); } if(productInfoEl){ productInfoEl.classList.add('force-top-auto'); } } // 兼容 wind/flash /hero 主题 (sticky属性影响 popover 层级展示, 会被其他元素覆盖) toggleProductSticky(isSticky) { let productInfoEl = null; if (window.SHOPLAZZA.theme.merchant_theme_name === 'Wind' || window.SHOPLAZZA.theme.merchant_theme_name === 'Flash') { productInfoEl = document.querySelector('.product-info-body .product-sticky-container'); } else if (window.SHOPLAZZA.theme.merchant_theme_name === 'Hero') { productInfoEl = document.querySelector('.product__info-wrapper .properties-content'); } if(productInfoEl){ if(isSticky) { // 还原该主题原有的sticky属性值 productInfoEl.classList.remove('force-position-static'); return; } productInfoEl.classList.toggle('force-position-static'); } } setupAction_() { this.registerAction('handleDropdown', (invocation) => { const discount_id = invocation.args.discount_id; const nodes = document.querySelectorAll('.automatic-container'); Array.from(nodes).forEach((node) => { if(node.getAttribute('id') != `automatic-${discount_id}`) { node.classList.remove('open-dropdown'); } }) const $discount_item = document.querySelector(`#automatic-${discount_id}`); $discount_item && $discount_item.classList.toggle('open-dropdown'); // 兼容主题 this.toggleProductSticky(); }); // 加购事件 this.registerAction('handleAddToCart', (invocation) => { // 阻止事件冒泡 const event = invocation.event; if (event) { event.stopPropagation(); event.preventDefault(); } // 如果正在加购中,直接返回 if (this.isAddingToCart_) { return; } const quantity = invocation.args.quantity || 1; this.addToCart(quantity); }); } // 加购方法 async addToCart(quantity) { // 设置加购中状态 this.isAddingToCart_ = true; const productId = 'c6761a7a-2395-4d2f-9ca7-2438520980b2'; const variantId = this.variant_id; const url = '/api/cart'; const reqBody = { product_id: productId, variant_id: variantId, quantity: quantity }; try { const data = await this.xhr_.fetchJson(url, { method: 'POST', body: reqBody }); // 触发加购成功提示 this.triggerAddToCartToast_(); return data; } catch (error) { error.then(err=>{ this.showToast_(err?.message || err?.errors?.[0] || 'Unknown error'); }) } finally { // 无论成功失败,都重置加购状态 this.isAddingToCart_ = false; } } showToast_(message) { const toastEl = document.querySelector("#apps-match-drawer-add_to_cart_toast"); if (toastEl) { SPZ.whenApiDefined(toastEl).then((apis) => { apis.showToast(message); }); } } // 触发加购成功提示 triggerAddToCartToast_() { // 如果主题有自己的加购提示,则不显示 const themeAddToCartToastEl = document.querySelector('#add-cart-event-proxy'); if (themeAddToCartToastEl) return; // 显示应用的加购成功提示 this.showToast_("Added successfully"); } 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, SpzCustomProductAutomatic);
class SpzCustomDiscountBundle extends SPZ.BaseElement { constructor(element) { super(element); } isLayoutSupported(layout) { return layout == SPZCore.Layout.LOGIC; } mountCallback() {} unmountCallback() {} setupAction_() { this.registerAction('showAddToCartToast', () => { const themeAddToCartToastEl = document.querySelector('#add-cart-event-proxy') if(themeAddToCartToastEl) return const toastEl = document.querySelector('#apps-match-drawer-add_to_cart_toast') SPZ.whenApiDefined(toastEl).then((apis) => { apis.showToast("Added successfully"); }); }); } buildCallback() { this.setupAction_(); }; } SPZ.defineElement('spz-custom-discount-toast', SpzCustomDiscountBundle);
$25.99
$70.17
-$44.18
Color- Grey
Size- S
Quantity
Free worldwide shipping
Free returns
Sustainably made
Secure payments
people are viewing this right now
Shipping
Estimated Delivery:Feb-17 - Feb-21
Vendor by: mysite
SKU: DZ-252413-YFR-Grey-S
Description

Merino wool is the foundation of our brand because no other material has so many benefits. Beyond being natural, renewable, and temperature regulating, merino also is a material that can change the way you think about clothing, consumption, and in a greater sense—your lifestyle.

 

wool regulates your temperature like no other material.

Among outdoor enthusiasts, you’ll often hear the phrase: “cotton kills.” After harrowing hypothermic experiences due to wearing cotton, the gear-obsessed outdoor community has put their trust in wool base layers (if you've switched from cotton socks to wool socks, you know exactly what we're talking about). The problem with cotton is that it readily absorbs moisture and releases that moisture very slowly, which in turn pulls precious warmth from your body. In contrast, wool insulates even when wet and doesn’t technically feel wet until it's saturated with 60% of its own weight in moisture.

Here’s the surprising part of wool’s climate controlling properties: wool keeps you cool in warm climates too. Lightweight wool garments breathe and wick moisture away from the skin, keeping the wearer cool, even in humid climates.

 

wool fights odor and climate change.

You may notice that your cotton garments stink after just one or two wears and require washing. Wool garments, on the other hand, can go for weeks (or 100 days) at a time without showing signs of odor. How does wool accomplish this? It quickly absorbs sweat which prevents the growth of odor-causing bacteria and keeps your skin dry.

Since wool fights odor so well, wool-wearers go longer between laundry cycles and the earth is happier because of it. 25% of a garment’s carbon footprint comes from how often you wash it, which reinforces the fact that eliminating laundry when you can is one small thing you can do for the environment.

 

Because merino wool has natural benefits.

wool will change the way you think about clothing.

As a society, we’ve been led to believe that buying lots of cheap clothing will help us look and feel good. In reality, excessive consumption creates decision fatigue, undue clutter, and cumulatively creates more stress in our lives. We really only need a few garments that we adore. Owning less allows you to have the best. Or depending on how you look at it, having the best allows you to own less.

 

easy care, wash-and-wear.

features that benefit you.

Wool will go the extra mile.

We encourage every customer to find out just how far their merino clothing can go between washes. It’s better for the life of the garment and for the environment (and you can save a little time and money, too). But mostly, we want to empower you to live a life filled with less, starting with what you wear.

Wool has a bad rap as being finicky and high-maintenance. That may be true for wool clothing of the past, but we don’t compromise wearability in our wool. Nobody wants a fussy garment. And we add features whenever a style allows, including things that help keep a garment practical.


wearing merino can do wonders for your sleep health.

  • “The latest study conducted by researchers at The University of Sydney has found adults wearing wool sleepwear fell asleep in just 12 minutes compared with 22 and 27 minutes for those wearing polyester and cotton” (The Woolmark Company).

  • As we all know, wool helps your regulate body temperature. This keeps your body in what is known as ‘the thermal comfort zone’ for longer, which helps you fall asleep quicker and also have deeper sleep (The Woolmark Company).

  • A research paper published in the journal Nature and Science of Sleep (2016) said that a group from a study fell asleep in 11 minutes on average wearing merino wool versus 15 minutes on average in cotton (The Woolmark Company).

  • As a result of merino’s plethora of benefits (breathable, moisture-wicking, and temperature regulating), studies have shown that babies who either wear merino wool or use a merino blanket for sleep get better quality sleep. As babies are learning to regulate their own temperature for the first time, merino provides comfort and promotes a good night’s rest.

If you value owning less and owning better, consider merino wool.

You may also like