[-] BO : #PSCFV-3848 : Add reference order instead of id order for follow an order

This commit is contained in:
lLefevre
2012-08-31 09:35:23 +00:00
parent 3da8654059
commit 0213db6885
2 changed files with 5 additions and 2 deletions
@@ -32,6 +32,7 @@ class OrderConfirmationControllerCore extends FrontController
public $id_cart;
public $id_module;
public $id_order;
public $reference;
public $secure_key;
/**
@@ -57,6 +58,7 @@ class OrderConfirmationControllerCore extends FrontController
Tools::redirect($redirectLink.(Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
$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)
Tools::redirect($redirectLink);
$module = Module::getInstanceById((int)($this->id_module));
@@ -82,6 +84,7 @@ class OrderConfirmationControllerCore extends FrontController
{
$this->context->smarty->assign(array(
'id_order' => $this->id_order,
'reference_order' => $this->reference,
'id_order_formatted' => sprintf('#%06d', $this->id_order)
));
/* If guest we clear the cookie for security reason */