woocommerce/templates/checkout/thankyou.php

73 lines
2.1 KiB
PHP
Raw Normal View History

<?php
/**
2012-08-14 18:05:45 +00:00
* Thankyou page
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
2012-08-14 18:05:45 +00:00
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2012-08-14 18:05:45 +00:00
2012-02-03 16:17:35 +00:00
global $woocommerce;
?>
<?php if ($order) : ?>
<?php if (in_array($order->status, array('failed'))) : ?>
2012-08-14 18:05:45 +00:00
2012-10-16 09:45:33 +00:00
<p><?php _e( 'Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction.', 'woocommerce' ); ?></p>
<p><?php
if (is_user_logged_in()) :
2012-10-16 09:45:33 +00:00
_e( 'Please attempt your purchase again or go to your account page.', 'woocommerce' );
else :
2012-10-16 09:45:33 +00:00
_e( 'Please attempt your purchase again.', 'woocommerce' );
endif;
?></p>
2012-08-14 18:05:45 +00:00
<p>
2012-10-16 09:45:33 +00:00
<a href="<?php echo esc_url( $order->get_checkout_payment_url() ); ?>" class="button pay"><?php _e( 'Pay', 'woocommerce' ) ?></a>
<?php if (is_user_logged_in()) : ?>
2012-10-16 09:45:33 +00:00
<a href="<?php echo esc_url( get_permalink(woocommerce_get_page_id('myaccount')) ); ?>" class="button pay"><?php _e( 'My Account', 'woocommerce' ); ?></a>
<?php endif; ?>
</p>
<?php else : ?>
2012-08-14 18:05:45 +00:00
2012-10-16 09:45:33 +00:00
<p><?php _e( 'Thank you. Your order has been received.', 'woocommerce' ); ?></p>
2012-08-14 18:05:45 +00:00
<ul class="order_details">
<li class="order">
2012-10-16 09:45:33 +00:00
<?php _e( 'Order:', 'woocommerce' ); ?>
<strong><?php echo $order->get_order_number(); ?></strong>
</li>
<li class="date">
2012-10-16 09:45:33 +00:00
<?php _e( 'Date:', 'woocommerce' ); ?>
2012-01-25 15:23:32 +00:00
<strong><?php echo date_i18n(get_option('date_format'), strtotime($order->order_date)); ?></strong>
</li>
<li class="total">
2012-10-16 09:45:33 +00:00
<?php _e( 'Total:', 'woocommerce' ); ?>
<strong><?php echo $order->get_formatted_order_total(); ?></strong>
</li>
2012-03-05 13:25:02 +00:00
<?php if ($order->payment_method_title) : ?>
<li class="method">
2012-10-16 09:45:33 +00:00
<?php _e( 'Payment method:', 'woocommerce' ); ?>
2012-08-14 18:05:45 +00:00
<strong><?php
echo $order->payment_method_title;
?></strong>
</li>
2012-03-05 13:25:02 +00:00
<?php endif; ?>
</ul>
<div class="clear"></div>
2012-08-14 18:05:45 +00:00
<?php endif; ?>
2012-08-14 18:05:45 +00:00
<?php do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id ); ?>
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
<?php else : ?>
2012-08-14 18:05:45 +00:00
2012-10-16 09:45:33 +00:00
<p><?php _e( 'Thank you. Your order has been received.', 'woocommerce' ); ?></p>
2012-08-14 18:05:45 +00:00
<?php endif; ?>