I think this is the relevant part. How can I add one more level (subcategory level 2)
<?php if ( osc_count_categories() >= 0 ) { ?>
<ul>
<li><a href="<?php echo osc_update_search_url(array('sCategory' => null)); ?>"><?php _e('All categories', 'glider'); ?></a></li>
<?php while ( osc_has_categories() ) { ?>
<li>
<a<?php if ($sub==osc_category_slug()){echo " class='active'"; } ?> href="<?php echo osc_esc_html(osc_update_search_url(array('sCategory'=> osc_category_slug()))); ?>"><?php echo osc_category_name(); ?> <?php if( osc_get_preference('category_listing_count', 'glider_theme') !== '1') { ?><span class="count">(<?php echo osc_category_total_items(); ?>)</span><?php } ?></a><?php if ($sub==osc_category_slug()){ ?> <a href="<?php echo osc_update_search_url(array('sCategory' => null)); ?>" class="active delete"><i class="ion-close-circled"></i></a><?php } ?>
<?php if($sub==osc_category_slug() || $parentCategory ['s_slug'] == osc_category_slug() ) { ?>
<ul>
<?php while ( osc_has_subcategories() ) { ?>
<?php if (osc_category_total_items() >= 1) { ?><li>
<a<?php if ($sub==osc_category_slug()){echo " class='active'";} ?> href="<?php echo osc_esc_html(osc_update_search_url(array('sCategory'=> osc_category_slug()))); ?>"><?php echo osc_category_name(); ?> <?php if( osc_get_preference('category_listing_count', 'glider_theme') !== '1') { ?><span class="count">(<?php echo osc_category_total_items(); ?>)</span><?php } ?></a><?php if ($sub==osc_category_slug()){ ?> <a href="<?php echo osc_update_search_url(array('sCategory' => null)); ?>" class="active delete"><i class="ion-close-circled"></i></a><?php } ?>
</li>
<?php } ?>
<?php } ?>
</ul>