Free Delivery for Orders Above £60.00

Fast & Secure Payments 

Free Delivery for Orders Above £60.00

Fast & Secure Payments 

Never miss an update

Add your email to receive our newsletters.

Subscription Form
My cart
🎁 Only £60.00 away from free shipping to GB 🇬🇧
Your cart is empty.

Looks like you haven't made a choice yet.

document.addEventListener("cartpops.afterOpen", function () { const btn = document.querySelector('.cpops-checkout-secondary.cpops-custom-btn'); if (!btn) return; // Default fallback URL let targetURL = "https://florianpoirot.com/#shop"; // Get all CartPops products const products = document.querySelectorAll('.cartpops-product'); if (!products.length) { btn.href = targetURL; return; } let foundHomeDelivery = false; let foundClickCollect = false; let processed = 0; products.forEach(productEl => { const productID = productEl.getAttribute('data-product_id'); if (!productID) return; fetch(`/wp-json/wc/store/products/${productID}`) .then(res => res.json()) .then(product => { if (product.categories && product.categories.length) { product.categories.forEach(cat => { const slug = cat.slug.toLowerCase(); if (slug.includes("home-delivery")) foundHomeDelivery = true; if (slug.includes("click-collect")) foundClickCollect = true; }); } }) .catch(err => console.error("CartPops category error:", err)) .finally(() => { processed++; // After checking all products, decide the URL if (processed === products.length) { if (foundHomeDelivery) { targetURL = "https://florianpoirot.com/home-delivery/"; } else if (foundClickCollect) { targetURL = "https://florianpoirot.com/click-and-collect/"; } btn.href = targetURL; } }); }); });