Skip to content

Commit c552b81

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/develop' into PR-2
2 parents d0f2b03 + e5dedb8 commit c552b81

File tree

30 files changed

+204
-326
lines changed

30 files changed

+204
-326
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
?>
1010
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>
1111

12-
<div id="system_messages_list" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
12+
<div style="display:none" id="system_messages_list" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
1313
<ul class="message-system-list">
1414
<?php foreach ($block->getUnreadMessages() as $message): ?>
1515
<li class="message message-warning <?php /* @escapeNotVerified */ echo $block->getItemClass($message);?>">

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ define(
4747
return {
4848
'method': this.item.method,
4949
'po_number': null,
50-
'cc_owner': null,
51-
'cc_number': null,
52-
'cc_type': null,
53-
'cc_exp_year': null,
54-
'cc_exp_month': null,
5550
'additional_data': {
5651
'payment_method_nonce': this.paymentMethodNonce()
5752
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ define(
173173
getData: function () {
174174
return {
175175
'method': this.item.method,
176-
'cc_type': this.creditCardType(),
177-
'cc_exp_year': this.creditCardExpYear(),
178-
'cc_exp_month': this.creditCardExpMonth(),
179176
'additional_data': {
180177
'cc_last4': this.creditCardNumber().slice(-4),
181178
'store_in_vault': this.storeInVault(),
182179
'payment_method_nonce': this.paymentMethodNonce(),
183180
'cc_token': this.selectedCardToken(),
184-
'device_data': this.deviceData
181+
'device_data': this.deviceData,
182+
'cc_type': this.creditCardType(),
183+
'cc_exp_year': this.creditCardExpYear(),
184+
'cc_exp_month': this.creditCardExpMonth()
185185
}
186186
};
187187
},

app/code/Magento/Catalog/Block/Product/ListProduct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function prepareSortableFieldsByCategory($category)
296296
}
297297
$availableOrders = $this->getAvailableOrders();
298298
if (!$this->getSortBy()) {
299-
$categorySortBy = $category->getDefaultSortBy();
299+
$categorySortBy = $this->getDefaultSortBy() ?: $category->getDefaultSortBy();
300300
if ($categorySortBy) {
301301
if (!$availableOrders) {
302302
$availableOrders = $this->_getConfig()->getAttributeUsedForSortByArray();

app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Catalog\Block\Product\ProductList;
77

8+
use Magento\Catalog\Helper\Product\ProductList;
89
use Magento\Catalog\Model\Product\ProductList\Toolbar as ToolbarModel;
910

1011
/**
@@ -63,7 +64,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
6364
*
6465
* @var string
6566
*/
66-
protected $_direction = \Magento\Catalog\Helper\Product\ProductList::DEFAULT_SORT_DIRECTION;
67+
protected $_direction = ProductList::DEFAULT_SORT_DIRECTION;
6768

6869
/**
6970
* Default View mode
@@ -102,7 +103,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
102103
protected $_toolbarModel;
103104

104105
/**
105-
* @var \Magento\Catalog\Helper\Product\ProductList
106+
* @var ProductList
106107
*/
107108
protected $_productListHelper;
108109

@@ -122,7 +123,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
122123
* @param \Magento\Catalog\Model\Config $catalogConfig
123124
* @param ToolbarModel $toolbarModel
124125
* @param \Magento\Framework\Url\EncoderInterface $urlEncoder
125-
* @param \Magento\Catalog\Helper\Product\ProductList $productListHelper
126+
* @param ProductList $productListHelper
126127
* @param \Magento\Framework\Data\Helper\PostHelper $postDataHelper
127128
* @param array $data
128129
*/
@@ -132,7 +133,7 @@ public function __construct(
132133
\Magento\Catalog\Model\Config $catalogConfig,
133134
ToolbarModel $toolbarModel,
134135
\Magento\Framework\Url\EncoderInterface $urlEncoder,
135-
\Magento\Catalog\Helper\Product\ProductList $productListHelper,
136+
ProductList $productListHelper,
136137
\Magento\Framework\Data\Helper\PostHelper $postDataHelper,
137138
array $data = []
138139
) {
@@ -355,7 +356,7 @@ public function removeOrderFromAvailableOrders($order)
355356
}
356357

357358
/**
358-
* Compare defined order field vith current order field
359+
* Compare defined order field with current order field
359360
*
360361
* @param string $order
361362
* @return bool
@@ -375,7 +376,7 @@ public function getPagerUrl($params = [])
375376
{
376377
$urlParams = [];
377378
$urlParams['_current'] = true;
378-
$urlParams['_escape'] = true;
379+
$urlParams['_escape'] = false;
379380
$urlParams['_use_rewrite'] = true;
380381
$urlParams['_query'] = $params;
381382
return $this->getUrl('*/*/*', $urlParams);
@@ -678,7 +679,7 @@ public function getWidgetOptionsJson(array $customOptions = [])
678679
'order' => ToolbarModel::ORDER_PARAM_NAME,
679680
'limit' => ToolbarModel::LIMIT_PARAM_NAME,
680681
'modeDefault' => $defaultMode,
681-
'directionDefault' => \Magento\Catalog\Helper\Product\ProductList::DEFAULT_SORT_DIRECTION,
682+
'directionDefault' => $this->_direction ?: ProductList::DEFAULT_SORT_DIRECTION,
682683
'orderDefault' => $this->_productListHelper->getDefaultSortField(),
683684
'limitDefault' => $this->_productListHelper->getDefaultLimitPerPageValue($defaultMode),
684685
'url' => $this->getPagerUrl(),

app/code/Magento/Catalog/Setup/UpgradeData.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,31 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
4646
$entityTypeId = $categorySetup->getEntityTypeId(\Magento\Catalog\Model\Product::ENTITY);
4747
$attributeSetId = $categorySetup->getDefaultAttributeSetId($entityTypeId);
4848

49-
$attributeGroupId = $categorySetup->getAttributeGroupId($entityTypeId, $attributeSetId, 'Images');
50-
51-
// update General Group
52-
$categorySetup->updateAttributeGroup(
49+
$attributeGroup = $categorySetup->getAttributeGroup(
5350
$entityTypeId,
5451
$attributeSetId,
55-
$attributeGroupId,
56-
'attribute_group_name',
57-
'Images and Videos'
52+
'Images',
53+
'attribute_group_name'
5854
);
55+
if (isset($attributeGroup['attribute_group_name']) && $attributeGroup['attribute_group_name'] == 'Images') {
56+
// update General Group
57+
$categorySetup->updateAttributeGroup(
58+
$entityTypeId,
59+
$attributeSetId,
60+
$attributeGroup['attribute_group_id'],
61+
'attribute_group_name',
62+
'Images and Videos'
63+
);
64+
}
65+
}
66+
67+
if ($context->getVersion()
68+
&& version_compare($context->getVersion(), '2.0.1') < 0
69+
) {
5970
$select = $setup->getConnection()->select()
6071
->from(
6172
$setup->getTable('catalog_product_entity_group_price'),
6273
[
63-
'value_id',
6474
'entity_id',
6575
'all_groups',
6676
'customer_group_id',
@@ -69,11 +79,10 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
6979
'website_id'
7080
]
7181
);
72-
$setup->getConnection()->insertFromSelect(
82+
$select = $setup->getConnection()->insertFromSelect(
7383
$select,
74-
$setup->getTable('catalog_product_entity_group_price'),
84+
$setup->getTable('catalog_product_entity_tier_price'),
7585
[
76-
'value_id',
7786
'entity_id',
7887
'all_groups',
7988
'customer_group_id',
@@ -82,6 +91,8 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
8291
'website_id'
8392
]
8493
);
94+
$setup->getConnection()->query($select);
95+
8596
$categorySetupManager = $this->categorySetupFactory->create();
8697
$categorySetupManager->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'group_price');
8798
}

app/code/Magento/Catalog/Setup/UpgradeSchema.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ protected function addForeignKeys(SchemaSetupInterface $setup)
140140
*/
141141
private function addSupportVideoMediaAttributes(SchemaSetupInterface $setup)
142142
{
143+
if ($setup->tableExists(Media::GALLERY_VALUE_TO_ENTITY_TABLE)) {
144+
return;
145+
};
146+
143147
/** Add support video media attribute */
144148
$this->createValueToEntityTable($setup);
145149
/**

app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ define([
6868
parameters;
6969
for (var i = 0; i < urlParams.length; i++) {
7070
parameters = urlParams[i].split('=');
71-
paramData[parameters[0]] = parameters[1] !== undefined ? parameters[1] : '';
71+
paramData[parameters[0]] = parameters[1] !== undefined
72+
? window.decodeURIComponent(parameters[1].replace(/\+/g, '%20'))
73+
: '';
7274
}
7375
paramData[paramName] = paramValue;
7476
if (paramValue == defaultValue) {
@@ -81,4 +83,4 @@ define([
8183
});
8284

8385
return $.mage.productListToolbarForm;
84-
});
86+
});

app/code/Magento/CatalogSearch/Block/Result.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,13 @@ public function setListOrders()
133133
/* @var $category \Magento\Catalog\Model\Category */
134134
$availableOrders = $category->getAvailableSortByOptions();
135135
unset($availableOrders['position']);
136+
$availableOrders['relevance'] = __('Relevance');
136137

137138
$this->getListBlock()->setAvailableOrders(
138139
$availableOrders
139140
)->setDefaultDirection(
140141
'desc'
141-
)->setSortBy(
142+
)->setDefaultSortBy(
142143
'relevance'
143144
);
144145

app/code/Magento/Checkout/view/frontend/web/js/view/payment/default.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ define(
157157
return {
158158
"method": this.item.method,
159159
"po_number": null,
160-
"cc_owner": null,
161-
"cc_number": null,
162-
"cc_type": null,
163-
"cc_exp_year": null,
164-
"cc_exp_month": null,
165160
"additional_data": null
166161
};
167162
},

app/code/Magento/OfflinePayments/view/frontend/web/js/view/payment/method-renderer/purchaseorder-method.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ define(
2626
return {
2727
"method": this.item.method,
2828
'po_number': this.purchaseOrderNumber(),
29-
"cc_owner": null,
30-
"cc_number": null,
31-
"cc_type": null,
32-
"cc_exp_year": null,
33-
"cc_exp_month": null,
3429
"additional_data": null
3530
};
3631

app/code/Magento/Payment/view/frontend/web/js/view/payment/cc-form.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ define(
9090
getData: function() {
9191
return {
9292
'method': this.item.method,
93-
'cc_type': this.creditCardType(),
94-
'cc_exp_year': this.creditCardExpYear(),
95-
'cc_exp_month': this.creditCardExpMonth(),
96-
'cc_number': this.creditCardNumber(),
97-
additional_data: {
93+
'additional_data': {
9894
'cc_cid': this.creditCardVerificationNumber(),
9995
'cc_ss_start_month': this.creditCardSsStartMonth(),
100-
'cc_ss_start_year': this.creditCardSsStartYear()
96+
'cc_ss_start_year': this.creditCardSsStartYear(),
97+
'cc_type': this.creditCardType(),
98+
'cc_exp_year': this.creditCardExpYear(),
99+
'cc_exp_month': this.creditCardExpMonth(),
100+
'cc_number': this.creditCardNumber()
101101
}
102102
};
103103
},

app/code/Magento/Quote/Api/Data/PaymentInterface.php

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ interface PaymentInterface extends \Magento\Framework\Api\ExtensibleDataInterfac
1818

1919
const KEY_METHOD = 'method';
2020

21-
const KEY_CC_OWNER = 'cc_owner';
22-
23-
const KEY_CC_NUMBER = 'cc_number';
24-
25-
const KEY_CC_TYPE = 'cc_type';
26-
27-
const KEY_CC_EXP_YEAR = 'cc_exp_year';
28-
29-
const KEY_CC_EXP_MONTH = 'cc_exp_month';
30-
3121
const KEY_ADDITIONAL_DATA = 'additional_data';
3222

3323
/**#@-*/
@@ -62,81 +52,6 @@ public function getMethod();
6252
*/
6353
public function setMethod($method);
6454

65-
/**
66-
* Get credit card owner
67-
*
68-
* @return string|null
69-
*/
70-
public function getCcOwner();
71-
72-
/**
73-
* Set credit card owner
74-
*
75-
* @param string $ccOwner
76-
* @return $this
77-
*/
78-
public function setCcOwner($ccOwner);
79-
80-
/**
81-
* Get credit card number
82-
*
83-
* @return string|null
84-
*/
85-
public function getCcNumber();
86-
87-
/**
88-
* Set credit card number
89-
*
90-
* @param string $ccNumber
91-
* @return $this
92-
*/
93-
public function setCcNumber($ccNumber);
94-
95-
/**
96-
* Get credit card type
97-
*
98-
* @return string|null
99-
*/
100-
public function getCcType();
101-
102-
/**
103-
* Set credit card type
104-
*
105-
* @param string $ccType
106-
* @return $this
107-
*/
108-
public function setCcType($ccType);
109-
110-
/**
111-
* Get credit card expiration year
112-
*
113-
* @return string|null
114-
*/
115-
public function getCcExpYear();
116-
117-
/**
118-
* Set credit card expiration year
119-
*
120-
* @param string $ccExpYear
121-
* @return $this
122-
*/
123-
public function setCcExpYear($ccExpYear);
124-
125-
/**
126-
* Get credit card expiration month
127-
*
128-
* @return string|null
129-
*/
130-
public function getCcExpMonth();
131-
132-
/**
133-
* Set credit card expiration month
134-
*
135-
* @param string $ccExpMonth
136-
* @return $this
137-
*/
138-
public function setCcExpMonth($ccExpMonth);
139-
14055
/**
14156
* Get payment additional details
14257
*

0 commit comments

Comments
 (0)