Feb 13, 2015

PhpStorm: get autocomplete for PrestaShop

If you use PhpStorm and PrestaShop you probably noticed that you can't get your IDE to autocomplete everything.

phpstorm-prestashop-autocomplete-screenshot

PrestaShop is designed to be overridden, and every class from the core is suffixed with 'Core'.

For example, Address class is actually declared this way:

1<?php
2class AddressCore extends ObjectModel
3{
4 // ...
5}

So I have generated a file that extends each class with the correct name

1<?php
2class Address extends AddressCore {}

Configure PhpStorm with PrestaShop

  1. Download the file autocomplete.php (or clone this repo)
  2. Add the file to your project as an "External Library" as shown on the image below

how-to-get-phpstorm-autocomplete-prestashop

Find out more on Github: https://github.com/julienbourdeau/PhpStorm-PrestaShop-Autocomplete