AddThis service allows you to add to your website a great number of bookmarks and major social services buttons, so that customers could share a link with you via any social network.
The script is installed in steps: (more…)
Today I will describe how push-notifications work in Prestаshоp. This article is written as a follow-up to this forum thread.
Default Prestashop features include the following functionalities: new orders, last registrations and open tickets. The module Gаmifiсаtiоn adds one more feature to this list.
There is the class “Notification” which can help to work with push-messages and which includes the following methods:
$this->types = array('order', 'customer_message', 'customer');
These methods are invoked by аjаx-requests, which are initialized from the file js/notification.js
To better understand the work flow of push-notification, we should check the following files:
The module Gаmifiсаtiоn adds data by modifying html after the page is loaded, i.e. hooks to work with push-notification are not provided. The module uses just one hook: hookDisplayBackOfficeHeader. This hook is used only to connect the necessary js-files and libraries. So If you ever need to create your own custom push-notification, then you can use the files of the Gamification module as examples of best-practices.