How to get to Umbraco DataType from UCommerce DataType with IsBuiltIn set to false
Hi,
I have a field defined on a product which for the datatype uses a built in umbraco datatype. Now, I'm trying to build a dynamic filter for the products, so I need to get access to the data types prevalues, however, from the ucommerce DataType instance, I can't for the life of me see how I would get to the umbraco DataType.
uCommerce doesn't deal with pre values yet so you have to use the Umbraco API to get at the pre values of the data type. ATM the link between the uCommerce data type and the Umbraco one is created based on the name so that's the only thing you have to work with right now.
That would be cool. The only problem with doing it via the name is that there isn't really a nice way in Umbraco to get a datatype definition by it, I'm currently having to retreive them all and then filter them, which isn't as efficient as getting it direct by id.
How to get to Umbraco DataType from UCommerce DataType with IsBuiltIn set to false
Hi,
I have a field defined on a product which for the datatype uses a built in umbraco datatype. Now, I'm trying to build a dynamic filter for the products, so I need to get access to the data types prevalues, however, from the ucommerce DataType instance, I can't for the life of me see how I would get to the umbraco DataType.
Anybody got any ideas?
Cheers
Matt
Hi Matt,
uCommerce doesn't deal with pre values yet so you have to use the Umbraco API to get at the pre values of the data type. ATM the link between the uCommerce data type and the Umbraco one is created based on the name so that's the only thing you have to work with right now.
Hi Soren, I was affraid that would be the answer :), but thanks for confirming it.
Bonus info: I'm looking into making the link more robust.
That would be cool. The only problem with doing it via the name is that there isn't really a nice way in Umbraco to get a datatype definition by it, I'm currently having to retreive them all and then filter them, which isn't as efficient as getting it direct by id.
Agreed.
is working on a reply...