Smile-SA / smile-magento-elasticsearch

Magento ElasticSearch Implementation
151 stars 90 forks source link

Extending classes and plugin issue #140

Closed Kershrew closed 6 years ago

Kershrew commented 6 years ago

Hello, I am trying to use Magento 2 with your plugin to extend a public method in a class in order to add an extra filter to the autocomplete quicksearch in the header.

I have found a suitable class which will enable me to do what I want: Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection\Filter

in which I am attempting to override: prepareCollection() to add a filter for categories.

I have created a module which will succsessfully extend any class from the Magento core I throw at it and even classes from other extensions but whenever I extend one of yours it has literally no effect. Even when I add a die(); it doesn't take effect.

So to try and get around that I have created a plugin to action before prepareCollection() and add the filter I want, this module again works with everything else I throw at it but when I try and extend this of your classes I am met with a 500 error. I have added all the details of the plugin to this magento stackexchange question: https://magento.stackexchange.com/questions/227422/filter-interceptor-getting-added-to-end-of-argument-class-in-plugin

Do you guys have something in place that stops people from being able to use a plugin or preference with your code or am I missing something simple?

romainruaud commented 6 years ago

Hello @Kershrew

This repository concerns the Magento1 version of our module.

Please move your question to the magento2 repository here : https://github.com/Smile-SA/elasticsuite/

Regards

Kershrew commented 6 years ago

Thanks for the info