Skip to content

Commit 25397d0

Browse files
author
Hayder Sharhan
committed
Merge remote-tracking branches 'remotes/jack/MAGETWO-53265', 'remotes/jack/MAGETWO-53552', 'remotes/jack/MAGETWO-54152', 'remotes/jack/MAGETWO-54157', 'remotes/jack/MAGETWO-54160', 'remotes/jack/MAGETWO-54586-PublicPR-3638' and 'remotes/jack/MAGETWO-54587-Public-PR-3633' into PublicPrsCompilation
8 parents f175469 + 0857fad + 2cd8f3a + 33d4b86 + b22934b + 4ba8b74 + b95be9a + 8d9fdb7 commit 25397d0

File tree

8 files changed

+48
-7
lines changed

8 files changed

+48
-7
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(
5252
protected function _getFormat()
5353
{
5454
$format = $this->getColumn()->getFormat();
55-
if (!$format) {
55+
if ($format === null) {
5656
if (self::$_format === null) {
5757
try {
5858
self::$_format = $this->_localeDate->getDateFormat(

app/code/Magento/Checkout/etc/acl.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
9+
<acl>
10+
<resources>
11+
<resource id="Magento_Backend::admin">
12+
<resource id="Magento_Backend::stores">
13+
<resource id="Magento_Backend::stores_settings">
14+
<resource id="Magento_Config::config">
15+
<resource id="Magento_Checkout::checkout" title="Checkout Section" translate="true" sortOrder="57" />
16+
</resource>
17+
</resource>
18+
</resource>
19+
</resource>
20+
</resources>
21+
</acl>
22+
</config>

app/code/Magento/Checkout/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ State/Province,State/Province
2727
"One-page checkout is turned off.","One-page checkout is turned off."
2828
"Guest checkout is disabled.","Guest checkout is disabled."
2929
Checkout,Checkout
30+
"Checkout Section","Checkout Section"
3031
"Page not found.","Page not found."
3132
"Please agree to all the terms and conditions before placing the order.","Please agree to all the terms and conditions before placing the order."
3233
"Something went wrong while processing your order. Please try again later.","Something went wrong while processing your order. Please try again later."

app/code/Magento/ConfigurableProduct/Model/Product/Validator/Plugin.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ protected function _validateProductVariations(Product $parentProduct, array $pro
112112
$product->addData($productData);
113113
$product->setCollectExceptionMessages(true);
114114
$configurableAttribute = [];
115-
$encodedData = $productData['configurable_attribute'];
116-
if ($encodedData) {
117-
$configurableAttribute = $this->jsonHelper->jsonDecode($encodedData);
115+
if (!empty($productData['configurable_attribute'])) {
116+
$encodedData = $productData['configurable_attribute'];
117+
if ($encodedData) {
118+
$configurableAttribute = $this->jsonHelper->jsonDecode($encodedData);
119+
}
118120
}
119121
$configurableAttribute = implode('-', $configurableAttribute);
120122

app/code/Magento/Newsletter/Controller/Subscriber/NewAction.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ public function execute()
121121
$this->validateGuestSubscription();
122122
$this->validateEmailAvailable($email);
123123

124+
$subscriber = $this->_subscriberFactory->create()->loadByEmail($email);
125+
if ($subscriber->getId()
126+
&& $subscriber->getSubscriberStatus() == \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED
127+
) {
128+
throw new \Magento\Framework\Exception\LocalizedException(
129+
__('This email address is already subscribed.')
130+
);
131+
}
132+
124133
$status = $this->_subscriberFactory->create()->subscribe($email);
125134
if ($status == \Magento\Newsletter\Model\Subscriber::STATUS_NOT_ACTIVE) {
126135
$this->messageManager->addSuccess(__('The confirmation request has been sent.'));

app/code/Magento/Newsletter/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,4 @@ Unconfirmed,Unconfirmed
146146
Store,Store
147147
"Store View","Store View"
148148
"Newsletter Subscriptions","Newsletter Subscriptions"
149+
"This email address is already subscribed.","This email address is already subscribed."

app/code/Magento/Swatches/view/frontend/layout/catalogsearch_result_index.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@
99
<head>
1010
<css src="Magento_Swatches::css/swatches.css"/>
1111
</head>
12+
<body>
13+
<referenceBlock name="category.product.type.details.renderers">
14+
<block class="Magento\Swatches\Block\Product\Renderer\Listing\Configurable" as="configurable" template="Magento_Swatches::product/listing/renderer.phtml" />
15+
</referenceBlock>
16+
</body>
1217
</page>

lib/internal/Magento/Framework/View/Result/Layout.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,13 @@ public function renderResult(ResponseInterface $response)
159159
{
160160
\Magento\Framework\Profiler::start('LAYOUT');
161161
\Magento\Framework\Profiler::start('layout_render');
162-
162+
163+
$this->eventManager->dispatch('layout_render_before');
164+
$this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
165+
163166
$this->applyHttpHeaders($response);
164167
$this->render($response);
165168

166-
$this->eventManager->dispatch('layout_render_before');
167-
$this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
168169
\Magento\Framework\Profiler::stop('layout_render');
169170
\Magento\Framework\Profiler::stop('LAYOUT');
170171
return $this;

0 commit comments

Comments
 (0)