Posts

Showing posts from April, 2015

Translate Magento in Frontend

You can use built in translation methods and define all your strings in templates like this: <? php echo $this -> __ ( 'yourtext' ); ?>   if you need to use strings in classes or blocks you can get the context from helper class like this: <? php echo Mage :: helper ( 'yourextension' )-> __ ( 'yourtext' );?>   and if you need to define your own translation file then use this in your etc/config.xml <config> <frontend> <translate> <modules> <Your_Extension> <files> <default> translation .csv </default> </files> </Your_Extension> </modules> </translate> </frontend> </config>     Put your translation is app/locale/language_CODE/ translation .csv  

Ajax Load the Content From the url (Ajax)

##### ajax load the content from the url### <script> jQuery(document).ready( function(){                 var cur_url="http://localhost/rahul/magento_ultimo/index.php/mobile-electronics.html";             //var cur_url=window.location.href;                                         jQuery.ajax({                             url: cur_url,                             type:"POST",                             data:(...