Jump to content

WHMCS Bridge and Hexonet Domainchcker Not Adding Domains to Cart with redirect


Pete1180

Recommended Posts

Hello,

 

I am using i-plugins WHMCS Bridge Pro in my WordPress and the Hexonet domainchecker module. I had a redirect setup with the bridge helper add-on in WHMCS, but when you click order now it did not add the domains to the cart. The web hosting cart seems to work fine, and it stays in WordPress too.

 

I am on WHMCS 7.2.2 and my WHMCS URL is http://www.shimmertechno.com/web-hosting/

 

Before, when I clicked order now, it was redirecting to http://www.shimmertechno.com/services/web-hosting/cart.php?a=confdomains'>http://www.shimmertechno.com/services/web-hosting/cart.php?a=confdomains

 

and the domains were not adding to the cart, I have turned the redirect off and it's working now but it does not stay inside the bridge

 

In WordPress, my WHMCS bridge page is:

 

http://www.shimmertechno.com/services/web-hosting/

 

 

I appreciate any help I can get, thank you in advance..

 

Here is the ispapidomaincheck.tpl code I am looking at, I did modify the URLs to try and match my site config but that did not seem to do the trick, full file is attached.

 


$( document ).ready(function() {
var count = 0;

$("#orderbutton").bind("click", function(e){
	$("#orderbutton").hide();
	$("#orderbuttonloading").show();
	addSelectedpremiumDomainsToCart();
	addSelectedSimpleDomainsToCart();
	location.href = "{/literal}{$modulepath}{literal}../../../../web-hosting/cart.php?a=confdomains";
});

function addAftermarketPremiumToCart(id){
	$.ajax({
		  url:"{/literal}{$modulepath}{literal}../../../../web-hosting/cart.php?a=add&pid=" + id,
		  type: "POST",
		  async: false,
	});
}

function addRegistryPremiumToCart(id,domain){
	$.ajax({
		  type: "POST",
		  async: false,
		  url: encodeURI("{/literal}{$modulepath}{literal}../../../../web-hosting/cart.php?a=add&ajax=1&domains[]="+domain+"&domainselect=1&pid="+id)
	});
}

function addSelectedSimpleDomainsToCart(){
	var params = $("#domainform").serialize();
	$.ajax({
		  url: "{/literal}{$modulepath}{literal}../../../../web-hosting/cart.php?a=add&domain=register",
		  type: "POST",
		  data: params,
		  async: false
	});
}

function addSelectedpremiumDomainsToCart(){
	$("#domainform input[name='premiumdomains[]']:checked").each(function() {

		var premiumarray = $(this).attr("value").split(":");
		var domain = premiumarray[0];
		var class_ = premiumarray[1];

		if (class_ == "PREMIUM_NAMEMEDIA") {
			$.ajax({
				  type: "POST",
				  async: false,
				  dataType:'json',
				  url: "{/literal}{$modulepath}{literal}product.php?page=create&domain=" +  domain + "&class=" + encodeURIComponent(class_) ,
				  success: function(data, textStatus, jqXHR) {
					  if(data["status"] == "ok"){
						  addAftermarketPremiumToCart(data["productid"]);
					  }
				  }
			});
		} else if (class_.indexOf("PREMIUM") !=-1) {
			$.ajax({
				  type: "GET",
				  async: false,
				  url: "{/literal}{$modulepath}{literal}ajax.php?action=getproduct&class=" + encodeURIComponent(class_),
				  dataType:'json',
				  success: function(data, textStatus, jqXHR) {
						if(data["id"]){
							addRegistryPremiumToCart(data["id"],domain);
						}
				  }
			});
		}

	});
}

ispapidomaincheck.zip

Link to comment
Share on other sites

for something like this, you might be better off contacting either i-Plugin support or Hexonet support.... you've got the plugin, a custom orderform, a third-party hexonet module and as it's not really a WHMCS issue, more a conflict between Hexonet and Bridge Pro.

 

i'd be inclined to try i-Plugin support first.

Link to comment
Share on other sites

Hello, I have sent an email to Hexonet and they basically said they could not help me, I did check the URLs and they are correct. I will contact i-plugin support and see what they have to say, thank you for your reply. Hexonet's email is below:

 

Hello Peter,

 

The module was not really designed to work with a WP integration.

If you check in the /modules/addons/ispapidomaincheck/ispapidomaincheck.tpl you will find a function which will add the domain to the cart. The name of the function is: addSelectedSimpleDomainsToCart()

 

In my opinion the URL in the ajax call should be converted to your URL style.

 

Please do not hesitate to contact us if you should have further questions.

 

Best regards,

Anthony Schneider

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