Parent Image Added

This commit is contained in:
devansh bawari 2021-03-08 13:42:15 +05:30
parent d6ed93bb91
commit 8d485032f0
1 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,15 @@ class ProductImage extends AbstractProduct
];
}
/*
* Product parent checked already above. If the case reached here that means the
* parent is available. So recursing the method for getting the parent image if
* images of the child are not found.
*/
if (empty($images)) {
$images = $this->getGalleryImages($product->parent);
}
return $loadedGalleryImages[$product->id] = $images;
}