Skip to content

Commit 73de315

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-19250
2 parents a0ecaeb + 7cf99d1 commit 73de315

File tree

52 files changed

+1730
-9016
lines changed

Some content is hidden

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

52 files changed

+1730
-9016
lines changed
Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,38 @@
1-
AdvancedSearch module introduces advanced search functionality and provides interfaces that allow to implement this functionality by 3rd party search engines
1+
# Magento_AdvancedSearch module
2+
The Magento_AdvancedSearch module introduces advanced search functionality and provides interfaces that allow third-party search engines to implement this functionality.
3+
4+
## Installation details
5+
6+
Before disabling or uninstalling this module, note that the following modules depends on this module:
7+
- Magento_Elasticsearch
8+
- Magento_Elasticsearch6
9+
10+
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
11+
12+
## Extensibility
13+
14+
Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
15+
16+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedSearch module.
17+
18+
### Events
19+
20+
This module observes the following event:
21+
22+
- `catalogsearch_query_save_after` in the `Magento\AdvancedSearch\Model\Recommendations\SaveSearchQueryRelationsObserver` file.
23+
24+
For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events).
25+
26+
### Layouts
27+
28+
The module interacts with the following layout handles in the `view/adminhtml/layout` directory:
29+
30+
- `catalog_search_block`
31+
- `catalog_search_edit`
32+
- `catalog_search_relatedgrid`
33+
34+
The module interacts with the following layout handles in the `view/frontend/layout` directory:
35+
36+
- `catalogsearch_result_index`
37+
38+
For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html).
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
# Authorization
1+
# Magento_Authorization module
22

3-
**Authorization** enables management of access control list roles and
4-
rules in the application.
3+
The Magento_Authorization module enables management of access control list roles and rules in the application.
4+
5+
## Installation details
6+
7+
The Magento_AdminNotification module creates the following tables in the database:
8+
9+
- `authorization_role`
10+
- `authorization_rule`
11+
12+
Before disabling or uninstalling this module, note that the Magento_GraphQl module depends on this module.
13+
14+
For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html).
15+
16+
## Extensibility
17+
18+
Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html).
19+
20+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorization module.

app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
namespace Magento\Backend\Block\Widget\Grid\Massaction;
87

8+
use Magento\Framework\Data\Collection\AbstractDb;
9+
use Magento\Framework\DB\Select;
10+
911
/**
1012
* Grid widget massaction block
1113
*
1214
* @api
1315
* @deprecated 100.2.0 in favour of UI component implementation
1416
* @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors
1517
* @method boolean getHideFormElement()
16-
* @author Magento Core Team <core@magentocommerce.com>
18+
* @author Magento Core Team <core@magentocommerce.com>
1719
* @TODO MAGETWO-31510: Remove deprecated class
1820
* @since 100.0.2
1921
*/
@@ -156,7 +158,7 @@ public function getItemsJson()
156158
*/
157159
public function getCount()
158160
{
159-
return sizeof($this->_items);
161+
return count($this->_items);
160162
}
161163

162164
/**
@@ -248,6 +250,8 @@ public function getApplyButtonHtml()
248250
}
249251

250252
/**
253+
* Get mass action javascript code
254+
*
251255
* @return string
252256
*/
253257
public function getJavaScript()
@@ -264,6 +268,8 @@ public function getJavaScript()
264268
}
265269

266270
/**
271+
* Get grid ids in JSON format
272+
*
267273
* @return string
268274
*/
269275
public function getGridIdsJson()
@@ -281,15 +287,24 @@ public function getGridIdsJson()
281287
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
282288
}
283289

284-
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
285-
286-
if (!empty($gridIds)) {
287-
return join(",", $gridIds);
290+
if ($allIdsCollection instanceof AbstractDb) {
291+
$idsSelect = clone $allIdsCollection->getSelect();
292+
$idsSelect->reset(Select::ORDER);
293+
$idsSelect->reset(Select::LIMIT_COUNT);
294+
$idsSelect->reset(Select::LIMIT_OFFSET);
295+
$idsSelect->reset(Select::COLUMNS);
296+
$idsSelect->columns($massActionIdField);
297+
$idList = $allIdsCollection->getConnection()->fetchCol($idsSelect);
298+
} else {
299+
$idList = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
288300
}
289-
return '';
301+
302+
return implode(',', $idList);
290303
}
291304

292305
/**
306+
* Retrieve massaction block js object name
307+
*
293308
* @return string
294309
*/
295310
public function getHtmlId()

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@
145145
<field id="allow_symlink" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
146146
<label>Allow Symlinks</label>
147147
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
148-
<comment>Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.</comment>
148+
<comment>
149+
<![CDATA[<strong style="color:red">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.]]>
150+
</comment>
149151
</field>
150152
<field id="minify_html" translate="label comment" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
151153
<label>Minify Html</label>
@@ -435,7 +437,7 @@
435437
<label>Admin Session Lifetime (seconds)</label>
436438
<comment>Please enter at least 60 and at most 31536000 (one year).</comment>
437439
<backend_model>Magento\Backend\Model\Config\SessionLifetime\BackendModel</backend_model>
438-
<validate>validate-digits</validate>
440+
<validate>validate-digits validate-digits-range digits-range-60-31536000</validate>
439441
</field>
440442
</group>
441443
<group id="dashboard" translate="label" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ Debug,Debug
333333
"Add Block Names to Hints","Add Block Names to Hints"
334334
"Template Settings","Template Settings"
335335
"Allow Symlinks","Allow Symlinks"
336-
"Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.","Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk."
336+
"<strong style=""color:red"">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.","<strong style=""color:red"">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk."
337337
"Minify Html","Minify Html"
338338
"Minification is not applied in developer mode.","Minification is not applied in developer mode."
339339
"Translate Inline","Translate Inline"

app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
<li>
2222
<span><?= $block->escapeHtml(__('Return to ')) ?>
2323
<?php if (isset($_SERVER['HTTP_REFERER'])) : ?>
24-
<a href="<?= $block->escapeUrl(__($_SERVER['HTTP_REFERER'])) ?>">
24+
<a href="<?= $block->escapeUrl($_SERVER['HTTP_REFERER']) ?>">
2525
<?= $block->escapeHtml(__('previous page')) ?></a><?= $block->escapeHtml(__('.')) ?>
2626
<?php else : ?>
27-
<a href="<?= $block->escapeHtmlAttr(__('javascript:history.back()')) ?>">
27+
<a href="<?= $block->escapeHtmlAttr('javascript:history.back()') ?>">
2828
<?= $block->escapeHtml(__('previous page')) ?></a><?= $block->escapeHtml(__('.')) ?>
2929
<?php endif ?>
3030
</span>

app/code/Magento/Bundle/Plugin/UpdatePriceInQuoteItemOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function afterCalcRowTotal(OrigQuoteItem $subject, AbstractItem $result)
4242
{
4343
$bundleAttributes = $result->getProduct()->getCustomOption('bundle_selection_attributes');
4444
if ($bundleAttributes !== null) {
45-
$actualPrice = $result->getPrice();
45+
$actualPrice = (float)$result->getPrice();
4646
$parsedValue = $this->serializer->unserialize($bundleAttributes->getValue());
4747
if (is_array($parsedValue) && array_key_exists('price', $parsedValue)) {
4848
$parsedValue['price'] = $actualPrice;
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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="StorefrontSpecialPriceBundleProductInCartTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Add bundle product to cart on storefront"/>
14+
<title value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/>
15+
<description value="Customer should not be able to add a Bundle Product to the cart when added a special price for associated products"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-19134"/>
18+
<useCaseId value="MC-18963"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<!-- Create the Simple product with Special price -->
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct"/>
24+
<createData entity="specialProductPrice2" stepKey="specialPriceToSimpleProduct">
25+
<requiredEntity createDataKey="simpleProduct"/>
26+
</createData>
27+
<!-- Create the bundle product -->
28+
<createData entity="ApiBundleProduct" stepKey="bundleProduct"/>
29+
<createData entity="RadioButtonsOption" stepKey="bundleOption">
30+
<requiredEntity createDataKey="bundleProduct"/>
31+
<field key="required">true</field>
32+
</createData>
33+
<createData entity="ApiBundleLink" stepKey="linkOptionToProduct">
34+
<requiredEntity createDataKey="bundleProduct"/>
35+
<requiredEntity createDataKey="bundleOption"/>
36+
<requiredEntity createDataKey="simpleProduct"/>
37+
</createData>
38+
<!-- Run reindex stock status -->
39+
<magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/>
40+
</before>
41+
<after>
42+
<deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
43+
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
44+
</after>
45+
<!-- Go to storefront BundleProduct -->
46+
<amOnPage url="{{StorefrontProductPage.url($$bundleProduct.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/>
47+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartFirstTime">
48+
<argument name="productName" value="$$bundleProduct.name$$"/>
49+
</actionGroup>
50+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addProductToCartSecondTime">
51+
<argument name="productName" value="$$bundleProduct.name$$"/>
52+
</actionGroup>
53+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
54+
<actionGroup ref="AssertStorefrontMiniCartSubtotalActionGroup" stepKey="assertSubtotal">
55+
<argument name="subtotal" value="$111.10"/>
56+
</actionGroup>
57+
</test>
58+
</tests>

app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ private function switchTables(): void
152152
*
153153
* @return $this
154154
*/
155-
public function execute(): self
155+
public function execute(): Full
156156
{
157157
$this->createTables();
158158
$this->clearReplicaTables();

0 commit comments

Comments
 (0)