Skip to content

Commit defde24

Browse files
authored
ENGCOM-3448: bug-fix #16074 - Fix theme change in middle of product page. #19124
2 parents 4a68bdf + e4a2df3 commit defde24

File tree

1 file changed

+4
-0
lines changed
  • app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector

1 file changed

+4
-0
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Image.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Catalog\Model\Product\Image\NotLoadInfoImageException;
1515
use Magento\Catalog\Ui\DataProvider\Product\ProductRenderCollectorInterface;
1616
use Magento\Framework\App\State;
17+
use Magento\Framework\View\Design\ThemeInterface;
1718
use Magento\Framework\View\DesignInterface;
1819
use Magento\Store\Model\StoreManager;
1920
use Magento\Store\Model\StoreManagerInterface;
@@ -104,6 +105,8 @@ public function __construct(
104105
public function collect(ProductInterface $product, ProductRenderInterface $productRender)
105106
{
106107
$images = [];
108+
/** @var ThemeInterface $currentTheme */
109+
$currentTheme = $this->design->getDesignTheme();
107110

108111
foreach ($this->imageCodes as $imageCode) {
109112
/** @var ImageInterface $image */
@@ -132,6 +135,7 @@ public function collect(ProductInterface $product, ProductRenderInterface $produ
132135
$images[] = $image;
133136
}
134137

138+
$this->design->setDesignTheme($currentTheme);
135139
$productRender->setImages($images);
136140
}
137141

0 commit comments

Comments
 (0)