Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to pull in all of my merchello products WHERE bestSeller = true, does anybody have any ideas on how I can do this?
Also any good beginner documentation for how search functionality works? I'm having a tough time getting what I need from the readme.io version.
You could try @if (Model.GetPropertyValue<bool>("bestSeller"))
Or, you could create a collection for best sellers then use something similar to the example in FastTrack "Featured Products" to return the products
@foreach (var row in Model.FeaturedProducts.ToArray().Split(3))
@foreach (var fp in row)
To anybody who is wondering the same thing, I didn't realize there is data types that merchello created when I installed it.
If you take a look at the featured products section within the tutorial below it will all make sense
Basically create a field within your home node "merchello product list view" -> go back to your home node and find your new field -> press the 'cog' in the top right and select which collection you want to put in, then you can display it on the homepage using something like this...
@foreach (var fp in Model.Content.GetPropertyValue<IEnumerable<IProductContent>>("bestSellers").Take(8))
<div class="col-lg-3 col-md-4 col-sm-6">
Yours will probably be slightly different but hope I've helped (check the tutorial above for more information!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted