Page 1 of 1

Remove Reply When New Ticket is Submitted

Posted: Fri Feb 18, 2011 8:42 am
by SupportCenter
Im using version 2.1, but already purchased 2.2.

I have it so that people cant reply to tickets and have to wait for our company to reply to them.

When a person submits a ticket, they should not be allowed to reply to the ticket until we reply back. What is happening is when a person opens a new ticket, they can reply immediately to the new ticket. After that, they cant reply until we reply back.

We would like to know to to remove this, if someone opens a ticket, we dont want them to reply back until we reply back. Right now as it stands, they can reply back when they open a new ticket. After that, they cant reply back to the ticket until we reply back to it.

Thanks again.

Re: Remove Reply When New Ticket is Submitted

Posted: Sun Feb 20, 2011 10:16 am
by Klemen
Just below

Code: Select all

$ticket = hesk_dbFetchAssoc($result);
in ticket.php try pasting

Code: Select all

if ($ticket['status'] != 2)
{
	$ticket['locked'] = 1;
}
This should lock the ticket unless it's waiting for a customer reply.

Re: Remove Reply When New Ticket is Submitted

Posted: Thu Feb 24, 2011 2:58 am
by SupportCenter
Works Great Thank you K

Re: Remove Reply When New Ticket is Submitted

Posted: Thu Feb 24, 2011 10:02 pm
by Raven
This is a very logical mod on the surface but not all users will give you all the information that you need right away in their first post. Some of mine remember things after they have submitted their ticket and then add extra stuff to help..

Does make more sense though like this - and I guess if any of the HESK support staff need any further info they can always ask for it in their reply thus opening the ticket back up allowing the customer to add more replies.

I've added this to my installation of HESK and will see how things go for a while.

Thanks ;)

Re: Remove Reply When New Ticket is Submitted

Posted: Tue Mar 08, 2011 11:41 am
by SupportCenter
I tried the code above. and it doesnt work it allows the person to leave one more reply and then removes it once a ticket is opened.

Re: Remove Reply When New Ticket is Submitted

Posted: Tue Mar 08, 2011 12:44 pm
by Raven
No problems here, seems to work perfectly - are you sure you made the correct edits?

Re: Remove Reply When New Ticket is Submitted

Posted: Wed Mar 09, 2011 12:37 pm
by SupportCenter
When the ticket is opened by a user, they can leave one more reply before the reply button is removed. I thought it was something to do with the values. I've changed them both with no avaiability.

Re: Remove Reply When New Ticket is Submitted

Posted: Fri Mar 11, 2011 11:02 pm
by SupportCenter
IF YOU WANT THE CODE TO REALLY WORK THIS IS WHAT YOU DO. IT TOOK SOME TWEAKING BUT NOW EVERYTHING WORKS FINE. SO IF ANY ONE WANTS TO DO IT. THIS IS WHAT YOU DO.

===================================
HOW TO LIMIT NUMBER OF OPEN TICKETS
===================================

1. Locate the submit_ticket.php and below the hesk_dbConnect(); add the following line :

$sql = "SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` WHERE `status` != '1' AND (`email` LIKE '".hesk_dbEscape($email)."' OR `ip` LIKE '".hesk_dbEscape($_SERVER['REMOTE_ADDR'])."')";
$res = hesk_dbQuery($sql);
if (hesk_dbNumRows($res) >= 1)
{
hesk_error("You can have maximum 1 open tickets at a time!");
}

======================================================
HOW TO LIMIT REPLIES ON TICKET TO 1
======================================================

1. In the ticket.php file change the following code from this :

$ticket['status'] != 3 || $hesk_settings['custopen']==1

To this :

if ($ticket['locked'] != 1 && $ticket['status'] != 1 && $ticket['status'] != 1)

===========================================================
REMOVE THE REPLY BUTTON WHEN TICKET IS FIRST OPENED BY USER
===========================================================

1. Open the ticket.php file and locate the following line :

$ticket = hesk_dbFetchAssoc($result);

2. Just below the above line add the following :

if ($ticket['status'] != 1)
{
$ticket['locked'] = 1;
}

Re: Remove Reply When New Ticket is Submitted

Posted: Sat Apr 30, 2011 6:58 pm
by mubdea
is there any way to limit submitting ticket to 1 per session

some times the customer press the submit bottom many time and I got multiple tickets

Re: Remove Reply When New Ticket is Submitted

Posted: Mon May 02, 2011 7:43 pm
by Raven
Hi, you could use a bit of JavaScript on the forms submit button like this for example:

http://javascript.internet.com/forms/di ... ttons.html

Hope that helps ;)

Re: Remove Reply When New Ticket is Submitted

Posted: Sun May 22, 2011 11:37 pm
by Lurking
I have this script but it calls to install script in the "head" and "body" section. There is no "head" or "body" section in a PHP webpage. Anyone know which page has the submit ticket button on it? I searched this forum and the net with no results.