PluginProbe ʕ •ᴥ•ʔ
PiWeb Delivery & Pickup Date Time for WooCommerce / 3.0.49.47
PiWeb Delivery & Pickup Date Time for WooCommerce v3.0.49.47
3.0.63 3.0.62 3.0.61 3.0.60 3.0.49.49 3.0.49.6 3.0.49.60 3.0.49.61 3.0.49.62 3.0.49.63 3.0.49.64 3.0.49.66 3.0.49.67 3.0.49.69 3.0.49.7 3.0.49.70 3.0.49.72 3.0.49.73 3.0.49.74 3.0.49.76 3.0.49.77 3.0.49.79 3.0.49.9 3.0.49.90 3.0.49.91 3.0.49.92 3.0.49.93 3.0.49.94 3.0.49.96 3.0.49.97 3.0.49.99 trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 2.9.17 3.0.47 3.0.49 3.0.49.1 3.0.49.10 3.0.49.11 3.0.49.12 3.0.49.13 3.0.49.16 3.0.49.17 3.0.49.19 3.0.49.2 3.0.49.20 3.0.49.21 3.0.49.22 3.0.49.23 3.0.49.24 3.0.49.26 3.0.49.27 3.0.49.29 3.0.49.3 3.0.49.30 3.0.49.31 3.0.49.32 3.0.49.33 3.0.49.34 3.0.49.36 3.0.49.37 3.0.49.39 3.0.49.4 3.0.49.40 3.0.49.41 3.0.49.42 3.0.49.43 3.0.49.44 3.0.49.46 3.0.49.47
pi-woocommerce-order-date-time-and-type / admin / menu.php
pi-woocommerce-order-date-time-and-type / admin Last commit date
css 1 year ago img 1 year ago js 1 year ago partials 1 year ago class-adv-order-filter.php 1 year ago class-analytics.php 1 year ago class-order-tip-promotion.php 1 year ago class-pi-dtt-labels.php 1 year ago class-pi-dtt-order-table.php 1 year ago conflict-fixer.php 1 year ago menu.php 1 year ago options-addons.php 1 year ago options-date.php 1 year ago options-limit.php 1 year ago options-pickup.php 1 year ago options-time-slot.php 1 year ago options-time.php 1 year ago options.php 1 year ago
menu.php
200 lines
1 <?php
2
3 class pisol_dtt_menu{
4
5 public $screen_ids = ['shop_order', 'woocommerce_page_wc-orders'];
6
7 public $version;
8
9
10 function __construct(){
11 $this->version = PISOL_DTT_PLUGIN_VERSION;
12 add_action( 'admin_menu', array($this,'plugin_menu') );
13 add_action('pisol_dtt_promotion', array($this,'promotion'));
14 add_action( 'admin_enqueue_scripts',array($this, 'orderPageScript'));
15 }
16
17 function plugin_menu(){
18
19 $require_capability = $this->getCapability();
20
21 $menu = add_submenu_page('woocommerce', __('Date & Time','pisol-dtt'), __('Date & Time','pisol-dtt'), $require_capability, 'pisol-dtt', array($this, 'menu_option_page') );
22
23 add_action("load-".$menu, array($this,'menu_page_style'));
24 }
25
26 function getCapability(){
27 $capability = 'manage_options';
28
29 return (string)apply_filters('pisol_dtt_settings_cap', $capability);
30 }
31
32 function menu_option_page(){
33 if(function_exists('settings_errors')){
34 settings_errors();
35 }
36 ?>
37 <div class="bootstrap-wrapper">
38 <div class="pisol-container mt-2">
39 <div class="pisol-row">
40 <div class="col-12">
41 <div class='bg-dark'>
42 <div class="pisol-row">
43 <div class="col-12 col-sm-2 py-2">
44 <a href="https://www.piwebsolution.com/" target="_blank"><img class="img-fluid ml-2" src="<?php echo esc_url(PISOL_DTT_URL); ?>admin/img/pi-web-solution.svg"></a>
45 </div>
46 <div class="col-12 col-sm-10 text-right small d-flex align-items-center justify-content-end ">
47
48 <a id="pi-special-button" href="<?php echo esc_url(PISOL_DTT_BUY_URL); ?>&utm_ref=top_link" target="_blank">GET PRO !!</a>
49
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 <div class="pisol-row">
56 <div class="col-12">
57 <div class="bg-light border px-3">
58 <div class="pisol-row">
59 <div class="col-12 col-md-12 col-lg-2 border-right">
60 <div id="pisol-side-menu" class="mb-4 rounded mt-4 py-3 pi-sticky ">
61 <?php do_action('pisol_dtt_tab'); ?>
62 </div>
63 </div>
64 <?php
65 if ( isset($_GET['tab']) && ($_GET['tab'] === 'pi_time_slot' || $_GET['tab'] === 'addons') ) {
66 ?>
67 <div class="col">
68 <?php }else{ ?>
69 <div class="col-lg-6 col-md-8 col-12">
70 <?php } ?>
71 <?php do_action('pisol_dtt_tab_content'); ?>
72 </div>
73 <?php do_action('pisol_dtt_promotion'); ?>
74 </div>
75 </div>
76 </div>
77 </div>
78 </div>
79 </div>
80 <?php
81 $this->currentTime();
82 }
83
84 function menu_page_style(){
85 global $post_type;
86 wp_enqueue_script('jquery-ui-sortable');
87 wp_enqueue_style('pi_dtt_menu_page_style_bootstrap', plugins_url('css/bootstrap.css', __FILE__), array(), $this->version);
88 wp_enqueue_style('pi_dtt_menu_page_style', plugins_url('css/style.css', __FILE__), [], $this->version);
89
90 wp_enqueue_style('pi_dtt_timepicker', plugins_url('css/jquery.timepicker.min.css', __FILE__), [], $this->version);
91
92 wp_enqueue_script( 'jquery-ui-datepicker' );
93 wp_enqueue_script( 'pisol-jquery-ui-timepicker', plugins_url('js/jquery.timepicker.min.js', __FILE__) );
94
95 wp_enqueue_style( 'jquery-ui', plugins_url('css/jquery-ui.css', __FILE__));
96 wp_enqueue_script( 'pi-dtt-custom',plugins_url('js/custom.js', __FILE__) );
97
98 wp_enqueue_script( 'pi-dtt-pro-custom', plugins_url('js/pi-woocommerce-order-date-time-and-type-pro-admin.js', __FILE__), array( 'jquery' ), $this->version, false );
99
100 wp_localize_script('pi-dtt-custom','pi_dtt_settings', array('delivery_type'=> get_option('pi_type','Both')));
101
102 wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full.min.js', array( 'jquery' ) );
103 wp_enqueue_script( 'selectWoo' );
104 wp_enqueue_style( 'select2', WC()->plugin_url() . '/assets/css/select2.css');
105
106 wp_enqueue_script( "pi_dtt_quick_save", plugin_dir_url( __FILE__ ) . 'js/pisol-quick-save.js', array('jquery'), '1.0.2', 'all' );
107
108 $translation = self::translationStrings();
109 wp_localize_script('pi-dtt-pro-custom', 'pisol_dtt_translation', $translation);
110 }
111
112 function orderPageScript(){
113 $current_screen = get_current_screen();
114 $current_screen_id = $current_screen->id;
115 if (in_array( $current_screen_id, $this->screen_ids) || $current_screen_id == 'edit-shop_order') {
116 wp_enqueue_script( 'jquery-ui-datepicker' );
117
118 wp_enqueue_style( 'jquery-ui', plugins_url('css/jquery-ui.css', __FILE__));
119
120 wp_enqueue_script( 'pi-dtt-order-page-js', plugins_url('js/pi-order-page.js', __FILE__), array( 'jquery' ));
121
122 }
123 }
124
125 function promotion(){
126 if(isset($_GET['tab']) && ($_GET['tab'] === 'addons' || $_GET['tab'] === 'pi_time_slot')) return;
127 ?>
128 <div class="col-12 col-lg-4 col-md-4 border-left">
129
130 <div class="pi-shadow mb-2 mt-4 px-2 py-3">
131 <h2 id="pi-banner-tagline" class="mb-0" style="color:#ccc !important;">
132 <span class="d-block mb-2">⭐️⭐️⭐️⭐️⭐️</span>
133 <span class="d-block mb-2">🚀 Trusted by <span style="color:#fff;">2,000+</span> WooCommerce Stores</span>
134 <span class="d-block mb-2">Rated <span style="color:#fff;">4.9/5</span> Users love it</span>
135 </h2>
136 <div class="inside px-2 mt-4">
137 <ul class="pisol-pro-feature-list mb-4">
138 <li> Advanced order limits (day, date & time slot)</li>
139 <li> Separate prep time for delivery & pickup</li>
140 <li> Time range instead of exact time</li>
141 <li> Disable delivery/pickup by method</li>
142 <li> Multiple pickup/delivery locations & holidays</li>
143 <li> Custom time intervals & pre-order limits</li>
144 <li> Optional delivery date/time fields</li>
145 <li> Show custom delivery messages</li>
146 <li> Change button color & invoice support</li>
147 <li> Hide fields based on delivery type</li>
148 <li> Support for virtual products</li>
149 <li> Special date settings & forced orders</li>
150 <li> Smart email routing to pickup stores</li>
151 <li> Change payment gateway per method</li>
152 <li>🎯 And many more powerful features...</li>
153 </ul>
154 <h4 class="pi-bottom-banner">💰 Just <?php echo esc_html(PISOL_DTT_PRICE); ?></h4>
155 <h4 class="pi-bottom-banner">🔥 Unlock all 50+ features and grow your sales!</h4>
156 <div class="text-center pt-2 pb-3">
157 <a class="btn btn-primary btn-md" href="<?php echo esc_url( PISOL_DTT_BUY_URL ); ?>&utm_ref=bottom_link" target="_blank">🔓 Unlock Pro Now Limited Time Price!</a>
158 </div>
159 </div>
160 </div>
161
162 <div class="bg-dark text-light text-center mb-3 mt-4">
163 <a href="<?php echo esc_url( PISOL_DTT_BUY_URL ); ?>&utm_ref=discount_banner" target="_blank">
164 <?php new pisol_promotion("pi_order_date_time_installation_date"); ?>
165 </a>
166 </div>
167
168 </div>
169
170 <?php
171 }
172
173 static function translationStrings(){
174 $translation = array(
175 'disable_pickup_on' => __('Disable pickup on', 'pisol-dtt'),
176 'disable_delivery_on' => __('Disable delivery on', 'pisol-dtt'),
177 'special_pickup_on' => __('Special pickup on', 'pisol-dtt'),
178 'special_delivery_on' => __('Special delivery on', 'pisol-dtt'),
179 'order_limit_on_time_slot' => __('( PRO ) order limit on this time slot', 'pisol-dtt'),
180 'quantity_limit_on_time_slot' => __('( PRO ) quantity limit on this time slot', 'pisol-dtt'),
181 'start_date' => __('Start date', 'pisol-dtt'),
182 'delivery_order_limit' => __('Delivery order limit', 'pisol-dtt'),
183 'pickup_order_limit' => __('Pickup order limit', 'pisol-dtt'),
184 'overall_order_limit' => __('Overall order limit', 'pisol-dtt'),
185 'slot_time_divider_to' => __('To', 'pisol-dtt'),
186 'clear_value' => __('Clear Value', 'pisol-dtt')
187 );
188 return $translation;
189 }
190
191 function currentTime(){
192 echo '<div class="pi-edd-current-time-box">';
193 echo '<strong>Timing as per your website timezone (Plugin considers this time as present time)</strong><br>';
194 echo esc_html( current_time('M d, Y H:i A') );
195 echo '<br><a href="'.esc_url( admin_url('options-general.php#timezone_string') ).'" target="_blank">(click to change)</a>';
196 echo '</div>';
197 }
198 }
199
200 new pisol_dtt_menu();