Jump to content

Disallow client to buy more services


postcd

Recommended Posts

Phase II of this will do just what you want.

 

http://forum.whmcs.com/showthread.php?93607-Permanent-Global-Client-Ban-for-WHMCS

 

Phase I has been on the market for a short time now which coveres the registration end of things. We are dev this but we wanted to give some time for the remainder of feedback from phase I before we dive full speed into phase II as you can see in the image of the addon on reply #4 of the link above, phase II section will cover current client ordering.

 

We hope to have phase II on the market by 1 jan 2015

Link to comment
Share on other sites

If you just wanted a simple way to do this for now you could put in place a hook that blocks access to the cart.php page based on the current ip address or the client id if they are logged in:

 

This would go in includes/hooks, you can call it anything such as block_cart.php

 

<?php

function block_cart($vars) {
 $banned_ips = array("192.168.1.1","192.168.1.2","192.5.5.2");
 $banned_client_ids = array(153,10,122,2);

 if ($vars["filename"] == "cart" && (in_array($_SESSION['uid'], $banned_client_ids) || in_array($_SERVER['REMOTE_ADDR'], $banned_ips)) ) {
   header('Location: clientarea.php');
   exit();    
 }
}


add_hook("ClientAreaPage",1,"block_cart");
?>

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