I'm using PrestShop 1.5, for redirecting
Above code help me to redirect if the user is not logged, [path for it is classes\controller\FrontController.php in that after the public function init() after the line parent::init()]
Now i want the code for, if some one clicks the Add to Cart, he or she will be redirected to Login Page as well as the cart count should have to be in 0.
The concepts comes like, if it is the Guest user then he or she can only view the list of product but when he clicks the Add to Cart, he or she will have to be redirected to Login Page.
Please help me out