PluginProbe ʕ •ᴥ•ʔ
Stock Locations for WooCommerce / 3.1.9
Stock Locations for WooCommerce v3.1.9
3.1.9 3.1.8 3.1.7 3.1.6 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 trunk 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2
stock-locations-for-woocommerce / views / settings-stock-locations.php
stock-locations-for-woocommerce / views Last commit date
addons 5 years ago product-pre-select-location-scripts.php 5 years ago settings-api.php 3 weeks ago settings-crons.php 1 year ago settings-default.php 4 years ago settings-help.php 4 years ago settings-logger.php 1 year ago settings-optional.php 1 month ago settings-sponsor.php 4 years ago settings-stock-locations.php 1 year ago settings-widgets.php 4 years ago taxonomy-fields-edit.php 2 years ago taxonomy-fields-new.php 5 years ago
settings-stock-locations.php
86 lines
1 <?php if ( ! defined('WPINC') ) die; ?>
2
3 <div class="slw-stock-loations mt-4">
4
5
6 <?php
7 global $wc_slw_pro, $slw_widgets_arr;
8 $slw_map_images = $slw_widgets_arr['slw-map']['screenshot'];
9 $slw_archives_images = $slw_widgets_arr['slw-archives']['screenshot'];
10 // show locations table
11 $terms = slw_get_locations('location', array(), false);
12
13 ?>
14
15 <div class="alert alert-info" role="alert">
16 <?php echo __('If you want the system to update all the products stock for the locations enabled.', 'stock-locations-for-woocommerce'); ?> <?php echo __('This feature is introduced as a beta version for now.', 'stock-locations-for-woocommerce'); ?> <?php echo __('It can possibly replace the cron jobs schduling if it goes successful.', 'stock-locations-for-woocommerce'); ?>
17 <label class="switch" style="float:right;">
18 <input <?php checked(get_option('slw_update_product_locations_stock_values') == true); ?>
19 name="slw-update-product-locations-stock-values"
20 id="slw-update-product-locations-stock-values"
21 value="yes"
22 type="checkbox"
23 data-on="<?php echo __('Enabled', 'stock-locations-for-woocommerce'); ?>"
24 data-off="<?php echo __('Disabled', 'stock-locations-for-woocommerce'); ?>" />
25 <span class="slider round"></span>
26 </label>
27
28
29 </div>
30
31
32 <a class="btn btn-sm btn-success mb-4" href="<?php echo admin_url( 'edit-tags.php?taxonomy=location&post_type=product' ); ?>"><?php _e( 'Add new', 'stock-locations-for-woocommerce' ); ?></a> <a title="<?php _e( 'Video Tutorial', 'stock-locations-for-woocommerce' ); ?>" href="https://www.youtube.com/embed/7ZIv_d7prLA" style="float:right;" target="_blank"><i class="fab fa-youtube"></i></a>
33 <table class="widefat w-75 slw_need_popup">
34 <thead>
35 <tr>
36 <th><?php _e( 'ID', 'stock-locations-for-woocommerce' ); ?></th>
37 <th><?php _e( 'Location', 'stock-locations-for-woocommerce' ); ?></th>
38 <th><?php _e( 'Enabled', 'stock-locations-for-woocommerce' ); ?></th>
39 <th><?php _e( 'Auto Assign to Products', 'stock-locations-for-woocommerce' ); ?></th>
40 <th><?php _e( 'Map', 'stock-locations-for-woocommerce' ); ?></th>
41 <th><?php _e( 'Priority', 'stock-locations-for-woocommerce' ); ?></th>
42 <th></th>
43 </tr>
44 </thead>
45 <tbody>
46 <?php
47 if( ! empty( $terms ) ) {
48 foreach( $terms as $location ) {
49 $slw_location_status = get_term_meta($location->term_id, 'slw_location_status', true);
50 $slw_map_status = get_term_meta($location->term_id, 'slw_map_status', true);
51 $slw_location_assignment = get_term_meta($location->term_id, 'slw_location_assignment', true);
52 $slw_location_priority = get_term_meta($location->term_id, 'slw_location_priority', true);
53 ?>
54 <tr>
55 <td><?php echo $location->term_id; ?></td>
56 <td><a target="_blank" title="<?php _e( 'View Archive', 'stock-locations-for-woocommerce' ); ?> <?php echo $location->name; ?>" href="<?php echo get_term_link($location->term_id); ?>"><?php echo $location->name; ?></a> <?php if(!$wc_slw_pro){ ?><?php foreach($slw_archives_images as $image){?> &nbsp; <a data-type="screenshot" title="<?php _e( 'Premium Feature', 'stock-locations-for-woocommerce' ); ?>" href="<?php echo $image; ?>"><i class="fas fa-image"></i><img style="display:none" src="<?php echo $image; ?>" /></a><?php } ?><?php } ?></td>
57 <td><a class="<?php echo ($slw_location_status?'checked':''); ?> slw-location-status" title="<?php _e( 'Click here to enable/disable', 'stock-locations-for-woocommerce' ); ?>" data-id="<?php echo $location->term_id; ?>"><i class="fas fa-eye"></i><i class="fas fa-eye-slash"></i></a></td>
58 <td><a class="<?php echo ($slw_location_assignment?'checked':''); ?> slw-location-assignment" title="<?php _e( 'Click here to enable/disable', 'stock-locations-for-woocommerce' ); ?>" data-id="<?php echo $location->term_id; ?>"><i class="fas fa-times-circle"></i><i class="fas fa-check-circle"></i></a></td>
59 <td><?php echo $slw_map_status?'<i class="fas fa-map-marked-alt"></i>':'<i class="fas fa-map-marked"></i>'; ?> <?php if(!$wc_slw_pro){ ?><?php foreach($slw_map_images as $image){?> &nbsp; <a data-type="screenshot" title="<?php _e( 'Premium Feature', 'stock-locations-for-woocommerce' ); ?>" href="<?php echo $image; ?>"><i class="fas fa-image"></i><img style="display:none" src="<?php echo $image; ?>" /></a><?php } ?><?php } ?></td>
60 <td><?php echo $slw_location_priority; ?></td>
61 <td><a title="<?php _e( 'Edit', 'stock-locations-for-woocommerce' ); ?> <?php echo $location->name; ?>" href="<?php echo admin_url('term.php?taxonomy=location&tag_ID='.$location->term_id.'&post_type=product'); ?>"><i class="fas fa-edit"></i></a> &nbsp; <a title="<?php _e( 'List', 'stock-locations-for-woocommerce' ); ?> <?php echo $location->name; ?>" href="<?php echo admin_url('edit.php?location='.$location->name.'&post_type=product'); ?>"><i class="fas fa-list-alt"></i></a></td>
62
63 </tr>
64 <?php
65 }
66 } else {
67 ?>
68 <tr><td colspan="2"><?php _e( 'No locations found in your store.', 'stock-locations-for-woocommerce' ); ?></td></tr>
69 <?php
70 }
71 ?>
72 </tbody>
73 <tfoot>
74 <tr>
75 <th><?php _e( 'ID', 'stock-locations-for-woocommerce' ); ?></th>
76 <th><?php _e( 'Location', 'stock-locations-for-woocommerce' ); ?></th>
77 <th><?php _e( 'Enabled', 'stock-locations-for-woocommerce' ); ?></th>
78 <th><?php _e( 'Auto Assign to Products', 'stock-locations-for-woocommerce' ); ?></th>
79 <th><?php _e( 'Map', 'stock-locations-for-woocommerce' ); ?></th>
80 <th><?php _e( 'Priority', 'stock-locations-for-woocommerce' ); ?></th>
81 <th></th>
82 </tr>
83 </tfoot>
84 </table>
85
86 </div>