sysmo Posted November 16, 2018 Share Posted November 16, 2018 Hello, i need to provide a free trial of my hosting account to my clients with a fixed subdomain. I tried in the "other tab" of product configuration to add a subdomain, but when a client order a test account they see all tabs like "register new account" "transfer" and "use subdomain", i need only subdomain how can i do? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 18, 2018 Share Posted November 18, 2018 On 16/11/2018 at 17:00, sysmo said: i need to provide a free trial of my hosting account to my clients with a fixed subdomain. I tried in the "other tab" of product configuration to add a subdomain, but when a client order a test account they see all tabs like "register new account" "transfer" and "use subdomain", i need only subdomain how can i do? you would need to use an action hook to remove the other domain options for this product - it wouldn't be a million miles from the hook I previously posted in the thread below... <?php # Configure Domain Settings For Products # Written by brian! add_hook("ClientAreaPageCart",1,function($vars){ global $productinfo; if ($productinfo['pid'] == "1") { return array( "registerdomainenabled" => "", "transferdomainenabled" => "", "owndomainenabled" => "", "domainoption" => "subdomain" ); } }); the only change you should have to make to the hook is to replace 1 with the product ID value of this trial product that is subdomain only. 0 Quote Link to comment Share on other sites More sharing options...
sysmo Posted November 18, 2018 Author Share Posted November 18, 2018 Hello Briand and thanks, it worked but i have the search form disappear. take a look at the attachment 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 19, 2018 Share Posted November 19, 2018 19 hours ago, sysmo said: it worked but i have the search form disappear. I think the only way that could occur would be if you hadn't yet added the subdomain options for this product (via the other tab as you outlined earlier)... when you add the subdomain options, then you should see the subdomain option (only) in the cart... ... either that, or you've added the wrong Product ID value to the hook and are linking to another product that doesn't have a subdomain option. 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.