среда, 27 августа 2014 г.

Magento Inline translation doesn't work in chrome brower (SOLVED)

Open Inline.php file from this path /app/code/core/Mage/Core/Model/Translate/Inline.php

Now find below code in that file. (In my case line 272)
 <script type="text/javascript">  
   new TranslateInline('translate-inline-trig', '<?php echo $ajaxUrl ?>', '<?php  
     echo Mage::getDesign()->getArea() ?>');  

Add this code after:

 if(Object.__defineGetter__)  
 {  
   var hasTranslateAttribute = function(){  
     return $(this).hasAttribute("translate");  
   };  
   document.observe("dom:loaded", function() {  
     $$('*').each(function(theElement){  
        theElement.__defineGetter__("translate", hasTranslateAttribute);  
     });  
   });  
 }  

Now check it. It should work in Chrome browser now.

 Enjoy :)

Комментариев нет:

Отправить комментарий