context->language->id; $order = new Order($id_order); $orderHistory = $order->getHistory($id_lang); $isBatsend = false; $isBatvalidate = false; if (count($orderHistory) > 0) { foreach ($orderHistory as $h) { if ($h['id_order_state'] == Configuration::get('PS_BATSEND_ID_ORDER_STATE')) { $isBatsend = true; } if ($h['id_order_state'] == Configuration::get('PS_BATVALIDATE_ID_ORDER_STATE')) { $isBatvalidate = true; } } } $this->context->smarty->assign(array( 'dirExist' => $this->checkOrderDir($id_order), 'files' => $this->getFileOrderCustomer($id_order), 'isBatsend' => $isBatsend, 'isBatvalidate' => $isBatvalidate, 'batsend_id_order_state' => Configuration::get('PS_BATSEND_ID_ORDER_STATE'), 'batvalidate_id_order_state' => Configuration::get('PS_BATVALIDATE_ID_ORDER_STATE'), )); return $this->display(__FILE__, 'views/templates/hook/addfileorder.tpl'); } }