Lingua
Valuta
0){ Swal.fire('Add Failed', "", "error"); return false; } else { Swal.fire('Added Successfully', "", "success"); return true; } }, error:function(res) { console.log(res.msg); }, }); }); $('.productView-wishlist a').on('click', function(){ var product_id = $(this).data('product-id'); var customer_id = ''; if(customer_id == ''){ $('.header__link--account').click(); return false; } $.ajax({ type: 'POST', url: '/index.php/index/wishlist/addproduct.html', data: { product_id: product_id, customer_id: customer_id }, traditional: true, success: function(res){ if(res.err > 0){ Swal.fire(res.msg, "", "error"); return false; } else { Swal.fire('Added Successfully', "", "success"); return true; } }, error:function(res) { console.log(res.msg); }, }); }); $('.spr-form-review .spr-icon').on('click',function() { var index = $(this).index()+1; $('.review-rating').val(index); $(this).removeClass('spr-icon-star-empty').prevAll('.spr-icon').removeClass('spr-icon-star-empty'); $(this).addClass('spr-icon-star').prevAll('.spr-icon').addClass('spr-icon-star'); $(this).nextAll('.spr-icon').removeClass('spr-icon-star'); $(this).nextAll('.spr-icon').addClass('spr-icon-star-empty'); })