Practical Module Development for Prestashop 8 Create Modern, Customizable, and Dynamic Online Stores Using Efficient Modules

Elevate your e-commerce game and beat the competition by unleashing the power of PrestaShop 8.x with Symfony-based modules, customizable themes, and much more Purchase of the print or Kindle book includes a free PDF eBook Key Features Understand the data and object architecture of the legacy and new...

Descripción completa

Detalles Bibliográficos
Otros Autores: Authie, Louis, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England : Packt Publishing Ltd [2023]
Edición:First edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009742722106719
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Dedication
  • Contributors
  • Table of Contents
  • Preface
  • Part 1 - Understanding How PrestaShop is Structured and How It Works
  • Chapter 1: Quick Overview of PrestaShop
  • Technical requirements
  • The data model-how and where data is stored
  • Browsing the data
  • Reverse engineering the contact entity
  • Manipulating data by extending the ObjectModel class
  • Using the Db class
  • The core classes - how the MVC works
  • Presenting the legacy core MVC pattern
  • Discovering the core migration
  • Summary
  • Chapter 2: The Configuration and Initialization of PrestaShop
  • Technical requirements
  • The legacy FO controller initialization
  • Initializing a Category FO controller
  • The legacy BO and Symfony admin controller initialization
  • The legacy BO controller initialization
  • The Symfony BO controller initialization
  • The most important constants to set as a developer
  • The Dispatcher class
  • Summary
  • Chapter 3: The Front Office
  • Technical requirements
  • Discovering how an FO controller works
  • Discovering the ControllerCore object
  • Discovering the FrontControllerCore object
  • Discovering the implementation of CmsController
  • Using the model
  • Using the views from the theme
  • Summary
  • Chapter 4: The Back Office
  • Technical requirements
  • Discovering how a legacy-based BO controller works
  • Discovering the AdminController features
  • Exploring the AdminCartsController class
  • The most useful tools for recurrent HTML generation: the Helper classes
  • Generating an edition form with HelperForm
  • Generating an element list table with HelperList
  • Discovering how a migrated Symfony-based BO controller works
  • Handling the form submission
  • Using the CQRS design pattern
  • Using a Command object and its CommandHandler class in the CommandBus.
  • Using a Query and its QueryHandler in the QueryBus
  • Generating table views by using Grid components
  • Summary
  • Chapter 5: The Hooks
  • Technical requirements
  • Quick presentation of a hook
  • Discovering the hook ObjectModel child object
  • Presenting the two types of hook
  • Registering/unregistering a module to a hook and implementing a module's behavior on a hook execution
  • Executing a hook
  • Executing a hook from a legacy controller
  • Executing a hook from a Symfony controller
  • Executing a hook from a Smarty template
  • Executing a hook from a Twig template
  • Summary
  • Chapter 6: The Themes
  • Technical requirements
  • Understanding what a theme is and its structure
  • The FO Smarty templates
  • The most used Smarty constants
  • The CSS/JS assets
  • Embedding the CSS
  • Embedding the JavaScript
  • Summary
  • Part 2 - How to Create Your Own Modules
  • Chapter 7: What Are Modules? Let's Create a Hello World Module
  • Technical requirements
  • Defining a module
  • Creating our first hello world module
  • Overriding the install() and uninstall() methods
  • Defining the hookDisplayHome(params) function
  • Providing the module logo
  • Adding an index.php file for security
  • Installing our first module
  • Summary
  • Chapter 8: A Reinsurance Block Module
  • Technical requirements
  • Defining our module design
  • Creating the module's initial structure
  • Defining the module class
  • Choosing our hooks
  • Defining the install() and uninstall() methods
  • Defining the hook execution handlers
  • Adding a Smarty template view
  • Adding CSS styles to our module
  • Testing our module
  • Summary
  • Chapter 9: A Customer Callback Request Module
  • Technical requirements
  • Defining our module design
  • Creating the module's initial structure
  • Managing the model the modern way
  • Creating the callback request entity.
  • Handling inserting a callback request into the database
  • Sending a notification email
  • Creating a modern BO controller containing a grid to list all the requests
  • Creating a modern admin controller
  • Creating a route in the Symfony router
  • Using the Grid component to generate our callback requests listing view
  • Handling a callback request delete action from the grid
  • Adding the BO controller to the BO menu
  • Creating a configuration page for our module and adding a Symfony form
  • Defining our form type
  • Defining our form data provider
  • Generating the form and displaying it
  • Handling form submission with a form handler
  • Summary
  • Chapter 10: Category Extension Module
  • Technical requirements
  • Presenting the most useful hooks to extend a form and handle it
  • Extending the Category Symfony-based form on the BO Category controller
  • Handling new input from the extended form
  • Cleaning our saved content on Category deletions
  • Defining our module design
  • Creating the module's initial structure
  • Creating the entities
  • Extending the Category form in creation mode
  • Improving the Category form in edition mode
  • Handling the extended form submission
  • Handling Category deletion
  • Displaying saved content on the FO Category page
  • Testing our module
  • Summary
  • Chapter 11: A Simple Blogging Module
  • Technical requirements
  • Defining our module design
  • Designing the general architecture of this module
  • Defining the data structure
  • Designing the BO controllers
  • Designing the FO controllers
  • Creating entities and relationships, repositories, and database tables
  • Creating commands, queries, and data transfer objects
  • Creating BO controllers and routes
  • Creating AdminWHBlogCategoryController and its routes
  • Creating AdminWHBlogPostController and its routes.
  • Adding forms for creating and editing entities
  • Creating Grids
  • Handling deletions
  • Creating the FO controllers and displaying the data
  • Summary
  • Chapter 12: A Cash Payment Module
  • Technical requirements
  • Defining our module design
  • Defining a PrestaShop payment module
  • Creating our module structure
  • Implementing the hookPaymentOptions(params) method
  • Implementing the hookDisplayPaymentReturn(params) method
  • Creating a new order status for orders pending cash payment
  • Creating the payment validation controller
  • Testing our module
  • Summary
  • Chapter 13: A Drive Delivery Module
  • Technical requirements
  • Defining our module design
  • Defining a PrestaShop Carrier module
  • Creating our module structure
  • Creating a WHRelayCart entity to save our chosen relay points
  • Creating a Carrier programmatically
  • Displaying the relay pickup points list during the checkout
  • Handling a relay pickup point choice via an Ajax FO controller
  • Displaying the pickup point on the order view BO controller
  • Creating a Widget to promote our module anywhere on the FO
  • Testing our module
  • Summary
  • Part 3 - Customizing Your Theme
  • Chapter 14: How to Create a Child Theme
  • Technical requirements
  • Discovering what a child theme is
  • Creating a child theme structure
  • Installing and testing our child theme example
  • Summary
  • Chapter 15: Overriding Some Templates
  • Technical requirements
  • Overriding a module template from a (child) theme
  • Overriding a module CSS asset from a (child) theme
  • Overriding a module JavaScript asset from a (child) theme
  • Summary
  • Chapter 16: Assets Compiling with Webpack
  • Technical requirements
  • Understanding what Webpack does and its prerequisites
  • Discovering the structure of a Webpack config file
  • Building assets with Webpack
  • Summary.
  • Appendix - Module Upgrade, The Hooks Discovery Tool, and Multi-Store Functions
  • Getting the hook parameters quickly
  • Making a module multistore-compliant
  • Upgrading a module
  • Index
  • About Packt
  • Other Books You May Enjoy.