create listener for colissimo module

This commit is contained in:
Manuel Raynaud
2014-02-12 15:48:44 +01:00
parent c64a9591e0
commit 45a50f8035
3 changed files with 121 additions and 0 deletions

View File

@@ -23,9 +23,11 @@
namespace Colissimo;
use Propel\Runtime\Connection\ConnectionInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Thelia\Exception\OrderException;
use Thelia\Install\Database;
use Thelia\Model\Country;
use Thelia\Module\BaseModule;
use Thelia\Module\DeliveryModuleInterface;
@@ -107,6 +109,13 @@ class Colissimo extends BaseModule implements DeliveryModuleInterface
return $this->dispatcher;
}
public function postActivation(ConnectionInterface $con = null)
{
$database = new Database($con->getWrappedConnection());
$database->insertSql(null, array(__DIR__ . '/Config/thelia.sql'));
}
/**
*
* calculate and return delivery price