Module Tutorials

How to fix prestashop mailalert no voucher code display?

Fix prestashop mailalert no voucher code display bug My prestashop Version 1.1.0.5. I have a problem with mailalert module before, which is the Voucher code and voucher value do not display in the email 'New Order'. If you have same problem, you can fix it in a minute. Open file '/modules/mailalerts/mailalerts.php'. Find line #106 Replace it to All Done! Download Free prestashop modules here

Writing your own Prestashop Module – Part 5

The finishing touches Introduction In this final part of our basic module writing tutorial series we’ll look at the final steps to transform our Tutorialthird module class into a base template that we can use to kick start the writing of new modules. Rather than republish the same old code again we’ll only discuss the changes, but I’ve added a download link at the end of this part so you can grab the final code and use it as the basis for your own projects. We’re going to call this module ...

Create Hooks in 6 easy steps!

Took me quite a while and lots of meddling to figure this out… thought I would share with the rest of you guys on how to create a hook so u can NOT waste the number of hours like I did. 1. Goto your database and modify ps_hook… (ps_ is what I named my database, so it can be replaced by what you named yours.) 2. find the last id_hook number and insert a new number after with the hook that you want to name e.g. I name it ‘cat’ 3. goto the php of the pages you want the hook to be in… e.g f...

Writing your own Prestashop Module – Part 4

Form Validation and Security Introduction While being sufficiently functional for what it does, the module we created in Part 2 does present us with some issues to consider when implementing “real world” modules to extend Prestashop. In particular the user input we captured with our form was written directly to the configuration entry without any checking to determine whether it was valid, nor did we take account of the type of data being entered. In this tutorial we will look at the ge...

Writing your own Prestashop Module – Part 3

Storing Module Configuration Introduction In the third part of this series we’ll look at how we can store configuration data for our modules in the Prestashop database, and how we can allow users to interact with this data to control the module’s behaviour. We will also briefly touch on how we can generate output from our module to provide visual feedback of the configuration changes. Managing user settings We’re going to call this module “TutorialSecond” so we again need to create a...

Writing your own Prestashop Module – Part 2

Creating a basic module Introduction In this second part of the series we will look at creating our first basic Prestashop module that can be controlled from the Back Office. The Module class Similar to the ObjectModel base class, all Prestashop modules are extended from a common base class used to define their basic functionality. The “Module” class provides the interface between the administration screens and your module as well as providing internationalisation and “hook” manageme...

Writing your own PrestaShop Module – Part 1

Introduction There has always been a little bit of Voodoo associated Prestashop modules. This has been mainly down to a lack of documentation available, but never fear — this series of tutorials aim to introduce module writing to the PHP programming masses. This series will look at building our very own fully functional module which will provide all the standard functionality that is the basis for many of the most common modules. It will also provide a basic framework that you can use as a&nb...

How to make Prestashop Modules?

Believe me its really simple to make a prestashop module. All you need to understand how prestashop modules works. I've attached a sample module at the end of this article. Well... All modules are attached with hooks. What is hook? Hook is actually a module holder. By default prestashop have some hooks i.e. rightColumn, leftColumn, payment, paymentReturn, updateOrderStatus, top, footer, productActions, cart, customerAccount, header, productTab, productTabContent, home and lots more. I'll writ...