vontanix Posted May 6, 2015 Share Posted May 6, 2015 dear,@ all anyone know how to show LOAD TIME that is visible on back office bottom left , also on front office ? Link to comment Share on other sites More sharing options...
defuzed Posted May 7, 2015 Share Posted May 7, 2015 you can use tools like pingdom , gtmetrix or webpagetest for front office. This is generally a better way to test since it will not take into account any browser caching from your machine. Also google's pagespeed insights (as well as dev console on chrome / firefox) is a great tool to find reasons your shop might be slow (although it will not display specific load times). 1 Link to comment Share on other sites More sharing options...
PascalVG Posted May 7, 2015 Share Posted May 7, 2015 But I expect you want to SHOW the load time on the page, not only find out how much time it takes, right? If so, do the following: edit/override file: classes/controllers/FrontController.php in function construct, add red code: public function __construct() { global $timer_start; $this->timer_start = $timer_start; Then in the same file, in function initFooter, add: public function initFooter() { $this->context->smarty->assign(array( 'timer_start' => $this->timer_start, 'HOOK_FOOTER' => Hook::exec('displayFooter'), Then in file /index.php, add: $timer_start = microtime(true); require(dirname(__FILE__).'/config/config.inc.php'); Dispatcher::getInstance()->dispatch(); Finally, edit file: themes/default-bootstrap/footer.tpl, and add red code, somewhere at the end: {if isset($HOOK_FOOTER)} <!-- Footer --> <div class="footer-container"> <footer id="footer" class="container"> <div class="row">{$HOOK_FOOTER}</div> </footer> <span id="footer-load-time"><i class="icon-time" title="{l s='Load time: '}"></i> {number_format(microtime(true) - $timer_start, 3, '.', '')}s</span> </div> <!-- #footer --> {/if} Code is almost similar to admin timer, so I expect that is what you needed, pascal. 1 Link to comment Share on other sites More sharing options...
vontanix Posted May 7, 2015 Author Share Posted May 7, 2015 dear, @ Pascal yes, thats what im looking for ! thanks allot ! @ defuzed, thats a cool solution for developers yes, but pascal made the point for my need, thanks ! Link to comment Share on other sites More sharing options...
PascalVG Posted May 8, 2015 Share Posted May 8, 2015 Perfect, I'll mark the topic a s solved. Happy selling! pascal 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