PrestaShop Module Development
eBook - ePub

PrestaShop Module Development

Fabien Serny

  1. 254 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

PrestaShop Module Development

Fabien Serny

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

The number of e-commerce websites has drastically increased in these past few years. Building your own web store is a complex and expensive task; that's why open source solutions such as PrestaShop have become so successful in tackling this issue. The main interest with open source solutions is that you can easily add or edit features by creating modules.

This practical, hands-on guide provides you with a number of clear, step-by-step exercises to help you understand how PrestaShop works, and also help you add and edit features.

Starting with the basics, this book takes you through complete module development in an effective manner. You will learn about module architecture, what a hook is, and how to use it to add functionalities to PrestaShop. You will also see how to build payment and carrier modules and make your module multistore-ready. Develop PrestaShop modules the right way and make them secure and compliant with different versions of PrestaShop.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es PrestaShop Module Development un PDF/ePUB en línea?
Sí, puedes acceder a PrestaShop Module Development de Fabien Serny en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Sistemas de gestión de contenidos. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2014
ISBN
9781783280254

PrestaShop Module Development


Table of Contents

PrestaShop Module Development
Credits
Foreword
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
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Creating a New Module
First steps
Adding the module configuration
Making a simple configuration form
Summary
2. Hooks
Registering our module on hooks
Changing the position of your module on a hook
Using hooks to display templates
Using the database class to save comments
Displaying comments
Triggering hooks
Adding a hook
The dynamic hooks
Summary
3. Using Context and its Methods
Looking at the Context object
Using the translate method
Adding CSS and JS in your module
Checking compatibilities and dependencies
The compatibility check
The dependency check
Summary
4. Building Module Updates
Creating a database table on module installation
Deleting a table on uninstallation
Upgrading your module
Updating the module code
Adding a callback to options
Summary
5. Front Controllers, Object Models, and Overrides
Using front controllers to create a new page
Creating the front controller
Maintaining compatibility with the Friendly URL option
Creating a small action dispatcher
Displaying the product name and comments
Including CSS and JS media in the controller
Adding a pagination system
Creating routes for a module's controller
Installing overrides with modules
Creating the override class
Editing the template file to display grades on products list
Creating a new method in a native class
Using object models to create cleaner code
Creating the ObjectModel class
Using the ObjectModel class in our module
Placing all the database requests in our ObjectModel class
Using HelperForm to make a scalable form
Cleaning your code using the hook's controller
Summary
6. Admin Controllers and Hooks
Adding an admin controller
Adding and installing a new tab to your admin panel
Uninstalling the tab when the module is uninstalled
Listing comments in your admin controller
Improving the list view
Adding actions on the list view
Creating your own view template
Configuring your form view
Using back office hooks
Attaching your module to a product hook
Displaying comments in a product hook
Displaying comments associated with a customer
Making links between admin sections
Summary
7. The Carrier Module
First step to create a carrier module
Using web services
API description
Module configuration
Creating new carriers
Using web services on shipping cost calculation
Handling carrier update
Displaying relay points
Associating the chosen relay point with the cart
Displaying the customer's choice in the back office
Summary
8. The Payment Module
Creating a payment module
Creating the payment controller
Checking the currency
Validating a cart into an order
Displaying information on the order confirmation page
Creating your own order state
Associating an e-mail with an order state
Working with a third-party API
Updating the module's configuration form
Displaying the new payment method
Building the validation API controller
Summary
9. Multistore
Configuring the multistore feature on your PrestaShop
Enabling the multistore feature
Creating a new shop
Updating the MySQL table of the module
Updating the module code
Updating the ObjectModel class
Using Context in the get method
Updating the AdminController class
Using the Configuration class with multistore
Summary
10. Security and Performance
Securing your module
Protecting your module against directory listing
Forbidding direct access to class and controller files
Protecting your code against SQL injection
Protecting your templates against XSS
Verifying the data with MD5 hash
Searching for malicious code in modules
Checking for unusual e-mail sending
Checking for strange URL calls
Checking the use of eval
Checking the use of system, exec, and backquotes
Checking the use of base64_decode
Wrapping up on this section
Performance and optimization
Using Combine, Compress, and Cache
Using the cache system
Using the Smarty cache
Summary
A. Native Hooks
The list of all the dynamic hooks
Definitions of the variables
Index

PrestaShop Module Development

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt ...

Índice

  1. PrestaShop Module Development
Estilos de citas para PrestaShop Module Development

APA 6 Citation

Serny, F. (2014). PrestaShop Module Development (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/391062/prestashop-module-development-pdf (Original work published 2014)

Chicago Citation

Serny, Fabien. (2014) 2014. PrestaShop Module Development. 1st ed. Packt Publishing. https://www.perlego.com/book/391062/prestashop-module-development-pdf.

Harvard Citation

Serny, F. (2014) PrestaShop Module Development. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/391062/prestashop-module-development-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Serny, Fabien. PrestaShop Module Development. 1st ed. Packt Publishing, 2014. Web. 14 Oct. 2022.