From 6c2e6a2f1098b43121239b4d0151c14cc94ab968 Mon Sep 17 00:00:00 2001 From: Ng Kiat Siong Date: Wed, 12 Jul 2023 16:10:25 +0800 Subject: [PATCH 1/3] Fixed exception in Dob.php during customer registration. (#3374) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Customer/Block/Form/Register.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/code/core/Mage/Customer/Block/Form/Register.php b/app/code/core/Mage/Customer/Block/Form/Register.php index 6826360f6de..73e066b8429 100644 --- a/app/code/core/Mage/Customer/Block/Form/Register.php +++ b/app/code/core/Mage/Customer/Block/Form/Register.php @@ -88,6 +88,10 @@ public function getFormData() if (isset($data['region_id'])) { $data['region_id'] = (int)$data['region_id']; } + if ($data->getDob()) { + $dob = $data->getYear() . '-' . $data->getMonth() . '-' . $data->getDay(); + $data->setDob($dob); + } $this->setData('form_data', $data); } return $data; From ef996841593b955255ca61bd668ed58079adf2f9 Mon Sep 17 00:00:00 2001 From: kyrena <78410399+kyrena@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:01:20 +0200 Subject: [PATCH 2/3] Better clearing of session messages after display (#3326) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Core/Block/Messages.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/core/Mage/Core/Block/Messages.php b/app/code/core/Mage/Core/Block/Messages.php index 2caa8815012..ac2907d4e59 100644 --- a/app/code/core/Mage/Core/Block/Messages.php +++ b/app/code/core/Mage/Core/Block/Messages.php @@ -247,6 +247,7 @@ public function getGroupedHtml() if ($html) { $html .= '_messagesFirstLevelTagName . '>'; } + $this->_messages = $this->getMessageCollection()->clear(); return $html; } From 8aae6e2b7850207488d19644d658f5b48e49c884 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 12 Jul 2023 14:07:20 +0200 Subject: [PATCH 3/3] Do not reindex catalog_product_flat for disabled stores (#3251) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php | 2 +- .../core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php index 7393ffe487a..ec0abf090e2 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php @@ -151,7 +151,7 @@ public function matchEvent(Mage_Index_Model_Event $event) } else { /** @var Mage_Core_Model_Store $store */ $store = $event->getDataObject(); - if ($store && $store->isObjectNew()) { + if ($store && ($store->isObjectNew() || $store->getOrigData('is_active') != $store->getIsActive() && $store->getIsActive())) { $result = true; } else { $result = false; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php index 7f0bdfa2eaa..eecb7aaacbe 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php @@ -1400,6 +1400,9 @@ protected function _arrayNextKey(array $array, $key) public function reindexAll() { foreach (Mage::app()->getStores() as $storeId => $store) { + if (!$store->getIsActive()) { + continue; + } $this->prepareFlatTable($storeId); $this->beginTransaction(); try {