Close

MegaMenuCategoryModel -> SubCategories

mel.fahn
7 years ago
#13711 Quote
Avatar
  • 3
Would you please let me know how you are getting the SubCategories for the MegaMenuCategoryModel. I believe the categories themselves are being picked up from CategoryService -> GetAllCategories. I'd like to manipulate (not in razor) the subcategories.

I had subcategories showing, but now I can't duplicate.

Thank you!
SDobrev
7 years ago
#13712 Quote
Avatar
  • 283
Hi,

You are right. We are using the GetAllCategories method of the CategoryService.
Best Regards,
Stoyan Dobrev
Nop-Templates.com
mel.fahn
7 years ago
#13715 Quote
Avatar
  • 3
Thank for your response. That function doesn't include SubCategories. Where are you getting those from?
SDobrev
7 years ago
#13716 Quote
Avatar
  • 283
Hi,

We are filtering All Categories by parentCategoryId to get the Sub Categories of some category.
Best Regards,
Stoyan Dobrev
Nop-Templates.com
mel.fahn
7 years ago
#13717 Quote
Avatar
  • 3
Thanks, are you getting the subcategories via your own database call or using nop core code? If, nop, what function? Thanks!
SDobrev
7 years ago
#13718 Quote
Avatar
  • 283
Hi,

We are using the nopCommerce GetAllCategories method to get all categories and then we are using our own code (recursion) to build the subcategories.
Best Regards,
Stoyan Dobrev
Nop-Templates.com