X

Important Notice:

It has come to our attention that some individuals, who are not affiliated with eGlobe IT Solutions, have been reaching out to job seekers falsely claiming to represent our company. These scammers are offering Work from Home Part-Time job opportunities under the guise of eGlobe IT Solutions and we have already reported to the concerned authorities under law. If you have been contacted by someone claiming to be from eGlobe IT Solutions via WhatsApp/Instagram/Facebook/SMS and you suspect that it might be a scam, we urge you to exercise caution. Do not share any personal information or make any financial transactions. Instead, pleasefollow these steps:

1. Contact Us:

If you have doubts or concerns, please reach out to our HR department directly at hr@eglobeits.com to confirm the authenticity of the communication.

2. Do Not Share Personal or Financial Information:

Under no circumstances should you share sensitive personal or financial information with anyone claiming to be from eGlobe IT Solutions without proper verification.

3. Report the Scam:

If you believe you have been targeted by a scam, please report it to your local law enforcement authorities and forward any suspicious emails or messages to us at hr@eglobeits.com so that we can take appropriate action.

Your safety and security are of paramount importance to us, and we take these matters very seriously. eGlobe IT Solutions is committed to maintaining the highest ethical standards in our recruitment processes.

6 Simple Steps In Creating Your Own Hello World Module in Magento 2

Posted on: 26 Feb 2020 by Nidheesh KK

To create the Hello World module, you need to perform the simple steps.
Step 1: Create a directory for the module Hello World.
Step 2: Create etc/module.xml file
Step 3: Create registration.php file
Step 4: Create routes.xml file
Step 5: Create controller file and action
Step 6: Enable the module

The name Magento has just started to become familiar for the past 10 years.
Even though in this 10 years of the short period it had tried to bring a massive change in the field of eCommerce.
This success story got onto rail soon the updated version of Magento has come into markets.
Today Magento 2 has become one of the most widely and commonly used eCommerce development platforms around the world.
Well then there are many other eCommerce store builders then what makes Magento more popular?
Simple and easier answer for this is, its an open-source eCommerce Platform with all new updated and advanced features.
Beyond these, there are even more features to explain to find the benefits of Magento 2.
But here we are going to see a very small and easy Magento Module which both the beginner as well as a programmer should know.
Let’s jump into how to create Hello World in Magento 2.

Create Hello World Module in Magento 2

Here our developers will help you in implementing one of the basic Module in Magento.
In this article:
Step 1: Create a directory for the module Hello World.
Step 2: Create etc/module.xml file
Step 3: Create registration.php file
Step 4: Create routes.xml file
Step 5: Create controller file and action
Step 6: Enable the module

Step 1: Create a directory for the module Hello World

Create a folder like below given format:
app/code/Eglobe/HelloWorld
The Eglobe folder is the vender name, and HelloWorld is the module’s name

Step 2: Create etc/module.xml file

Now, create etc folder and add the module.xml file
app/code/Eglobe/HelloWorld/etc/module.xml
Contents would be:

Step 3: Create registration.php file

Create registration.php as follows:
app/code/Eglobe/HelloWorld/registration.php
Code Contents:

After define the route, the URL path to our module will be: http://example.com/helloworld/*

Step 5: Create controller file and action

Create Display.php controller file in the app/code/Eglobe/HelloWorld/Controller/Index folder with the following code:
In this step, we will create controller and action to display Hello World.
Let choose that the url for this action as: http://example.com/helloworld/index/display
So the file we need to create is:
app/code/Eglobe/HelloWorld/Index/Display.php
Content:

<?php
namespace Eglobe\HelloWorld\Controller\Index;
class Display extends \Magento\Framework\App\Action\Action
{
  public function __construct(
\Magento\Framework\App\Action\Context $context)
  {
    return parent::__construct($context);
  }
  public function execute()
  {
    echo 'Hello World';
    exit;
  }
}

Step 6: Enable the module

Open your terminal and go to magento2 root. Run the following command there:
php bin/magento setup:upgrade
sudo chmod -R 777 var pub/static generated
Now open the url http://example.com/helloworld/index/display and you will see Hello World.