if (strpos($id_product, ';') !== false) { $ids = explode(';', $id_product); $id_product = $ids[0]; $id_product_attribute = $ids[1]; } else { $id_product_attribute = 0; } } /** Note NDE : à enlever ?? on perd la récupération faites au dessus si dans le cas de la concaténation dans id_produt */ $id_product = Tools::getValue('id_product'); /* For each supplier */ $suppliers = Supplier::getSuppliers(); $supplier_ref_output = array(); if (!empty($suppliers)) { foreach ($suppliers as $supplier) { $supplier_ref = ErpProductSupplier::getProductSupplierReference($id_product, $id_product_attribute, (int) $supplier['id_supplier']); if ($supplier_ref != false) { $supplier_ref_output[(int) $supplier['id_supplier']] = array('name' => $supplier['name'], 'ref' => $supplier_ref); } } if (!empty($supplier_ref_output)) { echo '<table style="text-align:left" class="table">'; foreach ($supplier_ref_output as $ref_output) { echo '<tr>'; echo '<td>' . $ref_output['name'] . ' : </td>'; echo '<td> ' . $ref_output['ref'] . '</td>'; echo '</tr>'; } echo '</table>'; } else { echo $erpip->l('No suppliers references found');