di.xml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Mageplaza
  5. *
  6. * NOTICE OF LICENSE
  7. *
  8. * This source file is subject to the Mageplaza.com license that is
  9. * available through the world-wide-web at this URL:
  10. * https://www.mageplaza.com/LICENSE.txt
  11. *
  12. * DISCLAIMER
  13. *
  14. * Do not edit or add to this file if you wish to upgrade this extension to newer
  15. * version in the future.
  16. *
  17. * @category Mageplaza
  18. * @package Mageplaza_LayeredNavigation
  19. * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
  20. * @license https://www.mageplaza.com/LICENSE.txt
  21. */
  22. -->
  23. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  24. <virtualType name="Mageplaza\LayeredNavigation\Api\Search\DocumentFactory" type="Magento\Framework\Api\Search\DocumentFactory">
  25. <arguments>
  26. <argument name="instanceName" xsi:type="string">Mageplaza\LayeredNavigation\Api\Search\Document</argument>
  27. </arguments>
  28. </virtualType>
  29. <type name="Magento\Framework\Search\SearchResponseBuilder">
  30. <arguments>
  31. <argument name="documentFactory" xsi:type="object">Mageplaza\LayeredNavigation\Api\Search\DocumentFactory</argument>
  32. </arguments>
  33. </type>
  34. <type name="Magento\Catalog\Model\Layer\Filter\Item">
  35. <plugin name="layer_filter_item_url" type="Mageplaza\LayeredNavigation\Plugin\Model\Layer\Filter\Item" sortOrder="1"/>
  36. </type>
  37. <type name="Magento\Swatches\Block\LayeredNavigation\RenderLayered">
  38. <plugin name="layer_filter_item_swatch_url" type="Mageplaza\LayeredNavigation\Plugin\Block\Swatches\RenderLayered" sortOrder="1"/>
  39. </type>
  40. <type name="Magento\CatalogSearch\Model\Adapter\Mysql\Filter\Preprocessor">
  41. <plugin name="layer_filter_item_swatch_url" type="Mageplaza\LayeredNavigation\Plugin\Model\Adapter\Preprocessor" sortOrder="1"/>
  42. </type>
  43. <!--Plugin ajax load add to compare & wishlist-->
  44. <type name="Magento\Catalog\Controller\Product\Compare\Add">
  45. <plugin name="layer_add_to_compare" type="Mageplaza\LayeredNavigation\Plugin\Controller\Product\CompareWishlist" sortOrder="1"/>
  46. </type>
  47. <type name="Magento\Wishlist\Controller\Index\Add">
  48. <plugin name="layer_add_to_wishlist" type="Mageplaza\LayeredNavigation\Plugin\Controller\Product\CompareWishlist" sortOrder="1"/>
  49. </type>
  50. </config>