(() => { const { EventManager, utils } = ShopbySkin; const { isMobileDevice } = utils; // 외부스크립트 등록 기능. 삭제금지 ShopbyExternalScript?.initialize({ apiOption: { platform: 'MOBILE_WEB', }, }).then(() => { EventManager.fire('QUERY_PAGE_SCRIPTS', ShopbyExternalScript?.scripts); }); EventManager.on('PAGE_LOAD_COMPLETED', ({ profile }) => { // 외부스크립트 등록 기능. 삭제금지 ShopbyExternalScript?.setGlobalObjectSb({ getPlatform: () => (isMobileDevice ? 'MOBILE_WEB' : 'PC'), profile, }); }); const searchParams = new URLSearchParams(location.search); const trackingKey = searchParams.get('trackingKey'); const channelType = searchParams.get('channelType'); const { setTrackingKey, setChannelType } = ShopbySkin.utils; setTrackingKey(trackingKey); setChannelType(channelType); EventManager.on('PAGE_LOAD_COMPLETED', (shopbyCommonData)=>{ EventManager.on('QUERY_DISPLAY_SECTIONS_IDS_SECTIONID', (data)=>{ if ( !ShopbySkin.utils.isSignIn() || '93747' == shopbyCommonData?.profile?.memberGradeNo ) { if ( data?.products?.[0] ) { data?.products?.forEach((v)=>{ let hasTheIcon = false; for ( const icon of ( v.stickerInfos || [] ) ) { if ( icon?.label?.includes('점주전용') ) { hasTheIcon = true; break; } } if ( hasTheIcon ) { const itemDom = document.querySelector(`display-product[shopby-section-id="${data?.sectionId}"] .thumb-item[data-product-no="${v.productNo}"]`); if ( itemDom?.querySelector ) { itemDom.querySelector('.product-thumb-price-info').innerHTML = `

매장 사업자 전용 상품

`; itemDom.href = `javascript:alertTheProduct();`; itemDom.querySelectorAll('a').forEach((v)=>{ v.href = `javascript:alertTheProduct();`; }); itemDom.querySelector('[shopby-action="OPEN_PRODUCT_OPTION_MODAL"]')?.remove(); } } }); } } }); }); })();