Jump to content

Impossible to add the product to the cart.


Recommended Posts

Hello Everyone,

 

We are facing an error on our website after we upgraded it to the latest version of Prestashop i.e. 1.5.4.1. Actually, we have recently upgraded from the old version of Prestashop and put our site on live server. Later on we installed SSL certificate on our server for our main domain. Now, whenever we enable the SSL from back office of Prestashop; it works fine and add "https" to the certain URLs e.g. cart page, my account page etc. But, after enabling the SSL we are not able to add products to the cart. Whenever customer clicks "Add to Cart" button it shows an error saying "Impossible to add the product to the cart". A screenshot showing error message is attached.

 

I have seen similar issue faced by several other users and have also seen that max of them mentioned that latest module of "PayPal" is causing this error. But, I have even downgraded the PayPal module from its latest version but still the error is there and as a result we are not able enable SSL on our site.

 

Please provide your thoughts on this issue. Expecting some help soon :-)

 

Thanks in advance!!

post-262135-0-23955100-1377696998_thumb.png

Link to comment
Share on other sites

Hello Everyone,

 

Well, the issue is sorted out finally.

 

Actually I need to modifying/commenting the first part of the check SSL or Secure Mode condition in Frontcontroller.php file:

 

File: ROOT/classes/controller/Frontcontroller.php

Line #s: 117-133

 

/*
 if ($this->ssl && !Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED'))
 {
  header('HTTP/1.1 301 Moved Permanently');
  header('Cache-Control: no-cache');
  header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']);
  exit();
 }
 else
 */
 if (Configuration::get('PS_SSL_ENABLED') && Tools::usingSecureMode() && !($this->ssl))
 {
  header('HTTP/1.1 301 Moved Permanently');
  header('Cache-Control: no-cache');
  header('Location: '.Tools::getShopDomain(true).$_SERVER['REQUEST_URI']);
  exit();
 }

 

I found the idea from the following similar post : http://www.prestashop.com/forums/topic/155662-critical-ssl-bug-in-ps-147-fix-inside/page__pid__1356851__st__60?do=findComment&comment=1356851

 

Thanks everyone for their interest and suggestions!! I consider this post as "solved".

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...