Skip to content

Commit 0e8428c

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop Minor Fixes
Accepted Public Pull Requests: - #21785: [Forwardport] [Checkout] Fix clearing admin quote address when removing all items (by @eduard13) - #21469: Update price-bundle.js so that correct tier price is calculated while displaying in bundle product (by @adarshkhatri) - #21751: fix #21750 remove translation of product attribute label (by @Karlasa) - #21774: MSI: Add deprecation message to CatalogInventory SPIs (by @lbajsarowicz) - #21575: Fix for issue #21510: Can't access backend indexers page after creating a custom index (by @ccasciotti) - #21288: #12396: Total Amount cart rule without tax (by @AleksLi) - magento-commerce/magento-functional-tests-migration#679: #417 Removed unnecessary default values in action groups (by @hws47a) - magento-commerce/magento-functional-tests-migration#678: Convert FlushStaticFilesCacheButtonVisibilityTest to MFTF (by @Leandry) - magento-commerce/magento-functional-tests-migration#676: Convert VerifyDisabledCustomerGroupFieldTest to MFTF #664 (by @Michalk39) Fixed GitHub Issues: - #21467: Tier price of simple item not working in Bundle product (reported by @adarshkhatri) has been fixed in #21469 by @adarshkhatri in 2.3-develop branch Related commits: 1. caabef2 2. 4c1c653 3. d4dd2e6 4. e7589ad 5. 6f49b07 6. 0332391 - #21750: Product attribute labels are translated (reported by @Karlasa) has been fixed in #21751 by @Karlasa in 2.3-develop branch Related commits: 1. a07eda3 - #21510: Can't access backend indexers page after creating a custom index (reported by @ccasciotti) has been fixed in #21575 by @ccasciotti in 2.3-develop branch Related commits: 1. 318425f 2. 486e21c 3. 409e00e 4. 0acd6b6 - #12396: "Total Amount" cart rule without tax (reported by @Chei20) has been fixed in #21288 by @AleksLi in 2.3-develop branch Related commits: 1. 6ae859a 2. c25656b 3. 23ed015 4. e9389ee 5. 571f055
2 parents 2e863d6 + 940163e commit 0e8428c

File tree

22 files changed

+178
-18
lines changed

22 files changed

+178
-18
lines changed

app/code/Magento/Bundle/view/base/web/js/price-bundle.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,17 @@ define([
374374
function applyTierPrice(oneItemPrice, qty, optionConfig) {
375375
var tiers = optionConfig.tierPrice,
376376
magicKey = _.keys(oneItemPrice)[0],
377+
tiersFirstKey = _.keys(optionConfig)[0],
377378
lowest = false;
378379

380+
if (!tiers) {//tiers is undefined when options has only one option
381+
tiers = optionConfig[tiersFirstKey].tierPrice;
382+
}
383+
384+
tiers.sort(function (a, b) {//sorting based on "price_qty"
385+
return a['price_qty'] - b['price_qty'];
386+
});
387+
379388
_.each(tiers, function (tier, index) {
380389
if (tier['price_qty'] > qty) {
381390
return;

app/code/Magento/Catalog/view/frontend/templates/product/view/attributes.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<tbody>
2424
<?php foreach ($_additional as $_data): ?>
2525
<tr>
26-
<th class="col label" scope="row"><?= $block->escapeHtml(__($_data['label'])) ?></th>
27-
<td class="col data" data-th="<?= $block->escapeHtml(__($_data['label'])) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
26+
<th class="col label" scope="row"><?= $block->escapeHtml($_data['label']) ?></th>
27+
<td class="col data" data-th="<?= $block->escapeHtml($_data['label']) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
2828
</tr>
2929
<?php endforeach; ?>
3030
</tbody>

app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,33 @@
77

88
/**
99
* Interface StockRegistryProviderInterface
10+
*
11+
* @deprecated 2.3.0 Replaced with Multi Source Inventory
12+
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
13+
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
1014
*/
1115
interface StockRegistryProviderInterface
1216
{
1317
/**
18+
* Get stock.
19+
*
1420
* @param int $scopeId
1521
* @return \Magento\CatalogInventory\Api\Data\StockInterface
1622
*/
1723
public function getStock($scopeId);
1824

1925
/**
26+
* Get stock item.
27+
*
2028
* @param int $productId
2129
* @param int $scopeId
2230
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
2331
*/
2432
public function getStockItem($productId, $scopeId);
2533

2634
/**
35+
* Get stock status.
36+
*
2737
* @param int $productId
2838
* @param int $scopeId
2939
* @return \Magento\CatalogInventory\Api\Data\StockStatusInterface

app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,32 @@
99

1010
/**
1111
* Interface StockStateProviderInterface
12+
*
13+
* @deprecated 2.3.0 Replaced with Multi Source Inventory
14+
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
15+
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
1216
*/
1317
interface StockStateProviderInterface
1418
{
1519
/**
20+
* Verify stock.
21+
*
1622
* @param StockItemInterface $stockItem
1723
* @return bool
1824
*/
1925
public function verifyStock(StockItemInterface $stockItem);
2026

2127
/**
28+
* Verify notification.
29+
*
2230
* @param StockItemInterface $stockItem
2331
* @return bool
2432
*/
2533
public function verifyNotification(StockItemInterface $stockItem);
2634

2735
/**
36+
* Validate quote qty.
37+
*
2838
* @param StockItemInterface $stockItem
2939
* @param int|float $itemQty
3040
* @param int|float $qtyToCheck
@@ -44,8 +54,9 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $itemQty, $qtyT
4454
public function checkQty(StockItemInterface $stockItem, $qty);
4555

4656
/**
47-
* Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions
48-
* or original qty if such value does not exist
57+
* Returns suggested qty or original qty if such value does not exist.
58+
*
59+
* Suggested qty satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions.
4960
*
5061
* @param StockItemInterface $stockItem
5162
* @param int|float $qty
@@ -54,6 +65,8 @@ public function checkQty(StockItemInterface $stockItem, $qty);
5465
public function suggestQty(StockItemInterface $stockItem, $qty);
5566

5667
/**
68+
* Check qty increments.
69+
*
5770
* @param StockItemInterface $stockItem
5871
* @param int|float $qty
5972
* @return \Magento\Framework\DataObject

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,4 @@
4949
</argument>
5050
</arguments>
5151
</type>
52-
<type name="Magento\Quote\Model\Quote">
53-
<plugin name="clear_addresses_after_product_delete" type="Magento\Checkout\Plugin\Model\Quote\ResetQuoteAddresses"/>
54-
</type>
5552
</config>

app/code/Magento/Checkout/etc/frontend/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,7 @@
9696
</argument>
9797
</arguments>
9898
</type>
99+
<type name="Magento\Quote\Model\Quote">
100+
<plugin name="clear_addresses_after_product_delete" type="Magento\Checkout\Plugin\Model\Quote\ResetQuoteAddresses"/>
101+
</type>
99102
</config>

app/code/Magento/Customer/Test/Mftf/Data/CustomerGroupData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="NotLoggedInCustomerGroup" type="customerGroup">
12+
<data key="id">0</data>
13+
<data key="code">NOT LOGGED IN</data>
14+
<data key="tax_class_id">3</data>
15+
<data key="tax_class_name">Retail Customer</data>
16+
</entity>
1117
<entity name="GeneralCustomerGroup" type="customerGroup">
1218
<data key="code">General</data>
1319
<data key="tax_class_id">3</data>

app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerGroupMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
<element name="selectFirstRow" type="button" selector="//button[@class='action-select']"/>
1616
<element name="deleteBtn" type="button" selector="//*[text()='Delete']"/>
1717
<element name="clearAllBtn" type="button" selector="//button[text()='Clear all']"/>
18+
<element name="editButtonByCustomerGroupCode" type="button" selector="//tr[.//td[count(//th[./*[.='Group']]/preceding-sibling::th) + 1][./*[.='{{code}}']]]//a[contains(@href, '/edit/')]" parameterized="true" />
1819
</section>
1920
</sections>
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="VerifyDisabledCustomerGroupFieldTest">
12+
<annotations>
13+
<stories value="Check that field is disabled in system Customer Group"/>
14+
<title value="Check that field is disabled in system Customer Group"/>
15+
<description value="Checks that customer_group_code field is disabled in NOT LOGGED IN Customer Group"/>
16+
<testCaseId value="MC-14206"/>
17+
<severity value="CRITICAL"/>
18+
<group value="customers"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
22+
<!-- Steps -->
23+
<!-- 1. Login to backend as admin user -->
24+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
25+
<waitForPageLoad stepKey="waitForAdminPageLoad" />
26+
27+
<!-- 2. Navigate to Customers > Customer Groups -->
28+
<amOnPage url="{{AdminCustomerGroupPage.url}}" stepKey="amOnCustomerGroupPage" />
29+
<waitForPageLoad stepKey="waitForCustomerGroupsPageLoad" />
30+
31+
<!-- 3. Select system Customer Group specified in data set from grid -->
32+
<click selector="{{AdminCustomerGroupMainSection.editButtonByCustomerGroupCode(NotLoggedInCustomerGroup.code)}}" stepKey="clickOnEditCustomerGroup" />
33+
34+
<!-- 4. Perform all assertions -->
35+
<seeInField selector="{{AdminNewCustomerGroupSection.groupName}}" userInput="{{NotLoggedInCustomerGroup.code}}" stepKey="seeNotLoggedInTextInGroupName" />
36+
<assertElementContainsAttribute selector="{{AdminNewCustomerGroupSection.groupName}}" attribute="disabled" expectedValue="true" stepKey="checkIfGroupNameIsDisabled" />
37+
</test>
38+
</tests>

app/code/Magento/Indexer/Model/Indexer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Indexer\Model;
78

89
use Magento\Framework\Indexer\ActionFactory;
@@ -14,6 +15,8 @@
1415
use Magento\Framework\Indexer\StructureFactory;
1516

1617
/**
18+
* Indexer model.
19+
*
1720
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1821
*/
1922
class Indexer extends \Magento\Framework\DataObject implements IndexerInterface
@@ -361,7 +364,7 @@ public function getLatestUpdated()
361364
return $this->getView()->getUpdated();
362365
}
363366
}
364-
return $this->getState()->getUpdated();
367+
return $this->getState()->getUpdated() ?: '';
365368
}
366369

367370
/**

0 commit comments

Comments
 (0)