Jump to content

Conditional Support Departments


Kian

Recommended Posts

Restrict the access to support departments based on the products purchased by users. Define rules as follows.

$department['1'] = array('45', '46', '10');
$department['2'] = array('85', '86', '10');
// Keep adding rules one per line

The key of $department array (the [1] and [2] between square brackets) corresponds to the ID of the support department for which we are creating a rule. The value is an array() of product IDs required for access. In a in nutshell, the above configuration unlocks department #1 to users with product IDs 45, 46 and 10. Department #2 requires 85, 86 and 10.

Here are few more things to consider:

  • submitticket.php doesn't show restricted departments
  • Access via direct link submitticket.php?step=2&deptid=2 triggers a redirect to submitticket.php
  • Department dropdown lists only allowed department
  • The same product can be used for multiple rules
  • Pending, Suspended, Terminated, Cancelled and Fraud products are ignored

Get the Code »

Link to comment
Share on other sites

×
×
  • 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