Overview
If I am understanding your question correctly, you want to add a custom tab on the product detail page when viewing the product under your two special categories (category1 and category2).
The tabs on the product detail page are of type catalog/product_view_tabs
which normally maps to the class Mage_Catalog_Block_Product_View_Tabs
. This block does provide a way to add new tabs through its addTab()
method, but it seems that this method assumes a template will be used, which unfortunately prevents using a CMS Static Block with this method.
A Possible Solution
If you are able to put your content from the two static blocks into two template files instead, you could do this using layout XML updates on the categories themselves. I will outline the process you would use in this scenario:
- Navigate to Catalog > Categories > Manage Categories in Magento Admin and click on category1 in the tree.
- Open the Custom Design tab.
- Set “Apply To Products” to Yes.
- Now add the layout update for that category’s products that should have the custom tab under “Custom Layout Update”:
<reference name="content">
<reference name="product.info.tabs">
<action method="addTab" translate="title">
<alias>block1</alias>
<title>Block 1</title>
<block>core/template</block>
<template>catalog/product/view/block1.phtml</template>
</action>
</reference>
</reference>
It should look something like this:

Then just repeat the same steps for category2. The key to this solution working is to get your two template files block1.phtml
and block2.phtml
into the path: app/design/frontend/base/default/template/catalog/product/view/
.