Setup Jenkins to run as a different user and automate the Deployment with Git (GitHub/ GitLab/ BitBucket) for Magento 1 and Magento 2

Intended Audience: System Administrators with primary knowledge, Developers with good experience in hosting web applications.

Before learning the syntax, let’s just spend a few minutes to understand the purpose of installing Jenkins in the first place.

Why CI & CD?

Businesses are growing dynamically and rapidly today more than ever. Softwares act as a crucial part of running business functions smoothly, and sometimes software is the main revenue generation point of a business. Therefore it is essential to deploy any bug or a feature to production soon after the software development team develops it.

Another use case of CI/CD is to minimise the conflicts between developers’ code by adding them to develop branches continuously. Additionally running test cases when merging branches will also generate the errors in the early stages of the deployment process.

What is CI & CD?

CI and CD is a common abbreviation in the IT industry for Continuous Integration and Continuous Delivery or Continuous Deployment.

img

Image is originally from https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment

Continuous Integration

Continuous integration is when the developer merges their branches to the main branch as soon as they finish the developer testing on partial implementation, completion of a feature or a bug. Upon merging unit tests will run to make sure that the functionality is running according to the test cases.

Continuous Delivery

Continuous Delivery means any code passes the test cases when margin to the staging branch will automatically deploy to a staging environment. If you implement only continuous delivery, probably after manual testing, you can trigger the production deployment. If you are planning agile scrum, this would be ideal as you do not want to worry about the breaking of the Production Environment in the middle of the sprint.

Continuous Deployment

Continuous Deployment is the next level of Continuous Delivery. In Continuous Delivery, we deployed to production manually after the testing in staging. However, with Continuous Deployment, code will automatically merge through branches and deploy to the Production Environment upon merging it to the main branch upon successful development testing. The only thing that stops developers merge getting deployed to production will be failing a test case.

Both of the CD methods have their pros and cons. However, they are not in the scope of this document to discuss. I would recommend reading through the Atlassian article in reference for more detail.

Scope of this article:
This article only intended to explain setting up Jenkins server, Running it under a different user than Jenkins (we will run it with deploy user).

Additional Read:

To see setup AWS EC instances with LEMP stack that run with deploy users, please refer to this[Link] article.

Server Stack

LEMP – Linux Nginx MySql PHP-FPM
Type: Virtual Dedicated Server
Linux Flavor: Ubuntu 18.04 LTS
User: Non-root user with sudo access
Run as User: deploy

Install Java for Jenkins

Install the latest JRE

More clarification refers to the Digital Ocean article on How To Install Java with Apt on Ubuntu 18.04 referenced in the link.

Update the repositories
$ sudo apt update

Check whether java is already installed
$ java -version
If you don’t get something like below, you need to install Java Runtime Environment (JRE) to your server.

img

Install JRE with below command.
$ sudo apt install default-jre

When you run the java -version command, you should get a result like above.

Install latest JDK

You also need to install the Java Development Kit (JDK) for installing Jenkins successfully.

Run below command to install JDK.
$ sudo apt install default-jdk

Setting up JAVA_HOME

Setting the JAVA_HOME Environment Variable will make sure the Java-related application runs smoothly.

Check whether $JAVA_HOME is already configured.
$ echo $JAVA_HOME

img

If not check the java alternative list for java
$ update-java-alternatives –list

img

Run the following command to setup JAVA_HOME (According to the above alternatives)
$ export JAVA_HOME=&ltpath_to_java&gt
Eg:
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

Now if you echo $JAVA_HOME, it should display as below.

img

Installing Jenkins

First, add the repository key related to the source list.
$ wget -q -O – https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add –

Now let’s add the source to the source.list
$ sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list’

Run the update so apt can use the new repository.
$ sudo apt update

Finally, it’s time to install the Jenkins
$ sudo apt install jenkins

Optional:
However, if you are setting up Jenkins for production, it is highly recommended to use an SSL certificate for the domain to protect passwords. Please refer below article to set up Jenkins with SSL.
https://www.digitalocean.com/community/tutorials/how-to-configure-jenkins-with-ssl-using-an-nginx-reverse-proxy-on-ubuntu-18-04

Configuring Jenkins to run with a different users (Same user as Nginx)

Check the status of the Jenkins with the following command.
$ sudo service jenkins status
If the installation is successful, you should see something like below.

img

Run the following command to see which user runs Jenkins.
$ ps aux | grep jenkins

img

Check the Nginx user
$ ps aux | grep nginx

img

As Jenkins and the Nginx are running with different users, there can be conflicts when doing the deployments. To avoid this best approach is to change the Jenkins user to www-data (Or to change the Nginx users).

Steps to change the Jenkins user.

Stop Jenkins
$ sudo service jenkins stop

Check whether Jenkins is running any more.
$ ps aux | grep jenkins

If there are no Jenkins processes, you can proceed with the steps.
$ sudo vi /etc/default/jenkins

Change the JENKINS_USER parameter value as below. (You can change the group value as well)

img

Also change the owner of the following files and folders.
$ sudo chown -R www-data:jenkins /var/lib/jenkins
$ sudo chown -R www-data:jenkins /var/log/jenkins
$ sudo chown -R www-data:jenkins /var/cache/jenkins

Restart Jenkins
$ sudo service jenkins restart

Check whether the new user is running and the Jenkins user
$ sudo service jenkins status

img

You also need to check whether the process is running accurately.
$ ps aux | grep jenkins

img

Configuring jenkins

  • Once Jenkins installation is finished, you can access the installation by using the below link.
&ltserver_ip&gt:8080
E.g. http://10.0.1.2:8080

img

  • You have to use the password in a given location to log in as an administrator.
    $ cat /var/lib/jenkins/secrets/initialAdminPassword

  • Select suggested plugins

img

  • This process will take some time to complete.

img

  • Enter the credentials and create the first admin user here.

img

  • Next, Confirm the URL – Can keep the default.

  • Proceed to confirm using Jenkins.

Setup Deployment

Create a New Job

  1. Let’s create a cicd folder in the Nginx running users’ home to clone the code in the process.

    Eg: /home/www-data/cicd
    If the home/&ltuser&gt folder does not exist, create it and make the Nginx running user as the owner.
    $ mkdir /home/www-data

    Create the following sub folders and give permission as shown below.
    $ mkdir /home/www-data/cicd/source/&ltproject-name&gt
    $ mkdir /home/www-data/cicd/config/&ltproject-name&gt
    $ chown -Rf www-data:www-data /home/www-data/


  2. Click on the “New Item” link.

    img


  3. Enter item name & Click on Freestyle Project.

  4. Click on the Advanced button on the “General” tab.

  5. Tick “Use custom workspace” and Enter the folder to download the git repository.
    /home/www-data/cicd/source

  6. Scroll down to the source code management section and select Git.

  7. Get the git clone URL from your repository (https) and enter it as below.

    img

  8. Add the credentials for Git by clicking on “Add” -> Jenkins.

  9. Fill the following popup.

    img


  10. Mention the correct branch here.

    img


  11. Scroll down to the Build section and click on “Add build Setup”.

  12. In the dropdown select “Invoke Ant”.

  13. Give the build file name as follows (Default will be build.xml)

    img


  14. Save the settings.

  15. Install Ant in the server.
    $ sudo apt install ant

One more step to set up to conclude the setting up process; That is to place the build.xml file for Ant in the document root.
In our case it’s build_staging.xml as we have overridden the default build.xml to build_staging.xml in the “Build File” field above.

Create build.xml

build.xml is a way to instruct Jenkins to execute a series of commands for the build process. The syntax is self-explanatory, and you can change it as you wish. Here, I am only focussing on automating M1, and you can always change the setting per your requirement.

Eg: Magento 1 example


build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Nomin M1 Staging" default="run task">
   <property name="basedir" value="."/>
   <target name="sync-files" description="Sync files">
       <exec executable="bash" failonerror="true" newenvironment="false">
           <arg line="rsync_staging.sh"/>
       </exec>
   </target>
   <target name="cache-flush" description="Delet default and amasty fpc cache folders">
       <exec executable="rm" failonerror="true">
           <arg line="-rf /var/www/html/eshop-test-git/var/cache /var/www/html/eshop-test-git/var/amasty_fpc/ "/>
       </exec>
   </target>
   <target name="reindex" description="Reindex all the indexes">
       <exec executable="php" failonerror="true">
           <arg line="/var/www/html/eshop-test-git/shell/indexer.php reindexall"/>
       </exec>
   </target>
   <target name="run task" description="Run target one by one">
       <sequential>
           <antcall target="sync-files"/>
           <antcall target="cache-flush"/>
<!--            <antcall target="reindex"/>-->
       </sequential>
   </target>
</project>

rsync_staing.sh

#!/usr/bin/env bash
rsync -avv –exclude=app/etc/local.xml ./app/ /var/www/html/eshop-test-git/app/ –delete
rsync -avv ./errors/ /var/www/html/eshop-test-git/errors/ –delete
rsync -avv ./includes/ /var/www/html/eshop-test-git/includes/ –delete
rsync -avv ./js/ /var/www/html/eshop-test-git/js/ –delete
rsync -avv ./lib/ /var/www/html/eshop-test-git/lib/ –delete
rsync -avv ./other/ /var/www/html/eshop-test-git/other/ –delete
rsync -avv ./shell/ /var/www/html/eshop-test-git/shell/ –delete
rsync -avv ./skin/ /var/www/html/eshop-test-git/skin/–delete
rsync -avv ./.gitignore /var/www/html/eshop-test-git/.gitignore
cp -fv ../../config/nomin-m1/local.xml /var/www/html/eshop-test-git/app/etc/

Eg: Magento 2 example


<?xml version="1.0" encoding="UTF-8"?>
<project name="Nomin M1 Staging" default="run task">
   <property name="basedir" value="."/>

   <target name="sync-app" description="Sync app folder">
       <exec executable="rsync" failonerror="true">
           <arg line="-rv app/ /<document_root_absalute_path>/app/"/>
       </exec>
   </target>
   <target name="sync-skin" description="Sync skin folder">
       <exec executable="rsync" failonerror="true">
           <arg line="-rv skin/ /<document_root_absalute_path>/skin/"/>
       </exec>
   </target>
   <target name="sync-local-xml" description="Copy Local XML">
       <exec executable="rsync" failonerror="true">
           <arg line="-rv ../../config/nomin-m1/local.xml /<document_root_absalute_path>/app/etc/local.xml"/>
       </exec>
   </target>
   <target name="cache-flush" description="Delete default and amasty fpc cache folders">
       <exec executable="rm" failonerror="true">
           <arg line="-rf /<document_root_absalute_path>/var/cache /<document_root_absalute_path>/var/amasty_fpc/ "/>
       </exec>
   </target>
   <target name="reindex" description="Reindex all the indexes">
       <exec executable="php" failonerror="true">
           <arg line="/<document_root_absalute_path>/shell/indexer.php reindexall"/>
       </exec>
   </target>
   <target name="run task" description="Run target one by one">
       <sequential>
           <antcall target="sync-app"/>
           <antcall target="sync-skin"/>
           <antcall target="sync-local-xml"/>
           <antcall target="cache-flush"/>
           <antcall target="reindex"/>
       </sequential>
   </target>
</project>

Eg: Magento 2


<?xml version="1.0" encoding="UTF-8"?>
<project name="php testing" default="run task">
   <property name="basedir" value="."/>

   <target name="sync" description="Sync New code">
       <exec executable="rsync" failonerror="true">
           <arg line="-rv app/ /<document_root_absalute_path>app/"/>
       </exec>
   </target>
   <target name="copy-composer" description="copy extension to test server">
       <exec executable="cp" failonerror="true">
           <arg line="-nf composer.* /<document_root_absalute_path>"/>
       </exec>
   </target>
   <target name="composer-install" description="Install composer updates">
       <exec executable="composer" failonerror="true">
           <arg line="install -d /<document_root_absalute_path>"/>
       </exec>
   </target>
   <target name="deploy-mode-set" description="set up and upgrade">
       <exec executable="php" failonerror="true">
           <arg line="/<document_root_absalute_path>bin/magento deploy:mode:set production"/>
       </exec>

   </target>
   <target name="run task" description="Run target one by one">
       <sequential>
           <antcall target="sync"/>
           <antcall target="copy-composer"/>
           <antcall target="composer-install"/>
           <antcall target="deploy-mode-set"/>
       </sequential>
   </target>
</project>

Conclusion

I have done the basic automation here. With adding better instructions and sometimes using a bash script, you will be able to do a significantly optimised CI/CD process.

Ref:
https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.

6 things that every Magento agency should master in 2020

What is Magento?

Magento is a robust eCommerce platform which you can build online stores on top of. Magento is considered one of the best eCommerce platforms which can be highly customizable and create amazing shopping carts for selling online.

Please read our “What is Magento” blog post to learn more about the Magento store development.

There are more than 250,000 active eCommerce websites backed by Magento. The number is rapidly growing even at the moment of writing this article. Magento eCommerce software is one of the most reputed and robust platforms among the software development companies as the extendability and the flexibility it provides is very high. Magento platform is using the most advanced software development concept and best practices to make sure that it delivers expected security and performance of an eCommerce website. As a Magento development company, we have involved dozens of software development in Magento. Some of them were developed from the sketch and some of them are Magento maintenance of the websites that had been developed by either 3rd party Magento agencies or a Magento open source developer.

One thing we observed in acquiring the 3rd party website for customization, most of them are not able to not extendable or updatable at all. This is because web development has done without following Magento recommended standards.

Caution: Below paragraph can be a bit advanced for non-technical eCommerce online-store owners.

As an example sometimes core files in the vendor folder have been edited for quick fixes which are not recommended at all for Magento software development. When you update a core file manually it will be removed when the next ‘composer install’ runs or once setup the deployment through a repository as core files are not committed to the repository. Another common mistake we have noticed is that writing the model logic in the controller or worst writing raw SQL queries in the view (.phtml) files. I have to mention one more point to end the list of common and critical errors done by most of the experienced eCommerce software developers. Magento 2 utilizes a lot of resources to facilitate the extensibility and it has an advanced fallback mechanism. So to minimize this resource utilization, Magento recommends using Varnish as an HTTP accelerator. What HTTP accelerator does is keep a copy of the full HTML page against the URL when the page is requested for the first time. Then it sends a full static file if someone requests the exact same URL. By generating dynamic content with HTML will avoid using this kind of useful eCommerce software development tools which is vital for the performance. If you are a Magento2 extension development company or Magento Freelance Developer Make sure to avoid the above mistakes as we have seen them more than often. Describing the technique of how to overcome this issue will be out of the scope of this article. If you want to know the best way to handle this comment below so I will write another article for it.

So with that long introduction, let’s dig deep into the points of the main Topic.

1. Learn Magento properly before you start any development

Though it is obvious, there are reasons for mentioning this as our first point. If you need to be a production-ready Magento Developer it would at least take 3 months of training on the platform. Once you have to go through the training it is recommended that you work at least under a senior developer for another 3 months before starting any Magento Development alone. I have come to these numbers based on my own experience of training Magento Software Developers on both Magento 1 and Magento 2 eCommerce platforms. As a bonus, with this article, I am giving away the training schedule I have prepared to train the Magento Developers at NeoSolax. This training schedule has altered over the years by identifying the potential knowledge gaps of the trained developers. Any individual or Magento software development company is welcome to use this as a boilerplate to train your Engineers.

How to Master Magento 2 – For beginners to Advance Guid

2. eCommerce Search Engine Optimization

Should you care about SEO as a developer? Your answer should be yes if you want your merchant to get more and more traffic to increase their sales. Any web developer or web designer should learn at least basic SEO in order to succeed in their career. Magento web developers and Magento web designers should have a good idea about eCommerce SEO as well. This is why almost all the SEO features in the Magento Commerce (Earlier Magento Enterprise) version are available as Magento 2 open source features as well. It is the responsibility of the Magento Agency or the freelance developer to use these available features appropriately and educate your client about the importance of doing content-management correctly from the eCommerce store backend. In order to do so, you should at least have a proper understanding of all the Magento out of Box SEO features correctly. However, if you love to learn more about SEO and the way a search-engine looks at your content, I would recommend subscribing to Neil Patel YouTube channel and follow him through social media.

3. User Experience

Magento UX design is a very important factor of any Magento shopping-cart. After all, it is the storefront that customers experience when they are on your website. Like SEO, it is not only a web designer job to make sure the Magento eCommerce web design has a higher conversion rate. Very often designers come with different backgrounds like Shopify, wooCommerce like CMS based eCommerce platform. I have seen that many of them have great skills to design beautiful websites yet convert less traffic to checkout. In that time, you have to come forward and instruct them to certain factors like having a prominent call to action buttons and to make sure they are easily clickable. Also, you may have to help UX designers to design Mobile first and friendly design. Another factor is sometimes fancy design can be hard to implement and convert to a responsive design with available timeline and budget. That time as a developer you have to make the suggestions to change that will not destroy the aesthetics of design and UX friendliness.

4. Performance Optimization

This is definitely one of the responsibilities of the Developers. Performance is key for the Use Experience, Conversion and SEO. As a best practice, QA should pass a page only after if it performs better with the google page speed. CPU and Memory utilization should be considered when developing each and every function. One wrong function implementation can cause the whole website to be slow. We have integrated a plugin from a 3rd party Magento 2 extension development company and found out that the site becomes very slow. After days of debugging, we realized that it deleted internal caching several times for a request. If you are a Magento extension development company or a developer you should make sure that your extension should be developed according to the Magento guidelines. As I have mentioned earlier also, I have seen a lot of extensions that do not support varnish caching which causes a performance hit. Specifically when it comes to mobile Magento frontend developers should have the understanding to upload the optimized images which should not need to be resized by the CSS.

5. Magento 2 PWA

PWA is the future of web development. It is efficient, reachable, does not need 3rd party permission to host as an App and economical with one code base it can be implemented across several platforms. I was about to forget to mention, it can work up to some extent offline using the cached content as well. Speed is always a complaint with Magento and it is true up to some extent. Most of the time it needed better performing servers when the application is implemented in a way that does not support Varnish Caching. Mainly this is because to generate frontend HTML, the server has to dedicate a lot of CPU power and memory. But with the headless architecture, you do not worry about the server generating the HTML as it will only fetch the data through GraphQL. To make the explanation less technical let’s say that your HTML is performed (Not exactly) and directly rendered to the browser when the first request is going to the server. From there it will only request the data (Not the HTML) from the server. This gives a very less burden for the application server and therefore performance will be very high even when making it scalable. Another plus point will be the ‘new’ Magento frontend developer does not want to learn about the Magento architecture and continue with the knowledge he already has in Angular, VueJs or React.

6. Knowledge in the latest trends in eCommerce.

This is where you become an ‘exceptional developer’ from a ‘developer’. ECommerce is also evolving exponentially as technology. Business approaches of yesterday are obsolete today. It became multi-channel from single-channel, Omni-channel from multi-channel.

Below are some of the technologies that you should keep our eye on.

  • IoT
  • Voice Search
  • Virtual Reality
  • AI
  • Big Data
  • latest secure payment gateway alternatives
  • Mobile commerce
  • B2B trends
  • ERP integrations (API communication Store to and From) and 3rd party integrations like Quickbooks and Email-marketing tools like Mailchimp.
  • Feature release on the other shopping cards like BigCommerce, Shopify, wooCommerce, OpenCart.

Conclusion:

When you read this you should understand that it is not easy to become a good eCommerce solution developer or in our context to become an exceptional Magento developer. You need to learn many things and keep updating your knowledge. If you are Magento website owner or going to be an online business owner, we know it will be hard for you to find a good development team who completes all these criteria to develop your eCommerce site. Do not worry, NeoSolax (Pvt) Ltd has a pool of developers, well trained and experienced developers will deliver a very effective website for your eCommerce business. As a Magento specialized company, we improve our developer’s knowledge through various channels like tech talk and daily mandatory training hours. So, If you are looking for Magento development outsourcing please get in touch with us to set up and give your shoppers an ultimate shopping-experience.

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.

Magento 2 – Guide to be a Top Magento Developer

If you are looking for a spoon feeding course you may need to stop reading from here. This guide will simulate the real world company environment that you have to work in.

In a company, you will not be spoon feeded but you will be guided to overcome difficult situations. When you are a software developer, your best friend will be “Google”. 99% questions you encounter have been previously experienced by someone in the industry and those good developers posted the issues and answers on the internet (You should do the same once you become a level to figure things out on your own). You just need to improve your skills to break down your problem to smaller portions and turn into lexicals and past in the search box.

So if that is the case why do you need training. You need the training for two parts.

  1. To understand the problem and break it to pieces.
  2. Alter the solution you found to match with your problem.

Other than that, you have to learn how to resolve a solution when no help is available (very rarely in the Software Community).

As we mentioned above, we have guidance or most of the time ‘terms to search’. What you need to do is follow the tasks step by step. Only follow the date guid if you are allocating your full time. Do not worry about the duration. Sometimes you will get stuck for days to find a solution for a small issue or a bug created because of a typo. In my opinion more you encounter with those situation, you will get more knowledge. What is important is to grab the knowledge as much as can during your training. As spartans says “SWEAT MORE IN TRAINING — BLEED LESS IN BATTLE”

We are always there to help you. But you must make sure at least you try 2 days to resolve your issue and if you have no luck, you can comment your questions below. We will surely reply to it but may take two 3 days to come back. By that time if you have found the answer (Probably you would), you can post your answer here before we do.

Day 1:

Install Magento, and experience the admin area

  1. Install Ubuntu
  2. Install LEMP: https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04
  3. Create a virtual host neosolax.test
  4. Install Magento community with composer: https://www.simicart.com/blog/magento-2-composer/
  5. Enable Sample data
  6. Install PhpStorm
  7. Setup the project in PhpStorm.
  8. Install xDebug
  9. Subtasks
  10. From the Magento frontend
    1. Add product to the cart
    2. Add product to the wishlist
    3. Complete an order
    4. Create a user
    5. Logout with the user
    6. Log in with the user
    7. Add products to wishlist
    8. Compare products
    9. Add products to cart
    10. Complete the orders
    11. Add new address to the user from the customer account section
    12. View the orders
    13. ReOrder the previous one.
    14. From the magento admin:
    15. Create a category
    16. Create a simple product
    17. Create a Configurable Product
    18. Create Group Product
    19. Create Bundle Product
    20. Create Virtual Product
    21. Create Downloadable product
    22. Create Website
    23. Create Stroe
    24. Create Store View
    25. Create CMS page
    26. Create CMS Block
    27. Include CMS Block in to CMS Page
    28. Change the currency to LKR
    29. Change the timezone to Sri Lanka
    30. Create product attribute
    31. Create product attribute group
    32. Create front-end customer
    33. Create customer group
    34. Create tax group
    35. Create a backend order
    36. Change the order status to invoice
    37. Change the order status to ship
    38. Do a Credit Memo
    39. Create an order from the frontend and cancel it.
    40. Create a paypal sandbox account.
    41. Create a promotion for all the product to give 50% discount at cart
    42. Add a new url to the product that you created before.
    43. Export all the products
Day 2:

Magento Extension Development

To prove you need to learn:
  1. https://inchoo.net/magento-2/how-to-create-a-basic-module-in-magento-2/
  2. https://www.mageplaza.com/magento-2-module-development/how-to-create-crud-model-magento-2.html#step-1-setup-script
Day 3

Magento Theme

To prove you need to learn:
  1. https://www.mageplaza.com/devdocs/how-to-create-magento-2-theme.html
  2. https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-apply.html
  3. https://www.mageplaza.com/magento-2-module-development/view-block-layout-template-magento-2.html
Day 4/5:

Start Developing the first Magento Model with the knowledge you absorbed

Go through the following tasks and provide detailed estimation in a google sheet before starting the exercise.

  1. Create a sample module NeoSolax_Staff.
  2. Create a database table called employees with below fields.
    1. employee_id
    2. name
    3. email
    4. mobile_number
    5. marital_status
    6. created_at
    7. updated_at
  3. Create a route called {base_url}/neosolax/employee/details
    1. On this route, the user should be presented with a grid that has all the details of the users. (Employee ID, Name, Email, Mobile Number, Marital Status).
    2. Should have another column as “Action” at the end of the column set
    3. It should have two links as ‘Edit’, ‘Delete’. The respective function should trigger upon clicking on them
    4. Also should have a “New” button. The respective function should trigger upon clicking on them
  4. Upon clicking “New” button, it should redirect to {base_url}/neosolax/employee/new. In here, the user should be able to
    1. User should be able to enter the details through a form.
    2. User should be able to save the details.
  5. Upon clicking “Edit” button, it should redirect to {base_url}/neosolax/employee/edit. In here,
    1. User should be presented with existing data.
    2. User should be able to update the details through a form.
    3. User should be able to Save the details.
  6. Upon clicking “Delete” button, it should popup a message for delete confirmation and if the user accepted need to proceed with the delete.
    1. Once delete is the success it should come to the grid view. ({base_url}/neosolax/employee/details)

Note:
Any action should be presented with respective error, success, warning messages.
Concern about the styling as well.
Should add the proper validation.

Day 6:

Magento 2 – Handling dynamic frontend content

  1. https://amasty.com/blog/tips-and-examples-of-using-knockout-in-magento-2/
Day 7:

Magento 2 – Database

  1. https://www.mageplaza.com/magento-2-module-development/how-to-create-crud-model-magento-2.html
Day 8:

Magento 2 – Apply your frontend knowledge

Redo the Day 5 task using KO Js.

Day 9 to 100:

Learn from Magento Guru

https://alanstorm.com/category/magento-2/
  1. Magento 2 for PHP MVC Developers (Tutorials)
  2. Magento 2: Advanced Javascript
  3. Magento 2 and Composer
  4. The Magento 2 Object System
  5. Magento 2 UI Components
  6. Magento 2: uiElement Internals

Once you are done with above, it is recommended to finish below.

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/bk-frontend-dev-guide.html

If you have followed this guide till the end, I would guarantee you that you will become a Magento superstar. Not only that, you would learn any technology within one to two weeks.

One last thing to note, follow the best practices as much as possible and try to write efficient and well documented code always.

With you all the very best for your software engineering career!

More reading

How to Hire a Great Magento Developer (or Magento 2 Developer)

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.

Magento Open-source frontend features – 1. Product

One can say that this Product is the atom of Magento.  A product in Magento can represent any physical product or service to sell.

As a merchant, you need to show the right amounts of accurate information to customers which will help decide and buy. Both visible and invisible information provided here helps the search engine to determine whether to show your product page for its users’ query or not. Placing correct information in the valid HTML tag would be the Basic SEO implementation for your website.

Magento Product Page may have the below-listed information
  1. Product Image (Multiple Images, Videos)
  2. Product Short Description
  3. Stock status
  4. SKU
  5. Price (Special Price)
  6. Custom or Configurable options
  7. Related Products
  8. Upsells Products
  9. Product Detail
  10. Product Information 
  11. Rating and Reviews
  12. Quantity box 
  13. Add to Cart button
  14. Add to Wishlist button
  15. Compare button

Other than the above visible information, product page can have hidden information to help search engines. These are called Meta information.

  1. Title
  2. Meta Description
  3. Meta Key Words

Other places to display products are categories, site search, promotional areas such as “Featured Products”, “Related Products”, “Upsells”, “Cross-Sells”. Most of the time, it will only be a short description of the product with the image and prices displayed in these areas. Other than the information, a product may have “Add to Cart” button, “Add to Wishlist” button, “Compare” button, “Learn More” link and configurable information.

Magento has different types of products to display for different characteristics and functionalities of the physical service or scenarios.

  1. Simple Product
  2. Simple product with custom options
  3. Configurable Product
  4. Virtual Product
  5. Downloadable Product
  6. Grouped Product
  7. Bundle Product

In our next articles, we will discuss the above product types in details.

About Us

At NeoSolax (Pvt) Ltd, we are accountable for the growth of our clients as we know that is what accelerates our success. By providing services not only limited to the technical scope, but we also help our clients to grow their business by acquiring a more extensive customer base. We would do this by making sure that the designs we do, follow best in user experience, a website will develop the best SEO strategies and make sure to maintain the quality and efficiency of the online stores we build.

As the team NeoSolax, we invite you to join us to experience the true e-Evaluation of eCommerce.

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.

What is
Magento

‘Fast delivery’ is the key to success in today’s business world. In eCommerce, arriving a day prior would give an immeasurable advantage to your competitors.

Selling a product online has become a common issue faced by millions today. Software industry always comes with pre-built models to commonly recurring problems. So if the same problem occurs in next time, it is less time consuming with very less effort to provide a solution. Magento is one such platform built for running an eCommerce website quickly and efficiently for people who want to have an eCommerce website to sell their products online.

Selling a product online has become a common issue faced by millions today. Software industry always comes with pre-built models to commonly recurring problems. So if the same problem occurs in next time, it is less time consuming with very less effort to provide a solution. Magento is one such platform built for running an eCommerce website quickly and efficiently for people who want to have an eCommerce website to sell their products online.

Selling online is a science. For that, you need to concentrate on aspects such as user experience (UX), search engine optimisation (SEO), technology stack, performance, conversion optimisation, reporting and measuring. These are other than the necessity features like displaying products, order processing and payments and user management. To develop a platform with such capabilities, one should do hours of research on these topics to implement a successful online store.

With analysers, data scientists, user experience engineers and engineers in different disciplines, Magento researched to identify the best way to present the online content for an eCommerce website. Then they have come up with the “basic model” which suits most of the businesses. This process is an incremental model which they make their “basic model” up to date to compatible with the other industry and internet standards.

Magento is built with the understanding that different businesses have different types of requirement. The extendability Magento provides is impressive. You can add any feature to Magento without touching the core code. Also, its support for the caching helps to speed up your online store and provide a better user experience. Thousands of plugin in the Market place helps Magento developers implement new features with no time. Regular security patches and feature upgrade help to have a more secure online store. Powerful admin area helps to customise many of the features without touching the code.

Above is a brief introduction to Magento and we are going to help you out to understand what are all the features of Magento and how you can use it to your business to gain more traffic and more conversion.

 About Us

At NeoSolax (Pvt) Ltd, we are accountable for the growth of our clients as we know that is what accelerates our success. By providing services not only limited to the technical scope, but we also help our clients to grow their business by acquiring a more extensive customer base. We would do this by making sure that the designs we do, follow best in user experience, a website will develop the best SEO strategies and make sure to maintain the quality and efficiency of the online stores we build.

As the team NeoSolax, we invite you to join us to experience the true e-Evaluation of eCommerce.

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.

Things You should think before starting an eCommerce website

1. What is your niche? ( or not)

There are millions of eCommerce websites today, from a website developed by an eCommerce web development company using platforms such as Magento, WooCommerce to Amazon, eBay, Alibaba like multi-vendor platforms. So, how do you find a Niche Market to move forward? Or is it essential to find a Niche Market? We discussed this point with many of our clients when we consulted them.

Whether to go for a NIche or not depends on your current capacity of the same domain. If you are physically operating the same business, you do not necessarily go for a Nich. However, if you don’t have an established physical store, it is always best to find a niche and start with very few products, 1 to 10 products would be ideal. It would be slow, but steady. When you have fewer products, you can spend all the marketing budget you have on the specific product catalogue and see the real ROI. Once the business running, with the customer inquiries and the knowledge you gain by day to day operation, you can decide which products you are going to add to your store.

We try to focus and do very few things well. And focusing is hard because focusing doesn’t mean saying yes, it means saying no. So we decide not to do a lot of things so we can focus on a handful of things and do them well.
–by  Steve Jobs 

2. Who is your audience?

It would be best if you decided who is your target market for the website, whether it’s toddlers or monkeys in the Amazon (forest). For example, if you are selling baby products, you may not try to sell pregnancy test strips. Sounds too obvious? Yes, but unfortunately, we have seen this approach often than not from many of the businesses who wish to build an eCommerce website.

3. Operation

Most entrepreneurs don’t think of the operation side of the online store until they get the first order. It is advisable to dry run the process before even you start a discussion of the online store development. Also, you need to role-play the process from ordering to delivery before you start with a real customer. Otherwise, it is inevitable to lose your first customer, which, of course, you do not want to happen.

4. What is SEO? In that matter SEM

SEM would play a significant role than you realise. A physical store would get business from the customers who walk by seeing the name board and products in the showcases. Name board and showcases for your website on the internet is the SEO (Search Engine Optimization) or SEM (Search Engine Marketing). With improving SEO, you will get better organic traffic.

Like stores get customers by marketing from the paper advertisements, you need to implement PPC (Pay Per Click) advertisements. With PPC you tell about your business to a target audience. Ads in social media like FB, Youtube and Google are ideal places to start. A detailed article will follow in the future, further explaining this.

5. Choosing the right platform to sell.

You can either sell your products in a sharing platform like eBay, Amazon or sell products on an FB page or in your eCommerce website. Everything has pros and cons. If you have the growth and full control in mind, you should go for your own eCommerce website. Platforms like Magento and WooCommerce can help you to build a website with minimum cost.

Risk of sharing a portion with giants like eBay and Amazon is that with one lousy reputation, your business will end up when you wake up in the morning.

I advise my clients not to build an eCommerce website from scratch as there is no point of reinventing half of the wheel when there are platforms like Magento and WooCommerce available to build sophisticated eCommerce websites.

In our future articles, we will give more information about how to build a Magento website and sell your products in the Amazon and eBay with a few clicks.

About Us


At NeoSolax (Pvt) Ltd, we are accountable for the growth of our clients as we know that is what accelerates our success. By providing services not only limited to the technical scope, but we also help our clients to grow their business by acquiring a more extensive customer base. We would do this by making sure that the designs we do, follow best in user experience, a website will develop the best SEO strategies and make sure to maintain the quality and efficiency of websites we develop.


As the team NeoSolax, we invite you to join us to experience the true e-Evaluation of eCommerce.

ABOUT THE AUTHOR

Muditha Ediriweera is passionate about Magento and has nearly a decade of experience in Magento eCommerce development. He has developed a lot of Magento 1 and Magento 2 sites with both OpenSource (CE) and Commerce (EE) platforms. His experience is not limited as a Developer as he guides a lot of people to discover Magento platform capabilities in both code level as a Magento Trainer and features wise as a Magento solution consultant. Muditha is currently helping merchant to sell products online with Magento as a Founder & CEO at NeoSolax with his high calibre Magento development team.