This Package is part of the OXID Academy Development Basic Training.
composer require oxid-academy/product-counter-service
If you encounter any issues after installation, clear your source/tmp
directory.
This OXID eShop Component counts all available products in the currently active shop.
/** @var OxidAcademy\ProductCounterService\Counter $counter */
$container = ContainerFactory::getInstance()->getContainer();
$counter = $container->get(OxidAcademy\ProductCounterService\Counter::class);
var_dump($counter->count());