среда, 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 :)

четверг, 14 августа 2014 г.

Get navigation menu categories and category path url key


 <ul>  
               <?php  
                 $obj = new Mage_Catalog_Block_Navigation();  
                 $storeCategories = $obj->getStoreCategories();  
                 foreach ($storeCategories as $_category):  
               ?>  
                   <li><a href="<?php echo $this->getUrl(). $_category->getUrl_key(); ?>"><?php echo $_category->getName(); ?></a></li>  
                 <?php endforeach ?>  
             </ul>  

среда, 21 мая 2014 г.

Export Products CSV -> The error "No valid data sent"

There seems to be something wrong with the filters on the export products' form. The simple fix for this, on magento 1.7.0.2:
  1. Copy the file app/code/core/Mage/ImportExport/Model/Export.php toapp/code/local/Mage/ImportExport/Model/Export.php.
  2. Around line 145, on the export() method, comment out the if, and the else. There is never a filter on the form.
  3. Copy the file app/code/core/Mage/ImportExport/controllers/Adminhtml/ExportController.phpto app/code/local/Mage/ImportExport/controllers/Adminhtml/ExportController.
  4. Around line 77, on the exportAction() method, comment out the if and the else. Same reason as above
Hope it will help U =)