Jump to content

Pager notifications


s1rk3ls

Recommended Posts

I wanted a way to have new order and ticket notifications sent to my pager or cell-phone - As both my pager and cellphone each have an actual email address, this is easy to do without worrying about SMS or other such things.

 

My problem was that I only wanted a "one liner", not a full-text copy of the order or ticket... So here's what I've come up with so far:

 

In the templates folder, I added the following lines to the bottom of supportticketsubmit-confirm.tpl

 

{php}
mail("pager@provider.com", "New Support Ticket", "New support ticket, #$tid at mydomain.com");
{/php}

 

Now, this covers tickets entered via the "submit ticket" link in the support system, but what about emails piped in?

 

This one was a little trickier - but ended up being so simple :)

 

in the pipe folder, I renamed pipe.php to pipe1.php and created a new pipe.php with the following contents:

 

<?php
mail("pager@provider.com","New Support Ticket", "New support ticket submitted via email");
include("pipe1.php");
?>

 

So far, this takes care of notifying me of any support tickets - and notifications for orders are easy as there is already a checkout script which you can enable in the admin (checkoutscript.php in the includes folder)

 

I just added the following to the bottom:

 

mail("pager@provider.com","New Order", "New order placed at mydomain.com");

Link to comment
Share on other sites

with my cell service - since it's coming across as an email not an SMS, it tries to give me everything - so if someone types up a particularly long trouble ticket, I end up with 4-5+ text messages (1 of 5, 2 of 5, etc) when all I really wanted was a simple notice that someone sent something so I can step into the next room and look at the computer screen.

Link to comment
Share on other sites

  • 1 year later...

Excellent idea, just what I needed. I actually took it further to get the ticket subject, author, and first bit of the message content into the txt message. My messages are limited to 160 characters so this format gives me most of what I need to know at a glance (so I can differentiate between "server down" tickets and "how do I change color?" :lol: )

 

{php}
$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$arrdetail = $this->get_template_vars('clientsdetails');
$fullname = $arrdetail['firstname'] . " " . $arrdetail['lastname'];

mail("pager@domain.tld", "$subject", "From $fullname: $message");
{/php}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated