diff --git a/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php b/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php index 0ffe6df37b1f0..ed6c2ce0d50cf 100644 --- a/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php +++ b/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php @@ -15,6 +15,7 @@ use Magento\Framework\Registry; use Magento\Payment\Model\IframeConfigProvider; use Magento\Quote\Api\CartManagementInterface; +use Magento\Framework\Exception\LocalizedException; /** * Class Place @@ -125,6 +126,9 @@ protected function placeCheckoutOrder() 'action' => $this ] ); + } catch (LocalizedException $exception) { + $result->setData('error', true); + $result->setData('error_messages', $exception->getMessage()); } catch (\Exception $exception) { $result->setData('error', true); $result->setData('error_messages', __('Unable to place order. Please try again later.')); diff --git a/app/code/Magento/Checkout/Block/Cart/Link.php b/app/code/Magento/Checkout/Block/Cart/Link.php index 1319ac9888db4..5b4a9aabd6b21 100644 --- a/app/code/Magento/Checkout/Block/Cart/Link.php +++ b/app/code/Magento/Checkout/Block/Cart/Link.php @@ -65,7 +65,7 @@ public function getHref() */ protected function _toHtml() { - if ($this->_moduleManager->isOutputEnabled('Magento_Checkout')) { + if (!$this->_moduleManager->isOutputEnabled('Magento_Checkout')) { return ''; } return parent::_toHtml(); diff --git a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php index 453fac8dd5fa6..528a4e3e49ae7 100644 --- a/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Block/Cart/LinkTest.php @@ -57,7 +57,7 @@ public function testToHtml() )->with( 'Magento_Checkout' )->will( - $this->returnValue(true) + $this->returnValue(false) ); $this->assertSame('', $block->toHtml()); } diff --git a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js index c22663c702b25..60691ab0e7b5a 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/view/shipping.js @@ -242,7 +242,7 @@ define( emailValidationResult = customer.isLoggedIn(); if (!quote.shippingMethod()) { - this.errorValidationMessage('Please specify a shipping method.'); + this.errorValidationMessage($.mage.__('Please specify a shipping method.')); return false; } diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php index 7af0ab6952642..1248b540dfabf 100644 --- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php +++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php @@ -1015,7 +1015,11 @@ protected function _loadModelAttributes($object) $selectGroups = $this->_resourceHelper->getLoadAttributesSelectGroups($selects); foreach ($selectGroups as $selects) { if (!empty($selects)) { - $select = $this->_prepareLoadSelect($selects); + if (is_array($selects)) { + $select = $this->_prepareLoadSelect($selects); + } else { + $select = $selects; + } $values = $this->getConnection()->fetchAll($select); foreach ($values as $valueRow) { $this->_setAttributeValue($object, $valueRow); diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php index a9839996cb103..bc22571741148 100644 --- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php +++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php @@ -1175,7 +1175,11 @@ public function _loadAttributes($printQuery = false, $logQuery = false) foreach ($selectGroups as $selects) { if (!empty($selects)) { try { - $select = implode(' UNION ALL ', $selects); + if (is_array($selects)) { + $select = implode(' UNION ALL ', $selects); + } else { + $select = $selects; + } $values = $this->getConnection()->fetchAll($select); } catch (\Exception $e) { $this->printLogQuery(true, true, $select); diff --git a/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper.php b/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper.php index a87aa208cbec5..5919527a0d56d 100644 --- a/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper.php +++ b/app/code/Magento/Eav/Model/Entity/Setup/PropertyMapper.php @@ -22,6 +22,7 @@ class PropertyMapper extends PropertyMapperAbstract public function map(array $input, $entityTypeId) { return [ + 'attribute_model' => $this->_getValue($input, 'attribute_model'), 'backend_model' => $this->_getValue($input, 'backend'), 'backend_type' => $this->_getValue($input, 'type', 'varchar'), 'backend_table' => $this->_getValue($input, 'table'), diff --git a/app/code/Magento/Eav/Model/ResourceModel/Helper.php b/app/code/Magento/Eav/Model/ResourceModel/Helper.php index 4424829b45c49..8792e25ea03d8 100644 --- a/app/code/Magento/Eav/Model/ResourceModel/Helper.php +++ b/app/code/Magento/Eav/Model/ResourceModel/Helper.php @@ -80,6 +80,6 @@ public function getLoadAttributesSelectGroups($selects) foreach ($selects as $selectGroup) { $mainGroup = array_merge($mainGroup, $selectGroup); } - return [$mainGroup]; + return $mainGroup; } }