override the search module to hide a category

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 6 months ago #138263 by OTWD
If you have a popular event that you wish users on the waiting list to get first refusal on it would be great to have a hidden category that only users with a link could find.

I do this by creating a "hidden" category then in the search module i modify the following code in
modules/mod_eb_search/mod_eb_search.php
Line 72 Add " ->where('id != 23') " with 23 being the id of the category i dont want to show in the search DD


My question is how do i override this file without modifying the core - i tried the usual copying to the template > html override but it has no effect?

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #138274 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic override the search module to hide a category
Hello

Unfortunately, there is no way to override a module file, so if you make that change, you will have to maintain it each time you update to future releases of the extension

Tuan

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 years 6 months ago #138634 by OTWD
Thanks for the reply.
Can you update core mod_eb_search to allow for selection / exclusion of categories (much like the menus). This would be a great feature as currently you can have a menu which shows e.g 3 categories but if you have the search mod enabled on that page then users can see other categories too in the DD which you may not wish them to see.

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
3 years 6 months ago #138637 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic override the search module to hide a category
Hello

I will monitor customer requests. If there are more customers need it, I will consider supporting it in the future

Regards,

Tuan

Please Log in or Create an account to join the conversation.