I was unable to login in the Front Office area and I didn't find any solution in the forum (or at least in a language I understand). So I decided to change the code a bit and it now works.
here was the problem:
When I attempt to login in the Front Office, I get "DNS Error" in IE8 and "The connection was reset" in FF. the URL was http://www.mydomain....hentication.php
After looking through the forum with no luck, I decided to look at the code and isolate the problem.
Solution:
Open authentication.php
Scroll down to where you see this code:
$cookie->id_customer = intval($customer->id);
$cookie->customer_lastname = $customer->lastname;
$cookie->customer_firstname = $customer->firstname;
$cookie->logged = 1;
$cookie->passwd = $customer->passwd;
$cookie->email = $customer->email;
if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
$cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));
$id_address = intval(Address::getFirstCustomerAddressId(intval($customer->id)));
$cookie->id_address_delivery = $id_address;
$cookie->id_address_invoice = $id_address;
Module::hookExec('authentication');
if($back = Tools::getValue('back'))
Tools::redirect($back);
Tools::redirect('my-account.php');
replace that code with this code:
$cookie->id_customer = intval($customer->id);
$cookie->customer_lastname = $customer->lastname;
$cookie->customer_firstname = $customer->firstname;
$cookie->logged = 1;
$cookie->passwd = $customer->passwd;
$cookie->email = $customer->email;
if (Configuration::get('PS_CART_FOLLOWING') AND (empty($cookie->id_cart) OR Cart::getNbProducts($cookie->id_cart) == 0))
$cookie->id_cart = intval(Cart::lastNoneOrderedCart(intval($customer->id)));
if($cookie->id_cart != '')
Tools::redirect('order.php?step=1');
Tools::redirect('authentication.php?back=my-account.php');
After that login and checkout login should work.
What I would like to know is what does the code I removed does, because I don't see any difference so far
$id_address = intval(Address::getFirstCustomerAddressId(intval($customer->id)));
$cookie->id_address_delivery = $id_address;
$cookie->id_address_invoice = $id_address;
Module::hookExec('authentication');
if($back = Tools::getValue('back'))
Tools::redirect($back);
Tools::redirect('my-account.php');
Thank You



Vous parlez français ?









