Created
August 19, 2015 07:36
-
-
Save incrize/83ede7b0316bffcbcf11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/design/themes/basic/templates/views/checkout/components/payments/payment_methods.tpl b/design/themes/basic/templates/views/checkout/components/payments/payment_methods.tpl | |
index 578aef4..7df29fa 100644 | |
--- a/design/themes/basic/templates/views/checkout/components/payments/payment_methods.tpl | |
+++ b/design/themes/basic/templates/views/checkout/components/payments/payment_methods.tpl | |
@@ -12,12 +12,21 @@ | |
<script type="text/javascript"> | |
(function(_, $) { | |
$(_.doc).on('click', '.cm-select-payment', function() { | |
- var self = $(this); | |
+ var self = $(this), | |
+ form = self.parents('form'); | |
- $.ceAjax('request', fn_url('{$url}&payment_id=' + self.val()), { | |
+ form.on('submit.select_payment', function() { | |
+ return false; | |
+ }); | |
+ | |
+ var jqxhr = $.ceAjax('request', fn_url('{$url}&payment_id=' + self.val()), { | |
result_ids: '{$result_ids}', | |
full_render: true | |
}); | |
+ | |
+ jqxhr.always(function() { | |
+ form.off('submit.select_payment'); | |
+ }); | |
}); | |
}(Tygh, Tygh.$)); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment