Template-Ordner: checkout
Datei: review-order.php
WooCommerce: 2.1.2
eingestellt am: 21.02.2014
Theme/Framework: vertrieb-im-netz/headway
<?php
/**
* Review order form
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.0
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
?>
<div id="order_review">
<?php /* Zahlungsweise hier eingefuegt */?>
<h3><strong>Zahlungsweise</strong></h3>
<?php if ( WC()->cart->needs_payment() ) : ?>
<ul class="payment_methods methods">
<?php
$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
if ( ! empty( $available_gateways ) ) {
// Chosen Method
if ( isset( WC()->session->chosen_payment_method ) && isset( $available_gateways[ WC()->session->chosen_payment_method ] ) ) {
$available_gateways[ WC()->session->chosen_payment_method ]->set_current();
} elseif ( isset( $available_gateways[ get_option( 'woocommerce_default_gateway' ) ] ) ) {
$available_gateways[ get_option( 'woocommerce_default_gateway' ) ]->set_current();
} else {
current( $available_gateways )->set_current();
}
foreach ( $available_gateways as $gateway ) {
?>
<li class="payment_method_<?php echo $gateway->id; ?>">
<?php /* order_button_text aendern */ ?>
<?php $gateway->order_button_text = 'kostenpflichtig bestellen'; ?>
<input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />
<label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?></label>
<?php
if ( $gateway->has_fields() || $gateway->get_description() ) :
echo '<div class="payment_box payment_method_' . $gateway->id . '" ' . ( $gateway->chosen ? '' : 'style="display:none;"' ) . '>';
$gateway->payment_fields();
echo '</div>';
endif;
?>
</li>
<?php
}
} else {
if ( ! WC()->customer->get_country() )
echo '<p>' . __( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) . '</p>';
else
echo '<p>' . __( 'Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) . '</p>';
}
?>
</ul>
<?php endif; ?>
<?php /*Zahlungsweise Ende */ ?>
<!-- eingefuegt aus form-checkout.php -->
<strong><h3 id="order_review_heading"><?php _e( 'Your order', 'woocommerce' ); ?></h3></strong>
<!-- --------------------------------- -->
<table class="shop_table">
<thead>
<tr>
<th class="product-name"><?php _e( 'Bild', 'woocommerce' ); ?></th>
<th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th>
<th class="product-name"><?php echo "Menge" ?></th> <!-- Spalte mit Menge einfuegen -->
<th class="product-name"><?php echo "Einzelpreis" ?></th> <!-- Einzelpreis in Tabelle einfuegen -->
<th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th>
</tr>
</thead>
<tfoot>
<tr class="cart-subtotal">
<th></th>
<th><?php _e( 'Cart Subtotal', 'woocommerce' ); ?></th>
<th></th> <!-- leere Spalte einfuegen -->
<th></th> <!-- leere Spalte einfuegen -->
<td><?php wc_cart_totals_subtotal_html(); ?></td>
</tr>
<?php foreach ( WC()->cart->get_coupons( 'cart' ) as $code => $coupon ) : ?>
<tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>">
<th><?php _e( 'Coupon:', 'woocommerce' ); ?> <?php echo esc_html( $code ); ?></th>
<td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
</tr>
<?php endforeach; ?>
<?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
<?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
<?php wc_cart_totals_shipping_html(); ?>
<?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
<?php endif; ?>
<?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
<tr class="fee">
<th><?php echo esc_html( $fee->name ); ?></th>
<td><?php wc_cart_totals_fee_html( $fee ); ?></td>
</tr>
<?php endforeach; ?>
<?php if ( WC()->cart->tax_display_cart === 'excl' ) : ?>
<?php if ( get_option( 'woocommerce_tax_total_display' ) === 'itemized' ) : ?>
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : ?>
<tr class="tax-rate tax-rate-<?php echo sanitize_title( $code ); ?>">
<th><?php echo esc_html( $tax->label ); ?></th>
<td><?php echo wp_kses_post( $tax->formatted_amount ); ?></td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr class="tax-total">
<th><?php echo esc_html( WC()->countries->tax_or_vat() ); ?></th>
<td><?php echo wc_price( WC()->cart->get_taxes_total() ); ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php foreach ( WC()->cart->get_coupons( 'order' ) as $code => $coupon ) : ?>
<tr class="order-discount coupon-<?php echo esc_attr( $code ); ?>">
<th><?php _e( 'Coupon:', 'woocommerce' ); ?> <?php echo esc_html( $code ); ?></th>
<td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
</tr>
<?php endforeach; ?>
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
<tr class="order-total">
<th></th>
<th><strong><?php _e( 'Order Total', 'woocommerce' ); ?><strong><div style="font-weight:normal;font-size:12px;">
<?php echo '(inkl. 19% MwSt. und ';?><a href="https://www.vertrieb-im-netz.de/versandkosten">Versandkosten</a>)</div></th> <!-- hinzufuegen inkl. MwSt. und Versand -->
<th></th> <!-- leere Spalte einfuegen -->
<th></th> <!-- leere Spalte einfuegen -->
<td><?php wc_cart_totals_order_total_html(); ?></td>
</tr>
<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
</tfoot>
<tbody>
<?php
do_action( 'woocommerce_review_order_before_cart_contents' );
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
$_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
// Variable für Einzelpreisermittlung
$product_price = get_option('woocommerce_tax_display_cart') == 'excl' ? $_product->get_price_excluding_tax() : $_product->get_price_including_tax();
if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_checkout_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
?>
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
<!-- neuer Block fuer Thumbnail -->
<td class="product-thumbnail">
<?php
$thumbnail = apply_filters( 'woocommerce_in_cart_product_thumbnail', $_product->get_image(), $values, $cart_item_key );
if ( ! $_product->is_visible() || ( ! empty( $_product->variation_id ) && ! $_product->parent_is_visible() ) )
echo $thumbnail;
else
printf('<a href="%s">%s</a>', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), $thumbnail );
?>
</td>
<!-- Ende neuer Block -->
<td class="product-name">
<?php /*echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key ); */?>
<?php /* neuer Code fuer Name inkl. Verlinkung */
if ( ! $_product->is_visible() )
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key );
else
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', $_product->get_permalink(), $_product->get_title() ), $cart_item, $cart_item_key );
/* Ende */ ?>
<?php /* Kurzbeschreibung mit Formatierung einfuegen */ ?>
<?php echo '<div class="kurzbeschreibung_checkout">';
echo apply_filters( 'woocommerce_short_description', $_product->post->post_excerpt );
echo '</div>'; ?>
</td>
<?php /* neue Spalte fuer Menge */?>
<td>
<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '%s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); ?>
<?php echo WC()->cart->get_item_data( $cart_item ); ?>
</td>
<?php /* Einzelpreis einfuegen */ ?>
<td>
<?php echo apply_filters('woocommerce_cart_item_price_html', woocommerce_price( $product_price ), $values, $cart_item_key); ?>
</td>
<td class="product-total">
<?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
</td>
</tr>
<?php
}
}
do_action( 'woocommerce_review_order_after_cart_contents' );
?>
</tbody>
</table>
<?php do_action( 'woocommerce_review_order_before_payment' ); ?>
<div id="payment">
<?php /* hier stehen die Zahlungsinformationen im Original */ ?>
<div class="form-row place-order">
<noscript><?php _e( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ); ?><br/><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php _e( 'Update totals', 'woocommerce' ); ?>" /></noscript>
<?php wp_nonce_field( 'woocommerce-process_checkout' ); ?>
<?php do_action( 'woocommerce_review_order_before_submit' ); ?>
<?php
/* $order_button_text = apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ); */
$order_button_text = 'kostenpflichtig bestellen';
echo apply_filters( 'woocommerce_order_button_html', '<input type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="' . esc_attr( $order_button_text ) . '" data-value="' . esc_attr( $order_button_text ) . '" />' );
?>
<?php if ( wc_get_page_id( 'terms' ) > 0 && apply_filters( 'woocommerce_checkout_show_terms', true ) ) {
$terms_is_checked = apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) );
?>
<p class="form-row terms">
<label for="terms" class="checkbox"><?php _e( 'I have read and accept the', 'woocommerce' ); ?> <a href="<?php echo esc_url( get_permalink(wc_get_page_id('terms')) ); ?>" target="_blank"><?php _e( 'terms & conditions', 'woocommerce' ); ?></a></label>
<input type="checkbox" class="input-checkbox" name="terms" <?php checked( $terms_is_checked, true ); ?> id="terms" />
</p>
<?php } ?>
<?php do_action( 'woocommerce_review_order_after_submit' ); ?>
</div>
<div class="clear"></div>
</div>
<?php do_action( 'woocommerce_review_order_after_payment' ); ?>
</div>
[fb_share]
Ich finde es wirklich klasse, dass Sie sich all diese Mühe machen und die Informationen aufbereitet für uns präsentieren. Weiter so!
Vielen Dank für Ihr positives und motivierendes Feedback.
Grüße
Ralf
[…] Name: review-order.php, eingestellt am: 21.02.2014, WooCommerce Version: 2.1.2, Theme/Framework: ver… […]