Skip to content

Commit e1650f2

Browse files
committed
Merge branch '2.2-develop-prs' of github.com:magento-engcom/magento2ce into 2.2-develop-prs
2 parents 306cc65 + d41a57c commit e1650f2

File tree

26 files changed

+146
-50
lines changed

26 files changed

+146
-50
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,4 @@ public function execute()
147147
{
148148
return $this->resultRedirectFactory->create()->setPath('catalog/product_compare');
149149
}
150-
151150
}

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)