Subversion Repositories SmartDukaan

Rev

Rev 20865 | Rev 20887 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20865 Rev 20884
Line 700... Line 700...
700
        'type': 'hidden'
700
        'type': 'hidden'
701
    }));
701
    }));
702
    newForm.submit();
702
    newForm.submit();
703
}
703
}
704
 
704
 
705
function confirmWalletCheckout(addressid){
705
/*function confirmWalletCheckout(addressid){
706
	if (typeof addressid=="undefined"){
706
	if (typeof addressid=="undefined"){
707
		addressid=$("input.css-checkbox:checked").val();
707
		addressid=$("input.css-checkbox:checked").val();
708
	}
708
	}
709
	if (addressid==undefined || typeof addressid=="undefined"){
709
	if (addressid==undefined || typeof addressid=="undefined"){
710
		$('#loadingModal').modal('hide');
710
		$('#loadingModal').modal('hide');
Line 734... Line 734...
734
        'name': 'cart_details',
734
        'name': 'cart_details',
735
        'value': localStorage.getItem('cart_details'),
735
        'value': localStorage.getItem('cart_details'),
736
        'type': 'hidden'
736
        'type': 'hidden'
737
    }));
737
    }));
738
    newForm.submit();
738
    newForm.submit();
739
}
739
}*/
740
 
740
 
741
function handleConfirmOrder(checkoutType, addressId){
741
function handleConfirmOrder(checkoutType, addressId){
742
	if (typeof addressId=="undefined"){
742
	if (typeof addressId=="undefined"){
743
		addressId=$("input.css-checkbox:checked").val();
743
		addressId=$("input.css-checkbox:checked").val();
744
	}
744
	}
Line 792... Line 792...
792
	        'method':'post'
792
	        'method':'post'
793
	    }).append($('<input>', {
793
	    }).append($('<input>', {
794
	        'name': 'addressid',
794
	        'name': 'addressid',
795
	        'value': $('p#confirmOrderText').attr('addressId'),
795
	        'value': $('p#confirmOrderText').attr('addressId'),
796
	        'type': 'hidden'
796
	        'type': 'hidden'
797
	    })).append($('<input>', {
-
 
798
	        'name': 'walletUsed',
-
 
799
	        'value': walletUsed,
-
 
800
	        'type': 'hidden'
-
 
801
	    }));
797
	    }));
802
		newForm.submit();
798
		newForm.submit();
803
	}else{
799
	}else{
804
		var url = apihost + 'checkout/?user_id='+me+'&cod=0';
800
		var url = apihost + 'checkout/?user_id='+me+'&cod=0';
805
	    var newForm = $('<form>', {
801
	    var newForm = $('<form>', {
Line 808... Line 804...
808
	    }).append($('<input>', {
804
	    }).append($('<input>', {
809
	        'name': 'addressid',
805
	        'name': 'addressid',
810
	        'value': $('p#confirmOrderText').attr('addressId'),
806
	        'value': $('p#confirmOrderText').attr('addressId'),
811
	        'type': 'hidden'
807
	        'type': 'hidden'
812
	    })).append($('<input>', {
808
	    })).append($('<input>', {
813
	        'name': 'paymethod',
809
	        'name': 'walletUsed',
814
	        'value': 'cap_float',
810
	        'value': totalPayable,
815
	        'type': 'hidden'
811
	        'type': 'hidden'
816
	    })).append($('<input>', {
812
	    })).append($('<input>', {
817
	        'name': 'cart_details',
813
	        'name': 'cart_details',
818
	        'value': localStorage.getItem('cart_details'),
814
	        'value': localStorage.getItem('cart_details'),
819
	        'type': 'hidden'
815
	        'type': 'hidden'