Skip to content

Commit 267e336

Browse files
Merge branch 'develop' of github.com:magento-folks/magento2ce into bugfix
2 parents 33f6c0a + 1a9a75f commit 267e336

File tree

67 files changed

+1564
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1564
-212
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ addons:
77
- mysql-client-core-5.6
88
- mysql-client-5.6
99
- postfix
10+
firefox: "46.0"
11+
hosts:
12+
- magento2.travis
1013
language: php
1114
php:
1215
- 7.0
@@ -16,19 +19,26 @@ env:
1619
- COMPOSER_BIN_DIR=~/bin
1720
- INTEGRATION_SETS=3
1821
- NODE_JS_VERSION=6
22+
- MAGENTO_HOST_NAME="magento2.travis"
1923
matrix:
2024
- TEST_SUITE=unit
2125
- TEST_SUITE=integration INTEGRATION_INDEX=1
2226
- TEST_SUITE=integration INTEGRATION_INDEX=2
2327
- TEST_SUITE=integration INTEGRATION_INDEX=3
2428
- TEST_SUITE=static
2529
- TEST_SUITE=js
30+
- TEST_SUITE=functional ACCEPTANCE_INDEX=1
31+
- TEST_SUITE=functional ACCEPTANCE_INDEX=2
2632
matrix:
2733
exclude:
2834
- php: 7.0
2935
env: TEST_SUITE=static
3036
- php: 7.0
3137
env: TEST_SUITE=js
38+
- php: 7.0
39+
env: TEST_SUITE=functional ACCEPTANCE_INDEX=1
40+
- php: 7.0
41+
env: TEST_SUITE=functional ACCEPTANCE_INDEX=2
3242
cache:
3343
apt: true
3444
directories:

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/cc-form.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ define(
3636
braintreeDeviceData: null,
3737
paymentMethodNonce: null,
3838
lastBillingAddress: null,
39+
ccCode: null,
40+
ccMessageContainer: null,
3941
validatorManager: validatorManager,
4042
code: 'braintree',
4143

@@ -138,9 +140,39 @@ define(
138140
return;
139141
}
140142

143+
this.restoreMessageContainer();
144+
this.restoreCode();
145+
146+
/**
147+
* Define onReady callback
148+
*/
149+
braintree.onReady = function () {};
141150
this.initBraintree();
142151
},
143152

153+
/**
154+
* Restore original message container for cc-form component
155+
*/
156+
restoreMessageContainer: function () {
157+
this.messageContainer = this.ccMessageContainer;
158+
},
159+
160+
/**
161+
* Restore original code for cc-form component
162+
*/
163+
restoreCode: function () {
164+
this.code = this.ccCode;
165+
},
166+
167+
/** @inheritdoc */
168+
initChildren: function () {
169+
this._super();
170+
this.ccMessageContainer = this.messageContainer;
171+
this.ccCode = this.code;
172+
173+
return this;
174+
},
175+
144176
/**
145177
* Init config
146178
*/

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/vault.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ define([
5252
var self = this;
5353

5454
/**
55-
* Define already callback
55+
* Define onReady callback
5656
*/
5757
Braintree.onReady = function () {
5858
self.getPaymentMethodNonce();
@@ -78,6 +78,7 @@ define([
7878
formComponent.setPaymentMethodNonce(response.paymentMethodNonce);
7979
formComponent.additionalData['public_hash'] = self.publicHash;
8080
formComponent.code = self.code;
81+
formComponent.messageContainer = self.messageContainer;
8182
formComponent.placeOrder();
8283
});
8384
})

app/code/Magento/Braintree/view/frontend/web/template/payment/form.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,12 @@
139139
<button class="action primary checkout"
140140
type="submit"
141141
data-bind="
142-
click: placeOrderClick,
143-
attr: {title: $t('Place Order')}
144-
">
142+
click: placeOrderClick,
143+
attr: {title: $t('Place Order')},
144+
css: {disabled: !isPlaceOrderActionAllowed()},
145+
enable: isActive()
146+
"
147+
disabled>
145148
<span data-bind="i18n: 'Place Order'"></span>
146149
</button>
147150
</div>

app/code/Magento/Bundle/Model/Product/SaveHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function execute($entity, $arguments = [])
6666
$options = $bundleProductOptions ?: [];
6767
foreach ($options as $option) {
6868
$this->optionRepository->save($entity, $option);
69-
$entity->setCopyFromView(false);
7069
}
70+
$entity->setCopyFromView(false);
7171
}
7272
return $entity;
7373
}

app/code/Magento/Cms/Block/Page.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,26 @@ protected function _prepareLayout()
126126
*/
127127
protected function _addBreadcrumbs(\Magento\Cms\Model\Page $page)
128128
{
129+
$homePageIdentifier = $this->_scopeConfig->getValue(
130+
'web/default/cms_home_page',
131+
ScopeInterface::SCOPE_STORE
132+
);
133+
$homePageDelimiterPosition = strrpos($homePageIdentifier, '|');
134+
if ($homePageDelimiterPosition) {
135+
$homePageIdentifier = substr($homePageIdentifier, 0, $homePageDelimiterPosition);
136+
}
137+
$noRouteIdentifier = $this->_scopeConfig->getValue(
138+
'web/default/cms_no_route',
139+
ScopeInterface::SCOPE_STORE
140+
);
141+
$noRouteDelimiterPosition = strrpos($noRouteIdentifier, '|');
142+
if ($noRouteDelimiterPosition) {
143+
$noRouteIdentifier = substr($noRouteIdentifier, 0, $noRouteDelimiterPosition);
144+
}
129145
if ($this->_scopeConfig->getValue('web/default/show_cms_breadcrumbs', ScopeInterface::SCOPE_STORE)
130146
&& ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs'))
131-
&& $page->getIdentifier() !== $this->_scopeConfig->getValue(
132-
'web/default/cms_home_page',
133-
ScopeInterface::SCOPE_STORE
134-
)
135-
&& $page->getIdentifier() !== $this->_scopeConfig->getValue(
136-
'web/default/cms_no_route',
137-
ScopeInterface::SCOPE_STORE
138-
)
147+
&& $page->getIdentifier() !== $homePageIdentifier
148+
&& $page->getIdentifier() !== $noRouteIdentifier
139149
) {
140150
$breadcrumbsBlock->addCrumb(
141151
'home',

app/code/Magento/Cookie/Helper/Cookie.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,22 @@ public function __construct(
7070
public function isUserNotAllowSaveCookie()
7171
{
7272
$acceptedSaveCookiesWebsites = $this->_getAcceptedSaveCookiesWebsites();
73+
return $this->isCookieRestrictionModeEnabled() &&
74+
empty($acceptedSaveCookiesWebsites[$this->_website->getId()]);
75+
}
76+
77+
/**
78+
* Check if cookie restriction mode is enabled for this store
79+
*
80+
* @return bool
81+
*/
82+
public function isCookieRestrictionModeEnabled()
83+
{
7384
return $this->scopeConfig->getValue(
7485
self::XML_PATH_COOKIE_RESTRICTION,
7586
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
7687
$this->_currentStore
77-
) && empty($acceptedSaveCookiesWebsites[$this->_website->getId()]);
88+
);
7889
}
7990

8091
/**

app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/** @var \Magento\Cookie\Block\Html\Notices $block */
1010
?>
11-
<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isUserNotAllowSaveCookie()): ?>
11+
<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()): ?>
1212
<div role="alertdialog"
1313
tabindex="-1"
1414
class="message global cookie"

app/code/Magento/Cookie/view/frontend/web/js/notices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define([
2424
$(this.options.cookieAllowButtonSelector).on('click', $.proxy(function () {
2525
var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000);
2626

27-
$.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {
27+
$.mage.cookies.set(this.options.cookieName, JSON.stringify(this.options.cookieValue), {
2828
expires: cookieExpires
2929
});
3030

app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if ($product->isSaleable()) {
5656
$data = ['addToCart' => [
5757
'origin'=> 'msrp',
5858
'popupId' => '#' . $popupId,
59-
'productName' => $product->getName(),
59+
'productName' => $block->escapeJs($block->escapeHtml($product->getName())),
6060
'productId' => $productId,
6161
'productIdInput' => 'input[type="hidden"][name="product"]',
6262
'realPrice' => $block->getRealPriceHtml(),
@@ -80,7 +80,7 @@ if ($product->isSaleable()) {
8080
<a href="javascript:void(0);"
8181
id="<?php /* @escapeNotVerified */ echo($popupId);?>"
8282
class="action map-show-info"
83-
data-mage-init='<?= /* @escapeNotVerified */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($data)?>'><?php /* @escapeNotVerified */ echo __('Click for price'); ?>
83+
data-mage-init='<?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($data)?>'><?php /* @escapeNotVerified */ echo __('Click for price'); ?>
8484
</a>
8585
<?php else: ?>
8686
<span class="msrp-message">

0 commit comments

Comments
 (0)