Skip to content

magento man

Is it possible to override type configuration in the di.xml of a module in Magento2?

I want to override the file “FoomanEmailAttachmentsObserverAbstractSendInvoiceObserver”. Here is the code in the di.xml. <!– module introduced preferences –> <preference for=”FoomanEmailAttachmentsModelApiAttachmentContainerInterface” type=”FoomanEmailAttachmentsModelAttachmentContainer”/> <type name=”FoomanEmailAttachmentsObserverAbstractSendOrderObserver”> <arguments> <argument name=”pdfRenderer” xsi:type=”object”>FoomanEmailAttachmentsModelNoneRenderer</argument> </arguments> </type> <virtualType name=”fooman_emailattachments_invoice_pdf_renderer” type=”FoomanEmailAttachmentsModelPdfRenderer”> <arguments> <argument name=”pdfRenderer” xsi:type=”object”>MagentoSalesModelOrderPdfInvoice</argument> </arguments> </virtualType> <type… Read More »Is it possible to override type configuration in the di.xml of a module in Magento2?

Product added to the Catalog collection does not display a price

I created a preference for the block MagentoCatalogBlockProductListProduct to add a specific product at the begining of the collection in getLoadedProductCollection(). Almost everything is well displayed except the price. public function getLoadedProductCollection() { $originalCollection= parent::getLoadedProductCollection(); $featuredProduct = $this->productFactory->create()->load(18); //test productId… Read More »Product added to the Catalog collection does not display a price

The consumer isn’t authorized to access %resources. Magento 2.4.5-p1 on staging environment

In the testing environment, it gives below errors, { “message”: “The consumer isn’t authorized to access %resources.”, “parameters”: { “resources”: “Magento_Sales::actions_view” }, “trace”: “#0 /var/www/html/vendor/magento/module-webapi/Controller/Rest/RequestValidator.php(68): Magento\Webapi\Controller\Rest\RequestValidator->checkPermissions()n#1 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest\RequestValidator->validate()n#2 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\RequestValidator\Interceptor->___callParent(‘validate’, Array)n#3 /var/www/html/vendor/paypal/module-braintree-core/Plugin/RestValidationPlugin.php(86): Magento\Webapi\Controller\Rest\RequestValidator\Interceptor->Magento\Framework\Interception\{closure}()n#4 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): PayPal\Braintree\Plugin\RestValidationPlugin->aroundValidate(Object(Magento\Webapi\Controller\Rest\RequestValidator\Interceptor), Object(Closure))n#5 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\RequestValidator\Interceptor->Magento\Framework\Interception\{closure}()n#6 /var/www/html/generated/code/Magento/Webapi/Controller/Rest/RequestValidator/Interceptor.php(23): Magento\Webapi\Controller\Rest\RequestValidator\Interceptor->___callPlugins(‘validate’,… Read More »The consumer isn’t authorized to access %resources. Magento 2.4.5-p1 on staging environment