keenooooo Posted September 20, 2018 Share Posted September 20, 2018 I've been creating a WHMCS theme from scratch and have come across quite a few issues! The first of which is... On the homepage: https://my.hostnomad.com/?systpl=pan If you scroll to the very bottom, you can see that for some reason the information that I am pulling from WHMCS feeds is being shown at the very bottom of the page! When I try to inspect it, nothing shows up. Any idea how to stop this happening? Also, on this page you can see the "Powered by WHMCompleteSolution" even though I have paid for the removal. (Proof at https://my.hostnomad.com) Any ideas why this occurs? Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 20, 2018 Share Posted September 20, 2018 1 hour ago, keenooooo said: Any idea how to stop this happening? I think it's the Owl Carousel script - I answered a similar question earlier in the year... 1 hour ago, keenooooo said: Also, on this page you can see the "Powered by WHMCompleteSolution" even though I have paid for the removal. you might need to re-issue the license for the removal to become active. also, in your header, the BASE CSS and custom.css links are called twice - doesn't really matter, but thought it worth mentioning... 0 Quote Link to comment Share on other sites More sharing options...
keenooooo Posted September 20, 2018 Author Share Posted September 20, 2018 Thank you SO much for this brian! It is 100% the Owl Carousel and I'm going to try and figure out a way of getting round that. Potentially just going to hardcode it for the time being as it's only for the prices and descriptions of specific products and they don't change often. And thank you again for the heads up for the repeated code. Not sure how I missed that! Regarding ""Powered by WHMCompleteSolution"", I've had the license for years and it doesn't show up on all other templates! Strange. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 21, 2018 Share Posted September 21, 2018 23 hours ago, keenooooo said: Thank you SO much for this brian! It is 100% the Owl Carousel and I'm going to try and figure out a way of getting round that. as the OP reported in the thread, I think it can use feeds without issue - you just need to tweak the carousel settings. 23 hours ago, keenooooo said: Potentially just going to hardcode it for the time being as it's only for the prices and descriptions of specific products and they don't change often. you could use an action hook to get the current details from the database - it's not a million miles away from the one in the above thread, except it's finding products and not domains... <?php use Illuminate\Database\Capsule\Manager as Capsule; function homepage_products_hook($vars) { $products = Capsule::table('tblproducts') ->join('tblpricing', 'tblproducts.id', '=', 'tblpricing.relid') ->where('tblpricing.type', 'product') ->where('tblproducts.hidden','0') ->where('tblproducts.gid','1') ->select('tblproducts.id','tblproducts.name','tblproducts.description','tblpricing.monthly') ->orderBy('tblproducts.order') ->groupBy('tblproducts.id') ->get(); $results = json_decode(json_encode($products), true); return array("myproducts" => $results); } add_hook("ClientAreaPageHome", 1, "homepage_products_hook"); ?> that will give you an array of products ($myproducts) on the homepage that are: in Product Group 1 and not hidden and the array will contain 4 fields - Product ID, Product Name, Product Description, Monthly Price... as per the domain hook, instead of just taking all products from a certain product group, you could give it a list of Product IDs and use that instead. with that array, you could then generate your carousel output in a foreach loop, or access each field individually... e.g the first result elements could be directly accessed using the following for name, desc and price... {$myproducts[0].name} {$myproducts[0].description} {$myproducts[0].monthly} .. and for the second result, you would change the 0 to 1 and so on. also, the monthly price won't be currency formatted - you could do that in the hook if you wanted to, but as I assume you're only using one currency, you might as well just add a pound sign before the price. Just £{$myproducts[0].monthly} per month 0 Quote Link to comment Share on other sites More sharing options...
keenooooo Posted September 25, 2018 Author Share Posted September 25, 2018 Thank you again so much Brian! I will attempt to get the hooks working! You've been an incredible help. Do you do any paid consultation work!? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 26, 2018 Share Posted September 26, 2018 On 25/09/2018 at 13:25, keenooooo said: Do you do any paid consultation work!? it has been known. 🙂 feel free to send me a PM when that feature is enabled in your Community account - though I do get a *lot* of PMs daily asking for help, so there might be a delay in replying. 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.