PrestaShop Module Development
eBook - ePub

PrestaShop Module Development

Fabien Serny

  1. 254 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

PrestaShop Module Development

Fabien Serny

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist PrestaShop Module Development als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu PrestaShop Module Development von Fabien Serny im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Content Management Systems. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis

  1. PrestaShop Module Development
Zitierstile für 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.