Message for department

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
onlinesrc
Posts: 23
Joined: Wed May 04, 2011 8:18 pm

Message for department

Post by onlinesrc »

I wrote in another post here, about my business and why we need HESK. As a recap, we provide customers with personalized products. Think of mugs, shirts, hats, whatever. I have a customer support department that handles general requests (how soon can I get it, how much does it cost) and a production department who provides clients with samples to proof before they go out.

I been using HESK to send proofs, but now my regular staff wants to use HESK too, so I'm creating two departments. One for production, one for samples. Pretty simple.

Right now, in header.txt, I add some text for buyers explaining how our proofing works. I tell them all proofs must be approved in writing, etc. Obviously, that line does not apply to general customer support inquires. My question is, is it possible to show different messages up top, for different departments?

Like I said, I been adding text to header.txt, and did not know if you could do something like [department0="message here"] and [department1="message here"]

Thanks for any feedback or suggestions.
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Message for department

Post by Klemen »

I guess adding something like this to the header.txt should work:.

But only if category is preselected with the "catid=X" parameter. If not, HESK doesn't know what category will be selected and you would need to use Javascript to detect that and show the appropriate message.

Code: Select all

<?php

if ( ! empty($_GET['catid']) )
{
	$selected_id = intval( hesk_GET('catid') );

	switch ($selected_id)
    {
    	case 1:
	        echo '<p>Message for category ID 1</p>';
	        break;

        case 2:
	        echo '<p>Message for category ID 2</p>';
	        break;
    }
}

?>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
onlinesrc
Posts: 23
Joined: Wed May 04, 2011 8:18 pm

Re: Message for department

Post by onlinesrc »

I'm a bit confused with this code.

I have two departments. Production is #1 and support is #3.

Can't tell in the code how you say this particular message is for id1 and the other is for id3.

Thanks.
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Message for department

Post by Klemen »

case 2 will show message for category id #2.

So case 3 would be for category ID 3, case 15 for category ID 15 etc...

In your case you would use

Code: Select all

       case 1:
           echo '<p>Message for production</p>';
           break;

        case 3:
           echo '<p>Message for support</p>';
           break;
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
onlinesrc
Posts: 23
Joined: Wed May 04, 2011 8:18 pm

Re: Message for department

Post by onlinesrc »

It's not working for me. Nothing shows. The old code showed something, but this code does not show anything in the header.txt. It's blank.
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Message for department

Post by Klemen »

This was just a portion of the code to replace the original one, you need to use the whole code block:

Code: Select all

<?php

if ( ! empty($_GET['catid']) )
{
   $selected_id = intval( hesk_GET('catid') );

   switch ($selected_id)
    {
       case 1:
           echo '<p>Message for production</p>';
           break;

        case 3:
           echo '<p>Message for support</p>';
           break;
    }
}

?>
If you need help modifying the code further you will probably need to hire a PHP developer to help you out.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply