Jump to content

Domain Related Queries


Netguy

Recommended Posts

Hello,

1) Is there any way I can have different domain purchase prices for different packages or can I disable domain purchase for a particular plan?

2) 339036234_Screenshot2020-01-17at2_26_41PM.thumb.png.fe52b20e5426d804a9d30366659bba39.png

I'm using Hexonet as my domain registrar. Is there any way I can disable Legal Type and Company ID Number or how can I add a small question mark tooltip - I mean which file should I edit for that? 

Link to comment
Share on other sites

8 hours ago, Netguy said:

1) Is there any way I can have different domain purchase prices for different packages

do you mean ourpride.co.uk costs £10 with product A, but £8 with product B ?

promotion codes, product bundles or coding with pricing override hooks would be your main options.

8 hours ago, Netguy said:

or can I disable domain purchase for a particular plan? 

untick the Require Domain checkbox in the particular product setup.

https://docs.whmcs.com/Products_and_Services

8 hours ago, Netguy said:

I'm using Hexonet as my domain registrar. Is there any way I can disable Legal Type and Company ID Number or how can I add a small question mark tooltip - I mean which file should I edit for that? 

https://docs.whmcs.com/Additional_Domain_Fields

Link to comment
Share on other sites

13 hours ago, Netguy said:

For number 1, can you tell me the syntax of pricing override hooks?

of the three options, you decide to choose the coding option! - i'm inclined to think using promo codes would be simpler. 🙂

https://developers.whmcs.com/hooks-reference/shopping-cart/

14 hours ago, Netguy said:

For number 2, by disabling Require Domain - will I be able to compulsorily show a sub-domain?

no and yes. 😕

no - when you disable Require Domain, the cart will no longer take the user to the step of choosing a register/transfer/existing or subdomain option.

yes - you can enable any domain option feature using a hook and define which of the options are available for individual products, product groups etc...

<?php

# 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'] == 1) {
			return array("registerdomainenabled" => "", "transferdomainenabled" => "", "owndomainenabled" => ""); 
		}
	}
}
add_hook("ClientAreaPageCart", 1, "domain_options_for_products_hook");

so in the above example, i've disabled domain registration, domain transfer and use of existing domain for a single product, so assuming that you've enabled a subdomain option in the settings, the subdomain option will be the only shown.

P6W5YUE.png

if you don't want to assume that at least one subdomain option exists and want to check before removing the other domain options, that if statement would become...

if ($productinfo['pid'] == 1 && $vars['subdomain']) {

the linked to thread will give you some other solutions if you want to set the others on a product or group basis, or if you want to use a specific option as a default.

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

Guest
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.

  • 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