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

Price sorting order should use indexed minimal price not the price attribute #6751

Closed
paales opened this issue Sep 26, 2016 · 18 comments
Closed
Labels
Award: advanced bug report Component: Catalog Component: Tax Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Partner: Reach Digital Pull Request is created by partner Reach Digital Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@paales
Copy link
Contributor

paales commented Sep 26, 2016

Preconditions

  1. 2.1.0

Steps to reproduce

  1. (1) Create a product with price 11 and with tier price 9.
  2. (2) Create a product with price 10.

Expected result

  1. Sort order should be (1) and then (2).

Actual result

  1. Sort order is (2) and then (1)
@sevos1984
Copy link
Contributor

To sort by tier price you should set tier_price attribute for sorting but there is an issue on that. Internal ticket MAGETWO-59234. Thanks for reporting.

@sevos1984 sevos1984 added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 3, 2016
@paales
Copy link
Contributor Author

paales commented Oct 3, 2016

@sevos1984 I think it should just sort by minimal price, what if there is a special price, the same issue applies, right?

@IvanRybakov
Copy link

Any update?

@veloraven
Copy link
Contributor

This issue has already been fixed in develop branch.
Closed.

@korostii
Copy link
Contributor

korostii commented Jun 19, 2017

I am very glad that the people who happen to be using the develop branch in production will have this issue resolved for them.
However, in which version will the fix be released for the rest of the users?
You know, all the other mere mortals who use either composer-installed version or the package downloaded from the official website.
Could you please provide a link to the downloadable version/patch or a composer tag to upgrade to?

Otherwise I don't see how this issue is anywhere near being resolved and closed for the ordinary users (which is what you seem to imply).
IMHO it is misleading and confusing to see such an issue in "closed" state, not knowing the internals which can keep the issue on develop branch for months straight without ever appearing on any of the multiple upcoming releases. I've seen dozens of people upgrading to latest released version in order to get the fix... only to discover that it wasn't included into that release neither.

@epson121
Copy link

epson121 commented Jun 29, 2017

Are there any news on release date for this fix? Can you point to a patch we could apply to have this fixed on the stores in the meantime?

@sagaltsev
Copy link

Has not been fixed in develop branch (testen on 2.2.0-rc22)

@afoucret
Copy link

afoucret commented Oct 20, 2017

@veloraven : I suppose you refer to bab4284 when you say the bug is fixed. Am I right ?

If so, I do not think allowing sort on tier_price solve the problem issued by @paales.
He want regular price sort by take care of tier_price.

The main problem is tier_price is not considered when indexing min_price and final_price.

Price are rendered using price modifier but sort (and filters) are done using the price index. So there is an inconsistency that can only be resolved by fixing price indexing to include tier_price in the the final_price (or min_price) computation.

IMHO the problem is :

  1. Magento\Catalog\Model\Indexer\Product\Price\AbstractAction:_prepareTierPriceIndex implementation is very weak :

    • Website management when selecting all website
    • Confusion with the customer_group_id 0 (all_groups or not_logged_in)
  2. tier_price column is often NULL in the price index as a result of this poor implementation (especially if you choose a tier_price that apply to all websites or to all customer groups)

  3. Even if not null, the tier_price is not used in the computation of the final_price (or min_price)

IMHO, this issue should be reopen.

@afoucret
Copy link

This is a big issue when using Magento B2B which rely on tier_price to achieve the shared catalog custom pricing.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Oct 20, 2017
@orlangur orlangur reopened this Oct 29, 2017
@magento-engcom-team
Copy link
Contributor

@paales, thank you for your report.
We've created internal ticket(s) MAGETWO-59234 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 30, 2017
@gianiaco
Copy link

@afoucret i'm trying to understand if we are talking about the same issue #13335 , are we?

@okorshenko
Copy link
Contributor

@mbrinton01 could you please look at this issue.

@okorshenko okorshenko added Event: distributed-cd Distributed Contribution Day Award: advanced labels Mar 5, 2018
@okorshenko
Copy link
Contributor

Confirmed from the PO side. Request is valid

@dhorytskyi
Copy link
Contributor

Was fixed in
#56859b0

@ishakhsuvarov
Copy link
Contributor

@paales Closing this now, as fix is already available in 2.2-develop.
See comment above for commit reference.

Thanks!

@ishakhsuvarov ishakhsuvarov removed Event: distributed-cd Distributed Contribution Day mageconf labels Apr 13, 2018
@nkarthickannan
Copy link

@ishakhsuvarov

Is this fix available in 2.2.4 release? If not, when can we expect this fix to be available for the production website?

@paales paales added the Partner: Reach Digital Pull Request is created by partner Reach Digital label May 8, 2018
@ishakhsuvarov
Copy link
Contributor

Hi @karthickannan
I do not have exact ETA for the fix but I assume it may be available with 2.2.6

@aaugusto-efi
Copy link

Will this also fix the issue of sorting by customer group price or does this only affect tier pricing?

magento-engcom-team pushed a commit that referenced this issue Apr 8, 2021
[Arrows] MC-40738: [MSI] “Add to Compare” function is not available if a Product is unavailable in the “Default Source” or unassigned from it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Award: advanced bug report Component: Catalog Component: Tax Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Partner: Reach Digital Pull Request is created by partner Reach Digital Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests