From 5e192691210d4dc0e5420a1a880d4e83bfd225c7 Mon Sep 17 00:00:00 2001 From: loremipsum Date: Wed, 21 Feb 2024 17:01:19 +0100 Subject: [PATCH 1/2] Fix missing post values in admin request quote by mail --- controllers/front/mail.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/front/mail.php b/controllers/front/mail.php index 0396a7b..841233b 100644 --- a/controllers/front/mail.php +++ b/controllers/front/mail.php @@ -59,11 +59,11 @@ public function displayAjaxSetRequest() 'message' => $this->l('You have to consent our data policy terms'), ])); } - $firstName = Tools::getValue('everfirstName'); - $lastName = Tools::getValue('everlastName'); - $email = Tools::getValue('everemail'); - $phone = Tools::getValue('everphone'); - $contacted = Tools::getValue('evercontacted'); + $firstName = Tools::getValue('quotefirstName'); + $lastName = Tools::getValue('quotelastName'); + $email = Tools::getValue('quoteemail'); + $phone = Tools::getValue('quotephone'); + $contacted = Tools::getValue('contacted'); $sent = $this->sendQuoteAdminMail($firstName, $lastName, $email, $phone, $contacted); die(json_encode([ 'sent' => $sent, From 445f6a42fd067a9534bccef42c252b6795a513d9 Mon Sep 17 00:00:00 2001 From: loremipsum Date: Wed, 21 Feb 2024 17:04:48 +0100 Subject: [PATCH 2/2] Fix bug deadline in PDF {$deadline|date_format:"%D"|escape:'htmlall':'UTF-8'} return the same day than the $date_add... Ajusting the date format fix the bug --- models/HTMLTemplateEverQuotationPdf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/HTMLTemplateEverQuotationPdf.php b/models/HTMLTemplateEverQuotationPdf.php index f3aa6df..246eb83 100644 --- a/models/HTMLTemplateEverQuotationPdf.php +++ b/models/HTMLTemplateEverQuotationPdf.php @@ -113,7 +113,7 @@ public function getHeader() $newDateTimestamp = strtotime($everpsquotation->date_add . " +{$this->duration} days"); // Formater la nouvelle date au format 'd/m/Y' - $deadline = date('d/m/Y', $newDateTimestamp); + $deadline = date('Y-m-d h:m:s', $newDateTimestamp); } else { $deadline = false; }