Untitled
unknown
plain_text
3 years ago
36 kB
7
Indexable
(function () {
if(!document.querySelector('.eg-dummy'))
try {
/* main variables */
var debug = 0;
var variation_name = "";
var $;
/* all Pure helper functions */
function waitForElement(selector, trigger, delayInterval, delayTimeout) {
var interval = setInterval(function () {
if (
document &&
document.querySelector(selector) &&
document.querySelectorAll(selector).length > 0
) {
clearInterval(interval);
trigger();
}
}, delayInterval);
setTimeout(function () {
clearInterval(interval);
}, delayTimeout);
}
function live(selector, event, callback, context) {
/****Helper Functions****/
// helper for enabling IE 8 event bindings
function addEvent(el, type, handler) {
if (el.attachEvent) el.attachEvent("on" + type, handler);
else el.addEventListener(type, handler);
}
// matches polyfill
this.Element &&
(function (ElementPrototype) {
ElementPrototype.matches =
ElementPrototype.matches ||
ElementPrototype.matchesSelector ||
ElementPrototype.webkitMatchesSelector ||
ElementPrototype.msMatchesSelector ||
function (selector) {
var node = this,
nodes = (node.parentNode || node.document).querySelectorAll(selector),
i = -1;
while (nodes[++i] && nodes[i] != node);
return !!nodes[i];
};
})(Element.prototype);
// live binding helper using matchesSelector
function live(selector, event, callback, context) {
addEvent(context || document, event, function (e) {
var found,
el = e.target || e.srcElement;
while (el && el.matches && el !== context && !(found = el.matches(selector))) el = el.parentElement;
if (el && found) callback.call(el, e);
});
}
live(selector, event, callback, context);
}
// live('.eg-minus-btn', 'click', function () {
// const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
// const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
// let currentValue = parseInt(numberField.value);
// const sMin = selectElement.options[0].value;
// if (currentValue > sMin) {
// numberField.value = currentValue - 1;
// changeSelectValue(selectElement, numberField.value);
// }
// });
// live('.eg-plus-btn', 'click', function () {
// const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
// const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
// let currentValue = parseInt(numberField.value);
// const sMax = selectElement.options[selectElement.options.length - 1].value;
// if (currentValue < sMax) {
// numberField.value = currentValue + 1;
// changeSelectValue(selectElement, numberField.value);
// }
// });
live(".eg-custom-select-added select", "change", function () {
const eginput = this.parentElement.querySelector(".eg-number-input input");
const sValue = this.options[this.selectedIndex].value;;
const sMax = this.options[this.options.length - 1].value;
const sMin = this.options[0].value;
changeInputFieldDefaultValues(eginput, sMin, sMax, sValue);
});
live(".eg-cut-card", "click", function () {
const crd = this.closest(".card") || this.closest('div[data-testid^="sf-cart-item"]');
const removeBtn = crd.querySelector(".remove-line-item button") || crd.querySelector('[data-component="ItemAttributes"]+div>div:last-child>div button');
removeBtn.click();
});
/* Variation Init */
function init() {
document.querySelectorAll(".product-cards-container>.card[aria-label='Product'] .mobile-qty,.product-cards-container>.card[aria-label='Product'] .desktop-qty").forEach(mQty => {
const cSelect = mQty.querySelector(".quantity-form.custom-select-wrapper:not(.eg-custom-select-added)");
if (cSelect) {
cSelect.classList.add("eg-custom-select-added");
cSelect.insertAdjacentHTML("beforeend",
` <div class="eg-number-input">
<button class="eg-minus-btn"></button>
<input type="number" min="0" max="5" value="0">
<button class="eg-plus-btn"></button>
</div>`);
const selectElement = cSelect.querySelector("select");
const sValue = selectElement.options[selectElement.selectedIndex].value;
const sMax = selectElement.options[selectElement.options.length - 1].value;
const sMin = selectElement.options[0].value;
const eginput = cSelect.querySelector(".eg-number-input input");
changeInputFieldDefaultValues(eginput, sMin, sMax, sValue);
}
// movement
movementOfDiv(mQty.closest('.card[aria-label="Product"]'));
});
waitForElement("html body .wishlistItemCards .card", function () {
document.querySelectorAll("html body .wishlistItemCards .card").forEach(crd => {
// movement
movementOfDiv(crd);
});
}, 500, 15000);
}
const chakraModelUpdation = () => {
waitForElement('html body div[data-testid^="sf-cart-item"]:last-child [data-component="ItemAttributes"] + div>div:last-child select', function () {
document.querySelectorAll('html body div[data-testid^="sf-cart-item"]').forEach(crd => {
if (!crd.querySelector(".eg-custom-select-added")) {
const cSelect = crd.querySelector('[data-component="ItemAttributes"] + div>div:last-child');
// console.log(crd);
const selectElement = crd.querySelector("select");
if (selectElement.options.length > 0) {
cSelect.insertAdjacentHTML("beforeend",
` <div class="eg-number-input">
<button class="eg-minus-btn"></button>
<input type="number" min="0" max="5" value="0">
<button class="eg-plus-btn"></button>
</div>`);
cSelect.classList.add("eg-custom-select-added");
const sValue = selectElement.options[selectElement.selectedIndex].value;
const sMax = selectElement.options[selectElement.options.length - 1].value;
const sMin = selectElement.options[0].value;
const eginput = cSelect.querySelector(".eg-number-input input");
changeInputFieldDefaultValues(eginput, sMin, sMax, sValue);
// btn
var counter = 1;
crd.querySelector(".eg-minus-btn").addEventListener("mousedown", function () {
console.log('minus clicked');
if(counter > 0){
const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
let currentValue = parseInt(numberField.value);
const sMin = selectElement.options[0].value;
if (currentValue > sMin) {
numberField.value = currentValue - 1;
changeSelectValue(selectElement, numberField.value);
} else {
this.disabled = true;
}
enableDisableCTA("plus", crd.querySelector(".eg-plus-btn"), "enable");
}
});
crd.querySelector(".eg-plus-btn").addEventListener("mousedown", function () {
console.log('plus clicked');
const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
let currentValue = parseInt(numberField.value);
const sMax = selectElement.options[selectElement.options.length - 1].value;
if (currentValue < sMax) {
numberField.value = currentValue + 1;
changeSelectValue(selectElement, numberField.value);
} else {
this.disabled = true;
}
enableDisableCTA("minus", crd.querySelector(".eg-minus-btn"), "enable");
});
} else {
treatMentIfNOSelect(crd);
}
// movement
movementOfDiv(crd);
crd.querySelector(".eg-cut-card").addEventListener("click", function () {
const removeBtn = crd.querySelector('[data-component="ItemAttributes"]+div>div:last-child>div button');
removeBtn.click();
})
}
});
}, 2000, 15000);
}
function enableDisableCTA(whichCta, cta, egState) {
if (egState == "enable") {
cta.disabled = false;
} else {
cta.disabled = true;
}
}
const treatMentIfNOSelect = (crd) => {
if (!crd.querySelector(".eg-custom-select-added")) {
const cSelect = crd.querySelector('[data-component="ItemAttributes"] + div>div:last-child');
// console.log(crd);
const selectElement = crd.querySelector("select");
const NoSelect = setInterval(() => {
if (selectElement.options.length > 0) {
clearInterval(NoSelect);
cSelect.insertAdjacentHTML("beforeend",
` <div class="eg-number-input">
<button class="eg-minus-btn"></button>
<input type="number" min="0" max="5" value="0">
<button class="eg-plus-btn"></button>
</div>`);
cSelect.classList.add("eg-custom-select-added");
const sValue = selectElement.options[selectElement.selectedIndex].value;
const sMax = selectElement.options[selectElement.options.length - 1].value;
const sMin = selectElement.options[0].value;
const eginput = cSelect.querySelector(".eg-number-input input");
changeInputFieldDefaultValues(eginput, sMin, sMax, sValue);
// btn clicks
crd.querySelector(".eg-minus-btn").addEventListener("click", function () {
const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
let currentValue = parseInt(numberField.value);
const sMin = selectElement.options[0].value;
if (currentValue > sMin) {
numberField.value = currentValue - 1;
changeSelectValue(selectElement, numberField.value);
}
});
crd.querySelector(".eg-plus-btn").addEventListener("click", function () {
const numberField = this.closest(".eg-custom-select-added").querySelector('.eg-number-input input');
const selectElement = this.closest(".eg-custom-select-added").querySelector("select");
let currentValue = parseInt(numberField.value);
const sMax = selectElement.options[selectElement.options.length - 1].value;
if (currentValue < sMax) {
numberField.value = currentValue + 1;
changeSelectValue(selectElement, numberField.value);
}
});
// movement
movementOfDiv(crd);
crd.querySelector(".eg-cut-card").addEventListener("click", function () {
const removeBtn = crd.querySelector('[data-component="ItemAttributes"]+div>div:last-child>div button');
removeBtn.click();
})
}
}, 500);
setTimeout(() => {
clearInterval(NoSelect);
}, 3000);
}
}
const movementOfDiv = (crd) => {
const btmSection = crd.querySelector(".bottom-section");
if (btmSection) {
const btmSectionTrget = crd.querySelector(".content-hold");
if (!btmSectionTrget.querySelector(".bottom-section")) {
btmSectionTrget.insertAdjacentElement("beforeend", btmSection);
}
}
// each
const egEach = crd.querySelector(`.item-attributes>div[class^="line-item-price"]`) || crd.querySelector('[data-component="ItemAttributes"] [data-component="PricePerItem"]');
if (egEach) {
const egEachTarget = crd.querySelector(`.content-hold>.product-card-footer .mobile-qty`) || crd.querySelector('[data-component="ItemAttributes"]+div>div:last-child');
if (!egEachTarget.querySelector('div[class^="line-item-price"]')) {
egEachTarget.insertAdjacentElement("beforeend", egEach);
}
}
// cut btn
let egCut = `<button class="eg-cut-card"><svg viewBox="0 0 24 24" focusable="false" class="chakra-icon css-onkibi" aria-hidden="true"><path fill="currentColor" d="M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"></path></svg></button>`;
if (!crd.querySelector(".eg-cut-card")) {
if (crd.querySelector(".line-item-header")) {
crd.querySelector(".line-item-header").insertAdjacentHTML("beforeend", egCut);
} else if (crd.querySelector('[data-component="ItemName"]')) {
egCut = `<span class="eg-cut-card"><svg viewBox="0 0 24 24" focusable="false" class="chakra-icon css-onkibi" aria-hidden="true"><path fill="currentColor" d="M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"></path></svg></span>`;
crd.querySelector('[data-component="ItemName"]').insertAdjacentHTML("afterend", egCut);
}
}
// image inhance
const imgEl = crd.querySelector('[data-component="ItemImage"] img') || crd.querySelector(".img-hold img");
if (imgEl) {
const imageUrl = imgEl.src
// Replace the values of wid and hei with new values
const newWid = 600;
const newHei = 600;
const updatedImageUrl = imageUrl.replace(/wid=\d+/, 'wid=' + newWid).replace(/hei=\d+/, 'hei=' + newHei);
imgEl.src = updatedImageUrl;
}
}
const changeInputFieldDefaultValues = (eginput, sMin, sMax, sValue) => {
if(sValue && eginput){
eginput.value = sValue;
eginput.min = sMin;
eginput.max = sMax;
}
}
function changeSelectValue(select, value) {
select.value = `${value}`;
var changeEvent = new Event("change", { bubbles: true });
var focusEvent = new Event("focus", { bubbles: true });
select.dispatchEvent(changeEvent);
select.dispatchEvent(focusEvent);
}
waitForElement('.product-cards-container>.card[aria-label="Product"] .mobile-qty .quantity-form.custom-select-wrapper', init, 50, 15000);
chakraModelUpdation();
const send = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.send = function () {
this.addEventListener('load', function () {
if ((this.responseURL.indexOf("/addToCart") !== -1) || (this.responseURL.indexOf("/prod_marmot") !== -1)) {
setTimeout(() => {
chakraModelUpdation();
}, 2000);
}
})
return send.apply(this, arguments)
}
var egDiv = document.createElement('div');
egDiv.classList.add('eg-dummy');
egDiv.style.display = "none";
document.body.appendChild(egDiv);
} catch (e) {
if (debug) console.log(e, "error in Test" + variation_name);
}
})();
/* custom increment css */
.eg-number-input {
display: flex;
align-items: center
}
.eg-number-input input[type="number"] {
-moz-appearance: textfield;
/* Firefox */
}
.eg-number-input input[type="number"] {
pointer-events: none;
font-weight: 700;
background: none;
background-color: transparent;
border: none;
text-align: center;
width: 25px;
}
.eg-number-input input[type="number"]::-webkit-inner-spin-button,
.eg-number-input input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.eg-number-input button {
display: inline-block;
background: #f7f7f7;
border: none;
outline: none;
cursor: pointer;
width: 22px;
height: 22px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 100vmax;
position: relative;
font-weight: 700;
color: #222222;
}
.eg-minus-btn::before {
content: "-";
position: absolute;
top: 49%;
left: 50%;
transform: translate(-50%, -50%);
}
.eg-plus-btn::before {
content: "+";
position: absolute;
top: 53%;
left: 50%;
transform: translate(-50%, -50%);
}
.eg-number-input input[type="number"],
.eg-plus-btn::before,
.eg-minus-btn::before {
font-size: 14px;
}
.eg-custom-select-added select,
.eg-custom-select-added .quantity-label,
.eg-custom-select-added::after {
display: none !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer .mobile-qty {
order: -1 !important;
margin-top: 0 !important;
margin-bottom: 8px !important;
padding-left: 0 !important;
padding-right: 0 !important;
max-width: 100% !important;
flex-basis: 100% !important;
display: flex !important;
align-items: center;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer .line-item-total-price {
margin-bottom: 0 !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer .line-item-total-price .pricing,
html body .wishlistItemCards .card .product-card-footer .price * {
font-weight: 700 !important;
font-size: 14px !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer>div:last-child,
html body .product-cards-container>.card[aria-label="Product"]>div:nth-child(2)>div:nth-child(1)>div {
margin-left: 0 !important;
margin-right: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer,
html body .product-cards-container>.card[aria-label="Product"]>div:nth-child(2)>div:nth-child(1),
html body .product-cards-container>.card[aria-label="Product"]>div:nth-child(2)>div:nth-child(1)>div>div,
html body .wishlistItemCards .card>div:nth-child(2)>div:nth-child(1) {
padding-left: 0 !important;
padding-right: 0 !important;
height: max-content !important;
}
html body .product-cards-container>.card[aria-label="Product"] .line-item-name,
html body .wishlistItemCards .card .line-item-name,
html body div[data-testid^="sf-cart-item"] [data-component="ItemName"] {
margin-bottom: 8px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
font-weight: 700 !important;
font-size: 14px !important;
color: #000 !important;
width: 100% !important;
padding-right: 5px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .item-attributes>p .attr-name,
html body .wishlistItemCards .card .line-item-attributes .attr-name {
color: #9A9A9A !important;
font-size: 12px !important;
font-weight: 700 !important;
text-transform: capitalize !important;
margin-right: 3px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .item-attributes>p+p,
html body .wishlistItemCards .card .line-item-attributes+p,
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]>p+p {
margin-top: 8px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .item-attributes>p,
html body .wishlistItemCards .card .line-item-attributes,
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]>p {
margin-bottom: 0px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .item-attributes>p {
white-space: nowrap !important;
max-width: 150px !important;
overflow: hidden;
text-overflow: ellipsis !important;
}
html body .product-cards-container>.card[aria-label="Product"] .item-attributes>p .attr-value,
html body .wishlistItemCards .card .line-item-attributes .attr-value {
font-weight: 700 !important;
font-size: 12px !important;
color: #222 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .bottom-section,
html body .wishlistItemCards .card .bottom-section {
border-top: 0 !important;
margin-top: 0 !important;
margin-left: auto !important;
}
html body .product-cards-container>.card[aria-label="Product"] .bottom-section>div:nth-child(1)>div {
padding-top: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .bottom-section>div:nth-child(1)>div+div {
padding-top: 5px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .bottom-section>div:nth-child(1)>div:last-child {
padding-left: 0 !important;
flex-direction: column !important;
}
html body .product-cards-container>.card[aria-label="Product"] .product-edit {
order: -1 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .remove-line-item {
display: none !important;
}
html body .product-cards-container>.card[aria-label="Product"] .add-to-wish-list,
html body .product-cards-container>.card[aria-label="Product"] .product-edit a,
html body .wishlistItemCards .card .bottom-section .add-to-cart-wishList button {
color: #222 !important;
font-size: 12px !important;
font-weight: 700 !important;
padding-left: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .add-to-wish-list svg use,
html body .product-cards-container>.card[aria-label="Product"] .product-edit a svg use,
html body .wishlistItemCards .card .bottom-section .add-to-cart-wishList button svg use {
fill: #222 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .img-hold,
html body .wishlistItemCards .card .img-hold {
flex-basis: 50% !important;
max-width: unset !important;
padding: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .img-hold a,
html body .wishlistItemCards .card .img-hold a {
max-height: unset !important;
max-width: unset !important;
height: 100% !important;
width: 100% !important;
}
html body .wishlistItemCards .card .img-hold a {
min-height: 14rem !important;
}
html body .product-cards-container>.card[aria-label="Product"] .img-hold a img,
html body .wishlistItemCards .card .img-hold a img {
max-height: unset !important;
height: 100% !important;
}
html body .product-cards-container>.card[aria-label="Product"],
html body .wishlistItemCards .card,
html body div[data-testid^="sf-cart-item"] {
padding: 16px 0 !important;
border-top: 1px solid #ECEDED !important;
border-bottom: 1px solid #ECEDED !important;
margin-bottom: 0 !important;
box-shadow: none !important;
justify-content: space-between !important;
border-radius: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold,
html body .wishlistItemCards .card>.content-hold {
flex-basis: 49% !important;
padding-left: 12px !important;
align-items: flex-start !important;
height: max-content !important;
padding-right: 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
.eg-custom-select-added+div .line-item-price-info {
margin-bottom: 0 !important;
}
.eg-custom-select-added {
margin-right: 10px !important;
}
.eg-custom-select-added+div * {
color: #9A9A9A !important;
font-weight: 700 !important;
font-size: 12px !important;
}
.eg-cut-card {
width: 24px !important;
height: 24px !important;
border: none !important;
outline: none;
border-radius: 100vmax !important;
background: #F7F7F7 !important;
display: flex;
justify-content: center;
align-items: center;
padding: 0 !important;
min-width: 24px !important;
max-width: 24px !important;
margin-right: 4px !important;
}
.eg-cut-card svg {
width: 8px !important;
height: 8px !important;
display: block !important;
}
html body .wishlistItemCards .card>div:nth-child(2) {
padding-left: 12px !important;
}
html body .wishlistItemCards .card .line-item-name {
padding-left: 0 !important;
}
html body .wishlistItemCards .card .product-card-footer {
padding-left: 0 !important;
padding-right: 0 !important;
}
html body .wishlistItemCards .card>div:nth-child(2)>div>div>div {
padding-left: 0 !important;
padding-right: 0 !important;
}
html body .wishlistItemCards .card .row {
margin-left: 0 !important;
margin-right: 0 !important;
}
html body .wishlistItemCards .card .bottom-section>div>div {
padding-top: 8px !important;
display: flex;
flex-direction: column !important;
align-items: flex-start !important;
}
html body .wishlistItemCards .card .bottom-section .remove-line-item {
display: none !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemImage"] {
width: 100% !important;
margin-right: 0 !important;
height: 100% !important;
background: transparent !important;
}
html body div[data-testid^="sf-cart-item"]>div>div>a {
flex-basis: 50% !important;
outline: none !important;
height: 13rem !important;
margin-right: 8px !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemImage"]>div,
html body div[data-testid^="sf-cart-item"] [data-component="ItemImage"] img {
height: 100% !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemImage"] img {
width: 100% !important;
max-width: unset !important;
object-fit: cover !important;
}
html body div[data-testid^="sf-cart-item"]>div>div>div {
align-self: stretch !important;
width: 50% !important;
flex-basis: 50% !important;
flex-direction: column !important;
height: max-content !important;
}
html body div[data-testid^="sf-cart-item"]>div>div>div>div {
padding-right: 0 !important;
flex-wrap: wrap !important;
flex-direction: row !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemName"] {
width: 80% !important;
margin-bottom: 8px !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]>p {
text-transform: capitalize !important;
width: max-content !important;
color: #9a9a9a !important;
font-weight: 700 !important;
font-size: 12px !important;
display: flex;
align-items: center;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]>p span {
color: #222 !important;
font-weight: 700 !important;
max-width: 114px !important;
width: 100% !important;
display: inline-block !important;
white-space: nowrap !important;
margin-left: 5px !important;
text-overflow: ellipsis !important;
overflow: hidden !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]+div {
display: flex;
flex-direction: column;
width: 100% !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]+div>div:last-child {
order: -1 !important;
margin-top: 5px !important;
align-items: center;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]+div>div:first-child {
display: block;
padding-top: 13px !important;
padding-bottom: 0 !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]+div>div:first-child p {
font-size: 14px !important;
font-weight: 700 !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"]+div>div:last-child>*:not(.eg-number-input):not([data-component="PricePerItem"]) {
display: none !important;
}
html body div[data-testid^="sf-cart-item"] [data-component="PricePerItem"] {
margin-left: 8px !important;
font-size: 11px !important;
color: #9a9a9a !important;
font-weight: 700 !important;
}
html body div[data-testid^="sf-cart-item"] .eg-cut-card {
position: absolute;
top: 14px;
right: 0;
margin-left: 20px !important;
margin-bottom: 20px !important;
cursor: pointer;
}
html body div[data-testid^="sf-cart-item"] [data-component="ItemAttributes"] {
margin-top: 0 !important;
}
html body .tfc-fitrec-product {
padding-bottom: 5px !important;
}
div[data-testid*="sf-cart-item"] [data-component="HideOnMobile"] {
display: none !important;
}
@media(min-width:768px) {
/* min 768 */
html body .product-cards-container>.card[aria-label="Product"]>div:nth-child(2)>div:nth-child(1),
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer {
width: 100% !important;
flex-basis: 100% !important;
max-width: 95% !important;
}
html body .product-cards-container>.card[aria-label="Product"] .row {
margin-left: 0 !important;
margin-right: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold>.product-card-footer .line-item-total-price>div {
display: flex !important;
flex-direction: row !important;
align-items: center;
}
html body .product-cards-container>.card[aria-label="Product"] .line-item-quantity {
padding-left: 0 !important;
}
html body .product-cards-container>.card[aria-label="Product"] .line-item-total-price,
html body .product-cards-container>.card[aria-label="Product"] .line-item-quantity {
max-width: max-content !important;
width: 100% !important;
flex-basis: unset !important;
}
html body .product-cards-container>.card[aria-label="Product"] .line-item-total-price .strike-through {
margin-left: 5px !important;
padding-top: 1px !important;
}
html body .product-cards-container>.card[aria-label="Product"] .bottom-section>div>div:last-child {
order: -1 !important;
}
/* saved for lettar */
html body .wishlistItemCards .card>div:nth-child(2)>div:nth-child(1) {
width: 96% !important;
max-width: 96% !important;
flex-basis: unset !important;
}
html body .wishlistItemCards .card .product-card-footer {
justify-content: flex-start !important;
display: flex !important;
align-items: flex-start !important;
}
html body .wishlistItemCards .card .bottom-section>div>div {
padding-top: 0 !important;
}
html body .wishlistItemCards .card .bottom-section>div>div .move-to-cart {
margin-left: 0 !important;
}
html body .wishlistItemCards .card>div:nth-child(2)>div:nth-child(1)>div>div>div[class*="line-item-price"] {
display: none !important;
}
html body .product-cards-container>.card[aria-label="Product"] .img-hold a img,
html body .wishlistItemCards .card .img-hold a img {
object-position: top !important;
}
html body .product-cards-container>.card[aria-label="Product"] .img-hold,
html body .wishlistItemCards .card .img-hold {
max-height: 15rem !important;
flex-basis: 40% !important;
}
html body .product-cards-container>.card[aria-label="Product"]>.content-hold,
html body .wishlistItemCards .card>.content-hold {
flex-basis: 60% !important;
padding-left: 0 !important;
}
html body .wishlistItemCards .card>div:nth-child(2) {
padding-left: 0 !important;
}
html body .wishlistItemCards .card .bottom-section {
margin-top: 6px !important;
}
}
Editor is loading...