*

mphker

  • ***
  • 57 posts
How can hide or remove this
« on: May 29, 2016, 11:40:42 AM »
Hello ,
I don't use sub-Categories in my website , so the sub-Categories appear nulled , how can remove or hide it .

Marked as best answer by frosticek on May 30, 2016, 10:01:38 AM
*

MB Themes

Re: How can hide or remove this
« Reply #1 on: May 29, 2016, 11:58:18 AM »
@mphker
Go to file:
oc-content/themes/zara/js/global.js

Find code:
Code: [Select]
  // FANCYBOX - SUBCATEGORY OPEN ON HOMEPAGE
  $(document).on('click', '.open-home-cat', function(e){
    e.preventDefault();

    if (!!$.prototype.fancybox) {
      $.fancybox({
        'padding':  0,
        'width':    640,
        'height':   320,
        'autoSize': false,
        'autoDimensions': false,
        'wrapCSS':  'home-cat',
        'content':  '<div class="cat-tab">' + $('#ct' + $(this).attr('rel')).html() + '</div>'
      });
    }
  });

And remove it.

Then go to file:
oc-content/themes/zara/inc.category.php

Find line:
Code: [Select]
<?php if(osc_is_home_page()) { ?>href="#ct<?php echo osc_category_id(); ?>"<?php } else { ?>href="<?php echo osc_search_url($search_params); ?>"<?php ?>
And replace it with:
Code: [Select]
href="<?php echo osc_search_url($search_params); ?>"
This will disable fancybox of subcategories on homepage.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mphker

  • ***
  • 57 posts
Re: How can hide or remove this
« Reply #2 on: May 29, 2016, 03:35:59 PM »
thanks

*

SarzzeR

  • ***
  • 22 posts
Re: How can hide or remove this
« Reply #3 on: November 17, 2016, 11:09:26 PM »
Hello,

This:

Quote
Then go to file:
oc-content/themes/zara/inc.category.php

Find line:
Code: [Select]

<?php if(osc_is_home_page()) { ?>href="#ct<?php echo osc_category_id(); ?>"<?php } else { ?>href="<?php echo osc_search_url($search_params); ?>"<?php } ?>


And replace it with:
Code: [Select]

href="<?php echo osc_search_url($search_params); ?>"

Doesn't work with 1.2.0 version of Zara theme, at least for me.

*

MB Themes

Re: How can hide or remove this
« Reply #4 on: November 18, 2016, 09:51:17 AM »
@SarzzeR
Nothing has been changed in this section.
You could also remove code bellow:
Code: [Select]
<?php if(osc_is_home_page()) { ?>class="open-home-cat"<?php ?>
Give it try.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

SarzzeR

  • ***
  • 22 posts
Re: How can hide or remove this
« Reply #5 on: November 18, 2016, 04:38:54 PM »
No effect, my URL is still
Quote
search/category,99/sCompany,1

*

MB Themes

Re: How can hide or remove this
« Reply #6 on: November 18, 2016, 06:04:38 PM »
@SarzzeR
And that is correct.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

SarzzeR

  • ***
  • 22 posts
Re: How can hide or remove this
« Reply #7 on: November 18, 2016, 06:20:48 PM »
@SarzzeR
And that is correct.

Maybe but in 1.1.8 the URL was www.site.com/category (and not search/category,99/sCompany,1) with the same code correction.

*

MB Themes

Re: How can hide or remove this
« Reply #8 on: November 18, 2016, 07:29:31 PM »
@SarzzeR
Not possible.

www.site.com/category does not keep ID of category and could not keep any other parameter.
URLs are generated by search parameters. As you have choosen to show just listings from companies, this parameter is stored in cookies.
If you would not have it, URL of category could be site.com/{category-link}

Note that links are not generated by theme.
« Last Edit: November 18, 2016, 07:31:17 PM by frosticek »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots