Symönster kappor & Jackor

const breadCrumbsHandler = (function () { const isProductListPage = $('#product-list-page').length; const idHelloRetail = '661d25cd13577e6a5d627a3e'; const breadCrumbs = function () { const breadCrumb = document.querySelector('.breadcrumbs'); let dataholder; if (breadCrumb) { const breadCrumbs = document.querySelectorAll('.breadcrumbs > *'); let crumbsAsString = []; for (let i = 0; i < breadCrumbs.length; i++) { //crumbsAsString.push(breadCrumbs[i].href.split('/category/')[1]); if (breadCrumbs[i].querySelector('span')) { //if (breadCrumbs[i].querySelector('span').innerHTML.includes('Nyheter')) { return } crumbsAsString.push(breadCrumbs[i].querySelector('span').innerHTML.replaceAll('&', '&')); } else { crumbsAsString.push(breadCrumbs[i].innerHTML); } } dataholder = '{"hierarchies": ' + JSON.stringify(crumbsAsString) + '}'; const pageHeadline = document.querySelector('#main-content .page-headline')?.textContent || ''; if (pageHeadline === 'REA & Kampanjer') { dataholder = '{"isOnSale": "true"}'; } const productListBlock = document.querySelector('.product-list-block'); if (productListBlock) { productListBlock.setAttribute('id', 'helloretail-category-page-' + idHelloRetail); productListBlock.setAttribute('data-filters', dataholder); } // Hello retail fallback script setTimeout(function() { var helloretailContent = document.querySelector(`#helloretail-category-page-${idHelloRetail} .hr-products-container`); var woocommerceContent = document.querySelector(`#helloretail-category-page-${idHelloRetail} > div.product-list`); if (helloretailContent?.children.length === 0) { helloretailContent.closest(`#helloretail-category-page-${idHelloRetail}`).style.display="none"; woocommerceContent.style.display="block"; } else { const productListBlock = document.querySelector('.product-list-block'); productListBlock.querySelector('.product-list')?.classList.add('show') productListBlock.querySelector('.product-filter')?.classList.add('show') } }, 2000); } }; return { init: () => { if (isProductListPage) { breadCrumbs(); } }, }; })(); $(document).on( 'productListUpdate ready', breadCrumbsHandler.init );

JavaScript seem to be disabled in your browser.

You must have JavaScript enabled in your browser to utilize the functionality of this website.