This module is a simple integration of the PokeAPI into Magento 2. It allows you to search for a Pokémon by name and view its details on the PLP/PDP.
The pokemon details are displayed basing on the Pokémon's name which you can set on the product's attribute - Pokemon Name
.
composer config repositories.poke-pokemon git https://github.com/nmalecki/m2-poke.git
composer require poke/module-pokemon
php bin/magento module:enable Poke_Pokemon
php bin/magento setup:upgrade
Go to Stores > Configuration > Poke API
.
In the Poke API Configuration
section, you can set the base URL of the PokeAPI. By default, it is set to https://pokeapi.co/api/v2/
.
To manage Pokemon Details, go to Pokemon Details
section. You can enable/disable displaying Pokemon details on the product page and product listing page.
Here you can also set life time of the cache.
The module is enabled by default - once a pokemon's name is set on a product it will be displayed in the storefront.
If there is any issue while fetching Pokémon data, the information will be displayed in the storefront.
You can also find more details in the log file - var/log/pokemon_error.log