From 2d1e5fc1cbeb8d8ef26cae851fab3b5d7ee5bcc6 Mon Sep 17 00:00:00 2001 From: Cyssoo Date: Tue, 28 May 2024 15:36:56 +0200 Subject: [PATCH] Clear cache on PDF render, show dates as french/european format --- models/HTMLTemplateEverQuotationPdf.php | 3 ++- views/templates/front/pdf/everquotation_header.tpl | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/models/HTMLTemplateEverQuotationPdf.php b/models/HTMLTemplateEverQuotationPdf.php index 4a12c33..7acffc1 100644 --- a/models/HTMLTemplateEverQuotationPdf.php +++ b/models/HTMLTemplateEverQuotationPdf.php @@ -61,7 +61,7 @@ public function getContent() Context::getContext()->shop->id, Context::getContext()->language->id ); - $customizations = array(); + $customizations = []; foreach ($details as $detail) { if ((int) $detail['id_customization']) { $custs = EverpsquotationDetail::getCustomizationValue( @@ -74,6 +74,7 @@ public function getContent() } } $total_taxes = $everpsquotation->total_paid_tax_incl - $everpsquotation->total_paid_tax_excl; + Tools::clearCache(); $this->smarty->assign([ '_PS_VERSION_' => _PS_VERSION_, diff --git a/views/templates/front/pdf/everquotation_header.tpl b/views/templates/front/pdf/everquotation_header.tpl index eaef296..ba2804c 100644 --- a/views/templates/front/pdf/everquotation_header.tpl +++ b/views/templates/front/pdf/everquotation_header.tpl @@ -19,9 +19,9 @@ $prefix}{$prefix|escape:'htmlall':'UTF-8'}{/if}{$id_everpsquotation_quotes|escape:'htmlall':'UTF-8'} {*

{$shop_name|escape:'htmlall':'UTF-8'}

*} -

{l s='Date :' mod='everpsquotation'} {$date_add|date_format:"%D"|escape:'htmlall':'UTF-8'}

+

{l s='Date :' mod='everpsquotation'} {$date_add|date_format:"%d/%m/%Y"|escape:'htmlall':'UTF-8'}

{if isset($deadline) && $deadline} -

{l s='Valid until' mod='everpsquotation'} {$deadline|date_format:"%D"|escape:'htmlall':'UTF-8'}

+

{l s='Valid until' mod='everpsquotation'} {$deadline|date_format:"%d/%m/%Y"|escape:'htmlall':'UTF-8'}

{/if}