Skip to content

Commit

Permalink
Activating card details form after load if stripe card is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Sosnowski committed Nov 15, 2024
1 parent 1abbd57 commit 04bc066
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Application/views/frontend/tpl/stripecreditcard.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@
}
});
}
//Activating card details form after load if stripe card is selected
document.addEventListener('DOMContentLoaded', function() {
$('#payment_stripecreditcard').is(':checked') && !$('#payment_stripecreditcard').parents('dt').next('dd').is(':visible') ?
$('#payment_stripecreditcard').trigger('click')
: false;
});
[{if false}]</script>[{/if}]
[{/capture}]
[{oxscript add=$smarty.capture.stripeComponentsLoad}]

0 comments on commit 04bc066

Please sign in to comment.