Developer forum

Forum » Ecommerce - Standard features » Add ecom filters

Add ecom filters

Gert-Jan Bierkens
Reply
Hi,

I'm trying to add the ecom filters to our webshop (v 19.2.3.5 ) url: http://109.72.179.38.

What I did is the following:
Scheduled search index
Created searchfilters (see attachment)
Added the checkbox in Advanced search (see attachment 2)

Now I would like to use the filters in a certain paragraph. I've added the following code:

<div class="item">
  <h2><!--@ParagraphHeader--></h2>
  <div>
    <form method="get" action="<!--@Global:Pageview.Url.Raw-->">
      <input type="hidden" name="ID" value="<!--@Global:Page.ID-->" />
      <!--@afmeting-->
      <!--@price-->
      <input type="submit" Value="Filter - test" />
    </form>  
  </div>
</div>

But DW doesn't replace the <!--@afmeting--> tag for the filter. Can anyone help me with this issue?


Advanced_search_-_select_filter_groups.jpg highlighted_code.png Searchfilters.jpg

Replies

 
Merethe Nielsen
Reply
Hi

It looks like that you have added your search form to a paragraph template, right?

Filter tags don't work from page/paragraph templates.
They only work in the Product catalog Search form.

If you create a page, insert a product catalog and enable search and the filters, then it should work if you put your form in the Searchform.html template.

Regards,
Merethe
 
Gert-Jan Bierkens
Reply
Hi,

I'm sorry but I don't understand yet.
Indeed I added the code to a template of a regular paragraph.

If I do as you told me, and add my form to searchform.html, then how can I show them in my design?
Do I still need a paragraph? Or can I does it show automatically?

As you can see in the screenshot I have edited searchform.html, but I'm very uncertain how to show the filters in my design.

Many thanks in advance!

filters_setup.png
 
Merethe Nielsen
Reply

I have created a dw test paragraph next to yours where I'll try to see what it does.

 
Merethe Nielsen
Reply

I'll take a look on this again tomorrow. I have to go now.

/Merethe

 
Merethe Nielsen
Reply
 Hi again

It was a very simple thing: You didn't insert the searchbox tag into the Productlist template.
<!--@Ecom:Search.SearchBox-->
I have inserted it for you and now the search function AND filters are visible in frontend :)

Kind regards, 
Merethe
 
Gert-Jan Bierkens
Reply
Awesome!
Does this mean that I always have to add the filters to the productlist template?

The reason that I ask this is that I want to always show my filters in the left sidebar of the website.
What would be the best way to do this?

What I did now was the following.
- I have a paragraph called Filters.
- I have attached a module ecommerce to this paragraph
- in the template of this paragraph i've added "<!--@Ecom:Search.SearchBox-->"




 
Gert-Jan Bierkens
Reply
We found the solution. In the product catalogue module we had to use a productlist template with only had the <!--@Ecom:Search.SearchBox--> template tag.

 

You must be logged in to post in the forum