Skip to content

Commit 2fc851f

Browse files
Merge branch '2.3-develop' into MAGETWO-93286
2 parents 1e6f2e6 + 50503f2 commit 2fc851f

File tree

112 files changed

+2204
-995
lines changed

Some content is hidden

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

112 files changed

+2204
-995
lines changed

app/code/Magento/Catalog/Controller/Product/Compare/Add.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ public function execute()
3636
$productName = $this->_objectManager->get(
3737
\Magento\Framework\Escaper::class
3838
)->escapeHtml($product->getName());
39-
$this->messageManager->addSuccess(__('You added product %1 to the comparison list.', $productName));
39+
$this->messageManager->addComplexSuccessMessage(
40+
'addCompareSuccessMessage',
41+
[
42+
'product_name' => $productName,
43+
'compare_list_url' => $this->_url->getUrl('catalog/product_compare')
44+
]
45+
);
46+
4047
$this->_eventManager->dispatch('catalog_product_compare_add_product', ['product' => $product]);
4148
}
4249

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ protected function getSelect($entityIds = null, $type = null)
456456
$specialFromExpr = "{$specialFrom} IS NULL OR {$specialFromDate} <= {$currentDate}";
457457
$specialToExpr = "{$specialTo} IS NULL OR {$specialToDate} >= {$currentDate}";
458458
$specialPriceExpr = $connection->getCheckSql(
459-
"{$specialPrice} IS NOT NULL AND {$specialFromExpr} AND {$specialToExpr}",
459+
"{$specialPrice} IS NOT NULL AND ({$specialFromExpr}) AND ({$specialToExpr})",
460460
$specialPrice,
461461
$maxUnsignedBigint
462462
);
@@ -547,7 +547,7 @@ protected function _prepareCustomOptionPriceTable()
547547
* @param IndexTableStructure $finalPriceTable
548548
* @return void
549549
*/
550-
private function modifyPriceIndex(IndexTableStructure $finalPriceTable)
550+
private function modifyPriceIndex(IndexTableStructure $finalPriceTable) : void
551551
{
552552
foreach ($this->priceModifiers as $priceModifier) {
553553
$priceModifier->modifyPrice($finalPriceTable);
@@ -862,6 +862,11 @@ private function getTotalTierPriceExpression(\Zend_Db_Expr $priceExpression)
862862
);
863863
}
864864

865+
/**
866+
* @param string $tableAlias
867+
* @param \Zend_Db_Expr $priceExpression
868+
* @return \Zend_Db_Expr
869+
*/
865870
private function getTierPriceExpressionForTable($tableAlias, \Zend_Db_Expr $priceExpression)
866871
{
867872
return $this->getConnection()->getCheckSql(

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductPageSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<element name="qtyInput" type="button" selector="input.input-text.qty"/>
1313
<element name="addToCartBtn" type="button" selector="button.action.tocart.primary" timeout="30"/>
1414
<element name="successMsg" type="button" selector="div.message-success"/>
15+
<element name="errorMsg" type="button" selector="div.message-error"/>
1516
<element name="alertMessage" type="text" selector=".page.messages [role=alert]"/>
1617
<element name="messagesBlock" type="text" selector=".page.messages"/>
1718
<element name="addToWishlist" type="button" selector="//a[@class='action towishlist']" timeout="30"/>

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@
7979
<argument name="typeId" xsi:type="string">recently_compared_product</argument>
8080
</arguments>
8181
</virtualType>
82+
<type name="Magento\Framework\View\Element\Message\MessageConfigurationsPool">
83+
<arguments>
84+
<argument name="configurationsMap" xsi:type="array">
85+
<item name="addCompareSuccessMessage" xsi:type="array">
86+
<item name="renderer" xsi:type="const">\Magento\Framework\View\Element\Message\Renderer\BlockRenderer::CODE</item>
87+
<item name="data" xsi:type="array">
88+
<item name="template" xsi:type="string">Magento_Catalog::messages/addCompareSuccessMessage.phtml</item>
89+
</item>
90+
</item>
91+
</argument>
92+
</arguments>
93+
</type>
8294
<type name="Magento\Catalog\Block\Product\View\Gallery">
8395
<arguments>
8496
<argument name="galleryImagesConfig" xsi:type="array">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
// @codingStandardsIgnoreFile
7+
/** @var \Magento\Framework\View\Element\Template $block */
8+
?>
9+
<?= $block->escapeHtml(__(
10+
'You added product %1 to the <a href="%2">comparison list</a>.',
11+
$block->getData('product_name'),
12+
$block->getData('compare_list_url')),
13+
['a']
14+
);

app/code/Magento/CatalogInventory/Model/Plugin/PriceIndexUpdater.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(Processor $priceIndexProcessor)
3636
* @return Item
3737
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3838
*/
39-
public function afterSave(Item $subject, Item $result, AbstractModel $model)
39+
public function afterSave(Item $subject, Item $result, AbstractModel $model): Item
4040
{
4141
$fields = [
4242
'is_in_stock',
@@ -55,7 +55,7 @@ public function afterSave(Item $subject, Item $result, AbstractModel $model)
5555

5656
/**
5757
* @param Item $subject
58-
* @param $result
58+
* @param mixed $result
5959
* @param int $websiteId
6060
* @return void
6161
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -67,7 +67,7 @@ public function afterUpdateSetOutOfStock(Item $subject, $result, int $websiteId)
6767

6868
/**
6969
* @param Item $subject
70-
* @param $result
70+
* @param mixed $result
7171
* @param int $websiteId
7272
* @return void
7373
* @SuppressWarnings(PHPMD.UnusedFormalParameter)

app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@
571571
<settings>
572572
<scopeLabel>[GLOBAL]</scopeLabel>
573573
<validation>
574+
<rule name="validate-integer" xsi:type="boolean">true</rule>
574575
<rule name="validate-number" xsi:type="boolean">true</rule>
575576
</validation>
576577
<label translate="true">Qty Increments</label>

app/code/Magento/CatalogInventory/view/adminhtml/web/js/components/qty-validator-changer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ define([
2020
var isDigits = value !== 1;
2121

2222
this.validation['validate-integer'] = isDigits;
23-
this.validation['validate-digits'] = isDigits;
2423
this.validation['less-than-equals-to'] = isDigits ? 99999999 : 99999999.9999;
2524
this.validate();
2625
}

app/code/Magento/CatalogUrlRewrite/Plugin/Store/Block/Switcher.php

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

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

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

0 commit comments

Comments
 (0)