If you have a large number of categories slowing down your site, or you just simply want to remove the subcategory drop-down menu for aesthetic reasons, you can do so. The article below will show you how.

Applies to Version(s): 3.7.0 - 3.8.0 series

Complexity Level: Advanced

Estimated Time for Completion: 20 minutes

How to Remove Sub Categories From the Drop-Down Menu

        1. First, highlight and copy the code below:

{if empty($category_level)}
 {assign var="category_level" value=1}
 {math equation="x + 1" x=$category_level assign="category_level"}
{foreach from=$categories item="category"}
{if $category.level == 1 && $category.is_visible == "Yes"}
 <li {if $parent == $category.cid}class="drop-down-menu-item-current"{/if}>
 <a href="{$category.category_url}" class="drop-down-menu-item {if !empty($category.children)}parent{/if}">{$category.name|htmlspecialchars}</a>
<!-- {if !empty($category.children)}
 {assign var="categories" value=$category.children}
 {include file="templates/layouts/zones/includes/menu-item.html"}
{math equation="x - 1" x=$category_level assign="category_level"}
{assign var="category" value=0}

        2. Paste it into a plain text editor like Notepad++ and save the file as menu-item.html. Using FTP or your File Manager, navigate to content/skins/_custom/skin/templates/layouts/zones/includes/ and upload the file. The reason we upload it here is so that it doesn't get overwritten by any template updates that might come with an upgrade.

        3. The file needs to be pushed into cache. To do this, go to Design > Cart Designer. After activated, you can exit.

cart designer

Links to Related Articles

None at this time.

If you didn't get your question answered, please contact the Pinnacle Cart Support Team. To submit a ticket, go to the My Account drop-down menu at the top right of the admin area and select Support.