thx for the link but this doesn't helped me..
so I tried it on my own..unfortunately it won't work but maybe you have a idea..
here is what I've done so far:
Warning
I just copy & modify & past some code where I was thinking it may work ! don't use this code !
oh and btw.. it's the german version
New Template form
Add two new fields in the ost_email_template table. Just copy the values from message_alert_subj and message_alert_body
I've done it in phpMyAdmin and named the two fields
message_closed_subj
message_closed_body
in include/staff/templates.inc.php line 57
AFTER
Nachricht:
<?=$tpl?>
<?=$errors?>
Supporter beantwortet ein offenes Ticket
Nachricht an den Kunden / User, das sein Ticket beantwortet wurde.
Betreff:
">
<?=$errors?>
ADD
Automatische Antwort an den Kunden / User, wenn sein Ticket geschlossen wurde
Nachricht an den Kunden / User, das sein Ticket geschlossen wurde ( wenn aktiviert ).
Betreff:
">
<?=$errors?>
Nachricht:
<?=$tpl?>
<?=$errors?>
in scp/admin.php line 303
AFTER
if(!$_POST)
$errors='Subject missing';
if(!$_POST)
$errors='Template message required';
ADD
if(!$_POST)
$errors='Subject missing';
if(!$_POST)
$errors='Template message required';
in scp/admin.php line 333
AFTER
',ticket_reply_subj='.db_input(Format:($_POST)).
',ticket_reply_body='.db_input(Format:($_POST)).
ADD
',message_closed_subj='.db_input(Format:($_POST)).
',message_closed_body='.db_input(Format:($_POST)).
Add a new switch in your preferences
in include/staff/preference.inc.php line 297
AFTER
Neue Nachricht:
/>Aktivieren
/>Deaktivieren
ADD
Ticket wird geschlossen:
/>Aktivieren
/>Deaktivieren
The autorespond function
in include/class.tickets.php line 508
AFTER
//If enabled...send confirmation to user. ( New Message AutoResponse)
if($cfg->autoRespONNewMessage() ){
$sql='SELECT message_autoresp_subj,message_autoresp_body FROM '.EMAIL_TEMPLATE_TABLE.
' WHERE cfg_id='.db_input($cfg->getId()).' AND tpl_id='.db_input($cfg->getDefaultTemplateId());
$resp=db_query($sql);
if($resp && list($subj,$body)=db_fetch_row($resp)){
$subj = str_replace("%ticket", $this->getExtId(),$subj);
$body = str_replace("%ticket", $this->getExtId(),$body);
$body = str_replace("%name", $this->getName(),$body);
$body = str_replace("%email", $this->getEmail(),$body);
$body = str_replace("%url", $cfg->getBaseUrl(),$body);
$body = str_replace("%signature",$dept->isPublic()?$dept->getSignature():'',$body);
$from=$fromName=null;
if($dept->noreplyAutoResp()){
$from=$cfg->getNoReplyEmail();
}else{
$email=$dept->isPublic()?$dept->getEmail():$cfg->getDefaultEmail();
$from=$email->getEmail();
$fromName=$email->getName();
//Reply separator tag.
if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()))
$body ="\n$tag\n\n".$body;
}
Misc:($this->getEMail(),$subj,$body,$from,$fromName);
}
}
ADD
//If enabled...send confirmation to user. ( Closed Message AutoResponse)
if($cfg->autoRespONClosedMessage()){
$sql='SELECT message_closed_subj,message_closed_body FROM '.EMAIL_TEMPLATE_TABLE.
' WHERE cfg_id='.db_input($cfg->getId()).' AND tpl_id='.db_input($cfg->getDefaultTemplateId());
$resp=db_query($sql);
if($resp && list($subj,$body)=db_fetch_row($resp)){
$subj = str_replace("%ticket", $this->getExtId(),$subj);
$subj = str_replace("%name", $this->getName(),$subj);
$subj = str_replace("%email", $this->getEmail(),$subj);
$subj = str_replace("%subject", $this->getSubject(),$subj);
$subj = str_replace("%status", $_POST, $subj);
$body = str_replace("%ticket", $this->getExtId(),$body);
$body = str_replace("%name", $this->getName(),$body);
$body = str_replace("%subject", $this->getSubject(),$body);
$body = str_replace("%email", $this->getEmail(),$body);
$body = str_replace("%message", $msg,$body);
$body = str_replace("%status", $_POST, $body);
$body = str_replace("%url", $cfg->getBaseUrl(),$body);
$from=$fromName=null;
if($dept->noreplyAutoResp()){
$from=$cfg->getNoReplyEmail();
}else{
$email=$dept->isPublic()?$dept->getEmail():$cfg->getDefaultEmail();
$from=$email->getEmail();
$fromName=$email->getName();
//Reply separator tag.
if($cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()))
$body ="\n$tag\n\n".$body;
}
Misc:($this->getEMail(),$subj,$body,$from,$fromName);
}
}
now I can close the ticket but no email is send..
my apache2 error log says
PHP Warning: Missing argument 3 for Ticket:(), called in /srv/www/testsupport/upload/scp/tickets.php on line 306 and defined in /srv/www/testsupport/upload/include/class.ticket.php on line 728, referer: http://xxxxx/testsupport/scp/tickets.php
why is there an error with the postNote function :
[edit never mind about this error.. I also have it in my "productive" ticket system..
Or is this the wrong way?
Would it be better when I modify the close function so it will send an email?
Greetings
slashdot
PS: sorry for my english/php/html/sql skills I hope it doesn't hurt that much ;)