show "free" if no price to be paid

master
Marek Isalski 7 years ago
parent e1cbaf7e54
commit e750c7862b

@ -22,11 +22,16 @@
Total
</th>
<th class="text-right">
<?php $any = false; ?>
<?php if ( count( $transaction[ '_price' ][ 'total' ] ) ): ?>
<?php foreach ( $transaction[ '_price' ][ 'total' ] as $currency => $price ): ?>
<div><?php print $price[ 'format_total' ]; ?></div>
<?php if ( $price[ 'gross' ] ): ?>
<?php $any = true; ?>
<div><?php print $price[ 'format_gross' ]; ?></div>
<?php endif; ?>
<?php endforeach; ?>
<?php else: ?>
<?php endif; ?>
<?php if ( !$any ): ?>
<em>free</em>
<?php endif; ?>
</th>

Loading…
Cancel
Save