Merchant Stories

Change Theme: How to Change the Original Magento ® Template

Sep 15, 2014 2 min read 145 views
Listen audio
Change Theme: How to Change the Original Magento ® Template

In most cases, there should not be any problems with making modifications to a Magento ® web store design. But sometimes the template developers encode their files in order to not let users edit the code without their assistance.

Let us review how to change the original template code in Magento ® and what software can be used for that.

Why do we need to change theme code?

Quite frequently, there are various problems in a web store operation. They are usually caused by incorrect coding or some errors made during its implementation. Besides, a small percent of developers for Magento ® make their code more complicated on purpose and such code is difficult to understand or modify. One of those developers is the well-known company ThemeForest Infortis Ultimo. To make it clearer below is an example of a purposefully complicated code:


<php class Infortis_UltraMegaMenu_Block_Navigation extends Mage_Catalog_Block_Navigation {
protected $x0b = FALSE; protected $x0c = FALSE; protected $x0d = FALSE; protected $x0e = 
NULL; public function getCacheKeyIfno () {$x0f = array(

 

This is only one sample but, as you may have noticed, there are line foldings which make reading the text more difficult. This is why correct modification of this code is almost impossible without a programmer who knows it or has significant experience in programming.

The matter is not that you will not be able to use the editor or remove a part of the code, it is that everything will look unfamiliar and complex. In order to get rid of this fault, you may use a special website which allows webmasters and programmers the ability to create convenient and readable code. PHP Formatter is only a beta version for the moment, but its developers ensure that the full working version will be released shortly.

Before giving further instructions we would like to warn you that it is not necessary to change all template files, only some of them need be edited. As a sample, we will use the same template as above – ThemeForest Infortis Ultimo.

Step-by-step instruction on the code modification

1. Copy the code into the editor window, you can also copy it into a Notepad document first to have a backup in case anything goes wrong;

2. Make sure that the editor displays the code you just pasted in the general UTF8 format. This is very important, otherwise, you may change encoding while modifying the code and this may cost you heavy loss of products and other data;

3. After all, preparations are complete, click “Format’ button and wait for the result;

4. If there are no problems in the site operation and you have a high internet speed, you will see your modified code in a few seconds;

5. Now click ‘Copy to Clipboard’ button. This will allow the operating system to save the new correct code in its buffer;

6. Now paste the new code into the editor window on your web store backend and save the changes. Never start editing the original code without creating a backup of the default files on your hosting server or on your computer. Then, if any problems occur, you can get everything back as it was.

You can also check the necessary code in a program for web-technicians, e.g. DreamWeaver. This application will help to find and correct the coding errors, they are highlighted in red once found.

If you have any questions regarding modification of the original template code you may consult with GoMage specialists. Also, please write in comments which services or programs you use for code checking and modification.

That's where you contact us!

    By submitting this form you agree to GoMage's Terms of Use and Privacy Policy
    woo-hoo! Now its time to keep checking your inbox, as we will be getting in touch soon. Promise :)
    oops! Thanks. But it seems like some kind of technical issues stop you from meeting GOMAGE. Could you try again?