Skip to content

Commit 9337b44

Browse files
committed
MAGETWO-94432: [2.2] Can't hide product images via hide_from_product_page attribute during import
1 parent b037445 commit 9337b44

File tree

1 file changed

+5
-5
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import

1 file changed

+5
-5
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ protected function _saveProducts()
17201720
) {
17211721
$labelsForUpdate[] = [
17221722
'label' => $rowLabels[$column][$columnImageKey],
1723-
'imageData' => $currentFileData
1723+
'imageData' => $currentFileData,
17241724
];
17251725
}
17261726

@@ -1729,7 +1729,7 @@ protected function _saveProducts()
17291729
) {
17301730
$imagesForChangeVisibility[] = [
17311731
'disabled' => $imageHiddenStates[$uploadedFile],
1732-
'imageData' => $currentFileData
1732+
'imageData' => $currentFileData,
17331733
];
17341734
}
17351735
} else {
@@ -1884,11 +1884,11 @@ protected function _saveProducts()
18841884
* @param array $rowData
18851885
* @return array
18861886
*/
1887-
private function getImagesHiddenStates($rowData)
1887+
private function getImagesHiddenStates(array $rowData): array
18881888
{
18891889
$statesArray = [];
18901890
$mappingArray = [
1891-
'_media_is_disabled' => '1'
1891+
'_media_is_disabled' => '1',
18921892
];
18931893

18941894
foreach ($mappingArray as $key => $value) {
@@ -2834,7 +2834,7 @@ private function updateMediaGalleryLabels(array $labels)
28342834
* @param array $images
28352835
* @return $this
28362836
*/
2837-
private function updateMediaGalleryVisibility(array $images)
2837+
private function updateMediaGalleryVisibility(array $images): Product
28382838
{
28392839
if (!empty($images)) {
28402840
$this->mediaProcessor->updateMediaGalleryVisibility($images);

0 commit comments

Comments
 (0)