The dimensions are not stored in the ExtendedDataCollection, they are proper properties on IProduct and are also exposed on ProductDisplay and IProductContent.
If your going to do it through detached content, I think I might create a custom DataType and respective PropertyValueConverter so that you don't have to interact directly with the "detachedValues" higher up in the stack.
This would allow you to return a typed model in the IProductContent property associated with the new DataType.
Search for Extended data
Hi All,
How can I search for products in Merchello using extended data.
Ex.
I have the following extended data on products.
How can I do a search on them, say get all products with a length > 500?
Thanks in advance for your help.
Hi Supun,
The dimensions are not stored in the ExtendedDataCollection, they are proper properties on IProduct and are also exposed on ProductDisplay and IProductContent.
Hi Rusty,
Thanks for the reply.
Unfortunately we have them as extended properties with some other fields :(.
As a workaround, I'm the doing it the following way which is not very efficient.
And inside the CompareSize I do the following:
And so on, another requirement is that the search should pick up products with what ever pattern the user entered them on.
ie:
W -> W, H->H, L->L and also W->H, H->W, L->L and other permutations.
Thanks for your help in advance.
Hey Supun,
If your going to do it through detached content, I think I might create a custom DataType and respective PropertyValueConverter so that you don't have to interact directly with the "detachedValues" higher up in the stack.
This would allow you to return a typed model in the IProductContent property associated with the new DataType.
Thanks Rusty, I'll give it a go. If it's not too much trouble can you give me a pointer as to how to associate it with a Merchello Product?
Sure thing Supun,
You would associate your property with a Merchello product by adding it to a document type that is used to extend the Merchello Product.
https://merchello.readme.io/docs/product-content-types
Thanks Rusty, will give it a go.
Cheers.
is working on a reply...