- Posts: 12
- Thank you received: 0
is there any event system after ticket submit?
- saman2
- Topic Author
- Offline
- New Member
Less
More
3 years 11 months ago #140476
by saman2
ارتباط با من : samansamani2@yahoo.com
is there any event system after ticket submit? was created by saman2
hi
if i want create plugin for notify to custom service or for example send SMS to user, what event or trigger can be use? for example is there any onAfterTicketSubmit?
thank you
if i want create plugin for notify to custom service or for example send SMS to user, what event or trigger can be use? for example is there any onAfterTicketSubmit?
thank you
ارتباط با من : samansamani2@yahoo.com
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 11 months ago #140483
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic is there any event system after ticket submit?
Hello
It was not supported but I just added code to support it. You can download latest package of the extension, upgrade it to your site.
Then you can write a plugin (group helpdeskpro - see plugins/helpdeskpro for some examples) which listen for some event triggers below:
Let me know if you need more assist
Tuan
It was not supported but I just added code to support it. You can download latest package of the extension, upgrade it to your site.
Then you can write a plugin (group helpdeskpro - see plugins/helpdeskpro for some examples) which listen for some event triggers below:
Code:
/*
This event is triggered after ticket stored
*/
public function onAfterStoreTicket($row)
{
// $row is a ticket object
}
/*
This event is triggered when a comment is added to a ticket
*/
public function onAfterStoreComment($row, $ticket)
{
// $row is a comment object
// $ticket is a ticket object
}
Let me know if you need more assist
Tuan
Please Log in or Create an account to join the conversation.
- saman2
- Topic Author
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
3 years 4 months ago #145618
by saman2
ارتباط با من : samansamani2@yahoo.com
Replied by saman2 on topic is there any event system after ticket submit?
i create this plugin but it is not work. do not any action after submit ticket in backend or frontend...
i use this code:
can you put a example developer plugin such as some other joomla extension?
thank you...
i use this code:
Code:
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/***[JCBGUI.class_extends.head.1.$$$$]***/
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/
/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
* Helpdeskpro - Helpdesk_bale_sms plugin.
*
* @package Helpdesk_bale_sms
* @since 1.0.0
*//***[/JCBGUI$$$$]***/
class PlgHelpdeskproHelpdesk_bale_sms extends CMSPlugin
{
/***[JCBGUI.joomla_plugin.main_class_code.1.$$$$]***/
/*
This event is triggered after ticket stored
*/
public function onAfterStoreTicket($row)
{
echo '<pre>';
var_dump($row);
echo '</pre>';
exit();
}
/*
This event is triggered when a comment is added to a ticket
*/
public function onAfterStoreComment($row, $ticket)
{
echo '<pre>';
var_dump($row);
echo '</pre>';
exit();
}/***[/JCBGUI$$$$]***/
public function onViewTicket($row)
{
// echo '<pre>';
// var_dump($row);
// echo '</pre>';
// exit();
}
}
thank you...
ارتباط با من : samansamani2@yahoo.com
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 4 months ago #145638
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic is there any event system after ticket submit?
Guess something wrong with your plugin. You can try to test it using one of Helpdesk Pro core plugins:
1. Enable Helpdesk Pro - Ticket Attachments plugin
2. Add the code below to plugins/helpdeskpro/attachments/attachments.php
Then try to submit a ticket. The code will be executed, you will see the text onAfterStoreTicket triggered
In the xml file which defines the plugin, make sure you set group attribute to helpdeskpro
You can create a new plugin base on one of existing plugin
Tuan
1. Enable Helpdesk Pro - Ticket Attachments plugin
2. Add the code below to plugins/helpdeskpro/attachments/attachments.php
Code:
public function onAfterStoreTicket($row)
{
die('onAfterStoreTicket triggered');
}
Then try to submit a ticket. The code will be executed, you will see the text onAfterStoreTicket triggered
In the xml file which defines the plugin, make sure you set group attribute to helpdeskpro
You can create a new plugin base on one of existing plugin
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.