Get Merchello Product List View GUID (not actual products)
I'm building up a sub menu of product categories as defined by "Product Collection" nodes. Ie, under the store I have nested product collection pages that have the Merchello Product List View datatype on them to pick collections.
Is there a way in code to retrieve the collection GUID on the current node instead of the actual products in the collection?
Eg prodCollectionPage.Products returns IEnumerable<IProductContent> but I want the associated collection guid.
Worst case, I'll add a save event and save off the Guid into another field that I can access.
Get Merchello Product List View GUID (not actual products)
I'm building up a sub menu of product categories as defined by "Product Collection" nodes. Ie, under the store I have nested product collection pages that have the Merchello Product List View datatype on them to pick collections.
Is there a way in code to retrieve the collection GUID on the current node instead of the actual products in the collection?
Eg
prodCollectionPage.Products returns IEnumerable<IProductContent>
but I want the associated collection guid.Worst case, I'll add a save event and save off the Guid into another field that I can access.
Thanks Trevor
Hey Trevor,
Read through this and see if you can get it. Basically you want to override the default property value converter ...
https://our.umbraco.org/projects/collaboration/merchello/merchello/76241-get-umbraco-content-on-a-product-page
Beautiful! Extending PublishedContent with GetDataValueAsGuid was exactly what I was after. Works really well.
Thanks Rusty.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.