From e40c270130548349b18548e03f743d001bf61a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Thu, 10 Sep 2015 13:27:28 +0200 Subject: [PATCH 1/3] Added exception to event data It's useful to get the exception message for a better error handling in an observer. --- app/code/Magento/Quote/Model/QuoteManagement.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Quote/Model/QuoteManagement.php b/app/code/Magento/Quote/Model/QuoteManagement.php index 7c54f986af74e..490e894d7a51f 100644 --- a/app/code/Magento/Quote/Model/QuoteManagement.php +++ b/app/code/Magento/Quote/Model/QuoteManagement.php @@ -467,8 +467,9 @@ protected function submitQuote(QuoteEntity $quote, $orderData = []) $this->eventManager->dispatch( 'sales_model_service_quote_submit_failure', [ - 'order' => $order, - 'quote' => $quote + 'order' => $order, + 'quote' => $quote, + 'exception' => $e ] ); throw $e; From adc710eb0f542056623881799e615ee9c57aae9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Fri, 11 Sep 2015 11:06:38 +0200 Subject: [PATCH 2/3] Added missing @method annotation for setWebsiteIds setWebsiteIds is used inside the class (getWebsiteIds method). It's useful to have setWebsiteIds in code completion. --- app/code/Magento/Catalog/Model/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index dd0f5ec4ead4f..77a8c464e5cb7 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -28,6 +28,7 @@ * @method string getUrlKey() * @method Product setUrlKey(string $urlKey) * @method Product setRequestPath(string $requestPath) + * @method Product setWebsiteIds(array $ids) * * @SuppressWarnings(PHPMD.LongVariable) * @SuppressWarnings(PHPMD.ExcessivePublicCount) From 4148f9de70fb58f7b6e31812af518b056a5885c5 Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Mon, 14 Sep 2015 19:01:43 +0200 Subject: [PATCH 3/3] Typo in function name fixed (stove->store) Even if Magento 2 is on fire, it should be called store, not stove. --- app/code/Magento/Theme/Model/View/Design.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Theme/Model/View/Design.php b/app/code/Magento/Theme/Model/View/Design.php index d012f0117313e..321ed683d3c36 100644 --- a/app/code/Magento/Theme/Model/View/Design.php +++ b/app/code/Magento/Theme/Model/View/Design.php @@ -169,7 +169,7 @@ public function getConfigurationDesignTheme($area = null, array $params = []) $theme = null; $store = isset($params['store']) ? $params['store'] : null; - if ($this->_isThemePerStoveView($area)) { + if ($this->_isThemePerStoreView($area)) { if ($this->_storeManager->isSingleStoreMode()) { $theme = $this->_scopeConfig->getValue( self::XML_PATH_THEME_ID, @@ -197,7 +197,7 @@ public function getConfigurationDesignTheme($area = null, array $params = []) * @param string $area * @return bool */ - private function _isThemePerStoveView($area) + private function _isThemePerStoreView($area) { return $area == self::DEFAULT_AREA; }