Jump to content

ServerNebula

Member
  • Posts

    4
  • Joined

  • Last visited

About ServerNebula

ServerNebula's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi there, to avoid fraud I really need a hook that allows upgrades/downgrades only once per day (or week). Since a user can upgrade in the morning and downgrade that night and have their credit returned like nothing happened. Is this even possible to track? Thank you Robert
  2. Oh it is mad fancy!! Have spent over 4 months on it actually haha. It's based on Digital ocean's system. In a rush but thought i'd throw up some pics (logo is blurred btw). http://imgur.com/a/L19XV
  3. Oh it is mad fancy!! Have spent over 4 months on it actually haha. It's based on Digital ocean's system. In a rush but thought i'd throw up some pics (logo's are blurred btw.. then I remembered my username LOL). http://imgur.com/a/L19XV
  4. Hi there! I've modified my WHMCS to allow product scaling through a credit system. I like it but, I want to disable upgrade/downgrades for 7 days before allowing it again. This is my plan, I need a little help with the hook though. After a product upgrade (or downgrade) this hook performs. But.. it does not work, what's wrong with it? <?php add_hook('AfterProductUpgrade', 1, function($vars) { $userid = $vars['userid']; $command = "updateclientproduct"; $adminuser = "admin"; $values["clientid"] = $vars["userid"]; $values["description"] = "Updating Last Upgrade Date via ClientAreaUpgrade hook"; $values = array('serviceid' => $params["serviceid"], 'customfields' => base64_encode(serialize(array('Last Upgrade' => echo date('d/m/Y')))); $results = localAPI($command,$values,$adminuser); return array(); } ); I'm hoping to add the system date to their product custom field ("Last Upgrade") when upgrading. Then in the clientarea product details .tpl I can check If the current system date is over 7 days from the saved system date from the custom field. Furthermore showing or not, the upgrade/downgrade buttons. Simple? Thanks!
×
×
  • 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