Kaudaj / kjblocks

PrestaShop Module: Add content blocks in any hook.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blocks for PrestaShop

PHP tests GitHub release GitHub license

About

Blocks module allows you to add fully configurable blocks to render custom content in your shop, wherever you want.

Essential features

  • Blocks
  • Block groups
  • Many block types available through extensions
  • Designed to be very extensible

Usage

Installation

Get started

From PrestaShop installation root:

cd modules
git clone https://github.com/Kaudaj/kjblocks.git
cd kjblocks
composer install
cd _dev
npm install
npm run build
cd ../../..
bin/console pr:mo install kjblocks

Configuration

  • tests/php/.phpstan_bootstrap_config.php
    For GrumPHP: Set PrestaShop installation path for PHPStan task.
    Replace default path with the root path of a stable PrestaShop environment.

Commands

Here are some useful commands you could need during your development workflow:

  • composer grum
    Run GrumPHP tasks suite.
  • composer header-stamp
    Add license headers to files.
  • composer autoindex
    Add index files in directories.
  • composer dumpautoload -a
    Update the autoloader when you add new classes in a classmap package (src and tests folder here).
  • npm run watch
    (in _dev folder) Watch for changes in _dev folder and build automatically the assets in views folder. It's recommended to run it in background, in a dedicated terminal.
  • npm run lint-fix
    (in _dev folder) Run ESLint fixer
  • npm run prettier-fix
    (in _dev folder) Run Prettier formatting

Extensions

If you want to add your own block type, start with kjblocksexampleextension. It's a documented example extension which add an example type. Check this repository to know how to start!

Compatibility

PrestaShop >=8.0.0
PHP >=7.2 for production and >=8.0 for development
Multishop ✔️

License

Academic Free License 3.0.

Reporting issues

You can report issues in this very repository.

Contributing

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.

Contact

Feel free to contact us by email at info@kaudaj.com.

About

PrestaShop Module: Add content blocks in any hook.

License:Academic Free License v3.0


Languages

Language:PHP 90.1%Language:Twig 4.8%Language:JavaScript 2.9%Language:SCSS 1.6%Language:Smarty 0.5%