Ajout du module OrderStatusNotify
This commit is contained in:
25
local/modules/OrderStatusNotify/OrderStatusNotify.php
Normal file
25
local/modules/OrderStatusNotify/OrderStatusNotify.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user