I want to create a dynamic collection which I can populate based of values in a product. At the moment Im just looking to create a collection which shows 'Available' products, as thats a 'standard' product value.
Im looking a the example one from the online documents, but the example is for invoices (using teh invoice service) and the one Im building is for products.
The Methods in the product service do not marry up very well with the ones int the invoice service, so I cant seem to get what I need. Is there any examples of a Dynamic Product Collection out there?
Anyone? Do I need to extend the products service? I dont really want to tinker to much in there, especially if Im just doing something simple wrong?
I just want to create a dynamic collection base on whether a product is 'Available' or not? Surely it cant be that hard as I would expect people to want dynamic collections based on size or cost etc..
Can nobody help? I just want to create a simple Dynamic product collection, for example if I wanted all products that were blue.
Ive looked through all the git code and the only product providers to follow are static ones, when I try and use the Product service it complains that none of teh methods are available! for example if says the method 'GetKeysFromCollection isnt available, but your using it in the git solution??
Ive tried building the core dll and using that but still nothing?
I am too trying to create dynamic collections in the back-end, so editors can see products attached to a specific content type. The documentation on the sales collections (https://merchello.readme.io/docs/sales-collections) isn't very helpfull for creating product collections indeed!
I'm using Umbraco 7.6 and Merchello 2.6, so far I've added the following in merchello.config:
And created the provider DynamicProductContentTypeProductCollectionProvider:
[EntityCollectionProvider("FC26B245-7CDD-411E-84BE-B3CE2911E22B", "9F923716-A022-4089-A110-1E9B4E1F2AD1", "Machines & materials", "A dynamic collection queries for products associated with a specified product content type.", true)]
public class DynamicProductContentTypeProductCollectionProvider : CachedQueryableEntityCollectionProviderBase<IProduct>
{
// Using default implementation (NotImplementedException)
}
A new tree node Machines & materials is added below Products, but none of the provider methods are invoked, the URL of the node has a different key /umbraco/#/merchello/merchello/productlist/2610eec0-c28f-4257-957b-9ff32f7ccd0c and the XHR request just returns an empty JSON response ({"currentPage":1,"itemsPerPage":10,"totalPages":0,"totalItems":0,"items":[]})!
The provider Tony wants and the one I've tried to create both filter on a single (static) value, but would it also be possible to create a provider that shows filters for multiple values (e.g. all product content types)?
This should work like the built-in collections, but populate filters based on dynamic data (not directly managed by the user). Any ideas?
Dynamic Collection
I want to create a dynamic collection which I can populate based of values in a product. At the moment Im just looking to create a collection which shows 'Available' products, as thats a 'standard' product value.
Im looking a the example one from the online documents, but the example is for invoices (using teh invoice service) and the one Im building is for products.
The Methods in the product service do not marry up very well with the ones int the invoice service, so I cant seem to get what I need. Is there any examples of a Dynamic Product Collection out there?
Anyone? Do I need to extend the products service? I dont really want to tinker to much in there, especially if Im just doing something simple wrong?
I just want to create a dynamic collection base on whether a product is 'Available' or not? Surely it cant be that hard as I would expect people to want dynamic collections based on size or cost etc..
Can nobody help? I just want to create a simple Dynamic product collection, for example if I wanted all products that were blue.
Ive looked through all the git code and the only product providers to follow are static ones, when I try and use the Product service it complains that none of teh methods are available! for example if says the method 'GetKeysFromCollection isnt available, but your using it in the git solution??
Ive tried building the core dll and using that but still nothing?
((ProductService)this.MerchelloContext.Services.ProductService).GetKeysFromCollection( this.CollectionKey, page, itemsPerPage, sortBy, sortDirection);
Hi Tony
Did you ever get this sorted?
Thanks, Sam
I am too trying to create dynamic collections in the back-end, so editors can see products attached to a specific content type. The documentation on the sales collections (https://merchello.readme.io/docs/sales-collections) isn't very helpfull for creating product collections indeed!
I'm using Umbraco 7.6 and Merchello 2.6, so far I've added the following in
merchello.config
:And created the provider
DynamicProductContentTypeProductCollectionProvider
:A new tree node Machines & materials is added below Products, but none of the provider methods are invoked, the URL of the node has a different key
/umbraco/#/merchello/merchello/productlist/2610eec0-c28f-4257-957b-9ff32f7ccd0c
and the XHR request just returns an empty JSON response ({"currentPage":1,"itemsPerPage":10,"totalPages":0,"totalItems":0,"items":[]}
)!Maybe @rustyswayne could pitch in here!
The provider Tony wants and the one I've tried to create both filter on a single (static) value, but would it also be possible to create a provider that shows filters for multiple values (e.g. all product content types)?
This should work like the built-in collections, but populate filters based on dynamic data (not directly managed by the user). Any ideas?
Any ideas how to create a collection provider that lists/filters products based on product content type?
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.