- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023
02:19 PM
11-07-2023
02:19 PM
Change Checkout Order Summary Image
I'm working on a module that changes the Checkout Order Summary Image to an external image url.
public function afterGetImages(ImageProvider $subject, array $result): array { foreach ($result as $itemId => $value) { /** @var \Magento\Quote\Model\Quote\Item $item **/ $item = $this->itemFactory->create()->load($itemId); if ($item) { $productid = $item->getProduct(); $result = $item['product_image']['src'] = "https://static.integromat.com/img/packages/magento_256.png"; } } return $result; }
I get the error:
Notice: Indirect modification of overloaded element of Magento\Sales\Model\Order\Item\Interceptor has no effect on line 26
Which is this line:
$result = $item['product_image']['src'] = "https://static.integromat.com/img/packages/magento_256.png";
What am I doing wrong?
How can an image on the Checkout Order Summary changed?
Thank you.
Labels: