PluginProbe ʕ •ᴥ•ʔ
PiWeb Delivery & Pickup Date Time for WooCommerce / 3.0.49.3
PiWeb Delivery & Pickup Date Time for WooCommerce v3.0.49.3
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 2 years ago img 2 years ago js 2 years ago class-adv-order-filter.php 2 years ago class-pi-dtt-labels.php 2 years ago class-pi-dtt-order-table.php 2 years ago conflict-fixer.php 2 years ago menu.php 2 years ago options-addons.php 2 years ago options-date.php 2 years ago options-limit.php 2 years ago options-pickup.php 2 years ago options-time-slot.php 2 years ago options-time.php 2 years ago options.php 2 years ago
menu.php
209 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="container mt-2">
39 <div class="row">
40 <div class="col-12">
41 <div class='bg-dark'>
42 <div class="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; ?>" target="_blank">Buy Now !!</a>
49
50 </div>
51 </div>
52 </div>
53 </div>
54 </div>
55 <div class="row">
56 <div class="col-12">
57 <div class="bg-light border px-3">
58 <div class="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" id="promotion-sidebar">
121
122
123
124 <div class="bg-dark text-light text-center mb-3">
125 <a href="<?php echo PISOL_DTT_BUY_URL; ?>" target="_blank">
126 <?php new pisol_promotion("pi_order_date_time_installation_date"); ?>
127 </a>
128 </div>
129 <div class="bg-primary p-3 text-light text-center mb-3 pi-shadow promotion-bg">
130 <h2 class="text-light font-weight-light h3"><span>Get Pro for <h2 class="h2 font-weight-bold my-2 text-light"><?php echo PISOL_DTT_PRICE; ?></h2></span></h2>
131 <a class="btn btn-danger btn-sm text-uppercase mb-2" href="<?php echo PISOL_DTT_BUY_URL; ?>" target="_blank">Buy Now !!</a><br>
132 <a class="btn btn-sm mb-2 btn-light text-uppercase" href="http://websitemaintenanceservice.in/dtt_demo/" target="_blank">Try Pro on demo site</a>
133 <div class="inside">
134 PRO version offer more advanced features like:<br><br>
135 <ul class="text-left h6 font-weight-light pisol-pro-feature-list">
136 <li class="border-top py-2 h6 font-weight-light">Set <span class="font-weight-bold text-light">order limit on Days, Date, & Time Slot</span></li>
137 <li class="border-top py-2 h6 font-weight-light">Set <span class="font-weight-bold text-light">quantity limit on Days, Date, & Time Slot</span></li>
138 <li class="border-top py-2 h6 font-weight-light">Set different <span class="font-weight-bold text-light">preparation time for Delivery and Pickup</span></li>
139
140 <li class="border-top py-2 h6 font-weight-light">Show pickup or delivery time as a <span class="font-weight-bold text-light">Range of time instead of the exact time</span></li>
141 <li class="border-top py-2 h6 font-weight-light">Set pickup, delivery times restriction based on the <span class="font-weight-bold text-light">days of the week</span></li>
142 <li class="border-top py-2 h6 font-weight-light"><span class="font-weight-bold text-light">Disable delivery time</span> option and have an only delivery date</li>
143 <li class="border-top py-2 h6 font-weight-light">
144 <span class="font-weight-bold text-light">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
145 </li>
146 <li class="border-top py-2 h6 font-weight-light">Set unlimited <span class="font-weight-bold text-light">pickup location</span></li>
147 <li class="border-top border-top py-2 h6 font-weight-light">Set unlimited <span class="font-weight-bold text-light">pickup holidays</span></li>
148 <li class="border-top border-top py-2 h6 font-weight-light">Set unlimited <span class="font-weight-bold text-light">delivery holidays</span></li>
149 <li class="border-top border-top py-2 h6 font-weight-light">Change the <span class="font-weight-bold text-light">time interval</span> in the time selection</li>
150 <li class="border-top border-top py-2 h6 font-weight-light">Set a pre-order day <span class="font-weight-bold text-light">greater than 10 days</span></li>
151 <li class="border-top border-top py-2 h6 font-weight-light">Set <span class="font-weight-bold text-light">different delivery or pickup time</span> for different days of the week</li>
152 <li class="border-top border-top py-2 h6 font-weight-light">Make <span class="font-weight-bold text-light">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>
153 <li class="border-top border-top py-2 h6 font-weight-light">
154 <span class="font-weight-bold text-light">You can make Delivery/Pickup date optional too</span>, that you can have it optional for delivery but required for preparation
155 </li>
156 <li class="border-top border-top py-2 h6 font-weight-light">
157 <span class="font-weight-bold text-light">Show custom message</span> e.g: date and time of delivery are approximate
158 </li>
159 <li class="border-top border-top py-2 h6 font-weight-light">
160 <span class="font-weight-bold text-light">Change the background color</span> of the button from within the plugin setting
161 </li>
162 <li class="border-top border-top py-2 h6 font-weight-light">
163 Pro version support <span class="font-weight-bold text-light">Invoice PDF</span> generated by"WooCommerce PDF Invoices & Packing Slips" plugin</li>
164 <li class="border-top border-top py-2 h6 font-weight-light">You can <span class="font-weight-bold text-light">hide checkout form field</span> as per the shipping type (delivery or pickup) selected by the customer</li>
165 <li class="border-top border-top py-2 h6 font-weight-light">Change the first day of the Week in the front end calendar</li>
166 <li class="border-top border-top py-2 h6 font-weight-light">Allows you to handle <span class="font-weight-bold text-light">Virtual product</span>, E.g: remove this plugin setting if all the product in cart are Virtual product</li>
167 <li class="border-top border-top py-2 h6 font-weight-light">Set a Same day Delivery/Pickup <span class="font-weight-bold text-light">Virtual product</span>cutoff time</span></li>
168 <li class="border-top border-top py-2 h6 font-weight-light">Set a Next day Delivery/Pickup <span class="font-weight-bold text-light">Virtual product</span>cutoff time</span></li>
169 <li class="border-top border-top py-2 h6 font-weight-light"><span class="font-weight-bold text-light">Change payment gateway/method</span> as per the delivery type selected by customer</li>
170 <li class="border-top border-top py-2 h6 font-weight-light">Send new <span class="font-weight-bold text-light">order email to respective store</span> from which user will pickup his order</li>
171 <li class="border-top border-top py-2 h6 font-weight-light"><span class="font-weight-bold text-light">Allow special date</span> outside your pre-order date range</li>
172 <li class="border-top border-top py-2 h6 font-weight-light"><span class="font-weight-bold text-light">Force special date</span> order only</li>
173 <li class="border-top border-top py-2 h6 font-weight-light"><span class="font-weight-bold text-light">And many more features...</span></li>
174 </ul>
175 <a class="btn btn-light" href="<?php echo PISOL_DTT_BUY_URL; ?>" target="_blank">Click to Buy Now</a>
176 </div>
177 </div>
178 </div>
179
180 <?php
181 }
182
183 static function translationStrings(){
184 $translation = array(
185 'disable_pickup_on' => __('Disable pickup on', 'pisol-dtt'),
186 'disable_delivery_on' => __('Disable delivery on', 'pisol-dtt'),
187 'special_pickup_on' => __('Special pickup on', 'pisol-dtt'),
188 'special_delivery_on' => __('Special delivery on', 'pisol-dtt'),
189 'order_limit_on_time_slot' => __('( PRO ) order limit on this time slot', 'pisol-dtt'),
190 'start_date' => __('Start date', 'pisol-dtt'),
191 'delivery_order_limit' => __('Delivery order limit', 'pisol-dtt'),
192 'pickup_order_limit' => __('Pickup order limit', 'pisol-dtt'),
193 'overall_order_limit' => __('Overall order limit', 'pisol-dtt'),
194 'slot_time_divider_to' => __('To', 'pisol-dtt'),
195 'clear_value' => __('Clear Value', 'pisol-dtt')
196 );
197 return $translation;
198 }
199
200 function currentTime(){
201 echo '<div class="pi-edd-current-time-box">';
202 echo '<strong>Timing as per your website timezone (Plugin considers this time as present time)</strong><br>';
203 echo current_time('M d, Y H:i A');
204 echo '<br><a href="'.admin_url('options-general.php#timezone_string').'" target="_blank">(click to change)</a>';
205 echo '</div>';
206 }
207 }
208
209 new pisol_dtt_menu();