Netguy Posted January 17, 2020 Share Posted January 17, 2020 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) 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? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2020 Share Posted January 17, 2020 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 0 Quote Link to comment Share on other sites More sharing options...
Netguy Posted January 17, 2020 Author Share Posted January 17, 2020 @brian! Thanks! For number 1, can you tell me the syntax of pricing override hooks? For number 2, by disabling Require Domain - will I be able to compulsorily show a sub-domain? For number 3, thank you! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 18, 2020 Share Posted January 18, 2020 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. 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. 1 Quote Link to comment Share on other sites More sharing options...
Netguy Posted January 23, 2020 Author Share Posted January 23, 2020 Thanks man. That was very helpful 🙂 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.