I added an extension to have the discount code part of my onepage checkout process but when I activate the extension the "Continue" button on the Discount code step doesn't work. And it's giving me an error like it's trying to go to an insecure page. The config.xml file for the discount code does have the secure_url tag so why isn't this working. Can someone tell me exactly what files and where in them I should be looking for why this error is happening

enter image description here

  • What version of Magento? – brentwpeterson Jul 20 '17 at 22:08
  • I am using Magento – user56762 Jul 20 '17 at 22:47
  • you'll need to modify the discount code extension so that it uses https on the checkout page. – subroutines Jul 21 '17 at 2:37

enter image description here

I checked your store website. And Realized that you didn't install SSL(Secure Sockets Layer). At that I know, for checkout process, Magento forces https secure connection. However since your site doesn't have ssl. It got the error message on the console. Please install SSL to the server. After that, please enable SSL. For the detailed info, please note this link https://www.a2hosting.com/kb/installable-applications/optimization-and-configuration/magento1/enabling-ssl-for-magento

|improve this answer|||||
  • My configuration is set to use secure urls exactly as the article in that links says. So why wouldn't SSL be installed? – user56762 Jul 20 '17 at 22:55
  • Even after correct SSL setting, you should make sure to install SSL. What is your hosting company? – Mark Jul 20 '17 at 22:59
  • We actually just updated our security certificate. Rackspace is our host. – user56762 Jul 20 '17 at 23:01
  • support.rackspace.com/how-to/… Make sure you followed this step when you install SSL to the server. – Mark Jul 20 '17 at 23:03
  • We DO have our SSL certificate installed. – user56762 Jul 20 '17 at 23:07

The problem is that you are using http request on the https page. So you have to change the http://domain.com/checkoutdiscountcode/index/submit to https://domain.com/checkoutdiscountcode/index/submit

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'checkoutdiscountcode/index/submit'; ?>

you can use this code to get the right url

|improve this answer|||||
  • Double check wherever in your extension is sending any server request, it should be served over HTTPS i.e. using secure base URL
  • I am sure there must be an AJAX call that is calling with unsecure URL
  • In your provided screenshot, your extension is trying to call external server and using http instead of https.
  • Magento checkout require all server requests to be served over secure HTTPS URL only
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy