Hide "Catalog List Type" selector and "Sort"

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Metalics
Advanced
Posts: 103
Joined: 13 Jul 2015, 23:59

Hide "Catalog List Type" selector and "Sort"

Post by Metalics » 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; ?>

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Hide "Catalog List Type" selector and "Sort"

Post by aimeos » 14 Mar 2017, 15:26

Yes, would make sense. Are you able to create a pull request on GitHub for this?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply