News:

Looking for documentation? Take a look on our wiki

Main Menu

page reloading when choosing the payment method in checkout process

Started by kiasati, October 10, 2016, 08:01:31 AM

Previous topic - Next topic

kiasati

I'm working on a checkout process on a site. i wrote a piece of code to make multi step process and handle the steps, using java script. user can go to the next and previous step using the button at the bottom of the page. i wrote a function to stay on the same step on reloading the page too.

it works fine, but there is two radio buttons on one of steps that user can choose the payment method using them. when user chooses one of them, page reloads and first step pops up. i don't know why the function i wrote for reloading doesn't work here. but it works fine on refreshing the page. :/ this is the code:

jQuery(document).ready(function() {
    if (sessionStorage.checkoutstepHolder > 0) {
        cartButtonHandler("onLoad");
    }
});


what is wrong with it? i think there is an event listener somewhere that is listening to the radio buttons that causes the reloading. but i don't know how to find it, cuz i don't know java script.

the question is, why the function gets called on reloads caused by refreshing, but not on reloads caused by choosing the radio buttons?

any help would be appreciated...