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:
Copy and paste your PHP code into the .phtml file:
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.
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:
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!
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.