Skip to content

magento man

Failed to open stream: Permission denied on only one module

One of our extensions give the following error message on the front page: Warning: require_once(/var/www/html/magento2/app/code/xxxVendor/xxxModule/registration.php): failed to open stream: Permission denied in /var/www/html/magento2/app/etc/NonComposerComponentRegistration.php on line 29 Fatal error: require_once(): Failed opening required ‘/var/www/html/magento2/app/code/xxxVendor/xxxModule/registration.php’ (include_path=’/var/www/html/magento2/vendor/magento/zendframework1/library:.:/usr/share/pear:/usr/share/php’) in /var/www/html/magento2/app/etc/NonComposerComponentRegistration.php on line 29 This… Read More »Failed to open stream: Permission denied on only one module

Error getting Block in controller Magento 2: Element ‘block’, attribute ‘class’: [facet ‘pattern’]

I’m trying to get block in my frontend controller like this: $resultPage = $this->resultPageFactory->create(); $breadcrumbs = $resultPage->getLayout()->getBlock(‘breadcrumbs’); this is my XML file layout <?xml version=”1.0″ ?> <page layout=”1column” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:View/Layout/etc/page_configuration.xsd”> <body> <referenceContainer name=”content”> <block class=”VendorModuleBlockViewIndex” name=”promotion.view.categories” template=”Vendor_Module::view/index.phtml”> <block class=”MagentoFrameworkViewElementTemplate” name=”promotion.view.subcategories.wrapper”/>… Read More »Error getting Block in controller Magento 2: Element ‘block’, attribute ‘class’: [facet ‘pattern’]

Magento 2: How to set item Row total?

I want to set a custom row total. I am using ‘checkout_cart_product_add_after’ event. And want to update Row total. I going to add an extra amount in an item row total. like, $item->setRowTotal($item->getRowTotal + 100); $item->save();