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