Custom Pages showing pricing tables blank or giving error after updation of Hostx-V3.0.0] Print

  • 0

1. Open ftp/cpanel and go to root directory of whmcs.



2. Download all custom pages which you have created apart from the prebuild pages comes. Only download those pages which have page type VPS or you can see the next screenshot and check the similar code.



3.Edit the n in any editor.




4. Remove all the code from here.



5. Now you will have this code remains in file. Now follow next step and copy the code given in next step.



6. Copy this code.

$pageName = basename($_SERVER['PHP_SELF']);
$pageDataCount = Capsule::table("mod_hostx_pages")->where('pageTitle',$pageName)->count();
if($pageDataCount > 0){
	$pageDataFetched = Capsule::table("mod_hostx_pages")->where('pageTitle',$pageName)->first();
	$pageHaveProductsCount = Capsule::table('tblproducts')->where('gid',$pageDataFetched->productGroup)->where('hidden','!=', '1')->count();
	if($pageHaveProductsCount > 0){
		if(file_exists(__DIR__ . '/modules/addons/hostx/pages_data/hostx-vps-class.php')){
			require_once __DIR__ . '/modules/addons/hostx/pages_data/hostx-vps-class.php';
			$intializeVpsPageData = new VPS_HOSTX();
			$getProductInfoVpsPage = $intializeVpsPageData->wgsVpsPagesProductDataFetched($pageName);
			$ca->assign('pageHaveProductData','yes');
			$ca->assign('productsDataCycles', $getProductInfoVpsPage['prodcycles']);
			$ca->assign('productsData', $getProductInfoVpsPage['productInf']);
			$ca->assign('productsDataCount', $getProductInfoVpsPage['pageProductCount']);
		}
	}else{
		$ca->assign('pageHaveProductData','no');	
	}
}else{
	$ca->assign('pageHaveProductData','no');
}
$ca->assign('sidebarHostxRemove', 'true');
$ca->setTemplate('hostx');
$ca->output();

7. Now paste the copied code below and save the file.



8. Now upload the file.


Was this answer helpful?

« Back