public function viewstock_mvt() { global $cookie; $stockMvt = new StockMvt((int) Tools::getValue('id_stock_mvt')); $product = new Product((int) $stockMvt->id_product, true, (int) $cookie->id_lang); $movements = $product->getStockMvts((int) $cookie->id_lang); echo '<h2>' . $this->l('Stock Movements for') . ' ' . $product->name . '</h2> <table cellspacing="0" cellpadding="0" class="table widthfull"> <tr> <th>' . $this->l('ID') . '</th> <th>' . $this->l('Product Name') . '</th> <th>' . $this->l('Quantity') . '</th> <th>' . $this->l('Reason') . '</th> <th>' . $this->l('Employee') . '</th> <th>' . $this->l('Order') . '</th> <th>' . $this->l('Date') . '</th> </tr>'; $irow = 0; foreach ($movements as $k => $mvt) { echo ' <tr class="' . ($irow++ % 2 ? 'alt_row' : '') . '"> <td>' . $mvt['id_stock_mvt'] . '</td> <td>' . $mvt['product_name'] . '</td> <td>' . $mvt['quantity'] . '</td> <td>' . $mvt['reason'] . '</td> <td>' . $mvt['employee'] . '</td> <td>#' . $mvt['id_order'] . '</td> <td>' . Tools::displayDate($mvt['date_add'], (int) $cookie->id_lang) . '</td> </tr>'; } echo '</table>'; }