9ja Academy
Added to Wishlist"); } }); } function set_currency(currency){ $.ajax({ type: "POST", url: "https://www.9jaacademy.com/index.php/bookshop/setCurrency", data: {"currency":currency}, cache: false, success: function (html){ window.location.reload(); } }); } function add_cart(elm,product_id){ $.ajax({ type: "POST", url: "https://www.9jaacademy.com/index.php/bookshop/add_cart", data: {"product_id":product_id}, cache: false, success: function (html){ var qty = $("#cart").text(); if(qty){ qty = parseInt(qty)+1; }else{ qty = 1; } $("#cart").text(qty); $(elm).parent().append("Added to Cart"); } }); }