• Priority: 0
  • Status: Waiting on customer
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 03.02.25, 17:53
  • Opened by: Rémy Meglioli

Ticket #25942 - Filters aspect in responsive mode

Hello,

How can I ensure that the filters are displayed in the form of the button in the responsive attachment?

As in your example: https://alysum.promokit.eu/jewelry/en/mobile/category/106-stackable

Is it with AMP? Because I can’t do it with Creative Elements in responsive.

Comments

Fred 03 Feb 2025, 21:24

Hi, Rémy Meglioli.
Yes, the link you gave me is AMP
But responsive version is also looks fine → https://mega.nz/file/MIABQAiL#7TV2858etgt9JKDuSFyIlKHDIoVdprPbByvHbOqhTsA

Rémy Meglioli 07 Feb 2025, 14:36

Hi, Thanks.

I'd like the filter button to take up the whole width and the filters to be hidden by default until the button is pressed (it's currently the other way round). And only on mobile. Like the attached photo.

Attachments:

IMG_4145.jpg (162.7 KiB)
Fred 07 Feb 2025, 23:48

You can try to adjust it in the widget settings https://mega.nz/file/1MBCwQhI#gyIzH8nkZDMjwlL8ogpaPWl__7c3maLvhJgUTfzxrFo

Rémy Meglioli 10 Feb 2025, 09:39

No, that's not what I want to do. The desktop view is fine for me, and I don't want to change it. However, in mobile view, there's a button to show and hide the filters. By default, the filters are visible, but I want them to be hidden until the button is pressed. Like in my picture attached. Please check this page on a mobile device to see what I mean: https://www.mercury-parts-france.fr/37-huiles

Attachments:

IMG_4145.jpg (162.7 KiB)
Fred 14 Feb 2025, 12:56

Yes, I see. There is no such option there. It requires code customization.

Rémy Meglioli 14 Feb 2025, 13:45

Is it something you can do? If yes, what would it cost?

Fred 15 Feb 2025, 22:52

Maybe later.
As you can see on the green banner on the top, we are on vacation until March 10

Rémy Meglioli 20 Mar 2025, 14:06

Hi, I’m following up to see if you have a solution for making the filters hidden by default in mobile view so that they only expand when the user clicks the "Filter" button.

Fred 23 Mar 2025, 14:04

Hi Rémy.
Sorry for waiting
I just checked your mobile (AMP) version ask as I can see the filter's section is closed by default, like you need → https://mega.nz/file/oIYx2CKZ#aqUgi1lCs2y0ZuzIKktL6UzY2eVSiECjUIcISrf4FgY

Rémy Meglioli 23 Mar 2025, 22:08

Hi,

We don’t use AMP but rather Creative Elements’ responsive mode.

To better illustrate our issue, I recorded a video that you can view here : https://www.dropbox.com/scl/fi/mewc3gfkddbibiuzu4i5z/ibs_mobile_filter_issue.mov?rlkey=95stcdkibaoh6b728ubndeik0&dl=0

Regards.

Fred 25 Mar 2025, 22:44

Yes, I see the issue now. Your English is absolutely clear.
I don't see the Filter button at the moment, did you hide it?

Rémy Meglioli 25 Mar 2025, 22:55

No, I don't hide it.
Just check this page in mobile mode (make sure to refresh the page if you don’t see the button in the mobile browser emulator the first time): https://www.mercury-parts-france.fr/37-huiles

Fred 25 Mar 2025, 23:47
Rémy Meglioli 31 Mar 2025, 09:51

You need to refresh (F5) the page. See this new short video I just recorded : https://www.dropbox.com/scl/fi/ni8nq4i3ji40mts4148p6/ibs_mobile_filter_issue_2.mov?rlkey=kxylb06zub0pv29s9swsytzir&dl=0

(Note: on a smartphone, the button appears immediately without the need for refresh.)

Fred 02 Apr 2025, 22:18

Yes, I see. Strange issue. Trying to understand what's wrong

Rémy Meglioli 22 Apr 2025, 12:39

Hello, just following up to see if you've made any progress or noticed anything new regarding the issue?

Fred 22 Apr 2025, 22:21

Not yet, sorry

Rémy Meglioli 06 May 2025, 13:54

My support expires at the end of the month. Do you think you'll have a solution by then?

Fred 06 May 2025, 22:14

I can extend it while the issue will not be fixed. Want to return to this issue this week.

Fred 11 May 2025, 21:54

Please open the file
/themes/alysum/modules/ps_facetedsearch/ps_facetedsearch.tpl
find and remove condition "{if Context::getContext()→isMobile()}" around the button
https://mega.nz/file/xAA3lIhR#lIxipxipuZIZBwkACOeGf4D09jIZ8Qo4AUIiapnCxQ8

Rémy Meglioli 14 May 2025, 14:44

That doesn't solve the problem : it just adds the button in desktop mode.
The problem is that, in mobile mode, we have to press this button twice to make the filters list disappear.
In mobile mode, the filters list should be hidden by default and only appear if the button is clicked once (like in the image herewith).
This is what I explained in my video: https://www.dropbox.com/scl/fi/ni8nq4i3ji40mts4148p6/ibs_mobile_filter_issue_2.mov?rlkey=kxylb06zub0pv29s9swsytzir&dl=0

Attachments:

IMG_5430.PNG (1.01 MiB)
Rémy Meglioli 14 May 2025, 15:01

I'm trying to change the code in ps_facetedsearch.tpl to the one the console gives me when the filters are hidden so that it's the default display when the page is opened, but it doesn't work (see image herewith). Any idea why ?

Rémy Meglioli 14 May 2025, 15:13

ChatGPT helped me find the solution, and I'm sharing it with you here:

{if isset($listing.rendered_facets) && ($listing.rendered_facets != "")}
<div id="search_filters_wrapper">
  
  {if Context::getContext()->isMobile()}
    <!-- Affichage mobile : bouton + filtres repliables -->
    <button class="btn filter-btn collapsed" type="button" data-toggle="collapse" data-target="#search_filters" aria-expanded="false" aria-controls="search_filters">
      {l s='Products Filter' d='Shop.Theme.Actions'}
    </button>
    <div id="search_filters" class="collapse">
      {block name='product_list_active_filters'}
        {$listing.rendered_active_filters nofilter}
      {/block}
      {$listing.rendered_facets nofilter}
    </div>
  {else}
    <!-- Affichage desktop : filtres directement visibles -->
    <div id="search_filters">
      {block name='product_list_active_filters'}
        {$listing.rendered_active_filters nofilter}
      {/block}
      {$listing.rendered_facets nofilter}
    </div>
  {/if}
  
</div>
{/if}

Thank you for pointing me in the right direction.

Fred 14 May 2025, 21:44

Thank you for sharing the solution, we will test it out