Posts Tagged ‘magento’

Magento Spanish Email Templates


Spanish translation for magento does'nt include that files.??

Here you have the spanish email templates that i use for magento in spanish.
Unzip this file on your Magento DocumentRoot directory.

Changelog:??MARIA SALUD MOLINA BELDA is out.

How to see what fails when you get internal server error in PHP (500 HTTP Error)


Add this lines as first lines when debugging in maintenance mode:

error_reporting(E_ALL | E_STRICT);

ini_set(‘display_errors’, 1);


In Magento you can set developer mode:



How to get a url to another urk key in current Magento store


Don’t use:

<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).’cms-or-catalog-url’; ?>

Use instead:

<? echo Mage::app()->getStore()->getUrl(‘cms-or-catalog-url’) ?>;

Tip to debug objects in Magento development environment


Change $_item with the object you want to debug and see methods and attributes:

$var=$_item;echo 'Class '.get_class($var).':';echo ''.implode("() ",get_class_methods($var));foreach($var->getData() as $k=>$v){        echo 'getData(''.$k.'')';}


Howto check if Magento core code has been modified


Your magento is working weird, but there are no third-party extensions actived on the store?

Use standard *nix diff command to compare all current Magento files with corresponding files of default Magento.

$ diff -qrbB cleanmagento/app/code/core shop/app/code/core

Windows tip: Use WinMerge instead


Magento Tip: Template and modules debug functions


Some helpful snippets of code to use when debugging magento templates in development:


  var_export(array_keys( $this->getData() )); //or

  var_export(array_keys( $object->getData() ));



When using with Mage::log() for modules in community or local code pools.

  Mage::log(var_export(get_class_methods(get_class($classname)), TRUE),NULL,’some_filename.log’);

  Mage::log(var_export(array_keys( $this->getData() ), TRUE),NULL,’some_filename.log’); //or

  Mage::log(var_export(array_keys( $object->getData() ), TRUE),NULL,’some_filename.log’);

  Mage::log(var_export($object->debug(), TRUE));

Install Magento via SSH


1. Getting Magento files in your server

$ wget
$ tar -zxvf magento- $ mv magento/* magento/.htaccess .
$ chmod -R o+w media $ ./pear mage-setup .
$ ./pear install magento-core/Mage_All_Latest
$ touch var/.htaccess | mkdir -p app/etc
$ chmod o+w var var/.htaccess app/etc
$ rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
$ rm -rf magento/ magento-

2. Requiriments

Go to webpage and….

Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.2.0 or newer. Find out how to install Magento using PHP-CGI as a work-around.

Set .htaccess

   Action php5-cgi /cgi-bin/php5-cgi

    AddHandler php5-cgi .php

3. Web Config

Set Localitzation, BBDD, URL, Session storage, Admin account…