diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml index 4b33864aef47a..bdb747bf8d721 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml @@ -12,6 +12,16 @@ ?> getGalleryOptions() === null) { + $block->setData( + 'gallery_options', + \Magento\Framework\App\ObjectManager::getInstance() + ->get(\Magento\Catalog\Block\Product\View\GalleryOptions::class) + ); +} + $images = $block->getGalleryImages()->getItems(); $mainImage = current(array_filter($images, function ($img) use ($block) { return $block->isMainImage($img); @@ -45,7 +55,7 @@ $mainImageData = $mainImage ? "data": getGalleryImagesJson() ?>, "options": getGalleryOptions()->getOptionsJson() ?>, "fullscreen": getGalleryOptions()->getFSOptionsJson() ?>, - "breakpoints": getBreakpoints() ?> + "breakpoints": getBreakpoints() ?> } } }