BLOG

Based on cart total amount display specific message on cart drawer shopify

<!-- start Geo location --> <script> $.get("https://ipinfo.io", function(response) { console.log(response.city, response.country); if(response.country == "GB"){ $(document).on('click', 'form[data-product-form], .product__submit__add, .cart__quantity-plus, .cart__quantity-minus, .cart-item__remove', function (e) { setTimeout(function() { jQuery.getJSON('/cart.js', function(cart) { var totprs = (cart.total_price/100).toFixed(2); if (cart.total_price >= 13500){ // alert('There are now ' + totprs + ' items in the cart.'); // $(".custom_shipping_note").text(totprs); $('.custom_shipping_note').show(); } else{ $('.custom_shipping_note').hide(); } }); }, 1000); }); } }, "jsonp"); </script> <!-- end Geo location -->
Share:

Post a Comment!