this table is woocommerce admin new order mail.
https://imgim.com/9385incih2142354.jpg
i want to give sequence number for each products.
———————-
1 |
———————-
2 |
———————-
3 |
———————-
.
.
.
.
.
.
.
this is my table codes.
<?php
/**
* Email Order Items
*
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 2.1.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
foreach ( $items as $item_id => $item ) :
$_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item );
$item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product );
?>
<tr>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee;">
<<<<<<<<<<<<<<<<< SHOULD BE HERE >>>>>>>>>>>>>>>>>>>>><
</td>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee;"><?php echo $item['qty'] ;?></td>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee;">
<?php
echo $_product->list_attributes();
?>
</td>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee;">
<?php echo ' #' . $_product->id . ''; ?>
</td>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee; word-wrap:break-word;"><?php
// Product name
echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item );
?>
</td>
<td class="product-price">
<?php
echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key );
?>
</td>
<td style="text-align:left; vertical-align:middle; border: 1px solid #eee;"><?php echo $order->get_formatted_line_subtotal( $item ); ?></td>
</tr>