cancel
Showing results for 
Search instead for 
Did you mean: 

Random products list on home page works incorrectly

Random products list on home page works incorrectly

Hi folks,

 

I installed 1.9.2.4 magento version. After I added a block that displays products randomly into my homepage via this xml code by putting it into 'Custom Layout Update XML' field in properties page:

 

<reference name="content">
    <block type="catalog/product_list_random" name="catalog.product.list.random" alias="product_list_random" template="catalog/product/list.phtml">
    </block>
</reference>

The block displayed 12 random elements by default, but now after I added about 30 products the block started always displaying only 4 same items. I can't figure out how to resolve this by myself.

 

It looks like somthing is stuck somewhere in the system's storage.

You can see it here http://texlandia.ru

 

I also tried to use this code in 'Content' field, but it creates weird list with broken layout and bullets for <li> tags.

 

{{block name="catalog.product.list.random" type="catalog/product_list_random" template="catalog/product/list.phtml" num_products="12"}}

Thanx in advance.

2 REPLIES 2

Re: Random products list on home page works incorrectly

I resolved it by selecting all the products and updating it's status to "Enabled" (as it was before). 

 

But anyway I don't realize why doesn't this kind of notation of block definition work?

 

{{block name="catalog.product.list.random" type="catalog/product_list_random" template="catalog/product/list.phtml" num_products="12"}}

I would really appreciated if a kind soul shed some light on this.

Re: Random products list on home page works incorrectly

Its nice to see that you solved it yourself. Development itself needs enthusiasm to find new questions and answers to them. Keep it up.