getCurrentOrderTotalAmount() > 0; } public function postActivation(ConnectionInterface $con = null) { $database = new Database($con); // Insert email message $database->insertSql(null, array(__DIR__ . "/Config/setup.sql")); /* Deploy the module's image */ $module = $this->getModuleModel(); if (ModuleImageQuery::create()->filterByModule($module)->count() == 0) { $this->deployImageFolder($module, sprintf('%s/images', __DIR__), $con); } } public function destroy(ConnectionInterface $con = null, $deleteModuleData = false) { // Delete our message if (null !== $message = MessageQuery::create()->findOneByName('order_confirmation_cheque')) { $message->delete($con); } parent::destroy($con, $deleteModuleData); } /** * if you want, you can manage stock in your module instead of order process. * Return false if you want to manage yourself the stock * * @return bool */ public function manageStockOnCreation() { return false; } }