DaCrazyKiwi Posted June 14, 2020 Share Posted June 14, 2020 (edited) Hey guys so i am trying to make it so when the Clients order the minecraft server thru our WHMCS order forum they click on one of the plans with a set RAM Xms and Xmx Amount what is used when the server is made. i have tried following the Example on the TCADMIN Documentation but cant seem to wrap my head around it. On the whmcs forum we have added the Configurable option to pick the amount of ram they want. We have also made a php file in the tcadmin2_advanced with this code in it. But when we order the server it just comes with the Default ram amount and not the amount selected from the list. i know there is going to be some simple way of doing this but i am still learning on how to do all of this so forgive me about my constant lack of knowledge <?php include('default_values.php'); switch ($params["configoptions"]["Ram"]) { case "1GB": $billing_api_values["gamevar_Xms"] = "1024"; $billing_api_values["gamevar_Xmx"] = "1024"; $billing_api_values["game_slots"] = 20; break; case "2GB": $billing_api_values["gamevar_Xms"] = "2048"; $billing_api_values["gamevar_Xmx"] = "2048"; $billing_api_values["game_slots"] = 40; break; case "3GB": $billing_api_values["gamevar_Xms"] = "3072"; $billing_api_values["gamevar_Xmx"] = "3072"; $billing_api_values["game_slots"] = 60; break; case "4GB": $billing_api_values["gamevar_Xms"] = "4096"; $billing_api_values["gamevar_Xmx"] = "4096"; $billing_api_values["game_slots"] = 80; break; case "5GB": $billing_api_values["gamevar_Xms"] = "5120"; $billing_api_values["gamevar_Xmx"] = "5120"; $billing_api_values["game_slots"] = 100; break; case "6GB": $billing_api_values["gamevar_Xms"] = "6144"; $billing_api_values["gamevar_Xmx"] = "6144"; $billing_api_values["game_slots"] = 120; break; } ?> Edited June 14, 2020 by DaCrazyKiwi Link to comment Share on other sites More sharing options...
DaCrazyKiwi Posted June 15, 2020 Author Share Posted June 15, 2020 Hey guys i have figured out how to do this and is all working now. Link to comment Share on other sites More sharing options...
fcke123 Posted January 15, 2021 Share Posted January 15, 2021 On 6/15/2020 at 4:06 AM, DaCrazyKiwi said: Hey guys i have figured out how to do this and is all working now. Can you explain how you fixed? Thank you Link to comment Share on other sites More sharing options...
Dennis Posted January 15, 2021 Share Posted January 15, 2021 @fcke could you post your WHMCS settings and your PHP script? Link to comment Share on other sites More sharing options...
DaCrazyKiwi Posted January 15, 2021 Author Share Posted January 15, 2021 2 hours ago, fcke123 said: Can you explain how you fixed? Thank you Hey i think it was in the product settings we still had the default_values.php on the product instead of puting the new file minecraft.php but i cant really remember sorry Link to comment Share on other sites More sharing options...
fcke123 Posted February 2, 2021 Share Posted February 2, 2021 (edited) On 1/15/2021 at 5:20 AM, Dennis said: @fcke could you post your WHMCS settings and your PHP script? Spoiler where is correct to put these codes like minecraft values? or you recommend create another file like minecraft.php and use default_values.php as include? Edited February 2, 2021 by fcke123 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now