52 Data $swatchesHelperData,
56 $this->swatchHelperData = $swatchesHelperData;
79 $request = $this->request->getParams();
82 if (!empty($filterArray)) {
95 private function loadSimpleVariation(
Product $parentProduct, array $filterArray)
97 $childProduct = $this->swatchHelperData->loadVariationByFallback($parentProduct, $filterArray);
99 $childProduct = $this->swatchHelperData->loadFirstVariationWithImage($parentProduct, $filterArray);
121 if ($this->canReplaceImageWithSwatch(
$attribute)) {
135 private function canReplaceImageWithSwatch(
$attribute)
138 if (!$this->swatchHelperData->isSwatchAttribute(
$attribute)) {
144 || !
$attribute->getData(
'update_product_preview_image')
const CATEGORY_PAGE_LIST_LOCATION
__construct(Data $swatchesHelperData, Config $eavConfig, Http $request)
const CATEGORY_PAGE_GRID_LOCATION
beforeGetImage(AbstractProduct $subject, ProductModel $product, $location, array $attributes=[])