Jump to content


Popular Content

Showing content with the highest reputation on 11/20/20 in all areas

  1. 1 point
    I understand what you are trying to achieve and you probably are like me a number freak. It does bother me for example when I closed fraud accounts that now I have a useless ID I wil never use again. But this is not only true for WHMCS. For example, lets say a bug tracker like Mantis, also creates a unique ID per each bug, even if they are on different projects. Since one bug is just one more record in a table and the ID is created by the database system not the software. The thing is that most developers use this setting (auto increment) because it creates a unique ID on the database automatically and you need this for data consistency as everything can and will change (like username, or name), in the end the number that never changes (and should) it what identifies a unique item. And while you might use this customer identification purposes or product (I do) you need to stop worrying about the number and consider like a trow away setting. Don't completely rely on them and instead try to query the number for each customer in case it has changed (from other systems...) If you really need to match this to the old system, the only solution I can give you is to create dummy accounts in between the users that don't match an ID. Then if you someday register an account manually use one of those positions that hold temp data. Or the other solution is not to use the ID's from WHMCS and like someone else suggested create your own custom field, you can then have a hook that calls this automatically on each new customer registered but now you are replicating what WHMCS does and you need to babysit a parallel number systems that does the same. It all depends on how many customers you have. The logic thing I would do in your case, is just to import the customers in order and then change the ID on my other system to match this. You need to think which one is the most important one and the master. If your new ID's will be assigned from now on forward's by WHMCS (like registering new customers) then the logic here tells you that it's your other system that should take the ID from WHMCS and not the other way around. It would be easier just to change the ID's in the other system and then start with the new numbering system on WHMCS. This is the cheap easy way instead of creating a hook or a new number format. It all of course depends on how many customers you have, but if you need to start hacking around WHMCS then why not just create a script that does the same in the other system? Just create a script or some other task that gets the new ID for each old customers in WHMCS and then updates it automatically in your other platform/software. It's a one time job, and once finished just start using the new ID's created by WHMCS. Do not change or try to tamper with the ID's in WHMCS because they are used in several queries and tables to get data, you will end up with many troubles and your installation will always have troubles afterwards. The unique ID is the primary key in the database and as such has to match with other tables for data consistency.
  2. 1 point
  3. 1 point
    use a bundle.... oh i'm joking! 😃 if you had said it was a product addon, i'd have suggested enabling it in the link... but I guess you're going to tell me that it's a product. the cart uses the session array, so have you tried adding your free product to the $session ?
  4. 1 point
    Would be best to add on: ->where('module', $modulename ) to the query to limit to just your module.
  5. 1 point
    I had the same exact idea years ago. We are both evil 😈 Anyway it's doable using TicketAdminReply to detect and hide the response based on your custom rules (e.g. people from Italy automatically get delayed replies), EmailPreSend to suppress the email notification, PreCronJob to "publish" the ticket with SendEmail API to send the notification we've previosuly aborted. We can make it seem more natural by automatically publishing hidden replies not on fixed times but something like H:M:S where H, M and S vary between a certain number of hours. I support this request 👍 I don't wanna code it myself
  • 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