Skip to content

Commit f80266b

Browse files
author
Dmytro Aponasenko
committed
Merge branch 'develop' into MTA-1316
Conflicts: dev/tests/functional/lib/Magento/Mtf/ObjectManagerFactory.php dev/tests/functional/tests/app/Magento/Backend/Test/Fixture/GlobalSearch.php dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.php dev/tests/functional/tests/app/Magento/Bundle/Test/Repository/BundleProduct.php dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogAttributeSet.php dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductAttribute.php dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.php dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Category.php dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogAttributeSet.php dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductAttribute.php dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.php dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Category.php dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/CatalogRule.php dev/tests/functional/tests/app/Magento/CatalogRule/Test/Fixture/Conditions.php dev/tests/functional/tests/app/Magento/CatalogRule/Test/Repository/CatalogRule.php dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Fixture/CatalogSearchQuery.php dev/tests/functional/tests/app/Magento/CatalogSearch/Test/Repository/CatalogSearchQuery.php dev/tests/functional/tests/app/Magento/Checkout/Test/Fixture/Cart.php dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.php dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php dev/tests/functional/tests/app/Magento/Core/Test/Fixture/ConfigData.php dev/tests/functional/tests/app/Magento/Core/Test/Fixture/SystemVariable.php dev/tests/functional/tests/app/Magento/Core/Test/Repository/SystemVariable.php dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/AddressInjectable.php dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerGroupInjectable.php dev/tests/functional/tests/app/Magento/Customer/Test/Fixture/CustomerInjectable.php dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerGroupInjectable.php dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable.php dev/tests/functional/tests/app/Magento/Downloadable/Test/Repository/DownloadableProductInjectable.php dev/tests/functional/tests/app/Magento/GiftMessage/Test/Fixture/GiftMessage.php dev/tests/functional/tests/app/Magento/GiftMessage/Test/Repository/GiftMessage.php dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Fixture/GoogleShoppingAttribute.php dev/tests/functional/tests/app/Magento/GoogleShopping/Test/Repository/GoogleShoppingAttribute.php dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/GroupedProductInjectable.php dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Repository/GroupedProductInjectable.php dev/tests/functional/tests/app/Magento/ImportExport/Test/Fixture/ImportExport.php dev/tests/functional/tests/app/Magento/Install/Test/Fixture/Install.php dev/tests/functional/tests/app/Magento/Integration/Test/Fixture/Integration.php dev/tests/functional/tests/app/Magento/Integration/Test/Repository/Integration.php dev/tests/functional/tests/app/Magento/Newsletter/Test/Fixture/Template.php dev/tests/functional/tests/app/Magento/Newsletter/Test/Repository/Template.php dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Rating.php dev/tests/functional/tests/app/Magento/Review/Test/Fixture/Review.php dev/tests/functional/tests/app/Magento/Review/Test/Repository/Rating.php dev/tests/functional/tests/app/Magento/Sitemap/Test/Fixture/Sitemap.php dev/tests/functional/tests/app/Magento/Sitemap/Test/Repository/Sitemap.php dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Store.php dev/tests/functional/tests/app/Magento/Store/Test/Fixture/StoreGroup.php dev/tests/functional/tests/app/Magento/Store/Test/Fixture/Website.php dev/tests/functional/tests/app/Magento/Store/Test/Repository/Store.php dev/tests/functional/tests/app/Magento/Store/Test/Repository/StoreGroup.php dev/tests/functional/tests/app/Magento/Store/Test/Repository/Website.php dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxClass.php dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRate.php dev/tests/functional/tests/app/Magento/Tax/Test/Fixture/TaxRule.php dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxClass.php dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Repository/UrlRewrite.php dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml dev/tests/functional/tests/app/Magento/User/Test/Fixture/AdminUserRole.php dev/tests/functional/tests/app/Magento/User/Test/Fixture/User.php dev/tests/functional/tests/app/Magento/User/Test/Repository/AdminUserRole.php dev/tests/functional/tests/app/Magento/User/Test/Repository/User.php dev/tests/functional/utils/generate.php dev/tests/functional/utils/generate/factory.php
2 parents 1194947 + 3dd6f78 commit f80266b

File tree

1,117 files changed

+3353
-2162
lines changed

Some content is hidden

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

1,117 files changed

+3353
-2162
lines changed

app/code/Magento/Backend/etc/di.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<preference for="Magento\Backend\Model\Config\Structure\SearchInterface" type="Magento\Backend\Model\Config\Structure" />
1313
<preference for="Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface" type="Magento\Backend\Model\Config\Backend\File\RequestData" />
1414
<preference for="Magento\Backend\Model\Auth\Credential\StorageInterface" type="Magento\User\Model\User" />
15-
<preference for="Magento\Adminhtml\Helper\Data" type="Magento\Backend\Helper\Data" />
1615
<preference for="Magento\Backend\App\ConfigInterface" type="Magento\Backend\App\Config" />
1716
<preference for="Magento\Backend\Model\UrlInterface" type="Magento\Backend\Model\Url" />
1817
<preference for="Magento\Backend\Block\Widget\Button\ToolbarInterface" type="Magento\Backend\Block\Widget\Button\Toolbar" />

app/code/Magento/Checkout/Controller/Cart/Configure.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,19 @@ public function execute()
4444
{
4545
// Extract item and product to configure
4646
$id = (int)$this->getRequest()->getParam('id');
47+
$productId = (int)$this->getRequest()->getParam('product_id');
4748
$quoteItem = null;
4849
if ($id) {
4950
$quoteItem = $this->cart->getQuote()->getItemById($id);
5051
}
5152

52-
if (!$quoteItem) {
53-
$this->messageManager->addError(__("We can't find the quote item."));
54-
$this->_redirect('checkout/cart');
55-
return;
56-
}
57-
5853
try {
54+
if (!$quoteItem || $productId != $quoteItem->getProduct()->getId()) {
55+
$this->messageManager->addError(__("We can't find the quote item."));
56+
$this->_redirect('checkout/cart');
57+
return;
58+
}
59+
5960
$params = new \Magento\Framework\Object();
6061
$params->setCategoryId(false);
6162
$params->setConfigureMode(true);

app/code/Magento/Checkout/Controller/Cart/Index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Index extends \Magento\Checkout\Controller\Cart
1515
*/
1616
public function execute()
1717
{
18+
$this->_eventManager->dispatch('collect_totals_failed_items');
1819
if ($this->cart->getQuote()->getItemsCount()) {
1920
$this->cart->init();
2021
$this->cart->save();

app/code/Magento/Checkout/view/frontend/layout/checkout_onepage_success.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<head>
10+
<title>Success Page</title>
11+
</head>
912
<body>
1013
<referenceBlock name="page.main.title">
1114
<block class="Magento\Checkout\Block\Onepage\Success" name="checkout.success.print.button" template="button.phtml"/>

app/code/Magento/Core/etc/di.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
<preference for="Magento\Framework\Authorization\PolicyInterface" type="Magento\Framework\Authorization\Policy\DefaultPolicy" />
1515
<preference for="Magento\Framework\Authorization\RoleLocatorInterface" type="Magento\Framework\Authorization\RoleLocator\DefaultRoleLocator" />
1616
<preference for="Magento\Framework\Session\SessionManagerInterface" type="Magento\Framework\Session\Generic" />
17-
<preference for="Magento\Core\Model\DataService\ConfigInterface" type="Magento\Core\Model\DataService\Config" />
1817
<preference for="Magento\Framework\App\Config\ScopeConfigInterface" type="Magento\Framework\App\Config" />
1918
<preference for="Magento\Framework\App\Config\ReinitableConfigInterface" type="Magento\Framework\App\ReinitableConfig" />
2019
<preference for="Magento\Framework\App\Config\MutableScopeConfigInterface" type="Magento\Framework\App\MutableScopeConfig" />
2120
<preference for="Magento\Framework\App\Config\Storage\WriterInterface" type="Magento\Framework\App\Config\Storage\Writer" />
2221
<preference for="Magento\Framework\View\Design\Theme\FileInterface" type="Magento\Core\Model\Theme\File" />
2322
<preference for="Magento\Framework\Config\ConverterInterface" type="Magento\Framework\Config\Converter\Dom"/>
24-
<preference for="Magento\Core\Model\Url\SecurityInfoInterface" type="Magento\Core\Model\Url\SecurityInfo\Proxy" />
2523
<preference for="Magento\Framework\App\DefaultPathInterface" type="Magento\Framework\App\DefaultPath\DefaultPath" />
2624
<preference for="Magento\Framework\Encryption\EncryptorInterface" type="Magento\Framework\Encryption\Encryptor" />
2725
<preference for="Magento\Framework\Filter\Encrypt\AdapterInterface" type="Magento\Framework\Filter\Encrypt\Basic" />

app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
99
<update handle="multishipping_checkout"/>
10+
<head>
11+
<title>Success Page</title>
12+
</head>
1013
<body>
1114
<referenceBlock name="page.main.title">
1215
<action method="setPageTitle">
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\OfflinePayments\Block\Form;
7+
8+
/**
9+
* Abstract class for Cash On Delivery and Bank Transfer payment method form
10+
*/
11+
abstract class AbstractInstruction extends \Magento\Payment\Block\Form
12+
{
13+
/**
14+
* Instructions text
15+
*
16+
* @var string
17+
*/
18+
protected $_instructions;
19+
20+
/**
21+
* Get instructions text from config
22+
*
23+
* @return string
24+
*/
25+
public function getInstructions()
26+
{
27+
if (is_null($this->_instructions)) {
28+
$this->_instructions = $this->getMethod()->getInstructions();
29+
}
30+
return $this->_instructions;
31+
}
32+
}

app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,12 @@
88
/**
99
* Block for Bank Transfer payment method form
1010
*/
11-
class Banktransfer extends \Magento\Payment\Block\Form
11+
class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstruction
1212
{
13-
/**
14-
* Instructions text
15-
*
16-
* @var string
17-
*/
18-
protected $_instructions;
19-
2013
/**
2114
* Bank transfer template
2215
*
2316
* @var string
2417
*/
2518
protected $_template = 'form/banktransfer.phtml';
26-
27-
/**
28-
* Get instructions text from config
29-
*
30-
* @return string
31-
*/
32-
public function getInstructions()
33-
{
34-
if (is_null($this->_instructions)) {
35-
$this->_instructions = $this->getMethod()->getInstructions();
36-
}
37-
return $this->_instructions;
38-
}
3919
}

app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,12 @@
88
/**
99
* Block for Cash On Delivery payment method form
1010
*/
11-
class Cashondelivery extends \Magento\Payment\Block\Form
11+
class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruction
1212
{
13-
/**
14-
* Instructions text
15-
*
16-
* @var string
17-
*/
18-
protected $_instructions;
19-
2013
/**
2114
* Cash on delivery template
2215
*
2316
* @var string
2417
*/
2518
protected $_template = 'form/cashondelivery.phtml';
26-
27-
/**
28-
* Get instructions text from config
29-
*
30-
* @return string
31-
*/
32-
public function getInstructions()
33-
{
34-
if (is_null($this->_instructions)) {
35-
$this->_instructions = $this->getMethod()->getInstructions();
36-
}
37-
return $this->_instructions;
38-
}
3919
}

app/code/Magento/OfflinePayments/Model/Banktransfer.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,4 @@ class Banktransfer extends \Magento\Payment\Model\Method\AbstractMethod
3939
* @var bool
4040
*/
4141
protected $_isOffline = true;
42-
43-
/**
44-
* Get instructions text from config
45-
*
46-
* @return string
47-
*/
48-
public function getInstructions()
49-
{
50-
return trim($this->getConfigData('instructions'));
51-
}
5242
}

0 commit comments

Comments
 (0)