Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Cookie restriction mode translation
 
kurric
Jr. Member
 
Total Posts:  4
Joined:  2013-08-26
 

Hi,

With latest release, cookie_restriction_notice_block went to “before_body_end” ! in layout (/app/design/frontend/base/default/layout/page.xml). But users don’t realize about that notice.

I used this code to set it in “after_body_start”:

<reference name="before_body_end">
            <
action method="unsetChild"><name>global_cookie_notice</name></action>    
        </
reference>

        <
reference name="after_body_start">
            <
block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" />
        </
reference>

However, I can’t figure out how to translate for different store views. Changing CMS block in the admin ("cookie_restriction_notice_block") doesn’t work.

Anyone with same issue / figured out how to translate it?

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
PhoenixDev_KL
Jr. Member
 
Total Posts:  1
Joined:  2013-01-15
 

Regarding translation: Copy app/code/core/Mage/Page/Block/Html/CookieNotice.php to app/code/local/Mage/Page/Block/Html/CookieNotice.php and set current store ID before loading the block in line 44:

Original:

$block Mage::getModel('cms/block')->load($blockIdentifier'identifier');

Fixed:

$block Mage::getModel('cms/block')
            ->
setStoreId(Mage::app()->getStore()->getId())
            ->
load($blockIdentifier'identifier');
 
Magento Community Magento Community
Magento Community
Magento Community
 
kurric
Jr. Member
 
Total Posts:  4
Joined:  2013-08-26
 

Thanks PhoenixDev_KL!

Sure, needed to set current Store first ... I missed that :(

Returns proper language (store view) now.

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top