Close

Profile: ccmok2

Avatar

User posts

6 years ago

Sorry, my fault. It works, but there is another problem. Please redirect to https://www.nop-templates.com/boards/topic/3346/fixed-viewmode

6 years ago

I would like to fix the view mode of one category, but keep other category normally. It causes the ajaxFilter not work. Please help.

I have tried the following conditions, but all does not work:
(1) Change "CatalogPagingFilteringModel.ViewMode = list" at CatalogController; (FAILED);
(2) Without "viewmode-selector", redirect to current url with viewmode=list by javascript (FAILED);

6 years ago

Boyko wrote:

Here are the steps I have taken that have resulted in the error message "Loading the page failed."

Do you see anything wrong with the above steps?

Would you mind trying to do the steps and see if you receive the same error message "Loading the page failed."?


Hi mstuart,

The Ajax Filters use the same category template as the current category. So if your category template is this one CategoryTemplate.ProductsInGridOrLinesFilters.cshtml then you need to have  the same template for the Ajax Filters.
You have to copy and rename the template below to match the name of your category template:
Plugins\SevenSpikes.Nop.AjaxFilters\Views\Catalog7Spikes\CategoryTemplate.ProductsInGridOrLines.cshtml

Then the filters will find the correct template and use it.

Thanks


After adding the template "New Template" at the Catalog7Spikes, it does not work.

In my case:
(1) Added "CategoryTemplate.ProductsInGridOrLines_NEW" at the {THEME}/views. (Theme: Brooklyn);
(2) Added the new template record by the Admin Panel (Configure > Templates > Category Template);
(3) Copy the template files "ajaxfilters/views/Catalog7Spikes/CategoryTemplate.ProductsInGridOrLines.cshtml" and "ajaxfilters/views/Catalog7Spikes/_AjaxFIlters.ProductsInGridOrLines.cshtml"
(4) Rename the new template: "CategoryTemplate.ProductsInGridOrLines_NEW" and "_AjaxFIlters.ProductsInGridOrLines_NEW"
(5) Select one category like "Computer", change the category template to "CategoryTemplate.ProductsInGridOrLines_NEW";
(6) Save

Please advice