PrestaShop Maker is a tool to generate boilerplate code for PrestaShop projects.
It uses Symfony MakerBundle to generate code and then move the changes to your own project.
Clone the repository.
git clone https://github.com/Kaudaj/prestashop-maker.git
cd prestashop-maker
composer install
PrestaShop Maker adds a new command: make-to
.
make-to <destination-path> <make-command>
Example:
php /path/to/prestashop-maker/bin/console make-to /path/to/prestashop/project make:ps:grid
If you want to generate the files to a module instead of PrestaShop core, use -m
option with the module class name.
You can also define DESTINATION_MODULE
environment variable instead (in /.env.local
). It's practical if you're actively working on the same module, so you don't have to retype it everytime in the make-to
command.
Example:
php /path/to/prestashop-maker/bin/console make-to /path/to/prestashop/project make:ps:grid -m MyModule
As you can see, it will be quickly tiring to type the whole prestashop-maker console path each time. It is highly recommended to define a simpler shortcut that you can use anywhere.
Instructions are available in this gist.
Replace <your-command>
with php /path/to/prestashop-maker/bin/console make-to
and your-alias
with whatever you want.
As you can see, calling the make-to command then becomes much easier:
your-alias /path/to/prestashop/project make:ps:grid
To get the list of all the available makers, you can run the following command:
php bin/console list make
To get the list of the makers from PrestaShop Maker only, run this one:
php bin/console list make:prestashop
# or
php bin/console list make:ps
make:prestashop:controller
PrestaShop Controllermake:prestashop:kpi
PrestaShop KPImake:prestashop:grid
PrestaShop Gridmake:prestashop:crud-form
PrestaShop CRUD Formmake:prestashop:crud-cqrs
PrestaShop CRUD CQRSmake:prestashop:cqrs
PrestaShop CQRSmake:prestashop:settings-form
PrestaShop Settings Formmake:prestashop:multi-lang-entity
PrestaShop Multi-Lang EntityYou can report issues with this module in this very repository. Click here to report an issue.
As it is an open source project, everyone is welcome and even encouraged to contribute with their own improvements!
To contribute in the best way possible, you want to follow the PrestaShop contribution guidelines.
This module is released under the Academic Free License 3.0.
Feel free to contact me by email at info@kaudaj.com.