ambalium Posted August 22, 2017 Share Posted August 22, 2017 Hello Community! Given that I am a newbie (but a fast learner), I would like to know how to make the default index.php of my whmcs display a set of product (e.g. web hosting services) as against the Twitter/Newsreplace feed on the homepage. I know the $If $twitter and Else $Announcement smarty code is responsible for rendering the twitter or announcement but I would rather want to use my products I've setup in the products area. What i want to achieve is attached (someone has done this but I have googled this to no avail) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 23, 2017 Share Posted August 23, 2017 there's no quick & simple built in way to do this as the homepage doesn't natively have access to the required variables that the cart does... so while you could copy the layout code from the orderform templates products.tpl page and add it to homepage.tpl, it would have no product information within it to display (no product names, descriptions, prices etc). therefore, you would need to add that information to the homepage either by using a hook to query the database, or by using Data Feeds - the hook method would be more complicated, but using data feeds would be simpler (though potentially slower). btw - I wouldn't be surprised if WHMCS v8 did it next year, but until then you basically have the above options. 0 Quote Link to comment Share on other sites More sharing options...
ambalium Posted August 24, 2017 Author Share Posted August 24, 2017 Thank you Brian! I have benefited from your various contribution here which has helped to get hold on whmcs at a faster rate. I would appreciate if you could help with a step-by-step process in achieving the explanation you made. However if there is a commercial module/add-on to also achieve this I would be glad for your recommendation. Thank you! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 24, 2017 Share Posted August 24, 2017 which one - hook or data feeds? data feeds should just require copying of template across and replacing variables with data feed output... using hooks, would require some tweaking to the template to make it work.. https://forum.whmcs.com/showthread.php?128774-Product-Info-on-Custom-Pages I would appreciate if you could help with a step-by-step process in achieving the explanation you made. using which orderform template? from the image, I can't tell if it's a commercial custom template or one of the comparison templates restyled... this is one of those situations where it would take longer to explain how to do something than it would to actually do it, so there's no point in me giving you details for a template you aren't using. However if there is a commercial module/add-on to also achieve this I would be glad for your recommendation. the only addon that i'm aware of that does this is a free one, Product View on Any Page, though whether it's compatible with v7 and/or your orderform template, I cannot say - though the version I downloaded a few months ago would only work with Boxes & Modern, it looks like you might need to pay to use it with other orderform templates. I can remember trying it, thinking it was absolute rubbish and quickly uninstalling it, but perhaps it will suit your needs. 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.