Dominator24 Posted October 6, 2009 Share Posted October 6, 2009 (edited) Hi there, I am changing my template as I am sick of editing it when I have updated pricing or submitted a new announcement. I have already created a file called (dbconnect.php) with the below code <?php mysql_connect("localhost", "db_user", "db_pass") or die(mysql_error()); mysql_select_db("db_name") or die(mysql_error()); ?> and I have tried putting this into my template to show the price. $result = mysql_query( 'SELECT `tblpricing`.`annually`'. ' FROM tblpricing'. ' WHERE ((`tblpricing`.`relid` =1) AND (`tblpricing`.`currency` =1))'. ' LIMIT 0, 30 ') or die(mysql_error()); $row = mysql_fetch_assoc($result); echo $row['annually']; However when I enter that into my HTML template it just displays it as text, how do I go about this? Also it would be nice if someone could tell me how to display announcements and certain knoledgebase articles. I have used these past two posts, but was unsuccessful into trying what they said. http://forum.whmcs.com/showthread.php?t=12127&highlight=joomla+price http://forum.whmcs.com/showthread.php?t=8142&highlight=display+announcements http://wiki.whmcs.com/Linking_to_WHMCS#Showing_Announcements_on_your_Site Below Is an image of my site with all my details removed and an understanding what I would like. If anyone can offer me any assistance I would be very greatful. Edited October 6, 2009 by Dominator24 0 Quote Link to comment Share on other sites More sharing options...
equipc Posted October 6, 2009 Share Posted October 6, 2009 If you want to execute some php code within a .tpl files, you should use smarty tags {php} your php code {/php} 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted October 7, 2009 Share Posted October 7, 2009 (edited) Take a look at Sparky's Comparison Mod, it does just that! http://forum.whmcs.com/member.php?u=7340 << LooK in his Signature! Edited October 7, 2009 by BAJI26 0 Quote Link to comment Share on other sites More sharing options...
Dominator24 Posted October 7, 2009 Author Share Posted October 7, 2009 Hello, Thanks for your both replies however they are both not what I am looking for. For example I have built my own website using HTML template and I have installed WHMCS as my client area. I put on my HTML homepage "Webhosting for £2.99 per month" however If I change my price into WHMCS I will also have to change it on my HTML homepage as its just text. I would like it to pull the "£2.99" from the database where the price is stored in WHMCS so that if I edit the price in WHMCS the HTML homepage will pull the new price from the database. Any more help on this matter is appreciated. Kind Regards, Lee Johnson 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted October 7, 2009 Share Posted October 7, 2009 (edited) As I mentioned above Sparky's Plan Comparison Mod does just this >>>>>>> https://tshosting.com.au/cart.php?a=confproduct&i=0 <<<<<<< For And Example Click The Url In My Sig! All Prices And Descriptions are pulled from the DB and Set in Whmcs Admin! Edited October 7, 2009 by BAJI26 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted October 7, 2009 Share Posted October 7, 2009 I also need this but for domain pricing I only need to show the first 9 domain listed in admin how can this be done? 0 Quote Link to comment Share on other sites More sharing options...
deejay Posted October 7, 2009 Share Posted October 7, 2009 Yep! That would be good! Maybe someone can advise on how to achieve this....... regards, Dave 0 Quote Link to comment Share on other sites More sharing options...
Dominator24 Posted October 8, 2009 Author Share Posted October 8, 2009 As I mentioned above Sparky's Plan Comparison Mod does just this >>>>>>> https://tshosting.com.au/cart.php?a=confproduct&i=0 <<<<<<< For And Example Click The Url In My Sig! All Prices And Descriptions are pulled from the DB and Set in Whmcs Admin! BAJI26, I have read through the plan comparison mod and its nothing for what I am asking, this is for WHMCS only and uses the WHMCS system, your website homepage is using WHMCS as its main backbone, I am using self-built HTML template with a link to my client area. I am looking for a HTML/PHP/JAVA (anything) script that will access the databse where my WHMCS is stored, locate the price table then show it on my self built HTML template that is NOT WHMCS. I can see nothing with that addon that even remotely does what I am asking unless I am using WHMCS as my main website, which I am not. If I have read something wrong wrong about the plugin and it is what I am looking for, let me know, as from what I have read about it, its not what I am looking for. Kind Regards, Lee Johnson 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted October 8, 2009 Share Posted October 8, 2009 (edited) No you have not. so is it just like all you hosting plan's just like that mod but using outside of WHMCS? I will try tonight to do this for you but it will be for a .php file to be used outside of WHMCS (it is on the same server right) Edited October 8, 2009 by thehost5968 0 Quote Link to comment Share on other sites More sharing options...
Dominator24 Posted October 8, 2009 Author Share Posted October 8, 2009 WHMCS is installed on the same server yes, if its going to be a php, how will I implement this into my HTML template? Yes I want to pull the price of each plans straight from the database and display it outside WHMCS so that when WHMCS updates the currency it will update it outside also. Thanks for help on this matter thehost5968 0 Quote Link to comment Share on other sites More sharing options...
Business Hosting Online Posted October 16, 2009 Share Posted October 16, 2009 is there any update on this php file, it would be nice to have for a domain checker tahts shows prices etc externally 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted October 16, 2009 Share Posted October 16, 2009 sorry have not had time to look at this yet it will now be this weekend. 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.