Jump to content

Removing domain order/transfer/use from cart, allow only subdomain

Recommended Posts


I am looking for a way to edit a order form to only show sub domain option.

What do I have to edit?

Thank you in advance


Share this post

Link to post
Share on other sites
Posted (edited)

Hi Tim,

16 hours ago, Timothé said:

I am looking for a way to edit a order form to only show sub domain option.

What do I have to edit?

you shouldn't need to edit any template...

so a subdomain option can be enabled on a product-by-product basis...


and then I assume you want to remove the other domain options (reg/trans/own) ?

if you don't want to register/tranfser/use existing domains for everything, then you can just disable them in the settings..


... but that would effectively prevent users from registering or transferring a domain with or without a product - so might not be what you want.

you can use hooks to determine which domain option(s) are available with which products...

in the example hook above, the specific product can only use a subdomain option, the other options are removed from the cart order form.


the hook could be expanded to determine which products are subdomain only, or whatever combination of domain options that you want to assign to each product.

Edited by brian!

Share this post

Link to post
Share on other sites


Thank you for the quick answer.

I don't have much experience with Hocks,

Could you show the code for the example above?

Thank you very much.


Share this post

Link to post
Share on other sites

Hi Tim,

1 minute ago, Timothé said:

Could you show the code for the example above?

it was in the above thread. 🙂


# Configure Domain Settings For Products
# Written by brian!

function domain_options_for_products_hook($vars) {
	$productinfo = $vars['productinfo'];
	if ($vars['templatefile']=="configureproductdomain") {
		if ($productinfo['pid'] == "45" && $vars['subdomain']) {
			return array("registerdomainenabled" => "", "transferdomainenabled" => "", "owndomainenabled" => ""); 
add_hook("ClientAreaPageCart", 1, "domain_options_for_products_hook");

what you'll have to do is change the product ID value from "45" to whatever the product ID value is that you want a subdomain only option for... get it working for one product first, and then if you need to expand it to multiple products, we'll cross that next bridge.

Share this post

Link to post
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.

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.

  • Similar Content

    • By PapaKai
      Dear WHMCS Community,
      As we, up to now, did not use this community to promote us and our modules, I'll give it a try.
      To introduce myself: I am the Middleware Department Lead at HEXONET GmbH in Germany. My team is responsible for third-party integrations (WHMCS, Blesta, ...) and for providing tools for custom integrations.
      With HEXONET (located in Germany and Canada) you can easily resell and manage domains. We do our best to support our customers and to improve/extend in direction of specific customer requests.
      We are offering all our modules for free and we have no plans to change this. We have:
      The HEXONET registrar module that is shipped with WHMCS (get in touch with us to get updates as that version is for behind in point of features). Supporting all known WHMCS Domain Registrar Features e.g. IRTP (contact verification), TLD & Pricing Sync, Premium Domains, etc. In general we can also deal with IDN domain names, even though not officially supported by WHMCS. A drop-catching Addon to get Domain Backorders introduced in WHMCS A SSLCert Addon A PremiumDNS Addon A module for high performance availability check A widget offering you a module version overview (to see if there are new versions available) A widget showing your account balance at HEXONET (as we have a prepaid backend system) A module helping you to import domains in case you're starting with WHMCS / transferred to us using a non-whmcs way Find all our modules in our github company space: https://github.com/hexonet. We have big plans in Queue and as said, we do our best supporting our customers.
      Patching / Extending our modules in general happens in short as of existing CI / CD automation.
      If you need assistance when starting with us or if you have any related questions, just get in touch with us / let me know.
      Best Regards
    • By ModulesGarden
      1. Domains Reseller For WHMCS 2.1.0

      Today, much to our delight, we announce that our Domains Reseller For WHMCS has received a number of betterments within the framework of the 2.1.0 update!

      Intrigued about what specifically has changed in this up-to-the-minute module’s version? For starters, the module has embraced an honorable label marking its unblemished support for the WHMCS 7.10 environment. Some of the other useful changes include:
      Empowering your resellers to select and assign any number of previously purchased domains. Possibility for you to choose the default WHMCS slab-based pricing instead of overriding it with your own custom settings. The chance to preview income generated by each of your resellers, thanks to the new “Profit” column implemented into the resellers list. Subject the full changelog to a close examination and let the innovation settle in your business routine for good!

      Learn more about Domains Reseller For WHMCS 2.1.0!

      2. 20% OFF bespoke software is still within your reach!

      As a special boost to your business during the continuously spreading global slowdown, we wish to kindly remind you that we are still handing out discounts so generous as even -20% on each custom implementation paid up by the end of until April.

      If you cannot think of any solution that would be of the best assistance to your business, feel welcome to browse through the list of sample projects we can build for you, let us know what you need and lead your business out of this battleground field unscathed.

      Think big, make your move now and thank yourself later!

      3. Polish Language Translation For WHMCS 1.3.0

      Our very own Polish Language Translation For WHMCS was lately a subject of scrupulous adjustment procedures aimed at converting all the newly added records in WHMCS V7.10.1 into the Polish language.

      As a result, once you choose it as the default language of your WHMCS, you and your clients will get the chance to enjoy all the trailblazing system components in your mother tongue. Were that not enough, the access to our tool’s source code is now more affordable than ever before thanks to the luxurious -20% offer up and running!

      Uncover your WHMCS V7.10.1 in a Polish language version!

      4. Check out also our other recent module updates, all wholly integrated with WHMCS V7.10:
      Account Synchronization For WHMCS - v1.6.6 Amazon EC2 For WHMCS - v1.2.1 Discount Center For WHMCS - v1.4.6 Emoji Picker For WHMCS - v1.1.3 Enom Email For WHMCS - v1.3.6 G Suite For WHMCS - v1.3.2 OVH Public Cloud For WHMCS - v1.0.10 Products Reseller For WHMCS - v1.0.1 Server Allocator For WHMCS - v1.1.4 SolusVM Extended Cloud For WHMCS - v1.9.2 SolusVM Extended VPS For WHMCS - v1.9.2

      Need Custom Software Development For Your Business?
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By gei
      Is anyone still using eNom? How are people dealing with their constant price increases? They have become as unreliable a partner as cPanel.
      We got yet another email last night about price increases - unfortunately we still have a ton of domains with them and are kind of stuck. Does anyone have advice on how to transfer out en masse? ie some strategy for transferring out on renewal?
      Now in addition to the annual spend requirements, they have minimum registration requirements - ie you have to spend $x per year AND register x new domains to maintain your status. We have moved all our new registrations to Hexonet a few years ago because their prices are WAY better, so we register 0 new domains with eNom.
      I'm trying to rid ourselves of partners I consider unreliable like cPanel and eNom to not have to dread every email that comes from them and just waiting for the next price increase.
      As an aside, I highly recommend everyone reach out to Hexonet - their prices are dramatically better than even eNom's "Platinum Plus" tier, and they are very flexible. Support has been excellent (they reply in minutes, vs weeks from eNom), and their WHMCS integration is also much better.
      Domain Search is not working properly...
      It doesn't show any suggestion neither any cost?
      Activity Log Shows Error: Unable to perform route mode test: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received   
      Can anyone help me with this, please?

    • By ksammy2000
      Hello, please I want to know how to fetch domain names and prices from my WHMCS to my website. I also want to know if it can be done for products/services too. Thank you
      Like the image below

  • 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