[Skip to main content](#vessel-content)

#   latest products maodule within a time range

##

- **[Arathol](/forum/user/3260-arathol "View Arathol's Profile")**
- [![Arathol's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3260-arathol "View Arathol's Profile") Topic Author
- [ Offline](/forum/user/3260-arathol)

Less More

- Posts: 37
- Thank you received: 1
-
-

14 years 11 months ago [\#29817](#29817) by [Arathol](/forum/user/3260-arathol "View Arathol's Profile")  *[latest products maodule within a time range](/forum/4-how-to/29817-latest-products-maodule-within-a-time-range#29817 "A little info first:  I have a latest products module on my home page showing 4 products I have it set &quot;Ordering field = Product Created&quot; I have set &quot;Random Items = yes&quot;  The reason i do this is because i want the latest products to change when a user visits the site.  Now i have just added new products and i want it to randomise the products display in the module for today's added products only but it still randomises between the older products as well.  The question: Is there a way to tell the module to only randomise latest products within a time range (ie: yesterday till today) so that it doesnt include all the other really old products in the module? Or perhaps randomise a quantity of lastest products. So only use the last 20 latest products, so at least it will show the 4 on the home page and change everytime between the 20 products.  If that is not possible, could you possibly suggest another way to do it?  Thanks!")* was created by *[Arathol](/forum/user/3260-arathol "View Arathol's Profile")*

**A little info first:**

I have a latest products module on my home page showing 4 products
I have it set "Ordering field = Product Created"
I have set "Random Items = yes"

The reason i do this is because i want the latest products to change when a user visits the site.

Now i have just added new products and i want it to randomise the products display in the module for today's added products only but it still randomises between the older products as well.

**The question:**
Is there a way to tell the module to only randomise latest products within a time range (ie: yesterday till today) so that it doesnt include all the other really old products in the module?
Or perhaps randomise a quantity of lastest products. So only use the last 20 latest products, so at least it will show the 4 on the home page and change everytime between the 20 products.

If that is not possible, could you possibly suggest another way to do it?

Thanks!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI5ODE3LWxhdGVzdC1wcm9kdWN0cy1tYW9kdWxlLXdpdGhpbi1hLXRpbWUtcmFuZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86308
- Thank you received: 14273
-
-

14 years 11 months ago [\#29837](#29837) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: latest products maodule within a time range](/forum/4-how-to/29817-latest-products-maodule-within-a-time-range#29837 "A little info first:  I have a latest products module on my home page showing 4 products I have it set &quot;Ordering field = Product Created&quot; I have set &quot;Random Items = yes&quot;  The reason i do this is because i want the latest products to change when a user visits the site.  Now i have just added new products and i want it to randomise the products display in the module for today's added products only but it still randomises between the older products as well.  The question: Is there a way to tell the module to only randomise latest products within a time range (ie: yesterday till today) so that it doesnt include all the other really old products in the module? Or perhaps randomise a quantity of lastest products. So only use the last 20 latest products, so at least it will show the 4 on the home page and change everytime between the 20 products.  If that is not possible, could you possibly suggest another way to do it?  Thanks!")*

Hi,

There is no option to do what you want.

If you really want to do that, you will need to create a hikashop plugin and implement the event onBeforeProductListingLoad(&amp;$filters) in it to define some filters for that module's products listing MySQL query.
However, it's not easy to understand and require PHP skills.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI5ODE3LWxhdGVzdC1wcm9kdWN0cy1tYW9kdWxlLXdpdGhpbi1hLXRpbWUtcmFuZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Arathol](/forum/user/3260-arathol "View Arathol's Profile")**
- [![Arathol's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/3260-arathol "View Arathol's Profile") Topic Author
- [ Offline](/forum/user/3260-arathol)

Less More

- Posts: 37
- Thank you received: 1
-
-

14 years 11 months ago [\#29842](#29842) by [Arathol](/forum/user/3260-arathol "View Arathol's Profile")  Replied by *[Arathol](/forum/user/3260-arathol "View Arathol's Profile")* on topic *[Re: latest products maodule within a time range](/forum/4-how-to/29817-latest-products-maodule-within-a-time-range#29842 "A little info first:  I have a latest products module on my home page showing 4 products I have it set &quot;Ordering field = Product Created&quot; I have set &quot;Random Items = yes&quot;  The reason i do this is because i want the latest products to change when a user visits the site.  Now i have just added new products and i want it to randomise the products display in the module for today's added products only but it still randomises between the older products as well.  The question: Is there a way to tell the module to only randomise latest products within a time range (ie: yesterday till today) so that it doesnt include all the other really old products in the module? Or perhaps randomise a quantity of lastest products. So only use the last 20 latest products, so at least it will show the 4 on the home page and change everytime between the 20 products.  If that is not possible, could you possibly suggest another way to do it?  Thanks!")*

Ah... Thats unfortunate. Thanks for your help though.

Perhaps you could add it to you suggestion list for implementation ![;)](/media/kunena/emoticons/11.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI5ODE3LWxhdGVzdC1wcm9kdWN0cy1tYW9kdWxlLXdpdGhpbi1hLXRpbWUtcmFuZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86308
- Thank you received: 14273
-
-

14 years 11 months ago [\#29867](#29867) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: latest products maodule within a time range](/forum/4-how-to/29817-latest-products-maodule-within-a-time-range#29867 "A little info first:  I have a latest products module on my home page showing 4 products I have it set &quot;Ordering field = Product Created&quot; I have set &quot;Random Items = yes&quot;  The reason i do this is because i want the latest products to change when a user visits the site.  Now i have just added new products and i want it to randomise the products display in the module for today's added products only but it still randomises between the older products as well.  The question: Is there a way to tell the module to only randomise latest products within a time range (ie: yesterday till today) so that it doesnt include all the other really old products in the module? Or perhaps randomise a quantity of lastest products. So only use the last 20 latest products, so at least it will show the 4 on the home page and change everytime between the 20 products.  If that is not possible, could you possibly suggest another way to do it?  Thanks!")*

Sure.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzI5ODE3LWxhdGVzdC1wcm9kdWN0cy1tYW9kdWxlLXdpdGhpbi1hLXRpbWUtcmFuZ2U/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.123 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
