Skip to content

Commit c25656b

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MC-12396-subtotal-excl-tax
2 parents 6ae859a + 9d231d1 commit c25656b

File tree

831 files changed

+27795
-5276
lines changed

Some content is hidden

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

831 files changed

+27795
-5276
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ protected function saveAndReplaceAdvancedPrices()
408408
} elseif (\Magento\ImportExport\Model\Import::BEHAVIOR_APPEND == $behavior) {
409409
$this->processCountExistingPrices($tierPrices, self::TABLE_TIER_PRICE)
410410
->processCountNewPrices($tierPrices);
411+
411412
$this->saveProductPrices($tierPrices, self::TABLE_TIER_PRICE);
412413
if ($listSku) {
413414
$this->setUpdatedAt($listSku);
@@ -562,11 +563,14 @@ protected function processCountExistingPrices($prices, $table)
562563

563564
$tableName = $this->_resourceFactory->create()->getTable($table);
564565
$productEntityLinkField = $this->getProductEntityLinkField();
565-
$existingPrices = $this->_connection->fetchAssoc(
566+
$existingPrices = $this->_connection->fetchAll(
566567
$this->_connection->select()->from(
567568
$tableName,
568-
['value_id', $productEntityLinkField, 'all_groups', 'customer_group_id']
569-
)->where($productEntityLinkField . ' IN (?)', $existProductIds)
569+
[$productEntityLinkField, 'all_groups', 'customer_group_id', 'qty']
570+
)->where(
571+
$productEntityLinkField . ' IN (?)',
572+
$existProductIds
573+
)
570574
);
571575
foreach ($existingPrices as $existingPrice) {
572576
foreach ($prices as $sku => $skuPrices) {
@@ -591,8 +595,10 @@ protected function incrementCounterUpdated($prices, $existingPrice)
591595
foreach ($prices as $price) {
592596
if ($existingPrice['all_groups'] == $price['all_groups']
593597
&& $existingPrice['customer_group_id'] == $price['customer_group_id']
598+
&& (int) $existingPrice['qty'] === (int) $price['qty']
594599
) {
595600
$this->countItemsUpdated++;
601+
continue;
596602
}
597603
}
598604
}

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ public function testProcessCountExistingPrices(
921921
);
922922
$dbSelectMock = $this->createMock(\Magento\Framework\DB\Select::class);
923923
$this->connection->expects($this->once())
924-
->method('fetchAssoc')
924+
->method('fetchAll')
925925
->willReturn($existingPrices);
926926
$this->connection->expects($this->once())
927927
->method('select')
@@ -930,7 +930,7 @@ public function testProcessCountExistingPrices(
930930
->method('from')
931931
->with(
932932
self::TABLE_NAME,
933-
['value_id', self::LINK_FIELD, 'all_groups', 'customer_group_id']
933+
[self::LINK_FIELD, 'all_groups', 'customer_group_id', 'qty']
934934
)->willReturnSelf();
935935
$this->advancedPricing->expects($this->once())
936936
->method('retrieveOldSkus')

app/code/Magento/AdvancedSearch/etc/adminhtml/system.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@
4848
</depends>
4949
</field>
5050
<!--<group id="suggestions">-->
51-
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
51+
<field id="search_suggestion_enabled" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
5252
<label>Enable Search Suggestions</label>
5353
<comment>When you enable this option your site may slow down.</comment>
5454
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
5555
</field>
56-
<field id="search_suggestion_count" translate="label" type="text" sortOrder="71" showInDefault="1" showInWebsite="1" showInStore="1">
56+
<field id="search_suggestion_count" translate="label" type="text" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="1">
5757
<label>Search Suggestions Count</label>
5858
<depends>
5959
<field id="search_suggestion_enabled">1</field>
6060
</depends>
6161
</field>
62-
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="1">
62+
<field id="search_suggestion_count_results_enabled" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="1">
6363
<label>Show Results Count for Each Suggestion</label>
6464
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
6565
<comment>When you enable this option your site may slow down.</comment>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
<section name="AdminAdvancedReportingSection">
10+
<element name="goToAdvancedReporting" type="text" selector="//div[@class='dashboard-advanced-reports-actions']/a[@title='Go to Advanced Reporting']" timeout="30"/>
11+
</section>
12+
</sections>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminAdvancedReportingButtonTest">
11+
<annotations>
12+
<stories value="AdvancedReporting"/>
13+
<title value="AdvancedReportingButtonTest"/>
14+
<description value="Test log in to AdvancedReporting and tests AdvancedReportingButtonTest"/>
15+
<testCaseId value="MC-14800"/>
16+
<severity value="CRITICAL"/>
17+
<group value="analytics"/>
18+
<group value="mtf_migrated"/>
19+
</annotations>
20+
21+
<before>
22+
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="logout" stepKey="logout"/>
26+
</after>
27+
28+
<!--Navigate through Advanced Reporting button on dashboard to Sign Up page-->
29+
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
30+
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
31+
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
32+
<switchToNextTab stepKey="switchToNewTab"/>
33+
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
34+
</test>
35+
</tests>

app/code/Magento/AuthorizenetAcceptjs/etc/config.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
99
<default>
10+
<dev>
11+
<js>
12+
<minify_exclude>
13+
<authorizenet_acceptjs>\.authorize\.net/v1/Accept</authorizenet_acceptjs>
14+
</minify_exclude>
15+
</js>
16+
</dev>
1017
<payment>
1118
<authorizenet_acceptjs>
1219
<active>0</active>

app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
1010
<methods>
1111
<method name="authorizenet_acceptjs">
12-
<allow_multiple_address>1</allow_multiple_address>
12+
<allow_multiple_address>0</allow_multiple_address>
1313
</method>
1414
</methods>
1515
</payment>

app/code/Magento/Backend/App/Request/BackendValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ private function createException(
146146
$exception = new InvalidRequestException($response);
147147
} else {
148148
//For regular requests.
149+
$startPageUrl = $this->backendUrl->getStartupPageUrl();
149150
$response = $this->redirectFactory->create()
150-
->setUrl($this->backendUrl->getStartupPageUrl());
151+
->setUrl($this->backendUrl->getUrl($startPageUrl));
151152
$exception = new InvalidRequestException(
152153
$response,
153154
[

app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Magento\Backend\Block\System\Design\Edit\Tab;
88

9+
/**
10+
* General system tab block.
11+
*/
912
class General extends \Magento\Backend\Block\Widget\Form\Generic
1013
{
1114
/**
@@ -90,7 +93,7 @@ protected function _prepareForm()
9093
]
9194
);
9295

93-
$dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT);
96+
$dateFormat = $this->_localeDate->getDateFormatWithLongYear();
9497
$fieldset->addField(
9598
'date_from',
9699
'date',

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @api
2020
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2223
* @since 100.0.2
2324
*/
2425
class Context extends \Magento\Framework\View\Element\Template\Context
@@ -174,7 +175,7 @@ public function getAuthorization()
174175
}
175176

176177
/**
177-
* Get Backend Session
178+
* Get backend session instance.
178179
*
179180
* @return \Magento\Backend\Model\Session
180181
*/
@@ -184,7 +185,7 @@ public function getBackendSession()
184185
}
185186

186187
/**
187-
* Get Math Random
188+
* Get math random instance.
188189
*
189190
* @return \Magento\Framework\Math\Random
190191
*/
@@ -194,7 +195,7 @@ public function getMathRandom()
194195
}
195196

196197
/**
197-
* Get Form Key
198+
* Get form key instance.
198199
*
199200
* @return \Magento\Framework\Data\Form\FormKey
200201
*/
@@ -204,7 +205,7 @@ public function getFormKey()
204205
}
205206

206207
/**
207-
* Get Class Name Builder
208+
* Get name builder instance.
208209
*
209210
* @return \Magento\Framework\Code\NameBuilder
210211
*/

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
2828
protected $_column;
2929

3030
/**
31+
* Set column for renderer.
32+
*
3133
* @param Column $column
3234
* @return $this
3335
*/
@@ -38,6 +40,8 @@ public function setColumn($column)
3840
}
3941

4042
/**
43+
* Returns row associated with the renderer.
44+
*
4145
* @return Column
4246
*/
4347
public function getColumn()
@@ -48,7 +52,7 @@ public function getColumn()
4852
/**
4953
* Renders grid column
5054
*
51-
* @param Object $row
55+
* @param DataObject $row
5256
* @return string
5357
*/
5458
public function render(DataObject $row)
@@ -66,7 +70,7 @@ public function render(DataObject $row)
6670
/**
6771
* Render column for export
6872
*
69-
* @param Object $row
73+
* @param DataObject $row
7074
* @return string
7175
*/
7276
public function renderExport(DataObject $row)
@@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
7579
}
7680

7781
/**
78-
* @param Object $row
82+
* Returns value of the row.
83+
*
84+
* @param DataObject $row
7985
* @return mixed
8086
*/
8187
protected function _getValue(DataObject $row)
@@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
9298
}
9399

94100
/**
95-
* @param Object $row
101+
* Get pre-rendered input element.
102+
*
103+
* @param DataObject $row
96104
* @return string
97105
*/
98106
public function _getInputValueElement(DataObject $row)
@@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
108116
}
109117

110118
/**
111-
* @param Object $row
119+
* Get input value by row.
120+
*
121+
* @param DataObject $row
112122
* @return mixed
113123
*/
114124
protected function _getInputValue(DataObject $row)
@@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
117127
}
118128

119129
/**
130+
* Renders header of the column,
131+
*
120132
* @return string
121133
*/
122134
public function renderHeader()
@@ -148,6 +160,8 @@ public function renderHeader()
148160
}
149161

150162
/**
163+
* Render HTML properties.
164+
*
151165
* @return string
152166
*/
153167
public function renderProperty()
@@ -172,6 +186,8 @@ public function renderProperty()
172186
}
173187

174188
/**
189+
* Returns HTML for CSS.
190+
*
175191
* @return string
176192
*/
177193
public function renderCss()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class ProductsViewed extends AjaxBlock
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
/**
12+
* Get most viewed products controller.
13+
*/
14+
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
1015
{
1116
/**
1217
* Gets most viewed products list
1318
*
14-
* @return \Magento\Backend\Model\View\Result\Page
19+
* @return \Magento\Framework\Controller\Result\Raw
1520
*/
1621
public function execute()
1722
{

app/code/Magento/Backend/Model/Session/Quote.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @method Quote setOrderId($orderId)
2525
* @method int getOrderId()
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2728
* @since 100.0.2
2829
*/
2930
class Quote extends \Magento\Framework\Session\SessionManager
@@ -149,7 +150,8 @@ public function getQuote()
149150
$this->_quote = $this->quoteFactory->create();
150151
if ($this->getStoreId()) {
151152
if (!$this->getQuoteId()) {
152-
$this->_quote->setCustomerGroupId($this->groupManagement->getDefaultGroup()->getId());
153+
$customerGroupId = $this->groupManagement->getDefaultGroup($this->getStoreId())->getId();
154+
$this->_quote->setCustomerGroupId($customerGroupId);
153155
$this->_quote->setIsActive(false);
154156
$this->_quote->setStoreId($this->getStoreId());
155157

app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ public function testGetQuoteWithoutQuoteId()
267267
$cartInterfaceMock->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);
268268
$defaultGroup = $this->getMockBuilder(\Magento\Customer\Api\Data\GroupInterface::class)->getMock();
269269
$defaultGroup->expects($this->any())->method('getId')->will($this->returnValue($customerGroupId));
270-
$this->groupManagementMock->expects($this->any())->method('getDefaultGroup')->willReturn($defaultGroup);
270+
$this->groupManagementMock
271+
->method('getDefaultGroup')
272+
->with($storeId)
273+
->willReturn($defaultGroup);
271274

272275
$dataCustomerMock = $this->getMockBuilder(\Magento\Customer\Api\Data\CustomerInterface::class)
273276
->disableOriginalConstructor()

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
<group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
113113
<label>Debug</label>
114114
<field id="template_hints_storefront" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
115-
<label>Enabled Template Path Hints for Storefront</label>
115+
<label>Enable Template Path Hints for Storefront</label>
116116
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
117117
</field>
118118
<field id="template_hints_storefront_show_with_parameter" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
@@ -132,7 +132,7 @@
132132
<comment>Add the following parameter to the URL to show template hints ?templatehints=[parameter_value]</comment>
133133
</field>
134134
<field id="template_hints_admin" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
135-
<label>Enabled Template Path Hints for Admin</label>
135+
<label>Enable Template Path Hints for Admin</label>
136136
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
137137
</field>
138138
<field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">

0 commit comments

Comments
 (0)