View all
  • Enjoy a storewide 10% discount! Code: FEB10

    Enjoy a storewide 10% discount! Code: FEB10

    Shop now

Enjoy a storewide 10% discount! Code: FEB10

Enjoy a storewide 10% discount! Code: FEB10

const updateHeaderMetrics = () => { const header = document.getElementById('header'); const rect = header.getBoundingClientRect(); const headerHeight = rect.bottom; document.documentElement.style.setProperty('--header-height', `${headerHeight}px`); }; window.addEventListener('DOMContentLoaded', updateHeaderMetrics); window.addEventListener('resize', updateHeaderMetrics); const header = document.getElementById('header'); const resizeObserver = new ResizeObserver(entries => { for (let entry of entries) { const rect = entry.target.getBoundingClientRect(); const headerHeight = rect.bottom; document.documentElement.style.setProperty('--header-height', `${headerHeight}px`); } }); resizeObserver.observe(header);
function setSearchUrl(searchValue) { return Promise.resolve({ url: '/search?q=' + searchValue }); } exportFunction('setSearchUrl', setSearchUrl); Search

Sofirn

function setSearchUrl(searchValue) { return Promise.resolve({ url: '/search?q=' + searchValue }); } exportFunction('setSearchUrl', setSearchUrl); Search function setSearchUrl(searchValue) { return Promise.resolve({ url: '/search?q=' + searchValue }); } exportFunction('setSearchUrl', setSearchUrl); Search
Account
Log in Create an account
Cart
  • ⚡FLASH SALE
  • Feb Special Offers
  • SOFIRN FLASHLIGHTS
    SOFIRN FLASHLIGHTS
    • Powerful Flashlights
    • Tactical Flashlights
    • Diving Flashlights
    • EDC Flashlights
    • Mini Flashlights
    • Headlamps
    • Lanterns
  • NEW: SR15 UV
  • SOFIRN ST10
    SOFIRN ST10
    • ST10 Bundle & Save
  • Local Warehouse
    Local Warehouse
    • Warehouse in the United States
    • Warehouse in Poland
    • Warehouse in Germany
  • BATTERIES & ACCESSORIES
  • Non-Sofirn
  • MORE
    MORE
    • Affiliate Program
    • Sofirn Blog
    • Dealer
    • Contact us
  • Log in Create an account
  • ⚡FLASH SALE
  • Feb Special Offers
  • SOFIRN FLASHLIGHTS
    • Powerful Flashlights
    • Tactical Flashlights
    • Diving Flashlights
    • EDC Flashlights
    • Mini Flashlights
    • Headlamps
    • Lanterns
    SOFIRN ST10 Clip-On Magnetic EDC Flashlight
    $24.99
    $39.99
    - 38%
    - 38%
  • NEW: SR15 UV
  • SOFIRN ST10
    • ST10 Bundle & Save
  • Local Warehouse
    • Warehouse in the United States
    • Warehouse in Poland
    • Warehouse in Germany
  • BATTERIES & ACCESSORIES
  • Non-Sofirn
  • MORE
    • Affiliate Program
    • Sofirn Blog
    • Dealer
    • Contact us
  • More links
    function setSearchUrl(searchValue) { return Promise.resolve({ url: '/search?q=' + searchValue }); } exportFunction('setSearchUrl', setSearchUrl);
    Login
    Please enter your e-mail and password:
    Email is required
    Please enter a valid email.
    Password is required.
    Password must be between 6-16 characters long.
    Forgot password?
    Don't have an account? Create one
    Login for more discounts
    MORE
    • About Sofirn
    • Sofirn Blog
    • Order Tracking
    • Affiliate Program
    • Dealer
    SUPPORT
    • Create an account
    • Warranty
    • Payment
    • Privacy Policy
    • Shipping Policy
    • Terms & Conditions
    • Return & Refund Policy
    GET IN TOUCH
    +86 18002548636 Contact us

    Monday-Friday

    9:00 am-5:30 pm

    WE ACCEPT
    PayPal Visa JCB American Express Mastercard Diners Club
    MORE
    • About Sofirn
    • Sofirn Blog
    • Order Tracking
    • Affiliate Program
    • Dealer
    SUPPORT
    • Create an account
    • Warranty
    • Payment
    • Privacy Policy
    • Shipping Policy
    • Terms & Conditions
    • Return & Refund Policy
    GET IN TOUCH
    +86 18002548636 Contact us

    Monday-Friday

    9:00 am-5:30 pm

    WE ACCEPT
    PayPal Visa JCB American Express Mastercard Diners Club
    © 2026 Sofirn All rights reserved

    Cart

    Your cart is reserved for !
    cart
    cart
    Your cart is currently empty.
    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);