Michael RICOIS 56b40a7b6c Fix link
2017-08-11 15:40:42 +02:00

37 lines
1.2 KiB
PHP

<?php
class AddFileOrderOverride extends AddFileOrder
{
public function hookdisplayOrderDetail($params)
{
$id_order = Tools::getValue('id_order');
$id_lang = $this->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');
}
}