Men's Military Solid Color Hiking Cargo Shorts (Belt is not included)

$42.00
const TAG = "spz-custom-product-automatic"; class SpzCustomProductAutomatic extends SPZ.BaseElement { constructor(element) { super(element); this.variant_id = '3ac80bec-a879-440d-a545-c494609b436b'; this.isRTL = SPZ.win.document.dir === 'rtl'; } 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 = 'c4b087f8-9fb3-4a35-be2a-9d725fa31e51'; 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 == 'c4b087f8-9fb3-4a35-be2a-9d725fa31e51' && 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(); }); } 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);
COLOR:  Khaki
SIZE:  29
Quantity

Description

Belt Not Included

 

SellingPoints

  1.  
    Fabric : Cotton
  2.  
    Clothing Type : Shorts
  3.  
    Style : Military
  4.  
    Function : Quick Dry
  5.  
    Function : Multi Pockets
  6.  
    Pattern : Solid Color
  7.  
    Pants Length : Knee Length

Specifications

  1.  
    Gender : Men's
  2.  
    Sports Clothing Sub Category : Hiking Cargo Shorts,Hiking Shorts
  3.  
    Clothing Type : Shorts,Bottoms
  4.  
    Activity : Camping / Hiking / Caving,Traveling,Climbing,Fishing,Hunting
  5.  
    Season : Summer
  6.  
    Inseam Type : 10"
  7.  
    Function : Ripstop,Scratch Resistant,Multi Pockets,Wear Resistance,Breathable,Sweat wicking,Front Zipper,Quick Dry
  8.  
    Fabric : Cotton
  9.  
    Pattern : Solid Color
  10.  
    Pants Length : Knee Length
  11.  
    Style : Military,Shorts
  12.  
    Tips : Belt Not Included

Highlights

【EXCELLENT CRAFTMANSHIP】Relaxed loose fit cargo short with well made and trend design Perfect details for high-end metal snap buttons, pure copper zipper closure fly, belt loops design for waist adjustment, practical and deep multi-pockets and suitable for any type of leg

【VARIETY STYLE】Cargo short for men loose fit with Straight leg. Sits comfortably at waist. Zipper closure ,multiple pockets with snaps. multi colors and multi size for choose

【OCCASION LIFESTYLE】Casual cargo Shorts are made of lightweight, comfortable, and breathable material which are ideal for casual daily wear or sports outdoor recreation in summer. pockets are stylish and functional for storage for everyday wear or even work. Perfectly matched with vest, T-shirt, shirt etc. to provide a unique and stylish cargo look

Size chart

SizeHeightHipPants LengthWaistlineWeight (kg)
2963-6538½18½29¼19¾-23½
3065-6739¼18½30¼21¾-25½
3167-6940¼1931¼23½-27½
3267-6941¼1932¼25½-29½
3367-6942¼1933¼27½-31½
3469-70¾43¼19¼34¼29½-33½
3669-70¾45¼19¼36¼31½-35½
3870¾-74¾47¼19¾38¼33½-39¼