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.

  • Tony Kiernan 278 posts 341 karma points
    Oct 06, 2011 @ 11:32
    Tony Kiernan
    0

    "@using UCommerce.Xslt;" Not being recognised

    Trying to build a store using razor scripts I've used several times before.  For some reason, it's not recognising the assemblies I'm referencing.

    For example, this:

    @using UCommerce.Xslt;
    @{
    string url = Library.GetNiceUrlForCatalog("27");
    @url
    }

    Throws the error:

    'umbraco.MacroEngines.Library.RazorLibraryCore' does not contain a definition for 'GetNiceUrlForCatalog'

    The script is trying to use the Umbraco.Library and not the specified uCommerce assembly. This works, so it's definitely there

    @{
    string url = UCommerce.Xslt.Library.GetNiceUrlForCatalog("27");
    @url
    }

    As mentioned, these work fine on other shops.  Any suggestions as to why this could be?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 06, 2011 @ 12:54
    Dirk De Grave
    0

    I guess there's class name conflicts with other 'Library' classes, so you could add this one on top

    @using lib = UCommerce.Xslt.Library;

    and then use

    lib.GetNiceUrlForCatalog("27');

     

    Hope this helps.

    Regards,

    /Dirk

  • Tony Kiernan 278 posts 341 karma points
    Oct 06, 2011 @ 13:47
    Tony Kiernan
    0

    Yeah, that works. 

    Damn strange it's fine in my other stores

Please Sign in or register to post replies

Write your reply to:

Draft