From 04bc066632c4d377aada9b46050a69d22e520278 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Fri, 15 Nov 2024 09:36:02 +0100 Subject: [PATCH] Activating card details form after load if stripe card is selected --- Application/views/frontend/tpl/stripecreditcard.tpl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Application/views/frontend/tpl/stripecreditcard.tpl b/Application/views/frontend/tpl/stripecreditcard.tpl index 79bd8aa..8547bff 100644 --- a/Application/views/frontend/tpl/stripecreditcard.tpl +++ b/Application/views/frontend/tpl/stripecreditcard.tpl @@ -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}][{/if}] [{/capture}] [{oxscript add=$smarty.capture.stripeComponentsLoad}]