Magento Developers Toolbox – Magento PHP Console

  • Sumo


Let’s add another wrench to our magneto developer toolbox console php

How many hours a week does the average Magento developer spend editing a test file, refreshing the page, and editing the code again to fix one more thing?

I am always trying to find new tips and trick to speed up Magento development whether using MageTool or code wrappers/snippets in PHPStorm. Even those tools have their limits. XDebug can really help troubleshoot faulty code, but stepping can be tedious and time consuming. I would like to introduce a project that I just started on github that was forked from a simple php console that integrates with Magneto. Its pretty simple really.

Magento PHP Console

Magento Console - An Essential tool for the Magento developer toolbox

This tool allows developers to test code by simple inserting php code into the console and hitting ctrl+enter. The code is evaluated via ajax and the response is displayed in an output window. This can be useful when looking for simple things like proper attribute codes. The tool is also useful for testing quickly refactored code and modularly testing functions within a class.

Personally, the tool has helped me write cleaner code, because development can be accomplished in a test-driven manner. Functions are cleaner and provide a more clear role because of the ease of testing.

Magento Console - Code Snippets Feature

The code behind the scenes simply loops through all the directories up a level and adds those to a project menu in the application. Clicking on one of the projects includes the Mage file and allows all code to be executed in the specific project’s instance.

But wait there’s more….the console also has support for saving snippets in LocalStorage. The snippets names are a combination of the current project and the name provided by the developer.

Installation Instructions:

  1. Clone project from github in your root sites directory (for me its home/username/sites/).
  2. Create vhosts for site.
  3. Map hosts file for site.
  4. Go to site in browser.

I am sure that everyone would like to see support for Gists, Rich Snippets, Auto-completion and lots of other features. Please contribute!

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Magento Developers Toolbox - Magento PHP Console, 10.0 out of 10 based on 1 rating

Author: Luis Tineo

Husband, Father, performance improvement junkie, biker and video gamer, Linux user and in my day job I'm a Software Engineer at BuyerQuest.

Share This Post On
  • To set up the PayFast cope factor using the Magento Weblink assistance, do as instructed below:
    1. Login to the Magento Administrator console
    2. Using the primary option, get around to Program → Magento Weblink → Magento Weblink Manager
    3. Enter the following in the “Paste growth key to install” position
    o Magento Weblink v1.x magento-community/PayFast
    o Magento Weblink v2.x
    4. Click Install
    5. Once set up has finished, generally select the “Return to Admin” link

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)