cancel
Showing results for 
Search instead for 
Did you mean: 

How to display random products on home page ?

How to display random products on home page ?

Hello.

In my magento home page , I have added widget to display items from different categories. 

I chose Catalog product list .

I left the cache life time empty as it should update every 24 hour. however, widget only displays the same items and never seems to update , even if i change the cache time or clear the cache .. i have chosen 4 different categories . is this normal or am i doing something wrong? 

I need to display different products each time cache life ends . any suggestion ?

Thanks

8 REPLIES 8

Re: How to display random products on home page ?

Hi @tonysar 

 

Checkout Magento 2 Subcategories Slider extension for displaying products on the home page of your Magento 2 Store. 

 

Hope it Helps

Accept as the solution and hit the Kudos Button

Thank-You.

Re: How to display random products on home page ?

Thanks. 

I am trying to avoid extensions as much as possible. this widgets seems to do the job. 

I have added 4 different widgets to the page . the only one that actually updates is the second widget other 3 shows the same products regardless of cache time or cache being flushed. 

Also , i added border around images , 2 middle images in each row , their borders are touching each other and i can not figure why .. currently developing on temporary domain , you can visit at 

https://tekwar.ca

 

Re: How to display random products on home page ?


@tonysar wrote:
Tellpizzahut

Hello.

In my magento home page , I have added widget to display items from different categories. 

I chose Catalog product list .

I left the cache life time empty as it should update every 24 hour. however, widget only displays the same items and never seems to update , even if i change the cache time or clear the cache .. i have chosen 4 different categories . is this normal or am i doing something wrong? 

I need to display different products each time cache life ends . any suggestion ?

Thanks


Did it work for you, I still facing some issue.

Re: How to display random products on home page ?

Hey,

 

I think you have to use this Magento2 extension in your sidebar or homepage to display different products to users/visitors/customers every time as per the extension concept. like...

 

1. Most Viewed Products: showcase the most viewed products and easily attract the user’s attention.

 

2. Most Viewed & Sold Product Count: display the number of times viewed products and sold products count on the product page.

 

3. Best Seller Products: shows the best selling product for the store through the slider or grid layout.

 

This idea can solve your problem. This is a different method you can try.

Thank you!

Re: How to display random products on home page ?

You can use widget {{block class="Magento\Catalog\Block\Product\ProductList\Random" template="product/list.phtml" num_products="12"}}

Re: How to display random products on home page ?


That's a very vague request since the placement, theme and existing store are all unknown. The forums are not a code writing service but with more info we might be able to nudge you in the right direction for your website of grunge dresses.

Re: How to display random products on home page ?

That is an extremely obscure solicitation since the situation, subject and existing store are altogether obscure. The discussions are not a code composing administration but rather with more data we could possibly prod you the correct way for your site of grit dresses

Re: How to display random products on home page ?

If you want to view the pages randomly then just run the domain first and now apply / (slash) tippmann a5 review the file or page name which you want to see and if page not runs then simply mention the path of page after slash and then press enter and here we go for the page.