Jump to content

Recommended Posts

Hello,

 

I'm creating a site with prestashop 1.6.
I created a category called 'YYYY' accessible only to users in the group 'YYYY'.
If I do not login and try to get into the class I get the error "There is 1 error. .... You have no...etc etc" it is possible to bring up the login form?

greetings

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

You can do it by modifying the categorycontroller.php file, no third parties needed.

 

Locate this

		if (!$this->category->checkAccess($this->context->customer->id))
		{
			header('HTTP/1.1 403 Forbidden');
			header('Status: 403 Forbidden');
			$this->errors[] = Tools::displayError('You do not have access to this category.');
			$this->customer_access = false;
		}

And change it to:

if (!$this->category->checkAccess($this->context->customer->id))
		{
			Tools::redirect($this->context->link->getPageLink('authentication'));
		}v
Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...