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.

  • Terry Clancy 204 posts 944 karma points
    May 14, 2015 @ 08:55
    Terry Clancy
    0

    uCommerce type or namespace name 'category' could not be found

    I am creating a uCommerce Catalog page in Umbrac  using the Razore Store Demo, except I am doing it in MVC.

    I have included the following lines

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>

    <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>

    <script src="/scripts/ucommerce.bootstrap.js"></script>

    <script src="/scripts/ucommerce.servicestack.js"></script>

    <script src="/scripts/ucommerce.jquery.js"></script>

    <script src="/scripts/ucommerce.demostore.js"></script>

    <script src="/scripts/uCommerce.facets.js"></script>

    @using UCommerce.Api

    @using UCommerce.EntitiesV2

    @using UCommerce.Extensions

    @using UCommerce.Runtime

     

    But the following line, is giving me the error below:


    @helper RenderNavigation(ICollection<category> categories, Category currentCategory)

     

     

     

     

     

     

    Server Error in '/' Application.

    Compilation Error


    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0246: The type or namespace name 'category' could not be found (are you missing a using directive or an assembly reference?)

    Source Error:

     
    Line 16: @using UCommerce.Extensions
    Line 17: @using UCommerce.Runtime
    Line 18: @helper RenderNavigation(ICollection<category> categories, Category currentCategory)
    Line 19:     {
    Line 20:     if (!categories.Any())


    Source File: c:\Clancy\A_TeraTastic\Dev\ClancyCom8\ClancyCom8\Views\Partials\ttuc_LeftNavigation.cshtml    Line: 18

     

     

     

    I am not sure what else I need to include so that the type or namespace name  "category" can be found ?

     

     

     

    Any assistance would be very much appreciated.


    Thanks


    Terry Clancy

    ClanceZ

     

     

     

     

     

     

     

     

     

  • Martin 181 posts 740 karma points
    May 14, 2015 @ 10:03
    Martin
    0

    Hi Terry,

    In your LeftNavigation try to include the following using

    @using UCommerce.EntitiesV2

    best regards Martin

  • Terry Clancy 204 posts 944 karma points
    May 15, 2015 @ 06:48
    Terry Clancy
    0

    Thanks Martin,

     

         However, I created a partial view ( "ttuc_LeftNavigation.cshtml" ) which contains both:

        @using UCommerce.EntitiesV2

        and the line creating the error, ie: " @helper RenderNavigation(ICollection<category> categories, Category currentCategory) "

      So it looks like I am already doing what you are suggesting - but the error still occurs ?

        Am I missing something or do you have any further thoughts or suggestions ??


        Thanks again,

     

    Terrry Clancy

    ClanceZ

     

  • Terry Clancy 204 posts 944 karma points
    May 15, 2015 @ 07:12
    Terry Clancy
    101

    Nevermind - for reasons unknown, when I copied the code into my partial view

    Line 18: @helper RenderNavigation(ICollection<Category> categories, Category currentCategory)

    got changed to


    @helper RenderNavigation(ICollection<category> categories, Category currentCategory)

    Note that the "C" in category was changed to a lower case "c" - that was the problem.

    Thanks

     

     

Please Sign in or register to post replies

Write your reply to:

Draft