Si Posted September 4, 2014 Share Posted September 4, 2014 Does anyone know of an add-on that gives us the option to not only CLOSE a ticket (as is now), but also to CLOSE it without the customer being able to re-open it? 0 Quote Link to comment Share on other sites More sharing options...
wsa Posted September 4, 2014 Share Posted September 4, 2014 I dont think I see something like that 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 4, 2014 Share Posted September 4, 2014 there's always the option to modify the viewticket.tpl template to remove the "Reply" button? e.g, create a new Ticket Status in the admin area... let's call it "Really Closed"... and then modify the viewticket.tpl template to check the ticket status and if "Really Closed", not show the reply and/or close button. so in Default, this would look something like... <p><input type="button" value="{$LANG.clientareabacklink}" class="btn" onclick="window.location='supporttickets.php'" /> {if (!$status|strpos:"Really Closed")} <input type="button" value="{$LANG.supportticketsreply}" class="btn btn-primary" onclick="jQuery('#replycont').slideToggle()" />{if $showclosebutton} <input type="button" value="{$LANG.supportticketsclose}" class="btn btn-danger" onclick="window.location='{$smarty.server.PHP_SELF}?tid={$tid}&c={$c}&closeticket=true'" />{/if}{/if}</p> for this to work with a new ticket status, you couldn't call it just "Closed" as obviously it would match Closed tickets too, but you could probably use "Closed." without any issue. 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted September 4, 2014 Share Posted September 4, 2014 there's always the option to modify the viewticket.tpl template to remove the "Reply" button? If you are using email piping, for replies, this would not prevent them from just replying to a support ticket email and re-opening the ticket. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 4, 2014 Share Posted September 4, 2014 aah... I never thought of that! 0 Quote Link to comment Share on other sites More sharing options...
Si Posted September 4, 2014 Author Share Posted September 4, 2014 there's always the option to modify the viewticket.tpl template to remove the "Reply" button? e.g, create a new Ticket Status in the admin area... let's call it "Really Closed"... and then modify the viewticket.tpl template to check the ticket status and if "Really Closed", not show the reply and/or close button. so in Default, this would look something like... <p><input type="button" value="{$LANG.clientareabacklink}" class="btn" onclick="window.location='supporttickets.php'" /> {if (!$status|strpos:"Really Closed")} <input type="button" value="{$LANG.supportticketsreply}" class="btn btn-primary" onclick="jQuery('#replycont').slideToggle()" />{if $showclosebutton} <input type="button" value="{$LANG.supportticketsclose}" class="btn btn-danger" onclick="window.location='{$smarty.server.PHP_SELF}?tid={$tid}&c={$c}&closeticket=true'" />{/if}{/if}</p> for this to work with a new ticket status, you couldn't call it just "Closed" as obviously it would match Closed tickets too, but you could probably use "Closed." without any issue. Excellent work brian! - this did the job brilliantly. Thank you man!!! P.S. I don't use email piping as I force all customers to submit tickets on the site in the hope the knowledgebase suggestions help with answers. So this does it for me. 0 Quote Link to comment Share on other sites More sharing options...
Si Posted September 28, 2015 Author Share Posted September 28, 2015 Hi Brian!, Is there a hook for doing this now in v6? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2015 Share Posted September 28, 2015 Hi Brian!,Is there a hook for doing this now in v6? I think the previous answer still stands - although the code for viewticket.php is probably simpler now. e.g if you wanted to remove the option to reply to a closed ticket, I would just add the following if statement before the div @ line 19... {if (!$status|strpos:"Closed")} and then add a closing {/if} between the closing div @ line 80 and before the <div class="panel panel-info visible-print-block"> line. that way, if a ticket was closed, the option to reply to re-open would be removed - you'd probably also have to tweak the "This ticket is closed. You may reply to this ticket to reopen it." language entry. as with the previous answer, if you have a "Really Closed" ticket status and want this only to apply to that, then just modify the if statement. with regards to the sidebar, which I assume was the point of your question, the simplest way would be to just remove the footer containing the reply and closed buttons... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Ticket Information'))) { $primarySidebar->getChild('Ticket Information') ->setFooterHtml(''); } }); I suppose it would be possible to modify the footer based on the ticket status, but I don't think that the status value is directly available to the hook... the ticketId is, so if all else fails, you could query the database to get the status... i'm not sure if that's how the hook currently gets the status, but it would be interesting to know... unfortunately, its creation is encrypted, so all we can do is try and reverse engineer based on the output! 0 Quote Link to comment Share on other sites More sharing options...
artaweb Posted April 13, 2020 Share Posted April 13, 2020 Hello, Does this still work in version 7+ ? 0 Quote Link to comment Share on other sites More sharing options...
aonap Posted April 13, 2020 Share Posted April 13, 2020 Would it be possible to get an updated hook? It would be useful to have it for when tickets regarding billing/abuse we would not want the end user to be able to close them. 0 Quote Link to comment Share on other sites More sharing options...
artaweb Posted April 13, 2020 Share Posted April 13, 2020 1 minute ago, aonap said: It would be useful to have it for when tickets regarding billing/abuse we would not want the end user to be able to close them. I think you are misunderstanding this topic. This topic is about closed tickets not being able to open. You probably need something like this. 0 Quote Link to comment Share on other sites More sharing options...
aonap Posted April 13, 2020 Share Posted April 13, 2020 I'm also keen on knowing how to prevent enders from reopening closed tickets. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.