Skip to content

Commit c59e602

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #19355: [Backport] Changed get product way in blocks with related products (by @gelanivishal) - #19357: [Backport] #13157 - Last Ordered Items block - bad js code (by @gelanivishal) - #19296: Fix issue 19286 - Wrong pager style (by @speedy008) - #18621: 18615 updates structure for last_trans_id to be varchar 255 which is � (by @iancassidyweb) - #14485: Fix for Issue #4136, MAGETWO-53440 (by @vasilii-b) - #18905: Fix the issue with missing asterisk for admin required fields (by @dmytro-ch) Fixed GitHub Issues: - #13157: Last Ordered Items block - bad js code (reported by @Eytham) has been fixed in #19357 by @gelanivishal in 2.2-develop branch Related commits: 1. 7559e3e 2. 58550b9 3. f1bb98e - #19286: Wrong pager style (reported by @gujjwal00) has been fixed in #19296 by @speedy008 in 2.2-develop branch Related commits: 1. 301d73d 2. 7c013a1 3. 584242c 4. ee0bae8 - #18615: Field restriction incompatibilities between klarna_core_order and sales_order_payment last_trans_id (reported by @iancassidyweb) has been fixed in #18621 by @iancassidyweb in 2.2-develop branch Related commits: 1. 172ecf6 2. 3590785 3. 6d33140 4. dd753a1 - #4136: Widget condition with unexpected character not preventing from saving (reported by @devhn) has been fixed in #14485 by @vasilii-b in 2.2-develop branch Related commits: 1. cc1e013 2. ff4b005 3. 6c87bb3 4. 1d1d061 - #18904: Missing asterisk for admin required fields (reported by @dmytro-ch) has been fixed in #18905 by @dmytro-ch in 2.2-develop branch Related commits: 1. 38bfe66 2. 7d2dd65 3. 4f07c61
2 parents 97b98cc + e1650f2 commit c59e602

File tree

26 files changed

+148
-51
lines changed

26 files changed

+148
-51
lines changed

app/code/Magento/Catalog/Block/Product/ProductList/Crosssell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
2525
*/
2626
protected function _prepareData()
2727
{
28-
$product = $this->_coreRegistry->registry('product');
28+
$product = $this->getProduct();
2929
/* @var $product \Magento\Catalog\Model\Product */
3030

3131
$this->_itemCollection = $product->getCrossSellProductCollection()->addAttributeToSelect(

app/code/Magento/Catalog/Block/Product/ProductList/Related.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct(
8282
*/
8383
protected function _prepareData()
8484
{
85-
$product = $this->_coreRegistry->registry('product');
85+
$product = $this->getProduct();
8686
/* @var $product \Magento\Catalog\Model\Product */
8787

8888
$this->_itemCollection = $product->getRelatedProductCollection()->addAttributeToSelect(

app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function __construct(
9797
*/
9898
protected function _prepareData()
9999
{
100-
$product = $this->_coreRegistry->registry('product');
100+
$product = $this->getProduct();
101101
/* @var $product \Magento\Catalog\Model\Product */
102102
$this->_itemCollection = $product->getUpSellProductCollection()->setPositionOrder()->addStoreFilter();
103103
if ($this->moduleManager->isEnabled('Magento_Checkout')) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ public function setCustomerId($customerId)
141141
}
142142

143143
/**
144-
* {@inheritdoc}
144+
* @inheritdoc
145145
*/
146146
public function execute()
147147
{
148-
return $this->_redirect('catalog/product_compare');
148+
return $this->resultRedirectFactory->create()->setPath('catalog/product_compare');
149149
}
150150
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
</section>
1919
<section name="AdminModifyAttributesSection">
2020
<!-- Parameter is the attribute name -->
21-
<element name="dropDownAttributeByName" type="select" selector="//*[text()='{{attributeName}}']/../..//select" parameterized="true"/>
21+
<element name="dropDownAttributeByName" type="select" selector="//*[text()='{{attributeName}}']/../../..//select" parameterized="true"/>
2222
</section>
2323
</sections>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
<element name="useDefaultOptionTitle" type="text" selector="[data-index='options'] tr.data-row [data-index='title'] [name^='options_use_default']"/>
1515
<element name="useDefaultOptionValueTitleByIndex" type="text" selector="[data-index='options'] [data-index='values'] tr[data-repeat-index='{{var1}}'] [name^='options_use_default']" parameterized="true"/>
1616
<element name="addOptionBtn" type="button" selector="button[data-index='button_add']"/>
17-
<element name="fillOptionTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//label[text()='Option Title']/parent::span/parent::div//input[@class='admin__control-text']" parameterized="true"/>
18-
<element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//label[text()='Option Type']/parent::span/parent::div//div[@data-role='selected-option']" parameterized="true"/>
19-
<element name="checkDropDown" type="select" selector="//span[text()='{{var1}}']/ancestor::div[@class='fieldset-wrapper-title']/following-sibling::div[@data-role='collapsible-content']//div[@data-index='type']//div[contains(@class, 'action-menu')]//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='Drop-down']" parameterized="true"/>
17+
<element name="fillOptionTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Title']/parent::label/parent::div/parent::div//input[@class='admin__control-text']" parameterized="true"/>
18+
<element name="checkSelect" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//span[text()='Option Type']/parent::label/parent::div/parent::div//div[@data-role='selected-option']" parameterized="true"/>
19+
<element name="checkDropDown" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//parent::label/parent::div/parent::div//li[@class='admin__action-multiselect-menu-inner-item']//label[text()='Drop-down']" parameterized="true"/>
2020
<element name="clickAddValue" type="button" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tfoot//button" parameterized="true"/>
21-
<element name="fillOptionValueTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//label[text()='Title']/parent::span/parent::div//div[@class='admin__field-control']/input" parameterized="true"/>
21+
<element name="fillOptionValueTitle" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//span[text()='Title']/parent::label/parent::div/parent::div//div[@class='admin__field-control']/input" parameterized="true"/>
2222
<element name="fillOptionValuePrice" type="input" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody/tr[@data-repeat-index='{{var2}}']//span[text()='Price']/parent::label/parent::div//div[@class='admin__control-addon']/input" parameterized="true"/>
23-
<element name="clickSelectPriceType" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody//tr[@data-repeat-index='{{var2}}']//label[text()='Price Type']/parent::span/parent::div//select" parameterized="true"/>
23+
<element name="clickSelectPriceType" type="select" selector="//span[text()='{{var1}}']/parent::div/parent::div/parent::div//tbody//tr[@data-repeat-index='{{var2}}']//span[text()='Price Type']/parent::label/parent::div/parent::div//select" parameterized="true"/>
2424
<!-- Elements that make it easier to select the most recently added element -->
2525
<element name="lastOptionTitle" type="input" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, '_required')]//input" />
2626
<element name="lastOptionTypeParent" type="block" selector="//*[@data-index='custom_options']//*[@data-index='options']/tbody/tr[last()]//*[contains(@class, 'admin__action-multiselect-text')]" />

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<element name="productName" type="input" selector=".admin__field[data-index=name] input"/>
1616
<element name="productNameUseDefault" type="checkbox" selector="input[name='use_default[name]']"/>
1717
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
18-
<element name="enableProductAttributeLabel" type="text" selector="[data-index='status'] .admin__field-label label"/>
19-
<element name="enableProductAttributeLabelWrapper" type="text" selector="[data-index='status'] .admin__field-label"/>
18+
<element name="enableProductAttributeLabel" type="text" selector="//span[text()='Enable Product']/parent::label"/>
19+
<element name="enableProductAttributeLabelWrapper" type="text" selector="//span[text()='Enable Product']/parent::label/parent::div"/>
2020
<element name="productStatus" type="checkbox" selector="input[name='product[status]']"/>
2121
<element name="productStatusUseDefault" type="checkbox" selector="input[name='use_default[status]']"/>
2222
<element name="productPrice" type="input" selector=".admin__field[data-index=price] input"/>
@@ -33,7 +33,7 @@
3333
<element name="visibilityUseDefault" type="checkbox" selector="//input[@name='use_default[visibility]']"/>
3434
<element name="divByDataIndex" type="input" selector="div[data-index='{{var}}']" parameterized="true"/>
3535
<element name="attributeSetSearchCount" type="text" selector="div[data-index='attribute_set_id'] .admin__action-multiselect-search-count"/>
36-
<element name="attributeLabelByText" type="text" selector="//*[@class='admin__field']//label[text()='{{attributeLabel}}']" parameterized="true"/>
36+
<element name="attributeLabelByText" type="text" selector="//*[@class='admin__field']//span[text()='{{attributeLabel}}']" parameterized="true"/>
3737
<element name="addAttributeBtn" type="button" selector="#addAttribute"/>
3838
<element name="attributeSetFilterResultByName" type="text" selector="//label/span[text() = '{{var}}']" timeout="30" parameterized="true"/>
3939
<element name="attributeSetDropDown" type="select" selector="div[data-index='attribute_set_id'] .action-select.admin__action-multiselect"/>

app/code/Magento/Rule/Model/Condition/AbstractCondition.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,9 @@ public function getValueElement()
615615
// date format intentionally hard-coded
616616
$elementParams['input_format'] = \Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
617617
$elementParams['date_format'] = \Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
618+
$elementParams['placeholder'] = \Magento\Framework\Stdlib\DateTime::DATE_INTERNAL_FORMAT;
619+
$elementParams['autocomplete'] = 'off';
620+
$elementParams['readonly'] = 'true';
618621
}
619622
return $this->getForm()->addField(
620623
$this->getPrefix() . '__' . $this->getId() . '__value',

app/code/Magento/Rule/view/adminhtml/web/rules.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ define([
220220

221221
var elem = Element.down(elemContainer, 'input.input-text');
222222

223+
jQuery(elem).trigger('contentUpdated');
224+
223225
if (elem) {
224226
elem.focus();
225227

app/code/Magento/Sales/Setup/UpgradeSchema.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
109109
if (version_compare($context->getVersion(), '2.0.10', '<')) {
110110
$this->expandRemoteIpField($installer);
111111
}
112+
if (version_compare($context->getVersion(), '2.0.11', '<')) {
113+
$this->expandLastTransIdField($installer);
114+
}
112115
}
113116

114117
/**
@@ -161,4 +164,21 @@ private function expandRemoteIpField(SchemaSetupInterface $installer)
161164
]
162165
);
163166
}
167+
168+
/**
169+
* @param SchemaSetupInterface $installer
170+
* @return void
171+
*/
172+
private function expandLastTransIdField(SchemaSetupInterface $installer)
173+
{
174+
$connection = $installer->getConnection(self::$connectionName);
175+
$connection->modifyColumn(
176+
$installer->getTable('sales_order_payment', self::$connectionName),
177+
'last_trans_id',
178+
[
179+
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
180+
'length' => 255
181+
]
182+
);
183+
}
164184
}

0 commit comments

Comments
 (0)