Skip to content

Commit 0c76390

Browse files
author
Oleksandr Gorkun
committed
Merge branch '2.3-develop' of https://github.com/magento/magento2ce into MAGETWO-93270
2 parents 07d6347 + f01227c commit 0c76390

File tree

59 files changed

+697
-587
lines changed

Some content is hidden

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

59 files changed

+697
-587
lines changed

app/code/Magento/Braintree/Setup/Patch/Data/ConvertSerializedDataToJson.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Magento\Framework\Setup\Patch\PatchVersionInterface;
1313

1414
/**
15-
* Convert data fro php native serialized data to JSON.
15+
* Convert data from php native serialized data to JSON.
1616
*/
1717
class ConvertSerializedDataToJson implements DataPatchInterface, PatchVersionInterface
1818
{

app/code/Magento/Braintree/view/frontend/web/template/payment/paypal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" />
1313
<label class="label" data-bind="attr: {'for': getCode()}">
1414
<!-- PayPal Logo -->
15-
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')}"
15+
<img data-bind="attr: {src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')}, title: $t('Acceptance Mark')}"
1616
class="payment-icon"/>
1717
<!-- PayPal Logo -->
1818
<span text="getTitle()"></span>

app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleSelectionPriceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function setupSelectionPrice($useRegularPrice = false)
121121
}
122122

123123
/**
124-
* test fro method getValue with dynamic productType
124+
* Test for method getValue with dynamic productType
125125
*
126126
* @param bool $useRegularPrice
127127
* @dataProvider useRegularPriceDataProvider

app/code/Magento/Captcha/view/frontend/web/template/checkout/captcha.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<div class="control captcha-image">
1616
<img data-bind="attr: {
1717
alt: $t('Please type the letters and numbers below'),
18+
title: $t('Please type the letters and numbers below'),
1819
height: imageHeight(),
1920
src: getImageSource(),
2021
}"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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\Catalog\Model\Product\Configuration\Item;
9+
10+
use Magento\Catalog\Api\Data\ProductInterface;
11+
use Magento\Framework\App\ObjectManager;
12+
13+
/**
14+
* {@inheritdoc}
15+
*/
16+
class ItemResolverComposite implements ItemResolverInterface
17+
{
18+
/** @var string[] */
19+
private $itemResolvers = [];
20+
21+
/** @var ItemResolverInterface[] */
22+
private $itemResolversInstances = [];
23+
24+
/**
25+
* @param string[] $itemResolvers
26+
*/
27+
public function __construct(array $itemResolvers)
28+
{
29+
$this->itemResolvers = $itemResolvers;
30+
}
31+
32+
/**
33+
* {@inheritdoc}
34+
*/
35+
public function getFinalProduct(ItemInterface $item) : ProductInterface
36+
{
37+
$finalProduct = $item->getProduct();
38+
foreach ($this->itemResolvers as $resolver) {
39+
$resolvedProduct = $this->getItemResolverInstance($resolver)->getFinalProduct($item);
40+
if ($resolvedProduct !== $finalProduct) {
41+
$finalProduct = $resolvedProduct;
42+
break;
43+
}
44+
}
45+
return $finalProduct;
46+
}
47+
48+
/**
49+
* Get the instance of the item resolver by class name.
50+
*
51+
* @param string $className
52+
* @return ItemResolverInterface
53+
*/
54+
private function getItemResolverInstance(string $className) : ItemResolverInterface
55+
{
56+
if (!isset($this->itemResolversInstances[$className])) {
57+
$this->itemResolversInstances[$className] = ObjectManager::getInstance()->get($className);
58+
}
59+
return $this->itemResolversInstances[$className];
60+
}
61+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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\Catalog\Model\Product\Configuration\Item;
9+
10+
use Magento\Catalog\Api\Data\ProductInterface;
11+
12+
/**
13+
* Resolves the product from a configured item.
14+
*
15+
* @api
16+
*/
17+
interface ItemResolverInterface
18+
{
19+
/**
20+
* Get the final product from a configured item by product type and selection.
21+
*
22+
* @param ItemInterface $item
23+
* @return ProductInterface
24+
*/
25+
public function getFinalProduct(ItemInterface $item) : ProductInterface;
26+
}

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,15 @@
197197
<data key="filename">magento-logo</data>
198198
<data key="file_extension">png</data>
199199
</entity>
200+
<entity name="TestImageNew" type="image">
201+
<data key="title" unique="suffix">magento-again</data>
202+
<data key="price">1.00</data>
203+
<data key="file_type">Upload File</data>
204+
<data key="shareable">Yes</data>
205+
<data key="file">magento-again.jpg</data>
206+
<data key="filename">magento-again</data>
207+
<data key="file_extension">jpg</data>
208+
</entity>
200209
<entity name="ProductWithUnicode" type="product">
201210
<data key="sku" unique="suffix">&#38657;&#20135;&#21697;</data>
202211
<data key="type_id">simple</data>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
<element name="firstRow" type="button" selector="tr.data-row:nth-of-type(1)"/>
2929
<element name="productGridCheckboxOnRow" type="checkbox" selector="//*[@id='container']//tr[{{row}}]/td[1]//input" parameterized="true"/>
3030
<element name="productGridNameProduct" type="input" selector="//tbody//tr//td//div[contains(., '{{var1}}')]" parameterized="true" timeout="30"/>
31+
<element name="selectRowBasedOnName" type="input" selector="//td/div[text()='{{var1}}']" parameterized="true"/>
3132
</section>
3233
</sections>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<clone_fields>1</clone_fields>
9999
<clone_model>Magento\Catalog\Model\Config\CatalogClone\Media\Image</clone_model>
100100
<field id="placeholder" type="image" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
101-
<label></label>
102101
<backend_model>Magento\Config\Model\Config\Backend\Image</backend_model>
103102
<upload_dir config="system/filesystem/media" scope_info="1">catalog/product/placeholder</upload_dir>
104103
<base_url type="media" scope_info="1">catalog/product/placeholder</base_url>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
<preference for="Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoInterface" type="Magento\Catalog\Model\ProductRender\FormattedPriceInfo" />
7171
<preference for="Magento\Framework\Indexer\BatchProviderInterface" type="Magento\Framework\Indexer\BatchProvider" />
7272
<preference for="Magento\Catalog\Model\Indexer\Product\Price\UpdateIndexInterface" type="Magento\Catalog\Model\Indexer\Product\Price\InvalidateIndex" />
73-
<preference for="\Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface" type="\Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory" />
73+
<preference for="Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface" type="Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory" />
74+
<preference for="Magento\Catalog\Model\Product\Configuration\Item\ItemResolverInterface" type="Magento\Catalog\Model\Product\Configuration\Item\ItemResolverComposite" />
7475
<type name="Magento\Customer\Model\ResourceModel\Visitor">
7576
<plugin name="catalogLog" type="Magento\Catalog\Model\Plugin\Log" />
7677
</type>

0 commit comments

Comments
 (0)