Skip to content

Commit 5149d4a

Browse files
author
Ievgen Shakhsuvarov
committed
Merge branch 'develop' of github.corp.magento.com:magento2/magento2ce into bugs
2 parents a9f25d6 + ffa02d8 commit 5149d4a

File tree

50 files changed

+7918
-3843
lines changed

Some content is hidden

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

50 files changed

+7918
-3843
lines changed

app/code/Magento/Braintree/view/frontend/templates/creditcard/edit.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
/** @var $block \Magento\Braintree\Block\Creditcard\Management */
1010

1111
echo $block->getLayout()->getMessagesBlock()->getGroupedHtml();
12-
$defaultExpMonth = $block->getTodayMonth();
13-
$defaultExpYear = $block->getTodayYear();
12+
$defaultExpMonth = '';
13+
$defaultExpYear = '';
1414
$countrySpecificCardTypeConfig = $block->getCountrySpecificCardTypeConfig();
1515
$applicableCardTypeConfig = $block->getCcApplicableTypes();
1616
if ($block->isEditMode()) {
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Bundle\Block\Adminhtml\Order\Create;
7+
8+
class Sidebar
9+
{
10+
/**
11+
* Get item qty
12+
*
13+
* @param \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject
14+
* @param callable $proceed
15+
* @param \Magento\Framework\DataObject $item
16+
*
17+
* @return string
18+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
19+
*/
20+
public function aroundGetItemQty(
21+
\Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject,
22+
\Closure $proceed,
23+
\Magento\Framework\DataObject $item
24+
) {
25+
if ($item->getProduct()->getTypeId() == \Magento\Bundle\Model\Product\Type::TYPE_CODE) {
26+
return '';
27+
}
28+
return $proceed($item);
29+
}
30+
31+
/**
32+
* Check whether product configuration is required before adding to order
33+
*
34+
* @param \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject
35+
* @param callable $proceed
36+
* @param string $productType
37+
*
38+
* @return bool
39+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
40+
*/
41+
public function aroundIsConfigurationRequired(
42+
\Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar $subject,
43+
\Closure $proceed,
44+
$productType
45+
) {
46+
if ($productType == \Magento\Bundle\Model\Product\Type::TYPE_CODE) {
47+
return true;
48+
}
49+
return $proceed($productType);
50+
}
51+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
*/
2020
class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
2121
{
22+
/**
23+
* Product type
24+
*/
25+
const TYPE_CODE = 'bundle';
26+
2227
/**
2328
* Product is composite
2429
*

app/code/Magento/Bundle/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">
1010
<plugin name="Bundle" type="Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle" sortOrder="60" />
1111
</type>
12+
<type name="Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar">
13+
<plugin name="Bundle" type="Magento\Bundle\Block\Adminhtml\Order\Create\Sidebar" sortOrder="200"/>
14+
</type>
1215
<type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
1316
<arguments>
1417
<argument name="constructors" xsi:type="array">

app/code/Magento/Catalog/Ui/Component/ColumnFactory.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public function create($attribute, $context, array $config = [])
5555
'dataType' => $this->getDataType($attribute),
5656
'add_field' => true,
5757
'visible' => $attribute->getIsVisibleInGrid(),
58+
'filter' => ($attribute->getIsFilterableInGrid())
59+
? $this->getFilterType($attribute->getFrontendInput())
60+
: null,
5861
], $config);
5962

6063
if ($attribute->usesSource()) {
@@ -92,4 +95,17 @@ protected function getDataType($attribute)
9295
? $this->dataTypeMap[$attribute->getFrontendInput()]
9396
: $this->dataTypeMap['default'];
9497
}
98+
99+
/**
100+
* Retrieve filter type by $frontendInput
101+
*
102+
* @param string $frontendInput
103+
* @return string
104+
*/
105+
protected function getFilterType($frontendInput)
106+
{
107+
$filtersMap = ['date' => 'dateRange'];
108+
$result = array_replace_recursive($this->dataTypeMap, $filtersMap);
109+
return isset($result[$frontendInput]) ? $result[$frontendInput] : $result['default'];
110+
}
95111
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/checkboxes/tree.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
<?php $_divId = 'tree-div_' . time() ?>
1212
<div id="<?php /* @escapeNotVerified */ echo $_divId ?>" class="tree"></div>
13-
<!--[if IE]>
1413
<script id="ie-deferred-loader" defer="defer" src=""></script>
15-
<![endif]-->
1614
<script>
1715
require([
1816
'jquery',

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
<div><?php /* @escapeNotVerified */ echo __('This operation can take a long time'); ?></div>
3636
</div>
3737
</div>
38-
<!--[if IE]>
3938
<script id="ie-deferred-loader" defer="defer" src=""></script>
40-
<![endif]-->
4139
<script>
4240
var tree;
4341
require([

app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
<?php $_divId = 'tree' . $block->getId() ?>
1212
<div id="<?php /* @escapeNotVerified */ echo $_divId ?>" class="tree"></div>
13-
<!--[if IE]>
1413
<script id="ie-deferred-loader" defer="defer" src=""></script>
15-
<![endif]-->
14+
<![]-->
1615
<script>
1716
require(['jquery', "prototype", "extjs/ext-tree-checkbox"], function(jQuery){
1817

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
<span class="title"><?php /* @escapeNotVerified */ echo __('Unassigned Attributes') ?></span>
3939
</div>
4040
<div id="tree-div2" class="attribute-set-tree"></div>
41-
<!--[if IE]>
4241
<script id="ie-deferred-loader" defer="defer" src=""></script>
43-
<![endif]-->
4442
<script>
4543
define("tree-panel",
4644
[

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ define([
6565
actions: {
6666
confirm: function () {
6767
self._removeItem($(event.currentTarget));
68+
},
69+
always: function (event) {
70+
event.stopImmediatePropagation();
6871
}
6972
}
7073
});

0 commit comments

Comments
 (0)