Jump to content

Changing a URL of Hosting Packages in Domain Registration Page


Craft

Recommended Posts

technically, you don't *need* to edit the template - you can use a hook to change the URL in that link.

you should just need to change 'a.logo' to 'a.btn-warning'; the URL you are linking to (and optionally whether it opens in a new window or not) and limit the hook to only work on the domain registration page.

<?php

# Change Hosting URL Hook
# Written by brian!

function change_hosting_url_hook($vars) {
	
	if ($vars['templatefile'] == 'domainregister') {
		return "<script>
$(function(){
   $('a.btn-warning').attr({href:'https://www.google.com',target:'_blank'});
});
</script>";
	}
}
add_hook("ClientAreaFooterOutput", 1, "change_hosting_url_hook");

there is only one button of that class on the page, so that simplifies the coding - if there were more, then more specific identification of the particular link would be needed... or WHMCS could just start adding unique IDs to all their links! 🙄

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