Magicento is a PHPStorm plugin for Magento developers. Features include:
Goto for factories and template paths, autocomplete for factories, xml files and class names, documentation for xml nodes, evaluation of PHP code inside Magento environment, and much more! check the features and videos below
for Magento 1.x
for Magento 2.x
After completing the payment a new Magicento user will be generated for you automatically and you will get a special download link for your unique version of Magicento
Magicento license is by User,
it can be used in multiple devices, but always by the same user.
If you are a company needing a bulk license please contact me.
30 days money-back guarantee!
I'm pretty sure you will love Magicento. I'm a Magento developer too, I use Magicento everyday and I can guarantee it's a big time saver, also you will enjoy much more developing in Magento with the help of Magicento.
But If you are unsatisfied for any reason, please email me and I will issue a refund.
Also check this FAQ if you have this problem: Cannot install Magicento. PHPStorm is closed automatically after trying to install the plugin
Use CTRL + B when cursor is over some event name in config.xml
Click on the linemarker present on Mage::dispatchEvent calls, if there is an observer it will jump to config.xml definition of them
Event search (now works with dynamic events too like "_save_after"
Search for old (and unsafe) admin routers: https://magento.com/security/patches/supee-6788-technical-details
It will check them automatically too
If Magicento is not recognizing the return type for some method you can help telling the class it should interpret
Use CTRL+SPACE and CTRL+Q as always inside any widget.xml
Use CTRL+B when cursor is over some string representing some table alias
Use CTRL+B when cursor is over some System Configuration field to jump to system.xml definition of that field
Use ALT+ENTER (or your intention action shortcut)
Use ALT + M > Create Grid and Form anywhere.
All the fields have tooltips to help you understand what it does if is not intuitive enough.
TIP: is you use ALT+M inside the model class you want to create the form for, then Magicento will autofill some options for you.
These are the new files (Blocks) created by Magicento. Also there are new actions inside the controller (if you select that option).
Here you can edit the templates used to create the controller actions
Here you can edit the templates used to the Grid and Form Blocks
This autocomplete was not working before
Use ALT + M > Add to solved rewrite conflict list when editing some class with a rewrite conflict.
Adding the class to "Solved Rewrite conflict list" will avoid Magicento warnings about that conflict.
You can do the same from Magicento settings, this is just an easier and faster way to do that.
You can assign multiple Magento folder paths now
This could be useful with custom folder structures like the one below.
Magento src is not on the project root, and it doesn't have the full code from Magento inside
Magicento will try to detect the correct folder to create the new files (controllers, models, etc) but if it can't decide it you will be asked where you want to create them.
In the example above that is what happening when trying to create a new module
Use (anywhere) ALT + M > Create Controller
NOTE: If you choose an existing frontname or routename it will rewrite the original controller from that frontname or routename
Use (anywhere) ALT + M > Go to Controller
Put your Magento URL (or just the relative path: "frontname/controllername/action")
NOTE: it doesn't support URL rewrites yet
Use CTRL + B when cursor is over some handle in any layour XML file
NOTE: if Magicento can find the controller/action for that handle it will be shown as the first item in the list (the other items are references to other places where that handle is used inside the Layout)
Use CTRL + B when cursor is over action method
Use CTRL + SPACE to get al possible handles (using controllers actions combinations)
Use ALT + M > Go to Template from other Package Theme when editing some .phtml file.
You will be able to jump to the same template from other packages themes
Use ALT + M > Copy Relative Path when editing some .phtml file.
This could be specially useful for Windows users, to avoid getting the backslash "\" when copying the file path from PhpStorm
Use CTRL + SPACE. Magicento should detect better the class when using chained methods.
Anyway, the support for this is not complete (see the example below). The problem here is that Magento is using a bad @return PHPDoc.
Magento sometimes is using things like "@return Varien_Object" and it should use "@return $this" instead when the method is returning $this.
TIP: to fix the above problem, try using a non chained version of the same code:
Use CTRL + SPACE when cursor is inside Mage::registry('[HERE]')
Use CTRL + SPACE to get code completion
NOTE: this only works for keys originally registered in Magento, is not dynamic
You can now execute IDE actions from your Magicento PHP Scripts.
You just need to assing some values to the $GLOBALS['MagicentoActions'] var.
Available Actions:
Check this example for more details (you can download and execute it in yout environment)
Use ALT + M > Go to Event Observer anywhere.
type the name of the event (or part of it)
Magicento will show you the observers for that event
Use ALT + ENTER (or your intention shortcut) when the cursor is over some variable in PHP
Use CTRL + SPACE inside a foreach with a collection.
Magicento will infere the model type automatically. You don't need to add @var phpdocs.
Use CTRL + SPACE after
->getResource()
->_getResource()
->getCollection()
->getResourceCollection()
should work fine everywhere.
Use CTRL + B (or CTRL+CLICK) when the cursor is over some method in Observer.php
Added data installer, mysql4 prefix is optional, autocomplete for namespaces.
Use CTRL + SPACE inside addAttributeToFilter and addFieldToFilter
Use ALT + ENTER to camelize ->getData('key') or ->setData('key', $value)
New delay setting for PHP features.
It will delay the excution of eval.php, this could be useful for example if you need to upload with some sync script the eval.php to your server
New test button for checking if PHP features are working with the current settings
Use ALT + M > Create Model Triad anywhere (the cursor must be inside the editor (an opened file)
Magicento will open a dialog for creating the Model, Resource and Collection (with the required nodes in config.xml if it doesn't exist)
You can edit the templates used to generate the Model, Resource and Collection class:
Use ALT + M > Add @method PHP Doc when the cursor is inside a Model class
It will read the fields from the table associeted with that Model in your Magento DB
Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over your cron method definition
Magicento will create the method in the corresponding class (and will create the class if it doesn't exist too).
Go to File > Settings > Magicento
New autocomplete for get/set/uns/has methods on models (just use CTRL+SPACE as always, it works when you have the prefix already typed: Mage::getModel('catalog/product')->get[CTRL+SPACE HERE])
The first time you will probably need to read the data keys for your model from your Magento DB:
If the PHP features are not working fine in your Project, you can use the Magicento script called: Get Varien Object Keys
* NOTE: You will probably see that file inside the "Other" folder
Download that script, it will be saved into:
[YOUR PROJECT FOLDER]/.idea/magicento/scripts/magicento/get_varien_object_keys.php
You can use that script as a reference for generating the .xml used by Magicento for all your models.
You will probably need to adapt it a bit (for example execute Mage::app(); first), and upload and execute that script to your Magento server, manually.
If you are generating the XML in that way, save it to:
[YOUR PROJECT FOLDER]/.idea/magicento/varienobjectdata.xml
Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over the filename for the new layout update inside your confg.xml
Magicento will let you choose the package and theme and will create and open that file for you.
Use ALT + ENTER when the cursor is over Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over some: ->getsomething_here and it will be converted to ->getSomethingHere()
*You need to prefix the method with get, set, uns or has to invoke the intention
Using PHPStorm 6+ (*) you will get code completion for factories automatically (just use Ctrl+Space like always).
This is useful not only for code completion but also for "go to declaration" feature (just use Ctrl+B / Ctrl+Click / middle click (windows)).
It works for $this->helper() inside templates and $this->_factory->getModel|getHelper|getSingleton|getResourceModel too
* If you are using an old PHPStorm version, you can have code completion using "add @var" action:
with the cursor over your $variable use Alt+M (Option+M)
PHPStorm 6+ required (with older versions you can use Alt+M > add @var $this on any .phtml file).
Make sure you have enabled this option inside Magicento settings.
Note: sometimes is not possible to find the correct Block for the current template (for example when the template is not assigned with the layout.xml but is hardcoded inside the Block class, or when you have wrong package/theme in Magicento Settings)
Just use Ctrl+Space after the "class " keyword
It works for controllers too
Note: this could be a big time saver because your class names won't have typo errors anymore, also is very useful when you need to refactor some module name.
Use Ctrl+Space after the "extends " keyword.
Use Alt+M when the edit cursor is inside the class you want to rewrite and select Rewrite Class or Rewrite Controller.
Then select the target module where the new class will be created.
And lastly you can change the default class name (proposed by Magicento) for the new class.
When you are rewriting a controller the dialog is a bit different:
The prior dialog will generate a class and xml like this:
Note: the only requirement for these actions is to have a valid target module already created, with a config.xml file (config.xml can be empty, Magicento will create the correct nodes)
Use Alt+M anywhere inside any opened file and select Create Module
The options are self explanatory
The "Group" field can be empty and it will use the default one (NAMESPACE_MODULENAME), in the image above the default group is "magicento_test" but it was changed to "mtest"
You can choose if you want to generate the nodes and folders for the blocks, models, helpers (in this case it will create a Data.php file too) and installers.
These are the files generated by the prior dialog:
Use your "Go to" shortcut (by default Ctrl+B / Ctrl+Click) on any string representing a factory to jump to the class for that factory.
This works everywhere:
Mage::getModel('[CTRL+B HERE]')
<block type="[CTRL+B HERE]" ... >
$this->_init('[CTRL+B HERE]')
etc
Use your "Go to" shortcut (by default Ctrl+B / Ctrl+Click) on any relative path to some file.
For example
<block ... template="[CTRL+B HERE]" >
<file>some_layout_file.xml</file>
Use your "Go to" shortcut (by default Ctrl+B / Ctrl+Click) on any string representing a block name/alias or handle name.
For example
<reference name="[CTRL+B HERE]">
<update handle="[CTRL+B HERE]">
$this->getChildHtml('[CTRL+B HERE]')
$this->getBlock('[CTRL+B HERE]')
Use Alt+M when the edit cursor is inside a Block class and select the action Goto block definition in layout
Note: sometimes Magicento can't find the <block> nodes where the Block class is used. This happens for example when the block is created from PHP instead of using the layout (adminhtml grids for example).
Use Alt+M when the edit cursor is inside a Block class and select the action Go to template from block
Note: sometimes Magicento can't find the .phtml file/s where the Block class is used. This happens for example when the template is assigned with PHP instead of using the layout.
Use Alt+M when editing some template (.phtml) file and select the action Go to Block
Note: sometimes Magicento can't find the Block class reference by $this in the .phtml file. This happens for example when the template is assigned with PHP instead of using the layout.
Use your "Go to" shortcut (by default Ctrl+B / Ctrl+Click) on the event name inside any Mage::dispatchEvent call.
Mage::dispatchEvent('[CTRL+B HERE]')
Note: at the moment this works only for constant/hardcoded event names
Use Ctrl+Space), for example:
Mage::helper('[CTRL+SPACE HERE]')
This works with $this->_init([CTRL+SPACE HERE]) inside Models and Collections too
Use Ctrl+Space) with ->getTable calls, for example:
This works with $this->_init([CTRL+SPACE HERE]) inside ResourceModels too
Use Ctrl+Space) with Mage::getStoreConfig, for example:
Note: this works part by part, you probably need write a forward slash "/" and use Ctrl+Space again to get the final desired config path
Use Ctrl+Space with:
$this->getChild('Ctrl+Space')
$this->getChildHtml('Ctrl+Space')
$this->getBlock('Ctrl+Space')
$this->getBlockdHtml('Ctrl+Space')
Use Ctrl+Space inside any config.xml:
Tip: try to use it always, on any level, for nodes and also values.
Use Ctrl+Space inside any system.xml:
Tip: try to use it always, on any level, for nodes and also values.
Use Ctrl+Space inside any adminhtml.xml:
Tip: try to use it always, on any level, for nodes and also values.
Use Ctrl+Space inside any /layout/*.xml file:
Tip: try to use it always, on any level, for nodes, attributes and values.
Tip: if the autoformat is breaking your original format maybe that is because you have the wrong settings for the code styles.
Please make sure you have this configuration:
Use Ctrl+Q when the cursor is over some node name or attribute name to get some brief documentation.
Note: at the moment not all the nodes and attributes are documented
Magicento will search rewrite conflicts automatically and will show you an alert if some conflict is found
Also you can trigger this check manually using Alt+M > Check rewrite conflicts, from anywhere (inside the editor)
Lastly you can set the classes for the rewrite conflicts you have fixed so Magicento is won't warn you about them anymore:
File > Settings > Magicento > Rewrite conflicts solved
you can disable the auto check for rewrite conflicts from Magicento settings too.
Use Alt+M when editing some .phtml and select the action Copy Template
Then you need to select the target Package and Theme (*), a new file with the same relative path will be created there.
* At the moment this only works for existent themes (so you need to create the folder first if you want to use a new Theme)
Since Magicento 2.2.0 you can also change the final relative path for the new .phtml
Use Alt+M when editing some file located in /code/local/Mage or some .phtml/.xml and select the action Compare with Original
Use ALT + M > Compare Templates when editing any .phtml file, you can select the package and theme to compare with.
Use Alt+M when editing any file and select the action Evaluate in Magento
Write the PHP code to evaluate (it will be executed inside your Magento so you can use Magento code)
By default the code is evaluated inside a "var_dump" call, that's why you don't need to put the semicolon, and you can evaluate just one sentence.
But this can be changed from Magicento Settings
When you are not using the "var_dump" option you can write any PHP code, but if you want to see some output you need to call "echo" (or some output function) by yourself.
Use Alt+M when editing any file and select the action Toggle Template Hints
This action will toggle the template hints for the frontend and also the backend in your current Magento
Use Alt+M when editing any file and select the action Flush Cache
This action is very useful when you are developing with the cache enabled
Use Alt+M when editing any installer script (.php files inside /sql and /data folders) and select the action Remove this installer from core_resource table
This is useful when you want to run again some installer script
The core_resource table will be reseted to the prior script version so when you run Magento again the script will be executed automatically
Use Alt+M when the edit cursor is over some config path inside any Mage::getStoreConfig call and select the action Get Store Config
You can do the same evaluating the code with Alt+M > Evaluate in Magento
To obtain the specific value for some store, you need to set the current store from Magicento Settings (or use Alt+M > Set Store)
Select the text inside any .phtml file, use Alt+M and select the action Translate TExt
TIP: put the cursor in some part of the text to translate and use Ctrl+W to select the whole string quickly
Use Alt+M when the edit cursor is over some translated string and select the action Add Translation
Then type the translated text and select the translation .csv type (if you choose translate.csv and the file doesn't exist in the selected theme, it will be created)
Magicento includes the Magento dictionary from here: https://github.com/tim-bezhashvyly/phpstorm-magento-dictionary
Magicento will check automatically for malformed config.xml (for example when you have an end of line after some class name/prefix, etc)
You can add your own features writing them in pure PHP!
Magicento will execute your script passing your custom params and some information about the file you are editing.
Example:
Open MagicentoScripts toolwindow
Create a new script
Write your PHP code
Inside $GLOBALS['Magicento'] you will have the data from your params and also some data from the current file your are editing in PhpStorm
Alt+M > Execute PHP scripts anywhere when editing some file
Choose the script to execute
Because we added a param called "echo" Magicento is asking us for the value we want for it in our script
Magicento will show the output of the script (if any) inside the toolwindow
You can share your scripts with other Magicento users (or using it as a shared database for your team or for your different projects)
Refresh your tree (right click) to see the scripts uploaded to Magicento.com by you and other users
Download will save that script in your local project so you can use it (or edit if need it)
* This feature is in alpha state and there are a lot of things to do in this area if the community find it useful.
If your project code does not contain the Magento core files you can use Magicento anyway.
Just set the Mage.php to some local Magento installation.
Magicento will create all modules and new files under the current project, and will merge the code from your current project and the code from your local Magento
You can use ${MAGENTO_MODULE_VERSION}, ${MAGENTO_MODULE_NAMESPACE}, and ${MAGENTO_MODULE} in your File Templates
File > Settings > File and Code Templates
Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over any relative path to some .phtml file
Magicento will let you choose the package and theme and will create and open that file for you.
This is useful when you are setting some template in your layout XML but that template doesn't exist yet
Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over your method name in your config.xml
Magicento will create the method in the corresponding observer class (and will create the observer class if it doesn't exist too).
Use ALT + ENTER (normal shortcut for intention actions) when the cursor is over the event name in any call to Mage::dispatchEvent
Magicento will create the nodes in your config.xml for that event and also the observer class (if doesn't exist yet) and method
You can see Magicento in action in these videos (note there are some missing features like Magicento PHP Scripts more videos comming soon):
Go to File > Settings > Magicento
3.4.0
3.3.16
3.3.15
3.3.9
3.3.8
3.3.7
3.3.6
3.3.5
3.3.4
3.3.3
3.1.7
3.1.6
3.1.5
3.1.4
3.1.3
3.1.2
3.1.0
3.0.2
2.9.4
2.9.3
2.9.2
2.9.1
2.9.0
2.8.0
2.7.0
2.6.5
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.0.1
2.0.0
1.7.1
1.6.2
1.6.2
1.6.0
1.4.2
1.4.1
1.4.0
1.3.0
1.2.0
1.0.1
1.0
0.9.8
0.9.7
Video with all the features: www.magicento.com
0.9
0.8.2
0.8
1.8.8
1.8.7
1.8.6
1.8.5
1.8.4
1.8.3
1.8.1
1.7.2
1.7.1
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.0.0
0.3.1
0.3.0
0.2.1
0.1.0
0.0.1
Magicento will work automatically on your Magento projects (if not please check the configuration going to File > Settings > Magicento).
You have only one shortcut: Alt+M (Option+M on mac). This shortcut is context aware, that is, you will see different options depending where the cursor is (a var definition, a .phtml file, a Block class, an intaller script, an xml etc).
The rest of the features from Magicento are accesible using the original shortcuts from PHPStorm (Ctrl+Space for autocomplete, Ctrl+B | Middle Click | Ctrl+Click for "Go to..", Ctrl+Q for documentation).
Please read the Features (really important to take advantage of Magicento)
If a new version is available for you, Magicento will show a new item (on the top): "Update Magicento" when you use ALT+M (Option+M in Mac)
Another option is tou use your private link (the one you have used to download Magicento the first time, you should have this in your email too), every plugin is unique and has a unique link to download your version.
If you don't have your private link please email me and I will send it again.
Magicento will show an alert when a new version is available.
Moreover you will see a new option "Update Magicento" inside Magicento menu (Alt+M or Option+M in Mac)
Also you can follow @magicentoplugin on twitter, I will inform about updates there too.
Seguir @magicentoplugin
Please use the issues tab on github: https://github.com/enriquepiatti/Magicento/issues. If you don't have a github account send an email to "issues at magicento.com" describing the issue, with the full trace of the exception if it's available.
You can request, comment and vote new features clicking the "suggestions" box in the middle left of this screen
You can uninstall it from the plugin section on the settings panel of the IDE. Or if you want to disable it just for the current project goto "magicento" section inside the settings of the project and disable it from there.
If for some reason you can't do that (maybe the IDE hangs up or you can't start it), then you can disable it by adding this line to /.idea/magicento.xml:
<option name="enabled" value="false" />
As a last option, you can also search for "magicento.jar" in your hdd and remove it, in Windows for example it is normally located at: [USER_FOLDER]\.WebIde60\config\plugins\magicento.jar and in Mac at: ~/Library/Application/Support/WebIde60/magicento.jar
Try first uninstalling Magicento: How to disable Magicento?
If that doesn't work try removing PHPStorm logs too (in windows for PHPStorm 6+: [USER_FOLDER]\.WebIde60\system\log\)
If that doesn't work either try removing indexes, or remove the /.idea folder from your project (the IDE should start correctly if you don't start it with an opened project, and then you can remove or disable Magicento from there).
And don't hesitate to contact me by email: contacto@enriquepiatti.com or skype: enriquepiatti.
Also please remember to submit the issue (How to inform about issues/problems?), and I will try to fix it ASAP
Try uninstalling any previous Magicento version, close all your opened projects, and install Magicento again (without opening any project)
If problem persists you can try closing the IDE and copying "magicento.jar" directly inside your IDE settings folder (and try removing the .idea folder from your projects too):
Make sure "IntelliLang" and "XPathView + XSLT Support" plugins are installed and enabled. Also check you don't have any other plugin causing some conflict.
This error happens only with PhpStorm 8.0.2 and if you are using Magicento version lower than 2.9.0. So the solution is to downgrade PhpStorm or update Magicento
If you are getting that error when trying to install Magicento, then probably your magicento.jar is corrupted, please contact me in that case.
They are two different products (each one with it's own license). Magicento2 is a plugin to work with Magento 2.x projects and Magicento with Magento 1.x projects.
Because I've tested a lot of IDEs and even when it's not perfect, I think it's the best option in the market
Magicento1 and Magicento2 are compatible with PhpStorm versions going from 2019+ to 2020.1. It could work in later versions but is not full tested