PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 1.1.0.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v1.1.0.1
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / flow / view / meta-flow-steps.php

meta-flow-steps.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 1.1.0.1, at modules/flow/view/meta-flow-steps.php

169 lines 7.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * View Flow steps
4 *
5 * @package CartFlows
6 */
7
8 $get_steps = array(
9 'landing' => __( 'Landing', 'cartflows' ),
10 'checkout' => __( 'Checkout', 'cartflows' ),
11 'thankyou' => __( 'Thank You', 'cartflows' ),
12 'upsell' => __( 'Upsell', 'cartflows' ),
13 'downsell' => __( 'Downsell', 'cartflows' ),
14
15 );
16
17 ?>
18 <div class="wcf-flow-steps-meta-box">
19 <div class="wcf-flow-settings">
20 <?php do_action( 'cartflows_above_flow_steps' ); ?>
21 <div class="wcf-flow-steps-wrap">
22 <div class="wcf-flow-steps-container">
23 <?php if ( is_array( $options['steps'] ) ) { ?>
24 <?php foreach ( $options['steps'] as $index => $data ) { ?>
25 <?php
26 $term_slug = '';
27 $term_name = '';
28 $step_wrap_class = '';
29 $has_product_assigned = true;
30 $is_global_checkout = '';
31 $common = '';
32
33 if ( isset( $data['type'] ) ) {
34 $term_slug = $data['type'];
35 $term_name = $get_steps[ $data['type'] ];
36 }
37
38 if ( ! _is_cartflows_pro() && ( 'upsell' === $term_slug || 'downsell' === $term_slug ) ) {
39 $step_wrap_class .= ' invalid-step';
40 }
41
42 if ( isset( $_GET['highlight-step-id'] ) && $_GET['highlight-step-id'] == $data['id'] ) {
43 $step_wrap_class .= ' wcf-new-step-highlight';
44 }
45
46 if ( 'checkout' === $term_slug ) {
47
48 $common = Cartflows_Helper::get_common_settings();
49
50 $is_global_checkout = (int) $common['global_checkout'];
51
52 if ( $data['id'] === $is_global_checkout ) {
53 $step_wrap_class .= ' wcf-global-checkout';
54 }
55 }
56
57 if ( 'upsell' === $term_slug || 'downsell' === $term_slug || 'checkout' === $term_slug ) {
58
59 $has_product_assigned = Cartflows_Helper::has_product_assigned( $data['id'] );
60
61 if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
62 $step_wrap_class .= ' wcf-no-product-step';
63 }
64 }
65
66 ?>
67 <div class="wcf-step-wrap <?php echo $step_wrap_class; ?>" data-id="<?php echo $data['id']; ?>" data-term-slug="<?php echo esc_attr( $term_slug ); ?>">
68 <div class="wcf-step">
69 <div class="wcf-step-left-content">
70 <span class="dashicons dashicons-menu"></span>
71 <span><?php echo wp_trim_words( get_the_title( $data['id'] ), 3 ); ?></span>
72 <span class="wcf-flow-badge"><?php echo esc_attr( $term_name ); ?></span>
73
74 <?php
75 if ( ( ! $has_product_assigned ) && ( $data['id'] != $is_global_checkout ) ) {
76 ?>
77 <span class="wcf-no-product-badge"><?php _e( 'No Product Assigned', 'cartflows' ); ?></span>
78 <?php
79 } elseif ( ( $has_product_assigned ) && ( $data['id'] === $is_global_checkout ) ) {
80 ?>
81 <span class="wcf-global-checkout-badge"><?php _e( 'Global Checkout - Remove selected checkout product', 'cartflows' ); ?></span>
82 <?php
83 } elseif ( ( ! $has_product_assigned ) && $data['id'] === $is_global_checkout ) {
84 ?>
85 <span class="wcf-global-checkout-badge"><?php _e( 'Global Checkout', 'cartflows' ); ?></span>
86 <?php
87 }
88 ?>
89
90 <input type="hidden" class="wcf-steps-hidden" name="wcf-steps[]" value="<?php echo $data['id']; ?>">
91 </div>
92 <div class="wcf-steps-action-buttons">
93 <a href="<?php echo get_permalink( $data['id'] ); ?>" target="_blank" class="wcf-step-view wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'View Step', 'cartflows' ); ?>" >
94 <span class="dashicons dashicons-visibility"></span>
95 <span class="wcf-step-act-btn-text">View</span>
96 </a>
97 <a href="<?php echo get_edit_post_link( $data['id'] ); ?>" class="wcf-step-edit wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Edit Step', 'cartflows' ); ?>" >
98 <span class="dashicons dashicons-edit"></span>
99 <span class="wcf-step-act-btn-text">Edit</span>
100 </a>
101 <a href="<?php echo wp_nonce_url( 'admin.php?action=cartflows_clone_step&post=' . $data['id'], 'step_clone', 'step_clone_nonce' ); ?>" class="wcf-step-clone wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Clone Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
102 <span class="dashicons dashicons-admin-page"></span>
103 <span class="wcf-step-act-btn-text">Clone</span>
104 </a>
105 <a href="#" class="wcf-step-delete wcf-action-button wp-ui-text-highlight" title="<?php echo __( 'Delete Step', 'cartflows' ); ?>" data-id="<?php echo $data['id']; ?>">
106 <span class="dashicons dashicons-trash"></span>
107 <span class="wcf-step-act-btn-text">Delete</span>
108 </a>
109 </div>
110 </div>
111 </div><!-- .wcf-step-wrap -->
112 <?php } ?>
113 <?php } ?>
114 </div><!-- .wcf-flow-steps-container -->
115 </div> <!-- .wcf-flow-steps-wrap -->
116 <div class="wcf-flow-buttons-wrap"> <!-- .wcf-flow-buttons-wrap -->
117 <?php do_action( 'cartflows_bellow_flow_steps' ); ?>
118 <div class='wcf-add-new-step-btn-wrap'>
119 <button class='wcf-trigger-popup button button-primary'>
120 <?php echo __( 'Add New Step', 'cartflows' ); ?>
121 </button>
122 </div>
123 </div><!-- .wcf-flow-buttons-wrap -->
124 </div><!-- .wcf-flow-settings -->
125
126 <div id="wcf-remote-step-importer" class="wcf-templates-popup-overlay">
127 <div class="wcf-templates-popup-content">
128 <div class="spinner"></div>
129 <div class="wcf-templates-wrap wcf-templates-wrap-flows">
130
131 <div id="wcf-remote-step-actions" class="wcf-template-header">
132 <div class="wcf-template-logo-wrap">
133 <span class="wcf-cartflows-logo-img">
134 <span class="cartflows-icon"></span>
135 </span>
136 <span class="wcf-cartflows-title"><?php _e( 'Templates', 'cartflows' ); ?></span>
137 </div>
138 <div class="wcf-tab-wrapper">
139 <div id="wcf-page-builders">
140 <ul class="wcf-page-builder-links filter-links">
141 <li><a href="#" class="current" data-id="elementor"><?php _e( 'Elementor', 'cartflows' ); ?></a></li>
142 <li><a href="#" data-id="divi"><?php _e( 'Divi', 'cartflows' ); ?></a></li>
143 <li><a href="#" data-id="bb"><?php _e( 'Beaver Builder', 'cartflows' ); ?></a></li>
144 </ul>
145 </div>
146 </div>
147 <div class="wcf-popup-close-wrap">
148 <span class="close-icon"><span class="wcf-cartflow-icons dashicons dashicons-no"></span></span>
149 </div>
150 </div>
151
152 <!--<div class="wcf-search-form">
153 <label class="screen-reader-text" for="wp-filter-search-input"><?php _e( 'Search Sites', 'cartflows' ); ?> </label>
154 <input placeholder="<?php _e( 'Search Flow...', 'cartflows' ); ?>" type="text" aria-describedby="live-search-desc" class="wcf-flow-search-input">
155 </div>-->
156 <?php if ( ! _is_cartflows_pro() ) { ?>
157 <div class="wcf-template-notice"><p><?php echo __( 'You need a Cartflows Pro version to import Upsell / Downsell', 'cartflows' ); ?></p></div>
158 <?php } ?>
159 <div id="wcf-remote-content">
160 <div id="wcf-remote-step-filters"></div>
161 <div id="wcf-remote-step-list" class="wcf-remote-list wcf-template-list-wrap"></div>
162 <div id="wcf-upcoming-page-builders" style="display: none;" class="wcf-remote-list wcf-template-list-wrap"></div>
163 </div>
164 </div>
165 </div>
166 </div><!-- .wcf-templates-popup-overlay -->
167 </div>
168 <?php
169