- 4
There appears to be a bug where Prisma doesn't seem to properly support alternate category templates. I duplicated the Themes\Prisma\Views\Catalog\CategoryTemplate.ProductsInGridOrLines.cshtml and renamed it to Themes\Prisma\Views\Catalog\CategoryTemplates.ProductsInGridOrLinesNoSubcategory.cshtml. I also commented out the subcategory code in the new template and assigned it to my categories in NopCommerce.
On the first page load, I don't see the subcategories as I expect, but when try to page over to the next page, I get the message "Loading the Page Failed." NopCommerce's error log entry shows:
The model item passed into the ViewDataDictionary is of type 'SevenSpikes.Nop.Plugins.AjaxFilters.Models.ProductsModel', but this ViewDataDictionary instance requires a model item of type 'Nop.Web.Models.Catalog.CategoryModel'.
The following is also logged:
The view 'CategoryTemplate.ProductsInGridOrLinesNoSubcategory' was not found. The following locations were searched:
....
I suspect the pager isn't cooperating with NopCommerce's paging mechanism. Is there a way to fix this problem, or does selectable category templates not supported?
On the first page load, I don't see the subcategories as I expect, but when try to page over to the next page, I get the message "Loading the Page Failed." NopCommerce's error log entry shows:
The model item passed into the ViewDataDictionary is of type 'SevenSpikes.Nop.Plugins.AjaxFilters.Models.ProductsModel', but this ViewDataDictionary instance requires a model item of type 'Nop.Web.Models.Catalog.CategoryModel'.
The following is also logged:
The view 'CategoryTemplate.ProductsInGridOrLinesNoSubcategory' was not found. The following locations were searched:
....
I suspect the pager isn't cooperating with NopCommerce's paging mechanism. Is there a way to fix this problem, or does selectable category templates not supported?