From 81f9563bdcc701dfce090df3cb8485dad07f28f4 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 19 Jan 2023 20:05:56 +0530 Subject: [PATCH] Mail changes --- classes/order/OrderSlip.php | 6 +++--- mails/en/credit_slip_voucher.html | 22 ++++++++++++---------- mails/en/credit_slip_voucher.txt | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/classes/order/OrderSlip.php b/classes/order/OrderSlip.php index ed662e6bf..b7b89bc49 100644 --- a/classes/order/OrderSlip.php +++ b/classes/order/OrderSlip.php @@ -580,7 +580,7 @@ class OrderSlipCore extends ObjectModel $context = Context::getContext(); $objCartRule = new CartRule(); - $idsLanguage = Language::getIDs(); + $languages = Language::getLanguages(); $creditSlipPrefix = Configuration::get('PS_CREDIT_SLIP_PREFIX', $context->language->id); $creditSlipID = sprintf(('%1$s%2$06d'), $creditSlipPrefix, (int) $this->id_order_slip); @@ -588,8 +588,8 @@ class OrderSlipCore extends ObjectModel $dateFrom = $this->date_add; $dateTo = date('Y-m-d H:i:s', strtotime($dateFrom) + (3600 * 24 * 365.25)); /* 1 year */ - foreach ($idsLanguage as $idLang) { - $objCartRule->name[$idLang] = sprintf('Voucher for credit slip #%s', $creditSlipID); + foreach ($languages as $language) { + $objCartRule->name[$language['id_lang']] = sprintf('Voucher for credit slip #%s', $creditSlipID); } $objCartRule->description = sprintf('Order: #%s', $objOrder->id); diff --git a/mails/en/credit_slip_voucher.html b/mails/en/credit_slip_voucher.html index 2e09db6a4..1a9da8f38 100644 --- a/mails/en/credit_slip_voucher.html +++ b/mails/en/credit_slip_voucher.html @@ -11,6 +11,7 @@ width:218px !important; margin:auto !important; } + thead, tbody{width: 100%} .table {width:195px !important;margin:auto !important;} .logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;} span.title{font-size:20px !important;line-height: 23px !important} @@ -25,24 +26,25 @@ .space_address{display: none !important;} } @media only screen and (min-width: 301px) and (max-width: 500px) { - body {width:308px!important;margin:auto!important;} - .table {width:285px!important;margin:auto!important;} + body {width:425px!important;margin:auto!important;} + thead, tbody{width: 100%} + .table {margin:auto!important;} .logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;} - .table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr { - display: block !important; - } .table-recap{width: 295px !important;} .table-recap tr td, .conf_body td{text-align:center !important;} + .table-recap tr th{font-size: 10px !important} } @media only screen and (min-width: 501px) and (max-width: 768px) { body {width:478px!important;margin:auto!important;} - .table {width:450px!important;margin:auto!important;} + thead, tbody{width: 100%} + .table {margin:auto!important;} .logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;} } @media only screen and (max-device-width: 480px) { - body {width:308px!important;margin:auto!important;} - .table {width:285px;margin:auto!important;} + body {width:340px!important;margin:auto!important;} + thead, tbody{width: 100%} + .table {margin:auto!important;} .logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;} .table-recap{width: 295px!important;} @@ -70,7 +72,7 @@ - Hi {firstname} {lastname}, + Hi {firstname} {lastname},
@@ -106,7 +108,7 @@ - {shop_name} powered by Webkul™ + {shop_name} powered by Webkul™ diff --git a/mails/en/credit_slip_voucher.txt b/mails/en/credit_slip_voucher.txt index 38bf3a5f8..b53903729 100644 --- a/mails/en/credit_slip_voucher.txt +++ b/mails/en/credit_slip_voucher.txt @@ -13,4 +13,4 @@ To use this voucher just copy and paste this code during payment process for you order. {shop_name} [/{shop_url}] powered by Webkul(tm) -[http://www.webkul.com/] +[https://www.webkul.com/]