Skip to content

Commit

Permalink
Fixing direct usage of Layer to prepare a product collection which th…
Browse files Browse the repository at this point in the history
…ey did not instantiate themselves.
  • Loading branch information
romainruaud committed Mar 16, 2017
1 parent 1009ff9 commit c628b88
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/module-elasticsuite-catalog/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,24 @@
</virtualType>
<!-- End of compatibility with Staging for Layered Navigation -->

<!-- Ensure navigation block is using fulltext collection, to prevent error when it sends it through the Layer -->
<type name="Magento\Catalog\Block\Navigation">
<arguments>
<argument name="productCollectionFactory" xsi:type="object">Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory</argument>
</arguments>
</type>

<!-- Ensure standard promotion block is using fulltext collection, to prevent error when it sends it through the Layer -->
<type name="Magento\Catalog\Block\Product\ProductList\Promotion">
<arguments>
<argument name="productCollectionFactory" xsi:type="object">Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory</argument>
</arguments>
</type>

<!-- Ensure standard random products block is using fulltext collection, to prevent error when it sends it through the Layer -->
<type name="Magento\Catalog\Block\Product\ProductList\Random">
<arguments>
<argument name="productCollectionFactory" xsi:type="object">Magento\CatalogSearch\Model\ResourceModel\Fulltext\CollectionFactory</argument>
</arguments>
</type>
</config>

0 comments on commit c628b88

Please sign in to comment.