master
parent
e16822912c
commit
3f981767f9
|
@ -57,6 +57,19 @@ $(window).on('load', function(){
|
|||
objProducts = [];
|
||||
localStorage.setItem("products", JSON.stringify(objProducts));
|
||||
});
|
||||
$(document).on('click', '.btn-remove-product', function(){
|
||||
if(objProducts.length > 0){
|
||||
$('#form-section').show();
|
||||
$('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').show();
|
||||
$('#total-checkout-price').parent().parent().parent().show();
|
||||
$('#no-products-in-checkout').hide();
|
||||
}else{
|
||||
$('#form-section').hide();
|
||||
$('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').hide();
|
||||
$('#total-checkout-price').parent().parent().parent().hide();
|
||||
$('#no-products-in-checkout').show();
|
||||
}
|
||||
});
|
||||
$(document).on('input', '.select-quantity', function(){
|
||||
getInfoFromSelectedProduct().done(function(response, status){
|
||||
totalPrice = 0;
|
||||
|
|
|
@ -31,12 +31,6 @@ $(window).on('load', function(){
|
|||
$('#total-price').parent().parent().parent().show();
|
||||
$('#no-products').hide();
|
||||
$('#modal-buttons').show();
|
||||
if(typeof updateProducts === "function"){
|
||||
$('#form-section').show();
|
||||
$('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').show();
|
||||
$('#total-checkout-price').parent().parent().parent().show();
|
||||
$('#no-products-in-checkout').hide();
|
||||
}
|
||||
}else{
|
||||
$('.cart-link').hide();
|
||||
$(".btn-share").hide();
|
||||
|
@ -45,12 +39,6 @@ $(window).on('load', function(){
|
|||
$('#total-price').parent().parent().parent().hide();
|
||||
$('#no-products').show();
|
||||
$('#modal-buttons').hide();
|
||||
if(typeof updateProducts === "function"){
|
||||
$('#form-section').hide();
|
||||
$('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').hide();
|
||||
$('#total-checkout-price').parent().parent().parent().hide();
|
||||
$('#no-products-in-checkout').show();
|
||||
}
|
||||
}
|
||||
|
||||
getInfoFromSelectedProduct().done(function(response, status){
|
||||
|
|
Loading…
Reference in New Issue