// =========================================================================
// 5. CART DESKTOP — SPLIT TITLE ROW ABOVE SKU/QTY/PRICE
// JS restructures each cart row so product name spans full width on
// its own row, with SKU/qty/price on a second row below it.
// Only runs on cart.php at >800px. Added: March 23 2026
// =========================================================================
(function fixCartDesktop() {
if (!window.location.pathname.includes('cart.php')) return;
if (!window.matchMedia('(min-width: 801px)').matches) return;
function doFix() {
document.querySelectorAll('.cart-item').forEach(function(row) {
if (row.querySelector('.jrc-cart-row-top')) return; // already done
var figure = row.querySelector('.cart-item-figure');
var title = row.querySelector('.cart-item-title');
var price = row.querySelector('.cart-item-price');
var qty = row.querySelector('.cart-item-quantity');
var total = row.querySelector('.cart-item-total');
var edit = row.querySelector('.cart-item-edit');
if (!figure || !title || !price || !qty || !edit) return;
// Extract just the product name element from title
var nameEl = title.querySelector('.cart-item-name, h2.cart-item-name, .cart-item-name a');
if (!nameEl) nameEl = title.querySelector('h2, h3');
// Pull SKU/options/change out of title into a new cell
var skuCell = document.createElement('td');
skuCell.className = 'cart-item-block jrc-cart-sku-cell';
// Move everything from title except the name into skuCell
Array.from(title.childNodes).forEach(function(node) {
if (!nameEl || !nameEl.contains(node) && node !== nameEl) {
skuCell.appendChild(node.cloneNode(true));
}
});
// Leave only the name in title
Array.from(title.childNodes).forEach(function(node) {
if (node !== nameEl && !(nameEl && nameEl.parentNode === title && node === nameEl.parentNode)) {
// keep only nameEl
}
});
// Clear title and re-append just the name
title.innerHTML = '';
if (nameEl) title.appendChild(nameEl.cloneNode(true));
// Set colspan/rowspan
figure.setAttribute('rowspan', '2');
title.setAttribute('colspan', '5');
title.style.cssText = 'padding-bottom: 4px !important;';
// Build top row from existing row
row.classList.add('jrc-cart-row-top');
// Remove price/qty/total/edit from top row
[price, qty, total, edit].forEach(function(el) {
if (el) el.parentNode && el.parentNode.removeChild(el);
});
// Build bottom row
var bottomRow = document.createElement('tr');
bottomRow.className = 'cart-item jrc-cart-row-bottom';
bottomRow.appendChild(skuCell);
if (price) bottomRow.appendChild(price);
if (qty) bottomRow.appendChild(qty);
if (total) bottomRow.appendChild(total);
if (edit) bottomRow.appendChild(edit);
row.parentNode.insertBefore(bottomRow, row.nextSibling);
});
}
doFix();
var attempts = 0;
var interval = setInterval(function() {
if (window.matchMedia('(min-width: 801px)').matches) doFix();
attempts++;
if (attempts >= 10) clearInterval(interval);
}, 300);
var observer = new MutationObserver(function() {
if (window.matchMedia('(min-width: 801px)').matches) doFix();
});
observer.observe(document.body, { childList: true, subtree: true });
})();
These squeegees make it possible to get to the bottom of the window and over a wide ledge. They make it possible to reach over window air conditioners and signs. They fit on the ends of most extension poles with a wooden pole tip and hold any squeegee channel with two screws. This kit comes with a set of three different sizes.
It fits on the end of most extension poles with a wooden pole tip and hold any squeegee channel with two screws.
Ledger Handle 22inThe Ledger by Companion Tools: 22-Inch A unique angled handle that allows you to pull down the squeegee all the way to the bottom of the glass when cleaning commercial windows or...
The Ledger by Companion Tools: 7-Inch A unique angled handle that allows you to pull down the squeegee all the way to the bottom of the glass when cleaning commercial windows or windows with a...
Ledger Handle 16inThis squeegee extends 16 inches making it easier to get to the bottom of the window and over a wide ledge. The Ledger makes it possible to reach over window air...
Ledger Handle 22in for Thick Channel This squeegee extends 22 inches making it easier to get to the bottom of the window and over a wide ledge.The Ledger makes it possible to reach over...
A uniquely angled handle that allows you to cover every square inch of second and third-story recessed windows without leaving the ground! It is VERSATILE, works with any size squeegee channel and...