Skip to main content
deleted 4 characters in body
Source Link

The message We can't find products matching the selection. comes from the file /magento/vendor/magento/module-catalog/view/frontend/templates/product/listinglist.phtml.

You need to override the listinglist.phtml file in your custom module or theme to hide the message.

Example:

<?php
/**
 * Product list template
 *
 * @see \Magento\Catalog\Block\Product\ListProduct
 */
?>
<?php
$start = microtime(true);
$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper('Magento\Catalog\Helper\Output'Magento\Catalog\Helper\Output::class);
?>
<?php if (!$_productCollection->count()): :?>

// ---------------------- comment or remove the below code ------------------------------
<p<div class="message note"><info empty"><div><?= /* @escapeNotVerified */ $block->escapeHtml(__('We can\'t find products matching the selection.')) ?></p>div></div>

<?php else: :?>
    <?= $block->getToolbarHtml() ?>
    <?= $block->getAdditionalHtml() ?>
....
....

I hope this helps!

The message We can't find products matching the selection. comes from the file /magento/vendor/magento/module-catalog/view/frontend/templates/product/listing.phtml.

You need to override the listing.phtml file in your custom module or theme to hide the message.

Example:

<?php
/**
 * Product list template
 *
 * @see \Magento\Catalog\Block\Product\ListProduct
 */
?>
<?php
$start = microtime(true);
$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper('Magento\Catalog\Helper\Output');
?>
<?php if (!$_productCollection->count()): ?>

// ---------------------- comment or remove the below code ------------------------------
<p class="message note"><?= /* @escapeNotVerified */ __('We can\'t find products matching the selection.') ?></p>

<?php else: ?>
<?= $block->getToolbarHtml() ?>
<?= $block->getAdditionalHtml() ?>
....
....

I hope this helps!

The message We can't find products matching the selection. comes from the file /magento/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml.

You need to override the list.phtml file in your custom module or theme to hide the message.

Example:

<?php
/**
 * Product list template
 *
 * @see \Magento\Catalog\Block\Product\ListProduct
 */
?>
<?php
$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper(Magento\Catalog\Helper\Output::class);
?>
<?php if (!$_productCollection->count()) :?>

// ---------------------- comment or remove the below code ------------------------------
<div class="message info empty"><div><?= $block->escapeHtml(__('We can\'t find products matching the selection.')) ?></div></div>

<?php else :?>
    <?= $block->getToolbarHtml() ?>
    <?= $block->getAdditionalHtml() ?>
....
....

I hope this helps!

Source Link

The message We can't find products matching the selection. comes from the file /magento/vendor/magento/module-catalog/view/frontend/templates/product/listing.phtml.

You need to override the listing.phtml file in your custom module or theme to hide the message.

Example:

<?php
/**
 * Product list template
 *
 * @see \Magento\Catalog\Block\Product\ListProduct
 */
?>
<?php
$start = microtime(true);
$_productCollection = $block->getLoadedProductCollection();
$_helper = $this->helper('Magento\Catalog\Helper\Output');
?>
<?php if (!$_productCollection->count()): ?>

// ---------------------- comment or remove the below code ------------------------------
<p class="message note"><?= /* @escapeNotVerified */ __('We can\'t find products matching the selection.') ?></p>

<?php else: ?>
<?= $block->getToolbarHtml() ?>
<?= $block->getAdditionalHtml() ?>
....
....

I hope this helps!