We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2abc466 commit bff891fCopy full SHA for bff891f
app/code/Magento/CatalogGraphQl/Model/Resolver/Product/MediaGallery.php
@@ -57,6 +57,14 @@ public function resolve(
57
= $entry->getExtensionAttributes()->getVideoContent()->getData();
58
}
59
60
+ if (!empty($mediaGalleryEntries)) {
61
+ usort(
62
+ $mediaGalleryEntries,
63
+ function ($entryA, $entryB) {
64
+ return ($entryA['position'] < $entryB['position']) ? -1 : 1;
65
+ }
66
+ );
67
68
return $mediaGalleryEntries;
69
70
0 commit comments