add mr shipping number in order detail tpl

This commit is contained in:
Marion Muszynski 2017-08-18 11:18:06 +02:00
parent 4a02a00cbd
commit a1b13d71cc
3 changed files with 31 additions and 1 deletions

View File

@ -197,6 +197,13 @@ class OrderDetailController extends OrderDetailControllerCore {
WHERE o.`id_order` = ' .(int)$order->id . '
ORDER BY `date_add`
');
$numbers2 = Db::getInstance()->ExecuteS('
SELECT p.*
FROM `'._DB_PREFIX_.'mondialrelay_parcel` p
LEFT JOIN `'._DB_PREFIX_.'order_detail` o ON o.`id_order_detail` = p.`id_order_detail`
WHERE o.`id_order` = ' .(int)$order->id . '
ORDER BY `date_add`
');
// assign delay to Products
if (Module::isInstalled('privatesales_delay')) {
@ -215,6 +222,7 @@ class OrderDetailController extends OrderDetailControllerCore {
'shop_name' => strval(Configuration::get('PS_SHOP_NAME')),
'order' => $order,
'numbers' => $numbers,
'numbers2' => $numbers2,
'return_allowed' => (int)($order->isReturnable()),
'currency' => new Currency($order->id_currency),
'order_state' => (int)($id_order_state),

View File

@ -66,7 +66,8 @@
</div>
{/if}
{if count($numbers) > 0}
{if count($numbers) > 0 || count($numbers2) > 0}
{if count($numbers) > 0}
<h4>{l s='Numero de suivi'}</h4>
<ul>
{foreach from=$numbers item=number}
@ -75,6 +76,17 @@
</li>
{/foreach}
</ul>
{/if}
{if count($numbers2) > 0}
<h4>{l s='Numero de suivi'}</h4>
<ul>
{foreach from=$numbers2 item=number}
<li>
{l s='Numero de suivi'} <b>{$number.shipping_number}</b> <a target="_blank" href="https://www.mondialrelay.fr/suivi-de-colis?numeroExpedition={$number.shipping_number}">({l s='Suivre le colis'})</a>
</li>
{/foreach}
</ul>
{/if}
{elseif !empty($order->shipping_number)}
<h4>{l s='Numero de suivi'}</h4>
{l s='Numero de suivi'} <b>{$order->shipping_number}</b> <a target="_blank" href="http://www.colissimo.fr/portail_colissimo/suivreResultat.do?parcelnumber={$order->shipping_number}">({l s='Suivre le colis'})</a>

View File

@ -115,6 +115,16 @@
{/foreach}
</ul>
{/if}
{if count($numbers2) > 0}
<h4 class="order_shipping">{l s='Numero de suivi'}</h4>
<ul class="shipping_numbers">
{foreach from=$numbers2 item=number}
<li>
{l s='Numero de suivi'} <b>{$number.shipping_number}</b> <a target="_blank" href="https://www.mondialrelay.fr/suivi-de-colis?numeroExpedition={$number.shipping_number}">({l s='Suivre le colis'})</a>
</li>
{/foreach}
</ul>
{/if}
{*<p class="bold">{l s='Order:'} <span class="color-myaccount">{l s='#'}{$order->id|string_format:"%06d"}</span></p>
{if $carrier->id}<p class="bold">{l s='Carrier:'} {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}</p>{/if}