How to fix «Call to a member function getItems() on null» for Amasty «Advanced Search»?

bug
bug-fix
third-party-extension
amasty
amasty-search
(Dmitry Fedyuk) #1

01

0 Likes

How did I upgrade frugue.com from Magento 2.1.9 to 2.3.0?
(Dmitry Fedyuk) #2

Locate the method \Amasty\Xsearch\Block\Search\Product::initializeProductCollection() and replace the code block

$this->_eventManager->dispatch(
	'catalog_block_product_list_collection',
	['collection' => $this->_productCollection]
);

with the following one:

$this->_eventManager->dispatch(
	'catalog_block_product_list_collection',
	['collection' => $collection]
);
0 Likes