Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve availability filter #883

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

Hlavtox
Copy link
Contributor

@Hlavtox Hlavtox commented Jul 18, 2023

Questions Answers
Description? Several small improvemets to availability filters. Details below.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket? Doesn't fix an issue, but will fix about thousand complains from merchants.
How to test? Check that stock filter works correctly.

Changes

  • Many people complain that they have three values - "Not available", "Available" and "In stock". Now, if the products Available and In stock are the same, it will don't display "Available".
  • I removed automatic sorting by language for availability. Now they will be fixed in this order - "In stock", "Available", "Not available".
  • Even if "In stock" is the last option with products, it will still be displayed, so people know if the X products remaining are in stock or not. Not everybody has stock displayed in their product list.

How it looks - nicely ordered, if there is something orderable but not in stock, it is still displayed

multiple

But when they are the same 7 products, or merchant does not allow out-of-stock ordering globally, it won't get displayed

Snímek obrazovky 2023-07-18 125334


This change is Reviewable

@Hlavtox Hlavtox added this to the 3.13.0 milestone Jul 18, 2023
@Hlavtox Hlavtox force-pushed the merge-availability branch from 76f8202 to 419b83d Compare July 18, 2023 10:48
@Hlavtox Hlavtox force-pushed the merge-availability branch from ca0561b to f013b51 Compare July 18, 2023 10:53
Copy link
Contributor

@matthieu-rolland matthieu-rolland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some uneducated feedback... and also I'm wondering if this should be validated by @MatShir before being QAed and merged

src/Filters/Block.php Show resolved Hide resolved
Copy link
Contributor

@matthieu-rolland matthieu-rolland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like product aproves (@MatShir ) 👍

LGTM codewise

@AureRita AureRita self-assigned this Jul 24, 2023
@AureRita
Copy link

AureRita commented Jul 24, 2023

Hi @Hlavtox

Thank you for your PR, All seems to works as you can see here :

Untitled_.Jul.24.2023.5_03.PM.webm

Tested on :
1.7.8.10 ✔️
8.1.1 ✔️
8.0.5 ✔️

I see just a little issue on it :
If you've already load the previous faceted search, when you update, if you don't the state of any product, the faceted search'll continue to be like before, only in your languages, as you can see :

Untitled_.Jul.24.2023.5_31.PM.webm

I don't think this one'll block this PR so it's QA ✔️

Thank you

@Hlavtox
Copy link
Contributor Author

Hlavtox commented Jul 24, 2023

Thanks @AureRita, I will flush the cache on upgrade. ;-) #884

@Hlavtox Hlavtox merged commit d429b5e into PrestaShop:dev Jul 24, 2023
@MatShir
Copy link

MatShir commented Jul 25, 2023

🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants