o0ozinkyo0o Posted June 19, 2014 Share Posted June 19, 2014 Hi all, When i create success new customer or complete any an order, in admin has get push notification and show number on icon at header. I just found out code for get notification but don't know code for push after add success be located at where in Core. Can you help me to find it? Thanks you very much. Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted June 19, 2014 Share Posted June 19, 2014 Hi, used tmp-file: your_admin/themes/default/template/header.tpl (id="header_notifs_icon_wrapper") after your admin page load Prestashop create ajax-query to the ajax.php with param `getNotification` for place data to the container if (Tools::isSubmit('getNotifications')) { $notification = new Notification; die(Tools::jsonEncode($notification->getLastElements())); } so you need to view Notification class for customize some actions related with this logic Regards Link to comment Share on other sites More sharing options...
o0ozinkyo0o Posted June 19, 2014 Author Share Posted June 19, 2014 Hi Alex, Thanks for reply, My problem is find out code which push notification after while we add success. It's mean when Object::add() == true then it will response to Back Office. And your solution just get and show it in BO. Regards. Link to comment Share on other sites More sharing options...
Alex Simonchik BelVG Posted June 20, 2014 Share Posted June 20, 2014 Hi again, so you need investigate whole process, 1) you can start from view js/notification.js file witch initiate ajax-request with the `updateElementEmployee` param 2) then admin/ajax.php run $notification->updateEmployeeLastElement() function for update `employer` table 3) Notification::updateEmployeeLastElement() is the point of code where update DB is triggered Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now