| Line 1... |
Line 1... |
| 1 |
|
1 |
|
| 2 |
function showPaymentModeSelectionBox(){
|
2 |
function showPaymentModeSelectionBox(){
|
| 3 |
var originalAddressId = $('form[name="frmProceedToPay"] :input[name="addressid"]').val();
|
3 |
var originalAddressId = $('form[name="frmProceedToPay"] :input[name="addressid"]').val();
|
| 4 |
$('form[name="paymentModeSelection"] :input[name="addressid"]').val(originalAddressId);
|
4 |
$('form[name="paymentModeSelection"] :input[name="addressid"]').val(originalAddressId);
|
| 5 |
|
5 |
|
| 6 |
$.fn.colorbox({inline:true, href:".colorSelLightBoxColor", open:true, onComplete:function(){
|
6 |
$.fn.colorbox({inline:true, href:".payModeLightBoxColor", open:true, width:"500px", onComplete:function(){
|
| 7 |
var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);
|
7 |
var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);
|
| 8 |
var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);
|
8 |
var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);
|
| 9 |
|
9 |
|
| 10 |
$('#colorbox').css('top', posTop);
|
10 |
$('#colorbox').css('top', posTop);
|
| 11 |
$('#colorbox').css('left', posLeft);
|
11 |
$('#colorbox').css('left', posLeft);
|
| 12 |
}});
|
12 |
}});
|
| 13 |
trackEventWithGA('Order', 'Proceed to Pay', "");
|
13 |
trackEventWithGA('Order', 'Proceed to Pay', "");
|
| 14 |
trackPageWithGA("/proceed-to-pay");
|
14 |
trackPageWithGA("/proceed-to-pay");
|
| 15 |
}
|
- |
|
| 16 |
|
15 |
}
|
| - |
|
16 |
|
| - |
|
17 |
function verifyPaymentModeSelectionForm(){
|
| - |
|
18 |
var selected = '';
|
| - |
|
19 |
var payment_option = 0;
|
| - |
|
20 |
var typeInputs = $("form[name='paymentModeSelection'] :input[name='type']");
|
| - |
|
21 |
for(var i=0; i<typeInputs.length; i++)
|
| - |
|
22 |
if(typeInputs[i].checked)
|
| - |
|
23 |
selected = typeInputs[i].value;
|
| - |
|
24 |
if(selected == ''){
|
| - |
|
25 |
dispError("Please select a payment method.");
|
| - |
|
26 |
return false;
|
| - |
|
27 |
}
|
| - |
|
28 |
payment_option = $("form[name='paymentModeSelection'] select[name='g"+ selected + "']").val();
|
| - |
|
29 |
if(payment_option > 0){
|
| - |
|
30 |
$("form[name='paymentModeSelection'] :input[name='payment_option']").val(payment_option);
|
| - |
|
31 |
return true;
|
| - |
|
32 |
}else
|
| - |
|
33 |
dispError("Please select a payment method.");
|
| - |
|
34 |
return false;
|
| - |
|
35 |
}
|
| - |
|
36 |
|
| - |
|
37 |
function dispError(error){
|
| - |
|
38 |
alert(error);
|
| - |
|
39 |
}
|
| - |
|
40 |
|