Jump to content

How to check a subdomain value of product if exists and fetch it?


alankis

Recommended Posts

Hi folks,

 

I have created product with subdomain option. (Setup -> Products/Services -> Edit Product -> Other, and created a Subdomain Options. I have checked in tblproducts, subdomain field exists, but where can I find 'subdomain' value, in which table for every ordered and active product? tblhosting is missing that field.

 

Thanks in advance,

 

Alan

Link to comment
Share on other sites

Alan,

 

it will be in tblhosting under the 'domain' field

 

Yes, I find it now. Is there any way to distinct if there is with product ordered with subdomain or domain? Just to mention, I have tld as subdomain, so I can automate product provisioning and domain registration, because in Croatia national top domain can be registered as free domain (for business subjects domain name is registered according to regulations) or paid domain registration without any restrictions in domain name in registration.

 

Thanks, A

Link to comment
Share on other sites

I have found solution. I will add note (free domain) or similar after subdomain entry, and then regex will do his magic.

 

Or not. As noted in WHMCS docs, "PreModuleCreate", runs on "Runs when the Create function is being run, before any command is sent, but after the variables are loaded. " Which is bad, because it already loads all variables, and I can't modify params['domain'], and then WHMCS is trying to create product, with "domainname.tld (free domain)" in domain name.

 

Any ideas?

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