-
AuthorPosts
-
October 1, 2014 at 3:53 pm #328195
Hi, I know this might not be the place to ask this but i’m sure you can help me out. I want to add a simple text line inside one of the WooCommerce email templates and I just can’t seem to figure out how to do it. I guess I need some kind of code in order for the text to actually show.
Here is the email template:
<?php /** * Customer completed order email * * @author WooThemes * @package WooCommerce/Templates/Emails * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> <?php do_action( 'woocommerce_email_header', $email_heading ); ?> <p><?php printf( __( "ההזמנה שלך התקבלה. פרטי ההזמנה שלך מוצגים להלן לעיונך:", 'woocommerce' ), get_option( 'blogname' ) ); ?></p> <?php do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ); ?> <h2><?php echo __( 'Order:', 'woocommerce' ) . ' ' . $order->get_order_number(); ?></h2> <table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee"> <thead> <tr> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', 'woocommerce' ); ?></th> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'woocommerce' ); ?></th> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', 'woocommerce' ); ?></th> </tr> </thead> <tbody> <?php echo $order->email_order_items_table( true, false, true ); ?> </tbody> <tfoot> <?php if ( $totals = $order->get_order_item_totals() ) { $i = 0; foreach ( $totals as $total ) { $i++; ?><tr> <th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th> <td style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td> </tr><?php } } ?> </tfoot> </table> <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); ?> <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text ); ?> <h2><?php _e( 'Customer details', 'woocommerce' ); ?></h2> <p><?php printf( __( "במידה ובחרת לשלם בכרטיס אשראי ביותר מתשלום אחד, סכום החיוב הסופי (כולל עמלות תשלומים) יופיע בחשבונית."); ?></p> <?php if ($order->billing_email) : ?> <p><strong><?php _e( 'Email:', 'woocommerce' ); ?></strong> <?php echo $order->billing_email; ?></p> <?php endif; ?> <?php if ($order->billing_phone) : ?> <p><strong><?php _e( 'Tel:', 'woocommerce' ); ?></strong> <?php echo $order->billing_phone; ?></p> <?php endif; ?> <?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?> <p><?php printf( __( "במידה ובחרת לשלם בכרטיס אשראי ביותר מתשלום אחד, סכום החיוב הסופי (כולל עמלות תשלומים) יופיע בחשבונית."); ?></p> <?php do_action( 'woocommerce_email_footer' ); ?>
I want to add the text line after the table and before the – <h2><?php _e( ‘Customer details’, ‘woocommerce’ ); ?></h2>
Can you tell me what code to use in order to add a simple text line?
Thanks!
October 2, 2014 at 12:00 am #328568Hi bakbek!
You can use plain text if its no in php or print if it is:http://php.net/manual/en/function.print.php
Otherwise the WooCommerce forums are a better place to get an answer in this case as the last time I did any email customization was about 8 months ago so things may have changed since then.
Regards,
Devin -
AuthorPosts
- You must be logged in to reply to this topic.