WillP Posted December 24, 2011 Share Posted December 24, 2011 I am new to WHMCS. I have WHMCS installed in what seems to be the regular fashion - in a folder within the site root. I understand how to create pages that become part of the WHMCS templating system. But these are within the WHMCS folder. I want to create pages that are outside that folder but still part of the template system, in the site root - in particular a site home page. What's the best way to do this? Should I just change paths in the code for the newpage.php files so that they still know where the system is, or what? Will there be problems to doing that which I need to consider? Thanks for any suggestions. 0 Quote Link to comment Share on other sites More sharing options...
kers7754 Posted December 26, 2011 Share Posted December 26, 2011 I am a little confused at what exactly what you are looking for. Here is some basic information and maybe this will help or guide you in the right direction. WHMCS is really just a shopping cart and support email system but it is very versatile that many people use it for lots of other things. There are 2 main ways to use WHMCS. You can use it as your complete website where all your custom pages are built into the system. In this case, WHMCS would be installed not in a sub folder, but in your root of your website. More commonly, WHMCS is just the billing system in which you create your website "in front." For example, your own custom website's landing and sales pages are built at the root of your site. Then when a user wants to buy something, they get sent to your WHMCS system to handle all the details. In the second case, you need to think of your website and WHMCS as 2 separate systems. Then if you are inclined, you can use WHMCS' API as well as other cart buttons that WHMCS offers, to help integrate the two together. So I am ready.... what other questions do you have? 0 Quote Link to comment Share on other sites More sharing options...
WillP Posted December 29, 2011 Author Share Posted December 29, 2011 Thanks for your reply. I think that you are a little confused about what I'm looking for because I'm a little confused as to what I want because of not really understanding WHMCS yet. However, your reply has helped me get things into perspective and I will now go away and think a bit more of what I want to achieve. At the moment I think I prefer what you describe as the second approach. I haven't looked yet at what the API can do, so I will do that and perhaps come back with more questions later. Thanks again. 0 Quote Link to comment Share on other sites More sharing options...
m8internet Posted December 29, 2011 Share Posted December 29, 2011 You may run into a small issue if visitors swap in, out, and back into the WHMCS files (folder) Therefore the template files outside the WHMCS folder will need to be referred to The long solution is to refer to those template files outside the WHMCS folder You would then test this by logging in to WHMCS as a client, removing the keep me logged in, proceeding to your files outside the WHMCS folder, then back to WHMCS If you have been logged out then the dependencies have not been completed The next step would be to add an item to the cart and see if that remains in place (which it should once the above operates correctly) The short solution is to create a new page within WHMCS As above, it really depends on why you want, need, or require separate sections on the website 0 Quote Link to comment Share on other sites More sharing options...
WillP Posted December 29, 2011 Author Share Posted December 29, 2011 Thanks M8 That's just the sort of thing that would be easy to overlook. 0 Quote Link to comment Share on other sites More sharing options...
jwebhost Posted December 31, 2011 Share Posted December 31, 2011 Create a page in WHMCS and use some .htaccess rewrites? 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted December 31, 2011 Share Posted December 31, 2011 Hello, On my website I have WHMCS in a separate directory and I've found it useful to use the API to display the "logged in". Is there any other functionality you'd like in your non-WHMCS pages using the API? 0 Quote Link to comment Share on other sites More sharing options...
WillP Posted January 1, 2012 Author Share Posted January 1, 2012 Create a page in WHMCS and use some .htaccess rewrites? Thanks jwebhost, but I'm not sure what you mean. I understand about rewrites using .htaccess, but how did you mean I should use this in WHMCS. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
WillP Posted January 1, 2012 Author Share Posted January 1, 2012 Is there any other functionality you'd like in your non-WHMCS pages using the API? Thanks zomex. At this stage I think the only other WHMCS stuff I want on my own created pages would be various info from my products. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted January 1, 2012 Share Posted January 1, 2012 I havent tried it, but you might be able to just include the WHMCS files from the directory above your WHMCS install. For example, lets say you have your main site at http://www.mydomain.com and your WHMCS is installed into http://www.mydomain.com/whmcs. You might be able to do something like this to make use of some of the benefits of creating WHMCS pages. <?php define("CLIENTAREA",true); require("whmcs/dbconnect.php"); require("whmcs/includes/functions.php"); require("whmcs/includes/clientareafunctions.php"); // My code here ?> 0 Quote Link to comment Share on other sites More sharing options...
WillP Posted January 2, 2012 Author Share Posted January 2, 2012 I havent tried it, but you might be able to just include the WHMCS files from the directory above your WHMCS install. Thanks Frank That was one of the first things I tried, and it does seem to work fine. But being unfamiliar with WHMCS and exactly how it works, I was concerned about any unforeseen side-effects. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.