Commit 3afc5a66 authored by Pierre RAMBAUD's avatar Pierre RAMBAUD
Browse files

Make sure the user is connected before submit reorder

parent d52a97cb
......@@ -58,7 +58,10 @@ class OrderControllerCore extends FrontController
{
parent::postProcess();
if (Tools::isSubmit('submitReorder') && $id_order = (int) Tools::getValue('id_order')) {
if (Tools::isSubmit('submitReorder')
&& $this->context->customer->isLogged()
&& $id_order = (int) Tools::getValue('id_order')
) {
$oldCart = new Cart(Order::getCartIdStatic($id_order, $this->context->customer->id));
$duplication = $oldCart->duplicate();
if (!$duplication || !Validate::isLoadedObject($duplication['cart'])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment