Frontend Full Category Tree as Backend

  • Posts: 20
  • Thank you received: 0
11 years 11 months ago #49589

I found a topic, where you write there is'nt possible to show a full category tree. Just until the 2nd level deep. I dont understand fully why? On the backend I see a nice category tree. It would be great if I can that use on the frontend. Is there any way to do that??

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 11 months ago #49617

The reason is simple. The front end module wasn't build to handle that.
It would be great yes. But as you know Rome wasn't built in one day. We have feature requests everyday. That one isn't easy to add and isn't asked much. So it's still waiting for the future.

You can do it by create one menu per category and using one of the multi levels joomla menu module available on the JED

OR by using that integration which handles HikaShop categories with any number of levels:
www.joomlack.fr/en/Joomla-extensions/Men...ximenu-hikashop.html

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

  • Posts: 20
  • Thank you received: 0
11 years 11 months ago #49688

nicolas wrote: But as you know Rome wasn't built in one day.

It looks like, I bulilt a small part of Rome in one day. :) I dont know the system, I just simple puchased it, and made it alone under 1 day?? :) Funny.
I just thought it's can't bee a big job, and Its true! Not big deal.. :) So when I made it under one day. I think, (if you are a talented team), maybe 1-2 hour. :)

nicolas wrote: The reason is simple. The front end module wasn't build to handle that.

No. The answer what is simple :) That module is perfect to the frontend too, because that just a simple dTree :)

nicolas wrote: You can do it by create one menu per category

It's a nightmare if i have lot of category, and that changeing every week or month. :)



For other users, who found this post, and wanted to do more level deep then 2:
1, Copy: administrator/components/com_hikashop/views/explorer TO: components/com_hikashop/views/explorer
2, Copy paste and rename mod_hikashop_currency module to the same dir as mod_hikatree (change xml datas for install it later trough joomla admin)
3, Empty mod_hikatree/tmpl/default.php
4, In mod_hikatree/mod_hikatree.php keep the JEXEC, and include helper parts, clean the others and paste this:
require JModuleHelper::getLayoutPath('mod_hikatree', $params->get('layout', 'default'));
$html = trim(hikashop_setExplorer('view',2,false,'product'));
if(!empty($html)){ echo ' <div class="hikashop_tree_module"> '.$html.' </div> '; }

5, In components/com_hikashop/views/explorer/view.html.php
5.1 Change line 39

From
$where = ' WHERE a.category_type IN ('.$database->Quote($type).',\'root\')';
To
$where = ' WHERE a.category_type IN ('.$database->Quote($type).',\'\')';

5.2, If you want to sincronize tree after you clicked one category, add this to line 67
$d = explode("-",basename($_SERVER['REQUEST_URI'])); $defaultId = abs($d[0]);

6, Joomla admin -> extension manager -> manage -> discover -> click discover -> install
7, in module manager create new module -> Hikashop Tree -> set a position, save, and you are finish :)

Thanks the help? :D ^o) B)


I uploaded my finished version too. Please, if you like my job, invite me for a coffee: paypal : sharqgm (@) gmail (dot) com DL link: http://sharq.hu/hikatree.zip

Last edit: 11 years 11 months ago by sharq.

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

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 11 months ago #49791

It's not what I had in mind. I was thinking of integrating the dTree directly in the HikaShop content module so that you can really configure it the way you want. That's what doesn't take 1-2 hours.
As you say, including the dTree view in a module isn't complex if you're a developer but remember that most of our users aren't. That's why I didn't want to explain all that.

Thanks for sharing the module! I'm sure that some other users of HikaShop will be happy to use it.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum