![]()
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 ...