<type name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection"> <plugin name="adfab_gdpr_resource_order_invoice_grid_collection" type="Adfab\Gdpr\Model\ResourceModel\CollectionPlugin" /> </type>
Hi @quatrys81100 ,
Please replace your below code:
From:
<type name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection"> <plugin name="adfab_gdpr_resource_order_invoice_grid_collection" type="Adfab\Gdpr\Model\ResourceModel\CollectionPlugin" /> </type>
To:
<type name="Magento\Sales\Model\ResourceModel\Order\Invoice\Orders\Grid\Collection"> <plugin name="adfab_gdpr_resource_order_invoice_grid_collection" type="Adfab\Gdpr\Model\ResourceModel\CollectionPlugin" /> </type>
Problem Solved? Accept as solution!
Hope it helps!
Thanks
Hello Thanks
I have already tried this but already working in order page on invoice tab.
This Not working in /sales/invoice/index page on magento 2.4.5
Hi @quatrys81100 ,
Please try below.
<type name="Magento\Sales\Model\ResourceModel\Order\Invoice\Collection"> <plugin name="adfab_gdpr_resource_order_invoice_grid_collection" type="Adfab\Gdpr\Model\ResourceModel\CollectionPlugin" /> </type>
Problem Solved? Accept as solution.
Hope it helps!
Thanks
sorry not working
Hello In Magento 2.4.5 this collection is loaded like this :
<virtualType name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult"> <arguments> <argument name="mainTable" xsi:type="string">sales_invoice_grid</argument> <argument name="resourceModel" xsi:type="string">Magento\Sales\Model\ResourceModel\Order\Invoice</argument> </arguments> </virtualType>
How can we modify a collection? in the module that I want to modify which no longer works
the class CollectionPlugin has a function :public function afterLoad( SourceProviderInterface $collection, $result ) { if ( $this->cipher->getIsIndexing() || $this->isRunning ) { return $result; } $this->isRunning = true; foreach( $collection->getItems() as $item ) { $this->decipher($item); } $this->isRunning = false; return $result; }
How to make this work in magento 2.4.5 for invoices page. Thanks
I can share with you the experience of using https://processmix.com/solutions/build-api/ with low code, which provides a user interface for setting up business rules and predictive models, powerful calculation capabilities and advanced functions for testing various elements of a credit decision model. It is easy to use and has an intuitive interface; it allows you to create an entire model without any technical knowledge or training!
@quatrys81100 wrote:Hello since the update to magento 2.4 I have a problem on a module following the passage of Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection in graffiti shop website.My plugin does not work.In my di.xml I have this line<type name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection"> <plugin name="adfab_gdpr_resource_order_invoice_grid_collection" type="Adfab\Gdpr\Model\ResourceModel\CollectionPlugin" /> </type>And suddenly with the error: "Class "Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection\Interceptor" does not exist"In the page admin/sales/order/index/How to sol it Please ?
Is your issue resolved? As i try many method including codes of differnet authors paste but all in vain. Don't know is it due to cache issue or something bug like comes up in Magento.