Jump to content

All Activity

This stream auto-updates     

  1. Yesterday
  2. zitu4life

    Manual Admin add a client with no valid email

    yes, did not think in that idea before...instead of using fake emails, I guess somtimes I have created fake emails with domain that do not belong to me...will start using my own domain now.😎
  3. So a client would consume the resources and then it would be reflected on the invoice. This is a step back. A better idea could be if you allowed modifying the value of the number of cPanel accounts in WHM. For example, with a reseller hosting, the client could choose how many sub-accounts they want. For example, if they chose 30, the value of "Limit Reseller by Number" would be 30 at the time of provisioning. And clients could order more sub-accounts from the client area. This would be more helpful. I believe both are possible with existing WHMCS functions and a little bit of realistic willingness.
  4. Why don't just make it optional instead of hypothetical situations?
  5. I'd like to run a check for email opt in on client nav/dashboard items. Easy to check on a .tpl template, but this seems to fail as a php hook. Any help would be appreciated. <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $emailoptin = boolval($_SESSION['marketing_emails_opt_in']); if ($emailoptin){ ... } }); I've come to realize that 'marketing_emails_opt_in' variable is only usable with certain hook functions; of which, there are none to check client details. Is there any way to do this?
  6. I'm looking to basically allow editing of a custom field for a product. I would like to essentially clone how the change password function works but with just one input field and when it saves it updates the custom field and runs a custom function. I have a function and clientareacustombutton which opens a macaddy.tpl file with form input. It seems like the documentation and examples are scarse and missing vital example. function from the module function freeradius_ClientAreaCustomButtonArray() { $buttonarray = array( "Change MacAddress" => "changemac", ); return $buttonarray; } function freeradius_changemac($vars) { return array( 'templatefile' => 'macaddy', 'breadcrumb' => array( 'stepurl.php?action=this&var=that' => 'Change MacAddress', ), 'vars' => $params ); $CurrentMacAddress = $params['customfields']['MacAddress']; if($_POST['newmac']) { $username = $params["username"]; $password = $params["password"]; $newmacaddy = $_POST["newmac"]; shell_exec("/some/path/to/perfect_dark_setup.sh update $username $newmacaddy"); //returns a macaddress as a string like 'c2:eb:e8:31:98:01' Capsule::table('tblcustomfieldsvalues') ->where('relid', '=', $params["serviceid"]) ->where('fieldid', '=', 1) ->update(array( 'value' => $newmacaddy, )); } } macaddy.tpl <form method="post" action="clientarea.php?action=productdetails"> <input type="hidden" name="id" value="{$serviceid}" /> <input type="submit" value="« Back to Service" class="btn" style="float: right;" /> </form> <div class="tab-pane fade in" id="tabChangeMacAddy"> <h3>Change MacAddress</h3> <form class="form-horizontal" method="post" action="/clientarea.php?action=productdetails" role="form"> <input type="hidden" name="id" value="{$serviceid}" /> <input type="hidden" name="a" value="changemac" /> <div id="newMacAddy" class="form-group has-feedback"> <label for="inputNewMacAddy" class="col-sm-4 control-label">New MacAddress</label> <div class="col-sm-5"> <input type="text" class="form-control" id="inputNewMacAddy" name="newmac" autocomplete="off" value="{$newmac}" /> <span class="form-control-feedback glyphicon"></span> <br /> <div class="form-group"> <div class="col-sm-offset-6 col-sm-6"> <input class="btn btn-primary" type="submit" value="Save Changes" /> <input class="btn" type="reset" value="Cancel" /> </div> </div> </form> How it looks currently: After submitting it takes me back to the main product details page and the custom function and update are not executed. I reviewed both the below pages and all tpl and templates I could find that were not encoded for reference, but was unable to determine if form input is not being passed back https://developers.whmcs.com/provisioning-modules/custom-functions/ https://developers.whmcs.com/provisioning-modules/client-area-output/ Probably missing something simple here. Any advice or examples would be helpful. It seems like allowing clients to be able to edit a product's custom field should not be so difficult. Especially since the functionality exists on custom client fields just not implemented on product custom fields 😕 Hoping someone else who has already done this can point me in the right direction. Thanks
  7. not that I am aware of, doesn't an update clear any modifications if there were any?
  8. v2.62 Released (Nov 28, 2019) New option for Horizontal and Vertical listing style
  9. Craft

    Some logs appears on Domain Register

    @brian! any help here? :)
  10. Anyone has an idea if there is a simple way to restrict the payment gateways shown during checkout or on the invoice based on the currency used for the payment? I found below thread from 2016 but maybe there is a cleaner way in the current WHMCS version? Would this be possible using a hook?
  11. IP Manager and DNS Manager combo from ModulesGarden. Use PowerDNSv4 for rDNS backend.
  12. Kian

    I propose a tax-free world

    Yes, it's too late. I can fix invoices fully paid by credit but the real problem is that customers are forced to pay more than they owe with real money. Okay, I can deal with it (issue invoice, add funds etc.) but it makes no sense when you have situations like the following one: Customer owes you 68.93 euro WHMCS wants 92.40 euro You have to refund and invoice 23.47 euro injecting in 3 action hooks with scripts that are a nightmare to follow
  13. Welcome to WHMCS.Community pakhi6600! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  14. brian!

    I propose a tax-free world

    is AfterConfigOptionsUpgrade too late for your needs, or could that be used ?
  15. I'm opening this thread to ask for some help but I have no hope. The problem I'm trying to solve is so frustrating that even describing it is a frustrating experience. It's about Upgrades/Downgrades. Preamble For various reasons (tax regulations in force in several countries) I have to consider Add Funds invoices with tax. Normally when you want to add 100 € funds WHMCS issues a 100 € invoice. Customers pay their taxes when the credit is used to pay other invoices. As I said earlier, this is wrong in several countries (please don't ask me to explain 😩) where you have to charge tax every single time you receive a payment. There are no exceptions to this rule. Now let me take Italy as example where VAT is 22%. When you add 100 € funds, the invoice must be corrected to 100 € + 22 € VAT = 122 € (or 81.97 € + 18.03 € VAT = 100 €). The customer has to pay 122 € (or 100 €) and receives 100 € (or 88.97 €). This way we're fine with taxes but when you solve a puzzle a new one spawns. Every time customers use their VAT-free credit to pay invoices, we have to make sure that they don't pay taxes for credit otherwise they're going to pay taxes twice (when they Add Funds and Apply Credit). That means that we have to return/refund VAT. Let me show you an example. This is what WHMCS normally does: Subtotal: 100 € 22% VAT: 22 € Credit: 122 € Total Due: 0 € This is what we're supposed to do: Subtotal: 100 € 22% VAT: 0 € Credit: 100 € Total Due: 0 € Bonus: this invoice must be suppressed since it makes no sense (no payments involved) Things get complicated when you have to deal with partial credit: Subtotal: 100 € 22% VAT: 22 € Credit: 50 € Total Due: 72 € The Total Due and VAT are both wrong. In fact we have to recalculate tax on Subtotal minus Credit: Subtotal: 100 € 22% VAT: 11 € Credit: 50 € Total: 61 € All this mess have to be applied every time an invoice is issued, updated, has a new transaction or credit applied. As you can imagine coding this thing hurts but we managed to solve it with 185 updates 😨 The problem Now that you know the mechanics involved with credit balance, there's an hardcore problem that I can't solve. We have already wasted 2 weeks. As you probably know, when you Upgrade/Downgrade a product WHMCS does two things: Refunds unused resources for the current cycle Charges for the remainder of the cycle at the new price Let me make an example. I want to remove Backup from my hosting package (-50 €) and add Antispam (+50 €). They're both Configurable Options. WHMCS issues the following invoice: Subtotal: 50 € 22% VAT: 11 € Credit: 50 € Total Due: 11 € Too bad that Total Due and Tax are wrong. This is how it should be: Subtotal: 0 € 22% VAT: 0 € Credit: 50 € Total Due: 0 € Bonus: invoice suppressed Here's another example. This time let's suppose that it's -10 € and +50 €: Subtotal: 50 € 22% VAT: 11 € Credit: 10 € Total Due: 51 € While it should be: Subtotal: 40 € 22% VAT: 8.8 € Credit: 10 € Total Due: 38.8 € The problem is that there are no action hooks that allows to correct numbers. We have: OrderProductUpgradeOverride which is cool but works only for Product Upgrades. There's no equivalent for Configurable Options Upgrades InvoicePaid, UpdateInvoiceTotal, InvoiceCreated. None of them can be used since when they trigger tblorders.invoiceid is still "0" even if the invoice already exists hence I cannot select "refunds" details stored in tblupgrades Another place where I could retreive refunds is tblcredit but WHMCS doesn't store any relid or useful description when it runs Upgrade/Downgrade We're on a dead line with literally no possible solution apart from crazy ones that would require me to remove standard WHMCS Upgrade/Downgrade functionality (cool story) and reinvent it. Probably a new hook point could solve my problem but it scares me. I have no idea why I keep putting myself in such awkward situations, fixing things that very few people even understand / care about. I should start designing templates. They're easy, everyone loves you, you get good reviews and you sleep peacefully 😅
  16. Oh, ShoppingCartValidateDomain hook runs exactly on domain check. That's excellent! Thank you, @brian! !
  17. Hmm, which hook that is? Is it ShoppingCartValidateDomain? I though this is actually called at a later stage, after the domain is already in the cart.
  18. i've previously written code using this hook to block specific words from being searched for... of course, the hook wouldn't prevent suggested domains from appearing.
  19. Another option is to implement a registrar module with just the check domain function. But I'd avoid this fat implementation, if possible.
  20. Welcome to WHMCS.Community Bilal Online! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  21. Hi, Brian, I am aware of that hook, thanks. Ideally I'd be able to show a stop-message when checking for domain availability. But might use it if nothing else is available.
  22. Hi testers! One of the new features added in WHMCS 7.9 Beta 1 is a streamlined PayPal payment experience via PayPal Checkout. Check our our recent feature spotlight blog to learn more about it. During the pre-release testing we want to hear about your experiences with feature. Some potential starting points for discussion are: What was your experience activating and configuring the module? Was the app registration process on the PayPal website clear and easy to understand? Was this easier or more difficult that the previous module's API and IPN configuration process? How was the checkout payment experience? How is the invoice payment experience? Did you encounter any situations or combinations of products/discounts/billing cycles where the amount charged at PayPal differed from the invoice total in WHMCS? In addition to resolving any errors which might occur, understanding any pain points is of particular interest to us. Your input will help us tweak messaging in the product or documentation and publish support articles. Please submit your feedback by reply to this thread or via the feedback form at https://beta.whmcs.com Thanks for your help in the pre-release testing!
  23. ShoppingCartValidateDomain - the user will be in the cart when searching for domains and the hook can return an array of error message(s).
  24. oh if the email address was valid, then I would suspect what you saw to be expected behaviour as the fields you list are just text fields with no formatting validation. - a user could enter those details in older versions, e.g v5.3, if they wanted to without causing an error. i've never been a big fan of enabling registration without ordering as for most circumstances it seems irrelevant - though some WHMCS users prefer registration without ordering as it suits their business model.
  25. Hey, I'm trying to add a hook to prevent all premium domain registration (and show a simple message to contact us) and it seems that I don't have the necessary hook to do this. I can handle the code that checks if a given domain is premium or not (via a custom API request to my domains provider). I just don't have the proper hook to do this. Here's what I've tried: DomainValidation can not return an error: https://developers.whmcs.com/hooks-reference/domain/#domainvalidation (returned array is ignored by WHMCS, just like the docs say). I can't use "global $smarty". Probably globals are disabled and I'd leave it like that for security reasons. I can set a value in $_SSESSION and read it from template, but it seems that the value is sent delayed (if you hit CHECK on domain multiple times, it won't update the value). Any suggestions? Thanks
  26. You can Enable Proforma Invoicing instead.
  1. Load more activity
×

Important Information

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