Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.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.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_before_checkout_form', $checkout );
|
||||
|
||||
// If checkout registration is disabled and not logged in, the user cannot checkout.
|
||||
if ( ! $checkout->is_registration_enabled() && $checkout->is_registration_required() && ! is_user_logged_in() ) {
|
||||
echo esc_html( apply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ) );
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form>
|
||||
|
||||
<?php if ( $checkout->get_checkout_fields() ) : ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_customer_details' ); ?>
|
||||
|
||||
<div class="col2-set" id="customer_details">
|
||||
<div class="col-1">
|
||||
<?php do_action( 'woocommerce_checkout_billing' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<?php do_action( 'woocommerce_checkout_shipping' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_customer_details' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review_heading' ); ?>
|
||||
|
||||
<h3 id="order_review_heading"><?php esc_html_e( 'Your order', 'woocommerce' ); ?></h3>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_before_order_review' ); ?>
|
||||
|
||||
<div id="order_review" class="woocommerce-checkout-review-order">
|
||||
<?php do_action( 'woocommerce_checkout_order_review' ); ?>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'woocommerce_checkout_after_order_review' ); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php do_action( 'woocommerce_after_checkout_form', $checkout ); ?>
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout login form
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-login.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.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="woocommerce-form-login-toggle">
|
||||
<?php wc_print_notice( apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'woocommerce' ) ) . ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'woocommerce' ) . '</a>', 'notice' ); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
woocommerce_login_form(
|
||||
array(
|
||||
'message' => esc_html__( 'If you have shopped with us before, please enter your details below. If you are a new customer, please proceed to the Billing section.', 'woocommerce' ),
|
||||
'redirect' => wc_get_checkout_url(),
|
||||
'hidden' => true,
|
||||
)
|
||||
);
|
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Output a single payment method
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment-method.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.5.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$is_checked = ! empty( checked( $gateway->chosen, true, false ) );
|
||||
$checked_class = $is_checked ? 'et_pb_checked' : '';
|
||||
|
||||
$class = sprintf(
|
||||
'wc_payment_method payment_method_%1$s %2$s',
|
||||
esc_attr( $gateway->id ),
|
||||
$checked_class
|
||||
);
|
||||
?>
|
||||
<li class="<?php echo esc_attr( $class ); ?>">
|
||||
<input id="payment_method_<?php echo esc_attr( $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 esc_attr( $gateway->id ); ?>">
|
||||
<?php echo $gateway->get_title(); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped -- Set by WooCommerce plugin */ ?> <?php echo $gateway->get_icon(); /* phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped -- Set by WooCommerce plugin */ ?>
|
||||
</label>
|
||||
<?php if ( $gateway->has_fields() || $gateway->get_description() ) : ?>
|
||||
<div class="payment_box payment_method_<?php echo esc_attr( $gateway->id ); ?>" <?php if ( ! $gateway->chosen ) : /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace -- Set by WooCommerce plugin */ ?>style="display:none;"<?php endif; /* phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace -- Set by WooCommerce plugin */ ?>>
|
||||
<?php $gateway->payment_fields(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</li>
|
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Payment Section
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment.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.5.3
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if ( ! is_ajax() ) {
|
||||
do_action( 'woocommerce_review_order_before_payment' );
|
||||
}
|
||||
?>
|
||||
<div id="payment" class="woocommerce-checkout-payment">
|
||||
<?php if ( WC()->cart->needs_payment() ) : ?>
|
||||
<ul class="wc_payment_methods payment_methods methods">
|
||||
<?php
|
||||
if ( ! empty( $available_gateways ) ) {
|
||||
foreach ( $available_gateways as $gateway ) {
|
||||
wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
|
||||
}
|
||||
}
|
||||
echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' . apply_filters( 'woocommerce_no_available_payment_methods_message', WC()->customer->get_billing_country() ? esc_html__( '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' ) : esc_html__( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) . '</li>'; // @codingStandardsIgnoreLine
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<div class="form-row place-order">
|
||||
<noscript>
|
||||
<?php
|
||||
/* translators: $1 and $2 opening and closing emphasis tags respectively */
|
||||
printf( esc_html__( 'Since your browser does not support JavaScript, or it is disabled, please ensure you click the %1$sUpdate Totals%2$s button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'woocommerce' ), '<em>', '</em>' );
|
||||
?>
|
||||
<br/><button type="submit" class="button alt" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e( 'Update totals', 'woocommerce' ); ?>"><?php esc_html_e( 'Update totals', 'woocommerce' ); ?></button>
|
||||
</noscript>
|
||||
|
||||
<?php wc_get_template( 'checkout/terms.php' ); ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_submit' ); ?>
|
||||
|
||||
<?php echo apply_filters( 'woocommerce_order_button_html', '<button 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 ) . '">' . esc_html( $order_button_text ) . '</button>' ); // @codingStandardsIgnoreLine ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_submit' ); ?>
|
||||
|
||||
<?php wp_nonce_field( 'woocommerce-process_checkout', 'woocommerce-process-checkout-nonce' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( ! is_ajax() ) {
|
||||
do_action( 'woocommerce_review_order_after_payment' );
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/**
|
||||
* Review order table
|
||||
*
|
||||
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/review-order.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 5.2.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<table class="shop_table woocommerce-checkout-review-order-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
|
||||
<th class="product-total"><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<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 );
|
||||
|
||||
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 ) ); ?>">
|
||||
<td class="product-name">
|
||||
<?php echo wp_kses_post( apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ) ) . ' '; ?>
|
||||
<?php echo apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '× %s', $cart_item['quantity'] ) . '</strong>', $cart_item, $cart_item_key ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Set by WooCommerce plugin. ?>
|
||||
<?php echo wc_get_formatted_cart_item_data( $cart_item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Set by WooCommerce plugin. ?>
|
||||
</td>
|
||||
<td class="product-total">
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Set by WooCommerce plugin
|
||||
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>
|
||||
<tfoot>
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th><?php esc_html_e( 'Subtotal', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_subtotal_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr class="cart-discount coupon-<?php echo esc_attr( sanitize_title( 'DIVI' ) ); ?>">
|
||||
<th><?php esc_html_e( 'Coupon: DIVI', 'et_builder' ); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
$discount_amount_html = '-' . wc_price( '10.00' );
|
||||
$coupon_html = $discount_amount_html . ' <a href="#" class="woocommerce-remove-coupon">' . __( '[Remove]', 'et_builder' ) . '</a>';
|
||||
?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
$coupon_html,
|
||||
array_replace_recursive(
|
||||
wp_kses_allowed_html( 'post' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'data-coupon' => true,
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?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_tax_enabled() && ! WC()->cart->display_prices_including_tax() ) : ?>
|
||||
<?php if ( 'itemized' === get_option( 'woocommerce_tax_total_display' ) ) : ?>
|
||||
<?php foreach ( WC()->cart->get_tax_totals() as $code => $tax ) : // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Set by WooCommerce plugin ?>
|
||||
<tr class="tax-rate tax-rate-<?php echo esc_attr( 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 wc_cart_totals_taxes_total_html(); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_before_order_total' ); ?>
|
||||
|
||||
<tr class="order-total">
|
||||
<th><?php esc_html_e( 'Total', 'woocommerce' ); ?></th>
|
||||
<td><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action( 'woocommerce_review_order_after_order_total' ); ?>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
Reference in New Issue
Block a user