[TYPO3-commerce] RFC: #7874: bug: Empty Categories are not hidden

Ingo Schmitt spam at marketing-factory.de
Tue Jun 29 22:36:57 CEST 2010


Hi Morten,

thanks.

After changing, committed to trunk.
> Hi Ingo,
> 
> lib/class.tx_commerce_category.php
> 
> 673    if ($deepth == false) {
> 674        $deepth = PHP_INT_MAX;
> 675     }
> 
> 
> should be $depth === false  ( one "e", three "=" )
> 
> same goes for "function ProductsBelowCategory($deepth = false){"
> 
> only one "e"
> 
> 
> getAllProducts either needs to have the default value of 0 ( to avoid 
> comparing ints to bools ), or better yet at construction where false 
> becomes PHP_INT_MAX like that in ProductsBelowCategory.
> 
> 
> lib/class.tx_commerce_navigation.php
> 
> 800    if ($this->mConf['hideEmptyCategories'] && $tableName == 
> 'tx_commerce_categories' && is_array($row[0])) {
> 
> should be
> 
> if ($this->mConf['hideEmptyCategories']==1 && $tableName == 
> 'tx_commerce_categories' && is_array($row[0])) {
> 
> There may also be some CGL issues with the white space, but eh...
> 
> 
> Other than that it's looking good - but damn it will be heavy to run ;)
> 
> /Morten Olesen
> 
> On 2010-05-24 15:57, Ingo Schmitt wrote:
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://forge.typo3.org/issues/show/7874
>>
>> Branches:
>> trunk
>>
>> Problem:
>> If you have a category structure without any active products (e.g. no
>> stock), this category is still displayed
>>
>> Solution:
>> Check for every category, if active products below exists
>>
>> Notes:
>> I've created an additional TS entry for this, to have the possibility to
>> activate this, since checking every category below will cause quite a 
>> load.
>>
>> Regards
>> Ingo
>>
>> Mit freundlichen Gruessen
> 



Mit freundlichen Gruessen
-- 
Ingo Schmitt                        mailto:is at marketing-factory.de
Marketing Factory Consulting GmbH   http://typo3.marketing-factory.de/
Content Management mit Typo3: Beratung - Schulung - Realisierung


More information about the TYPO3-team-commerce mailing list