Answer the question
In order to leave comments, you need to log in
How to find out the number of products in the filter by attribute?
Hello. I'm making a menu of categories, in which a filter by attribute should immediately be displayed. In principle, I made it static, because. everything is known in advance. It turned out something like:
$menu_list .= '<li class="sidebar-menu__item"><a href="' . $menu_item->url . '" class="sidebar-menu__link">' . $menu_item->title . '</a>
<ul class="sidebar-atr-menu">
<li class="atr-menu one-star">
<a href="' .$menu_item->url .'?filter_slojnost=1">Лёгкие</a>
</li>
<li class="atr-menu two-star">
<a href="' .$menu_item->url .'?filter_slojnost=2">Средние</a>
</li>
<li class="atr-menu three-star">
<a href="' .$menu_item->url .'?filter_slojnost=3">Сложные</a>
</li>
</ul>
</li>
if ( count > 0 ) {
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question