| 1 |
<?php |
| 2 |
/** |
| 3 |
* Customer Quote Request Email |
| 4 |
* |
| 5 |
* This template can be overridden by copying it to yourtheme/tiered-pricing-table/emails/customer-quote-request.php. |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; |
| 10 |
} |
| 11 |
|
| 12 |
if ( $quotePost instanceof \TierPricingTable\Addons\RequestAQuote\Models\QuoteRequest ) { |
| 13 |
$productId = $quotePost->getProductId(); |
| 14 |
$product = wc_get_product( $productId ); |
| 15 |
} else { |
| 16 |
$product = false; |
| 17 |
} |
| 18 |
|
| 19 |
/* |
| 20 |
* @hooked WC_Emails::email_header() Output the email header |
| 21 |
*/ |
| 22 |
do_action( 'woocommerce_email_header', $emailHeading, $email ); ?> |
| 23 |
|
| 24 |
<p><?php esc_html_e( 'Thank you for your quote request. We have received it and will process it shortly. Here are the details of your request:', 'tier-pricing-table' ); ?></p> |
| 25 |
|
| 26 |
<h2><?php esc_html_e( 'Quote Request Details', 'tier-pricing-table' ); ?></h2> |
| 27 |
|
| 28 |
<div style="margin-bottom: 40px;"> |
| 29 |
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1"> |
| 30 |
<tbody> |
| 31 |
<tr> |
| 32 |
<th class="td" scope="row" style="text-align:left;"><?php esc_html_e( 'Product', 'tier-pricing-table' ); ?></th> |
| 33 |
<td class="td" style="text-align:left;"><?php echo $product ? wp_kses_post( $product->get_name() ) : esc_html__( 'Unknown', 'tier-pricing-table' ); ?></td> |
| 34 |
</tr> |
| 35 |
<?php |
| 36 |
$fields = $email->get_submitted_fields(); |
| 37 |
if ( ! empty( $fields ) ) : |
| 38 |
foreach ( $fields as $field ) : ?> |
| 39 |
<tr> |
| 40 |
<th class="td" scope="row" style="text-align:left;"><?php echo esc_html( $field['label'] ); ?></th> |
| 41 |
<td class="td" style="text-align:left;"><?php echo wp_kses_post( nl2br( $field['value'] ) ); ?></td> |
| 42 |
</tr> |
| 43 |
<?php endforeach; |
| 44 |
endif; |
| 45 |
?> |
| 46 |
</tbody> |
| 47 |
</table> |
| 48 |
</div> |
| 49 |
|
| 50 |
<p><?php esc_html_e( 'We will be in touch soon!', 'tier-pricing-table' ); ?></p> |
| 51 |
|
| 52 |
<?php |
| 53 |
/* |
| 54 |
* @hooked WC_Emails::email_footer() Output the email footer |
| 55 |
*/ |
| 56 |
do_action( 'woocommerce_email_footer', $email ); |
| 57 |
|