VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: ex3mist on December 12, 2020, 18:02:21 PM

Title: Child categories are not appearing at first page load
Post by: ex3mist on December 12, 2020, 18:02:21 PM
Hello,
I have a strange issue - when I go to a main category page, the div with the subcategories is not loaded at first. If you refresh the page, then it appears. You can see the images - in the first there should have another div with the child categories above the one with "browse-view" class. And you can see it in the second picture - after refreshing the page.
The "Show Children Category" in Configuration/Templates is set to Yes. The versions are:
Joomla 3.9.23
Gantry 5.4.36
VM 3.8.6 10373
PHP 7.4
Link: http://var2.ex3m.bg/

Any ideas will be appreciated.
Title: Re: Child categories are not appearing at first page load
Post by: GJC Web Design on December 12, 2020, 19:51:13 PM
http://forum.virtuemart.net/index.php?topic=145141.msg515169#msg515169
Title: Re: Child categories are not appearing at first page load
Post by: ex3mist on December 13, 2020, 14:34:04 PM
Quote from: GJC Web Design on December 12, 2020, 19:51:13 PM
http://forum.virtuemart.net/index.php?topic=145141.msg515169#msg515169

Thanks a lot! Sorry, but I didn't find the post before I write. Seems it works for now by commenting those two lines:
// Show child categories
if ($this->showcategory and empty($this->keyword)) {
# if (!empty($this->category->haschildren)) {
echo ShopFunctionsF::renderVmSubLayout('categories',array('categories'=>$this->category->children, 'categories_per_row'=>$this->categories_per_row));
# }
}