Hi DW,
I'm trying to get the value of a category field via the API, and i've found a solution which i though would work, but it doesn't.
object type = theEvent.GetCategoryValue( "Events", "ProfileType" );
The above example returns null. but if i do this:
Dynamicweb.eCommerce.Products.Categories.Field f = null;
foreach ( Dynamicweb.eCommerce.Products.Categories.Category cat in theEvent.GetCategories() )
{
if ( cat.Name.Equals( "Events" ) )
{
foreach ( Dynamicweb.eCommerce.Products.Categories.Field field in cat.Fields )
{
if ( field.ID.Equals( "ProfileType" ) )
{
f = field;
}
}
}
}
type = theEvent.GetCategoryValue( "Events", f );
i get out my value.
Shouldn't Product.GetCategoryValue() return the value?
// Martin