Skip to content

Commit 68321f5

Browse files
committed
MC-18338: Pulling products from single category into ProductList and sort them by product position in the Category
1 parent ad2025b commit 68321f5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
<type name="Magento\PageBuilder\Model\Catalog\Sorting">
226226
<arguments>
227227
<argument name="sortClasses" xsi:type="array">
228+
<item name="position" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Position</item>
228229
<item name="date_newest_top" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Date\NewestTop</item>
229230
<item name="date_oldest_top" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Date\OldestTop</item>
230231
<item name="name_ascending" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Name\Ascending</item>
@@ -235,7 +236,6 @@
235236
<item name="high_stock_first" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Stock\Descending</item>
236237
<item name="price_high_to_low" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Price\HighToLow</item>
237238
<item name="price_low_to_high" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Price\LowToHigh</item>
238-
<item name="position" xsi:type="string">Magento\PageBuilder\Model\Catalog\Sorting\Position</item>
239239
</argument>
240240
</arguments>
241241
</type>

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/select-filtered-options.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ define([
1717

1818
/** @inheritdoc */
1919
onUpdate: function () {
20-
this.transferredValue = null;
20+
if (!this.updatedByFilter) {
21+
this.transferredValue = null;
22+
} else {
23+
this.updatedByFilter = false;
24+
}
2125

2226
return this._super();
2327
},
@@ -38,6 +42,7 @@ define([
3842
return !excludeOptions || excludedOptionsArray.indexOf(item.value) === -1;
3943
});
4044

45+
this.updatedByFilter = true;
4146
this.setOptions(result);
4247

4348
this.value(this.transferredValue ? this.transferredValue : initialValue);

0 commit comments

Comments
 (0)