oxid-esales/event_logger_demo

This a demo component which shows how it can be used with OXID eShop modules.

dev-master 2019-01-23 16:43 UTC

This package is not auto-updated.

Last update: 2024-10-27 06:07:54 UTC


README

This is a demo component which is used in module: https://github.com/OXID-eSales/loggerdemo

Installation

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

For OXID eShop version < 4.9.6/5.2.6

Include composer autoloader in modules/functions.php:

require_once dirname(__FILE__) . '/vendor/autoload.php';

Usage

Add use of class:

use OxidEsales\EventLoggerDemo\BasketItemLogger;

Usage:

$basketItemLogger = new BasketItemLogger('/path/to/logs/directory');
$basketItemLogger->logItemToBasket('product_id');