Blawdi Posted May 24, 2017 Share Posted May 24, 2017 (edited) Bonjour, J'aimerais rajouter deux boutons a cocher dans l'étape d'un retour de produits, créer les boutons c'est facile, mais récupéré le résultat?? je sèche! {if $return_allowed} <div id="returnOrderMessage"> <h3 class="page-heading bottom-indent">{l s='Merchandise return'}</h3> <p>{l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.'}</p> <p class="form-group"> <textarea value="non renseigné..." class="form-control" cols="67" rows="3" name="returnText">Facultatif.. (Laissez "facultatif" si vous ne souhaitez pas donner de motif)</textarea> <p> Merci de cocher la case correspondant à la méthode de transport pour votre retour.</p> <p><input name="Colissimo" type="checkbox" value="Colissimo" /> Colissimo <input name="MR" type="checkbox" value="MR" /> Mondial Relay</p> {/if} J'aimerais que le retour du résultat soit donner dans le mails envoyé à l'admin. je pense qu'il s'agit du fichier : /controllers/frontOrderFollowController.php Merci d'avance Edited May 26, 2017 by Blawdi (see edit history) Link to comment Share on other sites More sharing options...
Blawdi Posted May 24, 2017 Author Share Posted May 24, 2017 up :s Link to comment Share on other sites More sharing options...
Blawdi Posted May 24, 2017 Author Share Posted May 24, 2017 (edited) Je clarifie un peu : l'ajout des boutons ok : {if $return_allowed} <div id="returnOrderMessage"> <h3 class="page-heading bottom-indent">{l s='Merchandise return'}</h3> <p>{l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. When complete, click the button below.'}</p> <p class="form-group"> <textarea value="non renseigné..." class="form-control" cols="67" rows="3" name="returnText">Facultatif.. (Laissez "facultatif" si vous ne souhaitez pas donner de motif)</textarea> <p> Merci de cocher la case correspondant à la méthode de transport pour votre retour.</p> <p><input name="Colissimo" type="checkbox" value="Colissimo" /> Colissimo <input name="MR" type="checkbox" value="MR" /> Mondial Relay</p> {/if} Le traitement en php pas ok, je pense que c'est dans /controllers/frontOrderFollowController.php $order = new Order((int)$id_order); if (!$order->isReturnable()) Tools::redirect('index.php?controller=order-follow&errorNotReturnable'); if ($order->id_customer != $this->context->customer->id) die(Tools::displayError()); $orderReturn = new OrderReturn(); $orderReturn->id_customer = (int)$this->context->customer->id; $orderReturn->id_order = $id_order; $orderReturn->question = htmlspecialchars(Tools::getValue('returnText')); if (empty($orderReturn->question)) 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'), ))); Et je souhaiterais qu'ils 'affichent dans un mail $template_vars = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{order_return_id}' => $order_return->id, '{order_id}' => $order->id, '{order_date}' => $order->date_add, '{products}' => $products_table, '{total}' => Tools::displayPrice($total), '{message}' => $order_return->question ); Donc si une âme charitable pouvait m'aider! ça serait super :=) Edited May 24, 2017 by Blawdi (see edit history) Link to comment Share on other sites More sharing options...
Blawdi Posted May 25, 2017 Author Share Posted May 25, 2017 ça ne s'améliore pas l'entre aide Link to comment Share on other sites More sharing options...
Blawdi Posted May 25, 2017 Author Share Posted May 25, 2017 blablou Link to comment Share on other sites More sharing options...
Alexandre Carette Posted May 25, 2017 Share Posted May 25, 2017 (edited) Salut, Je vais essayer de t'aider... public function postProcess(){ if (Tools::isSubmit('submitReturnMerchandise')) { #on va récupérer la valeur de tes inputs $mr = Tools::getValue('Colissimo'); $colissimo = Tools::getValue('MR'); #une var liste pour le template du mail $var_list = [ '{colissimo}' => $colissimo, '{mondial_relay}' => $mr ]; #regarde la fonction send de la classe mail Mail::Send( 1, 'verification', Mail::l('Mode du retour'), $var_list, '[email protected]', 'Nom du site', null, null, null, null, _PS_MAIL_DIR_, false, null, null, '[email protected]' ); le reste du code... bon courage Edited May 25, 2017 by Alexandre Carette (see edit history) 1 Link to comment Share on other sites More sharing options...
Blawdi Posted May 26, 2017 Author Share Posted May 26, 2017 Impeccable! Merci :=) Link to comment Share on other sites More sharing options...
Alexandre Carette Posted May 26, 2017 Share Posted May 26, 2017 super tu peux mettre ton topic en résolu alors... bon courage pour la suite cdt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now