[-] BO : #PSCFV-3848 : Add reference order instead of id order for follow an order
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17123 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -32,6 +32,7 @@ class OrderConfirmationControllerCore extends FrontController
|
|||||||
public $id_cart;
|
public $id_cart;
|
||||||
public $id_module;
|
public $id_module;
|
||||||
public $id_order;
|
public $id_order;
|
||||||
|
public $reference;
|
||||||
public $secure_key;
|
public $secure_key;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,6 +58,7 @@ class OrderConfirmationControllerCore extends FrontController
|
|||||||
Tools::redirect($redirectLink.(Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
|
Tools::redirect($redirectLink.(Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
|
||||||
|
|
||||||
$order = new Order((int)($this->id_order));
|
$order = new Order((int)($this->id_order));
|
||||||
|
$this->reference = $order->reference;
|
||||||
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key)
|
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key)
|
||||||
Tools::redirect($redirectLink);
|
Tools::redirect($redirectLink);
|
||||||
$module = Module::getInstanceById((int)($this->id_module));
|
$module = Module::getInstanceById((int)($this->id_module));
|
||||||
@@ -82,6 +84,7 @@ class OrderConfirmationControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'id_order' => $this->id_order,
|
'id_order' => $this->id_order,
|
||||||
|
'reference_order' => $this->reference,
|
||||||
'id_order_formatted' => sprintf('#%06d', $this->id_order)
|
'id_order_formatted' => sprintf('#%06d', $this->id_order)
|
||||||
));
|
));
|
||||||
/* If guest we clear the cookie for security reason */
|
/* If guest we clear the cookie for security reason */
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
<br />
|
<br />
|
||||||
{if $is_guest}
|
{if $is_guest}
|
||||||
<p>{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order ID has been sent to you via e-mail.'}</p>
|
<p>{l s='Your order ID is:'} <span class="bold">{$id_order_formatted}</span> . {l s='Your order ID has been sent to you via e-mail.'}</p>
|
||||||
<a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$id_order}")}" title="{l s='Follow my order'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Follow my order'}" class="icon" /></a>
|
<a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}")}" title="{l s='Follow my order'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Follow my order'}" class="icon" /></a>
|
||||||
<a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$id_order}")}" title="{l s='Follow my order'}">{l s='Follow my order'}</a>
|
<a href="{$link->getPageLink('guest-tracking', true, NULL, "id_order={$reference_order}")}" title="{l s='Follow my order'}">{l s='Follow my order'}</a>
|
||||||
{else}
|
{else}
|
||||||
<a href="{$link->getPageLink('history', true)}" title="{l s='Back to orders'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Back to orders'}" class="icon" /></a>
|
<a href="{$link->getPageLink('history', true)}" title="{l s='Back to orders'}"><img src="{$img_dir}icon/order.gif" alt="{l s='Back to orders'}" class="icon" /></a>
|
||||||
<a href="{$link->getPageLink('history', true)}" title="{l s='Back to orders'}">{l s='Back to orders'}</a>
|
<a href="{$link->getPageLink('history', true)}" title="{l s='Back to orders'}">{l s='Back to orders'}</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user