This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

jmontes

  • ***
  • 29 posts
Hi,

One of my categories has no sub-category. But when get clicked, the popup still visible meaning the users need to click twice just to go to "All Results" page. Is there a way to hide the popup on a specific category?

Screenshot: http://prntscr.com/e3w35i

Thanks!

*

MB Themes

Re: I have no Sub-categories. How to disable the popup in the categories?
« Reply #1 on: February 03, 2017, 09:08:58 AM »
@jmontes
There is no such possibility right now.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jmontes

  • ***
  • 29 posts
Re: I have no Sub-categories. How to disable the popup in the categories?
« Reply #2 on: February 03, 2017, 04:07:10 PM »
Hope you can consider adding this feature in the next update cause it's not good in UX seeing a blank popup when they clicked the category.

Thanks!

Marked as best answer by frosticek on February 04, 2017, 10:35:29 AM
*

MB Themes

Re: I have no Sub-categories. How to disable the popup in the categories?
« Reply #3 on: February 03, 2017, 09:02:10 PM »
@jmontes
Go to oc-content/themes/veronika/js/global.js

Find block under line:
Code: [Select]
  // FANCYBOX - SUBCATEGORY OPEN ON HOMEPAGE

Replace the code of block bellow (few lines) with:
Code: [Select]
  $(document).on('click', '.open-home-cat', function(e){
    e.preventDefault();

    // Check if contains subcategories
    var subcatCount = $('#ct' + $(this).attr('rel')).find('.middle > a').length;
    var catUrl = $('#ct' + $(this).attr('rel')).find('.head > a').attr('href');
   
    if(subcatCount > 0) {
      if (!!$.prototype.fancybox) {
        $.fancybox({
          'padding':  0,
          'width':    640,
          'height':   430,
          'autoSize': false,
          'autoDimensions': false,
          'wrapCSS':  'home-cat',
          'content':  '<div class="cat-tab">' + $('#ct' + $(this).attr('rel')).html() + '</div>'
        });
      }
    } else {
      window.location.href = catUrl;
    }
  });

20 bucks please .... :D ... hope it worked, do not have categories without subcategories...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jmontes

  • ***
  • 29 posts
Re: I have no Sub-categories. How to disable the popup in the categories?
« Reply #4 on: February 04, 2017, 10:25:49 AM »
Thank you frosticek! :D