PrestaShop Module Development
eBook - ePub

PrestaShop Module Development

Fabien Serny

  1. 254 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

PrestaShop Module Development

Fabien Serny

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul 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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
PrestaShop Module Development è disponibile online in formato PDF/ePub?
Sì, puoi accedere a PrestaShop Module Development di Fabien Serny in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Content Management Systems. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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 ...

Indice dei contenuti

  1. PrestaShop Module Development
Stili delle citazioni per 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.