Jump to content
Md Ariful Islam

How can make invisible the domain option from a specific product or product group

Recommended Posts

Hi there,
When we go to order for a domain and hosting then we found 3 option in domain selection.

  1. Register a new domain
  2. Transfer your domain from another registrar
  3. I will use my existing domain and update my nameservers

I create many product group. Can I hide "Register a new domain" and "Transfer your domain from another registrar" options from some product group because here I offer only selling hosting without domain? Can I make invisible the domain option from Order Form Template?

Share this post


Link to post
Share on other sites
On 13/09/2020 at 03:51, Md Ariful Islam said:

I create many product group. Can I hide "Register a new domain" and "Transfer your domain from another registrar" options from some product group because here I offer only selling hosting without domain?

<?php

# Configure Domain Settings For Products
# Written by brian!

function domain_options_for_products_hook($vars) {
	
	if ($vars['templatefile']=="configureproductdomain") {
		$productinfo = $vars['productinfo'];
		if ($productinfo['gid'] == "1") {
			return array("registerdomainenabled" => "", "transferdomainenabled" => "", "domainoption" => "owndomain"); 
		}
	}
}
add_hook("ClientAreaPageCart", 1, "domain_options_for_products_hook");

if you have multiple product groups where the same conditions would apply, then i'd use in_array in that second IF statement - first defining a list of product groups that this would be applied to.

Share this post


Link to post
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