JM Natris custom top menu!

Dear developers,

I’ve bought JM-Magento membership a few months ago and firstly I must say I am really impressed with all available templates. They really are a state of the art. This is my first thread here, maybe all those questions were answered before, but I couldn’t find any references to them. I think those answers would be the same for all templates, so I could use them for any other template, but since I am using now JM_natris, I post those questions here.Here we go:

I would like to make custom top-menu for my webstore (currently based on JM_Natris). Let’s say that I have in my Magento installation that category structure:

Cat A
-- subcat A1
-- subsubcat A1-1
-- subsubcat A1-2
-- subsubcat A1-3
-- subcat A2
-- subcat A3

Cat B
-- subcat B1
-- subcat B2
-- subcat B3

As seen from that structure I have three-level structure (cat, sub, subsub). I have three questions:

1. Instead of showing each top category (Main A, Main B) directly in top-menu I want to add a custom field to top-menu named "OUR PRODUCTS" where all those categories are shown inside. So top menu should look like:
OUR PRODUCTS (mouse hover over that field shows all categories below)
Main A
-subcat A1

Main B
-- subcat B1

In other words, top-menu should look like siderbar-menu where the title is "Category Navigation" and under that title there are listed all categories, subcategories, etc.

2. How can I add other custom fields to my top-menu like: About Us (link to a static page), Our Products (that one contains all categories as described above), Contacts, References, Terms and Conditions, etc…

3. I found out that sidebar-nav menu shows only main category and first-level subcategory. Is it possible (and how) to make sidebar-nav show second-level and maybe third-level category structure? As seen above, I would like to show in sidebar also: subsubcat A1-1, subsubcat A1-2, subsubcat A1-3, etc.

I know that’s a lot of questions, so here goes a huge "thank-you" in advance to that developer who would take time and answer them properly.

Best regards, Tomaz.

4 answers

Profile photo of thangnn1510 0.00 $tone November 30, 2010
Public

Dear Futurion!

Thank you very much for getting back to us.

I am sorry to inform that our technical support services are dedicated for bug fixing, products maintainence or general advice on how to use the products only. All custom works that requires to extend products’ core features as shown on our demo site are not subject to support coverage and should be handled by clients.

Thus, I am sorry that we could not handle your below customization request as it would delay the time for supporting other clients and developing new products for monthly release commitment.
————————QUOTE———————————--
1. Instead of showing each top category (Main A, Main B) directly in top-menu I want to add a custom field to top-menu named "OUR PRODUCTS" where all those categories are shown inside. So top menu should look like:
OUR PRODUCTS (mouse hover over that field shows all categories below)
Main A
-subcat A1

Main B
-- subcat B1

In other words, top-menu should look like siderbar-menu where the title is "Category Navigation" and under that title there are listed all categories, subcategories, etc.

2. How can I add other custom fields to my top-menu like: About Us (link to a static page), Our Products (that one contains all categories as described above), Contacts, References, Terms and Conditions, etc…
————————-END QUOTE———————————

Thank you for your understanding and I highly recommend you to post the projects on Joomlancers.com in case you need an expert to take up custom work as this is a good freelance portal.

The third item: Our template already support showing the second, third category level on left nav. Please download the latest natris theme and user compare tools to find difference with current version.

Best Regards!

#1
Profile photo of Tomaz Kavcic 0.00 $tone December 1, 2010
Public

Dear developer thangnn1510,

firstly thank you for your fast, very pleasant and strictly business reply. Of course I understand your concern for your clients and your level of support, but however I must say I was a little disappointed with your answers. It would mean much more to me if I would see that someone put really some effort into helping a client who spent $200 for membership and whos was expecting to get some serious support and during the whole three weeks posted just one not so complicated question, divided into three subquestions. Therefore I took a few minutes today and added just a few lines of code, and answered my questions myself. Here I am posint the solutions, as I believe some other members would sooner or later have the same problems as I had, so maybe someone would find that post useful after all.

1. To show OUR PRODUCTS as a link in top menu and inside all other categories you just have to add two lines of simple code. Search for a file /app/design/frontend/default/jm_natris/template/catalog/navigation/top.phtml and find the selected code inside div header-nav-container:

Original code:

Code:

<?php foreach ($this->getStoreCategories() as $_category): ?>
   <?php echo $this->drawItem($_category) ?>
<?php endforeach ?>

Simply change the selected original code to:

Code:

<li class="level0 parent">
   <a href="#"><?php echo $this->__('Our Products') ?></a>
   <ul>
      <?php foreach ($this->getStoreCategories() as $_category): ?>
         <?php echo $this->drawItem($_category) ?>
      <?php endforeach ?>
   </ul>
</li>

Of course, you can add some class="" options inside <li> and <ul> fields to use CSS formatting later, but that really isn’t important here. I just wanted to show people how hard was this to achieve for some skilled developers at JoomlArt. Just two simple additional lines of code.

2. The answer to my second question is even more trivial. There are tons of options to insert additional fields in top menu, but here I am posting the most flexible one, as some users can edit/change menu fields directly from backend, without editing any of .phtml files. All you have to do, to gain the extra functionality is to add a simple line of code into the same file as described above (/app/design/frontend/default/jm_natris/template/catalog/navigation/top.phtml). You can add that line wherever you want inside div header-nav-container, so the extra fields will be displayed before or after all other fields:

Code to insert:

Code:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu_links')->toHtml() ?>

After that, just create a new static block in backend (CMS -> Static Blocks) with id menu_links. Here I am posting a sample code for that static block which will display one field as drop-down with three subfields and another two simple fields in the main top menu:

Code:

<li>
   <a href="{{store url="about"}}">About Us</a>
   <ul>
      <li><a href="{{store url="history"}}"><span>Our History</span></a></li>
      <li><a href="{{store url="team"}}"><span>Our Team</span></a></li>
      <li><a href="{{store url="mission"}}"><span>Mission Statement</span></a></li>
   </ul>
</li>
<li><a href="{{store url="news"}}"><span>News</span></a></li>
<li><a href="{{store url="contacts"}}"><span>Contact Us</span></a></li>

Same thing here as for the first example. You can insert also some class="" options into <li> and <ul> fields to gain CSS formatting options.

3. Here goes the last question. Yes, you answered that question, but before answering you should really check that solution, as it doesn’t work out-of-the-box like it should. It doesn’t have big issues, but I spotted two minor issues and I also posted a reply to that already answered and closed thread at URL:
http://www.joomlart.com/forums/showt…ory-navigation
You can check those two issues also on my live test page at http://minerva5.futurion.si/ where is clearly visible that third-level categories show that red circles all around the field on mouse-over or when active, and you can also see that if you select a third-level category that sidenav collapses and it doesn’t stay open automatically as it should. Please check for categories: Rocno Orodje -> Klesce -> Papagajke, Kombinirke. Select one of those two categories and the bugs should appear.

To conclude, I am not a developer and I just merged a few simple lines of code today found on google and solved those first two "big" programming issues myself in just about two hours. Imagine, how much time would one skilled PHP magento developer need. Maybe 10 minutes?

Regarding the third question, this REALLY IS a bug inside JM_Natris which you should solve, as you are offering support for that already implmented functionality which doesn’t work OK. So I am begging you once again to look into this matter and post the bug-fix as soon as possible for my last third question as my membership runs-out in few days so I won’t be able to check for that solution anymore.

I hope you understand my way of thinking. Thank you in advance again for your reply.

Best regards, Tomaz.

#2
Profile photo of thangnn1510 0.00 $tone December 2, 2010
Public

Hi futurion!

I am sorry if you felt disappointed coz of my reply. As said, prime objective of dedicated support is bug fixes and minor customizations. I hope you would understand our stand on this.

I really appreciate your work above and I am thankful for the same.

About the third bug, we have fixed it and released an updated version, you can go to update.joomlart.com check for the product and compare the latest version with your version. You can copy over the updated files to your site.

About the bugs on left menu that you have converted to accordion menu, I have posted a solution here :

http://www.joomlart.com/forums/showt…ory-navigation

Regards!

#3
Profile photo of Tomaz Kavcic 0.00 $tone December 2, 2010
Public

Dear developer,

great and fast fix, I appreciate it. Everything works OK now, sidenav doesn’t collapse anymore after applying that .js accordiong fix you posted; all CSS files seem to be working fine also, so for now, no complaints at all.

I am sorry for my "panic outburst" above with those two minor top-menu modification issues, but after all, I think that someone will make use of them someday; it’s really useful if you can completely sutomize top-menu with your own links, pages, options…

Thank you again for all your help! Best regards, Tomaz.

#4

This question is now closed

Written By

Comments