• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Using my own RStickets menu with a twist!

Using my own RStickets menu with a twist! 14 years 7 months ago #8573

Hi there,

I would like to use my own menu for the RStickets extension however I would like to create a My Tickets link that takes the user to a certian page depends on some vairables. This is what I would like to do..

User clicks on Track a previous problem link (my joomla menu) and:

If user is logged in and has previous tickets then take user to usual my tickets page

if user is NOT logged in then take user to login page, than BACK to My tickets after successful login.

if user IS logged in but has NO tickets, take them to a custom article page (eg a page that says you must create a support ticket to be able to track one. Click here to go to the create a ticket page... blah blah)



Is this possible?

thanks
The administrator has disabled public write access.

Re:Using my own RStickets menu with a twist! 14 years 7 months ago #8633

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

Please edit the components/com_rstickets/page/add_ticket.php, and after:

defined('_JEXEC') or die('Restricted access');

add this:

$user = & JFactory::getUser();
$user = $user->id;

$db = & JFactory::getDBO();
$query = "SELECT COUNT(`TicketId`) FROM `#__rstickets_tickets` WHERE `CustomerId`= '" . $user . "' LIMIT 1";
$db->setQuery($query);
$result = $db->loadResult();
//echo $_GET;
if($result == 0 && $_GET == 'add_ticket')
header('Location: http://www.your_link_here.com);
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!