Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jan 08, 2013 @ 16:19
    Matt Brailsford
    0

    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

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 09, 2013 @ 11:30
    Søren Spelling Lund
    100

    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.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jan 09, 2013 @ 11:34
    Matt Brailsford
    0

    Hi Soren, I was affraid that would be the answer :), but thanks for confirming it.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 09, 2013 @ 11:51
    Søren Spelling Lund
    0

    Bonus info: I'm looking into making the link more robust.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jan 09, 2013 @ 11:53
    Matt Brailsford
    0

    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.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 09, 2013 @ 11:56
    Søren Spelling Lund
    0

    Agreed.

Please Sign in or register to post replies

Write your reply to:

Draft