Jump to content

How to hook a specific module to the 404-site


guest*

Recommended Posts

I have a problem: My shop has moved from another system to prestashop. Now I have some links coming to the 404-PS-Site.

 

Is it possible to hook to this site for ex. the module slider or manufacturer (mwall)?

 

I tried to add to mwall.php the following code:

 

function hookSearch($params)
{
return $this->hookHome($params);
}

 

The module is now hooked to search, but it is not appearing on the search-site and also not on the 404-replacement (search) site.

 

I want to hook it to the 404-replacement (search) site.

 

Does someone have any idea how I can realize this ?

Link to comment
Share on other sites

Yes, it is not possible. By adding the code mentioned, it was added to the hook, but not visible on search-results page. But I don't want it there, I want the two modules on the 404-search replacement site. It seems that this site (404.php) has other rules as normal.

Link to comment
Share on other sites

Why is it not possible? If PS doesn't allow you to transplant it to a specific hook, you just need to create the function for that hook.

 

The 'search' hook is executed only on the search page.

 

Eventually you could create a special hook only for the 404 page and transplant the module to it. You will also need to override the 404 page's controller.

 

Regards.

 

Robin.

 

The CartExpert Team

Link to comment
Share on other sites

Sorry it seems that I'm speaking Chinese ? As I told twice: The module is still hooked with the code added to the php-file, but I cannot see it. Perhaps I'm hooking it at the wrong place !!!

 

For hooks I have only available "Search" but was is this search ? It seems that this "search" is not the 404-search replacement site I want to hook the both modules. Can you confirm that "search" is not the 404-search-replacement site ?

 

I'm not a coder, so I'm unable to code overrides if this "search" does not fulfil what I want to execute.

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...