Jump to content

Unnecessary extra field for availability in faceted search


OzzyM
 Share

Recommended Posts

Hello!

I think I ran into a bug in Faceted Search module. My product stock filter looks like this (Im only using 1 language in my shop, Polish):

image.png.5774210ddf92dfb21901eed46e63d57d.png

(Niedostepne = Unavailable, W magazynie = In stock)

So I'm getting proper fields in Polish, but there's also a random extra field and I've got no clue where is it coming from. Ive checked translations panel and while there are options of translating "In stock" and "Unavailable", there's no such field as "Available". Any ideas what might be wrong and how to fix it and remove the extra field?

I'm using Presta 1.7.8.5 with ps_facetedsearch v3.8.0.

 

  • Like 1

Share this post


Link to post
Share on other sites

Hello,

I have exactly the same issue since migrating my (French) store from 1.7.6.x to 1.7.8.5.

171341347_Screenshot2022-05-16at10_05_11.png.99917afdb9534d6ec001462e7fe8637a.png

Still looking into it but if anyone else has found the solution please let us know.

Thanks
Nicolas

  • Like 1

Share this post


Link to post
Share on other sites

  • 4 weeks later...

same here. since update I am seeing "in stock" "out of stock" (as before) and now also "available" which is basically a duplicate of "in stock". Showing the exact same numbers of products.

Happened yesterday upon updating the faceted search module to v3.8.0

Any help here?

Share this post


Link to post
Share on other sites

Not the cleanest but since the filter was always the last one in my sidebar I have hidden it in CSS like this. You may have to adapt the code depending on the theme you are using.

#search_filters_wrapper aside:last-child ul li:first-child {
    display: none;
}

 

Edited by nrsoft (see edit history)

Share this post


Link to post
Share on other sites

  • 2 months later...
  • 2 weeks later...
On 6/14/2022 at 10:09 AM, nrsoft said:

Not the cleanest but since the filter was always the last one in my sidebar I have hidden it in CSS like this. You may have to adapt the code depending on the theme you are using.

#search_filters_wrapper aside:last-child ul li:first-child {
    display: none;
}

 

could you show yout code html in order to know how to apply to the mine??

Share this post


Link to post
Share on other sites

On 6/14/2022 at 10:09 AM, nrsoft said:

Not the cleanest but since the filter was always the last one in my sidebar I have hidden it in CSS like this. You may have to adapt the code depending on the theme you are using.

#search_filters_wrapper aside:last-child ul li:first-child {
    display: none;
}

 

we are trying to apply our code to hide that option, but all our code hides the first value in every filter (so, for example, price doesn't show anything at all) 

Share this post


Link to post
Share on other sites

6 minutes ago, StrefaBiznesu said:

Does anyone fix it yet?

Hi, I have the next solution:

 

edit the next file = ps_facetedsearch/views/templates/front/catalog/facets.tpl

At line 57 you will find this code:

{if !$filter.displayed} {continue} {/if}

Replace for this

{if !$filter.displayed || ($facet.type=='availability' && [email protected]==1)} {continue} {/if}

Tested in prestashop 1.7.6.4 and it works perfect for me

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

  • 3 months later...
  • 4 weeks later...
On 9/23/2022 at 3:53 PM, Juanaco said:

Hi, I have the next solution:

 

edit the next file = ps_facetedsearch/views/templates/front/catalog/facets.tpl

At line 57 you will find this code:

{if !$filter.displayed} {continue} {/if}

Replace for this

{if !$filter.displayed || ($facet.type=='availability' && [email protected]==1)} {continue} {/if}

Tested in prestashop 1.7.6.4 and it works perfect for me

 

Thanks ! that's working for me 1.7.8.7

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More