Question

When you first visit the onepage checkout in Magento, only the first section is shown. The HTML has been loaded for the other sections bt it is hidden. When you move onto another section, an ajax request is performed an the HTML in the section is actually replaced with the server response.

My question is, if we're going to load the section HTML from the backend, then why load the HTML in the first place?

Was it helpful?

Solution

Well...Not all the sections are reloaded. The billing and shipping address steps are not reloaded.
I'm not sure if this is the official reason, but I think that if you change the css and make all the steps visible all the time (some kind of a onestep checkout) you will see some data, that is updated as you go. If the steps were empty at the beginning then you would see some blank sections on the page.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top