PluginProbe ʕ •ᴥ•ʔ
PiWeb Delivery & Pickup Date Time for WooCommerce / 3.0.49.11
PiWeb Delivery & Pickup Date Time for WooCommerce v3.0.49.11
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 class-adv-order-filter.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
219 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 = '3.0.12';
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 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 <a href="javascript:void(0)" class="btn btn-primary btn-sm mr-2" id="hid-pro-feature">Hide Pro Feature</a>
48 <a class="btn btn-danger btn-sm text-uppercase mr-2" href="<?php echo PISOL_DTT_BUY_URL; ?>&utm_ref=top_link" target="_blank">Buy Now !!</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-2 px-0 border-right">
60 <?php do_action('pisol_dtt_tab'); ?>
61 </div>
62 <div class="col">
63 <?php do_action('pisol_dtt_tab_content'); ?>
64 </div>
65 <?php do_action('pisol_dtt_promotion'); ?>
66 </div>
67 </div>
68 </div>
69 </div>
70 </div>
71 </div>
72 <?php
73 $this->currentTime();
74 }
75
76 function menu_page_style(){
77 global $post_type;
78 wp_enqueue_script('jquery-ui-sortable');
79 wp_enqueue_style('pi_dtt_menu_page_style_bootstrap', plugins_url('css/bootstrap.css', __FILE__), array(), '2.4.9');
80 wp_enqueue_style('pi_dtt_menu_page_style', plugins_url('css/style.css', __FILE__));
81
82 wp_enqueue_style('pi_dtt_timepicker', plugins_url('css/jquery.timepicker.min.css', __FILE__));
83
84 wp_enqueue_script( 'jquery-ui-datepicker' );
85 wp_enqueue_script( 'pisol-jquery-ui-timepicker', plugins_url('js/jquery.timepicker.min.js', __FILE__) );
86
87 wp_enqueue_style( 'jquery-ui', plugins_url('css/jquery-ui.css', __FILE__));
88 wp_enqueue_script( 'pi-dtt-custom',plugins_url('js/custom.js', __FILE__) );
89
90 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 );
91
92 wp_localize_script('pi-dtt-custom','pi_dtt_settings', array('delivery_type'=> get_option('pi_type','Both')));
93
94 wp_register_script( 'selectWoo', WC()->plugin_url() . '/assets/js/selectWoo/selectWoo.full.min.js', array( 'jquery' ) );
95 wp_enqueue_script( 'selectWoo' );
96 wp_enqueue_style( 'select2', WC()->plugin_url() . '/assets/css/select2.css');
97
98 wp_enqueue_script( "pi_dtt_quick_save", plugin_dir_url( __FILE__ ) . 'js/pisol-quick-save.js', array('jquery'), '1.0.2', 'all' );
99
100 $translation = self::translationStrings();
101 wp_localize_script('pi-dtt-pro-custom', 'pisol_dtt_translation', $translation);
102 }
103
104 function orderPageScript(){
105 $current_screen = get_current_screen();
106 $current_screen_id = $current_screen->id;
107 if (in_array( $current_screen_id, $this->screen_ids) || $current_screen_id == 'edit-shop_order') {
108 wp_enqueue_script( 'jquery-ui-datepicker' );
109
110 wp_enqueue_style( 'jquery-ui', plugins_url('css/jquery-ui.css', __FILE__));
111
112 wp_enqueue_script( 'pi-dtt-order-page-js', plugins_url('js/pi-order-page.js', __FILE__), array( 'jquery' ));
113
114 }
115 }
116
117 function promotion(){
118 if(isset($_GET['tab']) && ($_GET['tab'] === 'addons' || $_GET['tab'] === 'pi_time_slot')) return;
119 ?>
120 <div class="col-12 col-sm-4">
121
122
123
124 <div class="bg-dark text-light text-center mb-3">
125 <a href="<?php echo PISOL_DTT_BUY_URL; ?>&utm_ref=discount_banner" target="_blank">
126 <?php new pisol_promotion("pi_order_date_time_installation_date"); ?>
127 </a>
128 </div>
129 <div class="pi-shadow mb-2">
130 <div class="pisol-row justify-content-center">
131 <div class="col-md-8 col-sm-12 ">
132 <div class="p-2">
133 <img class="img-fluid mr-2" src="<?php echo PISOL_DTT_URL; ?>admin/img/bg.svg">
134 </div>
135 </div>
136 </div>
137 <div class="text-center py-2">
138 <a class="btn btn-success btn-sm text-uppercase mb-2 " href="<?php echo PISOL_DTT_BUY_URL; ?>&utm_ref=top_link" target="_blank">Buy Now !!</a>
139 <a class="btn btn-sm mb-2 btn-secondary text-uppercase" href="http://websitemaintenanceservice.in/dtt_demo/" target="_blank">Try Demo</a>
140 </div>
141 <h2 id="pi-banner-tagline" class="mb-0">Get Pro for <?php echo PISOL_DTT_PRICE; ?></h2>
142 <div class="inside">
143 <ul class="text-left pisol-pro-feature-list">
144 <li class="border-top h6 font-weight-light">Set <span class="font-weight-bold text-primary">order limit on Days, Date, & Time Slot</span></li>
145 <li class="border-top h6 font-weight-light">Set <span class="font-weight-bold text-primary">quantity limit on Days, Date, & Time Slot</span></li>
146 <li class="border-top h6 font-weight-light">Set different <span class="font-weight-bold text-primary">preparation time for Delivery and Pickup</span></li>
147
148 <li class="border-top h6 font-weight-light">Show pickup or delivery time as a <span class="font-weight-bold text-primary">Range of time instead of the exact time</span></li>
149 <li class="border-top h6 font-weight-light">Set pickup, delivery times restriction based on the <span class="font-weight-bold text-primary">days of the week</span></li>
150 <li class="border-top h6 font-weight-light"><span class="font-weight-bold text-primary">Disable delivery time</span> option and have an only delivery date</li>
151 <li class="border-top h6 font-weight-light">
152 <span class="font-weight-bold text-primary">Disable date and time based on delivery method</span>, so you can remove date and time option if user want delivery and show it if user want a pickup
153 </li>
154 <li class="border-top h6 font-weight-light">Set unlimited <span class="font-weight-bold text-primary">pickup location</span></li>
155 <li class="border-top border-top h6 font-weight-light">Set unlimited <span class="font-weight-bold text-primary">pickup holidays</span></li>
156 <li class="border-top border-top h6 font-weight-light">Set unlimited <span class="font-weight-bold text-primary">delivery holidays</span></li>
157 <li class="border-top border-top h6 font-weight-light">Change the <span class="font-weight-bold text-primary">time interval</span> in the time selection</li>
158 <li class="border-top border-top h6 font-weight-light">Set a pre-order day <span class="font-weight-bold text-primary">greater than 10 days</span></li>
159 <li class="border-top border-top h6 font-weight-light">Set <span class="font-weight-bold text-primary">different delivery or pickup time</span> for different days of the week</li>
160 <li class="border-top border-top h6 font-weight-light">Make <span class="font-weight-bold text-primary">Time as non-required</span> field based on delivery type, so time can be required for pic-up but can be left blank for delivery</li>
161 <li class="border-top border-top h6 font-weight-light">
162 <span class="font-weight-bold text-primary">You can make Delivery/Pickup date optional too</span>, that you can have it optional for delivery but required for preparation
163 </li>
164 <li class="border-top border-top h6 font-weight-light">
165 <span class="font-weight-bold text-primary">Show custom message</span> e.g: date and time of delivery are approximate
166 </li>
167 <li class="border-top border-top h6 font-weight-light">
168 <span class="font-weight-bold text-primary">Change the background color</span> of the button from within the plugin setting
169 </li>
170 <li class="border-top border-top h6 font-weight-light">
171 Pro version support <span class="font-weight-bold text-primary">Invoice PDF</span> generated by"WooCommerce PDF Invoices & Packing Slips" plugin</li>
172 <li class="border-top border-top h6 font-weight-light">You can <span class="font-weight-bold text-primary">hide checkout form field</span> as per the shipping type (delivery or pickup) selected by the customer</li>
173 <li class="border-top border-top h6 font-weight-light">Change the first day of the Week in the front end calendar</li>
174 <li class="border-top border-top h6 font-weight-light">Allows you to handle <span class="font-weight-bold text-primary">Virtual product</span>, E.g: remove this plugin setting if all the product in cart are Virtual product</li>
175 <li class="border-top border-top h6 font-weight-light">Set a Same day Delivery/Pickup <span class="font-weight-bold text-primary">Virtual product</span>cutoff time</span></li>
176 <li class="border-top border-top h6 font-weight-light">Set a Next day Delivery/Pickup <span class="font-weight-bold text-primary">Virtual product</span>cutoff time</span></li>
177 <li class="border-top border-top h6 font-weight-light"><span class="font-weight-bold text-primary">Change payment gateway/method</span> as per the delivery type selected by customer</li>
178 <li class="border-top border-top h6 font-weight-light">Send new <span class="font-weight-bold text-primary">order email to respective store</span> from which user will pickup his order</li>
179 <li class="border-top border-top h6 font-weight-light"><span class="font-weight-bold text-primary">Allow special date</span> outside your pre-order date range</li>
180 <li class="border-top border-top h6 font-weight-light"><span class="font-weight-bold text-primary">Force special date</span> order only</li>
181 <li class="border-top border-top h6 font-weight-light"><span class="font-weight-bold text-primary">And many more features...</span></li>
182 </ul>
183 <div class="text-center pt-2 pb-3">
184 <a class="btn btn-primary" href="<?php echo PISOL_DTT_BUY_URL; ?>&utm_ref=bottom_link" target="_blank">BUY PRO VERSION</a>
185 </div>
186 </div>
187 </div>
188 </div>
189
190 <?php
191 }
192
193 static function translationStrings(){
194 $translation = array(
195 'disable_pickup_on' => __('Disable pickup on', 'pisol-dtt'),
196 'disable_delivery_on' => __('Disable delivery on', 'pisol-dtt'),
197 'special_pickup_on' => __('Special pickup on', 'pisol-dtt'),
198 'special_delivery_on' => __('Special delivery on', 'pisol-dtt'),
199 'order_limit_on_time_slot' => __('( PRO ) order limit on this time slot', 'pisol-dtt'),
200 'start_date' => __('Start date', 'pisol-dtt'),
201 'delivery_order_limit' => __('Delivery order limit', 'pisol-dtt'),
202 'pickup_order_limit' => __('Pickup order limit', 'pisol-dtt'),
203 'overall_order_limit' => __('Overall order limit', 'pisol-dtt'),
204 'slot_time_divider_to' => __('To', 'pisol-dtt'),
205 'clear_value' => __('Clear Value', 'pisol-dtt')
206 );
207 return $translation;
208 }
209
210 function currentTime(){
211 echo '<div class="pi-edd-current-time-box">';
212 echo '<strong>Timing as per your website timezone (Plugin considers this time as present time)</strong><br>';
213 echo current_time('M d, Y H:i A');
214 echo '<br><a href="'.admin_url('options-general.php#timezone_string').'" target="_blank">(click to change)</a>';
215 echo '</div>';
216 }
217 }
218
219 new pisol_dtt_menu();