X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Smart Menu for v.4.4.1?? (https://forum.x-cart.com/showthread.php?t=62724)

Central Designs 02-22-2012 06:51 AM

Smart Menu for v.4.4.1??
 
Hi

Wondered if anyone can help... I'm looking to create a menu which contains both categories and also static pages, exactly like 'Smart Menu' does.

Unfortunately Smart Menu seems to be compatible upto v.4.3 and I'm using v.4.4.1 - does anyone know of a mod which does this and is compatible with v.4.4.x??

I have considered the possibility of hard-coding, but once the store is up and running, the store owner will want to be able to administer the website and add/remove pages and categories easily without any coding involved.

Many thanks

PhilJ 02-22-2012 07:36 AM

Re: Smart Menu for v.4.4.1??
 
We have a selection of menus available, or we can create any kind of dynamic menu for you.

JacksmithxD 02-23-2012 05:32 AM

Re: Smart Menu for v.4.4.1??
 
Quote:

Originally Posted by Central Designs
Hi

Wondered if anyone can help... I'm looking to create a menu which contains both categories and also static pages, exactly like 'Smart Menu' does.

Unfortunately Smart Menu seems to be compatible upto v.4.3 and I'm using v.4.4.1 - does anyone know of a mod which does this and is compatible with v.4.4.x??

I have considered the possibility of hard-coding, but once the store is up and running, the store owner will want to be able to administer the website and add/remove pages and categories easily without any coding involved.

Many thanks


I would definitely go with Phil, he's done some great work for my site, and is what I call a genius! :D

totaltec 02-23-2012 07:26 AM

Re: Smart Menu for v.4.4.1??
 
It is extremely simple to combine these two, or to add additional menus controlled by speed bars. I often just setup additional checkboxes for the static pages, instead of just "Show link in help menu" you can have more boxes, like "Show link in Articles Menu" or "Show link in Categories Menu". It's the easiest thing for the clients that I have found.

Now here is a quick lesson in Smarty:

Both the categories menu and the static pages menu are arrays and they are already assigned to smarty variables.
$categories_menu_list and $pages_menu respectively. You loop through arrays like this with either {section} or {foreach}. The simplest way to do a menu is with an unordered list, making each menu item it's own <li> inside the <ul>.

For example (I haven't tested this):

<ul>
{foreach from=$categories_menu_list item=c name=categories}
<li>
<a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category|amp}</a>
</li>
{/foreach}

{foreach from=$pages_menu item=p}
<li>
<a href="pages.php?pageid={$p.pageid}">{$p.title|amp} </a>
</li>
{/foreach}
</ul>

That should first open the list with <ul> and then loop through the categories menu, and as you can see write a <li> and a </li> for each item in the array. Then it does the same for the pages menu. Then we close the list </ul> after the second loop {/foreach} is complete.

Remember, you should never edit templates in /skin/common_files directly. Always setup a skin directory, and make all edits there. This will ensure you can always switch back to the default templates, and test whether it is your template that is breaking the site, or if there is something worse wrong.

Hope that helps,


All times are GMT -8. The time now is 05:26 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.