Php – Magento – onePage checkout and SSL (HTTPS)

httpsjsonmagentoPHPssl

Need a magento shark to help me out here:

I have a problem with the onepage checkout, I set it up to run https. (changed the link leading to the page to https://mydomain.com/checkout/onepage/

Worked fine, except magento still prints all of the links one the checkout as http and tries to load via ajax and http. This of cause fails since you cannot do a http/ajax request through a https connection. So I thought to myself lets try to hack it. I made a quick document.ready function and replaces all instances off http with https, actually worked like a charm until the Order review. Here when I click continue, it fails. With the expected "X-JSON call to unsafe bla bla bla" meaning it somewhere calls an unsafe url.

My question:
– Is there someway to tell magento to run the onepage checkout in https (already setup the https stuff in the backend.)
– if not (I'm no JSON ninja more of a jQuery dude myself) does anyone have any idea how to hack the magento json scripts into running https. I tracked the problem down to the call to "http://mydomain.com/checkout/onepage/saveOrder/" and this onclick function "review.save()"

any pointers help would be GREATLY appreciated 🙂

Best Answer

Magento has in built functionality to use https for my account pages , login page and checkout pages. you just need to set the secure base url in Admin->configuration->General->Web->Secure and provide path with https.

Thanks