skip to Main Content

I am converting custom php of magento 1 into magento 2

this is the error. Fatal error: Uncaught MagentoFrameworkExceptionLocalizedException: Area code is not set in /var/www/html/magento22/vendor/magento/framework/App/State.php:152 Stack trace: #0 /var/www/html/magento22/vendor/magento/framework/Session/SessionManager.php(173): MagentoFrameworkAppState->getAreaCode() #1 /var/www/html/magento22/generated/code/Magento/Framework/Session/Generic/Interceptor.php(50): MagentoFrameworkSessionSessionManager->start() #2 /var/www/html/magento22/vendor/magento/framework/Session/SessionManager.php(130): MagentoFrameworkSessionGenericInterceptor->start() #3 /var/www/html/magento22/generated/code/Magento/Framework/Session/Generic/Interceptor.php(14): MagentoFrameworkSessionSessionManager->__construct(Object(MagentoFrameworkAppRequestHttp), Object(MagentoFrameworkSessionSidResolverProxy), Object(MagentoFrameworkSessionConfig), Object(MagentoFrameworkSessionSaveHandler), Object(MagentoFrameworkSessionValidator), Object(MagentoFrameworkSessionStorage), Object(MagentoFramewor in /var/www/html/magento22/vendor/magento/framework/Session/SessionManager.php on line 175…

VIEW QUESTION

conversion of magento 1 into magento 2

I was using fetch_assoc() method in magento 1 . I want to convert it into Magento 2 . there is no fetch_assoc() method in magento 2. if(is_object($result)) { while ($resultsArray =$result->fetch_assoc()) { if(empty($data)) { $data[] = array_keys($resultsArray); } $data[] =…

VIEW QUESTION

Magento2 plugin/interceptor not working

I have following action: http://localhost/admin/catalog/product_attribute/edit/attribute_id/135/key/…/ I would like to do some extra things with attribute after saving. I have created and registered custom plugin in Vendor/Module/Plugin/Model/ResourceModel/Attribute/Save.php with following content: class Save { /** * @var Config */ protected $config; /**…

VIEW QUESTION

Getting error 'Area is already set' while changing theme for Magento 2.2.4

I have copied magento-frontend-luma theme and change vendortheme name and paste in design folder magento2appdesignfrontendWebmynepruthvi In registration.php MagentoFrameworkComponentComponentRegistrar::register( MagentoFrameworkComponentComponentRegistrar::THEME, 'frontend/Webmyne/pruthvi', __DIR__ ); In theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>Webmyne Pruthvi</title> <parent>Magento/blank</parent> <media> <preview_image>media/preview.jpg</preview_image> </media> </theme> In composer.json { "name": "webmyne/pruthvi", "description":…

VIEW QUESTION
Back To Top
Search