Skip to content

Commit 5c14360

Browse files
[Magento Community Engineering] Community Contributions - 2.4.1-develop
- merged latest code from mainline branch
2 parents f6655dd + e7d2294 commit 5c14360

File tree

15 files changed

+308
-95
lines changed

15 files changed

+308
-95
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.
1111

1212
### Preconditions (*)
1313
<!---
14-
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
14+
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
1515
-->
1616
1.
1717
2.
@@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
3232
<!--- Tell us what happened instead. Include error messages and issues. -->
3333
1. [Screenshots, logs or description]
3434
2.
35+
36+
---
37+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
38+
39+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
40+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
41+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
42+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
43+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/ISSUE_TEMPLATE/developer-experience-issue.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.
1818

1919
### Proposed solution
2020
<!--- Suggest your potential solutions for this issue. -->
21+
22+
---
23+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
24+
25+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
26+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
27+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
28+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
29+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
2424
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2525
-->
26-
1. magento/magento2#<issue_number>: Issue title
26+
1. Fixes magento/magento2#<issue_number>
2727

2828
### Manual testing scenarios (*)
2929
<!---

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,6 @@ protected function _saveCategoryProducts($category)
469469

470470
if (!empty($insert) || !empty($delete)) {
471471
$productIds = array_unique(array_merge(array_keys($insert), array_keys($delete)));
472-
$this->_eventManager->dispatch(
473-
'catalog_category_change_products',
474-
['category' => $category, 'product_ids' => $productIds]
475-
);
476472

477473
$category->setChangedProductIds($productIds);
478474
}
@@ -484,6 +480,10 @@ protected function _saveCategoryProducts($category)
484480
* Setting affected products to category for third party engine index refresh
485481
*/
486482
$productIds = array_keys($insert + $delete + $update);
483+
$this->_eventManager->dispatch(
484+
'catalog_category_change_products',
485+
['category' => $category, 'product_ids' => $productIds]
486+
);
487487
$category->setAffectedProductIds($productIds);
488488
}
489489
return $this;
@@ -1078,7 +1078,6 @@ public function countVisible()
10781078
*/
10791079
public function load($object, $entityId, $attributes = [])
10801080
{
1081-
$this->_attributes = [];
10821081
$select = $this->_getLoadRowSelect($object, $entityId);
10831082
$row = $this->getConnection()->fetchRow($select);
10841083

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontPurchaseProductWithCustomOptionsWithLongValuesTitleTest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
</after>
4242

4343
<!-- Login Customer Storefront -->
44-
45-
<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/>
46-
<fillField userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
47-
<fillField userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
48-
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
44+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
45+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
46+
<argument name="customer" value="$$createCustomer$$"/>
47+
</actionGroup>
48+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
4949

5050
<!-- Checking the correctness of displayed prices for user parameters -->
5151

app/code/Magento/Customer/Test/Mftf/Test/StorefrontDeleteCustomerAddressTest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
<after>
2424
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
2525
</after>
26-
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
27-
<fillField stepKey="fillEmail" userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
28-
<fillField stepKey="fillPassword" userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
29-
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
26+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
27+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
28+
<argument name="customer" value="$$createCustomer$$"/>
29+
</actionGroup>
30+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
3031
<actionGroup ref="EnterCustomerAddressInfoActionGroup" stepKey="enterAddressInfo">
3132
<argument name="Address" value="US_Address_NY"/>
3233
</actionGroup>

app/code/Magento/Customer/Test/Mftf/Test/StorefrontPersistedCustomerLoginTest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
<after>
2525
<deleteData stepKey="deleteCustomer" createDataKey="customer" />
2626
</after>
27-
28-
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
29-
<fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
30-
<fillField stepKey="fillPassword" userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
31-
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
27+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
28+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
29+
<argument name="customer" value="$$customer$$"/>
30+
</actionGroup>
31+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
3232
<see stepKey="seeFirstName" userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
3333
<see stepKey="seeLastName" userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
3434
<see stepKey="seeEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Directory\Setup\Patch\Data;
9+
10+
use Magento\Directory\Setup\DataInstaller;
11+
use Magento\Directory\Setup\DataInstallerFactory;
12+
use Magento\Framework\Setup\ModuleDataSetupInterface;
13+
use Magento\Framework\Setup\Patch\DataPatchInterface;
14+
15+
/**
16+
* Add Bulgaria States
17+
*/
18+
class AddDataForBulgaria implements DataPatchInterface
19+
{
20+
/**
21+
* @var ModuleDataSetupInterface
22+
*/
23+
private $moduleDataSetup;
24+
25+
/**
26+
* @var DataInstallerFactory
27+
*/
28+
private $dataInstallerFactory;
29+
30+
/**
31+
* AddDataForBulgaria constructor.
32+
*
33+
* @param ModuleDataSetupInterface $moduleDataSetup
34+
* @param DataInstallerFactory $dataInstallerFactory
35+
*/
36+
public function __construct(
37+
ModuleDataSetupInterface $moduleDataSetup,
38+
DataInstallerFactory $dataInstallerFactory
39+
) {
40+
$this->moduleDataSetup = $moduleDataSetup;
41+
$this->dataInstallerFactory = $dataInstallerFactory;
42+
}
43+
44+
/**
45+
* @inheritdoc
46+
*/
47+
public function apply()
48+
{
49+
/** @var DataInstaller $dataInstaller */
50+
$dataInstaller = $this->dataInstallerFactory->create();
51+
$dataInstaller->addCountryRegions(
52+
$this->moduleDataSetup->getConnection(),
53+
$this->getDataForBulgaria()
54+
);
55+
56+
return $this;
57+
}
58+
59+
/**
60+
* Bulgarian states data.
61+
*
62+
* @return array
63+
*/
64+
private function getDataForBulgaria()
65+
{
66+
return [
67+
['BG', 'BG-01', 'Blagoevgrad'],
68+
['BG', 'BG-02', 'Burgas'],
69+
['BG', 'BG-03', 'Varna'],
70+
['BG', 'BG-04', 'Veliko Tarnovo'],
71+
['BG', 'BG-05', 'Vidin'],
72+
['BG', 'BG-06', 'Vratsa'],
73+
['BG', 'BG-07', 'Gabrovo'],
74+
['BG', 'BG-08', 'Dobrich'],
75+
['BG', 'BG-09', 'Kardzhali'],
76+
['BG', 'BG-10', 'Kyustendil'],
77+
['BG', 'BG-11', 'Lovech'],
78+
['BG', 'BG-12', 'Montana'],
79+
['BG', 'BG-13', 'Pazardzhik'],
80+
['BG', 'BG-14', 'Pernik'],
81+
['BG', 'BG-15', 'Pleven'],
82+
['BG', 'BG-16', 'Plovdiv'],
83+
['BG', 'BG-17', 'Razgrad'],
84+
['BG', 'BG-18', 'Ruse'],
85+
['BG', 'BG-19', 'Silistra'],
86+
['BG', 'BG-20', 'Sliven'],
87+
['BG', 'BG-21', 'Smolyan'],
88+
['BG', 'BG-22', 'Sofia City'],
89+
['BG', 'BG-23', 'Sofia Province'],
90+
['BG', 'BG-24', 'Stara Zagora'],
91+
['BG', 'BG-25', 'Targovishte'],
92+
['BG', 'BG-26', 'Haskovo'],
93+
['BG', 'BG-27', 'Shumen'],
94+
['BG', 'BG-28', 'Yambol'],
95+
];
96+
}
97+
98+
/**
99+
* @inheritdoc
100+
*/
101+
public static function getDependencies()
102+
{
103+
return [
104+
InitializeDirectoryData::class,
105+
];
106+
}
107+
108+
/**
109+
* @inheritdoc
110+
*/
111+
public function getAliases()
112+
{
113+
return [];
114+
}
115+
}

app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ public function updateItemTaxInfo($quoteItem, $itemTaxDetails, $baseItemTaxDetai
695695
//The price should be base price
696696
$quoteItem->setPrice($baseItemTaxDetails->getPrice());
697697
if ($quoteItem->getCustomPrice() && $this->taxHelper->applyTaxOnCustomPrice()) {
698-
$quoteItem->setCustomPrice($baseItemTaxDetails->getPrice());
698+
$quoteItem->setCustomPrice($itemTaxDetails->getPrice());
699699
}
700700
$quoteItem->setConvertedPrice($itemTaxDetails->getPrice());
701701
$quoteItem->setPriceInclTax($itemTaxDetails->getPriceInclTax());

app/code/Magento/Wishlist/Test/Mftf/Test/ConfigurableProductChildImageShouldBeShownOnWishListTest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/>
5757

5858
<!--Sign in as customer -->
59-
<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/>
60-
<fillField userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
61-
<fillField userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
62-
<waitForElementVisible selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="waitForButton"/>
63-
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
59+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
60+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
61+
<argument name="customer" value="$$customer$$"/>
62+
</actionGroup>
63+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
6464
<see userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeFirstName"/>
6565
<see userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeLastName"/>
6666
<see userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" stepKey="seeEmail"/>

app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeletePersistedWishlistTest.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,11 @@
3434
<deleteData stepKey="deleteCustomer" createDataKey="customer"/>
3535
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
3636
</after>
37-
38-
<amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/>
39-
<waitForPageLoad stepKey="waitForLoginPage"/>
40-
<fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/>
41-
<fillField stepKey="fillPassword" userInput="$$customer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}"/>
42-
<waitForElementVisible stepKey="waitForButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
43-
<click stepKey="clickSignInAccountButton" selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}"/>
37+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
38+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
39+
<argument name="customer" value="$$customer$$"/>
40+
</actionGroup>
41+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
4442
<see stepKey="seeFirstName" userInput="$$customer.firstname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
4543
<see stepKey="seeLastName" userInput="$$customer.lastname$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />
4644
<see stepKey="seeEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerDashboardAccountInformationSection.ContactInformation}}" />

0 commit comments

Comments
 (0)