Skip to content

Commit b3e81a9

Browse files
committed
Add missing payment info template for PDF generation
The adminhtml area contains a default template for all payment methods which comes without an own payment info template. If you generate a PDF by clicking the "Print PDF" button i.e. the invoice generation you will see correct payment informations. If you generate a PDF in frontend you have an empty payment info because of the missing template. The info block is returning an empty string instead.
1 parent f63b0a1 commit b3e81a9

File tree

1 file changed

+23
-0
lines changed
  • app/code/Magento/Payment/view/frontend/templates/info/pdf

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
// @codingStandardsIgnoreFile
8+
/**
9+
* @see \Magento\Payment\Block\Info
10+
* @var \Magento\Payment\Block\Info $block
11+
*/
12+
?>
13+
<?php echo $block->escapeHtml($block->getMethod()->getTitle()); ?>{{pdf_row_separator}}
14+
15+
<?php if ($specificInfo = $block->getSpecificInformation()):?>
16+
<?php foreach ($specificInfo as $label => $value):?>
17+
<?php echo $block->escapeHtml($label) ?>:
18+
<?php echo $block->escapeHtml(implode(' ', $block->getValueAsArray($value)));?>
19+
{{pdf_row_separator}}
20+
<?php endforeach; ?>
21+
<?php endif;?>
22+
23+
<?php echo $block->escapeHtml(implode('{{pdf_row_separator}}', $block->getChildPdfAsArray())); ?>

0 commit comments

Comments
 (0)