I have an element on product pages that will show a list of subcategories that have the same parent, but if the parent has no subcategories then no list to be shown.
Which means that this element will be only on products of a sub category, and not products of most top level categories.
Have implemented the following code from chat:
But now getting the following error:
syntax error, unexpected '}', expecting end of file in line 28
You can find the template file where the above code is implemented in the chat notes.