diff --git a/controllers/front/OrderFollowController.php b/controllers/front/OrderFollowController.php index 34db16c01..dcbfced78 100644 --- a/controllers/front/OrderFollowController.php +++ b/controllers/front/OrderFollowController.php @@ -41,7 +41,6 @@ class OrderFollowControllerCore extends FrontController if (Tools::isSubmit('submitReturnMerchandise')) { $customizationQtyInput = Tools::getValue('customization_qty_input'); - if (!$id_order = (int)(Tools::getValue('id_order'))) Tools::redirect('index.php?controller=history'); if (!$order_qte_input = Tools::getValue('order_qte_input')) @@ -60,7 +59,12 @@ class OrderFollowControllerCore extends FrontController $orderReturn->id_order = $id_order; $orderReturn->question = strval(Tools::getValue('returnText')); if (empty($orderReturn->question)) - Tools::redirect('index.php?controller=order-follow&errorMsg'); + Tools::redirect('index.php?controller=order-follow&errorMsg&'. + http_build_query(array( + 'ids_order_detail' => $ids_order_detail, + 'order_qte_input' => $order_qte_input, + 'id_order' => Tools::getValue('id_order'), + ))); if (!$orderReturn->checkEnoughProduct($ids_order_detail, $order_qte_input, $customizationIds, $customizationQtyInput)) Tools::redirect('index.php?controller=order-follow&errorQuantity'); @@ -85,7 +89,14 @@ class OrderFollowControllerCore extends FrontController if (Tools::isSubmit('errorQuantity')) $this->context->smarty->assign('errorQuantity', true); elseif (Tools::isSubmit('errorMsg')) - $this->context->smarty->assign('errorMsg', true); + $this->context->smarty->assign( + array( + 'errorMsg' => true, + 'ids_order_detail' => Tools::getValue('ids_order_detail', array()), + 'order_qte_input' => Tools::getValue('order_qte_input', array()), + 'id_order' => Tools::getValue('id_order'), + ) + ); elseif (Tools::isSubmit('errorDetail1')) $this->context->smarty->assign('errorDetail1', true); elseif (Tools::isSubmit('errorDetail2')) diff --git a/themes/default/lang/fr.php b/themes/default/lang/fr.php index bf385c8c8..a854df267 100644 --- a/themes/default/lang/fr.php +++ b/themes/default/lang/fr.php @@ -401,9 +401,11 @@ $_LANG['order-detail_fdfac28b5ad628f25649d9c2eb4fc62e'] = 'Retourné'; $_LANG['order-follow_01abfc750a0c942167651c40d088531d'] = 'n°'; $_LANG['order-follow_0d3cfc2fe56119651ee7848f3e32d84d'] = 'Etiquette de retour'; $_LANG['order-follow_229ca46a5d762e19a428f59449c916ad'] = 'Veuillez spécifier un motif de retour !'; +$_LANG['order-follow_25e93b63e91b5555bd458c89b1916678'] = 'Générer un retour'; $_LANG['order-follow_2e99578f8bd14385bc5bcc2608e7b938'] = 'Vous n\'avez pas un nombre suffisant de produits pour générer un autre retour !'; $_LANG['order-follow_3976e0f730b236b1cf619dc80f78488e'] = 'Vous n\'avez aucun retour de marchandise créé.'; $_LANG['order-follow_446faa7da2d42ba4ffeda73cb119dd91'] = 'Date d\'émission'; +$_LANG['order-follow_558a57a100d0232908d28ac4bc1c35b5'] = 'Merci de spécifier le motif de votre retour :'; $_LANG['order-follow_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil'; $_LANG['order-follow_93d4be62cede66eb788f5ca8046bac7f'] = 'Veuillez indiquer la quantité voulue pour chaque produit coché.'; $_LANG['order-follow_988fd738de9c6d177440c5dcf69e73ce'] = 'Retour'; diff --git a/themes/default/order-follow.tpl b/themes/default/order-follow.tpl index 64a585c04..7a8f206d9 100644 --- a/themes/default/order-follow.tpl +++ b/themes/default/order-follow.tpl @@ -29,7 +29,27 @@
{l s='You do not have enough products to request another merchandise return.'}
{/if} -{if isset($errorMsg) && $errorMsg}{l s='Please provide an explanation for your RMA.'}
{/if} +{if isset($errorMsg) && $errorMsg} ++ {l s='Please provide an explanation for your RMA.'} +
++
+ +
+ {foreach $ids_order_detail as $id_order_detail} + + {/foreach} + {foreach $order_qte_input as $key => $value} + + {/foreach} + + + + +{/if} {if isset($errorDetail1) && $errorDetail1}{l s='Please check at least one product you would like to return.'}
{/if} {if isset($errorDetail2) && $errorDetail2}{l s='Please provide a quantity for the product you checked.'}
{/if} {if isset($errorNotReturnable) && $errorNotReturnable}{l s='This order cannot be returned.'}
{/if}