Close

Profile: clubfredd

Avatar

User posts

Figured it out.
Based it on Boyko's solution from way back using foreach instead of the DataTable helper method.

Hi there,

On CategoryMenuTemplate.WithPictures.cshtml, the code shows the Category > Subcategory > Sub-subcategory (basically, grandchildren):


@if (Model.CategoriesModels.Count > 0)
{
   ...
   foreach (var category in Model.CategoriesModels)
   {
   ...
      @if (category.SubCategories.Count > 0)
      {
      ...

@foreach (var subCategory1 in item.SubCategories.Take(megaMenuSettings.NumberOfCategories))
                            {
                                <li><a href="@Url.RouteUrl("Category", new { SeName = subCategory1.CategoryModel.SeName })" title="@subCategory1.CategoryModel.Name">
                                    @subCategory1.CategoryModel.Name</a>
                                </li>
                            }
      ...
      }

   ...
   }

...
}


On CategoryMenuTemplate.Responsive.cshtml, it only shows Category > Subcategories only. How can I insert the code above into CategoryMenuTemplate.Responsive.cshtml to show grandchildren?

Thank you!

11 years ago

Thanks Boyko.

11 years ago

Hi Boyko,

Thanks for you help on the previous post. I'm posting it here because I think it's appropriate since you helped me out with the foreach method.

On the CategoryMenuTemplate.WithPictures.cshtml:


<div class="dropdown categories fullWidth [email protected]">
                        @(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(category.SubCategories, 4, "row", "box",
                                    @<text>


I would like to show child subcategories and all grandchild subcategories for each child category on the dropdown. The code above does this, but would like to use the foreach method as well.

Again, I appreciate all your help!

11 years ago

You are a genius! Thank you so much!

11 years ago

Boyko wrote:
Hi,

Sure it is possible. You can change the markup to whatever you want. You can simply add the category id as a class to each dropdown and then style them via these additional classes.

Best Regards,
Nop-Templates.com Support Team


Hey Boyko,

I'm a bit lost. Can you give me an example? I also need the subcategories associated with the category to show up the same.

Thanks for all your help!


11 years ago

Hi there,

In CategoryMenuTemplate.WithPictures.cshtml, is it possible to call each individual category (say by ID or name)?


@(Html.DataTable<SevenSpikes.Nop.Plugins.MegaMenu.Models.MegaMenuCategoryModel>(category.SubCategories, 4, "row", "box",
                                    @<text>


I need to style each dropdown differently. I got help with removing some divs a couple of months back by using foreach instead of the Data Table helper method (thanks Boyko - http://www.nop-templates.com/boards/topic/595/full-browser-width#2947) which gave me more flexibility in styling, but now I need to call categories individually instead of a foreach.

Thanks for any help.

Cheers!

11 years ago

Hi all,

We have a 3rd party customize our nop template and one of the functionalities that they made to the site somewhat ties in with the plugin.

If I disable the plugin, the customization is also disabled.

I just want to know how to disable the default zoom/pan function when you mouseover the product image.

Thanks in advance.

Cheers!

11 years ago

Excellent! It most definitely does.
Thank you so much.

Header links
11 years ago

Thank you