Display template debugger for admin only

I made a really small modification to the template debugger. It makes it possible to enable the template debugger on a live store and only show it to admin so the other visitors won’t see it.



Edit: classes/templater/debug.tpl



Find:


{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}




Add ABOVE:


{if $auth.user_id eq "1"}




At the very bottom of the file add:


{/if}




Save the file, upload, clear your cache and enable template debugging in the settings.



Now login at the store FRONT-END using your admin account. The template debugger should only popup when logged in to this account.



Try it out.

I have made similar modifications for the “print invoice”. So that the credit card info appears for the manager to print and run the card manually.



Which, he then shreds and clears the CC details out for that order.