26 lines
755 B
PHP
26 lines
755 B
PHP
<?php
|
|
|
|
namespace OrderStatusNotify;
|
|
|
|
use OrderStatusNotify\Model\OrderStatusNotificationQuery;
|
|
use Propel\Runtime\Connection\ConnectionInterface;
|
|
use Thelia\Install\Database;
|
|
use Thelia\Module\BaseModule;
|
|
|
|
class OrderStatusNotify extends BaseModule
|
|
{
|
|
/** @var string */
|
|
const DOMAIN_NAME = 'orderstatusnotify';
|
|
const MESSAGE_NAME = 'order_status_changed';
|
|
|
|
public function postActivation(ConnectionInterface $con = null)
|
|
{
|
|
try {
|
|
OrderStatusNotificationQuery::create()->findOne();
|
|
} catch (\Exception $e) {
|
|
$database = new Database($con->getWrappedConnection());
|
|
$database->insertSql(null, array(THELIA_ROOT . '/local/modules/OrderStatusNotify/Config/thelia.sql'));
|
|
}
|
|
}
|
|
}
|