-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Catalog Products List widget - prices are loaded from wrong source #21581
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
Comments
Hi @snowcore. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @snowcore do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
… from wrong source
Hi @engcom-Delta. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Delta Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @engcom-Delta. Thank you for working on this issue.
|
Hi @snowcore, Thanks for your reporting and collaboration. As per this document https://experienceleague.adobe.com/en/docs/commerce-admin/catalog/catalog/catalog-flat Use of a flat catalog is no longer recommended as a best practice. ![]() Hence we are closing this issue. Thanks. |
Preconditions (*)
Steps to reproduce (*)
Create widget "Catalog Products List", add some random products to it.
Expected result (*)
Product prices are loaded from price index table
catalog_product_index_price
Actual result (*)
In the resulting product collection prices are taken from flat table instead of price index table (or from EAV if flat catalog is disabled).
Technical details
This affects
Magento\CatalogWidget\Block\Product\ProductsList
block and some others.The problem is in
\Magento\Catalog\Block\Product\AbstractProduct::_addProductAttributesAndPrices()
method.addAttributeToSelect()
method is called later thanaddFinalPrice()
and it overridesprice
column\Magento\Catalog\Model\ResourceModel\Product\Collection::_productLimitationPrice()
already handles price override, but it is not called in the right order.Other notes
addMinimalPrice()
andaddFinalPrice()
, as they call the same methodaddPriceData()
\Magento\AdvancedCheckout\Helper\Data::getFailedItems()
addAttributeToSelect()
withaddFinalPrice()
in some new method).P.S.: will submit PR a bit later.
The text was updated successfully, but these errors were encountered: