Added login request
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Order tracking form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/form-tracking.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.4.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
global $post;
|
||||
?>
|
||||
|
||||
<form action="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" method="post" class="track_order">
|
||||
|
||||
<p><?php esc_html_e( 'To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received.', 'woocommerce' ); ?></p>
|
||||
|
||||
<p class="form-row form-row-first"><label for="orderid"><?php esc_html_e( 'Order ID', 'woocommerce' ); ?></label> <input class="input-text" type="text" name="orderid" id="orderid" value="<?php echo isset( $_REQUEST['orderid'] ) ? esc_attr( wp_unslash( $_REQUEST['orderid'] ) ) : ''; ?>" placeholder="<?php esc_attr_e( 'Found in your order confirmation email.', 'woocommerce' ); ?>" /></p><?php // @codingStandardsIgnoreLine ?>
|
||||
<p class="form-row form-row-last"><label for="order_email"><?php esc_html_e( 'Billing email', 'woocommerce' ); ?></label> <input class="input-text" type="text" name="order_email" id="order_email" value="<?php echo isset( $_REQUEST['order_email'] ) ? esc_attr( wp_unslash( $_REQUEST['order_email'] ) ) : ''; ?>" placeholder="<?php esc_attr_e( 'Email you used during checkout.', 'woocommerce' ); ?>" /></p><?php // @codingStandardsIgnoreLine ?>
|
||||
<div class="clear"></div>
|
||||
|
||||
<p class="form-row"><button type="submit" class="button" name="track" value="<?php esc_attr_e( 'Track', 'woocommerce' ); ?>"><?php esc_html_e( 'Track', 'woocommerce' ); ?></button></p>
|
||||
<?php wp_nonce_field( 'woocommerce-order_tracking', 'woocommerce-order-tracking-nonce' ); ?>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Order again button
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-again.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
?>
|
||||
|
||||
<p class="order-again">
|
||||
<a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'order_again', $order->get_id() ) , 'woocommerce-order_again' ) ); ?>" class="button"><?php _e( 'Order again', 'woocommerce' ); ?></a>
|
||||
</p>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Order Customer Details
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-details-customer.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
$show_shipping = ! wc_ship_to_billing_address_only() && $order->needs_shipping_address();
|
||||
?>
|
||||
<section class="woocommerce-customer-details">
|
||||
|
||||
<?php if ( $show_shipping ) : ?>
|
||||
|
||||
<section class="woocommerce-columns woocommerce-columns--2 woocommerce-columns--addresses col2-set addresses">
|
||||
<div class="woocommerce-column woocommerce-column--1 woocommerce-column--billing-address col-1">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<h2 class="woocommerce-column__title"><?php _e( 'Billing address', 'woocommerce' ); ?></h2>
|
||||
|
||||
<address>
|
||||
<?php echo wp_kses_post( $order->get_formatted_billing_address( __( 'N/A', 'woocommerce' ) ) ); ?>
|
||||
|
||||
<?php if ( $order->get_billing_phone() ) : ?>
|
||||
<p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_billing_phone() ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $order->get_billing_email() ) : ?>
|
||||
<p class="woocommerce-customer-details--email"><?php echo esc_html( $order->get_billing_email() ); ?></p>
|
||||
<?php endif; ?>
|
||||
</address>
|
||||
|
||||
<?php if ( $show_shipping ) : ?>
|
||||
|
||||
</div><!-- /.col-1 -->
|
||||
|
||||
<div class="woocommerce-column woocommerce-column--2 woocommerce-column--shipping-address col-2">
|
||||
<h2 class="woocommerce-column__title"><?php _e( 'Shipping address', 'woocommerce' ); ?></h2>
|
||||
<address>
|
||||
<?php echo wp_kses_post( $order->get_formatted_shipping_address( __( 'N/A', 'woocommerce' ) ) ); ?>
|
||||
</address>
|
||||
</div><!-- /.col-2 -->
|
||||
|
||||
</section><!-- /.col2-set -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</section>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Order Item Details
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-details-item.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.0.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'woocommerce-table__line-item order_item', $item, $order ) ); ?>">
|
||||
|
||||
<td class="woocommerce-table__product-name product-name">
|
||||
<?php
|
||||
$is_visible = $product && $product->is_visible();
|
||||
$product_permalink = apply_filters( 'woocommerce_order_item_permalink', $is_visible ? $product->get_permalink( $item ) : '', $item, $order );
|
||||
|
||||
echo apply_filters( 'woocommerce_order_item_name', $product_permalink ? sprintf( '<a href="%s">%s</a>', $product_permalink, $item->get_name() ) : $item->get_name(), $item, $is_visible );
|
||||
echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', $item->get_quantity() ) . '</strong>', $item );
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, false );
|
||||
|
||||
wc_display_item_meta( $item );
|
||||
|
||||
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, false );
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="woocommerce-table__product-total product-total">
|
||||
<?php echo $order->get_formatted_line_subtotal( $item ); ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php if ( $show_purchase_note && $purchase_note ) : ?>
|
||||
|
||||
<tr class="woocommerce-table__product-purchase-note product-purchase-note">
|
||||
|
||||
<td colspan="2"><?php echo wpautop( do_shortcode( wp_kses_post( $purchase_note ) ) ); ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* Order details
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-details.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
if ( ! $order = wc_get_order( $order_id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$order_items = $order->get_items( apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' ) );
|
||||
$show_purchase_note = $order->has_status( apply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ) );
|
||||
$show_customer_details = is_user_logged_in() && $order->get_user_id() === get_current_user_id();
|
||||
$downloads = $order->get_downloadable_items();
|
||||
$show_downloads = $order->has_downloadable_item() && $order->is_download_permitted();
|
||||
|
||||
if ( $show_downloads ) {
|
||||
wc_get_template( 'order/order-downloads.php', array( 'downloads' => $downloads, 'show_title' => true ) );
|
||||
}
|
||||
?>
|
||||
<section class="woocommerce-order-details">
|
||||
<?php do_action( 'woocommerce_order_details_before_order_table', $order ); ?>
|
||||
|
||||
<h2 class="woocommerce-order-details__title"><?php _e( 'Order details', 'woocommerce' ); ?></h2>
|
||||
|
||||
<table class="woocommerce-table woocommerce-table--order-details shop_table order_details">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="woocommerce-table__product-name product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="woocommerce-table__product-table product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
do_action( 'woocommerce_order_details_before_order_table_items', $order );
|
||||
|
||||
foreach ( $order_items as $item_id => $item ) {
|
||||
$product = $item->get_product();
|
||||
|
||||
wc_get_template( 'order/order-details-item.php', array(
|
||||
'order' => $order,
|
||||
'item_id' => $item_id,
|
||||
'item' => $item,
|
||||
'show_purchase_note' => $show_purchase_note,
|
||||
'purchase_note' => $product ? $product->get_purchase_note() : '',
|
||||
'product' => $product,
|
||||
) );
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_order_details_after_order_table_items', $order );
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<?php
|
||||
foreach ( $order->get_order_item_totals() as $key => $total ) {
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"><?php echo $total['label']; ?></th>
|
||||
<td><?php echo $total['value']; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if ( $order->get_customer_note() ) : ?>
|
||||
<tr>
|
||||
<th><?php _e( 'Note:', 'woocommerce' ); ?></th>
|
||||
<td><?php echo wptexturize( $order->get_customer_note() ); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php do_action( 'woocommerce_order_details_after_order_table', $order ); ?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
if ( $show_customer_details ) {
|
||||
wc_get_template( 'order/order-details-customer.php', array( 'order' => $order ) );
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* Order Downloads.
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/order-downloads.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author Automattic
|
||||
* @package WooCommerce/Templates
|
||||
* @version 3.3.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<section class="woocommerce-order-downloads">
|
||||
<?php if ( isset( $show_title ) ) : ?>
|
||||
<h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="woocommerce-table woocommerce-table--order-downloads shop_table shop_table_responsive order_details">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ( wc_get_account_downloads_columns() as $column_id => $column_name ) : ?>
|
||||
<th class="<?php echo esc_attr( $column_id ); ?>"><span class="nobr"><?php echo esc_html( $column_name ); ?></span></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php foreach ( $downloads as $download ) : ?>
|
||||
<tr>
|
||||
<?php foreach ( wc_get_account_downloads_columns() as $column_id => $column_name ) : ?>
|
||||
<td class="<?php echo esc_attr( $column_id ); ?>" data-title="<?php echo esc_attr( $column_name ); ?>">
|
||||
<?php
|
||||
if ( has_action( 'woocommerce_account_downloads_column_' . $column_id ) ) {
|
||||
do_action( 'woocommerce_account_downloads_column_' . $column_id, $download );
|
||||
} else {
|
||||
switch ( $column_id ) {
|
||||
case 'download-product':
|
||||
if ( $download['product_url'] ) {
|
||||
echo '<a href="' . esc_url( $download['product_url'] ) . '">' . esc_html( $download['product_name'] ) . '</a>';
|
||||
} else {
|
||||
echo esc_html( $download['product_name'] );
|
||||
}
|
||||
break;
|
||||
case 'download-file':
|
||||
echo '<a href="' . esc_url( $download['download_url'] ) . '" class="woocommerce-MyAccount-downloads-file button alt">' . esc_html( $download['download_name'] ) . '</a>';
|
||||
break;
|
||||
case 'download-remaining':
|
||||
echo is_numeric( $download['downloads_remaining'] ) ? esc_html( $download['downloads_remaining'] ) : esc_html__( '∞', 'woocommerce' );
|
||||
break;
|
||||
case 'download-expires':
|
||||
if ( ! empty( $download['access_expires'] ) ) {
|
||||
echo '<time datetime="' . esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ) . '" title="' . esc_attr( strtotime( $download['access_expires'] ) ) . '">' . esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ) . '</time>';
|
||||
} else {
|
||||
esc_html_e( 'Never', 'woocommerce' );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</section>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Order tracking
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/order/tracking.php.
|
||||
*
|
||||
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
||||
* (the theme developer) will need to copy the new files to your theme to
|
||||
* maintain compatibility. We try to do this as little as possible, but it does
|
||||
* happen. When this occurs the version of the template file will be bumped and
|
||||
* the readme will list any important changes.
|
||||
*
|
||||
* @see https://docs.woocommerce.com/document/template-structure/
|
||||
* @author WooThemes
|
||||
* @package WooCommerce/Templates
|
||||
* @version 2.2.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
?>
|
||||
|
||||
<p class="order-info"><?php
|
||||
/* translators: 1: order number 2: order date 3: order status */
|
||||
echo wp_kses_post( apply_filters( 'woocommerce_order_tracking_status', sprintf(
|
||||
__( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
|
||||
'<mark class="order-number">' . $order->get_order_number() . '</mark>',
|
||||
'<mark class="order-date">' . wc_format_datetime( $order->get_date_created() ) . '</mark>',
|
||||
'<mark class="order-status">' . wc_get_order_status_name( $order->get_status() ) . '</mark>'
|
||||
) ) );
|
||||
?></p>
|
||||
|
||||
<?php if ( $notes = $order->get_customer_order_notes() ) : ?>
|
||||
<h2><?php _e( 'Order updates', 'woocommerce' ); ?></h2>
|
||||
<ol class="commentlist notes">
|
||||
<?php foreach ( $notes as $note ) : ?>
|
||||
<li class="comment note">
|
||||
<div class="comment_container">
|
||||
<div class="comment-text">
|
||||
<p class="meta"><?php echo date_i18n( __( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); ?></p>
|
||||
<div class="description">
|
||||
<?php echo wpautop( wptexturize( $note->comment_content ) ); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_view_order', $order->get_id() ); ?>
|
||||
Reference in New Issue
Block a user