content-archive.php
3 years ago
content-cart.php
3 years ago
content-checkout-without-account.php
3 years ago
content-checkout.php
3 years ago
content-shop.php
3 years ago
content-single-product.php
3 years ago
gutenberg-default.php
3 years ago
gutenberg-shopengine_canvas_tpl.php
3 years ago
gutenberg-shopengine_full_width_tpl.php
3 years ago
content-checkout.php
92 lines
| 1 | <?php |
| 2 | |
| 3 | use ShopEngine\Core\Register\Module_List; |
| 4 | |
| 5 | defined('ABSPATH') || exit; ?> |
| 6 | |
| 7 | <div class="shopengine-quick-checkout-content-warper"> |
| 8 | <div class="woocommerce shopengine-woocommerce-checkout"> |
| 9 | |
| 10 | <?php if($this->get_page_type_option_slug() == 'quick_checkout'): ?> |
| 11 | <style> |
| 12 | #wpadminbar { |
| 13 | display: none!important; |
| 14 | } |
| 15 | html{ |
| 16 | margin: 0!important; |
| 17 | } |
| 18 | </style> |
| 19 | <?php endif; ?> |
| 20 | |
| 21 | <?php |
| 22 | |
| 23 | $checkout = WC()->checkout(); |
| 24 | |
| 25 | global $wp; |
| 26 | |
| 27 | while(have_posts()) : the_post(); |
| 28 | |
| 29 | do_action('woocommerce_before_checkout_form', $checkout); |
| 30 | |
| 31 | $skip_content = false; |
| 32 | |
| 33 | /** |
| 34 | * check multistep module active or not |
| 35 | * if active then check multistep checkout enabled or not in section |
| 36 | */ |
| 37 | $is_multistep_checkout_active = Module_List::instance()->is_widget_active('multistep-checkout'); |
| 38 | |
| 39 | $multistep_status = false; |
| 40 | if($is_multistep_checkout_active){ |
| 41 | $checkout_sections = json_decode(get_post_meta($this->prod_tpl_id,'_elementor_data', true), true); |
| 42 | if(is_array($checkout_sections)) { |
| 43 | foreach ($checkout_sections as $key => $checkout_section){ |
| 44 | $multistep = $checkout_section['settings']['shopengine_multistep_checkout_enable'] ?? ''; |
| 45 | if($multistep == 'enabled'){ |
| 46 | $multistep_status = true; |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | $login_reminder = get_option( 'woocommerce_enable_checkout_login_reminder' ); |
| 53 | |
| 54 | if ( isset( $wp->query_vars['order-pay'] ) ) : ?> |
| 55 | <div class="shopengine-order-pay-container"> |
| 56 | <?php |
| 57 | |
| 58 | if(\ShopEngine\Core\Builders\Action::is_edit_with_gutenberg($this->prod_tpl_id)) { |
| 59 | shopengine_content_render( do_blocks( get_the_content(null, false, $this->prod_tpl_id) ) ); |
| 60 | } else { |
| 61 | \ShopEngine\Core\Page_Templates\Hooks\Base_Content::instance()->load_content_designed_from_builder(); |
| 62 | } |
| 63 | |
| 64 | ?> |
| 65 | </div> |
| 66 | <?php else: ?> |
| 67 | <form name="checkout" |
| 68 | method="post" |
| 69 | class="checkout woocommerce-checkout shopengine-woocommerce-checkout-form" |
| 70 | action="<?php echo esc_url( wc_get_checkout_url() ); ?>" |
| 71 | enctype="multipart/form-data"> |
| 72 | <?php do_action( 'woocommerce_checkout_before_customer_details' ); ?> |
| 73 | |
| 74 | <?php |
| 75 | |
| 76 | if(\ShopEngine\Core\Builders\Action::is_edit_with_gutenberg($this->prod_tpl_id)) { |
| 77 | shopengine_content_render( do_blocks( get_the_content(null, false, $this->prod_tpl_id) ) ); |
| 78 | } else { |
| 79 | \ShopEngine\Core\Page_Templates\Hooks\Base_Content::instance()->load_content_designed_from_builder(); |
| 80 | } |
| 81 | ?> |
| 82 | <?php do_action( 'woocommerce_checkout_after_customer_details' ); ?> |
| 83 | |
| 84 | </form> |
| 85 | <?php endif; |
| 86 | |
| 87 | endwhile; |
| 88 | ?> |
| 89 | <?php do_action( 'woocommerce_after_checkout_form',$checkout) ?> |
| 90 | </div> |
| 91 | </div> |
| 92 |