Call a PHP script from Magento

I recently had some difficulty calling a simple PHP script from within the Magento eCommerce Platform. Although the following example focuses on calling a VoltRank PHP script, you can replace the code within VRank.phtml with your own PHP script.

VoltRank PHP Script Installation in Magento

Create a new template file to contain the PHP. The file should reside within the ‘template’ directory. I have put the file within the “catalog/category” subdirectory:

VoltRank VRank.phtml in template Directory

VoltRank VRank.phtml in template Directory

Copy and paste your PHP code into the .phtml file:

VoltRank PHP Code

VoltRank PHP Code

Call PHP from Magento Static Block

Using the Magento GUI interface, navigate to CMS->Static Blocks and select the block to be edited. In this case, I am editing the Footer Left block. Create the highlighted code to call the template code.

Magento Call Voltrank to PHP code

Magento Call Voltrank to PHP code

{{block type= 'catalog/navigation' name='catalog.category' template='catalog/category/VRank.phtml'}}

Call VoltRank PHP Script from Magento – Troubleshooting

If it looks like the PHP script is not being called, then take steps to debug by turning on display of errors in index.php. Uncomment this line:

#ini_set('display_errors', 1);

Any errors should then display on the page if there is a problem with the PHP. Otherwise, your Magento eCommerce CMS should be successfully calling your VoltRank PHP code!

Special Offer

In addition to using VoltRank to increase traffic to your website and push it higher in the search engines, you may want to build some links to your website using Linxboss and at the same time get 125-150 FREE LINKS to your website. See our Linxboss Review for further information.

KB Linker WordPress Plugin

KB Linker is a plugin for WordPress that automatically assigns URLs to keywords or phrases that you specify in your WordPress KB Linker settings. When you create a post on your blog, you will then not need to explicitly assign a hyperlink to that phrase or keyword as KB Linker will do it for you automatically.

For example, in the settings you can point the phrase “KB Linker” to the website ‘’

using the following syntax:

kb linker->

If you then add a post to your blog containing the phrase “KB Linker” and publish the post, you will notice that the phrase now has a hyperlink.

This is a very handy plugin as you don’t have to explicitly create hyperlinks for common websites that you link to. It can also help with Search Engine Optimization with regards to ease of creating internal cross-references on your blog.

WordPress 3 and Atahualpa Theme – Perfect Match?

I love WordPress. Absolutely love it. A custom designed website offers maximum flexibility but WordPress has it’s place when you want to allow community interaction and you want to install lots of nifty plugins, widgets and other bits and pieces quickly that would otherwise take forever to write.

I recently installed WordPress 3 and the Atahualpa (I’m still not able to pronounce this properly) theme. There are millions of themes out there, so what made me choose Atahualpa?

1. It has been designed to promote Search Engine Optimization (SEO). SEO is going to be something I will look at closely soon but lets  say that Atahualpa seems to support it well. There are lots of tags that can be enabled and I’m hopeful that BytesForAll have designed this in such a way that they work well with the search engines. Time will tell.

2. It is currently the most popular WordPress theme and has had almost 700,000 downloads at time of writing.

3. It is very, very customizable and has lots of options. In fact, some would describe Atahualpa as a framework more than a theme. It’s not too complex for a beginner either. You can just run with the basic settings and then customize as the need arises. BytesForAll have documented all the options on the actual web pages where you will make the changes and they are documented well. No need to open up a separate document and try and find the relevant description for the option you want to change.

4. Support is good. Any problems I have posted on the forum have been answered quickly by the moderators and there seems to be a healthy and lively community there.

The only real disadvantage with it is that it doesn’t look as pretty out of the box as some of the other themes. However, as it is easy to customize, you can make it look better with a little effort.