Ajax Cart Does NOT work with Full Page HTTPS (SSL)

by Icon   Last Updated March 14, 2019 17:09 PM

I turned on Full Page https, so all pages load only in HTTPS. Now I realized that AJAX cart throws error window when I try to add somethign to the cart.

Any ideas where to look for the cause? I can post scrips if necessary.



Answers 1


First you have to check the ajax URL in firebug console.

Probably issue is because ajax request is goint to "http"

If same issue found do below steps:

  1. Find out the ajax call location

  2. Put the ajax URL in condition to check current URL as below:

    if (document.location.protocol == "https:") {
    /***Your https ajax request*****/
        }else{
    /***Your http ajax request*****/        
    }
    
Akhil Gupta
Akhil Gupta
September 15, 2016 09:31 AM

Related Questions





API url is being GET as document and not XHR

Updated July 03, 2015 13:04 PM

Ajax calling of php in magento

Updated July 26, 2015 13:04 PM