Some themes come with switch tabs on the product page such as the Modern theme shipped with the official Magento download (as of 1.6.2). Time from time you may wonder how to add your custom ones there with more information regarding the product. The Easy Tabs extension doesn’t actually work with themes that already come with tabs. However, with themes that don’t have tabs already, you should try it.
So how to accomplish this? Here’s a dead simple way.
Adding Custom Tabs on Product Pages
Just follow these simple steps, assuming you are using the Modern theme which is located at /app/design/frontend/default/modern:
- Open /app/design/frontend/default/modern/layout/catalog.xml (or whatever your theme, just change the bold part to your own theme path), and find lines with
that are basically layout directives to add tabs to the product page.
- Duplicate one of the “addTab” <action></action> tags and change the properties according to your needs, such as to this:
<action method="addTab" translate="title" module="catalog"><alias>your_tab_name</alias><title>Your Tab</title><block>catalog/product_view</block><template>catalog/product/view/your_tab.phtml</template></action>
- Save and overwrite the original catalog.xml.
- Create your_tab.phtml that will contain the actual tab content when the user clicks the “Your Tab” tab on the product page. Upload it to /app/design/frontend/default/modern/template/catalog/product/view/your_tab.phtml
- Refresh all caches.
Now you should be seeing a new “Your Tab” on the product pages of your store. Add some text or HTML to your_tab.phtml and refresh cache so that tab will display the content you added.
Grab the latest premium Magento theme: Avalanche to kick-start your store! Get to know it and you will definitely look no further. Use coupon code: