Jump to content

debug the admin


shoulders

Recommended Posts

is it possibly to debug the admin?

 

I want to dump out the smarty variables and see what the page is called?

 

this assumes the admin uses smarty.

 

I can get the debug and console to come up for the front page but not the admin.

 

 

Any help would be appreciated

Link to comment
Share on other sites

The page in question is in the admin. when you go to customers and then edit the customer. i believe is is called customer view.

 

so the page i am looking at in the admin is:

 

admin/themes/default/template/controllers/customers/helpers/view.tpl

 

with i have tried in the tpl

  • {$debug} {debug} {$smarty_debug} and these dont cause the console to pop up.
  • {$smarty_debug} causes an error
  • print_r($this->context->smarty) does nothing
  • adding &SMARTY_DEBUG to the end of the url does nothing

However if i put {debug} in

 

/admin/themes/default/template/header.tpl

 

and have either of the following turned on in performance

  • Open console with URL parameter (SMARTY_DEBUG)
  • Always open console

the console pops up. It just seems you cant use the console method for sub .tpl files. Which is basically what i need to do. I want to read the variable that shows how much the customer has purchased in the past. I will also then use this method for looking at other things later.

 

no quite there yet

Edited by shoulders (see edit history)
Link to comment
Share on other sites

it looks like i will have to write a plugin for smarty because i probably need to execute php code and the recommended way is throught a plugin. i could also use the smartyBC.class to reallow {php} and {include_php} tags.

 

If i get it working i will post back here.

Link to comment
Share on other sites

i have cracked it. it all depends where you put the {debug} declaration for admin templates and if you are debugging a module in the front, the key is to put the 'Debug Console' setting to 'open console with URL parameter.

 

I will write this up properely as it will help people a lot. i could of done with it. lol

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...