1

I am learning Magento 1.9.

I would like to see and learn from the the code of the "Proceed to checkout" button.

In which template is this code located?

4 Answers 4

7

it located at

app/design/frontend/base/default/template/checkout/onepage/link.phtml

and

app/design/frontend/PACKAGE/THEME/template/checkout/onepage/link.phtml

An easy way to find a path of the file is Searching for the keyword in you project folder.

3
  • If you satisfied from this answer then please accept it.it will help to other people to find a correct answer. Commented Oct 24, 2016 at 10:50
  • Yes. 8 minutes are minimum required Commented Oct 24, 2016 at 10:51
  • I have made some change it will help to find other files. Commented Oct 24, 2016 at 10:53
1

You can on your path hint from admin and heck the template and its block for all section of the page.

  1. Admin -> System -> Configuration -> Advanced -> Developer
  2. Select the store from Current Configuration Scope drop-down from top left section below navigation.
  3. Than go to Debug -> Template Path Hint and set it to Yes.
  4. Refresh the fron-tend page, You will get the all page path.

In this way you come to know if any custom module install and override any phtml then also you will get the path of that file.

1

You also can use external Magento extension like

1 Magento developer toolbar

2 Easy Template Path Hints

All above extension can display you template path and other information also.

2
  • For non-production system (stage/development box) you are able to turn on template path hints when you go to Admin > System > Configuration > Advanced > Developer. I would also turn on the Block Names (often very helpful).
    – Phil M
    Commented Oct 24, 2016 at 20:21
  • Yes i know that but this tool are also good and help him more
    – Magento
    Commented Oct 25, 2016 at 5:21
1

The chosen answer is appropriate for the question... but its essentially giving you the answer without telling you HOW to get the answer if a similar question comes up for something else.

I use a developer extension that runs on my local system that allows me to dynamically load up info such as template path hints, etc...

Add an event observer for: controller_front_init_before

And in your observer model, you can add the following code:

// enabling on-the-fly template path hints
if (Mage::app()->getRequest()->has('__hints')) {
    $store->setConfig('dev/debug/template_hints', 1);
    $store->setConfig('dev/debug/template_hints_blocks', 1);
}

Then for any URL, you can tack on ?__hints to show the hints.

You can also do a number of other modifications... such as:

// enabling on-the-fly theme change to "base/default"
if (Mage::app()->getRequest()->has('__base')) {
    $store->setConfig('design/package/name', 'default');
    $store->setConfig('design/theme/template', 'default');
}

NOTE: you do not want to run this on a production system (live server) as it could compromise the system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.