prestashop使用SSL证书后无法添加删除商品与正常付款的解决方法

添加到购物车之后,出现了UNABLE TO SAVE UPDATE QUANTITY提示错误

There is a problem with adding/removing (using + or -) products from the basket. It gives the following error:
TECHNICAL ERROR: unable to save update quantity
Details:
Error thrown: [object XMLHttpRequest]
Text status: error

The solution: add in the CartController.php class
public $ssl = true;

The problem happens, because the Cart Controller doesn’t have this ssl=true and it redrect to http:// and it cause the error.

My current solution is to extend that controller and add this $ssl=true in it.

修改classes目录下的FrontController.php文件以下内容。

在public function init()下

self::$initialized=true;后添加

if(Tools::usingSecureMode())

$useSSL =$this->ssl = true;

把else if (Configuration::get(‘PS_SSL_ENABLED’) AND Tools::usingSecureMode() AND !($this->ssl) )

修改为

else if (Configuration::get(‘PS_SSL_ENABLED’) AND Tools::usingSecureMode() AND !($this->ssl) AND $_POST == array())

测试后方可正常使用。

 

http://blog.sina.com.cn/s/blog_8debf8e201016p3t.html

相关推荐

暂无评论

发表评论

微信扫一扫,分享到朋友圈

prestashop使用SSL证书后无法添加删除商品与正常付款的解决方法