How To Hide Products From Subcategory And Display Only The Last

Hi, please help!

I need optimize process of add product to site!

as I'm doing now

1. Create a category and after add products in the category

2. Create html page

it turns out

problem: i need automaticaly when add a category and product displayed without products and left panel as in the third picture. After clicking displayed a simple list of products

my html code:


I understand that it is necessary to change something here: templates / views / categories / view.tpl

{hook name="categories:view"}

{if $category_data.description || $runtime.customization_mode.live_editor}
<div class=“ty-wysiwyg-content ty-mb-s” {live_edit name=“category:description:{$category_data.category_id}”}>{$category_data.description nofilter}


{if $subcategories}
{math equation=“ceil(n/c)” assign=“rows” n=$subcategories|count c=$columns|default:“2”}
{split data=$subcategories size=$rows assign=“splitted_subcategories”}

    {foreach from=$splitted_subcategories item=“ssubcateg”}
    {foreach from=$ssubcateg item=category name=“ssubcateg”}
    {if $category}

  • <a href=“{“categories.view?category_id=$category.category_id”|fn_url}”>
    {if $category.main_pair}
    {include file=“common/image.tpl”
    <span {live_edit name=“category:category:{$category.category_id}”}>{$category.category}

  • {/if}


{if $products}
{assign var=“layouts” value=“”|fn_get_products_views:false:0}
{if $category_data.product_columns}
{assign var=“product_columns” value=$category_data.product_columns}
{assign var=“product_columns” value=$settings.Appearance.columns_in_products_list}

{if $layouts.$selected_layout.template}
{include file=“$layouts.$selected_layout.template” columns=$product_columns}

{elseif !$subcategories || $show_no_products_block}



{capture name=“mainbox_title”}<span {live_edit name=“category:category:{$category_data.category_id}”}>{$category_data.category}{/capture}

p.s if there are many sub-categories I have to create many html page and link between them


catehory html.PNG


If I understand correctly, you are trying to create categories in the website pages?

If you're trying to create categories for products, you should be using the product categories.

No need to create a whole new page. You can get rid of the product list on category pages in Settings|General. Under Catalog uncheck "Show products from subcategories of the selected category". The left column with the filter block and recently viewed might automatically disappear when you do that but if not go into Design|Layout and click on the Categories tab. Deactivate the Grid 4 that contains the Filter and Recently Viewed blocks.

now I will try)