public function getCarrierImage($carrier_id, $data) { // if carrier image exist else we take a default image $tabCarrier = array('src' => file_exists(_PS_SHIP_IMG_DIR_ . $carrier_id . '.jpg') ? _THEME_SHIP_DIR_ . $carrier_id . '.jpg' : '../img/admin/delivery.gif', 'alt' => 'logo'); // allows to get a carrier with Javascript if (ErpOrder::isMROrder($data['id_order'])) { $tabCarrier['alt'] = 'MR'; } else { if (ErpOrder::isExpeditorCarrier($carrier_id)) { $tabCarrier['alt'] = 'Expeditor'; } else { $tabCarrier['alt'] = 'unsupportedCarrier'; } } // add weight in hidden field (for shipping) $tabCarrier['weight'] = $data['poid'] * 1000; $html = '<input type="hidden" name="weight-carrier_id" value="' . $tabCarrier['weight'] . '" />'; $html .= '<img style="height:32px;" alt="' . $tabCarrier['alt'] . '" src="' . $tabCarrier['src'] . '" class="carrier_image" data-carrier="' . $tabCarrier['alt'] . '"/>'; return $html; }