Skip to content

Commit b838e74

Browse files
authored
Merge pull request #3878 from magento-arcticfoxes/2.3.1-qwerty-pr
[2.3.1-qwerty] Sync with 2.3.1-release
2 parents f66e072 + 4303cb7 commit b838e74

File tree

15 files changed

+124
-3775
lines changed

15 files changed

+124
-3775
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Tierprice.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,6 @@ protected function modifyPriceData($object, $data)
165165
/** @var \Magento\Catalog\Model\Product $object */
166166
$data = parent::modifyPriceData($object, $data);
167167
$price = $object->getPrice();
168-
169-
$specialPrice = $object->getSpecialPrice();
170-
$specialPriceFromDate = $object->getSpecialFromDate();
171-
$specialPriceToDate = $object->getSpecialToDate();
172-
$today = time();
173-
174-
if ($specialPrice && ($object->getPrice() > $object->getFinalPrice())) {
175-
if ($today >= strtotime($specialPriceFromDate) && $today <= strtotime($specialPriceToDate) ||
176-
$today >= strtotime($specialPriceFromDate) && $specialPriceToDate === null) {
177-
$price = $specialPrice;
178-
}
179-
}
180-
181168
foreach ($data as $key => $tierPrice) {
182169
$percentageValue = $this->getPercentage($tierPrice);
183170
if ($percentageValue) {

app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/DynamicField.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ public function getFields(array $context = []): array
123123

124124
$groups = $this->groupRepository->getList($searchCriteria)->getItems();
125125
$priceAttribute = $this->attributeAdapterProvider->getByAttributeCode('price');
126+
$ctx = isset($context['websiteId']) ? ['websiteId' => $context['websiteId']] : [];
126127
foreach ($groups as $group) {
128+
$ctx['customerGroupId'] = $group->getId();
127129
$groupPriceKey = $this->fieldNameResolver->getFieldName(
128130
$priceAttribute,
129-
['customerGroupId' => $group->getId(), 'websiteId' => $context['websiteId']]
131+
$ctx
130132
);
131133
$allAttributes[$groupPriceKey] = [
132134
'type' => $this->fieldTypeConverter->convert(FieldTypeConverterInterface::INTERNAL_DATA_TYPE_FLOAT),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
<type name="Magento\Search\Model\Search\PageSizeProvider">
159159
<arguments>
160160
<argument name="pageSizeBySearchEngine" xsi:type="array">
161-
<item name="elasticsearch6" xsi:type="number">2147483647</item>
161+
<item name="elasticsearch6" xsi:type="number">10000</item>
162162
</argument>
163163
</arguments>
164164
</type>

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Form/Account.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ protected function _prepareForm()
133133
$this->_addAttributesToForm($attributes, $fieldset);
134134

135135
$this->_form->addFieldNameSuffix('order[account]');
136-
$storeId = (int)$this->_sessionQuote->getStoreId();
137-
$this->_form->setValues($this->extractValuesFromAttributes($attributes, $storeId));
136+
$this->_form->setValues($this->extractValuesFromAttributes($attributes));
138137

139138
return $this;
140139
}
@@ -192,37 +191,18 @@ public function getFormValues()
192191
* Extract the form values from attributes.
193192
*
194193
* @param array $attributes
195-
* @param int $storeId
196194
* @return array
197195
*/
198-
private function extractValuesFromAttributes(array $attributes, int $storeId): array
196+
private function extractValuesFromAttributes(array $attributes): array
199197
{
200198
$formValues = $this->getFormValues();
201199
foreach ($attributes as $code => $attribute) {
202200
$defaultValue = $attribute->getDefaultValue();
203201
if (isset($defaultValue) && !isset($formValues[$code])) {
204202
$formValues[$code] = $defaultValue;
205203
}
206-
if ($code === 'group_id' && empty($defaultValue)) {
207-
$formValues[$code] = $this->getDefaultCustomerGroup($storeId);
208-
}
209204
}
210205

211206
return $formValues;
212207
}
213-
214-
/**
215-
* Gets default customer group.
216-
*
217-
* @param int $storeId
218-
* @return string|null
219-
*/
220-
private function getDefaultCustomerGroup(int $storeId): ?string
221-
{
222-
return $this->_scopeConfig->getValue(
223-
'customer/create_account/default_group',
224-
ScopeInterface::SCOPE_STORE,
225-
$storeId
226-
);
227-
}
228208
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminChangeCustomerGroupInNewOrder">
12+
<annotations>
13+
<title value="Customer account group cannot be selected while creating a new customer in order"/>
14+
<stories value="MC-15290: Customer account group cannot be selected while creating a new customer in order"/>
15+
<description value="Customer account group cannot be selected while creating a new customer in order"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-15290"/>
18+
<useCaseId value="MC-15289"/>
19+
<group value="sales"/>
20+
</annotations>
21+
22+
<before>
23+
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
24+
</before>
25+
<after>
26+
<actionGroup ref="logout" stepKey="logout"/>
27+
</after>
28+
29+
<actionGroup ref="navigateToNewOrderPageNewCustomerSingleStore" stepKey="openNewOrder"/>
30+
<selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="Retailer" stepKey="selectCustomerGroup"/>
31+
<waitForPageLoad stepKey="waitForPageLoad"/>
32+
<grabValueFrom selector="{{AdminOrderFormAccountSection.group}}" stepKey="grabGroupValue"/>
33+
<assertEquals stepKey="assertValueIsStillSelected">
34+
<actualResult type="variable">$grabGroupValue</actualResult>
35+
<expectedResult type="string">3</expectedResult>
36+
</assertEquals>
37+
</test>
38+
</tests>

app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
</arguments>
1414
<amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnTheStorePage"/>
1515
<click selector="{{AdminStoresGridSection.resetButton}}" stepKey="clickOnResetButton"/>
16-
<waitForPageLoad stepKey="waitForPageLoadAfterResetButtonClicked" time="10"/>
1716
<fillField userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteFilterTextField}}" stepKey="fillSearchWebsiteField"/>
1817
<click selector="{{AdminStoresGridSection.searchButton}}" stepKey="clickSearchButton" />
19-
<waitForPageLoad stepKey="waitForPageLoadAfterSearch" time="10"/>
2018
<see userInput="{{websiteName}}" selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="verifyThatCorrectWebsiteFound"/>
2119
<click selector="{{AdminStoresGridSection.websiteNameInFirstRow}}" stepKey="clickEditExistingWebsite"/>
22-
20+
<waitForPageLoad stepKey="waitForPageLoadAfterWebsiteSelected" time="30"/>
2321
<click selector="{{AdminStoresMainActionsSection.deleteButton}}" stepKey="clickDeleteWebsiteButtonOnEditStorePage"/>
2422
<selectOption userInput="No" selector="{{AdminStoresDeleteWebsiteSection.createDbBackup}}" stepKey="setCreateDbBackupToNo"/>
2523
<click selector="{{AdminStoresDeleteWebsiteSection.deleteButton}}" stepKey="clickDeleteButtonOnDeleteWebsitePage"/>
24+
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You deleted the website." stepKey="checkSuccessMessage"/>
2625
</actionGroup>
2726
</actionGroups>

app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
99
<section name="AdminStoresDeleteWebsiteSection">
1010
<element name="createDbBackup" type="select" selector="#store_create_backup"/>
11-
<element name="deleteButton" type="button" selector="#delete" timeout="30"/>
11+
<element name="deleteButton" type="button" selector="#delete" timeout="120"/>
1212
</section>
1313
</sections>

dev/tests/acceptance/RoboFile.php

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

dev/tests/acceptance/composer.json

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

0 commit comments

Comments
 (0)