Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About anderbytes

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. anderbytes

    WHMCS Hooks, Global vars and includes

    I've already tried that before. Even after the include, trying to "global" it brings nothing to inside a hook/function.
  2. Hello folks, I hope someone can help me. I'm a bit paranoid about organization and good standards of coding, and I've encountered a situation I couldn't find a solution in WHMCS. I have several hooks with needs of constants to define customfields easily, the client ID used for testing, some API key, and other... Today I'm forced to, inside the hook function, declare always the $var being used explicitely across the hook, because if I declare it outside, try to global it inside function, it won't recognize it. Also.. my idea was to have a SINGLE Constants.php outside every hook php file, and have it included. Couldn't make it work either. Has anyone succeded in that?
  3. I have no need for this kind of hook but, I just came to say @brian! you're the best 🙂
  4. anderbytes

    Payment Gateways disallow based on invoice total

    That would be effective for invoice page, but not for cart, because when it's a new client, at the checkout page I don't know yet the client details (he/she is filling in exactly that screen). So I had to check $['language'] and when the client uses our language to browse, I have to assume that he is local and he can pay in our local gateways that can't appear to people outside our country. Anyway, everything worked perfectly! I can't thank you enough!
  5. anderbytes

    Payment Gateways disallow based on invoice total

    Thank you! you are the best! I´ll test this tonight For the other currencies, I wouldn't bother, because this payment method that I have to limit is available only to my country (Brazil), so if I can detect what currency it is (not hard), I can just hide that gateway anyway.
  6. anderbytes

    Order Form Customization

    Have you tried JQuery yet?
  7. This logic-based payment method showing would be useful for us, too. Anyone has a good hook for the invoice view page, for the generation of the payment dropdown, or maybe any tip on the template edit ?
  8. anderbytes

    Payment Gateways disallow based on invoice total

    @brian!, thank you, that will probably work, will test it today. But I guess that still leaves one problem: the same restriction has to work when an invoice is being viewed. Technically that won't forbid the client of opening an invoice and change the payment method to the one that it shouldn't be possible. Consider that allowing clients to change payment gateway is essential, unfortunately I can't remove that possibility. Thanks!
  9. Has anyone ever implemented any hook or template change to create some conditional logic based on payment gatway? We have one Payment Gateway that only has to appear when Invoice total is greater than X. If that's not the case, the payment gateway shouldn't even appear at the dropdown. Is that possible? Thanks!
  10. Hello people, hope someone can help me understand WHMCS here. I don't even know if this is the correct section for this topic, I'm new here. I have a customer that had 2 different invoices with due date in Jan 9th. After some crazy negotiation, I manually changed it's due date to 29th, then postponed again after that, that time to February 20th, and changed all his services due day to 20th. That way, I thought that all the invoices (old and new) would have due date do Feb 20th, where I had put an ultimatum to the customer. My problems started when at Feb 10th (10 days before due date), the new invoice was generated correctly.... but for some reason it cancelled the other 2 pending invoices that I was postponing, and even their services. Had to put it all up again manually in statuses. Has this happened to anyone? Did I do something wrong? Here go some considerations: - That checkbox that allows new invoices to be generated when old ones exists is CHECKED - In the meantime before february started, the invoice adjustments somehow caused invoices to be cancelled, order itens leaving orders, and even invoices getting unlinked from orders. It was crazy, had to manually link them again in DB. I'm not stupid, I'm very aware that probably I did that to my own WHMCS by editing DB fields "thinking" I knew what I was doing the correct fields to be linked. So, more than answering above... can anyone tell me what is the best way to fully understand the relation between invoices / items / orders in WHMCS? Because I beliefe all that started when I tried to adjust some configurable options and due dates inside orders. Thank you!
  11. anderbytes


    Hello everyone, my name is Anderson, I'm a hosting business owner from Brazil called CUBIX, and I'm glad I found this community. As WHMCS is a complex and powerful tool, it also can be very difficult to master, so this community is surely very needed. Thank you all! Anderson CUBIX https://www.cubix.host

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated