Created
January 27, 2015 16:26
-
-
Save riq363/df77f1ed21b3cfb2a64d to your computer and use it in GitHub Desktop.
Clear address fields on Billing address step and unselect checkbox 'My billing address is the same as the shipping address'
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script>if (typeof(Ecwid) == 'object') { | |
Ecwid.OnPageLoaded.add(function(page) { | |
if ('CHECKOUT_PAYMENT_DETAILS' == page.type) { | |
$('input[type=checkbox]').prop('checked', false); | |
$("input[type=text]").prop('disabled', false); | |
$("input[type=tel]").prop('disabled', false); | |
$("select[name='country-list']").prop("disabled", false); | |
$("select[name='state-list']").prop("disabled", false); | |
$("select[name='state-suggest']").prop("disabled", false); | |
$('input[type=text]').val(''); | |
$('input[type=tel]').val(''); | |
$("select[name='country-list']").val(''); | |
$("select[name='state-list']").val(''); | |
$("select[name='state-suggest']").val(''); | |
} | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment