Close

Widget Zone Ajax Filters For Custom View

cicciuzzo
11 years ago
#3763 Quote
Avatar
  • 34
Hi

i developed a simple view and i needed of insert a widget zone for to position same element in that zone.

I selected a new widget zone in admin panel but this widget don't work ..

I add the widget zone

<?xml version="1.0" encoding="utf-8" ?>
<SupportedWidgetZones>
  <WidgetZone>left_side_column_before</WidgetZone>
  <WidgetZone>left_side_column_after</WidgetZone>
  <WidgetZone>rigth_side_column_search_product</WidgetZone>
</SupportedWidgetZones>



how i doing that?

hi
Support
11 years ago
#3766 Quote
Avatar
  • Moderator
  • 1044
cicciuzzo wrote:
Hi

i developed a simple view and i needed of insert a widget zone for to position same element in that zone.

I selected a new widget zone in admin panel but this widget don't work ..

I add the widget zone

<?xml version="1.0" encoding="utf-8" ?>
<SupportedWidgetZones>
  <WidgetZone>left_side_column_before</WidgetZone>
  <WidgetZone>left_side_column_after</WidgetZone>
  <WidgetZone>rigth_side_column_search_product</WidgetZone>
</SupportedWidgetZones>



how i doing that?

hi


Hi,

As far as I understand you want to display the Ajax Filters in the rigth_side_column_search_product widget zone that you have added to the SupportedWidgetZones.xml file.If this is the case you need to have a call to the widget for this zone. So in the view that you want to display this, you need to have the following
@Html.Widget("rigth_side_column_search_product").

Hope that helps!
cicciuzzo
11 years ago
#3769 Quote
Avatar
  • 34
hi this my view, but this don't work... you can help me?

@{
    ViewBag.Title = "Search";
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}

@using Nop.Core.Domain.Seo;
@using Nop.Core.Infrastructure;
@using Nop.Web.Models.Catalog;
@using Nop.Web.Extensions;

<div class="page category-page">
     <div class="page-body">
     <div class="service-search-main">
          <div class="service-top-left">
              <h1>Search by model number</h1>
              <div class="model">Model number: <br /> @Html.Action("SearchBox", "Catalog") </div>
              <img src="~/Themes/DWT-Green/Content/images/SearchProduct.png" />
              <h3>Search informations</h3>
              <p>
                 Our prodcuts are identified by a model number.  The model number consist <br /> of an alphanumeric code on the product label. You can find an example about the location of this code in the below picture. Please enter the code <br /> of the machine you’re looking for in order to get the result in the searching list.
              </p>
          </div>
          <div class="service-top-right">
              <div class="service-right-top">
                  <h1>Research by trade category and power</h1>
                   @Html.Widget("rigth_side_column_search_product")
                  Trade category: <input type="search" /> <br />
                  Power in Watt: <input type="search" /> <br />
                  <input type="button" value="Search"/>
                  <h3>Search informations</h3>
                  <p>Find the original  spare parts to repair your tool and check them directly on the explosion drawing.</p>                

              </div>
              <div class="service-right-down">
                  <h1>Research by part number</h1>        
                  Part number:
                    @Html.Action("SearchBox", "Catalog")
              </div>
          </div>
      </div>
     </div>
</div>
Support
11 years ago
#3770 Quote
Avatar
  • Moderator
  • 1044
Hi,

So you will need to add your widget zone in the Plugins/SevenSpikes.Nop.Plugins.AjaxFilters/SupportedWidgetZones.xml file and restart the application after that so that the new file is being loaded.

Please let us know how it goes!

Best Regards!
cicciuzzo
11 years ago
#3771 Quote
Avatar
  • 34
No, it don't work... as if is ignored this widget..

I have clear cache and restart all.. browser and Visual studio..

may depend of the controller ? I don't know!!! ;(((

this my controller

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;


namespace Nop.Web.Controllers
{
    public class ServiceController : BaseNopController
    {
        //
        // GET: /Service/Index

        public ActionResult Index()
        {
            return View();
        }

        //
        // GET: /Service/SearchProduct
        public ActionResult SearchProduct()
        {
            return View();
        }
    }
}
Support
11 years ago
#3791 Quote
Avatar
  • Moderator
  • 1044
Hi,

Can you please explain in more details what is this page. Please bear in mind that the Nop Ajax Filters can be integrated only on category or manufacturer page. They will not be displayed if you try to integrate them on any other page.

Looking forward to your reply!