PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 4/19/2021 2:18 PM by  Will Strohl
How to show random products
 3 Replies
 1 Subscribed to this topic
 1 Subscribed to this forum
Sort:
You are not authorized to post a reply.
Author Messages





Advanced Member






--
4/15/2021 4:44 AM
    Is there any way to show random products?





    Veteran Member






    --
    4/15/2021 11:30 AM
    In which view? Also, you saying just random in general, or random on every page load?
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    Advanced Member






    --
    4/19/2021 4:54 AM
    Random in every page load. I'm looking among available modules one able to do it, but if I can do it through the view that's okay





    Veteran Member






    --
    4/19/2021 2:18 PM
    Yes, you can do this in the view. Depending on the exact user experience (and specific view), you'd either need to apply a Razor or client-side approach.

    Here is an example of how to randomize an array server-side: https://www.codegrepper.c...p/shuffle+array+c%23
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes
    You are not authorized to post a reply.


    Loading
    • Sign-up for the Hotcakes Community Newsletter: