Magento 2 Development Cookbook
eBook - ePub

Magento 2 Development Cookbook

  1. 304 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Magento 2 Development Cookbook

About this book

Over 60 recipes that will tailor and customize your experience with Magento 2

About This Book

  • Solve common problems encountered while extending your Magento 2 store to fit your business needs
  • Delve into the exciting and enhanced features of Magento 2 such as customizing security permissions, intelligent filtered search options, easy third-party integration, among others
  • Learn to build and maintain a Magento 2 shop via a visual-based page editor and customize the look and feel using Magento 2's offerings on the go

Who This Book Is For

This book is for every developer who has knowledge of PHP and wants to extend or customize the functionality of their Magento 2 system. If you have prior experience of the Magento platform, you will find this book useful in exploring the advanced features.

What You Will Learn

  • Install a Magento 2 shop with sample data
  • Upgrade the data in a Magento 1 shop to a Magento 2 shop
  • Manage the look and feel of the shop with custom themes
  • Extend the shop with custom functionality such as forms, grids, and more
  • Accelerate your store with some performance tools
  • Build and structure your own shipping module
  • Test your shop with automated tests and manage your product display

In Detail

With the challenges of growing an online business, Magento 2 is an open source e-commerce platform with innumerable functionalities that gives you the freedom to make on-the-fly decisions. It allows you to customize multiple levels of security permissions and enhance the look and feel of your website, and thus gives you a personalized experience in promoting your business.

Style and approach

This book is packed with a wide range of techniques to modify and extend the functionality of your online store. It contains easy-to-understand recipes starting with the basics and moving on to cover advanced topics. Many recipes work with code examples that can be downloaded from the book's website.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Magento 2 Development Cookbook


Table of Contents

Magento 2 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Upgrading from Magento 1
Introduction
Creating a Magento 1 website with sample data
Getting ready
How to do it...
How it works…
Creating a Magento 2 website
Getting ready
How to do it...
How it works...
There's more...
Preparing an upgrade from Magento 1
Getting ready
How to do it...
How it works...
Upgrading the database
Getting ready
How to do it...
How it works...
There's more...
See also
Using an IDE
Getting ready
How to do it...
There's more...
Writing clean code with PHP MD and PHP CS
Getting ready
How to do it...
How it works...
There's more...
2. Working with Products
Introduction
Configuring the catalog defaults
Getting ready
How to do it
How it works
Working with attribute sets
Getting ready
How to do it
How it works
Working with product types
Getting ready
How to do it
How it works…
There's more…
A simple product
A configurable product
A bundle product
A grouped product
A virtual product
A downloadable product
Adding social media buttons
Getting ready
How to do it
How it works
Embedding an HTML object
Getting ready
How to do it
How it works
Changing the URL of a product page
Getting ready
How to do it
How it works
There's more
3. Theming
Introduction
Exploring the default Magento 2 themes
Getting ready
How to do it...
How it works...
Creating a Magento 2 theme
Getting ready
How to do it...
How it works…
There's more…
Customizing the HTML output
Getting ready
How to do it…
How it works…
Adding extra files to the theme
Getting ready
How to do it…
How it works…
There's more…
Working with LESS
Getting ready
How to do it…
How it works…
There's more…
Changing a page title
How to do it…
How it works…
Working with translations
Getting ready
How to do it…
How it works…
Adding widgets to the layout
Getting ready
How to do it…
How it works…
Customizing email templates
Getting ready
How to do it…
How it works…
4. Creating a Module
Introduction
Creating the module files
Getting ready
How to do it...
How it works...
Creating a controller
Getting ready
How to do it...
How it works...
There's more...
Adding layout updates
Getting ready
How to do it...
How it works...
Adding a translation file
Getting ready
How to do it...
How it works...
Adding a block of new products
Getting ready
How to do it...
How it works...
Adding an interceptor
Getting ready
How to do it...
How it works...
See also
Adding a console command
Getting ready
How to do it...
How it works...
See also...
5. Databases and Modules
Introduction
Creating an install and upgrade script
Getting ready
How to do it...
How it works...
Creating a flat table with models
Getting ready
How to do it...
How it works...
Working with Magento collections
Getting ready
How to do it...
How it works…
Programmatically adding product attributes
Getting ready
How to do it...
How it works...
Repairing the database
Getting ready
How to do it...
How it works...
6. Magento Backend
Introduction
Registering a backend controller
Getting ready
How to do it...
How it works...
Extending the menu
Getting ready
How to do it...
How it works...
Adding an ACL
Getting ready
How to do it...
How it works...
Adding configuration parameters
Getting ready
How to do it...
How it works...
Creating a grid of a database table
Getting ready
How to do it...
How it works...
Working with backend components
Getting ready
How to do it...
How it works...
Adding customer attributes
Getting ready
How to do it...
How it works...
Working with source models
Getting ready
How to do it...
How it works...
7. Event Handlers and Cronjobs
Introduction
Understanding event types
Getting ready
How to do it...
How it works...
See also
Creating your own event
Getting ready
How to do it...
How it works...
Adding an event observer
Getting ready
How to do it...
How it works...
Introducing cronjobs
Getting ready
How to do it...
How it works...
Creating and testing a new cronjob
Getting ready
How to do it...
How it works...
8. Creating a Shipping Module
Introduction
Initializing module configurations
Getting ready
How to do it...
How it works...
See also
Writing an adapter model
Getting ready
How to do it...
How it works...
Extending the shipping method features
Getting ready
How to do it...
How it works...
Adding the module in the frontend
Getting ready
How to do it...
How it works...
9. Creating a Product Slider Widget
Introduction
Creating an empty module
Getting ready
How to do it...
How it works...
Creating a widget configuration file
Getting ready
How to do it...
How it works...
Creating the block and template files
Getting ready
How to do it...
How it works...
Creating a custom configuration parameter
Getting ready
How to do it...
How it works...
There's more...
Finalizing the theming
Getting ...

Table of contents

  1. Magento 2 Development Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Magento 2 Development Cookbook by Bart Delvaux in PDF and/or ePUB format, as well as other popular books in Computer Science & Web Development. We have over one million books available in our catalogue for you to explore.