Answer the question
In order to leave comments, you need to log in
How to open subcategories of other categories while on the category page of OpenCart 3?
Hello, tell me please, I display categories for an example according to the standard, as here is a standard example
, according to the standard, which category you are in from that category, subcategories are available and open, tell me, how can I open all subcategories of all categories while on the category page, I tried this method (it's certainly not the best, but it should have worked) file /template/extension/module/category.twig
<div class="col-md-3">
<div class="shop-categor">
{% for category in categories %}
<div class="shop-categor-item">
<div class="shop-categor-title">{{ category.name }}
<div class="shop-close">
<span class="l1"></span>
<span class="l2"></span>
</div></div>
{% for child in category.children %}
<div class="shop-categor-wr">
<label><a href="{{ child.href }}" >{{ child.name }}</a></label>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
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