0

I have been looking around Magento now for a few weeks and trying to get to grips with the file structure. While I have learnt (on a basic level) where to put code I have created and learnt to understand some of the functions but I have not learnt how to locate a required file, which I need, when I dont have a tutorial saying where that required file is.

My question

What questions do I need to ask myself in order to track down the necessary file(s) to edit? for example, within in the admin area (product upload tab of the "new product" page) I need to add an additional function

What I've done

Turned on "template path hints" (doesn't seem to work on the admin area)

Looked at generated HTML to try and make a more educated guess as to where its located

Looked at URL to try and make a more educated guess as to location

Currently I'm looking in the App/Mage/Catalog/Product/Image.php. I believe this is one of the required files I need but I will also need several other files and I have been unable to find them

tony09uk
  • 2,841
  • 9
  • 45
  • 71
  • Run the following query and set the value according to have template path enabled for ADMIN AREA. 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); Cache needs to be removed. Check here.http://www.edmondscommerce.co.uk/magento/magento-template-path-hints-in-admin/ – Dushyant Joshi Jul 08 '13 at 09:12

1 Answers1

0

I haven't tried, but it should works

Path hints is a very useful tool for Magento Theming as it let us know where exactly we have to go.

It’s easy for front-end to enable the path hints and locate the template file because it is available by default but it is not set up for Admin area. To add option for Admin path hints in configuration page we need to hack the core code.

find the file in app/code/core/Mage/Core/etc/system.xml and copy it in app/code/local/Mage/Core/etc/system.xml. It’s a good practice to always duplicate the core files in local directory.

Look inside the Debug section, there will be label “Template Path Hints” and “Add Block Names to Hints” set 0 (zero). Simply change it to 1 (one).

Next usual steps Clear System Cache

Go inside system->configuration->advanced->developers and there will be a new tab for admin path hints.

Source: http://www.techdilate.com/magento-enable-admin-template-path-hints/

And there is another solution (Database-based): Enable template path hint in admin pages - Magento

Community
  • 1
  • 1
Gianni B.
  • 2,691
  • 18
  • 31