1

i have a problem in using ajax post when enabled ssl. it's ok with http protocol when protocol is https it's switched to 302 error, I have fixed in three days but not ok, anyone know how to out to this solve please help me. thanks in advance

function ajaxToCart(url,data,mine) {

   var prefix = parent.location.protocol;

    url = url.replace('checkout/cart', 'ajaxcartsuper/ajaxcart');
    if (prefix == "http:") {
        // change to https
        url = url.replace("http://", "https://");
    }
    console.log(url);


        $jq.ajax({
            url: url,
            dataType: 'json',
            type : 'post',
            data : data,
            beforeSend: function(request){
                  showLoadingAnimation();

            },
            success: function(data){
     });
}
Bruno
  • 119,590
  • 31
  • 270
  • 376

1 Answers1

0

Could you please check the header and see what is returned in "Location". may be something is not correct with the URL

Sarvesh
  • 269
  • 1
  • 2
  • 10