Product Type Errors
Hi,
I've created some custom product types, and i'm getting some errors:
1) I want to make some of the default fields of this custom product type invisible - so i change the field appearance to 'Nowhere'. when i save it, sometimes it works ok, but on some fields it freezes and displays: "Unkown DB mapping".
2) when i delete the built in product types: 'mp3', 'book', etc. the db tables still exist and in products there are still links for creating 'a book...', 'a mp3..' etc.
Lev Rosenblit
Hi Again,
another question is how can we retrieve the custom fields we set in the custom product types?
currently I use code (that ProductDynamicFields widget uses) as an extension method for Product:
public static object GetDynamicField(this Product product, string fieldName)
var properties = TypeDescriptor.GetProperties(product);
var metafieldPropertyDescriptor = properties.Find(fieldName, true) as MetafieldPropertyDescriptor;
object @value = metafieldPropertyDescriptor.GetValue(product);
return @value;
Hi Lev Rosenblit,
The code sample you provided below is exactly how you would access product custom fields. I want to thank you for sharing the sample with the rest of the community.
Regarding the errors that you ran into -
1)"Unknown DB mapping" error is a known issue with Product Types which we have logged in our PITS
system.
2) I was not able to reproduce your issue completely. I noticed that the database tables of product types still exist although the product type is deleted but as soon as I deleted the product type the links for create a.. did go away. Please provide me with more information to debug your issue.
Regards,
Venkata Koppaka
the Telerik team
Just wondering if the unknown db mapping issue has been resolved with 4.3 and if not where is it in Pits. I couldn't find it. If it has been resolved, do we need to do anything with our custom modules?
Thanks,
Hello Kmac,
The issue has not been resolved for 4.3 release. Here is a PITS link for the bug.
I apologize for any inconvienece caused.
Best wishes,
Venkata Koppaka
the Telerik team