David Thomas Baker » PHP » PrestaShop | Not Working - Cannot login in Internet Explorer

Recently installed PrestaShop on a clients website - very nice and easy to use / administer shopping cart.

However when testing in IE 6 and 7 I realised nothing really worked, logging in, adding products to cart, creating accounts, nothing... Quite dissapointed and having already spent a long time configuring the shopping cart I decided to fix the problem rather than find a new cart product.

PrestaShop uses encrypted cookies to store all information rather than normal PHP sessions. Eventually figured out that Internet Explorer was constantly trying to re-create new cookies on every page load. So the problem was Internet Explorer could not save the cookies that PrestaShop was creating.

Simple fix.

In the file "prestashop/classes/Cookie.php" go down to line 50 where you see:

$this->_expire = isset($expire) ? intval($expire) : (time() + 1728000);

and change it too:

$this->_expire = isset($expire) ? intval($expire) : (time() + 3600);

This is because (some versions of) Internet Explorer seem to reject cookies that have large expiry times.

FYI: You can view the modified Presta Shop example here: http://shoestar.com.au/shop/ if you would like to test it in Internet Explorer.

 

Posted by David Baker in: PHP |
Tags:
Perm Link: link
Some ads...

Search My Site

Featured Projects

Collector Comics is THE place to buy, sell, and research comics online. Launching soon.
Launch » Screenshot »
Webitor is a kick-ass easy to use, easy to extend, non-database driven Content Management System. Version 2 with reseller plan coming soon.
Launch » Version 1 »
GC Lounge is my own pet social network and test bed for social related code. Made by locals for locals.
Launch »
GG has indexed over half a million recent Trade Mark applications. This revolutionary tool is extremely valuable for industry experts.
Launch »
GCWiFi is the hub for techies interested in joining a ad-hoc wireless mesh spread across the Gold Coast
Launch »
Web based financial client management system
Launch »
OS Commerce modules and template modification
Launch »
View More Projects »

Daves Friends

BlueTeddy
WebSpark
GC Designer Forum
IPWealth Trademarks
Cheap Websites
Bonsai Shop
Webitor CMS Resellers
Hayley Crook
David Novakovic
Ben Novakovic
Richard Morwood
Gold Coast Linux
Aussie Click
CMS Website Design
Inspire Tuition
Gold Coast Music Network and Gold Coast Gig Guide

Chat with Dave

Powered by...

In the works

Webitor - Easy to use Content Management System with Shop, Newsletter, and Reseller plan