forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
magento#26245: Magento does not send an email about a refunded groupe…
…d product
- Loading branch information
1 parent
d480fdb
commit 7141278
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
app/code/Magento/GroupedProduct/Block/Order/Email/Items/CreditMemo/Grouped.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Order Email items grouped renderer | ||
* | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\GroupedProduct\Block\Order\Email\Items\CreditMemo; | ||
|
||
use Magento\Sales\Block\Order\Email\Items\DefaultItems; | ||
|
||
/** | ||
* Class renders grouped product(s) in the CreditMemo email | ||
* | ||
* @api | ||
*/ | ||
class Grouped extends DefaultItems | ||
{ | ||
/** | ||
* Prepare item html | ||
* | ||
* This method uses renderer for real product type | ||
* | ||
* @return string | ||
*/ | ||
protected function _toHtml() | ||
{ | ||
if ($this->getItem()->getOrderItem()) { | ||
$item = $this->getItem()->getOrderItem(); | ||
} else { | ||
$item = $this->getItem(); | ||
} | ||
if ($productType = $item->getRealProductType()) { | ||
$renderer = $this->getRenderedBlock()->getItemRenderer($productType); | ||
$renderer->setItem($this->getItem()); | ||
return $renderer->toHtml(); | ||
} | ||
return parent::_toHtml(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters