moving a step futher ( I think )
At the includes\modules\pages\checkout_payment\jscript_main.php
I've added this :
Code:
<?php if ($flagOnSubmit) { ?>
var flagOnSubmit = 1;
<?php } ?>
So I can remove that bit of code with jquery that I mentioned to my last .js file to compacted since I have a var flagOnSubmit
Code:
if ( document.body.id == 'checkoutpaymentBody' ) {
$('form[name="checkout_payment"]').submit(function() {
$('.paymentSubmit').attr('disabled', true);
if ( flagOnSubmit == 1 )
formPassed = check_form();
if (formPassed == false) {
//document.getElementsByClassName ('payment')
$('.paymentSubmit').attr('disabled', false);
}
return formPassed;
});
}
But, I' not sure if it's working as expect :
On checkout_payment page , ie: with 2 payment methods , if I select none , one pop up comes up , but then the page is reloaded , not sure if this is ok ... actually this site only has 1 payment method.
In terms on attr disable, etc... I see no changes....
Well, it's working, but I'm not sure if this is ok.
Tahnks
Bookmarks