This is a demo component which is used in module: https://github.com/OXID-eSales/loggerdemo
Add these lines to modules/composer.json:
{
"repositories": {
"oxid-esales/event_logger_demo": {
"type": "vcs",
"url": "https://github.com/OXID-eSales/event_logger_demo.git"
}
},
"require": {
"oxid-esales/event_logger_demo": "dev-master"
}
}
Run installation command from modules directory:
composer install
Include composer autoloader in modules/functions.php:
require_once dirname(__FILE__) . '/vendor/autoload.php';
Add use of class:
use OxidEsales\EventLoggerDemo\BasketItemLogger;
Usage:
$basketItemLogger = new BasketItemLogger('/path/to/logs/directory');
$basketItemLogger->logItemToBasket('product_id');