When creating a Collection of type Magento\Catalog\Model\ResourceModel\Product\Collection without a visibility and category_id filter, the event catalog_product_collection_apply_limitations_after is not triggered.
See: module-catalog/Model/ResourceModel/Product/Collection.php method _applyProductLimitations().
The catalog_product_collection_apply_limitations_after event should be triggered.
The catalog_product_collection_apply_limitations_after event is not triggered.
@rakibabu thank you for your bug report.
We've created internal ticket MAGETWO-75361 to track progress on the issue.
It always worked this way: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php#L1853 Changing this behavior may lead to undesired consequences for those who relied on old behavior.
Writing new code you shouldn't use event-observers mechanism whenever possible. As far as I see from this implementation, you can easily implement an after plugin for addPriceData, applyFrontendPriceLimitations, addWebsiteFilter or whatever methods you need.
Hi @rakibabu
Unfortunately changing this behavior may break client code which already relies on existing flow. Thus, it is best to leave it as is, given that other methods of achieving the same result exist.
Thank you for collaboration
Most helpful comment
Hi @rakibabu
Unfortunately changing this behavior may break client code which already relies on existing flow. Thus, it is best to leave it as is, given that other methods of achieving the same result exist.
Thank you for collaboration