Magento Forum

   
configure block product
 
Mageho
Sr. Member
 
Avatar
Total Posts:  291
Joined:  2008-03-24
France, Paris
 

Good morning everybody,

Today, i try to get product from a current category id and i did it successfully !

echo $this
    
->getLayout()
    ->
createBlock("catalog/product_list"'id', array('category_id' => 25'limit' => 2))
    ->
setTemplate("catalog/product/list/products_from_category.phtml")
    ->
toHtml();

Only my limit parameters don’t work ?
How do you pass this parameter to the block ?

Thank you,
Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mageho
Sr. Member
 
Avatar
Total Posts:  291
Joined:  2008-03-24
France, Paris
 

I know why it doesn’t work.
The parameter limit don’t exist.

Moreover, we can do directly :

echo $this
->getLayout()
->createBlock("catalog/product_list")
->setTemplate("catalog/product/list/products_from_category.phtml")
->toHtml();

When magento create this block, it already knows if we are in product page.

Nobody knows how to control the ouput ?
I want 30 products ...

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andrea, Argentina
Sr. Member
 
Total Posts:  164
Joined:  2007-12-05
Buenos Aires, Argentina
 

Where do you put that code?
Can you share a printscreen or a live demo to see what are you customizing? It sounds good, I don’t know how to do it :(

Andrea

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top