Skip to content

Commit f0ffe26

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.3-develop latest changes
Accepted Community Pull Requests: - #25597: Resolve No margin between checkbox and icon when choose category in condition in Cart/Catalog Rule issue25596 (by @edenduong) - #25600: Log InvalidRequestException from FrontController validation failure to debug log (by @marcusirgens) - #25606: Fix JS error on cart configure page for configurable products (by @ihor-sviziev) - #25080: Fixed: Undefined index store_view_code. (by @maheshWebkul721) - #25585: M2C-21765 Output N/A if attribute has no value in Compare List (by @ptylek) Fixed GitHub Issues: - #25596: No margin between checkbox and icon when choose category in condition in Cart/Catalog Rule (reported by @edenduong) has been fixed in #25597 by @edenduong in 2.3-develop branch Related commits: 1. 9f5fece - #25601: [Configurable] JS error on product page (reported by @ihor-sviziev) has been fixed in #25606 by @ihor-sviziev in 2.3-develop branch Related commits: 1. d26f8da - #25069: Not clear code in product custom options import (reported by @pusachev) has been fixed in #25080 by @maheshWebkul721 in 2.3-develop branch Related commits: 1. 0f796cc 2. 2138e68 3. 6ea86bb 4. 3e513d0 5. a7f7d0a 6. bf8b1e4 - #25008: Issue in compare page (reported by @deepaktiwariwebkul) has been fixed in #25585 by @ptylek in 2.3-develop branch Related commits: 1. 9ea1d3f 2. 1f010f1
2 parents d0c8f05 + 513d6d0 commit f0ffe26

File tree

6 files changed

+94
-9
lines changed

6 files changed

+94
-9
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@
130130
default :?>
131131
<?php if (is_string($block->getProductAttributeValue($item, $attribute))) :?>
132132
<?= /* @noEscape */ $helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode()) ?>
133+
<?php else : ?>
134+
<?= $block->escapeHtml($helper->productAttribute($item, $block->getProductAttributeValue($item, $attribute), $attribute->getAttributeCode())) ?>
133135
<?php endif; ?>
134136
<?php break;
135137
} ?>

app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,9 @@ protected function _parseCustomOptions($rowData)
20862086
}
20872087
}
20882088
}
2089-
$options[$name][$k]['_custom_option_store'] = $rowData[Product::COL_STORE_VIEW_CODE];
2089+
if (isset($rowData[Product::COL_STORE_VIEW_CODE])) {
2090+
$options[$name][$k][self::COLUMN_STORE] = $rowData[Product::COL_STORE_VIEW_CODE];
2091+
}
20902092
$k++;
20912093
}
20922094
$rowData['custom_options'] = $options;

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/OptionTest.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,77 @@ public function testValidateAmbiguousData(
776776
$this->assertEquals($errors, $resultErrors);
777777
}
778778

779+
/**
780+
* Test for row without store view code field
781+
* @param array $rowData
782+
* @param array $responseData
783+
*
784+
* @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_parseCustomOptions
785+
* @dataProvider validateRowStoreViewCodeFieldDataProvider
786+
*/
787+
public function testValidateRowDataForStoreViewCodeField($rowData, $responseData)
788+
{
789+
$reflection = new \ReflectionClass(\Magento\CatalogImportExport\Model\Import\Product\Option::class);
790+
$reflectionMethod = $reflection->getMethod('_parseCustomOptions');
791+
$reflectionMethod->setAccessible(true);
792+
$result = $reflectionMethod->invoke($this->model, $rowData);
793+
$this->assertEquals($responseData, $result);
794+
}
795+
796+
/**
797+
* Data provider for test of method _parseCustomOptions
798+
*
799+
* @return array
800+
*/
801+
public function validateRowStoreViewCodeFieldDataProvider()
802+
{
803+
return [
804+
'with_store_view_code' => [
805+
'$rowData' => [
806+
'store_view_code' => '',
807+
'custom_options' =>
808+
'name=Test Field Title,type=field,required=1;sku=1-text,price=0,price_type=fixed'
809+
],
810+
'$responseData' => [
811+
'store_view_code' => '',
812+
'custom_options' => [
813+
'Test Field Title' => [
814+
[
815+
'name' => 'Test Field Title',
816+
'type' => 'field',
817+
'required' => '1',
818+
'sku' => '1-text',
819+
'price' => '0',
820+
'price_type' => 'fixed',
821+
'_custom_option_store' => ''
822+
]
823+
]
824+
]
825+
],
826+
],
827+
'without_store_view_code' => [
828+
'$rowData' => [
829+
'custom_options' =>
830+
'name=Test Field Title,type=field,required=1;sku=1-text,price=0,price_type=fixed'
831+
],
832+
'$responseData' => [
833+
'custom_options' => [
834+
'Test Field Title' => [
835+
[
836+
'name' => 'Test Field Title',
837+
'type' => 'field',
838+
'required' => '1',
839+
'sku' => '1-text',
840+
'price' => '0',
841+
'price_type' => 'fixed'
842+
]
843+
]
844+
]
845+
],
846+
]
847+
];
848+
}
849+
779850
/**
780851
* Data provider of row data and errors
781852
*

app/code/Magento/Msrp/view/base/web/js/msrp.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,11 @@ define([
352352
$(this.options.mapInfoLinks).show();
353353

354354
if (useDefaultPrice || !this.wasOpened) {
355-
this.$popup.find(this.options.msrpLabelId).html(options.msrpPrice);
356-
this.$popup.find(this.options.priceLabelId).html(options.realPrice);
355+
if (this.$popup) {
356+
this.$popup.find(this.options.msrpLabelId).html(options.msrpPrice);
357+
this.$popup.find(this.options.priceLabelId).html(options.realPrice);
358+
}
359+
357360
$(this.options.displayPriceElement).html(msrpPrice);
358361
this.wasOpened = true;
359362
}

app/design/adminhtml/Magento/backend/web/css/styles-old.less

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,10 @@
18271827
background-image: url(../images/fam_application_form_delete.png);
18281828
}
18291829

1830+
.x-tree-node .x-tree-node-el input[type=checkbox] {
1831+
margin-left: 3px;
1832+
}
1833+
18301834
//
18311835
// Styles for "js" tooltip with positionings
18321836
// --------------------------------------
@@ -3958,15 +3962,15 @@
39583962
.grid tr.headings th > span {
39593963
white-space: normal;
39603964
}
3961-
3965+
39623966
.field {
39633967
&.field-subscription {
39643968
.admin__field-label {
39653969
margin-left: 10px;
39663970
float: none;
39673971
cursor: pointer;
3968-
}
3969-
3972+
}
3973+
39703974
.admin__field-control {
39713975
float: left;
39723976
width: auto;

lib/internal/Magento/Framework/App/FrontController.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Front controller responsible for dispatching application requests
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/
@@ -17,6 +15,8 @@
1715
use Magento\Framework\App\Request\Http as HttpRequest;
1816

1917
/**
18+
* Front controller responsible for dispatching application requests
19+
*
2020
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2121
*/
2222
class FrontController implements FrontControllerInterface
@@ -116,6 +116,8 @@ public function dispatch(RequestInterface $request)
116116
}
117117

118118
/**
119+
* Process (validate and dispatch) the incoming request
120+
*
119121
* @param HttpRequest $request
120122
* @param ActionInterface $actionInstance
121123
* @throws NotFoundException
@@ -141,7 +143,8 @@ private function processRequest(
141143
//Validation failed - processing validation results.
142144
$this->logger->debug(
143145
'Request validation failed for action "'
144-
.get_class($actionInstance) .'"'
146+
. get_class($actionInstance) . '"',
147+
["exception" => $exception]
145148
);
146149
$result = $exception->getReplaceResult();
147150
if ($messages = $exception->getMessages()) {

0 commit comments

Comments
 (0)