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