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:

<?php
class AddressCore extends ObjectModel
{
  // ...
}

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

<?php
class 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