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.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Dec 18, 2012 @ 14:21
    David Brendel
    0

    GetNiceUrlForVariant Error

    Hey all,

    i'm getting a little error when trying to call the GetNiceUrlForVariant Method. It says that EntitiesV2.Product has no method get_ParentProductId(). I don't know why.

    Calling the function like this:

    foreach(var variant in variants)
    {
        string url = "/shop";
        url += CatalogLibrary.GetNiceUrlForVariant(variant, currentCategory, currentCategory.ProductCatalog);
        <a href="@url" title="@variant.Name" data-slide="@i" style="border:1px solid black;" class="variant_toggle">&nbsp;</a>
        i += 1;
    }

    "variants" is a list with all variants from my current product.

    Using uCommerce 3.0.0.12320.

    Any help welcome!

    David B.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 21, 2012 @ 13:28
    Søren Spelling Lund
    100

    Hi David,

    The method get_ParentProductId was remove in uCommerce 3. It would seem that you might have old DLLs from uCommerce 2 mixed with new ones.

    You can test if by replacing the uCommerce DLLs in your /bin folder with the ones from the zip files containing uCommerce 3.

    I've had it happen a couple of times and usually the culprit is some sort of automatic deployment of the solution to the web server, which also includes the references uCommerce DLLs from the Visual Studio project.

    Hope this helps.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Dec 28, 2012 @ 15:12
    David Brendel
    1

    Hi Soren,

     

    i think you had the right idea. Replaced the DLL, infact i reinstalled uCommerce and now everything works as expected.

    Thanks for the help.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 02, 2013 @ 14:28
    Søren Spelling Lund
    0

    Excellent. Thanks for being awesome and posting a follow-up here!

Please Sign in or register to post replies

Write your reply to:

Draft