Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
postlist variable - 17-08-2006, 05:50 PM

Any get the $postlist variable in the autoresponder to work in .90+?

I have a ticket open about it but wanted to know if anyone was using it.
   
Reply With Quote
  (#2) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
18-08-2006, 07:51 PM

Code:
<{foreach key=key value=post from=$postlist}>
<{$post[fullname]}> <{if $post[creator] == "staff"}>(STAFF)<{elseif $post[creator] == "thirdparty"}>(THIRD PARTY)<{elseif $post[creator] == "recipient"}>(RECIPIENT)<{else}>(CLIENT)<{/if}>
<{$language[vtpostedon]}><{$post[date]}>
================================================================================
<{$post[contents]}>

<{/foreach}>
Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#3) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
18-08-2006, 07:55 PM

This gives me a blank email when added

PHP Code:

<{if $ishtml == true}><font face="Verdana, Arial, Helvetica" size="2"><{$ticket[fullname]}>,<BR>
<{
$language[arintro]}><BR>
<
BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[articketid]}></b><{$ticket[fticketid]}><BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[arsubject]}></b><{$ticket[subject]}><BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[ardepartment]}></b><{$ticket[department]}><BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[arpriority]}></b><{$ticket[priority]}><BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[arstatus]}></b><{$ticket[status]}><BR>
<
BR>
<{
$language[arsubfooter]}><a href="<{$swiftpath}>index.php?_m=tickets&_a=viewticket&ticketid=<{$ticket[ticketid]}>"><{$swiftpath}></a><BR><{if $settings[u_sendpw] == && $user[userpasswordtxt] != "" && $user[loginapi_moduleid] == 1}>
&
nbsp;&nbsp;&nbsp;<b><{$language[aremail]}></b><{$ticket[email]}><BR>
&
nbsp;&nbsp;&nbsp;<b><{$language[arpassword]}></b><{$user[userpasswordtxt]}><BR>
<{/if}>
<
BR>
<{foreach 
key=key value=post from=$postlist}>
<{
$post[fullname]}> <{if $post[creator] == "staff"}>(STAFF)<{elseif $post[creator] == "thirdparty"}>(THIRD PARTY)<{elseif $post[creator] == "recipient"}>(RECIPIENT)<{else}>(CLIENT)<{/if}>
<{
$language[vtpostedon]}><{$post[date]}>
================================================================================
<{
$post[contents]}>

<{/foreach}>
<
BR>
<{/if}>
<{
$language[arfooter]}><BR>
<
BR>
<{
$settings[general_companyname]}><{if $queuesignature != ""}><BR><{$queuesignature}><{/if}></font><{else}><{$ticket[fullname]}>,
<{
$language[arintro]}>

    <{
$language[articketid]}><{$ticket[fticketid]}>
    <{
$language[arsubject]}><{$ticket[subject]}>
    <{
$language[ardepartment]}><{$ticket[department]}>
    <{
$language[arpriority]}><{$ticket[priority]}>
    <{
$language[arstatus]}><{$ticket[status]}>

<{
$language[arsubfooter]}><{$swiftpath}>index.php?_m=tickets&_a=viewticket&ticketid=<{$ticket[ticketid]}><{if $settings[u_sendpw] == && $user[userpasswordtxt] != "" && $user[loginapi_moduleid] == 1}>

    <{
$language[aremail]}><{$ticket[email]}>
    <{
$language[arpassword]}><{$user[userpasswordtxt]}>
<{/if}>

<{foreach 
key=key value=post from=$postlist}>
<{
$post[fullname]}> <{if $post[creator] == "staff"}>(STAFF)<{elseif $post[creator] == "thirdparty"}>(THIRD PARTY)<{elseif $post[creator] == "recipient"}>(RECIPIENT)<{else}>(CLIENT)<{/if}>
<{
$language[vtpostedon]}><{$post[date]}>
================================================================================
<{
$post[contents]}>

<{/foreach}>

<{if 
$newscount != 0}>
<{foreach 
key=newskey value=newsitem from=$news}>
<{
$newsitem[index]}>. <{$newsitem[subject]}>
<{
$swiftpath}>index.php?_m=news&_a=viewnews&newsid=<{$newsitem[newsid]}>&group=<{$ticket[tgroup]}>

<{/foreach}>

<{/if}>
<{
$language[arfooter]}>

<{
$settings[general_companyname]}><{if $queuesignature != ""}>
<{
$queuesignature}><{/if}><{/if}> 
   
Reply With Quote
  (#4) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
18-08-2006, 08:11 PM

Try placing it in just the text email part and see if that resolves it. Additionally, check your error_log and let me know the exact PHP error that gets logged.

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#5) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
18-08-2006, 08:11 PM

I also notice that the mailserver returned an error along with the blank email




PHP Code:

----- Transcript of session follows -----
PHP Notice:  Undefined offset:  1 in /var/www/tickets/htdocs/supportsuite/cli/index.php on line 24
PHP Notice
:  Undefined offset:  1 in /var/www/tickets/htdocs/supportsuite/cli/index.php on line 48
PHP Warning
:  fopen(./cache/e7278887b8a9f8de381c234acbc72cdd.php): failed to open streamPermission denied in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 890
PHP Warning
:  fwrite(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 891
PHP Warning
:  fclose(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 892
PHP Parse error
:  parse errorunexpected T_ELSE in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php(900) : eval()'d code on line 50
PHP Warning:  fopen(./cache/e7278887b8a9f8de381c234acbc72cdd.php): failed to open stream: Permission denied in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 890
PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 891
PHP Warning:  fclose(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 892
PHP Parse error:  parse error, unexpected T_ELSE in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php(900) : eval()'
d code on line 50
PHP Warning
:  fopen(./cache/9feb3b387b84fcb17991bd797a3a91c1.php): failed to open streamPermission denied in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 890
PHP Warning
:  fwrite(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 891
PHP Warning
:  fclose(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 892
PHP Warning
:  fopen(./cache/9feb3b387b84fcb17991bd797a3a91c1.php): failed to open streamPermission denied in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 890
PHP Warning
:  fwrite(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 891
PHP Warning
:  fclose(): supplied argument is not a valid stream resource in /var/www/tickets/htdocs/supportsuite/includes/SmartyLight/class.template.php on line 892
554 5.3.0 unknown mailer error 255 
   
Reply With Quote
  (#6) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
18-08-2006, 08:12 PM

1) error_reporting is set to E_ALL rather than E_ALL & ~E_NOTICE

2) Your cache directory doesnt seem to have correct permissions.

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#7) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
18-08-2006, 08:29 PM

I think we have the permissions issue fixed but I get this error now.

PHP Code:

The original message was received at Fri
18 Aug 2006 16:28:19 -0400
from mail
.host.advance.net [69.2.115.92]

  ----- 
The following addresses had permanent fatal errors -----
"|/etc/smrsh/kayako-mail-slurp"
   
(reason255)
   (
expanded from: <kayakod@pluto.host.advance.net>)

  ----- 
Transcript of session follows -----
PHP Notice:  Undefined offset:  1 in /var/www/tickets/htdocs/supportsuite/cli/index.php on line 24
PHP Notice
:  Undefined offset:  1 in /var/www/tickets/htdocs/supportsuite/cli/index.php on line 48
PHP Parse error
:  parse errorunexpected T_ELSE in /var/www/tickets/htdocs/supportsuite/cache/e7278887b8a9f8de381c234acbc72cdd.php on line 51
554 5.3.0 unknown mailer error 255


Final-RecipientRFC822kayakod@pluto.host.advance.net
X
-Actual-RecipientX-Unix; |/etc/smrsh/kayako-mail-slurp
Action
failed
Status
5.0.0
Diagnostic
-CodeX-Unix255
Last
-Attempt-DateFri18 Aug 2006 16:28:19 -0400 
   
Reply With Quote
  (#8) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
18-08-2006, 08:32 PM

1) error_reporting still isnt corrected

2) cache/e7278887b8a9f8de381c234acbc72cdd.php Please email that file over to me at varun AT kayako.com

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#9) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
20-08-2006, 12:13 PM

I sent you the file in a txt attachment.
   
Reply With Quote
  (#10) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
21-08-2006, 03:09 PM

I opened a ticket up to track this issue.

MNK-978202
   
Reply With Quote
  (#11) Old
escMark Offline
New Member
 
Posts: 27
Join Date: Jun 2006
21-08-2006, 09:14 PM

Varun,

I've been trying this code to send entire ticket history to our customers in every reply and it basically works, but I have a couple problems:

<{$language[vtpostedon]}> doesn't seem to produce anything when used in email_staffreply. Similarly for <{$language[vtpostedby]}>. Are only certain language entries available in different templates?

Also, I'd like to display the first entry differently (since it's the new reply to the customer), but I can't figure out how to do that without repeating it (once with $contentshtml, and a second time in the foreach).

Any help would be appreciated!
   
Reply With Quote
  (#12) Old
Varun Shoor Offline
Chief Executive Officer
 
Varun Shoor's Avatar
 
Posts: 2,829
Join Date: May 2003
22-08-2006, 11:12 AM

Hi,
Yes, Language codes are split into sections and we do not load all sections for every template.

Regarding the first entry, Try comparing the ticketpostid with the $ticket[firstpostid]

Regards,

Varun Shoor


Varun Shoor (varun.shoor ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#13) Old
escMark Offline
New Member
 
Posts: 27
Join Date: Jun 2006
23-08-2006, 02:05 PM

Varun,

Thank you, but this is actually the opposite of what I needed. I meant the first post listed, which is in reverse chronological order. It seems that $ticket[lastpostid] SHOULD do what I want, but doesn't, because it's apparently not updated until after the reply email is sent.
   
Reply With Quote
  (#14) Old
escMark Offline
New Member
 
Posts: 27
Join Date: Jun 2006
23-08-2006, 03:51 PM

I was able to work around this using "<= $ticket[lastpostid", but it still seems counterintuitive that this value is not updated.
   
Reply With Quote
  (#15) Old
dnicol Offline
Member
 
Posts: 106
Join Date: Apr 2006
23-08-2006, 04:15 PM

Do you have this working in your auto respodner or just with every ticket message that goes out?
   
Reply With Quote
Reply

Tags
postlist, variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to update a variable in Template sureshkumar.mr SupportSuite, eSupport and LiveResponse 1 27-09-2006 05:51 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46