Book Image

Mastering Magento Theme Design

By : Andrea Sacca
Book Image

Mastering Magento Theme Design

By: Andrea Sacca

Overview of this book

Table of Contents (18 chapters)
Mastering Magento Theme Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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">
    <block type="core/template" name="socialsharing" template="social/addthis.phtml" before="-" />
    </reference>

    Now, open the file of the product page, view.phtml, located in app/design/frontend/bookstore/default...