</td> <td><?php echo $order_record['order_quantity']; ?> </td> <td><?php echo $order_record['order_price']; ?> </td> <td><?php echo $order_record['order_total_price']; ?> </td> <td><?php if ($order_record['order_status']) { echo output_order_status($order_record['order_status']); } ?> </td> </tr> <?php } ?> </tbody> </table> </div> <?php } ?> </div> </div>
function store_email_template($order_id, $from = '', $to, $title = '') { $blogname = get_bloginfo('name'); $order = get_the_order($order_id); $order_url = tin_get_user_url('orders', $order->user_id); $admin_email = get_bloginfo('admin_email'); $user_name = $order->user_name; $user_ucenter_url = get_author_posts_url($order->user_id); $product_name = $order->product_name; $order_status_text = output_order_status($order->order_status); $order_total_price = $order->order_total_price; $order_time = $order->order_time; $content = '<p>以下是您的订单最新信息,您可进入“<a target="_blank" href="' . $order_url . '">订单详情</a>”页面随时关注订单状态,如有任何疑问,请及时联系我们(Email:<a href="mailto:' . $admin_email . '" target="_blank">' . $admin_email . '</a>)。</p><div style="background-color:#fefcc9; padding:10px 15px; border:1px solid #f7dfa4; font-size: 12px;line-height:160%;">商品名:' . $product_name . '<br>订单号:' . $order_id . '<br>总金额:' . $order_total_price . '<br>下单时间:' . $order_time . '<br>交易状态:<strong>' . $order_status_text . '</strong></div>'; $html = store_email_template_wrap($user_name, $content); if (empty($from)) { $wp_email = 'no-reply@' . preg_replace('#^www\\.#', '', strtolower($_SERVER['SERVER_NAME'])); } else { $wp_email = $from; } if (empty($title)) { $title = $blogname . '商城提醒'; } $fr = "From: \"" . $blogname . "\" <{$wp_email}>"; $headers = "{$fr}\nContent-Type: text/html; charset=" . get_option('blog_charset') . "\n"; wp_mail($to, $title, $html, $headers); // 如果交易成功通知管理员 if ($order->order_status == 4) { $content_admin = '<p>你的站点有新完成的支付宝交易订单,以下是订单信息:<div style="background-color:#fefcc9; padding:10px 15px; border:1px solid #f7dfa4; font-size: 12px;line-height:160%;">买家名:<a href="' . $user_ucenter_url . '" title="用户个人中心" target="_blank">' . $user_name . '</a><br>商品名:' . $product_name . '<br>订单号:' . $order_id . '<br>总金额:' . $order_total_price . '<br>下单时间:' . $order_time . '<br>交易状态:<strong>' . $order_status_text . '</strong></div>'; $html_admin = store_email_template_wrap('', $content_admin); wp_mail($admin_email, $title, $html_admin, $headers); } }
<th scope="col">' . __('交易状态', 'um') . '</th> <th scope="col">' . __('操作', 'um') . '</th> </tr> </thead> <tbody class="the-list">'; foreach ($oLog as $Log) { $item_html .= ' <tr> <td>' . $Log->product_name . '</td> <td>' . $Log->order_id . '</td> <td>' . $Log->user_name . '</td> <td>' . $Log->order_time . '</td> <td>' . $Log->order_total_price . '</td> <td>'; if ($Log->order_status) { $item_html .= output_order_status($Log->order_status); } $item_html .= '</td><td>'; if ($Log->order_status == 1) { $item_html .= '<a class="close-order" href="javascript:" title="关闭过期交易" data="' . $Log->id . '">关闭</a>'; } $item_html .= '</td></tr>'; } $item_html .= '</tbody> </table> </div>'; if ($pages > 1) { $item_html .= '<li class="tip">' . sprintf(__('第 %1$s 页,共 %2$s 页,每页显示 %3$s 条。', 'um'), $paged, $pages, $number) . '</li>'; } } echo $item_html . '</ul>';