redundant require statements, clean up install trait, standardize trait names, remove hard-coded php version require for composer.json
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
if (!defined('_PS_VERSION_')) {
|
|
exit;
|
|
}
|
|
|
|
use Websmid\WsOrderReference\Module\Install;
|
|
use Websmid\WsOrderReference\Module\DisplayHooks;
|
|
use Websmid\WsOrderReference\Module\ActionHooks;
|
|
|
|
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
}
|
|
|
|
class Ws_OrderReference extends Module
|
|
{
|
|
/** @var OrderReferenceRepository */
|
|
protected $orderReferenceRepository;
|
|
|
|
use Install;
|
|
use DisplayHooks;
|
|
use ActionHooks;
|
|
|
|
|
|
public function __construct()
|
|
{
|
|
$this->name = 'ws_orderreference';
|
|
$this->tab = 'other';
|
|
$this->version = '1.0.0';
|
|
$this->author = 'Isabelle Oving-Anno | De Websmid b.v.';
|
|
$this->need_instance = 0;
|
|
$this->ps_versions_compliancy = [
|
|
'min' => '9.0.0',
|
|
'max' => '9.99.99',
|
|
];
|
|
$this -> bootstrap = true;
|
|
|
|
parent::__construct();
|
|
|
|
$this->displayName = $this->l('Order Reference');
|
|
$this->description = $this->l('Adds an optional order reference field to the shopping cart summary.');
|
|
}
|
|
|
|
}
|