Initial Commit N° : 001 - V.4.3.3
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Checkout Form
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 9.4.0
|
||||
*/
|
||||
|
||||
if (!defined('ABSPATH')) :
|
||||
exit; // Exit if accessed directly
|
||||
endif;
|
||||
|
||||
do_action('nasa_checkout_form_layout', $checkout);
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Checkout coupon form
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 7.0.1
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!wc_coupons_enabled()) : // @codingStandardsIgnoreLine.
|
||||
return;
|
||||
endif;
|
||||
|
||||
defined('NASA_CHECKOUT_LAYOUT') or define('NASA_CHECKOUT_LAYOUT', 'default');
|
||||
?>
|
||||
|
||||
<div class="woocommerce-form-coupon-toggle nasa-toggle-coupon-checkout">
|
||||
<?php wc_print_notice(apply_filters('woocommerce_checkout_coupon_message', __('Have a coupon?', 'elessi-theme') . ' <a href="#" class="showcoupon">' . __('Click here to enter your code', 'elessi-theme') . '<svg width="30" height="30" viewBox="0 0 32 32"><path d="M15.233 19.175l0.754 0.754 6.035-6.035-0.754-0.754-5.281 5.281-5.256-5.256-0.754 0.754 3.013 3.013z" fill="currentColor" /></svg></a>'), 'notice'); ?>
|
||||
</div>
|
||||
|
||||
<form class="checkout_coupon woocommerce-form-coupon" method="post" style="display:none">
|
||||
<div class="row">
|
||||
<div class="large-7 columns">
|
||||
<p><?php esc_html_e('If you have a coupon code, please apply it below.', 'elessi-theme'); ?></p>
|
||||
|
||||
<div class="form-row form-row-first coupon">
|
||||
<input type="text" name="coupon_code" class="input-text" placeholder="<?php esc_attr_e('Coupon code', 'elessi-theme'); ?>" id="coupon_code" value="" />
|
||||
<button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e('Apply coupon', 'elessi-theme'); ?>"><?php esc_html_e('Apply coupon', 'elessi-theme'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="large-5 columns title-align-left">
|
||||
<?php
|
||||
if (NASA_CHECKOUT_LAYOUT !== 'modern') {
|
||||
elessi_checkout_get_coupon_slide();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout login form
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 3.8.0
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
if (is_user_logged_in() || 'no' === get_option('woocommerce_enable_checkout_login_reminder')) :
|
||||
return;
|
||||
endif;
|
||||
|
||||
?>
|
||||
<div class="woocommerce-form-login-toggle">
|
||||
<svg class="ns-svg-user hidden-tag" width="25" height="25" viewBox="0 0 32 32"><path d="M16 3.205c-7.067 0-12.795 5.728-12.795 12.795s5.728 12.795 12.795 12.795 12.795-5.728 12.795-12.795c0-7.067-5.728-12.795-12.795-12.795zM16 4.271c6.467 0 11.729 5.261 11.729 11.729 0 2.845-1.019 5.457-2.711 7.49-1.169-0.488-3.93-1.446-5.638-1.951-0.146-0.046-0.169-0.053-0.169-0.66 0-0.501 0.206-1.005 0.407-1.432 0.218-0.464 0.476-1.244 0.569-1.944 0.259-0.301 0.612-0.895 0.839-2.026 0.199-0.997 0.106-1.36-0.026-1.7-0.014-0.036-0.028-0.071-0.039-0.107-0.050-0.234 0.019-1.448 0.189-2.391 0.118-0.647-0.030-2.022-0.921-3.159-0.562-0.719-1.638-1.601-3.603-1.724l-1.078 0.001c-1.932 0.122-3.008 1.004-3.57 1.723-0.89 1.137-1.038 2.513-0.92 3.159 0.172 0.943 0.239 2.157 0.191 2.387-0.010 0.040-0.025 0.075-0.040 0.111-0.131 0.341-0.225 0.703-0.025 1.7 0.226 1.131 0.579 1.725 0.839 2.026 0.092 0.7 0.35 1.48 0.569 1.944 0.159 0.339 0.234 0.801 0.234 1.454 0 0.607-0.023 0.614-0.159 0.657-1.767 0.522-4.579 1.538-5.628 1.997-1.725-2.042-2.768-4.679-2.768-7.555 0-6.467 5.261-11.729 11.729-11.729zM7.811 24.386c1.201-0.49 3.594-1.344 5.167-1.808 0.914-0.288 0.914-1.058 0.914-1.677 0-0.513-0.035-1.269-0.335-1.908-0.206-0.438-0.442-1.189-0.494-1.776-0.011-0.137-0.076-0.265-0.18-0.355-0.151-0.132-0.458-0.616-0.654-1.593-0.155-0.773-0.089-0.942-0.026-1.106 0.027-0.070 0.053-0.139 0.074-0.216 0.128-0.468-0.015-2.005-0.17-2.858-0.068-0.371 0.018-1.424 0.711-2.311 0.622-0.795 1.563-1.238 2.764-1.315l1.011-0.001c1.233 0.078 2.174 0.521 2.797 1.316 0.694 0.887 0.778 1.94 0.71 2.312-0.154 0.852-0.298 2.39-0.17 2.857 0.022 0.078 0.047 0.147 0.074 0.217 0.064 0.163 0.129 0.333-0.025 1.106-0.196 0.977-0.504 1.461-0.655 1.593-0.103 0.091-0.168 0.218-0.18 0.355-0.051 0.588-0.286 1.338-0.492 1.776-0.236 0.502-0.508 1.171-0.508 1.886 0 0.619 0 1.389 0.924 1.68 1.505 0.445 3.91 1.271 5.18 1.77-2.121 2.1-5.035 3.4-8.248 3.4-3.183 0-6.073-1.277-8.188-3.342z" fill="currentColor"/></svg>
|
||||
<?php wc_print_notice(apply_filters('woocommerce_checkout_login_message',esc_html__('Returning customer?', 'elessi-theme')) . ' <a href="#" class="showlogin">' . esc_html__('Click here to login', 'elessi-theme') . '<svg width="30" height="30" viewBox="0 0 32 32"><path d="M15.233 19.175l0.754 0.754 6.035-6.035-0.754-0.754-5.281 5.281-5.256-5.256-0.754 0.754 3.013 3.013z" fill="currentColor"/></svg></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.', 'elessi-theme'),
|
||||
'redirect' => wc_get_checkout_url(),
|
||||
'hidden' => true,
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Checkout Payment Section
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 8.1.0
|
||||
*/
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!wp_doing_ajax()) :
|
||||
do_action('woocommerce_review_order_before_payment');
|
||||
endif;
|
||||
?>
|
||||
|
||||
<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));
|
||||
endforeach;
|
||||
else :
|
||||
echo '<li>';
|
||||
wc_print_notice(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. Please contact us if you require assistance or wish to make alternate arrangements.', 'elessi-theme') : esc_html__('Please fill in your details above to see available payment methods.', 'elessi-theme') ), 'notice'); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
|
||||
echo '</li>';
|
||||
endif;
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Custom Hook for - Add our Recommend Products to your Order
|
||||
*/
|
||||
do_action('ns_before_place_order_payment'); ?>
|
||||
|
||||
<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.', 'elessi-theme'), '<em>', '</em>');
|
||||
?>
|
||||
<br /><button type="submit" class="button alt<?php echo esc_attr(wc_wp_theme_get_element_class_name('button') ? ' ' . wc_wp_theme_get_element_class_name('button') : ''); ?>" name="woocommerce_checkout_update_totals" value="<?php esc_attr_e('Update totals', 'elessi-theme'); ?>"><?php esc_html_e('Update totals', 'elessi-theme'); ?></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' . esc_attr(wc_wp_theme_get_element_class_name('button') ? ' ' . wc_wp_theme_get_element_class_name('button') : '') . '" 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 (!wp_doing_ajax()) :
|
||||
do_action('woocommerce_review_order_after_payment');
|
||||
endif;
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Review order table
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 5.2.0
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
global $nasa_opt;
|
||||
?>
|
||||
|
||||
<table class="shop_table woocommerce-checkout-review-order-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="product-name" ><?php esc_html_e('Product', 'elessi-theme'); ?></th>
|
||||
<th class="product-total"><?php esc_html_e('Subtotal', 'elessi-theme'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
do_action('woocommerce_review_order_before_cart_contents');
|
||||
|
||||
$cart = WC()->cart->get_cart();
|
||||
|
||||
foreach ($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)) :
|
||||
|
||||
$product_name = apply_filters('woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key);
|
||||
$product_price = apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $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" colspan="2">
|
||||
<div class="co-wrap-item">
|
||||
<?php if (!isset($nasa_opt['mini_checkout_img']) || $nasa_opt['mini_checkout_img']) : ?>
|
||||
<div class="co-wrap-img margin-right-15 rtl-margin-right-0 rtl-margin-left-15 nasa-relative">
|
||||
<?php echo apply_filters('woocommerce_cart_item_thumbnail', $_product->get_image('thumbnail'), $cart_item, $cart_item_key); ?>
|
||||
|
||||
<?php echo apply_filters('woocommerce_checkout_cart_item_quantity', '<span class="product-quantity quantity-review-item">' . sprintf('%s', $cart_item['quantity']) . '</span>', $cart_item, $cart_item_key); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="co-wrap-info nasa-flex flex-wrap jbw align-start">
|
||||
<span class="co-product-name">
|
||||
<?php
|
||||
echo $product_name;
|
||||
|
||||
if (isset($nasa_opt['mini_checkout_img']) && !$nasa_opt['mini_checkout_img'] && (!isset($nasa_opt['mini_checkout_qty']) || !$nasa_opt['mini_checkout_qty'])) :
|
||||
echo apply_filters('woocommerce_checkout_cart_item_quantity', '<strong class="product-quantity">' . sprintf(' × %s', $cart_item['quantity']) . '</strong>', $cart_item, $cart_item_key );
|
||||
endif;
|
||||
?>
|
||||
</span>
|
||||
|
||||
<?php echo wc_get_formatted_cart_item_data($cart_item); ?>
|
||||
|
||||
<?php
|
||||
if (isset($nasa_opt['mini_checkout_qty']) && $nasa_opt['mini_checkout_qty']) :
|
||||
if ($_product->is_sold_individually()) :
|
||||
$min_quantity = 1;
|
||||
$max_quantity = 1;
|
||||
else :
|
||||
$min_quantity = 0;
|
||||
$max_quantity = $_product->get_max_purchase_quantity();
|
||||
endif;
|
||||
|
||||
$product_quantity = woocommerce_quantity_input(
|
||||
array(
|
||||
'input_name' => 'cart[' . $cart_item_key . '][qty]',
|
||||
'input_value' => $cart_item['quantity'],
|
||||
'max_value' => $max_quantity,
|
||||
'min_value' => $min_quantity,
|
||||
'product_name' => $product_name
|
||||
),
|
||||
$_product,
|
||||
false
|
||||
);
|
||||
|
||||
echo apply_filters('woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item); // PHPCS: XSS ok.
|
||||
endif;
|
||||
?>
|
||||
|
||||
<div 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); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
do_action('woocommerce_review_order_after_cart_contents');
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<?php do_action('nasa_review_order_before_cart_subtotal');?>
|
||||
|
||||
<tr class="cart-subtotal">
|
||||
<th><?php esc_html_e('Subtotal', 'elessi-theme'); ?></th>
|
||||
<td ><?php wc_cart_totals_subtotal_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php $coupons = WC()->cart->get_coupons(); ?>
|
||||
<?php if ($coupons): ?>
|
||||
<?php foreach ($coupons as $code => $coupon) : ?>
|
||||
<tr class="cart-discount coupon-<?php echo esc_attr(sanitize_title($code)); ?>">
|
||||
<th><?php wc_cart_totals_coupon_label($coupon); ?></th>
|
||||
<td ><?php wc_cart_totals_coupon_html($coupon); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) : ?>
|
||||
<?php do_action('woocommerce_review_order_before_shipping'); ?>
|
||||
|
||||
<?php if (!defined('NASA_CHECKOUT_LAYOUT') || NASA_CHECKOUT_LAYOUT != 'modern') : ?>
|
||||
<?php wc_cart_totals_shipping_html(); ?>
|
||||
<?php else : ?>
|
||||
<tr class="order-shipping-modern hidden-tag"><th></th><td ></td></tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action('woocommerce_review_order_after_shipping'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $fees = WC()->cart->get_fees(); ?>
|
||||
<?php if ($fees) : ?>
|
||||
<?php foreach ($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 endif; ?>
|
||||
|
||||
<?php if (wc_tax_enabled() && !WC()->cart->display_prices_including_tax()) : ?>
|
||||
<?php if ('itemized' === get_option('woocommerce_tax_total_display')) : ?>
|
||||
<?php
|
||||
$taxs = WC()->cart->get_tax_totals();
|
||||
foreach ($taxs as $code => $tax) : ?>
|
||||
<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', 'elessi-theme'); ?></th>
|
||||
<td ><?php wc_cart_totals_order_total_html(); ?></td>
|
||||
</tr>
|
||||
|
||||
<?php do_action('woocommerce_review_order_after_order_total'); ?>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* Thankyou page
|
||||
*
|
||||
* @author NasaTheme
|
||||
* @package Elessi-theme/WooCommerce
|
||||
* @version 8.1.0
|
||||
*/
|
||||
|
||||
defined('ABSPATH') or exit;
|
||||
|
||||
echo '<div class="woocommerce-order">';
|
||||
|
||||
if ($order) :
|
||||
do_action('woocommerce_before_thankyou', $order->get_id());
|
||||
?>
|
||||
|
||||
<div class="row nasa-order-received">
|
||||
<div class="large-12 columns nasa-order-received-left">
|
||||
<div class="nasa-warper-order margin-bottom-20">
|
||||
|
||||
<?php if ($order->has_status('failed')) : ?>
|
||||
|
||||
<p class="woocommerce-thankyou-order-failed">
|
||||
<?php esc_html_e('Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.', 'elessi-theme'); ?>
|
||||
</p>
|
||||
|
||||
<p class="woocommerce-thankyou-order-failed-actions">
|
||||
<a href="<?php echo esc_url($order->get_checkout_payment_url()); ?>" class="button pay">
|
||||
<?php esc_html_e('Pay', 'elessi-theme') ?>
|
||||
</a>
|
||||
|
||||
<?php if (NASA_CORE_USER_LOGGED) : ?>
|
||||
<a href="<?php echo esc_url(wc_get_page_permalink('myaccount')); ?>" class="button pay">
|
||||
<?php esc_html_e('My Account', 'elessi-theme'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php wc_get_template('checkout/order-received.php', array('order' => $order)); ?>
|
||||
|
||||
<ul class="woocommerce-thankyou-order-details order_details">
|
||||
<li class="order">
|
||||
<?php esc_html_e('Order Number', 'elessi-theme'); ?>
|
||||
<strong><?php echo $order->get_order_number(); ?></strong>
|
||||
</li>
|
||||
<li class="date">
|
||||
<?php esc_html_e('Date', 'elessi-theme'); ?>
|
||||
<strong><?php echo wc_format_datetime($order->get_date_created()); ?></strong>
|
||||
</li>
|
||||
<li class="total">
|
||||
<?php esc_html_e('Total', 'elessi-theme'); ?>
|
||||
<strong><?php echo $order->get_formatted_order_total(); ?></strong>
|
||||
</li>
|
||||
<?php if ($order->get_payment_method_title()) : ?>
|
||||
<li class="method">
|
||||
<?php esc_html_e('Payment Method', 'elessi-theme'); ?>
|
||||
<strong><?php echo wp_kses_post($order->get_payment_method_title()); ?></strong>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="large-12 columns nasa-order-received-right">
|
||||
<div class="nasa-warper-order">
|
||||
<?php do_action('woocommerce_thankyou_' . $order->get_payment_method(), $order->get_id()); ?>
|
||||
<?php do_action('woocommerce_thankyou', $order->get_id()); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php wc_get_template('checkout/order-received.php', array('order' => false)); ?>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
echo '</div>';
|
||||
Reference in New Issue
Block a user