It’s almost a guarantee that at some point you will be needing to edit some code within the Opencart framework. This is especially true if you are going to be extending the basic Opencart 2.0 layout to more of a custom theme with custom functions and procedures. Truthfully, everyone say’s that they have the best IDE. It takes a little investigating sometimes even trial’s of different ones to find which is best for you. After all, everyone wants to be more productive, make fewer mistakes and write good code. Of course, that all depends on you, but in most cases IDE’s can help you achieve those goals more easily. Choosing the right IDE is very difficult because a lot needs to be considered. For the purpose of saving time we will just assume that you want to say create a new extension for your Opencart Store.
What is an IDE?
(Integrated Development Environment) = IDE. There are many PHP IDE’s out there but in my opinion only a few are worth a darn. A good IDE for beginners is Adobe Dreamweaver simply because it has a DESIGN VIEW. I would NOT recommend this personally because the tendency is to get stuck in design view where you never really learn anything. However, if you can also use the code view then I would recommend it. It’s not however even close to my #1 recommendation. This article will not explore all of the ones I feel that are the best but only one called Jet Brains PHP STORM which can be downloaded for a trial here: https://www.jetbrains.com/phpstorm/. PHP STORM has the following to be used at your advantage:
- Syntax highlighting
- Code completion
- Errors and warnings highlighting
- Versioning system
- Client-side features
On top of all of this PHP STORM also allows you to search very deep within the Opencart framework to see all uses of a function, or to see what class extends what.
Installing and using PHP STORM with Opencart
1) Download the trial version of PHP STORM
2) Install it on your windows or MAC
3) Make sure that you have a working copy of your Opencart store on your local machine.
4) Load up PHP STORM and start a new project by opening a directory:
5) Choose the directory and let it load up. You will then see the file tree of your Opencart install. Open up any file and see how things look in the GUI (Graphics User Interface). This is in general, what you should see:
Performing a Global Search
Sometimes you want to find an instance of a string (search term) in your entire project. Simply just go to EDIT>FIND>FIND IN PATH and choose WHOLE PROJECT. Enter your search term and press search. You can even choose a different directory and search for something outside of your project by specifying the directory to search in.
Colors, formatting, and other settings:
Perhaps you aren’t happy with the default color Schema well….they have many to choose from. You also can set up a lot of different parameters to your liking.
Syncing with server
You can choose to either sync with a live server, GIT REPOSITORY, or just save files to your local and upload them one by one to your server via FTP (file transfer protocol.)
Overall, I hope this has been informative for you. Some people just prefer to script in plain old notepad. I prefer an IDE that empowers to you maximize your efficiency.