Facebook fans

Latest from Twitter

Debugging magento templates

Posted date: 14 Oct 2011 | Posted by: admin | 0 comments

Developing in Magento without these debugging tips can be challenging, especially when you are developing a theme or want to make some modifications in backend theme.

So today, we share with you tips & tricks will help you find exactly what template(s) you need to modify to get the layout you want. It can be either frontend block or backend template!!!

  • For frontend: Turn on Template Path Hints

1. Log into the admin

2. Goto -> System ->Configuration, and on the bottom of the list select “Develeper”

3. Click on Debug – you will only see “Profiler”. Here is the trick – you have to switch the “Current Configuration Scope:” [in the upper left] to a website instead of default. Select “Main Website”.

4. Now you will see the selection for Template Path Hints – check yes. This will display the path of the template for each block of the page so you can find stuff!

You can also choose to “Add Block Names to Hints” to see the corresponding model class for the block.

You will see something like this:

debug magento frontend path hint template

  • For backend: It is disabled by default, so you need to turn this option on!!!

Basically, you will need to insert 2 more records into the core_config_data table for this option.

1. Connect to database
Using your favorite database administration tool like phpMyAdmin, connect to your Magento database.

2. Use the following command to put new values into ‘core_config_data’ table

INSERT INTO core_config_data (scope, scope_id, path, value)
VALUES ('default', 0, 'dev/debug/template_hints', 1),
('default', 0, 'dev/debug/template_hints_blocks', 1);

debug magento frontend backend

And that’s all!!!, to disable the hint, you will need to update “1″ values to “0″ (zero).

debug magento backend template hint

It's useful? Like this article!

Comments are closed.

Share this

Related posts

Pinterest Fan Box – Add Pinterest Followers to your Magento site image

Pinterest Fan Box, do you know how to add your Pinterest...

7 Apr 2012
Pinterest Feeds – Add Pinterest Pin Board to Magento Site image

Pinterest Feeds to Magento sites, how to do the...

23 Mar 2012
Pinterest Magento Linker image

Pinterest is one of the hottest social networks and is...

14 Mar 2012

Mirage Design @ 2011 | Web development, Website design, Magento development, Wordpress development

Pinterest Tutorial   Ty so bong da   Tim chung cu