There is a data type (Merchello Product List View) which is intended to be added to your category content pages. The property value converter returns IEnumerable<IProductContent> for the collection. The value stored in the content is the Key (GUID) for the entity collection ...
If you want to work with your product collections directly, you can either use the EntityCollectionService or merchelloHelper.Query.Product.GetFromCollection (overloads)
I made a collection Motor in Merchello and then linked one product to that collection. I've created a product list view data type and selected to show only the Motor collection in that list view.
But then I don't receive the Motor product.
I've already did some debugging and when I look at the results of
I've got it working for the collections. But on my root page of the shop I want to show all collections and products.
When I do
foreach (IProductContent productContent in Model.Content.GetPropertyValue<IEnumerable<IProductContent>>("listView"))
on the root page, then the result is empty and I get an object refence not set to an instance of an object.
When I go to a collection page, everything is fine.
So selecting all collections for the list view is not returning anything on my root page, but when I go to a collection page the different products for that collection are shown.
Hi, I need to access the collection that the product list view is pulling from in order to get filter groups, number of products in a collection, etc. Has anyone figured out how to get the collection key from the selected collection in the product list veiw?
How to get collections (categories)
Hi,
I have some collections in Merchello where I categorize my products.
I want to achieve something like this:
I succeeded to make the collections and linked the products to the different collections, but now I want to access them in my front-end.
How can I achieve that? I already checked merchelloHelper.Query.Products but there is no collections property available.
I hope I don't have to make the full category structure in Umbraco, because I then have to do things twice.
Is there an easy way to access all my collections in Merchello?
Thanks for your help.
There is a data type (Merchello Product List View) which is intended to be added to your category content pages. The property value converter returns
IEnumerable<IProductContent>
for the collection. The value stored in the content is the Key (GUID) for the entity collection ...If you want to work with your product collections directly, you can either use the
EntityCollectionService
ormerchelloHelper.Query.Product.GetFromCollection
(overloads)Hi,
Sorry for the late response.
I'm trying out IEnumerable
I made a collection Motor in Merchello and then linked one product to that collection. I've created a product list view data type and selected to show only the Motor collection in that list view. But then I don't receive the Motor product.
I've already did some debugging and when I look at the results of
I get 'The function evaluation requires all threads to run' and it skips the foreach I'm doing to read out the name of the product.
What could be the problem here?
Here is my full foreach code:
Can you confirm your product is set to render?
In your content, for your listView property, look at the Render column - it should have a check mark:
If it is not checked, you need to check to make certain your product is "available for purchase".
If it is available, check the render tab on extended content to make sure the product has the "Allow this content to be rendered" check box checked.
I've got it working for the collections. But on my root page of the shop I want to show all collections and products.
When I do
on the root page, then the result is empty and I get an object refence not set to an instance of an object. When I go to a collection page, everything is fine.
So selecting all collections for the list view is not returning anything on my root page, but when I go to a collection page the different products for that collection are shown.
What could be the problem?
In the same idea. Do we have a way to rapidly found all categories belong to one product?
Hi, I need to access the collection that the product list view is pulling from in order to get filter groups, number of products in a collection, etc. Has anyone figured out how to get the collection key from the selected collection in the product list veiw?
Hi PierreD
This is how I get product collections
var merchelloHelper = new MerchelloHelper(); var collections = merchelloHelper.Collections.Product.GetAll().Where(c=>c.ParentKey == null && c.Name != "Featured Products").ToList();
Hope it helps
Cheers, Nick
is working on a reply...