Close

Profile: nicwinkri

Avatar

User posts

10 years ago

Hi There

I have a JCarousel which uses "homepageFeaturedProducts" as datasource.

What I want to achive is getting the results random sorted. I found a general solution for this her:
http://www.nopcommerce.com/boards/t/12051/main-page-featured-products-question.aspx?p=2

the part

  @foreach (var item in Model.OrderBy(x => Guid.NewGuid()).Take(6))


seemed straight forward, but... in neoFashion theme the foreach loop is replaced with  

@(Html.DataList7Spikes<ProductOverviewModel>(Model, 4,
            @<div class="item-box">
                @Html.Partial("_ProductBox", item)
            </div>


How do I get to do a orderBy here?

Best Regards :-)
Nicolai