Hi All, I'm using prestashop 1.5.6.1, and trying the following: shop domain: www.allthingsmtg.com ssl domain: allthingsmtg.com
The reason why is because I want to have cloudfare enabled for the main domain, but since the free version does not support ssl, bypass it for the SSL portion of the site...
Unfortunately, prestashop does not like the configuration above, and the cookie does not get preserved. I found an old post that says this was fixed:
http://www.prestashop.com/forums/topic/194004-solved-cart-contents-disappear-when-switching-to-ssl-subdomain-prestashop-15/
But I checked the newer code on config.inc, and it looks different:
/* Instantiate cookie */
$cookie_lifetime = (int)(defined('_PS_ADMIN_DIR_') ? Configuration::get('PS_COOKIE_LIFETIME_BO') : Configuration::get('PS_COOKIE_LIFETIME_FO'));
$cookie_lifetime = time() + (max($cookie_lifetime, 1) * 3600);
if (defined('_PS_ADMIN_DIR_'))
$cookie = new Cookie('psAdmin', '', $cookie_lifetime);
else
{
if ($context->shop->getGroup()->share_order)
$cookie = new Cookie('ps-sg'.$context->shop->getGroup()->id, '', $cookie_lifetime, $context->shop->getUrlsSharedCart());
else
{
$domains = null;
if ($context->shop->domain != $context->shop->domain_ssl)
$domains = array($context->shop->domain_ssl, $context->shop->domain);
$cookie = new Cookie('ps-s'.$context->shop->id, '', $cookie_lifetime, $domains);
}
}
$context->cookie = $cookie;
Any ideas on how to fix it? I'm attaching my htaccess for reference.
EDIT: I also tried to disable the friendly URLs as suggested in another post, no success...
Thanks! :-)
htaccess.txt