コード例 #1
0
ファイル: HistoryController.php プロジェクト: Eximagen/3m
 /**
  * Assign template vars related to page content
  * @see FrontController::initContent()
  */
 public function initContent()
 {
     parent::initContent();
     if (isset($_POST['addfile'])) {
         if (isset($_POST['oid'])) {
             $orderfiles = new orderfiles();
             $orderfiles->insertphotofromorder($_POST, $_FILES);
         }
     }
     if ($orders = Order::getCustomerOrders($this->context->customer->id)) {
         foreach ($orders as &$order) {
             $myOrder = new Order((int) $order['id_order']);
             if (Validate::isLoadedObject($myOrder)) {
                 $order['virtual'] = $myOrder->isVirtual(false);
             }
         }
     }
     $this->context->smarty->assign(array('orders' => $orders, 'invoiceAllowed' => (int) Configuration::get('PS_INVOICE'), 'reorderingAllowed' => !(int) Configuration::get('PS_DISALLOW_HISTORY_REORDERING'), 'slowValidation' => Tools::isSubmit('slowvalidation')));
     $this->setTemplate(_PS_THEME_DIR_ . 'history.tpl');
 }