1

This is my code from my local.xml:

This is the block:

<catalog_product_view>
    <reference name="product.info">
        <block type="core/template" name="product.delivery" template="experius/statichtml/delivery.phtml" after="-">
             <action method="addToParentGroup"><group>detailed_info</group></action>
             <action method="setTitle" translate="value"><value>Test</value></action>
        </block>
    </reference>
</catalog_product_view>

and

<STORE_mystore_code>
        <catalog_product_view>
            <reference name="product.info">
                <reference name="product.delivery">
                    <action method="setTemplate"><file>experius/statichtml/delivery_de.phtml</file></action>
                </reference>
            </reference>
        </catalog_product_view>        
<STORE_mystore_code>

My store code is 100% correct. Why I don't get the content of the delivery_de.phtml file ? Right now I got the content of the delivery.phtml file.Thx

0

Actually using the doesn't work for me, so I cam up with another solution: - to create a block and the template using the store code.

This is my laypout xml part:

<block type="mynamespace_mymodule/tabs" name="product.delivery" after="-">
     <action method="addToParentGroup"><group>detailed_info</group></action>
     <action method="setTitle" translate="value"><value>Test</value></action>
</block>

This is my block:

class Mynamespace_Mymodule_Block_Tabs extends Mage_Adminhtml_Block_Template
{
    public function __construct()
    {
        $currentStoreCode =  substr(Mage::app()->getStore()->getCode(), -2 );
        $this->setTemplate('mynamespace_mymodule/tabs/delivery/delivery_'.$currentStoreCode.'.phtml');
    }
}

In my case the store code are like: storecode_de, storecode_at, storecode_ro

So I created for each store a phtml file like: delivery_de, delivery_at, etc.

I had some custom reason to do that, so don't judge me:)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.