| Line 450... |
Line 450... |
| 450 |
}, 2000);
|
450 |
}, 2000);
|
| 451 |
}
|
451 |
}
|
| 452 |
|
452 |
|
| 453 |
// alert(msg);
|
453 |
// alert(msg);
|
| 454 |
});
|
454 |
});
|
| - |
|
455 |
var creditTicketSize = parseInt(localStorage.getItem('creditTicketSize'));
|
| - |
|
456 |
var creditLimit = parseInt(localStorage.getItem('creditLimit'));
|
| - |
|
457 |
var cart_details = localStorage.getItem('cart_details');
|
| - |
|
458 |
var totalPayable = parseInt(localStorage.getItem('totalPayable'));
|
| - |
|
459 |
|
| 455 |
var creditAvailable = $("input.css-checkbox:checked").attr('credit_available');
|
460 |
var creditAvailable = $("input.css-checkbox:checked").attr('credit_available');
|
| 456 |
if(creditAvailable=='true'){
|
461 |
if(creditAvailable=='true'){
|
| 457 |
$('button.confirmcredit').prop( "disabled", true );
|
462 |
$('button.confirmcredit').prop( "disabled", true );
|
| 458 |
$('button.confirmcredit').attr('style', 'background-color: #B4CAB4;');
|
463 |
$('button.confirmcredit').attr('style', 'background-color: #B4CAB4;');
|
| - |
|
464 |
var errorSpanText = $('span#CreditError').text();
|
| - |
|
465 |
localStorage.setItem('CreditError',errorSpanText);
|
| - |
|
466 |
$('span#CreditError').text('');
|
| 459 |
}else{
|
467 |
}else{
|
| - |
|
468 |
var errorSpanText = localStorage.getItem('CreditError');
|
| - |
|
469 |
if(cart_details == undefined || creditTicketSize>totalPayable || totalPayable>=creditLimit){
|
| - |
|
470 |
$('button.confirmcredit').prop( "disabled", true );
|
| - |
|
471 |
$('button.confirmcredit').attr('style', 'background-color: #B4CAB4;');
|
| - |
|
472 |
$('span#CreditError').text(errorSpanText);
|
| - |
|
473 |
localStorage.removeItem('CreditError');
|
| - |
|
474 |
}else{
|
| 460 |
$('button.confirmcredit').prop( "disabled", false );
|
475 |
$('button.confirmcredit').prop( "disabled", false );
|
| 461 |
$('button.confirmcredit').attr('style', 'background-color: #5cb85c;color: #fff');
|
476 |
$('button.confirmcredit').attr('style', 'background-color: #5cb85c;color: #fff');
|
| - |
|
477 |
localStorage.removeItem('CreditError');
|
| - |
|
478 |
}
|
| 462 |
}
|
479 |
}
|
| 463 |
});
|
480 |
});
|
| 464 |
|
481 |
|
| 465 |
$(document).on('click','#showmore',function(){
|
482 |
$(document).on('click','#showmore',function(){
|
| 466 |
$("#showmoreaddressdropdown").toggle();
|
483 |
$("#showmoreaddressdropdown").toggle();
|
| Line 598... |
Line 615... |
| 598 |
}
|
615 |
}
|
| 599 |
});
|
616 |
});
|
| 600 |
return false;
|
617 |
return false;
|
| 601 |
}
|
618 |
}
|
| 602 |
}else{
|
619 |
}else{
|
| - |
|
620 |
$('input.submit_check').prop( "disabled", true );
|
| - |
|
621 |
$('#loadingModal').modal('show');
|
| 603 |
var formData = {
|
622 |
var formData = {
|
| 604 |
'name' : $('#name').val(),
|
623 |
'name' : $('#name').val(),
|
| 605 |
'line1' : $('#line1').val(),
|
624 |
'line1' : $('#line1').val(),
|
| 606 |
'city' : $('#city').val(),
|
625 |
'city' : $('#city').val(),
|
| 607 |
'phone' : $('#phone').val(),
|
626 |
'phone' : $('#phone').val(),
|
| Line 758... |
Line 777... |
| 758 |
return;
|
777 |
return;
|
| 759 |
}
|
778 |
}
|
| 760 |
$('button.confirmcredit').prop( "disabled", false );
|
779 |
$('button.confirmcredit').prop( "disabled", false );
|
| 761 |
$('button.confirmcod').prop( "disabled", false );
|
780 |
$('button.confirmcod').prop( "disabled", false );
|
| 762 |
window.history.pushState('forward', null, './');
|
781 |
window.history.pushState('forward', null, './');
|
| - |
|
782 |
if(checkoutType=='codoption'){
|
| 763 |
$('p#confirmOrderText').html("<span>To Place Order click on Order Now Button.<br> To Change Payment Option click Change Option Button. "
|
783 |
$('p#confirmOrderText').html("<span>Confirm Order with <span style='color:#ff0000;'>COD</span>."
|
| 764 |
+"</span><hr style='margin-top: 5px;margin-bottom: 5px;'>"
|
784 |
+"</span><hr style='margin-top: 5px;margin-bottom: 5px;'>"
|
| 765 |
+"<span>अभी खरीदने के लिए Order Now बटन पर क्लिक करें।<br>"
|
785 |
+"<span><span style='color:#ff0000'>सीओडी (COD)</span> के साथ आर्डर कन्फर्म करें। </span>");
|
| - |
|
786 |
}else{
|
| - |
|
787 |
$('p#confirmOrderText').html("<span>Confirm Order with <span style='color:#ff0000;'>CREDIT</span>."
|
| - |
|
788 |
+"</span><hr style='margin-top: 5px;margin-bottom: 5px;'>"
|
| 766 |
+" भुगतान विकल्प बदलने के लिए Change Option बटन पर क्लिक करें। </span>");
|
789 |
+"<span><span style='color:#ff0000'>क्रेडिट (CREDIT)</span> के साथ आर्डर कन्फर्म करें। </span>");
|
| - |
|
790 |
}
|
| - |
|
791 |
}
|
| 767 |
$('p#confirmOrderText').attr('addressId',addressId);
|
792 |
$('p#confirmOrderText').attr('addressId',addressId);
|
| 768 |
$('p#confirmOrderText').attr('checkoutType',checkoutType);
|
793 |
$('p#confirmOrderText').attr('checkoutType',checkoutType);
|
| 769 |
$('#myModal').modal('show');
|
794 |
$('#myModal').modal('show');
|
| 770 |
$('#loadingModal').modal('hide');
|
795 |
$('#loadingModal').modal('hide');
|
| 771 |
}
|
796 |
}
|