Heirloom

Updating…
  • No products in the basket.
"); e.preventDefault(); $("body").append(appendthis); $(".modal-overlay").fadeTo(500, 0.7); $('#popup-stock').fadeIn($(this).data()); } return false; }); $("#ninja-out-of-stock-cancel").click(function(e){ var id = $(this).data("id"); var email = $(this).data("email"); var data = { 'action': 'ninja_stock_cancel', 'id': id, 'email': email }; jQuery.post("https://uk.moonpicnic.com/wp-admin/admin-ajax.php", data, function(response) { $("#ninja-out-of-stock-cancel").addClass("ninja-hide").removeClass("ninja-show"); $("#ninja-out-of-stock").addClass("ninja-show").removeClass("ninja-hide"); $("#ninja-ss").removeClass("ninja-show").addClass("ninja-hide"); $("#ninja-out-of-stock-cancel").data("email",""); console.log(response); }); return false; }) $("#stock-submit").click(function(){ var id = jQuery(".single_variation_wrap .variation_id").val(); if(typeof id == 'undefined'){ var id = $("#ninja-out-of-stock").data("id"); } var first_name = $("#stock-first-name").val(); var last_name = $("#stock-last-name").val(); var email = $("#stock-email").val(); if ( first_name == "" ){ $("#stock-first-name").addClass("ninja-error"); return false; } if ( last_name == "" ){ $("#stock-last-name").addClass("ninja-error"); return false; } if ( email == "" || !validateEmail(email) ){ $("#stock-email").addClass("ninja-error"); return false; } $(".modal-box, .modal-overlay").fadeOut(500, function() { $(".modal-overlay").remove(); }); var data = { 'action': 'ninja_stock', 'id': id, 'first_name': first_name, 'last_name': last_name, 'email': email }; jQuery.post("https://uk.moonpicnic.com/wp-admin/admin-ajax.php", data, function(response) { $("#ninja-out-of-stock").addClass("ninja-hide").removeClass("ninja-show"); $("#ninja-out-of-stock-cancel").addClass("ninja-show").removeClass("ninja-hide"); $("#ninja-ss").addClass("ninja-show").removeClass("ninja-hide"); $("#ninja-out-of-stock-cancel").data("email",response); console.log(response); }); return false; }) $(".js-modal-close, .modal-overlay").click(function() { $(".modal-box, .modal-overlay").fadeOut(500, function() { $(".modal-overlay").remove(); }); }); $(window).resize(function() { $(".modal-box").css({ top: ($(window).height() - $(".modal-box").outerHeight()) / 2, left: ($(window).width() - $(".modal-box").outerWidth()) / 2 }); }); $(window).resize(); function validateEmail(email){ var re = /\S+@\S+\.\S+/; return re.test(email); } })

WELCOME TO MOON PICNIC

Please pick

US SHOP

for the US & World

UK SHOP

for the UK & Europe