VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: kiasati on October 10, 2016, 12:20:37 PM

Title: pop up message after changing the payment method in one page checkout
Post by: kiasati on October 10, 2016, 12:20:37 PM
Hi

i wanna execute the java script code shown below, after user chooses a payment method.

location.reload();

how can i do this?
Title: Re: pop up message after changing the payment method in one page checkout
Post by: GJC Web Design on October 10, 2016, 13:47:53 PM
add it in the choose template triggered by the submit
Title: Re: pop up message after changing the payment method in one page checkout
Post by: kiasati on October 10, 2016, 13:53:26 PM
Quote from: GJC Web Design on October 10, 2016, 13:47:53 PM
add it in the choose template triggered by the submit
i dont get it.. can u explain more?

the radio box have "data-dynamic-update=1" , so when choosing a payment method, some element change in html.
i want to reload the page after the data-dynamic-update is performed.
Title: Re: pop up message after changing the payment method in one page checkout
Post by: GJC Web Design on October 10, 2016, 13:56:26 PM
then u need to do it in the native js files I guess
Title: Re: pop up message after changing the payment method in one page checkout
Post by: kiasati on October 10, 2016, 14:05:28 PM
Quote from: GJC Web Design on October 10, 2016, 13:56:26 PM
then u need to do it in the native js files I guess
i did.. but i didn't find the right place to put "location.reload();"
Title: Re: pop up message after changing the payment method in one page checkout
Post by: kiasati on October 10, 2016, 14:19:33 PM
I've made a multi step checkout using js and session storage.
in every step, some element's are shown and some are not.
when a user choose a payment method, the first step pops up.
i want to put the reload code to reload the page and go back to the step that user was on...