Hi all,
I am currently evaluating CS-Cart using the 60 day trial on my local test server, however I seam to have run into a snag, I am trying to mimick my current site’s menu (accordion style menu), but I cannot get my old menu system to work, I am currently using opencube’s quick menu’s, the code is as follows:
<!-- QuickMenu Structure [Menu 0] --><br />
<ul id="qm0" class="qmmc"><br />
<br />
<li><a class="qm-startopen qmparent" href="javascript:void(0);">{$category.category}</a><br />
<br />
<br />
<ul><br />
<li><a href="{$index_script}?dispatch=categories.view&category_id={$category.category_id}">{$category.category}</a></li><br />
</ul><br />
<br />
<br />
</li><br />
<br />
<li class="qmclear"> </li></ul><br />
<br />
<!-- Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click (options: 'all' * 'all-always-open' * 'main' * 'lev2'), Right to Left, Horizontal Subs, Flush Left, Flush Top) --><br />
<script type="text/javascript">qm_create(0,false,250,250,false,false,false,false,false);</script><br />
<br />
<!--[END-QM0]-->
```<br />
<br />
<br />
I tried altering the category_trees.tpl for the skin I was using, this has sort of worked but not quite, i.e. I can get it to show the list of parent categories, but when I click on them it won't drop down and show the sub cats, or recognise any are there to put the "plus" image at the end of the parent name...but if i click a link in the site and go to the sub cat, the parent opens up correctly and shows the sub cats..... :cry: <br />
<br />
<br />
<br />
The code i tried using is:<br />
<br />
```php
{* $Id: categories_tree.tpl 7780 2009-08-04 08:59:41Z zeke $ *}<br />
<ul id="qm0" class="qmmc"><br />
{assign var="cc_id" value=$smarty.request.category_id|default:$smarty.session.current_category_id}<br />
<br />
{foreach from=$categories item=category key=cat_key name="categories"}<br />
{if $category.level == "0"}<br />
{if $ul_subcategories == "started"}<br />
<br />
{assign var="ul_subcategories" value=""}<br />
{/if}<br />
<br />
<br />
<li><a class="qm-startopen qmparent" href="javascript:void(0);">{$category.category}</a><br />
<br />
{else}<br />
{if $ul_subcategories != "started"}<br />
<ul> <br />
{assign var="ul_subcategories" value="started"}<br />
<br />
<br />
{/if}<br />
<br />
<li><a href="{$index_script}?dispatch=categories.view&category_id={$category.category_id}">{$category.category}</a></li><br />
<br />
<br />
<br />
</ul><br />
<br />
{/if}<br />
<br />
<br />
{if $smarty.foreach.categories.last && $ul_subcategories == "started"}<br />
<br />
<br />
<br />
<br />
{/if}<br />
{/foreach}<br />
</li> <br />
<li class="qmclear"> </li></ul><br />
<br />
<!-- Create Menu Settings: (Menu ID, Is Vertical, Show Timer, Hide Timer, On Click (options: 'all' * 'all-always-open' * 'main' * 'lev2'), Right to Left, Horizontal Subs, Flush Left, Flush Top) --><br />
<script type="text/javascript">qm_create(0,false,250,250,false,false,false,false,false);</script><!--[END-QM0]-->
```<br />
<br />
<br />
If I can get over this problem I think i'm onto a winner to replace my jShop cart system, but I can't get this to work.<br />
<br />
<br />
Regards<br />
<br />
Dan