Jump to content

turn off some block on loyalty page


Recommended Posts

We just found prestashop issue, for your purpose you will need to override Hook::exec with this:

 

.......
// Check permissions
  $exceptions = $moduleInstance->getExceptions($array['id_hook']);
		if(isset($_GET['module']) && in_array($_GET['module'], $exceptions))
			continue;
  if (in_array(Dispatcher::getInstance()->getController(), $exceptions))
continue;
  if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
continue;
.......

 

Must be reported to forge or edited on github

Link to comment
Share on other sites

  • 2 weeks later...

Hi Alexander

 

I am having the same problem.

 

What file did you over-write Hook::exec in ?

 

Just to elaborate - I am using the Realex Redirect Payment Module. It is not written for Version 1.5 but I think this is the only problem I am having.

 

At the end of the 5 step payment module before I click on the Credit Card Symbol, everything looks fine. The left hand column is not visible.

 

When I click on the Credit Card to pay, it brings me to the request.php page. On this page, the left hand column has been re-introduced which screws up the page.

 

I have tried to add an exception for the page in the Modules that are displayed on the left but I can't seem to do it. The exception will work for any standard pages that are available in the drop down list (Like Contact etc) but when I manually type in the page "Request" (I've also tried "request.php") it won't work.

Edited by dadinan (see edit history)
Link to comment
Share on other sites

I meant the "Hook" class:

 

/**
* Execute modules for specified hook
*
* @param string $hook_name Hook Name
* @param array $hook_args Parameters for the functions
* @param int $id_module Execute hook for this module only
* @return string modules output
*/
public static function exec($hook_name, $hook_args = array(), $id_module = null)

Link to comment
Share on other sites

×
×
  • Create New...