initial
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
<tr>
|
||||
<td colspan="2" class="entry-view-field-name"><?php echo esc_html( $order_summary['labels']['order_label'] ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="entry-view-field-value lastrow">
|
||||
<table class="entry-products" cellspacing="0" width="97%">
|
||||
<colgroup>
|
||||
<col class="entry-products-col1" />
|
||||
<col class="entry-products-col2" />
|
||||
<col class="entry-products-col3" />
|
||||
<col class="entry-products-col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<th scope="col"><?php echo esc_html( $order_summary['labels']['product'] ); ?></th>
|
||||
<th scope="col" class="textcenter"><?php echo esc_html( $order_summary['labels']['product_qty'] ); ?></th>
|
||||
<th scope="col"><?php echo esc_html( $order_summary['labels']['product_unitprice'] ); ?></th>
|
||||
<th scope="col"><?php echo esc_html( $order_summary['labels']['product_price'] ); ?></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( rgars( $order_summary, 'rows/body', array() ) as $row ) {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="product_name"><?php echo esc_html( rgar( $row, 'name' ) ); ?></div>
|
||||
<ul class="product_options">
|
||||
<?php
|
||||
if ( is_array( rgar( $row, 'options' ) ) ) {
|
||||
$count = sizeof( $row['options'] );
|
||||
for ( $i = 0; $i < $count; $i++ ) {
|
||||
?>
|
||||
<li <?php echo ( $i === ( $count - 1 ) ? "class='lastitem'" : '' ); ?>><?php echo wp_kses( rgar( $row['options'][ $i ], 'option_label' ), wp_kses_allowed_html( 'data' ) ); ?></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="textcenter"><?php echo esc_html( rgar( $row, 'quantity' ) ); ?></td>
|
||||
<td><?php echo wp_kses( rgar( $row, 'price_money' ), wp_kses_allowed_html( 'entities' ) ); ?></td>
|
||||
<td><?php echo wp_kses( rgar( $row, 'sub_total_money' ), wp_kses_allowed_html( 'entities' ) ); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="emptycell"> </td>
|
||||
<td class="subtotal"><?php esc_html_e( 'Sub Total', 'gravityforms' ); ?></td>
|
||||
<td class="subtotal_amount"><?php echo wp_kses( $order_summary['totals']['sub_total_money'], wp_kses_allowed_html( 'entities' ) ); ?></td>
|
||||
</tr>
|
||||
<?php foreach ( rgars( $order_summary, 'rows/footer', array() ) as $row ) { ?>
|
||||
<tr>
|
||||
<td colspan="2" class="emptycell"> </td>
|
||||
<td class="footer_row"><?php echo esc_html( rgar( $row, 'name' ) ); ?></td>
|
||||
<td class="footer_row_amount"><?php echo wp_kses( rgar( $row, 'price_money' ), wp_kses_allowed_html( 'entities' ) ); ?> </td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td colspan="2" class="emptycell"> </td>
|
||||
<td class="grandtotal"><?php esc_html_e( 'Total', 'gravityforms' ); ?></td>
|
||||
<td class="grandtotal_amount"><?php echo wp_kses( $order_summary['totals']['total_money'], wp_kses_allowed_html( 'entities' ) ); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
<tr style="background-color:#EAF2FA">
|
||||
<td colspan="2">
|
||||
<strong style="font-family: sans-serif; font-size:12px;"><?php echo esc_html( $order_summary['labels']['order_label'] ); ?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #FFFFFF">
|
||||
<td style="width: 20px"> </td>
|
||||
<td>
|
||||
<table cellspacing="0" style="border-left:1px solid #DFDFDF; border-top:1px solid #DFDFDF; width: 97%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; font-family: sans-serif; font-size:12px; text-align:left"><?php echo esc_html( $order_summary['labels']['product'] ); ?></th>
|
||||
<th style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:50px; font-family: sans-serif; font-size:12px; text-align:center"><?php echo esc_html( $order_summary['labels']['product_qty'] ); ?></th>
|
||||
<th style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif; font-size:12px; text-align:left"><?php echo esc_html( $order_summary['labels']['product_unitprice'] ); ?></th>
|
||||
<th style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif; font-size:12px; text-align:left"><?php echo esc_html( $order_summary['labels']['product_price'] ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ( rgars( $order_summary, 'rows/body', array() ) as $row ) { ?>
|
||||
<tr>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; font-family: sans-serif; font-size:11px;">
|
||||
<strong style="color:#BF461E; font-size:12px; margin-bottom:5px"><?php echo \GFCommon::maybe_wp_kses( rgar( $row, 'name' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
<ul style="margin:0">
|
||||
<?php if ( is_array( rgar( $row, 'options' ) ) ) { ?>
|
||||
<?php
|
||||
$count = sizeof( $row['options'] );
|
||||
for ( $i = 0; $i < $count; $i ++ ) {
|
||||
?>
|
||||
<li style="padding:4px 0 4px 0"><?php echo \GFCommon::maybe_wp_kses( rgar( $row['options'][ $i ], 'option_label' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped?></li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; text-align:center; width:50px; font-family: sans-serif; font-size:11px;"><?php echo esc_html( rgar( $row, 'quantity', 1 ) ); ?></td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif; font-size:11px;"><?php echo rgar( $row, 'price_money' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif; font-size:11px;"><?php echo rgar( $row, 'sub_total_money' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; font-size:11px;"> </td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; text-align:right; width:155px; font-family: sans-serif;">
|
||||
<strong style="font-size:12px;"><?php esc_html_e( 'Sub Total', 'gravityforms' ); ?></strong></td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif;">
|
||||
<strong style="font-size:12px;"><?php echo $order_summary['totals']['sub_total_money']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<?php foreach ( rgars( $order_summary, 'rows/footer', array() ) as $row ) { ?>
|
||||
<tr>
|
||||
<td colspan="2" style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; font-size:11px;"> </td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif;font-size:12px;text-align:right;"><?php echo \GFCommon::maybe_wp_kses( rgar( $row, 'name' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif; font-size:11px;">
|
||||
<?php echo rgar( $row, 'sub_total_money' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td colspan="2" style="background-color:#F4F4F4; border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; font-size:11px;"> </td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; text-align:right; width:155px; font-family: sans-serif;">
|
||||
<strong style="font-size:12px;"><?php esc_html_e( 'Total', 'gravityforms' ); ?></strong></td>
|
||||
<td style="border-bottom:1px solid #DFDFDF; border-right:1px solid #DFDFDF; padding:7px; width:155px; font-family: sans-serif;">
|
||||
<strong style="font-size:12px;"><?php echo $order_summary['totals']['total_money']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?php echo "--------------------------------\n";
|
||||
echo esc_html( $order_summary['labels']['order_label'] ) . "\n\n";
|
||||
foreach ( rgars( $order_summary, 'rows/body', array() ) as $row ) {
|
||||
|
||||
if ( ! empty( $row['options'] ) ) {
|
||||
$row['name'] .= ' (' . implode(
|
||||
', ',
|
||||
array_map(
|
||||
function( $option ) {
|
||||
return rgar( $option, 'option_name', '' );
|
||||
},
|
||||
rgar( $row, 'options', array() )
|
||||
)
|
||||
) . ')';
|
||||
}
|
||||
echo rgar( $row, 'quantity' ) . ' ' . rgar( $row, 'name' ) . ': ' . rgar( $row, 'sub_total_money', 0 ) . "\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
foreach ( rgars( $order_summary, 'rows/footer', array() ) as $row ) {
|
||||
echo rgar( $row, 'name' ) . ': ' . rgar( $row, 'sub_total_money', 0 ) . "\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
echo esc_html__( 'Sub Total', 'gravityforms' ) . ': ' . $order_summary['totals']['sub_total_money'] . "\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
echo esc_html__( 'Total', 'gravityforms' ) . ': ' . $order_summary['totals']['total_money'] . "\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
Reference in New Issue
Block a user