Free Delivery for Orders Above £60.00

Fast & Secure Payments 

Free Delivery for Orders Above £60.00

Fast & Secure Payments 

EXTRAVAGANZA TASTING

Thorialine 17 Cherry Farm Close, Malton

Indulge in the ultimate tasting experience with the Extravaganza Tasting, led by the renowned pastry chef, Florian Poirot, UK Pastry Champion, taking place at our kitchen in Malton Talbot Yard. Join us for […]

£35.00

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 URL let targetURL = "https://florianpoirot.com/#shop"; // Get all product rows in CartPops const items = document.querySelectorAll(".cpops-cart-line-items .bis_check_checked"); if (!items.length) { btn.href = targetURL; return; } let foundHomeDelivery = false; let foundClickCollect = false; let processed = 0; items.forEach(item => { // Find the hidden WC cart key input const cartKeyInput = item.querySelector("input[name='cart_item_key']"); if (!cartKeyInput) return; const cartItemKey = cartKeyInput.value; // Get cart data from WooCommerce endpoint fetch("/?wc-ajax=get_cart_contents") .then(res => res.json()) .then(cart => { const cartItem = cart.find(i => i.key === cartItemKey); if (!cartItem) return; const productID = cartItem.product_id; // Fetch product categories return fetch(`/wp-json/wc/v3/products/${productID}?per_page=1`, { headers: { "Accept": "application/json" } }).then(res => res.json()) .then(product => { if (!product.categories) return; product.categories.forEach(cat => { const slug = cat.slug.toLowerCase(); if (slug === "home-delivery") foundHomeDelivery = true; if (slug === "click-collect") foundClickCollect = true; }); }); }) .finally(() => { processed++; // After all products are processed if (processed === items.length) { if (foundHomeDelivery) { targetURL = "https://florianpoirot.com/home-delivery/"; } else if (foundClickCollect) { targetURL = "https://florianpoirot.com/click-and-collect/"; } btn.href = targetURL; } }); }); });