woocommerce/templates/checkout/thankyou.php

67 lines
2.0 KiB
PHP
Raw Normal View History

<?php
/**
* Thankyou Page
*/
2012-02-03 16:17:35 +00:00
global $woocommerce;
?>
<?php if ($order) : ?>
<?php if (in_array($order->status, array('failed'))) : ?>
2012-01-05 11:31:22 +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-01-05 11:31:22 +00:00
_e('Please attempt your purchase again or go to your account page.', 'woocommerce');
else :
2012-01-05 11:31:22 +00:00
_e('Please attempt your purchase again.', 'woocommerce');
endif;
?></p>
<p>
2012-01-05 11:31:22 +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-01-06 17:14:31 +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-01-05 11:31:22 +00:00
<p><?php _e('Thank you. Your order has been received.', 'woocommerce'); ?></p>
<ul class="order_details">
<li class="order">
2012-01-05 11:31:22 +00:00
<?php _e('Order:', 'woocommerce'); ?>
<strong><?php echo $order->get_order_number(); ?></strong>
</li>
<li class="date">
2012-01-05 11:31:22 +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-01-05 11:31:22 +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-01-05 11:31:22 +00:00
<?php _e('Payment method:', 'woocommerce'); ?>
<strong><?php
echo $order->payment_method_title;
?></strong>
</li>
2012-03-05 13:25:02 +00:00
<?php endif; ?>
</ul>
<div class="clear"></div>
<?php endif; ?>
<?php do_action( 'woocommerce_thankyou_' . $order->payment_method, $order->id ); ?>
<?php do_action( 'woocommerce_thankyou', $order->id ); ?>
<?php else : ?>
2012-01-05 11:31:22 +00:00
<p><?php _e('Thank you. Your order has been received.', 'woocommerce'); ?></p>
<?php endif; ?>