Untitled
unknown
plain_text
a year ago
4.8 kB
3
Indexable
Never
.yankee-pdp-wrapper { display: flex; flex-direction: row; flex-wrap: wrap; } span.bv_stars_svg_no_wrap > svg, div.row.add-to-cart-wrapper > div.attribute.quantity > div{ display: none !important; } .product .tile-body.product-tile-addtocart { padding-bottom: 0; } .product .product-tile { background-color: #fff; -webkit-box-shadow: none; box-shadow: none; } .product .product-tile .tile-body .pdp-link { width: 80px !important; } #maincontent div.tile-body.product-tile-addtocart > div.pdp-link > div.link { font-size: 12px; font-family: 'Roboto-Bold'; text-align: center; padding-top: 0px; margin-top: -15px; } .row.tile-body-footer { display: none !important; } .image-container { margin-block: -5px !important; } .product .tile-body.product-tile-addtocart { padding-bottom: 0; margin-bottom: -18px; } #maincontent div.tile-body.product-tile-addtocart > div.product-primary-category { display: none !important; } .color-swatches { display: none !important; } .price.non-sale-value { display: none !important; } .row.add-to-cart-wrapper { display: none !important; } div#prodSelecDesktop { display: none; } #maincontent div.row.tile > div.pdp-tile > div.attributes > div > div > div.row > div.more-products-link { display: none !important; } .promotion-msg.promotion-primary { display: none !important; } @media screen and (max-width: 767px) { div#prodSelecMob { display: none; } #maincontent div.tile-body.product-tile-addtocart > div.pdp-link > div.link { font-size: 13px; text-align: center; padding-inline: 25px; } .product .product-tile { background-color: #fff; -webkit-box-shadow: none; box-shadow: none; } .image-container { margin-block: -5px !important; } .product .tile-body.product-tile-addtocart { padding-bottom: 0; margin-bottom: -15px; } .product { height: 100%; margin: 0 !important; padding: 0 !important; } .product-tile { min-height: 0rem; } .image-container img {max-width: 150px;margin: auto; margin-top: 10px;} .product-tile .image-container { position: relative; overflow: auto; left: 10%; } } @media (min-width:768px) and (max-width: 991px) { .product-tile { min-height: 10em; } .image-container img { margin: auto; margin-top: 20px; } .image-container { margin-block: -5px !important; } .product .tile-body.product-tile-addtocart { padding-bottom: 0; margin-bottom: -15px; } } (function () { var debug = false; try { function waitForElement(selector, callback) { var maxCheck = 200; var interval = window.setInterval(function () { if (document.querySelectorAll(selector).length > 0) { callback(); window.clearInterval(interval); } else if (--maxCheck < 0) { window.clearInterval(interval); } }, 50); } function addProductsToPDP(products) { for (var i = 0; i < products.length; i++) { if (products[i].getAttribute('data-tile-position') < 10) { document.querySelectorAll('.yankee-pdp-wrapper').forEach(function (item, index) { console.log(item); item.insertAdjacentElement('beforeend', products[i].cloneNode(true)); }); } } } function init() { document.querySelectorAll('.pdp-tile > .attributes .pdp-selector').forEach(function (item, index) { item.insertAdjacentHTML('beforeend', '<div class="yankee-pdp-wrapper"></div>'); }); document.querySelectorAll("#productTileTitle").forEach((e)=>{ e.textContent = "Style (1 of 9)" }); var xhr = new XMLHttpRequest(); var url = document.querySelector('.breadcrumb > .breadcrumb-item:nth-child(3) a').getAttribute('href'); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { var customEl = document.createElement('div'); customEl.innerHTML = this.responseText; var products = customEl.querySelectorAll('.product-grid .product-tile-wrap'); addProductsToPDP(products); } }; xhr.send(); } waitForElement('.breadcrumb > .breadcrumb-item:nth-child(3) a', init); } catch (e) { if (debug) console.log(e, 'error in ' + variation_name); } })();