Close

Filter for new group

vedran
11 years ago
#1464 Quote
Avatar
  • 45
I have an extra CategoryTemplate.ProductsInGridOrLines.cshtml.
Name is =DemoCategoryTemplate.ProductsInGridOrLines.

I have an extra _ProductBox.
Name _DemoProductBox
and
I have an extra ProductTemplate.SingleVariant
Name is DemoProductTemplate.SingleVariant

What is the reason that the ajax filter not working.
Is manual installation in
@section nopAjaxFilters
{
        @Html.Action("GetFilters", "NopAjaxFilters")
}

Can see Mushroomslook/recipes

The model item passed into the dictionary is of type 'SevenSpikes.Nop.AjaxFilters.Models.ProductsModel', but this dictionary requires a model item of type 'Nop.Web.Models.Catalog.CategoryModel'.
The details for the log entry.Full message:   System.InvalidOperationException: The model item passed into the dictionary is of type 'SevenSpikes.Nop.AjaxFilters.Models.ProductsModel', but this dictionary requires a model item of type 'Nop.Web.Models.Catalog.CategoryModel'. at System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) at System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) at System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary viewData) at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThu
IvanStoyanov
11 years ago
#1466 Quote
Avatar
  • Moderator
  • 269
Hi verdan,

Create a copy of our view located in Plugins/SevenSpikes.Nop.AjaxFilters/Views/Catalog7Spikes. The copy should be located in the same folder. After that rename the view to DemoCategoryTemplate.ProductsInGridOrLines. Open it and make the same changes to it that you did to the original CategotyTemplate view to create the new Demo view.

Best regards,

Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
vedran
11 years ago
#1468 Quote
Avatar
  • 45
Hi Ivan,

I did according to your instructions. Created view, and made changes in line 18 i 29 in place of _ProductBox I placed _DemoBox
Still not working. Change has, buttons "clean" and "clean all" came.
Current 10 products is always there.
Not showing products by the filter.
Some idea?
Boyko
11 years ago
#1469 Quote
Avatar
  • Moderator
  • 1570
vedran wrote:
Hi Ivan,

I did according to your instructions. Created view, and made changes in line 18 i 29 in place of _ProductBox I placed _DemoBox
Still not working. Change has, buttons "clean" and "clean all" came.
Current 10 products is always there.
Not showing products by the filter.
Some idea?


Hi vedran,

Please note that the Nop Ajax Filters use css selectors to find specific portions of the html and replace it. For example if you want the filters to replace the current products with the new set of filtered products you need to have the products wrapped in the correct css class. I noticed you use a class named .product-gridR for your products on the new category template, so you need to add this new class in the settings of the Ajax Filters in the administration.
You need to set the products grid panel selector like this:
.product-grid, product-gridR

Please refer to the online documentation for the various selectors.

Hope this helps!

Best Regards,
Nop-Templates Support Team
Regards,
Nop-Templates.com Team
vedran
11 years ago
#1471 Quote
Avatar
  • 45
Hi,

Thanks for your help. I hope I'm not boring.
This is progress.

.product-grid, product-gridR or .product-grid, .product-gridRdo not work togheter. One or the other.

Now error is "No Results Found"
There are no products for the filters that you selected. Please widen your search criteria.

Clear and clear all buttons are gone.
vedran
11 years ago
#1474 Quote
Avatar
  • 45
.product-grid , .product-gridR in this combinations work
Boyko
11 years ago
#1475 Quote
Avatar
  • Moderator
  • 1570
vedran wrote:
.product-grid , .product-gridR in this combinations work


Sorry I have made a typo. It should have a dot in the second selector and should be:
.product-grid, .product-gridR

Thanks
Regards,
Nop-Templates.com Team