[TYPO3-commerce] number of products

Ingo Schmitt mailinglisten at i-schmitt.de
Mon Aug 27 12:30:59 CEST 2007


Hi,
> "Ingo Schmitt" <mailinglisten at i-schmitt.de> schrieb im Newsbeitrag 
> news:mailman.1.1188203866.22574.typo3-project-commerce at lists.netfielders.de...
> 
>>Hi,
>>
>>
>>>hi!
>>>how is it possible to indicate the number of products that are in one 
>>>category, like books (24)?
>>>
>>
>>so a count of active products?
>>
>>You could use
>>tx_commerce_category::get_subproducts  (     )
>>and ocunt the entries. You could easily add this by woud own marker hook.
>>

Uh, so you want top print out the number of subproducts of a category in 
the navigation. You might could do a count of the sub elements in the 
navigatiuon, but be carefull, building the navigation is some kind of 
vodoo, since a double caching is needed.

ingo

>>Regards
>>
>>ingo
>>
> 
> ok, my idea is to call this function in class.tx_commerce_navigation.php and 
> to put this function in init($content,$conf), like
> 
> $result = count ( this->category->get_subproducts() );
> 
> then print the result.
> 
> 
> 
> best regards, simon
> 
> 
>>
>>>best regards, simon
>>>
>>>
>>
>>
>>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
> 
> 
> 


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-project-commerce mailing list