{"fragments":{"div.widget_shopping_cart_content":"<div class=\"widget_shopping_cart_content\">\n\n  <!-- EMPTY CARY -->\n  <div class=\"empty-cart-wrapper\">\n\n    \n    <!--<img src=\"https:\/\/redeyemonkey.com\/wp-content\/uploads\/2024\/08\/Shopping-Bag.png\">-->\n    <img src=\"https:\/\/redeyemonkey.com\/wp-content\/uploads\/2025\/09\/red_eye_monkey_shoppong_card_info-1.jpg\">\n\t<p class=\"empty-cart-heading\">YOUR CART IS EMPTY<\/p>\n    <p>There are no products in your bag<\/p>\n    <a class=\"start-shopping\" href=\"https:\/\/redeyemonkey.com\/shop\/\">\n      Start shopping\n    <\/a>\n  <\/div>\n\n\n\n<!-- weight variation -->\n<script type=\"text\/javascript\">\n  jQuery(document).ready(function($) {\n\n    \/\/ Function to trigger when the mini-cart is opened or updated\n    function cartOpened() {\n      \/\/ Find the .special-offer-section\n      var specialOfferSection = $('.special-offer-section');\n\n      \/\/ If .special-offer-section doesn't exist, stop execution\n      if (specialOfferSection.length === 0) {\n        console.log(\"No special-offer-section found.\");\n        return;\n      }\n\n      \/\/ Look for .upsell-weight-custom-variation inside the .special-offer-section\n      var upsellVariation = specialOfferSection.find('.upsell-weight-custom-variation');\n\n      \/\/ If no .upsell-weight-custom-variation exists, stop execution\n      if (upsellVariation.length === 0) {\n        console.log(\"No upsell-weight-custom-variation found.\");\n        return;\n      }\n\n      \/\/ Find the first .upsell-weight-custom-variation-box inside the upsell variation section\n      var firstVariationBox = upsellVariation.find('.upsell-weight-custom-variation-box').first();\n\n      \/\/ If a .upsell-weight-custom-variation-box exists, trigger a click\n      if (firstVariationBox.length > 0) {\n        console.log(\"Triggering click on the first variation box.\");\n        firstVariationBox.trigger('click');\n      } else {\n        console.log(\"No variation box found to trigger click.\");\n      }\n    }\n\n    \/\/ Listen for when WooCommerce updates the mini-cart (triggered when the cart is opened or updated)\n    $(document.body).on('wc_fragments_loaded wc_fragments_refreshed added_to_cart', function() {\n      setTimeout(function() {\n        cartOpened(); \/\/ Ensure it runs after the content is updated\n      }, 500); \/\/ Delay to ensure content is fully loaded\n    });\n\n  });\n\n\n  jQuery(document).ready(function($) {\n    \/\/ Handle click on weight custom variation boxes\n    $('.upsell-weight-custom-variation-box').on('click', function() {\n      handleUpsellVariationClick($(this));\n    });\n\n    function handleUpsellVariationClick($this) {\n\n      \/\/get data\n      var attributeName = $this.data('attribute_name');\n      var attributeValue = $this.data('value');\n      var variation_id = $this.data('variation_id');\n      var product_id = $this.data('product_id');\n      var regular_price = $this.data('regular_price');\n      var sale_price = $this.data('sale_price');\n      var save_amount = $this.data('save_amount');\n\n      console.log(\"REGULAR PRICE\");\n      if(regular_price == sale_price){\n        console.log(regular_price);\n        console.log(sale_price);\n      }\n\n\n      $('#upsell-regular-price-' + product_id).text(regular_price.toFixed(2) + '\u20ac');\n      $('#upsell-sale-price-' + product_id).text(sale_price.toFixed(2) + '\u20ac');\n      $('#upsell-save-amount-' + product_id).text('-'+save_amount.toFixed(1) + '\u20ac');\n\n      \/\/find cta button\n      var ctaButton = $('#upsell-add-to-cart-' + product_id);\n      ctaButton.attr('data-product_id', variation_id);\n\n      \/\/set variation_id as the producT_id at cta. \n\n      \/\/ Highlight the selected box\n      $('.upsell-weight-custom-variation-box[data-attribute_name=\"' + attributeName + '\"]').removeClass('selected-variation');\n      $this.addClass('selected-variation');\n    }\n  });\n<\/script>\n\n\n<!-- Color variations -->\n<script type=\"text\/javascript\">\n  \/\/Handle First selection:\n  jQuery(document).ready(function($) {\n\n    \/\/ Function to trigger the first color variation click when the mini-cart is opened or updated\n    function colorVariationOpened() {\n      \/\/ Find the .special-offer-section\n      var specialOfferSection = $('.special-offer-section');\n\n      \/\/ If .special-offer-section doesn't exist, stop execution\n      if (specialOfferSection.length === 0) {\n        console.log(\"No special-offer-section found.\");\n        return;\n      }\n\n      \/\/ Look for .upsell-color-variation-box inside the .special-offer-section\n      var upsellColorVariation = specialOfferSection.find('.upsell-color-variation-box');\n\n      \/\/ If no .upsell-color-variation-box exists, stop execution\n      if (upsellColorVariation.length === 0) {\n        console.log(\"No upsell-color-variation-box found.\");\n        return;\n      }\n\n      \/\/ Find the first .upsell-color-variation-box inside the upsell variation section\n      var firstColorVariationBox = upsellColorVariation.first();\n\n      \/\/ If a .upsell-color-variation-box exists, trigger a click\n      if (firstColorVariationBox.length > 0) {\n        console.log(\"Triggering click on the first color variation box.\");\n        firstColorVariationBox.trigger('click');\n      } else {\n        console.log(\"No color variation box found to trigger click.\");\n      }\n    }\n\n    \/\/ Listen for when WooCommerce updates the mini-cart (triggered when the cart is opened or updated)\n    $(document.body).on('wc_fragments_loaded wc_fragments_refreshed added_to_cart', function() {\n      setTimeout(function() {\n        colorVariationOpened(); \/\/ Ensure it runs after the content is updated\n      }, 500); \/\/ Delay to ensure content is fully loaded\n    });\n\n  });\n\n\n  \/\/handle CLICK\n  jQuery(document).ready(function($) {\n\n    \/\/ Handle click on color custom variation boxes\n    $('.upsell-color-variation-box').on('click', function() {\n      handleUpsellColorVariationClick($(this));\n    });\n\n    function handleUpsellColorVariationClick($this) {\n\n      var attributeName = $this.data('attribute_name');\n\n      \/\/ Highlight the selected box\n      $('.upsell-color-variation-box[data-attribute_name=\"' + attributeName + '\"]').removeClass('selected-variation');\n      $this.addClass('selected-variation');\n\n      \/\/ Get data\n      var attributeValue = $this.data('value');\n      var variation_id = $this.data('variation_id');\n      var product_id = $this.data('product_id');\n      var regular_price = $this.data('regular_price');\n      var sale_price = $this.data('sale_price');\n      var save_amount = $this.data('save_amount');\n\n      \/\/ Update the add-to-cart button with the selected variation ID\n      var ctaButton = $('#upsell-add-to-cart-' + product_id);\n      ctaButton.attr('data-product_id', variation_id);\n\n      \/\/ Update the price display with the selected variation's prices\n      $('#upsell-regular-price-' + product_id).text(regular_price.toFixed(2) + '\u20ac');\n      $('#upsell-sale-price-' + product_id).text(sale_price.toFixed(2) + '\u20ac');\n      $('#upsell-save-amount-' + product_id).text('-'+save_amount.toFixed(1) + '\u20ac');\n\n      \/\/ Update the image of the upsell product to the selected variation's image\n      var newImageUrl = $this.data('image');\n      var upsellImage = $('#upsell-product-image-' + product_id + ' img');\n\n      \/\/ Update the image if the URL is available\n      if (newImageUrl) {\n        upsellImage.attr('src', newImageUrl);\n      }\n    }\n  });\n<\/script>\n\n\n\n<!-- CLICK THE FIRST VARIATION in UPSELL -->\n<script type=\"text\/javascript\">\n  jQuery(document).ready(function($) {\n\n    \/\/ Function to trigger when the mini-cart is opened or updated\n    function cartOpened() {\n      \/\/ Find the .special-offer-section\n      var specialOfferSection = $('.special-offer-section');\n\n      var bestSellerSection = $('.best-seller-section');\n\n      \/\/ Handle weight variations\n      var upsellWeightVariation = specialOfferSection.find('.upsell-weight-custom-variation');\n\n      \/\/find inside best offer.\n      if (upsellWeightVariation.length <= 0) {\n        upsellWeightVariation = bestSellerSection.find('.upsell-weight-custom-variation');\n      }\n\n      var firstWeightVariationBox = upsellWeightVariation.find('.upsell-weight-custom-variation-box').first();\n      firstWeightVariationBox.trigger('click');\n\n\n      \/\/ Handle color variations\n      var upsellColorVariation = specialOfferSection.find('.upsell-color-variation-box');\n\n      if (upsellColorVariation.length <= 0) {\n        upsellColorVariation = bestSellerSection.find('.upsell-color-variation-box');\n      }\n\n      var firstColorVariationBox = upsellColorVariation.first();\n      firstColorVariationBox.trigger('click');\n\n\n    }\n\n    \/\/ Listen for when WooCommerce updates the mini-cart (triggered when the cart is opened or updated)\n    $(document.body).on('wc_fragments_loaded wc_fragments_refreshed added_to_cart', function() {\n      setTimeout(function() {\n        cartOpened(); \/\/ Ensure it runs after the content is updated\n      }, 500); \/\/ Delay to ensure content is fully loaded\n    });\n\n  });\n<\/script>\n\n\n\n<!-- FREE SHIPPING CODE -->\n<script type=\"text\/javascript\">\n  jQuery(document).ready(function($) {\n    var freeShippingThreshold = 60;\n    var currentCartTotal = parseFloat('0'); \/\/ Get the current cart subtotal\n\n    updateFreeShippingProgress(currentCartTotal);\n\n    function updateFreeShippingProgress(cartTotal) {\n      var remainingAmount = freeShippingThreshold - cartTotal;\n      var progressBar = $('.free-shipping-bar');\n      var progressMessage = $('.free-shipping-message');\n      var progressPercentage = (cartTotal \/ freeShippingThreshold) * 100;\n\n      console.log(\"TEST\");\n      console.log(progressPercentage);\n\n      \/\/ Cap the percentage at 100%\n      if (progressPercentage > 100) {\n        progressPercentage = 100;\n      }\n\n      \n\n      \/\/ Update the width of the progress bar\n      progressBar.css('width', progressPercentage + '%');\n\n      \/\/ Update the progress message\n      if (remainingAmount > 0) {\n        progressMessage.text('You\\'re ' + remainingAmount.toFixed(2) + '\u20ac away from free shipping!');\n        progressMessage.removeClass('free-shipping-success'); \/\/ Remove the success class if threshold is not met\n      } else {\n        progressMessage.text('Congrats! You have earned free shipping!');\n        progressMessage.addClass('free-shipping-success'); \/\/ Add success class if threshold is met\n      }\n    }\n  });\n<\/script>\n\n\n<!-- Update the items in cart number -->\n<script type=\"text\/javascript\">\n  jQuery(document).ready(function($) {\n\n    \/\/ Function to update the cart title with the number of items\n    function updateCartTitle() {\n      \/\/ Fetch the current number of items in the cart using WooCommerce fragment data\n      var cartItemCount = $('.woocommerce-mini-cart-item').length;\n\n      var cartTitleElement = $('#offcanvas-cart .offcanvas-header .offcanvas-title');\n      \n      \/\/ Update the cart title\n      cartTitleElement.text('Cart (' + cartItemCount + ' item' + (cartItemCount !== 1 ? 's' : '') + ')');\n    }\n\n    \/\/ Trigger the update when the document is ready\n    updateCartTitle();\n\n    \/\/ Listen for WooCommerce updates (like adding items to the cart)\n    $(document.body).on('wc_fragments_loaded wc_fragments_refreshed added_to_cart', function() {\n      setTimeout(function() {\n        updateCartTitle(); \/\/ Update the cart title when the cart is updated\n      }, 500); \/\/ Delay to ensure content is fully loaded\n    });\n  });\n<\/script>\n\n\n\n\n\n<\/div>","span.cart-content":"      \n      <span class=\"cart-content position-absolute top-100 start-50 translate-middle\">\n              <\/span>","notices_html":""},"cart_hash":""}