Jump to content

Disable module by customer id


Recommended Posts

Hello all,

is it possible to disable a module only to certain customers id?

I think it would be as simple as write

if (!$this->context->customer->id = "1234") {
// module code
} else {
// nothing, so the module wont execute
}

 

Any help on this?

Link to comment
Share on other sites

Yes, you can open a Hook functions and make source in FIRST of function

if ($this->context->customer->id == "1234") {
return ;

}

Example

public function hookDisplayLeftColumn($params)
	{
		if ($this->context->customer->id == '1234') {
			return false;
		}
		// Code module at here
	}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...