Hide "Catalog List Type" selector and "Sort"
Posted: 14 Mar 2017, 14:42
Hello,
I think it will be better if "Catalog List Type" selector and "Sort" are hidden when the selected category has no product assigned:
For Catalog List Type selector (client/html/templates/catalog/lists/body-default.php):
<?php if( ( $total = $this->get( 'listProductTotal', 0 ) ) > 0 ) : ?>
<div class="catalog-list-type">
-------
</div>
<?php endif; ?>
For Sorting (client/html/templates/catalog/lists/pagination-default.php):
$total = $this->total;
<?php if( $total > 1 ) : ?>
<div class="sort">
-------
</div>
<?php endif; ?>
I think it will be better if "Catalog List Type" selector and "Sort" are hidden when the selected category has no product assigned:
For Catalog List Type selector (client/html/templates/catalog/lists/body-default.php):
<?php if( ( $total = $this->get( 'listProductTotal', 0 ) ) > 0 ) : ?>
<div class="catalog-list-type">
-------
</div>
<?php endif; ?>
For Sorting (client/html/templates/catalog/lists/pagination-default.php):
$total = $this->total;
<?php if( $total > 1 ) : ?>
<div class="sort">
-------
</div>
<?php endif; ?>