News Flash:
New Version of ShopClass theme 1.4.0 is Released on 13 JUNE 2018, Please upgrade your installation.

Parrent category

A place to talk about anything related to ShopClass theme in general. This is not the place to ask support questions.
Post Reply
agiminer
Noob
Posts: 1
Joined: Thu Feb 14, 2019 10:17 pm

Parrent category

Post by agiminer » Thu Feb 14, 2019 10:38 pm

Hi ,
I want Layout2 only to show parent categories.
I been struggling to figure out how to setup this. What i notice in database that Primary categories have fk_i_parent_id value as NULL.

Any idea how to manage this ?
<div class="col-md-12">
<?php osc_goto_first_category(); ?>
<?php while ( osc_has_categories() ) { ?>
<div class="col-md-3 col-xs-6">
<div class="catcard">
<div class="card-image tfc-item card-box">
<a href="<?php echo osc_search_category_url(); ?>">
<img class="img-responsive"
src="<?php echo tfc_category_image_url( osc_category_id() ); ?>">
</a>
<span class="card-title text-center">
<a href="<?php echo osc_search_category_url(); ?>"><?php echo osc_category_name(); ?></a>
<?php if ( osc_has_subcategories() ) { ?><i
data-maincatid="<?php echo osc_category_id(); ?>" data-toggle="tooltip"
data-placement="top"
data-original-title="<?php _e( 'More' , 'shopclass' ) ?>"
class="subcat-modal fa fa-plus-circle"></i>
<?php } ?>
</span>
</div>

</div>
</div>
<?php } ?>
<div class="clearfix"></div>
<h4 class="col-md-12"><a class="btn btn-primary cardbox-primary"
href="<?php echo osc_search_show_all_url(); ?>"><?php _e( "See all offers" , 'shopclass' ); ?>
&raquo;</a></h4>
</div>

Post Reply