+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / Product Type Errors

Product Type Errors

5 posts, 0 answered
  1. Lev Rosenblit
    Lev Rosenblit avatar
    37 posts
    Registered:
    14 May 2008
    13 Oct 2011
    Link to this post
    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
  2. Lev Rosenblit
    Lev Rosenblit avatar
    37 posts
    Registered:
    14 May 2008
    14 Oct 2011
    Link to this post
    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;
    }

    is there a better way of getting fields of product types? maybe some built-in properties i missed?

    Lev Rosenblit
  3. Venkata Koppaka
    Venkata Koppaka avatar
    67 posts
    Registered:
    24 Sep 2012
    18 Oct 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    04 Nov 2011
    Link to this post
    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,
  5. Venkata Koppaka
    Venkata Koppaka avatar
    67 posts
    Registered:
    24 Sep 2012
    07 Nov 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
5 posts, 0 answered