juneloveelyn,
If you installed a "template" to replace the default Zen Cart, the "my_template" should be replaced with that template's name, i.e., includes/templates/apple_zen/common/tpl_main_page.php.
When you installed the Simple Google Analytics module, there was a "my_template" that was to be renamed with the template you are using. If you are using the default and have not installed a template, I believe there is a routine to follow where you duplicate all of the template_default directories in your cart and name them "classic" so you can use the overrides system. I'm sure this is explained somewhere--in a tutorial, possibly. Of course, then you would go to Admin>Configuration>templates (I think) and choose the classic template (which is a duplicate of the default template, of course).
If you are using the default "classic" Zen Cart template, then place the code in includes/templates/template_default/common/tpl_main_page.php.
You are witnessing the overrides system in action (or inaction). When you install a template, usually the index page is governed by the tpl_main_page.php. That file is derived from the template_default/tpl_main_page.php, and then saved in the new template directory. You then have a copy of the default Zen Cart template for later use, plus a copy of the modified "override" template, which is the one Zen Cart will use.
It will work if you just save it under the template_default, but if you use the method above to use a "classic" duplicate of the default, then you will have an override system. Then, in includes/templates/classic/common/tpl_main_page.php, copy the modified file tpl_main_page.php into that file, and that would be the override. That would preserve changes as overrides, thereby making future upgrades easier because you could identify your changed files more easily and upgrade any of those changed files that might be involved in the upgrade, if any.
Sorry to be so wordy. It's just a great opportunity to consider the override system in a non-abstract way.
Bookmarks