default.php
85 lines
| 1 | <?php |
| 2 | |
| 3 | defined('ABSPATH') || exit; |
| 4 | |
| 5 | if ($post_type == \ShopEngine\Core\Template_Cpt::TYPE && (\Elementor\Plugin::$instance->editor->is_edit_mode() || is_preview())) { |
| 6 | |
| 7 | if ('no' === get_option('woocommerce_enable_checkout_login_reminder')) : ?> |
| 8 | <div class="shopengine shopengine-editor-alert shopengine-editor-alert-warning"> |
| 9 | <?php echo esc_html__('This option is turned off from settings', 'shopengine'); ?> |
| 10 | </div> |
| 11 | <?php |
| 12 | |
| 13 | return; |
| 14 | |
| 15 | endif; |
| 16 | |
| 17 | if (!function_exists('wc_print_notice')) { |
| 18 | require_once WC_ABSPATH . 'includes/wc-notice-functions.php'; |
| 19 | } |
| 20 | |
| 21 | ?> |
| 22 | <div class="shopengine-checkout-form-login"> |
| 23 | <div class="woocommerce-form-login-toggle"> |
| 24 | <?php wc_print_notice( apply_filters( 'woocommerce_checkout_login_message', esc_html__( 'Returning customer?', 'shopengine' ) ) . ' <a href="#" class="showlogin">' . esc_html__( 'Click here to login', 'shopengine' ) . '</a>', 'notice' ); ?> |
| 25 | </div> |
| 26 | <?php |
| 27 | $hidden = false; |
| 28 | $redirect = wc_get_checkout_url(); |
| 29 | $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.', 'shopengine'); |
| 30 | ?> |
| 31 | <form class="woocommerce-form woocommerce-form-login login" method="post" <?php echo ($hidden) ? 'style="display:none;"' : ''; ?>> |
| 32 | |
| 33 | <?php do_action('woocommerce_login_form_start'); ?> |
| 34 | |
| 35 | <?php echo ($message) ? wpautop(wptexturize($message)) : ''; // @codingStandardsIgnoreLine |
| 36 | ?> |
| 37 | |
| 38 | <p class="form-row form-row-first"> |
| 39 | <label for="username"><?php esc_html_e('Username or email', 'shopengine'); ?> <span class="required">*</span></label> |
| 40 | <input type="text" class="input-text" name="username" id="username" autocomplete="username" required /> |
| 41 | </p> |
| 42 | <p class="form-row form-row-last"> |
| 43 | <label for="password"><?php esc_html_e('Password', 'shopengine'); ?> <span class="required">*</span></label> |
| 44 | <input class="input-text" type="password" name="password" id="password" autocomplete="current-password" required /> |
| 45 | </p> |
| 46 | <div class="clear"></div> |
| 47 | |
| 48 | <?php do_action('woocommerce_login_form'); ?> |
| 49 | |
| 50 | <p class="form-row"> |
| 51 | <label class="woocommerce-form__label woocommerce-form__label-for-checkbox woocommerce-form-login__rememberme"> |
| 52 | <input class="woocommerce-form__input woocommerce-form__input-checkbox" name="rememberme" type="checkbox" id="rememberme" value="forever" /> |
| 53 | <span><?php esc_html_e('Remember me', 'shopengine'); ?></span> |
| 54 | </label> |
| 55 | <?php wp_nonce_field('woocommerce-login', 'woocommerce-login-nonce'); ?> |
| 56 | <input type="hidden" name="redirect" value="<?php echo esc_url($redirect); ?>" /> |
| 57 | <button type="submit" class="woocommerce-button button woocommerce-form-login__submit" name="login" value="<?php esc_attr_e('Login', 'shopengine'); ?>"><?php esc_html_e('Login', 'shopengine'); ?></button> |
| 58 | </p> |
| 59 | <p class="lost_password"> |
| 60 | <a title="<?php esc_html_e('Lost Password', 'shopengine') ?>" href="<?php echo esc_url(wp_lostpassword_url()); ?>"><?php esc_html_e('Lost your password?', 'shopengine'); ?></a> |
| 61 | </p> |
| 62 | |
| 63 | <div class="clear"></div> |
| 64 | |
| 65 | <?php do_action('woocommerce_login_form_end'); ?> |
| 66 | |
| 67 | </form> |
| 68 | |
| 69 | </div> |
| 70 | <?php |
| 71 | } else { |
| 72 | ?> |
| 73 | <div class="shopengine-checkout-form-login"> |
| 74 | <?php woocommerce_checkout_login_form(); ?> |
| 75 | </div> |
| 76 | <?php if (!is_user_logged_in()) { ?> |
| 77 | <p class="shopengine-multistep-active" style="display: none;"> |
| 78 | <?php |
| 79 | echo wp_kses("<strong> Note: </strong> Don't have an account? proceed to next step and checked the <strong>Create an account?</strong> checkbox.",array('strong' => array())); |
| 80 | ?> |
| 81 | </p> |
| 82 | <?php |
| 83 | } |
| 84 | } |
| 85 |