PrestaShop Module Development
eBook - ePub

PrestaShop Module Development

Fabien Serny

  1. 254 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

PrestaShop Module Development

Fabien Serny

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que PrestaShop Module Development est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  PrestaShop Module Development par Fabien Serny en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Ciencia de la computaciĂłn et Sistemas de gestiĂłn de contenidos. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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 ...

Table des matiĂšres

  1. PrestaShop Module Development
Normes de citation pour 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.