Skip to content

Commit d5b09f9

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/develop' into MAGETWO-41954-st-compiler
2 parents 5d7d0bc + d59a6fd commit d5b09f9

File tree

231 files changed

+1928
-868
lines changed

Some content is hidden

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

231 files changed

+1928
-868
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ $serializedFormData = $this->helper('Magento\Framework\Json\Helper\Data')->jsonE
328328
</label>
329329

330330
<div class="control">
331-
<?php echo $block->escapeHtml($block->countrySelect('credit_card[billing_address][country_code_alpha2]', 'billing_address_country', $default)); ?>
331+
<?php /* @noEscape */ echo $block->countrySelect('credit_card[billing_address][country_code_alpha2]', 'billing_address_country', $default); ?>
332332
</div>
333333
</div>
334334
</fieldset>
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/Block/Product/View/Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected function _getPriceConfiguration($option)
162162
$data = [
163163
'prices' => [
164164
'oldPrice' => [
165-
'amount' => $this->pricingHelper->currency($option->getPrice(false), false, false),
165+
'amount' => $optionPrice,
166166
'adjustments' => [],
167167
],
168168
'basePrice' => [

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/CustomerImportExport/Model/Import/Customer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ protected function _prepareDataForUpdate(array $rowData)
377377
$attributeParameters = $this->_attributes[$attributeCode];
378378

379379
if ('select' == $attributeParameters['type']) {
380-
$value = $attributeParameters['options'][strtolower($value)];
380+
$value = isset($attributeParameters['options'][strtolower($value)])
381+
? $attributeParameters['options'][strtolower($value)]
382+
: 0;
381383
} elseif ('datetime' == $attributeParameters['type']) {
382384
$value = (new \DateTime())->setTimestamp(strtotime($value));
383385
$value = $value->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);

app/code/Magento/LayeredNavigation/view/frontend/layout/1column.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-left.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/code/Magento/LayeredNavigation/view/frontend/layout/2columns-right.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)