Post by calimero1 » Tue Feb 19, 2019 3:32 pm

Hi,
I am trying to change default checkbox filtering menu to dropdown selection box.
I have changed the code in catalog/view/theme/default/template/extension/module/filter.twig
Now it looks like this:

Code: Select all

    <select>
          <option></option>
      <div id="filter-group{{ filter_group.filter_group_id }}">{% for filter in filter_group.filter %}
        {% if filter.filter_id in filter_category %}    
           <option value="{{ filter.filter_id }}" id="{{ filter.filter_id }}" selected>{{ filter.name }}</option>
        {% else %}
           <option value="{{ filter.filter_id }}" id="{{ filter.filter_id }}">{{ filter.name }}</option> 
        {% endif %}     
     {% endfor %}</div>
    </select>
Now the dropdown selection box is displayed correctly, but when I choose some option from dropdown menu it does not do anything.

Any idea?

Many thanks.

Newbie

Posts

Joined
Sun Nov 04, 2018 6:45 am

Post by thekrotek » Tue Feb 19, 2019 4:35 pm

And you want it to do what exactly?

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by calimero1 » Tue Feb 19, 2019 5:16 pm

thekrotek wrote:
Tue Feb 19, 2019 4:35 pm
And you want it to do what exactly?
Hi,
I want to have Filter with dropdown menu items instead of checkboxes.
E.g. I have filter group "Color" with filters like "red", "blue", "green".
Now, if i choose "red" from my dropdown menu and click the "Refine Search" button, it does not do anything.

Newbie

Posts

Joined
Sun Nov 04, 2018 6:45 am

Post by thekrotek » Tue Feb 19, 2019 5:30 pm

Again, what do you want it to do exactly? Nobody understands "doesn't do anything", "doesn't work", "nothing happens" and similar issue descriptions.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by calimero1 » Tue Feb 19, 2019 5:51 pm

thekrotek wrote:
Tue Feb 19, 2019 5:30 pm
Again, what do you want it to do exactly? Nobody understands "doesn't do anything", "doesn't work", "nothing happens" and similar issue descriptions.
Hi,
I talk about the Filter extension. So if I choose "red" filter from dropdown and push "Refine Search" button only products with "red" filter assigned should be displayed. Now it displays all products from the category as if no filter has been selected.
I want exactly this, but for OpenCart 3:
viewtopic.php?t=104646

Thanks.

Newbie

Posts

Joined
Sun Nov 04, 2018 6:45 am

Post by thekrotek » Tue Feb 19, 2019 7:41 pm

That's weird... You copied a link from the same topic, but for 1.5, which I hope you read. And yet you've made only half of the changes. Of course, it won't work.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Active Member
Online

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by calimero1 » Tue Feb 19, 2019 11:46 pm

thekrotek wrote:
Tue Feb 19, 2019 7:41 pm
That's weird... You copied a link from the same topic, but for 1.5, which I hope you read. And yet you've made only half of the changes. Of course, it won't work.
Oh, sorry. Now I have changed also javascript code and finally it works!
Thank you.

Newbie

Posts

Joined
Sun Nov 04, 2018 6:45 am

Post by paulfeakins » Wed Feb 20, 2019 6:24 pm

thekrotek wrote:
Tue Feb 19, 2019 5:30 pm
Again, what do you want it to do exactly? Nobody understands "doesn't do anything", "doesn't work", "nothing happens" and similar issue descriptions.
I'm glad it's not just me who really struggles to understand what people actually mean in the forum :drunk:

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Expert Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 6 guests