Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
gospodinwizard

Block New Products

Question

I currently have Block New Products set to display 12 products, but I have more than 12 new products.  I would like to know if there is a way to randomly select the 12 products (or at least pseudo-random).  I see no space in the configuration for Block New Products that allows for randomization.  Thanks in advance.

newproducts.JPG

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

you have to change logic in module which provide table of products to display in frontend.

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, cienislaw said:

you have to change logic in module

Yes, it should be this way. Actually the selection is generated in `Product::getNewProducts()` in classes/Product.php.

To keep core code unchanged, one could request a larger number there, then do a random selection in the module.

Share this post


Link to post
Share on other sites
  • 0
On 5/20/2020 at 2:27 AM, Traumflug said:

Yes, it should be this way. Actually the selection is generated in `Product::getNewProducts()` in classes/Product.php.

To keep core code unchanged, one could request a larger number there, then do a random selection in the module.

Thank you very much for the guidance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...