Contact for Price

(function() {
if (window.__LarinaCFPWired) return;
window.__LarinaCFPWired = true;
var cfg = {“email”: “admin1@gmail.com”, “productName”: “sina”, “productUrl”: “”, “label”: “Contact for Price”};
function subject() {
return ‘Price inquiry: ‘ + (cfg.productName || ‘Rug’);
}
function body() {
var lines = [
‘Hi,’,
”,
‘Could you send me the price for this rug?’,
”,
(cfg.productName || ‘Rug’) +
(cfg.productUrl ? ” — ” + cfg.productUrl : “”),
”,
‘Thanks!’
];
return lines.join(‘n’);
}
function mailto() {
return ‘mailto:’ + encodeURIComponent(cfg.email) +
“?subject=” + encodeURIComponent(subject()) +
“&body=” + encodeURIComponent(body());
}
function makeBtn() {
var b = document.createElement(‘a’);
b.href = mailto();
b.textContent = cfg.label;
b.className = ‘button single_add_to_cart_button larina-cfp-btn’;
b.setAttribute(‘role’, ‘button’);
b.style.display = “inline-block”;
b.style.padding = “14px 28px”;
b.style.fontSize = “15px”;
b.style.fontWeight = “600”;
b.style.borderRadius = “6px”;
b.style.textDecoration = “none”;
b.style.cursor = “pointer”;
return b;
}
function replaceCart() {
var forms = document.querySelectorAll(‘form.cart’);
if (!forms.length) return false;
forms.forEach(function(f) {
if (f.getAttribute(‘data-larina-cfp-done’)) return;
f.setAttribute(‘data-larina-cfp-done’, ‘1’);
var wrap = document.createElement(“div”);
wrap.className = “larina-cfp-cart-slot”;
wrap.appendChild(makeBtn());
f.parentNode.replaceChild(wrap, f);
});
var prices = document.querySelectorAll(‘.summary .price, .product-info .price, .entry-summary .price’);
prices.forEach(function(p) {
var t = (p.textContent || “”).replace(/[^0-9.]/g, “”);
if (!t || parseFloat(t) === 0) p.style.display = “none”;
});
return true;
}
if (document.readyState === ‘loading’) {
document.addEventListener(‘DOMContentLoaded’, function() { replaceCart(); });
} else {
replaceCart();
}
var giveUpAt = Date.now() + 20000;
var mo = new MutationObserver(function() {
if (replaceCart() || Date.now() > giveUpAt) mo.disconnect();
});
mo.observe(document.body, {childList: true, subtree: true});
})();

colors

Navy, Aqua

material

wool

Shape

Persian

Reviews

There are no reviews yet.

Be the first to review “sina”

Your email address will not be published. Required fields are marked *

Category: