October 18, 2023
This article describes the low-level mechanisms for product retrieval in Magento Open Source 2.4.6 for category listing (PLP) and search pages. It is relevant to the default Luma theme and custom themes inherited from it. Other themes may override these mechanisms, and the article also discusses the specifics of product retrieval in the Hyva theme. At the end of the article, there is a note about a bug in Magento 2.4.5.
Product collection initialization occurs in the
category.products block, which calls the
// vendor/magento/module-catalog/view/frontend/templates/category/products.phtml <?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ ?> <?php /** * Category view template * * @var $block \Magento\Catalog\Block\Category\View */ ?> <?php if (!$block->isContentMode() || $block->isMixedMode())
September 07, 2023
One common challenge faced by our clients is the suboptimal performance of Magento search autocomplete, the presence of irrelevant data, and slow response times. Queries can take up to 0.5 seconds, and the results are based on Search Terms. We decided to analyze why the response time is low and if we can adjust search results and provide product names instead of Search Terms.