From 65630f9ddf119670f42bedf8550446e10ba042d1 Mon Sep 17 00:00:00 2001 From: ndluong Date: Thu, 24 Sep 2020 15:30:49 +0700 Subject: [PATCH 1/2] fix prefix timestamp by store timezone --- Helper/PrintProcess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helper/PrintProcess.php b/Helper/PrintProcess.php index 9529d36..0ffb59a 100644 --- a/Helper/PrintProcess.php +++ b/Helper/PrintProcess.php @@ -133,7 +133,7 @@ public function getFileName() { $name = $this->getConfigGeneral('file_name') ?: 'cart'; if ($this->getConfigGeneral('timestamp')) { - $name .= ' ' . $this->dateTime->date('Y-m-d H.i'); + $name .= ' ' . $this->formatDate($this->dateTime->date('Y-m-d H.i')); } return $name . '.pdf'; From b66ce1bba4e4dfdc41bf023f5024895bcae384c0 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 1 Oct 2020 09:44:22 +0700 Subject: [PATCH 2/2] Clean code --- Setup/UpgradeData.php | 3 ++- composer.json | 2 +- view/frontend/templates/cart/button.phtml | 10 +++++----- view/frontend/templates/cart/items.phtml | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Setup/UpgradeData.php b/Setup/UpgradeData.php index d118b70..64b2541 100644 --- a/Setup/UpgradeData.php +++ b/Setup/UpgradeData.php @@ -21,6 +21,7 @@ namespace Mageplaza\ShareCart\Setup; +use Magento\Framework\DB\Ddl\Table; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\UpgradeDataInterface; @@ -69,7 +70,7 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface 'mp_share_cart_token', 'mp_share_cart_token', [ - 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, + 'type' => Table::TYPE_TEXT, 'length' => 255 ] ); diff --git a/composer.json b/composer.json index af63f15..fea6a93 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "mageplaza/module-core": "^1.4.5", "mpdf/mpdf": "^7.1.0 | ^8.0.0" }, - "version": "1.1.1", + "version": "1.1.2", "license": "proprietary", "authors": [ { diff --git a/view/frontend/templates/cart/button.phtml b/view/frontend/templates/cart/button.phtml index eb82ef7..67c76fd 100644 --- a/view/frontend/templates/cart/button.phtml +++ b/view/frontend/templates/cart/button.phtml @@ -23,7 +23,7 @@ ?> -isEnable() && $block->getItemsCount()) : ?> +isEnable() && $block->getItemsCount()): ?>