Jump to content

Subdomain for test account


sysmo

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

RJQsshr.pngQcO3C8R.png

when you add the subdomain options, then you should see the subdomain option (only) in the cart...

BRXD40L.png

UYvwbdC.png

... 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. thanks.png

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