Welcome, Guest
Username: Password: Remember me

TOPIC: Level of Categories For OT Mini Tabs & Hide Category

Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4964

  • haan88
  • haan88's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Hi,

I can only display 2 levels of categories for the OT Mini Tabs.
How can I display more levels for that?

Besides,
How to hide certain category from displaying?

Thanks.
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.

Re: Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4969

  • linh_omg
  • linh_omg's Avatar
  • OFFLINE
  • Moderator
  • Posts: 910
  • Thank you received: 568
  • Karma: 25
Hi,
This is the issue of VM_product_category module.
You can show 3rd level category but with a litle hack.
1. Go to backend, edit the module (mod_virtuemart_category - "By Departments") and choose the layout is "All". I think you've done this.

2. Go to modules/mod_virtuemart_category/mod_virtuemart_category.php
find this code ~ line 49:
foreach ($categories as $category) {

      $category->childs = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $category->virtuemart_category_id );
add after it
// Your hack code here
      if($category->childs){
         foreach($category->childs as $child){
            $child->childs = $cache->call( array( 'VirtueMartModelCategory', 'getChildCategoryList' ),$vendorId, $child->virtuemart_category_id );
         }
      }
// End of Your hack code
...
3. Go to templates/ot_.../html/mod_virtuemart_category/tmpl/all.php
find this code ~ line 35:
<div ><?php echo JHTML::link($caturl, $cattext); ?></div>

Add this code after above line:
<?php if ($child->childs ) {   // Your hack code here
   ?>
      <ul class="menu<?php echo $class_sfx; ?>">
      <?php
         foreach ($child->childs as $grandchild) {      
            $caturl = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$grandchild->virtuemart_category_id);
            $cattext = $grandchild->category_name;
            ?>
      <li>
         <div ><?php echo JHTML::link($caturl, $cattext); ?></div>
      </li>
      <?php } ?>
      </ul>
   <?php    } // End of your hack code 
?>

Save them all.

4. Go to back-end, at Maintance page, clear all cache.

5. Try it!

Hope this help.

Thanks!
If you need to send us FTP access / host access, administrator access or any private information:
services(at)omegatheme(dot)com or drop a ticket www.omegatheme.com/member/
The administrator has disabled public write access.

Re: Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4970

  • haan88
  • haan88's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Hi,

It's not working.
I have both modified files attached.
Please check if they're done correctly.
Thanks.

Regards,
Tan
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 3 years 4 months ago by haan88. Reason: Files attached failed
The administrator has disabled public write access.

Re: Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4973

  • linh_omg
  • linh_omg's Avatar
  • OFFLINE
  • Moderator
  • Posts: 910
  • Thank you received: 568
  • Karma: 25
Hi,
You inserted the code for all.php at wrong place.
I said "Add this code after above line:" not "Add this code above line:"

So I attached the correct here.
But will not have any guaranty that it will work for you. :-)


Part of the message is hidden for the guests. Please log in or register to see it.
Thanks
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
If you need to send us FTP access / host access, administrator access or any private information:
services(at)omegatheme(dot)com or drop a ticket www.omegatheme.com/member/
Last Edit: 3 years 4 months ago by linh_omg.
The administrator has disabled public write access.

Re: Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4977

  • haan88
  • haan88's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Hi,

It's still not working.
Any idea how to make it work?
Thanks

Regards,
Tan
The administrator has disabled public write access.

Re: Level of Categories For OT Mini Tabs & Hide Category 3 years 4 months ago #4978

  • linh_omg
  • linh_omg's Avatar
  • OFFLINE
  • Moderator
  • Posts: 910
  • Thank you received: 568
  • Karma: 25
So, you can think about search on VM forum to see if some one did the trick or can use some third party VM category modules which support multi-level cate menu :-)
If you need to send us FTP access / host access, administrator access or any private information:
services(at)omegatheme(dot)com or drop a ticket www.omegatheme.com/member/
The administrator has disabled public write access.
Time to create page: 0.164 seconds