Magento 2 Development Essentials - Sample Chapter
Magento 2 Development Essentials - Sample Chapter
ee
Magento 2 Development
Essentials
C o m m u n i t y
Fernando J. Miguel
$ 29.99 US
19.99 UK
P U B L I S H I N G
pl
Sa
m
D i s t i l l e d
Magento 2 Development
Essentials
Get up and running with Magento 2 to create custom solutions,
themes, and extensions effectively
E x p e r i e n c e
Fernando J. Miguel
Preface
Digital buyers are improving economies around the world, and information
technology (IT) provides the necessary subsides to allow customers to buy services
and products over the Internet. According to the research conducted by Statista
(http://goo.gl/BSCiuO), in 2016, 1.12 billion people worldwide are expected to
buy goods and services online.
Since the launch of Amazon.com, the first commercial-free 24-hour e-commerce
website, the universe of software development techniques has evolved, and new
approaches are emerging, such as cloud computingpreviously no more than an
embryonic idea, today a concrete application.
The Magento Commerce company, recognized as the leading e-commerce platform
in the 2015 Internet Retailer Top 1000, B2B 300, and Hot 100 lists, is in constant
evolution since the first Magento Community Edition (CE) system version in 2008.
Launched recently, Magento CE 2.0 has great features and takes advantage of the
newest client-server techniques providing a mature e-commerce system and a
promising professional area to explore.
Magento, used by thousands of merchants for their transactions worth billions,
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 showing you how to set 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
the end of the book, you will have quickly explored all the features of Magento 2 to
create a great solution.
Preface
With ample examples and a practical approach, this book will ensure your success
with this astonishing e-commerce management system.
Enjoy the read.
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:
[1]
Magento Fundamentals
[2]
Chapter 1
XAMPP installation
First of all, let's access the XAMPP website on https://www.apachefriends.org/.
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.
[3]
Magento Fundamentals
The (.exe) installer is the most popular process to install. Download it and execute to
start the installation process, shown as follows:
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.
[4]
Chapter 1
[5]
Magento Fundamentals
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
[6]
Chapter 1
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.
[7]
Magento Fundamentals
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.
[8]
Chapter 1
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.
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.
[9]
Magento Fundamentals
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.
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.
[ 10 ]
Chapter 1
[ 11 ]
Magento Fundamentals
3. Web Configuration: Enter you store address and admin address here:
4. Customize Your Store: In this step you provide the time zone, currency,
and language information:
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:
[ 12 ]
Chapter 1
And you can access the admin area by accessing the URL at http://localhost/
packt/admin-packt:
[ 13 ]
Magento Fundamentals
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.
[ 14 ]
www.PacktPub.com
Stay Connected: