- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020
06:28 PM
10-09-2020
06:28 PM
Re: MGS Frontend Builder Issue
public function getProductMediaGallery(ModelProduct $product) { if (!in_array($product->getData('image'), [null, self::EMPTY_IMAGE_VALUE], true)) { $baseImage = $product->getData('image'); } else { $productMediaAttributes = array_filter($product->getMediaAttributeValues(), function ($value) { return $value !== self::EMPTY_IMAGE_VALUE && $value !== null; }); foreach ($productMediaAttributes as $attributeCode => $value) { if ($attributeCode !== 'swatch_image') { $baseImage = (string)$value; break; } } } if (empty($baseImage)) { return []; } $resultGallery = $this->getAllSizeImages($product, $baseImage); $resultGallery['gallery'] = $this->getGalleryImages($product); return $resultGallery; }
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020
06:30 PM
10-09-2020
06:30 PM
Re: MGS Frontend Builder Issue
how can i set isset condition please kindly help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020
06:32 PM
10-09-2020
06:32 PM
Re: MGS Frontend Builder Issue
this is my error after updating Magento from 2.2.3 to 2.3.5
[Sat Oct 10 01:11:06.447121 2020] [php7:error] [pid 19107] [client 72.255.57.102:33964] PHP Fatal error: Declaration of MGS\\Mpanel\\Helper\\Swatches\\Data::getProductMediaGallery(Magento\\Catalog\\Model\\Product $product) must be compatible with Magento\\Swatches\\Helper\\Data::getProductMediaGallery(Magento\\Catalog\\Model\\Product $product): array in /var/www/html/app/code/MGS/Mpanel/Helper/Swatches/Data.php on line 0,
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021
12:44 PM
02-03-2021
12:44 PM
Re: MGS Frontend Builder Issue
For me the solution was to set function
getProductMediaGallery
to array:
public function getProductMediaGallery(ModelProduct $product): array
- « Previous
-
- 1
- 2
- Next »