Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Magento 2 Development Essentials
Magento 2 Development Essentials

Magento 2 Development Essentials: Get up and running with Magento 2 to create custom solutions, themes, and extensions effectively

eBook
₹799.99 ₹1965.99
Paperback
₹2457.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Magento 2 Development Essentials

Chapter 1. Magento Fundamentals

Magento is a highly customizable e-commerce platform and content management system. Magento is one of the most used e-commerce systems to create online stores around the world by providing management of inventory, orders, customers, payments, and much more. It has a powerful scalable architecture.

Are you ready to start on the world of Magento development?

First of all, we will need to set up our environment. In this book, we will cover how to set up a local environment. It is very important to have this local ecosystem development to work smoothly and in an agile way.

In every chapter of this book, we will work with a mini project. It's kind of a sprint to learn the path. In this chapter, our mission is to create a work environment and understand the basic concepts of Magento (http://magento.com/).

After setting up the environment, you'll study the Magento folder structure and work on a basic Model View Controller (MVC) software architecture pattern and Magento basic setup.

Basically, we will work on this chapter with the following topics:

  • XAMPP PHP development environment
  • Magento e-commerce system
  • Magento system structure
  • Magento basic setup

Are you ready for fun some? Let's go!

XAMPP PHP development environment

The XAMPP is a complete web development environment. On its install package, we can find Apache, MySQL, PHP, and Perl. This is everything that you will want to develop your solutions!

At this time, you can imagine the meaning of XAMPP, but the X before the AMPP has the meaning of cross or cross-platform. So, we have XAMMP: (X) Cross-platform, Apache, Maria DB, PHP, and Perl.

The goal of XAMPP is to build an easy-to-install distribution for developers to get into the world of Apache. XAMPP is a project of Apache Friends (Apache Friends is a non-profit project to promote the Apache web server).

Why we are working with this software? Let's find out:

  • Apache (http://httpd.apache.org/): This has been the most popular web server on the Internet since April 1995 providing secure, efficient, and extensible HTTP services in sync with the current HTTP standards
  • MariaDB (https://mariadb.org/): This strives to be the logical choice for database professionals looking for a robust, scalable, and reliable SQL server
  • PHP (http://php.net/): This is a popular general-purpose scripting language that is especially suited to web development; and, most importantly, it is the main language of Magento
  • Perl (https://www.perl.org/): This is a highly capable, feature-rich programming language with over 27 years of development

So far so good, but how about doing some action?

XAMPP installation

First of all, let's access the XAMPP website on https://www.apachefriends.org/.

XAMPP installation

XAMPP has three distinct versions for different operating systems (OS): Windows, Linux, and OS X. Choose your preferred version to download, and start the installation process.

XAMPP for Windows installation

XAMPP for Windows has three different kinds of installation files:

  • Installer: This is a classic Windows installation method
  • Zip: This method uses compressed files to install manually
  • 7zip: This method uses compressed files to install manually

The (.exe) installer is the most popular process to install. Download it and execute to start the installation process, shown as follows:

XAMPP for Windows installation
  1. You can skip FileZilla FTP Server, Mercury Mail Server, and Tomcat for our installation purposes but feel free to consult Apache Friends Support Forum for further information at https://community.apachefriends.org.
  2. On XAMPP, we have the option to use Bitnami (https://bitnami.com/xampp), but for learning purposes, we will install Magento in a classic way.
  3. Complete the installation by pressing the Finish button.
    XAMPP for Windows installation
  4. In order to start XAMPP for Windows, you can execute xampp-control.exe and start the Apache web server.
  5. To test if everything is working, type http://localhosturl in your favorite web browser. You will see the XAMPP start page:
    XAMPP for Windows installation

XAMPP for Linux installation

XAMPP for Linux has two main versions of installation files:

  • 32-bit version
  • 64-bit version

Choose the file according to your architecture and follow these steps:

  1. Change the permissions to the installer:
    chmod 755 xampp-linux-*-installer.run
  2. Run the installer:
    sudo ./xampp-linux-*-installer.run
    

    XAMPP is now installed below the /opt/lampp directory.

  3. To start XAMPP, execute this command on terminal:
    sudo /opt/lampp/lampp start
    
  4. To test if everything is working, type the http://localhost URL in your favorite web browser. You will see the XAMPP start page:
    XAMPP for Linux installation

XAMPP for OS X installation

To install XAMPP for OS X, you simply need to follow these steps:

  1. Download the DMG image file.
  2. Open the image file to start the installation process.
  3. The steps are pretty much the same as Windows installation.
  4. To test if everything is working, type the http://localhost URL in your favorite web browser. You will see the XAMPP start page:
    XAMPP for OS X installation

The XAMPP htdocs folder is the docroot folder of your server. Everything that you save on htdocs can be accessed via any browser. For example, if you save index.php inside the htdocs root, you can access this script by entering http://localhost/index.php. If you save your file in the packt folder, you can access it by http://localhost/packt/index.php. Piece of cake!

Magento

Magento is an open source content management system for e-commerce websites. It's one of the most important e-commerce systems, which has grown fast since its launch in 2008.

Basically, Magento works with two different types of Magento: Community Edition (CE) and Enterprise Edition (EE). In this book, we will cover CE.

On a study provided by aheadWorks (https://aheadworks.com/) in October 2014, Magento CE has taken the leading position among examined e-commerce platforms.

Magento

Now, we have solid concepts about "where we are going". It's very important to have solids concepts about every aspect that you are working on in this moment. Globally, e-commerce shows a remarkable potential market and Magento professionals are welcome.

Magento installation

First of all, we need to create a user account on the Magento website (http://www.magento.com) to download Magento CE. Click on the top-menu link My Account and after clicking the button labeled Register, fill out the form and confirm your registration.

Once registered, you gain access to download Magento CE. You can access the Products | Open Source/CE and VIEW AVAILABLE DOWNLOADS menus.

Magento installation

On this page, we have three important options:

  • Full Release (ZIP with no sample data): This is a complete download of the last and stable Magento version
  • Full Release with Sample Data (ZIP with sample data): This is important to create example products to our store for testing.
  • Download with Composer: This is the dependency management installation tool

Choose the Full Release with Sample Data (ZIP with sample data) option for downloading Magento. Extract the compressed files in the XAMPP htdocsfolder and rename the folder to packt.

Note

Remember to start Apache and MySQL services on the XAMPP panel before the installation.

Before starting the Magento installation, we'll need to create a new MySQL database instance to store the Magento data. phpMyAdmin is a MySQL web app to manage your database and can be accessed at http://localhost/phpmyadmin/.

Click on the Databases menu and the Create database option to create the packt database.

Magento installation

Now, let's start our Magento installation. On your browser, access http://localhost/packt/setup.

By now, you will see this installation page on your browser:

Magento installation

Let's start the Magento installation by following these steps:

  1. Readiness Check: Check the environment for the correct PHP version, PHP extensions, file permissions, and compatibility.
  2. Add a Database: Fill the database form with your connection information. By default, you can follow the suggestions given here:
    Magento installation
  3. Web Configuration: Enter you store address and admin address here:
    Magento installation
  4. Customize Your Store: In this step you provide the time zone, currency, and language information:
    Magento installation
  5. Create an Admin Account: Enter with personal login information and set the admin address to packt-admin.

After all these steps, we are done! Congratulations! We have our first Magento installation!

You can access your new site by accessing the URL at http://localhost/packt:

Magento installation

And you can access the admin area by accessing the URL at http://localhost/packt/admin-packt:

Magento installation

For more information about Magento installation, access http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html.

Magento MVC architecture

MVC is an architectural software pattern that works with three different but interconnected parts. Its principal mission is to abstract the development work into interdependent layers providing the best practices to documentation and organization of software projects.

The Magento e-commerce solution is written with the PHP Zend framework, which is one of the most powerful PHP frameworks. For more information, access http://framework.zend.com/.

Magento is a configuration-based MVC System. For example, when you develop a module (we will check this in the next chapters), besides creating new files and classes to your module, you need to also create a config.xml file. This file contains all the configuration data for Magento module. These practices abstract some important information that you can easily edit to set the module as you need.

Magento MVC architecture

In this book, we will cover only the very basic Magento software architecture concepts, but it's highly recommended that you to study more software design patterns, especially in our case MVC software architecture needs to be understood well to best experience the field of software development.

Summary

You've now seen what Magento can do; you have installed Magento too. You started to understand the basic concepts of Magento, and certainly, you'll get more experience in developing your own Magento solutions by working in the projects of this book.

In the next chapter, we'll work with some Magento Sell System features.

Left arrow icon Right arrow icon

Key benefits

  • Create unique solutions for Magento 2 by developing and implementing solutions, themes, and extensions
  • Be proficient in the main functionalities, resources, and system structure of Magento 2
  • Get to grips with this practical and hands-on guide to raise your web development skills to the next level

Description

Magento is the e-commerce software and platform trusted by the world's leading brands. Used by thousands of merchants for their transactions worth billions, it provides the flexibility to customize the content and functionality of your website. By strengthening your fundamentals in Magento development, you can develop the best solutions and take advantage of the growing market. This fast-paced tutorial will provide you with skills you need to successfully create themes, extensions, and solutions to Magento 2 projects. This book begins by setting up Magento 2 before gradually moving onto setting the basic options of the Sell System. You will take advantage of Search Engine Optimization aspects, create design and customize theme layout, develop new extensions, and adjust the Magento System to achieve great performance. By sequentially working through the steps in each chapter, you will quickly explore all the features of Magento 2 to create a great solution. With ample examples and a practical approach, this book will ensure your success with this astonishing e-commerce management system.

Who is this book for?

If you are a PHP developer who wants to improve your skills in e-commerce development by creating themes and extensions for Magento 2, then this book is for you.

What you will learn

  • Install and set up the Magento Ecosystem
  • Choose the best options for Magento's Sell System features
  • Work with Search Engine Optimization in Magento
  • Create and customize themes for Magento
  • Develop extensions for new Magento functionalities
  • Package extensions to publish in the Magento Connect network
  • Create Magento solutions for mobile devices
  • Carry out performance adjustments to speed up your Magento system

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 25, 2016
Length: 178 pages
Edition : 1st
Language : English
ISBN-13 : 9781785289897
Vendor :
Magento
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Feb 25, 2016
Length: 178 pages
Edition : 1st
Language : English
ISBN-13 : 9781785289897
Vendor :
Magento
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
₹4500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts
₹5000 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 9,235.97
Magento 2 Development Essentials
₹2457.99
Magento 2 Developer's Guide
₹3127.99
Magento 2 Cookbook
₹3649.99
Total 9,235.97 Stars icon

Table of Contents

10 Chapters
1. Magento Fundamentals Chevron down icon Chevron up icon
2. Magento 2.0 Features Chevron down icon Chevron up icon
3. Working with Search Engine Optimization Chevron down icon Chevron up icon
4. Magento 2.0 Theme Development – the Developers' Holy Grail Chevron down icon Chevron up icon
5. Creating a Responsive Magento 2.0 Theme Chevron down icon Chevron up icon
6. Write Magento 2.0 Extensions – a Great Place to Go Chevron down icon Chevron up icon
7. Go Mobile with Magento 2.0! Chevron down icon Chevron up icon
8. Speeding up Your Magento 2.0 Chevron down icon Chevron up icon
9. Improving Your Magento Skills Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(4 Ratings)
5 star 50%
4 star 0%
3 star 50%
2 star 0%
1 star 0%
rohin Oct 03, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Loved the book
Amazon Verified review Amazon
ROE Jul 02, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Arrived on time and as expected
Amazon Verified review Amazon
Dave May 24, 2016
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
material is ok and good for magento 2 newbies. packt books all have one common: Many mistakes. So some people who don't have good foundations are easy to get lost and give up because of their mistakes.
Amazon Verified review Amazon
AmazonBuyer Sep 16, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Lacking details.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.