53 lines
2.0 KiB
PHP
Executable File
53 lines
2.0 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* MODULE PRESTASHOP OFFICIEL CHRONOPOST
|
|
*
|
|
* LICENSE : All rights reserved - COPY AND REDISTRIBUTION FORBIDDEN WITHOUT PRIOR CONSENT FROM OXILEO
|
|
* LICENCE : Tous droits réservés, le droit d'auteur s'applique - COPIE ET REDISTRIBUTION INTERDITES SANS ACCORD EXPRES D'OXILEO
|
|
*
|
|
* @author Oxileo SAS <contact@oxileo.eu>
|
|
* @copyright 2001-2014 Oxileo SAS
|
|
* @license Proprietary - no redistribution without authorization
|
|
*/
|
|
|
|
class Order extends OrderCore
|
|
{
|
|
public static function printPDFIcons($id_order, $tr)
|
|
{
|
|
$order = new Order($id_order);
|
|
$orderState = OrderHistory::getLastOrderState($id_order);
|
|
if (!Validate::isLoadedObject($orderState) OR !Validate::isLoadedObject($order))
|
|
die(Tools::displayError('Invalid objects'));
|
|
echo '<span style="width:20px; margin-right:5px;">';
|
|
if (($orderState->invoice AND $order->invoice_number) AND (int)($tr['product_number']))
|
|
echo '<a href="pdf.php?id_order='.(int)($order->id).'&pdf"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>';
|
|
else
|
|
echo ' ';
|
|
echo '</span>';
|
|
echo '<span style="width:20px;">';
|
|
if ($orderState->delivery AND $order->delivery_number)
|
|
echo '<a href="pdf.php?id_delivery='.(int)($order->delivery_number).'"><img src="../img/admin/delivery.gif" alt="delivery" /></a>';
|
|
else echo ' ';
|
|
echo '</span>';
|
|
|
|
|
|
// Chronopost
|
|
echo '<span style="width:20px;">';
|
|
if ($orderState->delivery AND $order->delivery_number AND (
|
|
$order->id_carrier==Configuration::get('CHRONOPOST_CARRIER_ID')
|
|
or $order->id_carrier==Configuration::get('CHRONORELAIS_CARRIER_ID')
|
|
or $order->id_carrier==Configuration::get('CHRONOEXPRESS_CARRIER_ID')
|
|
))
|
|
{
|
|
echo '<a href="../modules/chronopost/postSkybill.php?orderid='.(int)($order->id).'&shared_secret='
|
|
.Configuration::get('CHRONOPOST_SECRET').'" title="Imprimer la lettre de transport">
|
|
<img src="../modules/chronopost/logo.gif" alt="Chronopost" title="Chronopost">
|
|
</a>';
|
|
}
|
|
else echo ' ';
|
|
echo '</span>';
|
|
}
|
|
|
|
}
|
|
?>
|