O'Reilly logo

Mastering Magento Theme Design by Andrea Saccà

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating the code in the product page

Let's suppose that we want to add the code only in the product page. To do this, perform the following steps:

  1. Go to your theme folders and create a file called addthis.phtml in app/design/frontend/bookstore/default/template/social.
  2. Paste the copied code, as mentioned in the previous section, in the file and save it.
  3. Now, we need to open the local.xml file and find the <catalog_product_view> product view handle (for your reference, this handle is defined first inside the catalog.xml file of the base theme in app/design/frontend/base/default/layout) and inside it, in <reference name="content">, add the following code that will declare a core/template block to be displayed on the product page:
    <reference name="content"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required