Version Description
- Enhancement - Option to turn off multiple select for images and colors
- Enhancement - Do not close widget if it is selected
- Fix - Internet Explorer issue with colors
- Fix - Attributes WooCommerce sorting in WooCommerce 3.6
- Fix - Remove out of stock variations, when attribute slug in not Latin
- Fix - Variations options with latest version of MySQL
- Fix - Variations with post status trash in query
Download this release
Release Info
Developer | RazyRx |
Plugin | Advanced AJAX Product Filters |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1.8 to 1.3.2
- berocket/assets/css/admin.css +28 -4
- berocket/assets/js/admin.js +42 -0
- berocket/framework.php +27 -8
- berocket/includes/custom_post.php +13 -0
- berocket/includes/updater.php +72 -3
- berocket/libraries/feature_tab.php +1 -1
- css/admin.css +9 -0
- css/widget.css +3 -1
- includes/addons/woocommerce-variation.php +17 -11
- includes/custom_post.php +2 -2
- includes/functions.php +37 -0
- includes/widget.php +55 -49
- js/admin.js +8 -2
- js/widget.min.js +23 -10
- main.php +190 -82
- readme.txt +10 -1
- templates/checkbox.php +43 -37
- templates/color.php +47 -41
- templates/color_ajax.php +1 -0
- templates/filter_post.php +34 -12
- templates/free/features.php +161 -24
- templates/free/free/features.php +298 -0
- templates/include_exclude_list.php +1 -0
- templates/radio.php +34 -29
- templates/select.php +4 -3
- templates/settings/design.php +11 -0
- templates/widget_start.php +3 -3
- woocommerce-filters.php +3 -3
berocket/assets/css/admin.css
CHANGED
@@ -1045,15 +1045,40 @@
|
|
1045 |
position: relative;
|
1046 |
display: inline-block;
|
1047 |
font-size: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1048 |
}
|
1049 |
.berocket_addons_list .berocket_addon_block {
|
1050 |
display: inline-block;
|
1051 |
position: relative;
|
1052 |
padding: 15px;
|
1053 |
-
|
|
|
1054 |
text-align: center;
|
1055 |
box-sizing: border-box;
|
1056 |
-
height: 260px;
|
1057 |
}
|
1058 |
.berocket_addons_list .berocket_addon_block .berocket_addon_active {
|
1059 |
position: absolute;
|
@@ -1080,9 +1105,8 @@
|
|
1080 |
}
|
1081 |
.berocket_addons_list .berocket_addon_block img {
|
1082 |
display: block;
|
1083 |
-
|
1084 |
opacity: 0.7;
|
1085 |
-
max-height: 200px;
|
1086 |
}
|
1087 |
.berocket_addons_list .berocket_addon_block .berocket_addon_name {
|
1088 |
font-size: 24px;
|
1045 |
position: relative;
|
1046 |
display: inline-block;
|
1047 |
font-size: 6px;
|
1048 |
+
width: 250px;
|
1049 |
+
}
|
1050 |
+
.berocket_addons_list.col8-addons .berocket_addon_label {
|
1051 |
+
width: 12.4%;
|
1052 |
+
}
|
1053 |
+
.berocket_addons_list.col7-addons .berocket_addon_label {
|
1054 |
+
width: 14.2%;
|
1055 |
+
}
|
1056 |
+
.berocket_addons_list.col6-addons .berocket_addon_label {
|
1057 |
+
width: 16.6%;
|
1058 |
+
}
|
1059 |
+
.berocket_addons_list.col5-addons .berocket_addon_label {
|
1060 |
+
width: 19.9%;
|
1061 |
+
}
|
1062 |
+
.berocket_addons_list.col4-addons .berocket_addon_label {
|
1063 |
+
width: 24.9%;
|
1064 |
+
}
|
1065 |
+
.berocket_addons_list.col3-addons .berocket_addon_label {
|
1066 |
+
width: 33%;
|
1067 |
+
}
|
1068 |
+
.berocket_addons_list.col2-addons .berocket_addon_label {
|
1069 |
+
width: 49.9%;
|
1070 |
+
}
|
1071 |
+
.berocket_addons_list.col-addons .berocket_addon_label {
|
1072 |
+
width: 100%;
|
1073 |
}
|
1074 |
.berocket_addons_list .berocket_addon_block {
|
1075 |
display: inline-block;
|
1076 |
position: relative;
|
1077 |
padding: 15px;
|
1078 |
+
padding-bottom: 70px;
|
1079 |
+
width: 100%;
|
1080 |
text-align: center;
|
1081 |
box-sizing: border-box;
|
|
|
1082 |
}
|
1083 |
.berocket_addons_list .berocket_addon_block .berocket_addon_active {
|
1084 |
position: absolute;
|
1105 |
}
|
1106 |
.berocket_addons_list .berocket_addon_block img {
|
1107 |
display: block;
|
1108 |
+
width: 100%;
|
1109 |
opacity: 0.7;
|
|
|
1110 |
}
|
1111 |
.berocket_addons_list .berocket_addon_block .berocket_addon_name {
|
1112 |
font-size: 24px;
|
berocket/assets/js/admin.js
CHANGED
@@ -561,7 +561,49 @@ jQuery(document).on('click', function() {
|
|
561 |
})(jQuery);
|
562 |
//ADDONS RELOAD
|
563 |
(function ($){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
$(document).ready( function () {
|
|
|
565 |
$(document).on('change', '.berocket_addons_list input', function() {
|
566 |
$(this).parents('.br_framework_submit_form').addClass('br_reload_form');
|
567 |
});
|
561 |
})(jQuery);
|
562 |
//ADDONS RELOAD
|
563 |
(function ($){
|
564 |
+
function berocket_addon_list_resize(element) {
|
565 |
+
var addclass = false;
|
566 |
+
var width = $(element).width();
|
567 |
+
if( width > 1600 ) {
|
568 |
+
addclass = 'col8-addons';
|
569 |
+
} else if( width > 1400 ) {
|
570 |
+
addclass = 'col7-addons';
|
571 |
+
} else if( width > 1200 ) {
|
572 |
+
addclass = 'col6-addons';
|
573 |
+
} else if( width > 1000 ) {
|
574 |
+
addclass = 'col5-addons';
|
575 |
+
} else if( width > 800 ) {
|
576 |
+
addclass = 'col4-addons';
|
577 |
+
} else if( width > 600 ) {
|
578 |
+
addclass = 'col3-addons';
|
579 |
+
} else if( width > 400 ) {
|
580 |
+
addclass = 'col2-addons';
|
581 |
+
} else if( width > 100 ) {
|
582 |
+
addclass = 'col-addons';
|
583 |
+
} else {
|
584 |
+
addclass = 'col7-addons';
|
585 |
+
}
|
586 |
+
$(element)
|
587 |
+
.removeClass('col8-addons')
|
588 |
+
.removeClass('col7-addons')
|
589 |
+
.removeClass('col6-addons')
|
590 |
+
.removeClass('col5-addons')
|
591 |
+
.removeClass('col4-addons')
|
592 |
+
.removeClass('col3-addons')
|
593 |
+
.removeClass('col2-addons')
|
594 |
+
.removeClass('col-addons');
|
595 |
+
if( addclass ) {
|
596 |
+
$(element).addClass(addclass);
|
597 |
+
}
|
598 |
+
}
|
599 |
+
function berocket_addon_list_resize_all() {
|
600 |
+
$('.berocket_addons_list').each(function() {
|
601 |
+
berocket_addon_list_resize($(this));
|
602 |
+
});
|
603 |
+
}
|
604 |
+
$(window).on('resize', berocket_addon_list_resize_all);
|
605 |
$(document).ready( function () {
|
606 |
+
berocket_addon_list_resize_all();
|
607 |
$(document).on('change', '.berocket_addons_list input', function() {
|
608 |
$(this).parents('.br_framework_submit_form').addClass('br_reload_form');
|
609 |
});
|
berocket/framework.php
CHANGED
@@ -101,6 +101,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
101 |
add_filter('berocket_admin_notices_subscribe_plugins', array($this, 'admin_notices_subscribe_plugins'));
|
102 |
}
|
103 |
$this->libraries = new BeRocket_framework_libraries($this->active_libraries, $this->info, $this->values, $this->get_option());
|
|
|
104 |
}
|
105 |
do_action($this->info[ 'plugin_name' ].'_framework_construct', $this->cc);
|
106 |
add_filter('brfr_get_plugin_version_capability_'.$this->cc->info['plugin_name'], array($this, 'get_plugin_version_capability'));
|
@@ -180,7 +181,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
180 |
* @return void
|
181 |
*/
|
182 |
public function activation() {
|
183 |
-
add_option( $this->cc->values[ 'settings_name' ],
|
184 |
do_action('brfr_activate_' . $this->cc->info[ 'plugin_name' ]);
|
185 |
}
|
186 |
|
@@ -278,7 +279,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
278 |
$global_option = $this->get_global_option();
|
279 |
wp_enqueue_script( "jquery" );
|
280 |
if( is_admin() ) {
|
281 |
-
|
282 |
wp_enqueue_style( 'font-awesome' );
|
283 |
} elseif( ! empty($this->framework_data['fontawesome_frontend']) ) {
|
284 |
$this->enqueue_fontawesome();
|
@@ -314,15 +315,15 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
314 |
$global_option = $this->get_global_option();
|
315 |
if( empty($global_option['fontawesome_frontend_disable']) ) {
|
316 |
if( br_get_value_from_array($global_option, 'fontawesome_frontend_version') == 'fontawesome5' ) {
|
317 |
-
|
318 |
wp_enqueue_style( 'font-awesome-5' );
|
319 |
} else {
|
320 |
-
|
321 |
wp_enqueue_style( 'font-awesome' );
|
322 |
}
|
323 |
} else {
|
324 |
if( br_get_value_from_array($global_option, 'fontawesome_frontend_version') == 'fontawesome5' ) {
|
325 |
-
|
326 |
wp_enqueue_style( 'font-awesome-5-compat' );
|
327 |
}
|
328 |
}
|
@@ -422,7 +423,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
422 |
}
|
423 |
|
424 |
public function option_page_capability($capability = '') {
|
425 |
-
return '
|
426 |
}
|
427 |
|
428 |
/**
|
@@ -824,7 +825,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
824 |
}
|
825 |
public function save_settings_callback($settings) {
|
826 |
if ( isset( $settings ) ) {
|
827 |
-
$settings =
|
828 |
if( count($this->global_settings) ) {
|
829 |
$global_options = $this->get_global_option();
|
830 |
foreach($this->global_settings as $global_setting) {
|
@@ -862,7 +863,7 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
862 |
* @return mixed
|
863 |
*/
|
864 |
public function sanitize_option( $input ) {
|
865 |
-
$new_input =
|
866 |
return apply_filters('brfr_sanitize_option_' . $this->cc->info[ 'plugin_name' ], $new_input, $input, $this->cc->defaults);
|
867 |
}
|
868 |
|
@@ -987,5 +988,23 @@ if( ! class_exists( 'BeRocket_Framework' ) ) {
|
|
987 |
public function update_version($previous, $current) {
|
988 |
|
989 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
990 |
}
|
991 |
}
|
101 |
add_filter('berocket_admin_notices_subscribe_plugins', array($this, 'admin_notices_subscribe_plugins'));
|
102 |
}
|
103 |
$this->libraries = new BeRocket_framework_libraries($this->active_libraries, $this->info, $this->values, $this->get_option());
|
104 |
+
add_filter('BeRocket_admin_init_user_capabilities', array($this, 'init_user_capabilities'));
|
105 |
}
|
106 |
do_action($this->info[ 'plugin_name' ].'_framework_construct', $this->cc);
|
107 |
add_filter('brfr_get_plugin_version_capability_'.$this->cc->info['plugin_name'], array($this, 'get_plugin_version_capability'));
|
181 |
* @return void
|
182 |
*/
|
183 |
public function activation() {
|
184 |
+
add_option( $this->cc->values[ 'settings_name' ], $this->sanitize_option( $this->cc->defaults ) );
|
185 |
do_action('brfr_activate_' . $this->cc->info[ 'plugin_name' ]);
|
186 |
}
|
187 |
|
279 |
$global_option = $this->get_global_option();
|
280 |
wp_enqueue_script( "jquery" );
|
281 |
if( is_admin() ) {
|
282 |
+
$this->register_font_awesome();
|
283 |
wp_enqueue_style( 'font-awesome' );
|
284 |
} elseif( ! empty($this->framework_data['fontawesome_frontend']) ) {
|
285 |
$this->enqueue_fontawesome();
|
315 |
$global_option = $this->get_global_option();
|
316 |
if( empty($global_option['fontawesome_frontend_disable']) ) {
|
317 |
if( br_get_value_from_array($global_option, 'fontawesome_frontend_version') == 'fontawesome5' ) {
|
318 |
+
$this->register_font_awesome('fa5');
|
319 |
wp_enqueue_style( 'font-awesome-5' );
|
320 |
} else {
|
321 |
+
$this->register_font_awesome('fa4');
|
322 |
wp_enqueue_style( 'font-awesome' );
|
323 |
}
|
324 |
} else {
|
325 |
if( br_get_value_from_array($global_option, 'fontawesome_frontend_version') == 'fontawesome5' ) {
|
326 |
+
$this->register_font_awesome('fa5c');
|
327 |
wp_enqueue_style( 'font-awesome-5-compat' );
|
328 |
}
|
329 |
}
|
423 |
}
|
424 |
|
425 |
public function option_page_capability($capability = '') {
|
426 |
+
return 'manage_berocket';
|
427 |
}
|
428 |
|
429 |
/**
|
825 |
}
|
826 |
public function save_settings_callback($settings) {
|
827 |
if ( isset( $settings ) ) {
|
828 |
+
$settings = $this->sanitize_option( $settings );
|
829 |
if( count($this->global_settings) ) {
|
830 |
$global_options = $this->get_global_option();
|
831 |
foreach($this->global_settings as $global_setting) {
|
863 |
* @return mixed
|
864 |
*/
|
865 |
public function sanitize_option( $input ) {
|
866 |
+
$new_input = $this->recursive_array_set( $this->cc->defaults, $input );
|
867 |
return apply_filters('brfr_sanitize_option_' . $this->cc->info[ 'plugin_name' ], $new_input, $input, $this->cc->defaults);
|
868 |
}
|
869 |
|
988 |
public function update_version($previous, $current) {
|
989 |
|
990 |
}
|
991 |
+
public function init_user_capabilities($user_caps) {
|
992 |
+
$user_caps[] = $this->option_page_capability();
|
993 |
+
return $user_caps;
|
994 |
+
}
|
995 |
+
}
|
996 |
+
add_action('admin_init', 'BeRocket_admin_init_user_capabilities');
|
997 |
+
function BeRocket_admin_init_user_capabilities() {
|
998 |
+
global $wp_roles;
|
999 |
+
$role_names = $wp_roles->get_names();
|
1000 |
+
$berocket_roles = apply_filters('BeRocket_admin_init_user_capabilities', array('manage_berocket', 'manage_berocket_account'));
|
1001 |
+
foreach($role_names as $role_name => $role_text) {
|
1002 |
+
$role_object = get_role( $role_name );
|
1003 |
+
if( $role_object->has_cap( 'manage_options' ) ) {
|
1004 |
+
foreach($berocket_roles as $berocket_role) {
|
1005 |
+
$role_object->add_cap( $berocket_role );
|
1006 |
+
}
|
1007 |
+
}
|
1008 |
+
}
|
1009 |
}
|
1010 |
}
|
berocket/includes/custom_post.php
CHANGED
@@ -65,6 +65,9 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
65 |
}
|
66 |
add_filter('berocket_custom_post_'.$this->post_name.'_get_custom_posts_args_default', array($this, 'sortable_get_custom_post'));
|
67 |
}
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
function init() {
|
@@ -430,5 +433,15 @@ if ( ! class_exists('BeRocket_custom_post_class') ) {
|
|
430 |
$columns["berocket_sortable"] = __( "Order", 'BeRocket_domain' );
|
431 |
return $columns;
|
432 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
}
|
434 |
}
|
65 |
}
|
66 |
add_filter('berocket_custom_post_'.$this->post_name.'_get_custom_posts_args_default', array($this, 'sortable_get_custom_post'));
|
67 |
}
|
68 |
+
if( ! empty($this->post_settings['capability_type']) && $this->post_settings['capability_type'] != 'product' ) {
|
69 |
+
add_filter('BeRocket_admin_init_user_capabilities', array($this, 'init_user_capabilities'));
|
70 |
+
}
|
71 |
}
|
72 |
|
73 |
function init() {
|
433 |
$columns["berocket_sortable"] = __( "Order", 'BeRocket_domain' );
|
434 |
return $columns;
|
435 |
}
|
436 |
+
public function init_user_capabilities($user_caps) {
|
437 |
+
$cap_settings = $this->post_settings;
|
438 |
+
$cap_settings['capabilities'] = array();
|
439 |
+
$post_caps = get_post_type_capabilities((object)$cap_settings);
|
440 |
+
$post_caps = (array)$post_caps;
|
441 |
+
foreach($post_caps as $post_cap) {
|
442 |
+
$user_caps[] = $post_cap;
|
443 |
+
}
|
444 |
+
return $user_caps;
|
445 |
+
}
|
446 |
}
|
447 |
}
|
berocket/includes/updater.php
CHANGED
@@ -12,10 +12,18 @@ if ( ! class_exists( 'BeRocket_updater' ) ) {
|
|
12 |
public static $debug_mode = false;
|
13 |
|
14 |
public static function init() {
|
|
|
15 |
$options = self::get_options();
|
16 |
self::$debug_mode = ! empty( $options[ 'debug_mode' ] );
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
public static function run() {
|
20 |
$options = self::get_options();
|
21 |
self::$debug_mode = ! empty( $options[ 'debug_mode' ] );
|
@@ -434,21 +442,21 @@ if ( ! class_exists( 'BeRocket_updater' ) ) {
|
|
434 |
}
|
435 |
|
436 |
public static function network_account_page() {
|
437 |
-
add_menu_page( 'BeRocket Account Settings', 'BeRocket Account', '
|
438 |
__CLASS__,
|
439 |
'account_form_network'
|
440 |
), plugin_dir_url( __FILE__ ) . 'ico.png', '55.55' );
|
441 |
}
|
442 |
|
443 |
public static function main_menu_item() {
|
444 |
-
add_menu_page( 'BeRocket Account', 'BeRocket', '
|
445 |
__CLASS__,
|
446 |
'account_form'
|
447 |
), plugin_dir_url( __FILE__ ) . 'ico.png', '55.55' );
|
448 |
}
|
449 |
|
450 |
public static function account_page() {
|
451 |
-
add_submenu_page( 'berocket_account', 'BeRocket Account Settings', 'Account Keys', '
|
452 |
__CLASS__,
|
453 |
'account_form'
|
454 |
) );
|
@@ -797,6 +805,67 @@ if ( ! class_exists( 'BeRocket_updater' ) ) {
|
|
797 |
}
|
798 |
return $display_notice;
|
799 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
800 |
}
|
801 |
|
802 |
BeRocket_updater::init();
|
12 |
public static $debug_mode = false;
|
13 |
|
14 |
public static function init() {
|
15 |
+
add_action( 'admin_init', array(__CLASS__, 'admin_init') );
|
16 |
$options = self::get_options();
|
17 |
self::$debug_mode = ! empty( $options[ 'debug_mode' ] );
|
18 |
}
|
19 |
|
20 |
+
public static function admin_init() {
|
21 |
+
add_filter('woocommerce_addons_sections', array(__CLASS__, 'woocommerce_addons_sections'));
|
22 |
+
if( isset($_GET['page']) && isset($_GET['section']) && $_GET['page'] == 'wc-addons' && $_GET['section'] == 'berocket' ) {
|
23 |
+
add_action('admin_footer', array(__CLASS__, 'woocommerce_addons_berocket'));
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
public static function run() {
|
28 |
$options = self::get_options();
|
29 |
self::$debug_mode = ! empty( $options[ 'debug_mode' ] );
|
442 |
}
|
443 |
|
444 |
public static function network_account_page() {
|
445 |
+
add_menu_page( 'BeRocket Account Settings', 'BeRocket Account', 'manage_berocket', 'berocket_account', array(
|
446 |
__CLASS__,
|
447 |
'account_form_network'
|
448 |
), plugin_dir_url( __FILE__ ) . 'ico.png', '55.55' );
|
449 |
}
|
450 |
|
451 |
public static function main_menu_item() {
|
452 |
+
add_menu_page( 'BeRocket Account', 'BeRocket', 'manage_berocket', 'berocket_account', array(
|
453 |
__CLASS__,
|
454 |
'account_form'
|
455 |
), plugin_dir_url( __FILE__ ) . 'ico.png', '55.55' );
|
456 |
}
|
457 |
|
458 |
public static function account_page() {
|
459 |
+
add_submenu_page( 'berocket_account', 'BeRocket Account Settings', 'Account Keys', 'manage_berocket_account', 'berocket_account', array(
|
460 |
__CLASS__,
|
461 |
'account_form'
|
462 |
) );
|
805 |
}
|
806 |
return $display_notice;
|
807 |
}
|
808 |
+
|
809 |
+
public static function woocommerce_addons_sections($sections) {
|
810 |
+
$sections[] = (object)array(
|
811 |
+
'slug' => 'berocket',
|
812 |
+
'label' => 'BeRocket'
|
813 |
+
);
|
814 |
+
return $sections;
|
815 |
+
}
|
816 |
+
public static function woocommerce_addons_berocket() {
|
817 |
+
if ( false === ( $addons = get_transient( 'wc_addons_berocket' ) ) ) {
|
818 |
+
$addons = array();
|
819 |
+
$response = wp_remote_post( BeRocket_update_path . 'api/data/get_product_data/public', array(
|
820 |
+
'method' => 'GET',
|
821 |
+
'timeout' => 30,
|
822 |
+
'redirection' => 5,
|
823 |
+
'blocking' => true,
|
824 |
+
'sslverify' => false
|
825 |
+
) );
|
826 |
+
|
827 |
+
if ( ! is_wp_error( $response ) ) {
|
828 |
+
$products = wp_remote_retrieve_body( $response );
|
829 |
+
$products = json_decode($products);
|
830 |
+
foreach($products as $product) {
|
831 |
+
$addons[] = (object)array(
|
832 |
+
'title' => $product->name,
|
833 |
+
'image' => '',
|
834 |
+
'excerpt' => $product->about,
|
835 |
+
'link' => $product->plugin_url,
|
836 |
+
'price' => '$'.$product->price,
|
837 |
+
'hash' => '',
|
838 |
+
'slug' => $product->slug
|
839 |
+
);
|
840 |
+
}
|
841 |
+
|
842 |
+
set_transient( 'wc_addons_berocket', $addons, WEEK_IN_SECONDS );
|
843 |
+
}
|
844 |
+
|
845 |
+
}
|
846 |
+
?>
|
847 |
+
<ul class="products berocket_section_wc_addons">
|
848 |
+
<?php foreach ( $addons as $addon ) : ?>
|
849 |
+
<li class="product">
|
850 |
+
<a href="<?php echo esc_attr( $addon->link ); ?>">
|
851 |
+
<?php if ( ! empty( $addon->image ) ) : ?>
|
852 |
+
<span class="product-img-wrap"><img src="<?php echo esc_url( $addon->image ); ?>"/></span>
|
853 |
+
<?php else : ?>
|
854 |
+
<h2><?php echo esc_html( $addon->title ); ?></h2>
|
855 |
+
<?php endif; ?>
|
856 |
+
<span class="price"><?php echo wp_kses_post( $addon->price ); ?></span>
|
857 |
+
<p><?php echo wp_kses_post( $addon->excerpt ); ?></p>
|
858 |
+
</a>
|
859 |
+
</li>
|
860 |
+
<?php endforeach; ?>
|
861 |
+
</ul>
|
862 |
+
<script>
|
863 |
+
if( jQuery('.berocket_section_wc_addons').length && jQuery('.wc_addons_wrap .search-form').length ) {
|
864 |
+
jQuery('.wc_addons_wrap .search-form').after(jQuery('.berocket_section_wc_addons'));
|
865 |
+
}
|
866 |
+
</script>
|
867 |
+
<?php
|
868 |
+
}
|
869 |
}
|
870 |
|
871 |
BeRocket_updater::init();
|
berocket/libraries/feature_tab.php
CHANGED
@@ -27,7 +27,7 @@ if( ! class_exists('BeRocket_framework_feature_tab') ) {
|
|
27 |
'berocket_account',
|
28 |
$this->info[ 'norm_name' ] . ' ' . __( 'Features', 'BeRocket_domain' ),
|
29 |
__( 'Features', 'BeRocket_domain' ),
|
30 |
-
'
|
31 |
$this->values[ 'option_page' ].'_features',
|
32 |
array( $this, 'option_form' )
|
33 |
);
|
27 |
'berocket_account',
|
28 |
$this->info[ 'norm_name' ] . ' ' . __( 'Features', 'BeRocket_domain' ),
|
29 |
__( 'Features', 'BeRocket_domain' ),
|
30 |
+
'manage_berocket',
|
31 |
$this->values[ 'option_page' ].'_features',
|
32 |
array( $this, 'option_form' )
|
33 |
);
|
css/admin.css
CHANGED
@@ -453,6 +453,15 @@ td.colorpicker_field.colorpicker_removed:after {
|
|
453 |
.br-line-space.double {
|
454 |
height: 1em;
|
455 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
|
457 |
@media screen and (max-width: 782px) {
|
458 |
.berocket_aapf_widget_content {
|
453 |
.br-line-space.double {
|
454 |
height: 1em;
|
455 |
}
|
456 |
+
.br-row {
|
457 |
+
margin: 0 -10px;
|
458 |
+
}
|
459 |
+
.br-column-6 {
|
460 |
+
width: 50%;
|
461 |
+
float: left;
|
462 |
+
box-sizing: border-box;
|
463 |
+
padding: 0 10px;
|
464 |
+
}
|
465 |
|
466 |
@media screen and (max-width: 782px) {
|
467 |
.berocket_aapf_widget_content {
|
css/widget.css
CHANGED
@@ -184,7 +184,7 @@ ul.berocket_aapf_widget.berocket_aapf_widget-tag_cloud.ui-widget .berocket_tag_c
|
|
184 |
display: inline-block !important;
|
185 |
}
|
186 |
.berocket_aapf_widget .berocket_checkbox_color span label *{
|
187 |
-
display:
|
188 |
}
|
189 |
.berocket_aapf_widget .berocket_checkbox_color.berocket_color_without_value.brchecked_default input[type="checkbox"]:checked + label .berocket_color_span_block,
|
190 |
.berocket_aapf_widget .berocket_checkbox_color.berocket_color_without_value.brchecked_default .berocket_checked .berocket_color_span_block{
|
@@ -832,6 +832,7 @@ ul.berocket_aapf_widget li.berocket_tag_cloud_element > span label
|
|
832 |
color: #787878;
|
833 |
padding: 0px;
|
834 |
}
|
|
|
835 |
.berocket_aapf_widget li > span > input[type="radio"] + .berocket_label_widgets:before {
|
836 |
border: 2px solid #787878;
|
837 |
border-radius: 50%;
|
@@ -858,6 +859,7 @@ ul.berocket_aapf_widget li.berocket_tag_cloud_element > span label
|
|
858 |
height: 2em;
|
859 |
border: 1px solid #333;
|
860 |
}
|
|
|
861 |
.berocket_checkbox_color .berocket_color_span_block.berocket_aapf_count:before,
|
862 |
.berocket_checkbox_color .berocket_color_span_block.berocket_aapf_count:after{
|
863 |
content: "";
|
184 |
display: inline-block !important;
|
185 |
}
|
186 |
.berocket_aapf_widget .berocket_checkbox_color span label *{
|
187 |
+
display: inline-block !important;
|
188 |
}
|
189 |
.berocket_aapf_widget .berocket_checkbox_color.berocket_color_without_value.brchecked_default input[type="checkbox"]:checked + label .berocket_color_span_block,
|
190 |
.berocket_aapf_widget .berocket_checkbox_color.berocket_color_without_value.brchecked_default .berocket_checked .berocket_color_span_block{
|
832 |
color: #787878;
|
833 |
padding: 0px;
|
834 |
}
|
835 |
+
|
836 |
.berocket_aapf_widget li > span > input[type="radio"] + .berocket_label_widgets:before {
|
837 |
border: 2px solid #787878;
|
838 |
border-radius: 50%;
|
859 |
height: 2em;
|
860 |
border: 1px solid #333;
|
861 |
}
|
862 |
+
ul.berocket_aapf_widget li.berocket_checkbox_color > span > input[type="radio"]:checked + .berocket_label_widgets:before,
|
863 |
.berocket_checkbox_color .berocket_color_span_block.berocket_aapf_count:before,
|
864 |
.berocket_checkbox_color .berocket_color_span_block.berocket_aapf_count:after{
|
865 |
content: "";
|
includes/addons/woocommerce-variation.php
CHANGED
@@ -44,15 +44,15 @@ class BeRocket_AAPF_compat_woocommerce_variation {
|
|
44 |
if( is_array($terms) && count($terms) ) {
|
45 |
foreach($terms as $term) {
|
46 |
if( substr( $term[0], 0, 3 ) == 'pa_' ) {
|
47 |
-
$current_attributes[] = 'attribute_' . $term[0];
|
48 |
-
$current_terms[] = $term[3];
|
49 |
}
|
50 |
}
|
51 |
}
|
52 |
if( is_array($limits) && count($limits) ) {
|
53 |
foreach($limits as $attr => $term_ids) {
|
54 |
if( substr( $attr, 0, 3 ) == 'pa_' ) {
|
55 |
-
$current_attributes[] = 'attribute_' . $attr;
|
56 |
foreach($term_ids as $term_id) {
|
57 |
$term = get_term($term_id);
|
58 |
if( ! empty($term) && ! is_wp_error($term) ) {
|
@@ -69,11 +69,12 @@ class BeRocket_AAPF_compat_woocommerce_variation {
|
|
69 |
$query = sprintf( '
|
70 |
SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM
|
71 |
(
|
72 |
-
SELECT filtered_post.*, max_filtered_post.max_meta_count,
|
73 |
(
|
74 |
SELECT %1$s.id as var_id, %1$s.post_parent as ID, COUNT(%1$s.id) as meta_count FROM %1$s
|
75 |
INNER JOIN %2$s AS pf1 ON (%1$s.ID = pf1.post_id)
|
76 |
WHERE %1$s.post_type = "product_variation"
|
|
|
77 |
AND pf1.meta_key IN ("%4$s") AND pf1.meta_value IN ("%5$s")
|
78 |
GROUP BY %1$s.id
|
79 |
) as filtered_post
|
@@ -91,13 +92,18 @@ SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as
|
|
91 |
) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count
|
92 |
LEFT JOIN
|
93 |
(
|
94 |
-
SELECT
|
95 |
-
FROM
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
101 |
) as stock_table
|
102 |
ON filtered_post.var_id = stock_table.id
|
103 |
GROUP BY filtered_post.ID, out_of_stock
|
44 |
if( is_array($terms) && count($terms) ) {
|
45 |
foreach($terms as $term) {
|
46 |
if( substr( $term[0], 0, 3 ) == 'pa_' ) {
|
47 |
+
$current_attributes[] = sanitize_title('attribute_' . $term[0]);
|
48 |
+
$current_terms[] = sanitize_title($term[3]);
|
49 |
}
|
50 |
}
|
51 |
}
|
52 |
if( is_array($limits) && count($limits) ) {
|
53 |
foreach($limits as $attr => $term_ids) {
|
54 |
if( substr( $attr, 0, 3 ) == 'pa_' ) {
|
55 |
+
$current_attributes[] = sanitize_title('attribute_' . $attr);
|
56 |
foreach($term_ids as $term_id) {
|
57 |
$term = get_term($term_id);
|
58 |
if( ! empty($term) && ! is_wp_error($term) ) {
|
69 |
$query = sprintf( '
|
70 |
SELECT filtered_post.id, filtered_post.out_of_stock, COUNT(filtered_post.ID) as post_count FROM
|
71 |
(
|
72 |
+
SELECT filtered_post.*, max_filtered_post.max_meta_count, stock_table.out_of_stock_init as out_of_stock FROM
|
73 |
(
|
74 |
SELECT %1$s.id as var_id, %1$s.post_parent as ID, COUNT(%1$s.id) as meta_count FROM %1$s
|
75 |
INNER JOIN %2$s AS pf1 ON (%1$s.ID = pf1.post_id)
|
76 |
WHERE %1$s.post_type = "product_variation"
|
77 |
+
AND %1$s.post_status != "trash"
|
78 |
AND pf1.meta_key IN ("%4$s") AND pf1.meta_value IN ("%5$s")
|
79 |
GROUP BY %1$s.id
|
80 |
) as filtered_post
|
92 |
) as max_filtered_post ON max_filtered_post.ID = filtered_post.ID AND max_filtered_post.max_meta_count = filtered_post.meta_count
|
93 |
LEFT JOIN
|
94 |
(
|
95 |
+
SELECT wp_posts.id as id, COALESCE(stock_table_init.out_of_stock_init1, "0") as out_of_stock_init
|
96 |
+
FROM wp_posts
|
97 |
+
LEFT JOIN (
|
98 |
+
SELECT %1$s.id as id, "1" as out_of_stock_init1
|
99 |
+
FROM %1$s
|
100 |
+
' . apply_filters('brAAPFcompat_WCvariation_out_of_stock_where', 'WHERE %1$s.id IN
|
101 |
+
(
|
102 |
+
SELECT object_id FROM %3$s
|
103 |
+
WHERE term_taxonomy_id IN ( '.$outofstock.' )
|
104 |
+
) ') . '
|
105 |
+
) as stock_table_init on wp_posts.id = stock_table_init.id
|
106 |
+
GROUP BY id
|
107 |
) as stock_table
|
108 |
ON filtered_post.var_id = stock_table.id
|
109 |
GROUP BY filtered_post.ID, out_of_stock
|
includes/custom_post.php
CHANGED
@@ -56,7 +56,7 @@ class BeRocket_AAPF_single_filter extends BeRocket_custom_post_class {
|
|
56 |
'description' => __( 'This is where you can add Product Filters.', 'BeRocket_AJAX_domain' ),
|
57 |
'public' => true,
|
58 |
'show_ui' => true,
|
59 |
-
'capability_type' => '
|
60 |
'map_meta_cap' => true,
|
61 |
'publicly_queryable' => false,
|
62 |
'exclude_from_search' => true,
|
@@ -525,7 +525,7 @@ class BeRocket_AAPF_group_filters extends BeRocket_custom_post_class {
|
|
525 |
'description' => __( 'This is where you can add Product Filter Groups.', 'BeRocket_AJAX_domain' ),
|
526 |
'public' => true,
|
527 |
'show_ui' => true,
|
528 |
-
'capability_type' => '
|
529 |
'map_meta_cap' => true,
|
530 |
'publicly_queryable' => false,
|
531 |
'exclude_from_search' => true,
|
56 |
'description' => __( 'This is where you can add Product Filters.', 'BeRocket_AJAX_domain' ),
|
57 |
'public' => true,
|
58 |
'show_ui' => true,
|
59 |
+
'capability_type' => 'single_filter',
|
60 |
'map_meta_cap' => true,
|
61 |
'publicly_queryable' => false,
|
62 |
'exclude_from_search' => true,
|
525 |
'description' => __( 'This is where you can add Product Filter Groups.', 'BeRocket_AJAX_domain' ),
|
526 |
'public' => true,
|
527 |
'show_ui' => true,
|
528 |
+
'capability_type' => 'group_filters',
|
529 |
'map_meta_cap' => true,
|
530 |
'publicly_queryable' => false,
|
531 |
'exclude_from_search' => true,
|
includes/functions.php
CHANGED
@@ -125,6 +125,7 @@ if ( ! function_exists( 'br_is_term_selected' ) ) {
|
|
125 |
* @return string ' selected="selected"' if selected, empty string '' if not selected
|
126 |
*/
|
127 |
function br_is_term_selected( $term, $checked = FALSE, $child_parent = FALSE, $depth = 0 ) {
|
|
|
128 |
$term_taxonomy = $term->taxonomy;
|
129 |
if( $term_taxonomy == '_rating' ) {
|
130 |
$term_taxonomy = 'product_visibility';
|
@@ -683,6 +684,30 @@ if( ! function_exists( 'br_aapf_args_converter' ) ) {
|
|
683 |
}
|
684 |
}
|
685 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
if ( ! function_exists( 'br_aapf_get_styled' ) ) {
|
687 |
function br_aapf_get_styled() {
|
688 |
return array(
|
@@ -2405,3 +2430,15 @@ if( ! function_exists('br_generate_child_relation') ) {
|
|
2405 |
}
|
2406 |
}
|
2407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
* @return string ' selected="selected"' if selected, empty string '' if not selected
|
126 |
*/
|
127 |
function br_is_term_selected( $term, $checked = FALSE, $child_parent = FALSE, $depth = 0 ) {
|
128 |
+
//TODO: Notice: Trying to get property 'taxonomy' of non-object
|
129 |
$term_taxonomy = $term->taxonomy;
|
130 |
if( $term_taxonomy == '_rating' ) {
|
131 |
$term_taxonomy = 'product_visibility';
|
684 |
}
|
685 |
}
|
686 |
|
687 |
+
function br_widget_is_hide( $attribute, $widget_is_hide = false ) {
|
688 |
+
if ( $widget_is_hide ) {
|
689 |
+
if ( ! empty( $_POST['terms'] ) ) {
|
690 |
+
foreach ( $_POST['terms'] as $term ) {
|
691 |
+
if ( $term[0] == $attribute ) {
|
692 |
+
return false;
|
693 |
+
}
|
694 |
+
}
|
695 |
+
}
|
696 |
+
if ( ! empty( $_POST['limits'] ) ) {
|
697 |
+
foreach ( $_POST['limits'] as $a ) {
|
698 |
+
if ( $a[0] == $attribute ) {
|
699 |
+
return false;
|
700 |
+
}
|
701 |
+
}
|
702 |
+
}
|
703 |
+
if ( $attribute == 'price' and ( ! empty( $_POST['price'] ) or ! empty( $_POST['price_ranges'] ) ) ) {
|
704 |
+
return false;
|
705 |
+
}
|
706 |
+
}
|
707 |
+
|
708 |
+
return $widget_is_hide;
|
709 |
+
}
|
710 |
+
|
711 |
if ( ! function_exists( 'br_aapf_get_styled' ) ) {
|
712 |
function br_aapf_get_styled() {
|
713 |
return array(
|
2430 |
}
|
2431 |
}
|
2432 |
}
|
2433 |
+
|
2434 |
+
if ( ! function_exists('berocket_format_number') ) {
|
2435 |
+
function berocket_format_number( $number, $format = false ) {
|
2436 |
+
if ( ! $format ) {
|
2437 |
+
$BeRocket_AAPF = BeRocket_AAPF::getInstance();
|
2438 |
+
$br_options = $BeRocket_AAPF->get_option();
|
2439 |
+
$format = $br_options['number_style'];
|
2440 |
+
}
|
2441 |
+
|
2442 |
+
return number_format( $number, $format['decimal_number'], $format['decimal_separate'], $format['thousand_separate']);
|
2443 |
+
}
|
2444 |
+
}
|
includes/widget.php
CHANGED
@@ -698,10 +698,10 @@ class BeRocket_AAPF_Widget extends WP_Widget {
|
|
698 |
if ( $wc_order_by == 'menu_order' and $order_values_by == 'Default' ) {
|
699 |
foreach ( $terms as $term ) {
|
700 |
if( isset($term->term_id) ) {
|
701 |
-
$sort_array[] = get_term_meta( $term->term_id, 'order_' . $attribute );
|
702 |
}
|
703 |
}
|
704 |
-
array_multisort( $sort_array, $terms );
|
705 |
} else {
|
706 |
self::sort_terms( $terms, array(
|
707 |
"wc_order_by" => $wc_order_by,
|
@@ -815,47 +815,48 @@ class BeRocket_AAPF_Widget extends WP_Widget {
|
|
815 |
$values_per_row = 1;
|
816 |
}
|
817 |
|
818 |
-
$set_query_var_title['operator']
|
819 |
-
$set_query_var_title['attribute']
|
820 |
-
$set_query_var_title['type']
|
821 |
-
$set_query_var_title['title']
|
822 |
-
$set_query_var_title['class']
|
823 |
-
$set_query_var_title['css_class']
|
824 |
-
$set_query_var_title['style']
|
825 |
-
$set_query_var_title['scroll_theme']
|
826 |
-
$set_query_var_title['x']
|
827 |
-
$set_query_var_title['filter_type']
|
828 |
-
$set_query_var_title['uo']
|
829 |
-
$set_query_var_title['notuo']
|
830 |
-
$set_query_var_title['widget_is_hide']
|
831 |
-
$set_query_var_title['widget_collapse_disable']
|
832 |
-
$set_query_var_title['is_hide_mobile']
|
833 |
$set_query_var_title['show_product_count_per_attr'] = ! empty($show_product_count_per_attr);
|
834 |
-
$set_query_var_title['hide_child_attributes']
|
835 |
-
$set_query_var_title['cat_value_limit']
|
836 |
-
$set_query_var_title['select_first_element_text']
|
837 |
-
$set_query_var_title['icon_before_title']
|
838 |
-
$set_query_var_title['icon_after_title']
|
839 |
-
$set_query_var_title['hide_o_value']
|
840 |
-
$set_query_var_title['hide_sel_value']
|
841 |
-
$set_query_var_title['hide_empty_value']
|
842 |
-
$set_query_var_title['hide_button_value']
|
843 |
-
$set_query_var_title['attribute_count_show_hide']
|
844 |
-
$set_query_var_title['attribute_count']
|
845 |
-
$set_query_var_title['description']
|
846 |
-
$set_query_var_title['hide_collapse_arrow']
|
847 |
-
$set_query_var_title['values_per_row']
|
848 |
-
$set_query_var_title['child_parent']
|
849 |
-
$set_query_var_title['child_parent_depth']
|
850 |
-
$set_query_var_title['product_count_style']
|
851 |
-
$set_query_var_title['
|
852 |
-
$set_query_var_title['
|
853 |
-
$set_query_var_title['
|
854 |
-
$set_query_var_title['
|
855 |
-
$set_query_var_title['
|
856 |
-
$set_query_var_title['
|
857 |
-
$set_query_var_title['
|
858 |
-
$set_query_var_title['
|
|
|
859 |
set_query_var( 'berocket_query_var_title', $set_query_var_title );
|
860 |
|
861 |
// widget title and start tag ( <ul> ) can be found in templates/widget_start.php
|
@@ -1079,6 +1080,7 @@ class BeRocket_AAPF_Widget extends WP_Widget {
|
|
1079 |
$set_query_var_title['tag_script_var'] = $tag_script_var;
|
1080 |
} elseif ( $type == 'color' || $type == 'image' ) {
|
1081 |
$set_query_var_title['use_value_with_color'] = (isset($use_value_with_color) ? $use_value_with_color : null);
|
|
|
1082 |
$set_query_var_title['color_image_block_size'] = berocket_isset($color_image_block_size, false, 'h2em w2em');
|
1083 |
$set_query_var_title['color_image_checked'] = berocket_isset($color_image_checked, false, 'brchecked_default');
|
1084 |
$set_query_var_title['color_image_checked_custom_css'] = berocket_isset($color_image_checked_custom_css);
|
@@ -1096,7 +1098,7 @@ class BeRocket_AAPF_Widget extends WP_Widget {
|
|
1096 |
}
|
1097 |
$set_query_var_title['select_multiple'] = ! empty($select_multiple);
|
1098 |
}
|
1099 |
-
set_query_var( 'berocket_query_var_title', $set_query_var_title );
|
1100 |
br_get_template_part( apply_filters('berocket_widget_load_template_name', $type, $instance, (empty($terms) ? '' : $terms)) );
|
1101 |
|
1102 |
do_action('berocket_aapf_widget_before_end');
|
@@ -3075,9 +3077,11 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
3075 |
|
3076 |
public static function color_list_view( $type, $taxonomy_name, $load_script = false ) {
|
3077 |
$terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
|
|
|
|
3081 |
br_get_template_part( 'color_ajax' );
|
3082 |
}
|
3083 |
|
@@ -3090,9 +3094,11 @@ if( BeRocket_AAPF::$debug_mode ) {
|
|
3090 |
|
3091 |
public static function include_exclude_terms_list($taxonomy_name = false, $selected = array() ) {
|
3092 |
$terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
|
|
|
|
3096 |
ob_start();
|
3097 |
br_get_template_part( 'include_exclude_list' );
|
3098 |
return ob_get_clean();
|
698 |
if ( $wc_order_by == 'menu_order' and $order_values_by == 'Default' ) {
|
699 |
foreach ( $terms as $term ) {
|
700 |
if( isset($term->term_id) ) {
|
701 |
+
$sort_array[] = get_term_meta( $term->term_id, ( br_woocommerce_version_check('3.6') ? 'order' : 'order_' . $attribute ), true );
|
702 |
}
|
703 |
}
|
704 |
+
array_multisort( $sort_array, (empty($order_values_type) || $order_values_type == 'asc' ? SORT_ASC : SORT_DESC), $terms );
|
705 |
} else {
|
706 |
self::sort_terms( $terms, array(
|
707 |
"wc_order_by" => $wc_order_by,
|
815 |
$values_per_row = 1;
|
816 |
}
|
817 |
|
818 |
+
$set_query_var_title['operator'] = $operator;
|
819 |
+
$set_query_var_title['attribute'] = $attribute;
|
820 |
+
$set_query_var_title['type'] = $type;
|
821 |
+
$set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', $title );
|
822 |
+
$set_query_var_title['class'] = apply_filters( 'berocket_aapf_widget_class', $class );
|
823 |
+
$set_query_var_title['css_class'] = apply_filters( 'berocket_aapf_widget_css_class', (isset($css_class) ? $css_class : '') );
|
824 |
+
$set_query_var_title['style'] = apply_filters( 'berocket_aapf_widget_style', $style );
|
825 |
+
$set_query_var_title['scroll_theme'] = $scroll_theme;
|
826 |
+
$set_query_var_title['x'] = time();
|
827 |
+
$set_query_var_title['filter_type'] = $filter_type;
|
828 |
+
$set_query_var_title['uo'] = br_aapf_converter_styles( (empty($br_options['styles']) ? '' : $br_options['styles']) );
|
829 |
+
$set_query_var_title['notuo'] = (empty($br_options['styles']) ? '' : $br_options['styles']);
|
830 |
+
$set_query_var_title['widget_is_hide'] = (! empty($widget_collapse_enable) && ! empty($widget_is_hide));
|
831 |
+
$set_query_var_title['widget_collapse_disable'] = empty($widget_collapse_enable);
|
832 |
+
$set_query_var_title['is_hide_mobile'] = ! empty($is_hide_mobile);
|
833 |
$set_query_var_title['show_product_count_per_attr'] = ! empty($show_product_count_per_attr);
|
834 |
+
$set_query_var_title['hide_child_attributes'] = ! empty($hide_child_attributes);
|
835 |
+
$set_query_var_title['cat_value_limit'] = ( isset($cat_value_limit) ? $cat_value_limit : null );
|
836 |
+
$set_query_var_title['select_first_element_text'] = ( empty($select_first_element_text) ? __('Any', 'BeRocket_AJAX_domain') : $select_first_element_text );
|
837 |
+
$set_query_var_title['icon_before_title'] = (isset($icon_before_title) ? $icon_before_title : null);
|
838 |
+
$set_query_var_title['icon_after_title'] = (isset($icon_after_title) ? $icon_after_title : null);
|
839 |
+
$set_query_var_title['hide_o_value'] = ! empty($br_options['hide_value']['o']);
|
840 |
+
$set_query_var_title['hide_sel_value'] = ! empty($br_options['hide_value']['sel']);
|
841 |
+
$set_query_var_title['hide_empty_value'] = ! empty($br_options['hide_value']['empty']);
|
842 |
+
$set_query_var_title['hide_button_value'] = ! empty($br_options['hide_value']['button']);
|
843 |
+
$set_query_var_title['attribute_count_show_hide'] = berocket_isset($attribute_count_show_hide);
|
844 |
+
$set_query_var_title['attribute_count'] = $attribute_count;
|
845 |
+
$set_query_var_title['description'] = (isset($description) ? $description : null);
|
846 |
+
$set_query_var_title['hide_collapse_arrow'] = (empty($widget_collapse_enable) || ! empty($hide_collapse_arrow));
|
847 |
+
$set_query_var_title['values_per_row'] = (isset($values_per_row) ? $values_per_row : null);
|
848 |
+
$set_query_var_title['child_parent'] = (isset($child_parent) ? $child_parent : null);
|
849 |
+
$set_query_var_title['child_parent_depth'] = (isset($child_parent_depth) ? $child_parent_depth : null);
|
850 |
+
$set_query_var_title['product_count_style'] = (isset($br_options['styles_input']['product_count']) ? $br_options['styles_input']['product_count'] : '').'pcs '.(isset($br_options['styles_input']['product_count_position']) ? $br_options['styles_input']['product_count_position'] : null).'pcs';
|
851 |
+
$set_query_var_title['styles_input'] = (isset($br_options['styles_input']) ? $br_options['styles_input'] : array());
|
852 |
+
$set_query_var_title['child_parent_previous'] = (isset($child_parent_previous) ? $child_parent_previous : null);
|
853 |
+
$set_query_var_title['child_parent_no_values'] = (isset($child_parent_no_values) ? $child_parent_no_values : null);
|
854 |
+
$set_query_var_title['child_parent_no_products'] = (isset($child_parent_no_products) ? $child_parent_no_products : null);
|
855 |
+
$set_query_var_title['before_title'] = (isset($before_title) ? $before_title : null);
|
856 |
+
$set_query_var_title['after_title'] = (isset($after_title) ? $after_title : null);
|
857 |
+
$set_query_var_title['widget_id'] = ( $this->id ? $this->id : $widget_id );
|
858 |
+
$set_query_var_title['widget_id_number'] = ( $this->number ? $this->number : $widget_id_number );
|
859 |
+
$set_query_var_title['slug_urls'] = ! empty($br_options['slug_urls']);
|
860 |
set_query_var( 'berocket_query_var_title', $set_query_var_title );
|
861 |
|
862 |
// widget title and start tag ( <ul> ) can be found in templates/widget_start.php
|
1080 |
$set_query_var_title['tag_script_var'] = $tag_script_var;
|
1081 |
} elseif ( $type == 'color' || $type == 'image' ) {
|
1082 |
$set_query_var_title['use_value_with_color'] = (isset($use_value_with_color) ? $use_value_with_color : null);
|
1083 |
+
$set_query_var_title['disable_multiple'] = (isset($disable_multiple) ? $disable_multiple : null);
|
1084 |
$set_query_var_title['color_image_block_size'] = berocket_isset($color_image_block_size, false, 'h2em w2em');
|
1085 |
$set_query_var_title['color_image_checked'] = berocket_isset($color_image_checked, false, 'brchecked_default');
|
1086 |
$set_query_var_title['color_image_checked_custom_css'] = berocket_isset($color_image_checked_custom_css);
|
1098 |
}
|
1099 |
$set_query_var_title['select_multiple'] = ! empty($select_multiple);
|
1100 |
}
|
1101 |
+
set_query_var( 'berocket_query_var_title', apply_filters('berocket_query_var_title_before_widget', $set_query_var_title, $type, $instance));
|
1102 |
br_get_template_part( apply_filters('berocket_widget_load_template_name', $type, $instance, (empty($terms) ? '' : $terms)) );
|
1103 |
|
1104 |
do_action('berocket_aapf_widget_before_end');
|
3077 |
|
3078 |
public static function color_list_view( $type, $taxonomy_name, $load_script = false ) {
|
3079 |
$terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
|
3080 |
+
$set_query_var_color = array();
|
3081 |
+
$set_query_var_color['terms'] = $terms;
|
3082 |
+
$set_query_var_color['type'] = $type;
|
3083 |
+
$set_query_var_color['load_script'] = $load_script;
|
3084 |
+
set_query_var( 'berocket_query_var_color', $set_query_var_color );
|
3085 |
br_get_template_part( 'color_ajax' );
|
3086 |
}
|
3087 |
|
3094 |
|
3095 |
public static function include_exclude_terms_list($taxonomy_name = false, $selected = array() ) {
|
3096 |
$terms = get_terms( $taxonomy_name, array( 'hide_empty' => false ) );
|
3097 |
+
$set_query_var_exclude_list = array();
|
3098 |
+
$set_query_var_exclude_list['taxonomy'] = $taxonomy_name;
|
3099 |
+
$set_query_var_exclude_list['terms'] = $terms;
|
3100 |
+
$set_query_var_exclude_list['selected'] = $selected;
|
3101 |
+
set_query_var( 'berocket_var_exclude_list', $set_query_var_exclude_list );
|
3102 |
ob_start();
|
3103 |
br_get_template_part( 'include_exclude_list' );
|
3104 |
return ob_get_clean();
|
js/admin.js
CHANGED
@@ -281,6 +281,8 @@ var berocket_admin_filter_types_by_attr = {
|
|
281 |
berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_price_attribute', $parent),
|
282 |
( filter_type != 'attribute'
|
283 |
|| attribute != 'price' ) );
|
|
|
|
|
284 |
berocket_aapf_show_hide( $('.berocket_aapf_advanced_color_pick_settings', $parent),
|
285 |
( type != 'color' && type != 'image' ) );
|
286 |
berocket_aapf_show_hide( $('.berocket_aapf_product_sub_cat_current', $parent),
|
@@ -305,7 +307,8 @@ var berocket_admin_filter_types_by_attr = {
|
|
305 |
berocket_aapf_show_hide( $('.berocket_aapf_order_values_type', $parent),
|
306 |
( ( filter_type != 'attribute'
|
307 |
&& filter_type != 'custom_taxonomy' )
|
308 |
-
|| type == 'slider'
|
|
|
309 |
&& filter_type != 'tag'
|
310 |
&& filter_type != '_rating' );
|
311 |
berocket_aapf_show_hide( $('.berocket_attributes_slider_data', $parent),
|
@@ -324,6 +327,7 @@ var berocket_admin_filter_types_by_attr = {
|
|
324 |
berocket_aapf_show_hide( $('.berocket_options_for_select', $parent),
|
325 |
( ( filter_type != 'attribute'
|
326 |
&& filter_type != 'custom_taxonomy'
|
|
|
327 |
&& filter_type != 'tag' )
|
328 |
|| type != 'select' ) );
|
329 |
if ( type == 'color' || type == 'image' ) {
|
@@ -351,7 +355,9 @@ var berocket_admin_filter_types_by_attr = {
|
|
351 |
}
|
352 |
if( args.changed == 'filter_type' || args.changed == 'attribute' || args.changed == 'custom_taxonomy' || args.changed == 'type' ) {
|
353 |
var taxonomy_name = false;
|
354 |
-
if( filter_type == '
|
|
|
|
|
355 |
taxonomy_name = 'product_tag';
|
356 |
} else if( filter_type == 'attribute' && attribute != 'price' ) {
|
357 |
taxonomy_name = attribute;
|
281 |
berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_price_attribute', $parent),
|
282 |
( filter_type != 'attribute'
|
283 |
|| attribute != 'price' ) );
|
284 |
+
berocket_aapf_show_hide( $('.berocket_aapf_widget_admin_ranges_hide', $parent),
|
285 |
+
( type == 'ranges' ) );
|
286 |
berocket_aapf_show_hide( $('.berocket_aapf_advanced_color_pick_settings', $parent),
|
287 |
( type != 'color' && type != 'image' ) );
|
288 |
berocket_aapf_show_hide( $('.berocket_aapf_product_sub_cat_current', $parent),
|
307 |
berocket_aapf_show_hide( $('.berocket_aapf_order_values_type', $parent),
|
308 |
( ( filter_type != 'attribute'
|
309 |
&& filter_type != 'custom_taxonomy' )
|
310 |
+
|| type == 'slider'
|
311 |
+
|| type == 'ranges')
|
312 |
&& filter_type != 'tag'
|
313 |
&& filter_type != '_rating' );
|
314 |
berocket_aapf_show_hide( $('.berocket_attributes_slider_data', $parent),
|
327 |
berocket_aapf_show_hide( $('.berocket_options_for_select', $parent),
|
328 |
( ( filter_type != 'attribute'
|
329 |
&& filter_type != 'custom_taxonomy'
|
330 |
+
&& filter_type != 'product_cat'
|
331 |
&& filter_type != 'tag' )
|
332 |
|| type != 'select' ) );
|
333 |
if ( type == 'color' || type == 'image' ) {
|
355 |
}
|
356 |
if( args.changed == 'filter_type' || args.changed == 'attribute' || args.changed == 'custom_taxonomy' || args.changed == 'type' ) {
|
357 |
var taxonomy_name = false;
|
358 |
+
if( filter_type == 'product_cat' ) {
|
359 |
+
taxonomy_name = 'product_cat';
|
360 |
+
} else if( filter_type == 'tag' ) {
|
361 |
taxonomy_name = 'product_tag';
|
362 |
} else if( filter_type == 'attribute' && attribute != 'price' ) {
|
363 |
taxonomy_name = attribute;
|
js/widget.min.js
CHANGED
@@ -776,10 +776,10 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
776 |
var $thistitle = $(o).find('.berocket_aapf_widget-title_div');
|
777 |
var widget_block = $thistitle.next('.berocket_aapf_widget');
|
778 |
if(showbutton == 'hide') {
|
779 |
-
widget_block.
|
780 |
$thistitle.find('span').removeClass('show_button').addClass('hide_button');
|
781 |
} else if( showbutton == 'show' ) {
|
782 |
-
widget_block.
|
783 |
$thistitle.find('span').removeClass('hide_button').addClass('show_button');
|
784 |
}
|
785 |
var show_child_button = $('.berocket_single_filter_widget.berocket_single_filter_widget_'+$(o).data('id')).find('.br_child_toggle .fa-minus');
|
@@ -803,14 +803,14 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
803 |
if(showbutton == 'hide')
|
804 |
{
|
805 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_hidden').addClass('berocket_single_filter_visible');
|
806 |
-
widget_block.
|
807 |
$thistitle.find('span').removeClass('show_button').addClass('hide_button');
|
808 |
$thistitle.parents('.berocket_single_filter_widget').data('showbutton', 'hide');
|
809 |
}
|
810 |
else if( showbutton == 'show' )
|
811 |
{
|
812 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
813 |
-
widget_block.
|
814 |
$thistitle.find('span').removeClass('hide_button').addClass('show_button');
|
815 |
$thistitle.parents('.berocket_single_filter_widget').data('showbutton', 'show');
|
816 |
}
|
@@ -988,12 +988,25 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
988 |
var uri_request = '';
|
989 |
temp_terms = [];
|
990 |
var taxonomy_sparator = "|", start_terms = "[", end_terms = "]", variable = 'filters';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
if( the_ajax_script.nice_urls ) {
|
992 |
taxonomy_sparator = the_ajax_script.nice_url_split;
|
993 |
start_terms = the_ajax_script.nice_url_value_1;
|
994 |
end_terms = the_ajax_script.nice_url_value_2;
|
995 |
variable = the_ajax_script.nice_url_variable;
|
996 |
}
|
|
|
997 |
if( args.price ){
|
998 |
$price_obj = $('.berocket_filter_price_slider');
|
999 |
if( ( args.price[0] || args.price[0] === 0 ) && ( args.price[1] || args.price[1] === 0 ) && ( args.price[0] != $price_obj.data('min') || args.price[1] != $price_obj.data('max') ) ){
|
@@ -1154,7 +1167,7 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
1154 |
passed_vars2[k] = [];
|
1155 |
passed_vars2[k][0] = temp.shift();
|
1156 |
passed_vars2[k][1] = temp.join("=");
|
1157 |
-
if( passed_vars2[k][0] ==
|
1158 |
|
1159 |
if( the_ajax_script.control_sorting && passed_vars2[k][0] == 'orderby' ) continue;
|
1160 |
|
@@ -1200,7 +1213,7 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
1200 |
next_symbol_sep = '&';
|
1201 |
}
|
1202 |
if( uri_request ) {
|
1203 |
-
uri = uri + next_symbol_sep + "
|
1204 |
next_symbol_sep = '&';
|
1205 |
}
|
1206 |
}
|
@@ -1674,14 +1687,14 @@ var updateProducts, berocket_set_slider, berocket_product_recount, global_ajax_d
|
|
1674 |
if(widget_block.css('display') == 'none')
|
1675 |
{
|
1676 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_hidden').addClass('berocket_single_filter_visible');
|
1677 |
-
widget_block.
|
1678 |
$(this).find('span').removeClass('show_button').addClass('hide_button');
|
1679 |
$(this).parents('.berocket_single_filter_widget').data('showbutton', 'hide');
|
1680 |
}
|
1681 |
else
|
1682 |
{
|
1683 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
1684 |
-
widget_block.
|
1685 |
if( typeof(widget_block.find('select').select2) == 'function' ) {
|
1686 |
widget_block.find('select').select2("close");
|
1687 |
}
|
@@ -2200,7 +2213,7 @@ load_hash_test();
|
|
2200 |
berocket_rewidth_inline_filters();
|
2201 |
$(document).ready(function (){
|
2202 |
berocket_rewidth_inline_filters();
|
2203 |
-
$(window).on('resize', function() {
|
2204 |
$('.berocket_single_filter_widget.berocket_inline_filters.berocket_inline_filters_rewidth').removeClass('berocket_inline_filters_rewidth');
|
2205 |
berocket_rewidth_inline_filters();
|
2206 |
});
|
@@ -2210,7 +2223,7 @@ load_hash_test();
|
|
2210 |
|| ! $(event.target).parents('.berocket_single_filter_widget.berocket_hidden_clickable').length ) {
|
2211 |
$filter = $('.berocket_single_filter_widget.berocket_hidden_clickable').not($(event.target).parents('.berocket_single_filter_widget.berocket_hidden_clickable'));
|
2212 |
$filter.removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
2213 |
-
$filter.find('.berocket_aapf_widget').
|
2214 |
$filter.find('.berocket_aapf_widget-title_div').find('span').removeClass('hide_button').addClass('show_button');
|
2215 |
$filter.find('.berocket_aapf_widget-title_div').parents('.berocket_single_filter_widget').data('showbutton', 'show');
|
2216 |
}
|
776 |
var $thistitle = $(o).find('.berocket_aapf_widget-title_div');
|
777 |
var widget_block = $thistitle.next('.berocket_aapf_widget');
|
778 |
if(showbutton == 'hide') {
|
779 |
+
widget_block.slideDown(0, function(){widget_block.find('.mCSB_container').css('width', '');});
|
780 |
$thistitle.find('span').removeClass('show_button').addClass('hide_button');
|
781 |
} else if( showbutton == 'show' ) {
|
782 |
+
widget_block.slideUp(0);
|
783 |
$thistitle.find('span').removeClass('hide_button').addClass('show_button');
|
784 |
}
|
785 |
var show_child_button = $('.berocket_single_filter_widget.berocket_single_filter_widget_'+$(o).data('id')).find('.br_child_toggle .fa-minus');
|
803 |
if(showbutton == 'hide')
|
804 |
{
|
805 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_hidden').addClass('berocket_single_filter_visible');
|
806 |
+
widget_block.slideDown(100, function(){widget_block.find('.mCSB_container').css('width', '');});
|
807 |
$thistitle.find('span').removeClass('show_button').addClass('hide_button');
|
808 |
$thistitle.parents('.berocket_single_filter_widget').data('showbutton', 'hide');
|
809 |
}
|
810 |
else if( showbutton == 'show' )
|
811 |
{
|
812 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
813 |
+
widget_block.slideUp(100);
|
814 |
$thistitle.find('span').removeClass('hide_button').addClass('show_button');
|
815 |
$thistitle.parents('.berocket_single_filter_widget').data('showbutton', 'show');
|
816 |
}
|
988 |
var uri_request = '';
|
989 |
temp_terms = [];
|
990 |
var taxonomy_sparator = "|", start_terms = "[", end_terms = "]", variable = 'filters';
|
991 |
+
|
992 |
+
if (typeof the_ajax_script.nn_url_variable != "undefined" && the_ajax_script.nn_url_variable.length > 0) {
|
993 |
+
variable = the_ajax_script.nn_url_variable;
|
994 |
+
}
|
995 |
+
if (typeof the_ajax_script.nn_url_value_1 != "undefined" && the_ajax_script.nn_url_value_1.length > 0) {
|
996 |
+
start_terms = the_ajax_script.nn_url_value_1;
|
997 |
+
end_terms = the_ajax_script.nn_url_value_2;
|
998 |
+
}
|
999 |
+
if (typeof the_ajax_script.nn_url_split != "undefined" && the_ajax_script.nn_url_split.length > 0) {
|
1000 |
+
taxonomy_sparator = the_ajax_script.nn_url_split;
|
1001 |
+
}
|
1002 |
+
|
1003 |
if( the_ajax_script.nice_urls ) {
|
1004 |
taxonomy_sparator = the_ajax_script.nice_url_split;
|
1005 |
start_terms = the_ajax_script.nice_url_value_1;
|
1006 |
end_terms = the_ajax_script.nice_url_value_2;
|
1007 |
variable = the_ajax_script.nice_url_variable;
|
1008 |
}
|
1009 |
+
|
1010 |
if( args.price ){
|
1011 |
$price_obj = $('.berocket_filter_price_slider');
|
1012 |
if( ( args.price[0] || args.price[0] === 0 ) && ( args.price[1] || args.price[1] === 0 ) && ( args.price[0] != $price_obj.data('min') || args.price[1] != $price_obj.data('max') ) ){
|
1167 |
passed_vars2[k] = [];
|
1168 |
passed_vars2[k][0] = temp.shift();
|
1169 |
passed_vars2[k][1] = temp.join("=");
|
1170 |
+
if( passed_vars2[k][0] == variable || passed_vars2[k][0] == 'page' || passed_vars2[k][0] == 'paged' || passed_vars2[k][0] == 'product-page' ) continue;
|
1171 |
|
1172 |
if( the_ajax_script.control_sorting && passed_vars2[k][0] == 'orderby' ) continue;
|
1173 |
|
1213 |
next_symbol_sep = '&';
|
1214 |
}
|
1215 |
if( uri_request ) {
|
1216 |
+
uri = uri + next_symbol_sep + variable + "=" + uri_request;
|
1217 |
next_symbol_sep = '&';
|
1218 |
}
|
1219 |
}
|
1687 |
if(widget_block.css('display') == 'none')
|
1688 |
{
|
1689 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_hidden').addClass('berocket_single_filter_visible');
|
1690 |
+
widget_block.slideDown(0, function(){widget_block.find('.mCSB_container').css('width', '');});
|
1691 |
$(this).find('span').removeClass('show_button').addClass('hide_button');
|
1692 |
$(this).parents('.berocket_single_filter_widget').data('showbutton', 'hide');
|
1693 |
}
|
1694 |
else
|
1695 |
{
|
1696 |
widget_block.parents('.berocket_single_filter_widget').first().removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
1697 |
+
widget_block.slideUp(0);
|
1698 |
if( typeof(widget_block.find('select').select2) == 'function' ) {
|
1699 |
widget_block.find('select').select2("close");
|
1700 |
}
|
2213 |
berocket_rewidth_inline_filters();
|
2214 |
$(document).ready(function (){
|
2215 |
berocket_rewidth_inline_filters();
|
2216 |
+
$(window).on('resize berocket_ajax_filtering_end', function() {
|
2217 |
$('.berocket_single_filter_widget.berocket_inline_filters.berocket_inline_filters_rewidth').removeClass('berocket_inline_filters_rewidth');
|
2218 |
berocket_rewidth_inline_filters();
|
2219 |
});
|
2223 |
|| ! $(event.target).parents('.berocket_single_filter_widget.berocket_hidden_clickable').length ) {
|
2224 |
$filter = $('.berocket_single_filter_widget.berocket_hidden_clickable').not($(event.target).parents('.berocket_single_filter_widget.berocket_hidden_clickable'));
|
2225 |
$filter.removeClass('berocket_single_filter_visible').addClass('berocket_single_filter_hidden');
|
2226 |
+
$filter.find('.berocket_aapf_widget').slideUp(40);
|
2227 |
$filter.find('.berocket_aapf_widget-title_div').find('span').removeClass('hide_button').addClass('show_button');
|
2228 |
$filter.find('.berocket_aapf_widget-title_div').parents('.berocket_single_filter_widget').data('showbutton', 'show');
|
2229 |
}
|
main.php
CHANGED
@@ -23,6 +23,11 @@ class BeRocket_AAPF extends BeRocket_Framework {
|
|
23 |
'value' => '/values',
|
24 |
'split' => '/',
|
25 |
);
|
|
|
|
|
|
|
|
|
|
|
26 |
protected $check_init_array = array(
|
27 |
array(
|
28 |
'check' => 'woocommerce_version',
|
@@ -32,6 +37,14 @@ class BeRocket_AAPF extends BeRocket_Framework {
|
|
32 |
'notice' => 'Plugin WooCommerce AJAX Products Filter required WooCommerce version 3.0 or higher'
|
33 |
)
|
34 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
);
|
36 |
function __construct () {
|
37 |
global $berocket_unique_value;
|
@@ -172,92 +185,99 @@ class BeRocket_AAPF extends BeRocket_Framework {
|
|
172 |
parent::__construct( $this );
|
173 |
|
174 |
if ( ! function_exists('is_network_admin') || ! is_network_admin() ) {
|
175 |
-
if
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
}
|
204 |
-
if ( ! is_admin() ) {
|
205 |
-
if( empty($option['styles_in_footer']) ) {
|
206 |
-
add_action( 'wp_head', array( $this, 'br_custom_user_css' ) );
|
207 |
-
}
|
208 |
-
if ( ! defined('DOING_AJAX') || ! DOING_AJAX ) {
|
209 |
-
$this->not_ajax_functions();
|
210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
-
if ( ! empty($option['
|
220 |
-
|
221 |
}
|
222 |
-
if( ! empty($option['
|
223 |
-
|
224 |
}
|
225 |
-
|
226 |
-
|
227 |
-
add_filter('berocket_aapf_select_term_child_prefix', array($this, 'select_term_child_prefix'));
|
228 |
}
|
229 |
-
if( ! empty($option['
|
230 |
-
include_once( dirname( __FILE__ ) . '/includes/addons/
|
231 |
-
new BeRocket_AAPF_addon_page_same_as_filter($option['page_same_as_filter']);
|
232 |
}
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
add_filter('
|
240 |
-
|
241 |
-
if( ! empty($option['search_fix']) ) {
|
242 |
-
add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );
|
243 |
-
}
|
244 |
-
if( ! empty($option['out_of_stock_variable']) ) {
|
245 |
-
include_once( dirname( __FILE__ ) . '/includes/addons/woocommerce-variation.php' );
|
246 |
-
}
|
247 |
-
if( ! empty($option['seo_meta_title']) ) {
|
248 |
-
include_once( dirname( __FILE__ ) . '/includes/addons/seo_meta_title.php' );
|
249 |
-
}
|
250 |
-
$plugin_base_slug = plugin_basename( __FILE__ );
|
251 |
-
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
252 |
-
add_filter( 'plugin_action_links_' . $plugin_base_slug, array( $this, 'plugin_action_links' ) );
|
253 |
-
add_filter( 'berocket_aapf_widget_terms', array($this, 'wpml_attribute_slug_translate'));
|
254 |
-
add_filter ( 'BeRocket_updater_menu_order_custom_post', array($this, 'menu_order_custom_post') );
|
255 |
-
} else {
|
256 |
-
if( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) {
|
257 |
-
add_action( 'admin_notices', array( $this, 'update_woocommerce' ) );
|
258 |
} else {
|
259 |
-
|
|
|
|
|
|
|
|
|
260 |
}
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
add_filter('BRaapf_cache_check_md5', array($this, 'BRaapf_cache_check_md5'));
|
263 |
}
|
@@ -266,6 +286,33 @@ class BeRocket_AAPF extends BeRocket_Framework {
|
|
266 |
return parent::init_validation() && ( ( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) &&
|
267 |
br_get_woocommerce_version() >= 2.1 );
|
268 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
public function init () {
|
270 |
parent::init();
|
271 |
|
@@ -1104,6 +1151,7 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
1104 |
}
|
1105 |
public function admin_init () {
|
1106 |
parent::admin_init();
|
|
|
1107 |
$this->create_berocket_term_table();
|
1108 |
if ( is_admin() ) {
|
1109 |
/* BeRocket WordPress Admin menu styles */
|
@@ -1385,7 +1433,7 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
1385 |
}
|
1386 |
public function update_from_older( $version ) {
|
1387 |
$option = $this->get_option();
|
1388 |
-
$version_index =
|
1389 |
if( version_compare($version, '2.0', '>') ) {
|
1390 |
if ( version_compare($version, '2.0.4', '<') ) {
|
1391 |
$version_index = 1;
|
@@ -1397,6 +1445,8 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
1397 |
$version_index = 4;
|
1398 |
} elseif ( ! empty($version) && version_compare($version, '2.2', '<') ) {
|
1399 |
$version_index = 5;
|
|
|
|
|
1400 |
}
|
1401 |
}
|
1402 |
|
@@ -1434,6 +1484,9 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
1434 |
}
|
1435 |
}
|
1436 |
}
|
|
|
|
|
|
|
1437 |
|
1438 |
update_option( 'br_filters_options', $option );
|
1439 |
update_option( 'br_filters_version', BeRocket_AJAX_filters_version );
|
@@ -1882,6 +1935,7 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
1882 |
if ( ( isset($tmp['chk_default_options_db']) and $tmp['chk_default_options_db'] == '1' ) or !is_array( $tmp2 ) ) {
|
1883 |
delete_option( 'berocket_permalink_option' );
|
1884 |
update_option( 'berocket_permalink_option', $this->default_permalink );
|
|
|
1885 |
}
|
1886 |
}
|
1887 |
public function br_delete_plugin_options($networkwide) {
|
@@ -2207,16 +2261,17 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
2207 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
2208 |
}
|
2209 |
public function selected_area() {
|
|
|
2210 |
$br_options = apply_filters( 'berocket_aapf_listener_br_options', $this->get_option() );
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
|
|
2218 |
br_get_template_part( 'widget_selected_area' );
|
2219 |
-
set_query_var( 'is_hooked', false );
|
2220 |
}
|
2221 |
public function br_aapf_get_child() {
|
2222 |
$br_options = apply_filters( 'berocket_aapf_listener_br_options', $this->get_option() );
|
@@ -2408,6 +2463,59 @@ jQuery(document).on('change', '.br_selected_area_show', br_selected_area_show);
|
|
2408 |
$md5 = $md5 . br_get_value_from_array($options, 'purge_cache_time');
|
2409 |
return $md5;
|
2410 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2411 |
}
|
2412 |
|
2413 |
new BeRocket_AAPF;
|
23 |
'value' => '/values',
|
24 |
'split' => '/',
|
25 |
);
|
26 |
+
public $default_nn_permalink = array (
|
27 |
+
'variable' => 'filters',
|
28 |
+
'value' => '[values]',
|
29 |
+
'split' => '|',
|
30 |
+
);
|
31 |
protected $check_init_array = array(
|
32 |
array(
|
33 |
'check' => 'woocommerce_version',
|
37 |
'notice' => 'Plugin WooCommerce AJAX Products Filter required WooCommerce version 3.0 or higher'
|
38 |
)
|
39 |
),
|
40 |
+
array(
|
41 |
+
'check' => 'framework_version',
|
42 |
+
'data' => array(
|
43 |
+
'version' => '2.1',
|
44 |
+
'operator' => '>=',
|
45 |
+
'notice' => 'Please update all BeRocket plugins to the most recent version. WooCommerce Terms and Conditions Popup is not working correctly with older versions.'
|
46 |
+
)
|
47 |
+
),
|
48 |
);
|
49 |
function __construct () {
|
50 |
global $berocket_unique_value;
|
185 |
parent::__construct( $this );
|
186 |
|
187 |
if ( ! function_exists('is_network_admin') || ! is_network_admin() ) {
|
188 |
+
if( $this->check_framework_version() ) {
|
189 |
+
if ( $this->init_validation() ) {
|
190 |
+
$last_version = get_option('br_filters_version');
|
191 |
+
if( $last_version === FALSE ) $last_version = 0;
|
192 |
+
if ( version_compare($last_version, BeRocket_AJAX_filters_version, '<') ) {
|
193 |
+
$this->update_from_older ( $last_version );
|
194 |
+
}
|
195 |
+
unset($last_version);
|
196 |
|
197 |
+
$option = $this->get_option();
|
198 |
+
if( class_exists('BeRocket_updater') && property_exists('BeRocket_updater', 'debug_mode') ) {
|
199 |
+
self::$debug_mode = ! empty(BeRocket_updater::$debug_mode);
|
200 |
+
}
|
201 |
+
add_filter( 'BeRocket_updater_error_log', array( $this, 'add_error_log' ) );
|
202 |
+
if ( self::$debug_mode ) {
|
203 |
+
self::$error_log['1_settings'] = $option;
|
204 |
+
}
|
205 |
|
206 |
|
207 |
+
add_action( 'admin_init', array( $this, 'admin_init' ) );
|
208 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
209 |
+
add_shortcode( 'br_filters', array( $this, 'shortcode' ) );
|
210 |
+
add_action( 'init', array( $this, 'create_metadata_table' ), 999999999 );
|
211 |
+
add_action( 'br_footer_script', array( $this, 'include_all_scripts' ) );
|
212 |
+
add_action( 'delete_transient_wc_products_onsale', array( $this, 'delete_products_not_on_sale' ) );
|
213 |
|
214 |
+
add_action ( 'widgets_init', array( $this, 'widgets_init' ));
|
215 |
+
if ( defined('DOING_AJAX') && DOING_AJAX ) {
|
216 |
+
$this->ajax_functions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
}
|
218 |
+
if ( ! is_admin() ) {
|
219 |
+
if( empty($option['styles_in_footer']) ) {
|
220 |
+
add_action( 'wp_head', array( $this, 'br_custom_user_css' ) );
|
221 |
+
}
|
222 |
+
if ( ! defined('DOING_AJAX') || ! DOING_AJAX ) {
|
223 |
+
$this->not_ajax_functions();
|
224 |
+
}
|
225 |
|
226 |
+
if ( isset($_GET['explode']) && $_GET['explode'] == 'explode') {
|
227 |
+
add_action( 'woocommerce_before_template_part', array( 'BeRocket_AAPF_Widget', 'pre_get_posts'), 999999 );
|
228 |
+
add_action( 'wp_footer', array( 'BeRocket_AAPF_Widget', 'end_clean'), 999999 );
|
229 |
+
add_action( 'init', array( 'BeRocket_AAPF_Widget', 'start_clean'), 1 );
|
230 |
+
} else {
|
231 |
+
add_action( 'woocommerce_before_template_part', array( 'BeRocket_AAPF_Widget', 'rebuild'), 999999 );
|
232 |
+
}
|
233 |
+
if ( ! empty($option['selected_area_show']) ) {
|
234 |
+
add_action ( br_get_value_from_array($option, 'elements_position_hook', 'woocommerce_archive_description'), array($this, 'selected_area'), 1 );
|
235 |
+
}
|
236 |
+
if( ! empty($option['ajax_site']) ) {
|
237 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'include_all_scripts' ) );
|
238 |
+
}
|
239 |
+
add_filter( 'is_active_sidebar', array($this, 'is_active_sidebar'), 10, 2);
|
240 |
+
if( ! empty($option['child_pre_indent']) ) {
|
241 |
+
add_filter('berocket_aapf_select_term_child_prefix', array($this, 'select_term_child_prefix'));
|
242 |
+
}
|
243 |
+
if( ! empty($option['page_same_as_filter']) ) {
|
244 |
+
include_once( dirname( __FILE__ ) . '/includes/addons/page-same-as-filter.php' );
|
245 |
+
new BeRocket_AAPF_addon_page_same_as_filter($option['page_same_as_filter']);
|
246 |
+
}
|
247 |
+
add_action('plugins_loaded', array($this, 'plugins_loaded'));
|
248 |
}
|
249 |
+
if ( ! empty($option['products_per_page']) && ! br_is_plugin_active( 'list-grid' ) && ! br_is_plugin_active( 'List_Grid' ) && ! br_is_plugin_active( 'more-products' ) && ! br_is_plugin_active( 'Load_More_Products' ) ) {
|
250 |
+
add_filter( 'loop_shop_per_page', array($this, 'products_per_page_set'), 9999 );
|
251 |
}
|
252 |
+
if( ! empty($option['products_only']) ) {
|
253 |
+
add_filter('woocommerce_is_filtered', array($this, 'woocommerce_is_filtered'));
|
254 |
}
|
255 |
+
if( ! empty($option['search_fix']) ) {
|
256 |
+
add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );
|
|
|
257 |
}
|
258 |
+
if( ! empty($option['out_of_stock_variable']) ) {
|
259 |
+
include_once( dirname( __FILE__ ) . '/includes/addons/woocommerce-variation.php' );
|
|
|
260 |
}
|
261 |
+
if( ! empty($option['seo_meta_title']) ) {
|
262 |
+
include_once( dirname( __FILE__ ) . '/includes/addons/seo_meta_title.php' );
|
263 |
+
}
|
264 |
+
$plugin_base_slug = plugin_basename( __FILE__ );
|
265 |
+
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
266 |
+
add_filter( 'plugin_action_links_' . $plugin_base_slug, array( $this, 'plugin_action_links' ) );
|
267 |
+
add_filter( 'berocket_aapf_widget_terms', array($this, 'wpml_attribute_slug_translate'));
|
268 |
+
add_filter ( 'BeRocket_updater_menu_order_custom_post', array($this, 'menu_order_custom_post') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
} else {
|
270 |
+
if( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) {
|
271 |
+
add_action( 'admin_notices', array( $this, 'update_woocommerce' ) );
|
272 |
+
} else {
|
273 |
+
add_action( 'admin_notices', array( $this, 'no_woocommerce' ) );
|
274 |
+
}
|
275 |
}
|
276 |
+
} else {
|
277 |
+
add_filter( 'berocket_display_additional_notices', array(
|
278 |
+
$this,
|
279 |
+
'old_framework_notice'
|
280 |
+
) );
|
281 |
}
|
282 |
add_filter('BRaapf_cache_check_md5', array($this, 'BRaapf_cache_check_md5'));
|
283 |
}
|
286 |
return parent::init_validation() && ( ( is_plugin_active( 'woocommerce/woocommerce.php' ) || is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) &&
|
287 |
br_get_woocommerce_version() >= 2.1 );
|
288 |
}
|
289 |
+
function check_framework_version() {
|
290 |
+
return ( ! empty(BeRocket_Framework::$framework_version) && version_compare(BeRocket_Framework::$framework_version, 2.1, '>=') );
|
291 |
+
}
|
292 |
+
function old_framework_notice($notices) {
|
293 |
+
$notices[] = array(
|
294 |
+
'start' => 0,
|
295 |
+
'end' => 0,
|
296 |
+
'name' => $this->info[ 'plugin_name' ].'_old_framework',
|
297 |
+
'html' => __('<strong>Please update all BeRocket plugins to the most recent version. WooCommerce AJAX Products Filter is not working correctly with older versions.</strong>', 'BeRocket_AJAX_domain'),
|
298 |
+
'righthtml' => '',
|
299 |
+
'rightwidth' => 0,
|
300 |
+
'nothankswidth' => 0,
|
301 |
+
'contentwidth' => 1600,
|
302 |
+
'subscribe' => false,
|
303 |
+
'priority' => 10,
|
304 |
+
'height' => 50,
|
305 |
+
'repeat' => false,
|
306 |
+
'repeatcount' => 1,
|
307 |
+
'image' => array(
|
308 |
+
'local' => '',
|
309 |
+
'width' => 0,
|
310 |
+
'height' => 0,
|
311 |
+
'scale' => 1,
|
312 |
+
)
|
313 |
+
);
|
314 |
+
return $notices;
|
315 |
+
}
|
316 |
public function init () {
|
317 |
parent::init();
|
318 |
|
1151 |
}
|
1152 |
public function admin_init () {
|
1153 |
parent::admin_init();
|
1154 |
+
add_action('berocket_fix_WC_outofstock', array($this, 'fix_WC_outofstock'), 10, 1);
|
1155 |
$this->create_berocket_term_table();
|
1156 |
if ( is_admin() ) {
|
1157 |
/* BeRocket WordPress Admin menu styles */
|
1433 |
}
|
1434 |
public function update_from_older( $version ) {
|
1435 |
$option = $this->get_option();
|
1436 |
+
$version_index = 7;
|
1437 |
if( version_compare($version, '2.0', '>') ) {
|
1438 |
if ( version_compare($version, '2.0.4', '<') ) {
|
1439 |
$version_index = 1;
|
1445 |
$version_index = 4;
|
1446 |
} elseif ( ! empty($version) && version_compare($version, '2.2', '<') ) {
|
1447 |
$version_index = 5;
|
1448 |
+
} elseif ( ! empty($version) && version_compare($version, '2.2.2.5', '<') ) {
|
1449 |
+
$version_index = 6;
|
1450 |
}
|
1451 |
}
|
1452 |
|
1484 |
}
|
1485 |
}
|
1486 |
}
|
1487 |
+
if( $version_index <= 6 ) {
|
1488 |
+
update_option( 'berocket_nn_permalink_option', $this->default_nn_permalink );
|
1489 |
+
}
|
1490 |
|
1491 |
update_option( 'br_filters_options', $option );
|
1492 |
update_option( 'br_filters_version', BeRocket_AJAX_filters_version );
|
1935 |
if ( ( isset($tmp['chk_default_options_db']) and $tmp['chk_default_options_db'] == '1' ) or !is_array( $tmp2 ) ) {
|
1936 |
delete_option( 'berocket_permalink_option' );
|
1937 |
update_option( 'berocket_permalink_option', $this->default_permalink );
|
1938 |
+
update_option( 'berocket_nn_permalink_option', $this->default_nn_permalink );
|
1939 |
}
|
1940 |
}
|
1941 |
public function br_delete_plugin_options($networkwide) {
|
2261 |
wp_enqueue_script( 'jquery-ui-datepicker' );
|
2262 |
}
|
2263 |
public function selected_area() {
|
2264 |
+
$set_query_var_title = array();
|
2265 |
$br_options = apply_filters( 'berocket_aapf_listener_br_options', $this->get_option() );
|
2266 |
+
$set_query_var_title['title'] = apply_filters( 'berocket_aapf_widget_title', ( empty($title) ? '' : $title ) );
|
2267 |
+
$set_query_var_title['uo'] = br_aapf_converter_styles( ( empty($br_options['styles']) ? '' : $br_options['styles'] ) );
|
2268 |
+
$set_query_var_title['selected_area_show'] = empty($br_options['selected_area_hide_empty']);
|
2269 |
+
$set_query_var_title['hide_selected_arrow'] = false;
|
2270 |
+
$set_query_var_title['selected_is_hide'] = false;
|
2271 |
+
$set_query_var_title['is_hooked'] = true;
|
2272 |
+
$set_query_var_title['is_hide_mobile'] = false;
|
2273 |
+
set_query_var( 'berocket_query_var_title', $set_query_var_title );
|
2274 |
br_get_template_part( 'widget_selected_area' );
|
|
|
2275 |
}
|
2276 |
public function br_aapf_get_child() {
|
2277 |
$br_options = apply_filters( 'berocket_aapf_listener_br_options', $this->get_option() );
|
2463 |
$md5 = $md5 . br_get_value_from_array($options, 'purge_cache_time');
|
2464 |
return $md5;
|
2465 |
}
|
2466 |
+
public function fix_WC_outofstock($variation_id) {
|
2467 |
+
$product = wc_get_product($variation_id);
|
2468 |
+
$this->update_visibility($product, true);
|
2469 |
+
}
|
2470 |
+
|
2471 |
+
/**
|
2472 |
+
* Update visibility terms based on props.
|
2473 |
+
*
|
2474 |
+
* @since 3.0.0
|
2475 |
+
*
|
2476 |
+
* @param WC_Product $product Product object.
|
2477 |
+
* @param bool $force Force update. Used during create.
|
2478 |
+
*/
|
2479 |
+
protected function update_visibility( &$product, $force = false ) {
|
2480 |
+
$changes = $product->get_changes();
|
2481 |
+
|
2482 |
+
if ( $force || array_intersect( array( 'stock_status' ), array_keys( $changes ) ) ) {
|
2483 |
+
$terms = array();
|
2484 |
+
|
2485 |
+
if ( 'outofstock' === $product->get_stock_status() ) {
|
2486 |
+
$terms[] = 'outofstock';
|
2487 |
+
}
|
2488 |
+
|
2489 |
+
wp_set_post_terms( $product->get_id(), $terms, 'product_visibility', false );
|
2490 |
+
}
|
2491 |
+
}
|
2492 |
+
|
2493 |
+
public function as_schedule_WC_outofstock() {
|
2494 |
+
$variation_ids = wp_parse_id_list(
|
2495 |
+
get_posts(
|
2496 |
+
array(
|
2497 |
+
'post_type' => 'product_variation',
|
2498 |
+
'fields' => 'ids',
|
2499 |
+
'post_status' => array( 'any', 'trash', 'auto-draft' ),
|
2500 |
+
'numberposts' => -1, // phpcs:ignore WordPress.VIP.PostsPerPage.posts_per_page_numberposts
|
2501 |
+
)
|
2502 |
+
)
|
2503 |
+
);
|
2504 |
+
foreach($variation_ids as $variation_id) {
|
2505 |
+
as_schedule_single_action( time(), 'berocket_fix_WC_outofstock', array($variation_id), 'BeRocket' );
|
2506 |
+
}
|
2507 |
+
}
|
2508 |
+
public function sanitize_option( $input ) {
|
2509 |
+
$input = parent::sanitize_option( $input );
|
2510 |
+
$option = $this->get_option();
|
2511 |
+
if( br_get_value_from_array($input, 'purge_cache_time') != br_get_value_from_array($option, 'purge_cache_time') ) {
|
2512 |
+
$this->as_schedule_WC_outofstock();
|
2513 |
+
}
|
2514 |
+
return $input;
|
2515 |
+
}
|
2516 |
+
public function option_page_capability($capability = '') {
|
2517 |
+
return 'manage_berocket_aapf';
|
2518 |
+
}
|
2519 |
}
|
2520 |
|
2521 |
new BeRocket_AAPF;
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://berocket.com/product/woocommerce-ajax-products-filter
|
|
5 |
Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.1.1
|
8 |
-
Stable tag: 1.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -187,6 +187,15 @@ You can try this plugin's admin side [here](http://berocket.com/product/woocomme
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= 1.3.1.8 =
|
191 |
* Enhancement - Compatibility with Elementor and other plugins
|
192 |
* Enhancement - Compatibility with other BeRocket plugins
|
5 |
Tags: filters, product filters, ajax product filters, ajax filter, ajax filter widget, color filter, size filter, product onsale filter, product preview, product category filter, product reset filter, product sort by filter, stock filter, product tag filter, price range filter, price box filter, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce products filter, woocommerce ajax product filters, widget, plugin, woocommerce item filters, filters plugin, ajax filters plugin, filter woocommerce products, filter woocommerce products plugin, wc filters, wc filters products, wc products filters, wc ajax products filters, wc product filters, wc advanced product filters, woocommerce layered nav, woocommerce layered navigation, ajax filtered nav, ajax filtered navigation, price filter, ajax price filter, woocommerce product sorting, sidebar filter, sidebar ajax filter, taxonomy filter, category filter, attribute filter, attributes filter, woocommerce product sort, ajax products filter plugin for woocommerce, rocket, berocket, berocket woocommerce ajax products filter
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.1.1
|
8 |
+
Stable tag: 1.3.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 1.3.2 =
|
191 |
+
* Enhancement - Option to turn off multiple select for images and colors
|
192 |
+
* Enhancement - Do not close widget if it is selected
|
193 |
+
* Fix - Internet Explorer issue with colors
|
194 |
+
* Fix - Attributes WooCommerce sorting in WooCommerce 3.6
|
195 |
+
* Fix - Remove out of stock variations, when attribute slug in not Latin
|
196 |
+
* Fix - Variations options with latest version of MySQL
|
197 |
+
* Fix - Variations with post status trash in query
|
198 |
+
|
199 |
= 1.3.1.8 =
|
200 |
* Enhancement - Compatibility with Elementor and other plugins
|
201 |
* Enhancement - Compatibility with other BeRocket plugins
|
templates/checkbox.php
CHANGED
@@ -42,32 +42,32 @@ if ( ! empty($terms) ):
|
|
42 |
$parent_count = $term->depth;
|
43 |
}
|
44 |
$added_categories[] = berocket_isset($term, 'term_id');
|
45 |
-
|
46 |
?>
|
47 |
-
|
48 |
-
<?php
|
49 |
-
|
50 |
-
|
51 |
-
if( ! empty($hide_sel_value) && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
52 |
-
echo ' berocket_hide_sel_value'; $hiden_value = true;
|
53 |
-
}
|
54 |
-
if( ! empty($attribute_count) ) {
|
55 |
-
if( $item_i > $attribute_count ) {
|
56 |
-
echo ' berocket_hide_attribute_count_value';
|
57 |
-
$hiden_value = true;
|
58 |
-
} elseif( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
59 |
-
echo ' berocket_hide_attribute_count_value';
|
60 |
-
$item_i--;
|
61 |
-
$hiden_value = true;
|
62 |
}
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<span>
|
68 |
<input id='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>_<?php echo berocket_isset($random_name) ?>'
|
69 |
class="<?php echo ( empty($uo['class']['checkbox_radio']) ? '' : $uo['class']['checkbox_radio'] ) ?> checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>"
|
70 |
-
type='checkbox'
|
71 |
autocomplete="off"
|
72 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] )?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
73 |
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
@@ -75,7 +75,8 @@ if ( ! empty($terms) ):
|
|
75 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
76 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
77 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
78 |
-
<?php echo br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ); ?>
|
|
|
79 |
<label data-for='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>' style="<?php echo ( empty($uo['style']['label']) ? '' : $uo['style']['label'] )?>"
|
80 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
81 |
<?php
|
@@ -104,25 +105,30 @@ if ( ! empty($terms) ):
|
|
104 |
$is_first = false;
|
105 |
}
|
106 |
endforeach;?>
|
107 |
-
<?php
|
108 |
-
|
109 |
-
|
|
|
110 |
} else {
|
111 |
-
echo '<li>'
|
112 |
}
|
113 |
} else {
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
-
jQuery(document).ready(function() {
|
120 |
-
if( child_parent_depth == <?php echo $child_parent_depth; ?> ) {
|
121 |
-
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
122 |
-
}
|
123 |
-
});
|
124 |
-
</script>
|
125 |
-
<?php }
|
126 |
}
|
127 |
if( ! empty($attribute_count_show_hide) ) {
|
128 |
if( $attribute_count_show_hide == 'hidden' ) {
|
42 |
$parent_count = $term->depth;
|
43 |
}
|
44 |
$added_categories[] = berocket_isset($term, 'term_id');
|
|
|
45 |
?>
|
46 |
+
|
47 |
+
<li class="berocket_term_parent_<?php echo ( property_exists($term, 'parent') ? $term->parent : '' ); ?> berocket_term_depth_<?php echo $parent_count; ?> <?php echo "brw-" . preg_replace( "#^(pa)?_#", "", $attribute ) . "-" . preg_replace( "#^(pa)?_#", "", berocket_isset($term, 'slug') ); ?> <?php if ( $is_child_parent ) echo 'R__class__R '; ?>
|
48 |
+
<?php if( ! empty($hide_o_value) && isset($term->count) && $term->count == 0 && ( !$is_child_parent || !$is_first ) ) {
|
49 |
+
echo ' berocket_hide_o_value'; $hiden_value = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
+
if( ! empty($hide_sel_value) && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
52 |
+
echo ' berocket_hide_sel_value'; $hiden_value = true;
|
53 |
+
}
|
54 |
+
if( ! empty($attribute_count) ) {
|
55 |
+
if( $item_i > $attribute_count ) {
|
56 |
+
echo ' berocket_hide_attribute_count_value';
|
57 |
+
$hiden_value = true;
|
58 |
+
} elseif( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
59 |
+
echo ' berocket_hide_attribute_count_value';
|
60 |
+
$item_i--;
|
61 |
+
$hiden_value = true;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
if( ! empty($hide_child_attributes) && in_array(berocket_isset($term, 'parent'), $added_categories) ) {
|
65 |
+
echo ' berocket_hide_child_attributes';
|
66 |
+
} ?>">
|
67 |
<span>
|
68 |
<input id='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>_<?php echo berocket_isset($random_name) ?>'
|
69 |
class="<?php echo ( empty($uo['class']['checkbox_radio']) ? '' : $uo['class']['checkbox_radio'] ) ?> checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>"
|
70 |
+
type='<?php echo ( ! empty( $disable_multiple_ranges ) ? 'radio' : 'checkbox' )?>'
|
71 |
autocomplete="off"
|
72 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] )?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
73 |
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
75 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
76 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
77 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
78 |
+
<?php echo br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ); ?>
|
79 |
+
<?php echo ( ! empty( $disable_multiple_ranges ) ? ' name="radio_' . $term_taxonomy_echo . '_' . $x . '_' . $random_name . '"' : '' )?> />
|
80 |
<label data-for='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>' style="<?php echo ( empty($uo['style']['label']) ? '' : $uo['style']['label'] )?>"
|
81 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
82 |
<?php
|
105 |
$is_first = false;
|
106 |
}
|
107 |
endforeach;?>
|
108 |
+
<?php
|
109 |
+
if ( $is_child_parent && is_array( berocket_isset( $terms ) ) && count( $terms ) == 1 ) {
|
110 |
+
if ( BeRocket_AAPF_Widget::is_parent_selected( $attribute, $child_parent_depth - 1 ) ) {
|
111 |
+
echo '<li>' . $child_parent_no_values . '</li>';
|
112 |
} else {
|
113 |
+
echo '<li>' . $child_parent_previous . '</li>';
|
114 |
}
|
115 |
} else {
|
116 |
+
if ( $child_parent_no_values ) {
|
117 |
+
if ( ! $child_parent_depth ) $child_parent_depth = '0';
|
118 |
+
?>
|
119 |
+
<script>
|
120 |
+
if ( typeof(child_parent_depth) == 'undefined' || child_parent_depth < <?php echo $child_parent_depth; ?> ) {
|
121 |
+
|
122 |
+
child_parent_depth = <?php echo (int) $child_parent_depth; ?>;
|
123 |
+
}
|
124 |
+
jQuery(document).ready(function() {
|
125 |
+
if( child_parent_depth == <?php echo (int) $child_parent_depth; ?> ) {
|
126 |
+
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
127 |
+
}
|
128 |
+
});
|
129 |
+
</script>
|
130 |
+
<?php
|
131 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
if( ! empty($attribute_count_show_hide) ) {
|
134 |
if( $attribute_count_show_hide == 'hidden' ) {
|
templates/color.php
CHANGED
@@ -98,7 +98,7 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
98 |
$meta_class = '<i class="fa '.$meta_color[0].'"></i> ';
|
99 |
$meta_color = '';
|
100 |
} else {
|
101 |
-
$meta_color = 'background: url('.$meta_color[0].') no-repeat scroll 50% 50% rgba(0, 0, 0, 0);';
|
102 |
$meta_class = ' ';
|
103 |
}
|
104 |
$meta_after = '';
|
@@ -109,41 +109,43 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
109 |
}
|
110 |
list($meta_class, $meta_after, $meta_color) = apply_filters('berocket_widget_color_image_temp_meta_ready', array($meta_class, $meta_after, $meta_color), $term, $meta_color_init, $variables_for_hooks);
|
111 |
?>
|
|
|
112 |
<li class="berocket_term_parent_<?php echo berocket_isset($term, 'parent');
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
}
|
118 |
-
if( ! empty($hide_sel_value) && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
119 |
-
echo ' berocket_hide_sel_value';
|
120 |
-
$hiden_value = true;
|
121 |
-
}
|
122 |
-
if( ! empty($attribute_count) ) {
|
123 |
-
if( $item_i > $attribute_count ) {
|
124 |
-
echo ' berocket_hide_attribute_count_value';
|
125 |
$hiden_value = true;
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
$hiden_value = true;
|
130 |
}
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
<span>
|
144 |
<input id='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>_<?php echo berocket_isset($random_name) ?>'
|
145 |
class="<?php echo ( empty($uo['class']['checkbox_radio']) ? '' : $uo['class']['checkbox_radio'] ) ?> checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>"
|
146 |
-
type='checkbox'
|
147 |
autocomplete="off"
|
148 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] ) ?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
149 |
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
@@ -151,7 +153,8 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
151 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
152 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
153 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
154 |
-
<?php echo br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ); ?>
|
|
|
155 |
<label data-for='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>'
|
156 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
157 |
<?php
|
@@ -178,18 +181,21 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
178 |
echo '<li>'.$child_parent_previous.'</li>';
|
179 |
}
|
180 |
} else {
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
if( child_parent_depth == <?php echo $child_parent_depth; ?> ) {
|
188 |
-
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
189 |
}
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
if( ! empty($attribute_count_show_hide) ) {
|
195 |
if( $attribute_count_show_hide == 'hidden' ) {
|
98 |
$meta_class = '<i class="fa '.$meta_color[0].'"></i> ';
|
99 |
$meta_color = '';
|
100 |
} else {
|
101 |
+
$meta_color = 'background: url('.$meta_color[0].') no-repeat scroll 50% 50% rgba(0, 0, 0, 0);background-size: cover;';
|
102 |
$meta_class = ' ';
|
103 |
}
|
104 |
$meta_after = '';
|
109 |
}
|
110 |
list($meta_class, $meta_after, $meta_color) = apply_filters('berocket_widget_color_image_temp_meta_ready', array($meta_class, $meta_after, $meta_color), $term, $meta_color_init, $variables_for_hooks);
|
111 |
?>
|
112 |
+
|
113 |
<li class="berocket_term_parent_<?php echo berocket_isset($term, 'parent');
|
114 |
+
if ( $is_child_parent ) echo ' R__class__R';
|
115 |
+
echo " brw-" . preg_replace( "#^(pa)?_#", "", $attribute ) . "-" . preg_replace( "#^(pa)?_#", "", berocket_isset($term, 'slug') );
|
116 |
+
if( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
117 |
+
echo ' berocket_hide_o_value';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
$hiden_value = true;
|
119 |
+
}
|
120 |
+
if( ! empty($hide_sel_value) && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
121 |
+
echo ' berocket_hide_sel_value';
|
122 |
$hiden_value = true;
|
123 |
}
|
124 |
+
if( ! empty($attribute_count) ) {
|
125 |
+
if( $item_i > $attribute_count ) {
|
126 |
+
echo ' berocket_hide_attribute_count_value';
|
127 |
+
$hiden_value = true;
|
128 |
+
} elseif( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
129 |
+
echo ' berocket_hide_attribute_count_value';
|
130 |
+
$item_i--;
|
131 |
+
$hiden_value = true;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
if( $color_image_block_size == 'hxpx_wxpx' ) {
|
135 |
+
echo ' hxpx_wxpx_'.$random_name;
|
136 |
+
} else {
|
137 |
+
echo ' '.$color_image_block_size;
|
138 |
+
}
|
139 |
+
if( berocket_isset($color_image_checked) == 'brchecked_custom' ) {
|
140 |
+
echo ' brchecked_custom_'.$random_name;
|
141 |
+
} else {
|
142 |
+
echo ' '.(empty($color_image_checked) ? 'brchecked_default' : $color_image_checked);
|
143 |
+
}
|
144 |
+
?> berocket_checkbox_color<?php echo ( ! empty($use_value_with_color) ? ' berocket_color_with_value' : ' berocket_color_without_value' ) ?>">
|
145 |
<span>
|
146 |
<input id='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>_<?php echo berocket_isset($random_name) ?>'
|
147 |
class="<?php echo ( empty($uo['class']['checkbox_radio']) ? '' : $uo['class']['checkbox_radio'] ) ?> checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>"
|
148 |
+
type='<?php echo ( ! empty( $disable_multiple ) ? 'radio' : 'checkbox' )?>'
|
149 |
autocomplete="off"
|
150 |
style="<?php echo ( empty($uo['style']['checkbox_radio']) ? '' : $uo['style']['checkbox_radio'] ) ?>" data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>'
|
151 |
data-term_name='<?php echo ( ! empty($icon_before_value) ? ( ( substr( $icon_before_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_value.'" alt=""></i>' ) : '' ) . berocket_isset($term, 'name') . ( ! empty($icon_after_value) ? ( ( substr( $icon_after_value, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_value.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_value.'" alt=""></i>' ) : '' )?>'
|
153 |
data-term_ranges='<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')) ?>'
|
154 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
155 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
156 |
+
<?php echo br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ); ?>
|
157 |
+
<?php echo ( ! empty( $disable_multiple ) ? ' name="radio_' . $term_taxonomy_echo . '_' . $x . '_' . $random_name . '"' : '' )?> />
|
158 |
<label data-for='checkbox_<?php echo str_replace ( '*' , '-' , berocket_isset($term, 'term_id')), str_replace ( '*' , '-' , $term_taxonomy_echo) ?>'
|
159 |
class="berocket_label_widgets<?php if( br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '') echo ' berocket_checked'; ?>">
|
160 |
<?php
|
181 |
echo '<li>'.$child_parent_previous.'</li>';
|
182 |
}
|
183 |
} else {
|
184 |
+
if( $child_parent_no_values ) {
|
185 |
+
if ( ! $child_parent_depth ) $child_parent_depth = '0';
|
186 |
+
?>
|
187 |
+
<script>
|
188 |
+
if ( typeof(child_parent_depth) == 'undefined' || child_parent_depth < <?php echo $child_parent_depth; ?> ) {
|
189 |
+
child_parent_depth = <?php echo $child_parent_depth; ?>;
|
|
|
|
|
190 |
}
|
191 |
+
jQuery(document).ready(function() {
|
192 |
+
if( child_parent_depth == <?php echo $child_parent_depth; ?> ) {
|
193 |
+
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
194 |
+
}
|
195 |
+
});
|
196 |
+
</script>
|
197 |
+
<?php
|
198 |
+
}
|
199 |
}
|
200 |
if( ! empty($attribute_count_show_hide) ) {
|
201 |
if( $attribute_count_show_hide == 'hidden' ) {
|
templates/color_ajax.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<div class="br_accordion">
|
2 |
<h3><?php if( $type == 'color' ) { _e('Color pick', 'BeRocket_AJAX_domain'); } elseif( $type == 'image' ) { _e('Image pick', 'BeRocket_AJAX_domain'); } ?></h3>
|
3 |
<div>
|
1 |
+
<?php extract($berocket_query_var_color); ?>
|
2 |
<div class="br_accordion">
|
3 |
<h3><?php if( $type == 'color' ) { _e('Color pick', 'BeRocket_AJAX_domain'); } elseif( $type == 'image' ) { _e('Image pick', 'BeRocket_AJAX_domain'); } ?></h3>
|
4 |
<div>
|
templates/filter_post.php
CHANGED
@@ -186,7 +186,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
186 |
<option <?php if ( $instance['operator'] == 'OR' ) echo 'selected'; ?> value="OR">OR</option>
|
187 |
</select>
|
188 |
</div>
|
189 |
-
<div class="berocket_aapf_order_values_by br_admin_three_size_left" <?php if ( ! $instance['filter_type'] or $instance['filter_type'] == 'date' or $instance['filter_type'] == '_sale' or $instance['filter_type'] == '_rating' or $instance['filter_type'] == '_stock_status' or ( $instance['filter_type'] == 'attribute' and $instance['
|
190 |
<label class="br_admin_center"><?php _e('Values Order', 'BeRocket_AJAX_domain') ?></label>
|
191 |
<select id="<?php echo 'order_values_by'; ?>" name="<?php echo $post_name.'[order_values_by]'; ?>" class="berocket_aapf_order_values_by_select br_select_menu_left">
|
192 |
<option value=""><?php _e('Default', 'BeRocket_AJAX_domain') ?></option>
|
@@ -195,7 +195,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
195 |
<?php } ?>
|
196 |
</select>
|
197 |
</div>
|
198 |
-
<div class="berocket_aapf_order_values_type br_admin_three_size_left" <?php if ( (( $instance['filter_type'] != 'attribute' && $instance['filter_type'] != 'custom_taxonomy') || $instance['type'] == 'slider') && $instance['filter_type'] != '_rating' && $instance['filter_type'] != 'tag' ) echo 'style="display: none;"'; ?>>
|
199 |
<label class="br_admin_center"><?php _e('Order Type', 'BeRocket_AJAX_domain') ?></label>
|
200 |
<select id="<?php echo 'order_values_type'; ?>" name="<?php echo $post_name.'[order_values_type]'; ?>" class="berocket_aapf_order_values_type_select br_select_menu_left">
|
201 |
<?php foreach ( array( 'asc' => __( 'Ascending', 'BeRocket_AJAX_domain' ), 'desc' => __( 'Descending', 'BeRocket_AJAX_domain' ) ) as $v_i => $v ) { ?>
|
@@ -239,18 +239,36 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
239 |
}
|
240 |
?><div><a href="#add" class="berocket_add_ranges" data-html='<div class="berocket_ranges"><input type="number" min="1" id="<?php echo 'ranges'; ?>" name="<?php echo $post_name.'[ranges]'; ?>[]" value="1"><a href="#remove" class="berocket_remove_ranges"><i class="fa fa-times"></i></a></div>'><i class="fa fa-plus"></i></a></div>
|
241 |
<label>
|
242 |
-
<input type="checkbox" name="<?php echo $post_name.'[hide_first_last_ranges]'; ?>" <?php if ( $instance['hide_first_last_ranges'] ) echo 'checked'; ?> value="1" />
|
243 |
<?php _e('Hide first and last ranges without products', 'BeRocket_AJAX_domain') ?>
|
244 |
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
</div>
|
246 |
<div <?php if ( $instance['filter_type'] != 'attribute' || $instance['attribute'] != 'price' ) echo " style='display: none;'"; ?> class="berocket_aapf_widget_admin_price_attribute" >
|
247 |
-
<
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
</div>
|
255 |
<div <?php if ( $instance['filter_type'] != 'attribute' || $instance['attribute'] != 'price' ) echo " style='display: none;'"; ?> class="berocket_aapf_widget_admin_price_attribute" >
|
256 |
<label for="<?php echo 'price_values'; ?>"><?php _e('Use custom values(comma separated):', 'BeRocket_AJAX_domain') ?> </label>
|
@@ -305,7 +323,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
305 |
?>
|
306 |
</ul>
|
307 |
</div>
|
308 |
-
<div class="berocket_options_for_select"<?php if( ( $instance['filter_type'] != 'tag' and $instance['filter_type'] != 'custom_taxonomy' and $instance['filter_type'] != 'attribute' ) or $instance['type'] != 'select' ) echo ' style="display:none;"'; ?>>
|
309 |
<div>
|
310 |
<label for="<?php echo 'select_first_element_text'; ?>"><?php _e('First Element Text', 'BeRocket_AJAX_domain') ?> </label>
|
311 |
<input placeholder="<?php _e('Any', 'BeRocket_AJAX_domain'); ?>" id="<?php echo 'select_first_element_text'; ?>" type="text" name="<?php echo $post_name.'[select_first_element_text]'; ?>" value="<?php echo $instance['select_first_element_text']; ?>" />
|
@@ -396,6 +414,10 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
396 |
<input id="<?php echo 'use_value_with_color'; ?>" type="checkbox" name="<?php echo $post_name.'[use_value_with_color]'; ?>" <?php if ( $instance['use_value_with_color'] ) echo 'checked'; ?> value="1" />
|
397 |
<label for="<?php echo 'use_value_with_color'; ?>"><?php _e('Display value with color/image box?', 'BeRocket_AJAX_domain') ?></label>
|
398 |
</div>
|
|
|
|
|
|
|
|
|
399 |
<div>
|
400 |
<label for="color_image_block_size"><?php _e('Size of blocks(Height x Width)', 'BeRocket_AJAX_domain') ?></label>
|
401 |
<select id="color_image_block_size" name="<?php echo $post_name; ?>[color_image_block_size]">
|
@@ -494,7 +516,7 @@ $custom_taxonomies = array_combine($custom_taxonomies, $custom_taxonomies);
|
|
494 |
<input id="<?php echo 'tag_cloud_tags_count'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_tags_count]'; ?>" value="<?php echo $instance['tag_cloud_tags_count']; ?>" class="berocket_aapf_widget_admin_height_input" />
|
495 |
</div>
|
496 |
</div>
|
497 |
-
<div class="berocket_aapf_widget_admin_price_attribute" <?php if ( ! ( $instance['attribute'] == 'price' && $instance['type'] == 'slider' ) ) echo " style='display: none;'"; ?> >
|
498 |
<div class="br_admin_half_size_left">
|
499 |
<div class="berocket_aapf_checked_show_next">
|
500 |
<input id="<?php echo 'use_min_price'; ?>" type="checkbox" name="<?php echo $post_name.'[use_min_price]'; ?>" <?php if ( $instance['use_min_price'] ) echo 'checked'; ?> value="1" class="berocket_aapf_widget_admin_input_price_is"/>
|
186 |
<option <?php if ( $instance['operator'] == 'OR' ) echo 'selected'; ?> value="OR">OR</option>
|
187 |
</select>
|
188 |
</div>
|
189 |
+
<div class="berocket_aapf_order_values_by br_admin_three_size_left" <?php if ( ! $instance['filter_type'] or $instance['filter_type'] == 'date' or $instance['filter_type'] == '_sale' or $instance['filter_type'] == '_rating' or $instance['filter_type'] == '_stock_status' or ( $instance['filter_type'] == 'attribute' and $instance['attribute'] == 'price' )) echo 'style="display: none;"'; ?>>
|
190 |
<label class="br_admin_center"><?php _e('Values Order', 'BeRocket_AJAX_domain') ?></label>
|
191 |
<select id="<?php echo 'order_values_by'; ?>" name="<?php echo $post_name.'[order_values_by]'; ?>" class="berocket_aapf_order_values_by_select br_select_menu_left">
|
192 |
<option value=""><?php _e('Default', 'BeRocket_AJAX_domain') ?></option>
|
195 |
<?php } ?>
|
196 |
</select>
|
197 |
</div>
|
198 |
+
<div class="berocket_aapf_order_values_type br_admin_three_size_left" <?php if ( (( $instance['filter_type'] != 'attribute' && $instance['filter_type'] != 'custom_taxonomy') || $instance['type'] == 'slider' || $instance['type'] == 'ranges') && $instance['filter_type'] != '_rating' && $instance['filter_type'] != 'tag' ) echo 'style="display: none;"'; ?>>
|
199 |
<label class="br_admin_center"><?php _e('Order Type', 'BeRocket_AJAX_domain') ?></label>
|
200 |
<select id="<?php echo 'order_values_type'; ?>" name="<?php echo $post_name.'[order_values_type]'; ?>" class="berocket_aapf_order_values_type_select br_select_menu_left">
|
201 |
<?php foreach ( array( 'asc' => __( 'Ascending', 'BeRocket_AJAX_domain' ), 'desc' => __( 'Descending', 'BeRocket_AJAX_domain' ) ) as $v_i => $v ) { ?>
|
239 |
}
|
240 |
?><div><a href="#add" class="berocket_add_ranges" data-html='<div class="berocket_ranges"><input type="number" min="1" id="<?php echo 'ranges'; ?>" name="<?php echo $post_name.'[ranges]'; ?>[]" value="1"><a href="#remove" class="berocket_remove_ranges"><i class="fa fa-times"></i></a></div>'><i class="fa fa-plus"></i></a></div>
|
241 |
<label>
|
242 |
+
<input type="checkbox" name="<?php echo $post_name.'[hide_first_last_ranges]'; ?>" <?php if ( ! empty($instance['hide_first_last_ranges']) ) echo 'checked'; ?> value="1" />
|
243 |
<?php _e('Hide first and last ranges without products', 'BeRocket_AJAX_domain') ?>
|
244 |
</label>
|
245 |
+
<br />
|
246 |
+
<label>
|
247 |
+
<input type="checkbox" name="<?php echo $post_name.'[show_last_to_infinity]'; ?>" <?php if ( ! empty($instance['show_last_to_infinity']) ) echo 'checked'; ?> value="1" />
|
248 |
+
<?php _e('Show last range to the infinity', 'BeRocket_AJAX_domain') ?>
|
249 |
+
</label>
|
250 |
+
<br />
|
251 |
+
<label>
|
252 |
+
<input type="checkbox" name="<?php echo $post_name.'[disable_multiple_ranges]'; ?>" <?php if ( ! empty($instance['disable_multiple_ranges']) ) echo 'checked'; ?> value="1" />
|
253 |
+
<?php _e('Disable multiple selection?', 'BeRocket_AJAX_domain') ?>
|
254 |
+
</label>
|
255 |
</div>
|
256 |
<div <?php if ( $instance['filter_type'] != 'attribute' || $instance['attribute'] != 'price' ) echo " style='display: none;'"; ?> class="berocket_aapf_widget_admin_price_attribute" >
|
257 |
+
<div class="br-row">
|
258 |
+
<div class="br-column-6">
|
259 |
+
<label class="br_admin_center" for="<?php echo 'text_before_price'; ?>"><?php _e('Text before price:', 'BeRocket_AJAX_domain') ?> </label>
|
260 |
+
<input class="br_admin_full_size" id="<?php echo 'text_before_price'; ?>" type="text" name="<?php echo $post_name.'[text_before_price]'; ?>" value="<?php echo $instance['text_before_price']; ?>"/>
|
261 |
+
</div>
|
262 |
+
<div class="br-column-6">
|
263 |
+
<label class="br_admin_center" for="<?php echo 'text_after_price'; ?>"><?php _e('after:', 'BeRocket_AJAX_domain') ?> </label>
|
264 |
+
<input class="br_admin_full_size" id="<?php echo 'text_after_price'; ?>" type="text" name="<?php echo $post_name.'[text_after_price]'; ?>" value="<?php echo $instance['text_after_price']; ?>" /><br>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
<span>%cur_symbol% will be replaced with currency symbol($)<br/>%cur_slug% will be replaced with currency code(USD)</span><br>
|
268 |
+
<div class="berocket_aapf_widget_admin_ranges_hide" style="<?php echo ($instance['type'] == 'ranges' ? 'display: none;' : '' ) ?>">
|
269 |
+
<input id="<?php echo 'enable_slider_inputs'; ?>" type="checkbox" name="<?php echo $post_name.'[enable_slider_inputs]'; ?>" value="1"<?php if( ! empty($instance['enable_slider_inputs']) ) echo ' checked'; ?>/>
|
270 |
+
<label for="<?php echo 'enable_slider_inputs'; ?>"><?php _e('Enable Slider Inputs', 'BeRocket_AJAX_domain') ?> </label>
|
271 |
+
</div>
|
272 |
</div>
|
273 |
<div <?php if ( $instance['filter_type'] != 'attribute' || $instance['attribute'] != 'price' ) echo " style='display: none;'"; ?> class="berocket_aapf_widget_admin_price_attribute" >
|
274 |
<label for="<?php echo 'price_values'; ?>"><?php _e('Use custom values(comma separated):', 'BeRocket_AJAX_domain') ?> </label>
|
323 |
?>
|
324 |
</ul>
|
325 |
</div>
|
326 |
+
<div class="berocket_options_for_select"<?php if( ( $instance['filter_type'] != 'tag' and $instance['filter_type'] != 'custom_taxonomy' and $instance['filter_type'] != 'attribute' and $instance['filter_type'] != 'product_cat' ) or $instance['type'] != 'select' ) echo ' style="display:none;"'; ?>>
|
327 |
<div>
|
328 |
<label for="<?php echo 'select_first_element_text'; ?>"><?php _e('First Element Text', 'BeRocket_AJAX_domain') ?> </label>
|
329 |
<input placeholder="<?php _e('Any', 'BeRocket_AJAX_domain'); ?>" id="<?php echo 'select_first_element_text'; ?>" type="text" name="<?php echo $post_name.'[select_first_element_text]'; ?>" value="<?php echo $instance['select_first_element_text']; ?>" />
|
414 |
<input id="<?php echo 'use_value_with_color'; ?>" type="checkbox" name="<?php echo $post_name.'[use_value_with_color]'; ?>" <?php if ( $instance['use_value_with_color'] ) echo 'checked'; ?> value="1" />
|
415 |
<label for="<?php echo 'use_value_with_color'; ?>"><?php _e('Display value with color/image box?', 'BeRocket_AJAX_domain') ?></label>
|
416 |
</div>
|
417 |
+
<div>
|
418 |
+
<input id="<?php echo 'disable_multiple'; ?>" type="checkbox" name="<?php echo $post_name.'[disable_multiple]'; ?>" <?php if ( ! empty( $instance['disable_multiple'] ) ) echo 'checked'; ?> value="1" />
|
419 |
+
<label for="<?php echo 'disable_multiple'; ?>"><?php _e('Disable multiple selection?', 'BeRocket_AJAX_domain') ?></label>
|
420 |
+
</div>
|
421 |
<div>
|
422 |
<label for="color_image_block_size"><?php _e('Size of blocks(Height x Width)', 'BeRocket_AJAX_domain') ?></label>
|
423 |
<select id="color_image_block_size" name="<?php echo $post_name; ?>[color_image_block_size]">
|
516 |
<input id="<?php echo 'tag_cloud_tags_count'; ?>" type="text" name="<?php echo $post_name.'[tag_cloud_tags_count]'; ?>" value="<?php echo $instance['tag_cloud_tags_count']; ?>" class="berocket_aapf_widget_admin_height_input" />
|
517 |
</div>
|
518 |
</div>
|
519 |
+
<div class="berocket_aapf_widget_admin_price_attribute berocket_aapf_widget_admin_ranges_hide" <?php if ( ! ( $instance['attribute'] == 'price' && $instance['type'] == 'slider' ) ) echo " style='display: none;'"; ?> >
|
520 |
<div class="br_admin_half_size_left">
|
521 |
<div class="berocket_aapf_checked_show_next">
|
522 |
<input id="<?php echo 'use_min_price'; ?>" type="checkbox" name="<?php echo $post_name.'[use_min_price]'; ?>" <?php if ( $instance['use_min_price'] ) echo 'checked'; ?> value="1" class="berocket_aapf_widget_admin_input_price_is"/>
|
templates/free/features.php
CHANGED
@@ -1,31 +1,34 @@
|
|
1 |
<div class="row berocket_aapf_features">
|
2 |
-
<div
|
3 |
-
<h4>Choose best layout for your filter</h4>
|
4 |
|
5 |
-
<h5>Our WooCommerce AJAX Products Filter offers several layouts including slider, image and color</h5>
|
6 |
|
7 |
-
<div class="demo-site"
|
8 |
-
<
|
|
|
|
|
|
|
9 |
|
10 |
-
<div
|
11 |
-
<h4>Pagination and Order without page reloading</h4>
|
12 |
|
13 |
-
<h5>Users will get next page loaded ordered by their preferences and without page reloading</h5>
|
14 |
|
15 |
-
<div class="demo-site"
|
16 |
-
<
|
17 |
-
</div>
|
18 |
|
19 |
-
<
|
|
|
20 |
|
21 |
-
<div class="row berocket_aapf_features">
|
22 |
<div>
|
23 |
<h4>Show filters above products</h4>
|
24 |
|
25 |
<h5>Need more space for the products? Say no to sidebars</h5>
|
26 |
|
27 |
<div class="demo-site">
|
28 |
-
<a href="
|
29 |
</div>
|
30 |
<img alt="Show filters above products" src="https://berocket.com/images/features/filters/above_products.jpg" />
|
31 |
</div>
|
@@ -36,20 +39,29 @@
|
|
36 |
<h5>Use Nice URLs with canonicalization and slugs instead of IDs</h5>
|
37 |
|
38 |
<div class="demo-site">
|
39 |
-
<a href="" target="_blank">[ demo site ]</a>
|
40 |
</div>
|
41 |
|
42 |
<div> </div>
|
43 |
<img alt="SEO friendly urls" src="https://berocket.com/images/features/filters/urls.jpg" />
|
44 |
</div>
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<div>
|
47 |
<h4>Show results before filtering</h4>
|
48 |
|
49 |
<h5>Show users what they will get before filters applied. Fast and efficient</h5>
|
50 |
|
51 |
<div class="demo-site">
|
52 |
-
<a href="
|
53 |
</div>
|
54 |
|
55 |
<div> </div>
|
@@ -63,7 +75,7 @@
|
|
63 |
<h5>Show only needed values from the attribute or hide few</h5>
|
64 |
|
65 |
<div class="demo-site">
|
66 |
-
<a href="
|
67 |
</div>
|
68 |
<img alt="Include/Exclude values" src="https://berocket.com/images/features/filters/include_exclude.jpg" />
|
69 |
</div>
|
@@ -74,7 +86,7 @@
|
|
74 |
<h5>Users can pre-fill filters before visiting shop page</h5>
|
75 |
|
76 |
<div class="demo-site">
|
77 |
-
<a href="
|
78 |
</div>
|
79 |
<img alt="Search Box on any page" src="https://berocket.com/images/features/filters/searchbox.jpg" />
|
80 |
</div>
|
@@ -85,13 +97,21 @@
|
|
85 |
<h5>Hate "No Products!" message? Hide values without products on the go</h5>
|
86 |
|
87 |
<div class="demo-site">
|
88 |
-
<a href="
|
89 |
</div>
|
90 |
|
91 |
<div> </div>
|
92 |
<img alt="Update filters with user needs" src="https://berocket.com/images/features/filters/reload.jpg" />
|
93 |
</div>
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
<div>
|
96 |
<h4>Brands<br />
|
97 |
<small>(require our Brands plugin)</small></h4>
|
@@ -99,7 +119,7 @@
|
|
99 |
<h5>Users love brands. Help them find favorite brands faster</h5>
|
100 |
|
101 |
<div class="demo-site">
|
102 |
-
<a href="
|
103 |
</div>
|
104 |
<img alt="Brands" src="https://berocket.com/images/features/filters/brands.jpg" />
|
105 |
</div>
|
@@ -110,29 +130,46 @@
|
|
110 |
<h5>Love sliders? Use them now for the attributes too!</h5>
|
111 |
|
112 |
<div class="demo-site">
|
113 |
-
<a href="
|
114 |
</div>
|
115 |
<img alt="Price Ranges and Sliders for Attributes" src="https://berocket.com/images/features/filters/range_slider.jpg" />
|
116 |
</div>
|
117 |
|
118 |
|
119 |
-
<div>
|
120 |
<h4>WPML and Polylang compatibility</h4>
|
121 |
|
122 |
<h5>EASILY TRANSLATE THE PLUGIN TO OTHER LANGUAGES WITH THE POWERFUL WPML AND POLYLANG TOOLS</h5>
|
123 |
<img alt="WPML and Polylang compatibility" src="https://berocket.com/img/docs/wpml_polylang.png" />
|
124 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
</div>
|
126 |
<style>
|
|
|
|
|
|
|
127 |
.berocket_aapf_features > div {
|
128 |
width: 50%;
|
129 |
float: left;
|
130 |
-
padding: 10px;
|
131 |
box-sizing: border-box;
|
|
|
132 |
}
|
133 |
.berocket_aapf_features > div:nth-child(2n+1) {
|
134 |
clear: left;
|
135 |
}
|
|
|
|
|
|
|
|
|
|
|
136 |
.berocket_aapf_features img {
|
137 |
max-width: 100%;
|
138 |
margin:auto;
|
@@ -142,6 +179,7 @@
|
|
142 |
.berocket_aapf_features h5,
|
143 |
.berocket_aapf_features .demo-site {
|
144 |
text-align: center;
|
|
|
145 |
}
|
146 |
.berocket_aapf_features h5 {
|
147 |
font-size: 17px;
|
@@ -152,6 +190,105 @@
|
|
152 |
font-weight: 700;
|
153 |
text-transform: uppercase;
|
154 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
@media screen and (max-width: 767px){
|
156 |
.berocket_aapf_features > div {
|
157 |
width: 100%;
|
1 |
<div class="row berocket_aapf_features">
|
2 |
+
<div>
|
3 |
+
<h4>Choose best layout for your filter</h4>
|
4 |
|
5 |
+
<h5>Our WooCommerce AJAX Products Filter offers several layouts including slider, image and color</h5>
|
6 |
|
7 |
+
<div class="demo-site">
|
8 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
9 |
+
</div>
|
10 |
+
<img alt="Choose best layout for your filter" src="https://berocket.com/images/features/filters/filters-types.jpg" />
|
11 |
+
</div>
|
12 |
|
13 |
+
<div>
|
14 |
+
<h4>Pagination and Order without page reloading</h4>
|
15 |
|
16 |
+
<h5>Users will get next page loaded ordered by their preferences and without page reloading</h5>
|
17 |
|
18 |
+
<div class="demo-site">
|
19 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
20 |
+
</div>
|
21 |
|
22 |
+
<img alt="Pagination and Order without page reloading" src="https://berocket.com/images/features/filters/ajax_order_nav.jpg" />
|
23 |
+
</div>
|
24 |
|
|
|
25 |
<div>
|
26 |
<h4>Show filters above products</h4>
|
27 |
|
28 |
<h5>Need more space for the products? Say no to sidebars</h5>
|
29 |
|
30 |
<div class="demo-site">
|
31 |
+
<a href="https://woocommerce-products-filter.berocket.com/product-category/tshirts/" target="_blank">[ demo site ]</a>
|
32 |
</div>
|
33 |
<img alt="Show filters above products" src="https://berocket.com/images/features/filters/above_products.jpg" />
|
34 |
</div>
|
39 |
<h5>Use Nice URLs with canonicalization and slugs instead of IDs</h5>
|
40 |
|
41 |
<div class="demo-site">
|
42 |
+
<a href="https://woocommerce-products-filter.berocket.com/product-category/tshirts/" target="_blank">[ demo site ]</a>
|
43 |
</div>
|
44 |
|
45 |
<div> </div>
|
46 |
<img alt="SEO friendly urls" src="https://berocket.com/images/features/filters/urls.jpg" />
|
47 |
</div>
|
48 |
+
|
49 |
+
<div class="premium_buttons">
|
50 |
+
<span>Read more about</span>
|
51 |
+
<a class="get_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=block_get_premium" target="_blank">PREMIUM VERSION</a>
|
52 |
+
<span class="divider">OR</span>
|
53 |
+
<a class="buy_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter/SAVE15?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=block_buy_premium" target="_blank">BUY NOW</a>
|
54 |
+
<span>and get <b>15% discount</b></span>
|
55 |
+
</div>
|
56 |
+
<div class="clear"></div>
|
57 |
+
|
58 |
<div>
|
59 |
<h4>Show results before filtering</h4>
|
60 |
|
61 |
<h5>Show users what they will get before filters applied. Fast and efficient</h5>
|
62 |
|
63 |
<div class="demo-site">
|
64 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-4/" target="_blank">[ demo site ]</a>
|
65 |
</div>
|
66 |
|
67 |
<div> </div>
|
75 |
<h5>Show only needed values from the attribute or hide few</h5>
|
76 |
|
77 |
<div class="demo-site">
|
78 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-4/" target="_blank">[ demo site ]</a>
|
79 |
</div>
|
80 |
<img alt="Include/Exclude values" src="https://berocket.com/images/features/filters/include_exclude.jpg" />
|
81 |
</div>
|
86 |
<h5>Users can pre-fill filters before visiting shop page</h5>
|
87 |
|
88 |
<div class="demo-site">
|
89 |
+
<a href="https://woocommerce-products-filter.berocket.com/" target="_blank">[ demo site ]</a>
|
90 |
</div>
|
91 |
<img alt="Search Box on any page" src="https://berocket.com/images/features/filters/searchbox.jpg" />
|
92 |
</div>
|
97 |
<h5>Hate "No Products!" message? Hide values without products on the go</h5>
|
98 |
|
99 |
<div class="demo-site">
|
100 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
101 |
</div>
|
102 |
|
103 |
<div> </div>
|
104 |
<img alt="Update filters with user needs" src="https://berocket.com/images/features/filters/reload.jpg" />
|
105 |
</div>
|
106 |
|
107 |
+
|
108 |
+
<div class="premium_buttons">
|
109 |
+
<span>Read more about</span>
|
110 |
+
<a class="get_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=single_get_premium" target="_blank">PREMIUM VERSION</a>
|
111 |
+
</div>
|
112 |
+
<div class="clear"></div>
|
113 |
+
|
114 |
+
|
115 |
<div>
|
116 |
<h4>Brands<br />
|
117 |
<small>(require our Brands plugin)</small></h4>
|
119 |
<h5>Users love brands. Help them find favorite brands faster</h5>
|
120 |
|
121 |
<div class="demo-site">
|
122 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-5/" target="_blank">[ demo site ]</a>
|
123 |
</div>
|
124 |
<img alt="Brands" src="https://berocket.com/images/features/filters/brands.jpg" />
|
125 |
</div>
|
130 |
<h5>Love sliders? Use them now for the attributes too!</h5>
|
131 |
|
132 |
<div class="demo-site">
|
133 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-2/" target="_blank">[ demo site ]</a>
|
134 |
</div>
|
135 |
<img alt="Price Ranges and Sliders for Attributes" src="https://berocket.com/images/features/filters/range_slider.jpg" />
|
136 |
</div>
|
137 |
|
138 |
|
139 |
+
<div class="center">
|
140 |
<h4>WPML and Polylang compatibility</h4>
|
141 |
|
142 |
<h5>EASILY TRANSLATE THE PLUGIN TO OTHER LANGUAGES WITH THE POWERFUL WPML AND POLYLANG TOOLS</h5>
|
143 |
<img alt="WPML and Polylang compatibility" src="https://berocket.com/img/docs/wpml_polylang.png" />
|
144 |
</div>
|
145 |
+
|
146 |
+
|
147 |
+
<div class="premium_buttons">
|
148 |
+
<a class="buy_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter/SAVE15?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=single_buy_premium" target="_blank">BUY NOW</a>
|
149 |
+
<span>and get <b>15% discount</b></span>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<div class="clear"></div>
|
153 |
</div>
|
154 |
<style>
|
155 |
+
.berocket_aapf_features {
|
156 |
+
background-color: white;
|
157 |
+
}
|
158 |
.berocket_aapf_features > div {
|
159 |
width: 50%;
|
160 |
float: left;
|
161 |
+
padding: 50px 10px 10px;
|
162 |
box-sizing: border-box;
|
163 |
+
background-color: white;
|
164 |
}
|
165 |
.berocket_aapf_features > div:nth-child(2n+1) {
|
166 |
clear: left;
|
167 |
}
|
168 |
+
.berocket_aapf_features > div.center {
|
169 |
+
margin: 0 auto;
|
170 |
+
float: none;
|
171 |
+
clear: both;
|
172 |
+
}
|
173 |
.berocket_aapf_features img {
|
174 |
max-width: 100%;
|
175 |
margin:auto;
|
179 |
.berocket_aapf_features h5,
|
180 |
.berocket_aapf_features .demo-site {
|
181 |
text-align: center;
|
182 |
+
line-height: 1.2em;
|
183 |
}
|
184 |
.berocket_aapf_features h5 {
|
185 |
font-size: 17px;
|
190 |
font-weight: 700;
|
191 |
text-transform: uppercase;
|
192 |
}
|
193 |
+
.berocket_aapf_features > div.clear {
|
194 |
+
float: none;
|
195 |
+
width: auto;
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
.berocket_aapf_features > div.premium_buttons {
|
200 |
+
margin: 30px auto 20px;
|
201 |
+
float: none;
|
202 |
+
width: 600px;
|
203 |
+
text-align: center;
|
204 |
+
max-width: 100%;
|
205 |
+
padding-top: 100px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.berocket_aapf_features .buy_premium_version,
|
209 |
+
.berocket_aapf_features .get_premium_version{
|
210 |
+
margin-top: 30px;
|
211 |
+
margin-bottom: 20px;
|
212 |
+
color: #fff;
|
213 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
214 |
+
text-shadow: none;
|
215 |
+
border: 0 none;
|
216 |
+
min-width: 120px;
|
217 |
+
-moz-user-select: none;
|
218 |
+
background: #ff5252 none repeat scroll 0 0;
|
219 |
+
box-sizing: border-box;
|
220 |
+
cursor: pointer;
|
221 |
+
display: inline-block;
|
222 |
+
font-size: 14px;
|
223 |
+
outline: 0 none;
|
224 |
+
padding: 8px;
|
225 |
+
position: relative;
|
226 |
+
text-align: center;
|
227 |
+
text-decoration: none;
|
228 |
+
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0s, background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0s;
|
229 |
+
white-space: nowrap;
|
230 |
+
height: auto;
|
231 |
+
vertical-align: top;
|
232 |
+
line-height: 25px;
|
233 |
+
border-radius: 3px;
|
234 |
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
235 |
+
font-weight: bold;
|
236 |
+
}
|
237 |
+
|
238 |
+
.berocket_aapf_features .get_premium_version,
|
239 |
+
.berocket_aapf_features .buy_premium_version {
|
240 |
+
width: 90%;
|
241 |
+
}
|
242 |
+
.berocket_aapf_features .get_premium_version {
|
243 |
+
margin: 5px 0;
|
244 |
+
background: transparent;
|
245 |
+
border: 2px solid #97b9cf;
|
246 |
+
color: #7496ad;
|
247 |
+
}
|
248 |
+
.berocket_aapf_features .buy_premium_version {
|
249 |
+
margin: 5px 0 15px;
|
250 |
+
padding: 10px;
|
251 |
+
}
|
252 |
+
.berocket_aapf_features .premium_buttons span {
|
253 |
+
display: block;
|
254 |
+
color: #7496ad;
|
255 |
+
}
|
256 |
+
.berocket_aapf_features .premium_buttons span.divider {
|
257 |
+
line-height: 2.4em;
|
258 |
+
font-size: 20px;
|
259 |
+
font-weight: bold;
|
260 |
+
position: relative;
|
261 |
+
}
|
262 |
+
.berocket_aapf_features .premium_buttons span.divider:before,
|
263 |
+
.berocket_aapf_features .premium_buttons span.divider:after{
|
264 |
+
position: absolute;
|
265 |
+
top: 50%;
|
266 |
+
left: 5%;
|
267 |
+
right: 60%;
|
268 |
+
height: 1px;
|
269 |
+
background: #97b9cf;
|
270 |
+
content: "";
|
271 |
+
}
|
272 |
+
.berocket_aapf_features .premium_buttons span.divider:after{
|
273 |
+
left: 60%;
|
274 |
+
right: 5%;
|
275 |
+
}
|
276 |
+
.berocket_aapf_features .premium_buttons span:last-child b{
|
277 |
+
font-size: 16px;
|
278 |
+
}
|
279 |
+
.berocket_aapf_features .buy_premium_version:hover,
|
280 |
+
.berocket_aapf_features .buy_premium_version:focus,
|
281 |
+
.berocket_aapf_features .buy_premium_version:active {
|
282 |
+
background: #ff6e68 none repeat scroll 0 0;
|
283 |
+
color: white;
|
284 |
+
}
|
285 |
+
.berocket_aapf_features .get_premium_version:hover,
|
286 |
+
.berocket_aapf_features .get_premium_version:focus,
|
287 |
+
.berocket_aapf_features .get_premium_version:active{
|
288 |
+
background: #97b9cf;
|
289 |
+
color: white;
|
290 |
+
}
|
291 |
+
|
292 |
@media screen and (max-width: 767px){
|
293 |
.berocket_aapf_features > div {
|
294 |
width: 100%;
|
templates/free/free/features.php
ADDED
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="row berocket_aapf_features">
|
2 |
+
<div>
|
3 |
+
<h4>Choose best layout for your filter</h4>
|
4 |
+
|
5 |
+
<h5>Our WooCommerce AJAX Products Filter offers several layouts including slider, image and color</h5>
|
6 |
+
|
7 |
+
<div class="demo-site">
|
8 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
9 |
+
</div>
|
10 |
+
<img alt="Choose best layout for your filter" src="https://berocket.com/images/features/filters/filters-types.jpg" />
|
11 |
+
</div>
|
12 |
+
|
13 |
+
<div>
|
14 |
+
<h4>Pagination and Order without page reloading</h4>
|
15 |
+
|
16 |
+
<h5>Users will get next page loaded ordered by their preferences and without page reloading</h5>
|
17 |
+
|
18 |
+
<div class="demo-site">
|
19 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<img alt="Pagination and Order without page reloading" src="https://berocket.com/images/features/filters/ajax_order_nav.jpg" />
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div>
|
26 |
+
<h4>Show filters above products</h4>
|
27 |
+
|
28 |
+
<h5>Need more space for the products? Say no to sidebars</h5>
|
29 |
+
|
30 |
+
<div class="demo-site">
|
31 |
+
<a href="https://woocommerce-products-filter.berocket.com/product-category/tshirts/" target="_blank">[ demo site ]</a>
|
32 |
+
</div>
|
33 |
+
<img alt="Show filters above products" src="https://berocket.com/images/features/filters/above_products.jpg" />
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<div>
|
37 |
+
<h4>SEO friendly urls</h4>
|
38 |
+
|
39 |
+
<h5>Use Nice URLs with canonicalization and slugs instead of IDs</h5>
|
40 |
+
|
41 |
+
<div class="demo-site">
|
42 |
+
<a href="https://woocommerce-products-filter.berocket.com/product-category/tshirts/" target="_blank">[ demo site ]</a>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div> </div>
|
46 |
+
<img alt="SEO friendly urls" src="https://berocket.com/images/features/filters/urls.jpg" />
|
47 |
+
</div>
|
48 |
+
|
49 |
+
<div class="premium_buttons">
|
50 |
+
<span>Read more about</span>
|
51 |
+
<a class="get_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=block_get_premium" target="_blank">PREMIUM VERSION</a>
|
52 |
+
<span class="divider">OR</span>
|
53 |
+
<a class="buy_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter/SAVE15?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=block_buy_premium" target="_blank">BUY NOW</a>
|
54 |
+
<span>and get <b>15% discount</b></span>
|
55 |
+
</div>
|
56 |
+
<div class="clear"></div>
|
57 |
+
|
58 |
+
<div>
|
59 |
+
<h4>Show results before filtering</h4>
|
60 |
+
|
61 |
+
<h5>Show users what they will get before filters applied. Fast and efficient</h5>
|
62 |
+
|
63 |
+
<div class="demo-site">
|
64 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-4/" target="_blank">[ demo site ]</a>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div> </div>
|
68 |
+
|
69 |
+
<img alt="Show results before filtering" src="https://berocket.com/images/features/filters/before_filter.jpg" />
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<div>
|
73 |
+
<h4>Include/Exclude values</h4>
|
74 |
+
|
75 |
+
<h5>Show only needed values from the attribute or hide few</h5>
|
76 |
+
|
77 |
+
<div class="demo-site">
|
78 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-4/" target="_blank">[ demo site ]</a>
|
79 |
+
</div>
|
80 |
+
<img alt="Include/Exclude values" src="https://berocket.com/images/features/filters/include_exclude.jpg" />
|
81 |
+
</div>
|
82 |
+
|
83 |
+
<div>
|
84 |
+
<h4>Search Box on any page</h4>
|
85 |
+
|
86 |
+
<h5>Users can pre-fill filters before visiting shop page</h5>
|
87 |
+
|
88 |
+
<div class="demo-site">
|
89 |
+
<a href="https://woocommerce-products-filter.berocket.com/" target="_blank">[ demo site ]</a>
|
90 |
+
</div>
|
91 |
+
<img alt="Search Box on any page" src="https://berocket.com/images/features/filters/searchbox.jpg" />
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<div>
|
95 |
+
<h4>Update filters with user needs</h4>
|
96 |
+
|
97 |
+
<h5>Hate "No Products!" message? Hide values without products on the go</h5>
|
98 |
+
|
99 |
+
<div class="demo-site">
|
100 |
+
<a href="https://woocommerce-products-filter.berocket.com/shop/" target="_blank">[ demo site ]</a>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div> </div>
|
104 |
+
<img alt="Update filters with user needs" src="https://berocket.com/images/features/filters/reload.jpg" />
|
105 |
+
</div>
|
106 |
+
|
107 |
+
|
108 |
+
<div class="premium_buttons">
|
109 |
+
<span>Read more about</span>
|
110 |
+
<a class="get_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=single_get_premium" target="_blank">PREMIUM VERSION</a>
|
111 |
+
</div>
|
112 |
+
<div class="clear"></div>
|
113 |
+
|
114 |
+
|
115 |
+
<div>
|
116 |
+
<h4>Brands<br />
|
117 |
+
<small>(require our Brands plugin)</small></h4>
|
118 |
+
|
119 |
+
<h5>Users love brands. Help them find favorite brands faster</h5>
|
120 |
+
|
121 |
+
<div class="demo-site">
|
122 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-5/" target="_blank">[ demo site ]</a>
|
123 |
+
</div>
|
124 |
+
<img alt="Brands" src="https://berocket.com/images/features/filters/brands.jpg" />
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<div>
|
128 |
+
<h4>Price Ranges and Sliders for Attributes</h4>
|
129 |
+
|
130 |
+
<h5>Love sliders? Use them now for the attributes too!</h5>
|
131 |
+
|
132 |
+
<div class="demo-site">
|
133 |
+
<a href="https://woocommerce-products-filter.berocket.com/woocommerce-products-filter-demo-2/" target="_blank">[ demo site ]</a>
|
134 |
+
</div>
|
135 |
+
<img alt="Price Ranges and Sliders for Attributes" src="https://berocket.com/images/features/filters/range_slider.jpg" />
|
136 |
+
</div>
|
137 |
+
|
138 |
+
|
139 |
+
<div class="center">
|
140 |
+
<h4>WPML and Polylang compatibility</h4>
|
141 |
+
|
142 |
+
<h5>EASILY TRANSLATE THE PLUGIN TO OTHER LANGUAGES WITH THE POWERFUL WPML AND POLYLANG TOOLS</h5>
|
143 |
+
<img alt="WPML and Polylang compatibility" src="https://berocket.com/img/docs/wpml_polylang.png" />
|
144 |
+
</div>
|
145 |
+
|
146 |
+
|
147 |
+
<div class="premium_buttons">
|
148 |
+
<a class="buy_premium_version" href="https://berocket.com/product/woocommerce-ajax-products-filter/SAVE15?utm_source=free_plugin&utm_medium=wordpress_org&utm_campaign=features&utm_content=single_buy_premium" target="_blank">BUY NOW</a>
|
149 |
+
<span>and get <b>15% discount</b></span>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<div class="clear"></div>
|
153 |
+
</div>
|
154 |
+
<style>
|
155 |
+
.berocket_aapf_features {
|
156 |
+
background-color: white;
|
157 |
+
}
|
158 |
+
.berocket_aapf_features > div {
|
159 |
+
width: 50%;
|
160 |
+
float: left;
|
161 |
+
padding: 50px 10px 10px;
|
162 |
+
box-sizing: border-box;
|
163 |
+
background-color: white;
|
164 |
+
}
|
165 |
+
.berocket_aapf_features > div:nth-child(2n+1) {
|
166 |
+
clear: left;
|
167 |
+
}
|
168 |
+
.berocket_aapf_features > div.center {
|
169 |
+
margin: 0 auto;
|
170 |
+
float: none;
|
171 |
+
clear: both;
|
172 |
+
}
|
173 |
+
.berocket_aapf_features img {
|
174 |
+
max-width: 100%;
|
175 |
+
margin:auto;
|
176 |
+
display: block;
|
177 |
+
}
|
178 |
+
.berocket_aapf_features h4,
|
179 |
+
.berocket_aapf_features h5,
|
180 |
+
.berocket_aapf_features .demo-site {
|
181 |
+
text-align: center;
|
182 |
+
line-height: 1.2em;
|
183 |
+
}
|
184 |
+
.berocket_aapf_features h5 {
|
185 |
+
font-size: 17px;
|
186 |
+
font-weight: 500;
|
187 |
+
}
|
188 |
+
.berocket_aapf_features h4 {
|
189 |
+
font-size: 26px;
|
190 |
+
font-weight: 700;
|
191 |
+
text-transform: uppercase;
|
192 |
+
}
|
193 |
+
.berocket_aapf_features > div.clear {
|
194 |
+
float: none;
|
195 |
+
width: auto;
|
196 |
+
}
|
197 |
+
|
198 |
+
|
199 |
+
.berocket_aapf_features > div.premium_buttons {
|
200 |
+
margin: 30px auto 20px;
|
201 |
+
float: none;
|
202 |
+
width: 600px;
|
203 |
+
text-align: center;
|
204 |
+
max-width: 100%;
|
205 |
+
padding-top: 100px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.berocket_aapf_features .buy_premium_version,
|
209 |
+
.berocket_aapf_features .get_premium_version{
|
210 |
+
margin-top: 30px;
|
211 |
+
margin-bottom: 20px;
|
212 |
+
color: #fff;
|
213 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
214 |
+
text-shadow: none;
|
215 |
+
border: 0 none;
|
216 |
+
min-width: 120px;
|
217 |
+
-moz-user-select: none;
|
218 |
+
background: #ff5252 none repeat scroll 0 0;
|
219 |
+
box-sizing: border-box;
|
220 |
+
cursor: pointer;
|
221 |
+
display: inline-block;
|
222 |
+
font-size: 14px;
|
223 |
+
outline: 0 none;
|
224 |
+
padding: 8px;
|
225 |
+
position: relative;
|
226 |
+
text-align: center;
|
227 |
+
text-decoration: none;
|
228 |
+
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0s, background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0s;
|
229 |
+
white-space: nowrap;
|
230 |
+
height: auto;
|
231 |
+
vertical-align: top;
|
232 |
+
line-height: 25px;
|
233 |
+
border-radius: 3px;
|
234 |
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
235 |
+
font-weight: bold;
|
236 |
+
}
|
237 |
+
|
238 |
+
.berocket_aapf_features .get_premium_version,
|
239 |
+
.berocket_aapf_features .buy_premium_version {
|
240 |
+
width: 90%;
|
241 |
+
}
|
242 |
+
.berocket_aapf_features .get_premium_version {
|
243 |
+
margin: 5px 0;
|
244 |
+
background: transparent;
|
245 |
+
border: 2px solid #97b9cf;
|
246 |
+
color: #7496ad;
|
247 |
+
}
|
248 |
+
.berocket_aapf_features .buy_premium_version {
|
249 |
+
margin: 5px 0 15px;
|
250 |
+
padding: 10px;
|
251 |
+
}
|
252 |
+
.berocket_aapf_features .premium_buttons span {
|
253 |
+
display: block;
|
254 |
+
color: #7496ad;
|
255 |
+
}
|
256 |
+
.berocket_aapf_features .premium_buttons span.divider {
|
257 |
+
line-height: 2.4em;
|
258 |
+
font-size: 20px;
|
259 |
+
font-weight: bold;
|
260 |
+
position: relative;
|
261 |
+
}
|
262 |
+
.berocket_aapf_features .premium_buttons span.divider:before,
|
263 |
+
.berocket_aapf_features .premium_buttons span.divider:after{
|
264 |
+
position: absolute;
|
265 |
+
top: 50%;
|
266 |
+
left: 5%;
|
267 |
+
right: 60%;
|
268 |
+
height: 1px;
|
269 |
+
background: #97b9cf;
|
270 |
+
content: "";
|
271 |
+
}
|
272 |
+
.berocket_aapf_features .premium_buttons span.divider:after{
|
273 |
+
left: 60%;
|
274 |
+
right: 5%;
|
275 |
+
}
|
276 |
+
.berocket_aapf_features .premium_buttons span:last-child b{
|
277 |
+
font-size: 16px;
|
278 |
+
}
|
279 |
+
.berocket_aapf_features .buy_premium_version:hover,
|
280 |
+
.berocket_aapf_features .buy_premium_version:focus,
|
281 |
+
.berocket_aapf_features .buy_premium_version:active {
|
282 |
+
background: #ff6e68 none repeat scroll 0 0;
|
283 |
+
color: white;
|
284 |
+
}
|
285 |
+
.berocket_aapf_features .get_premium_version:hover,
|
286 |
+
.berocket_aapf_features .get_premium_version:focus,
|
287 |
+
.berocket_aapf_features .get_premium_version:active{
|
288 |
+
background: #97b9cf;
|
289 |
+
color: white;
|
290 |
+
}
|
291 |
+
|
292 |
+
@media screen and (max-width: 767px){
|
293 |
+
.berocket_aapf_features > div {
|
294 |
+
width: 100%;
|
295 |
+
float: none;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
</style>
|
templates/include_exclude_list.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<div class="br_accordion">
|
2 |
<h3><?php _e('Include / Exclude List', 'BeRocket_AJAX_domain'); ?></h3>
|
3 |
<div>
|
1 |
+
<?php extract($berocket_var_exclude_list); ?>
|
2 |
<div class="br_accordion">
|
3 |
<h3><?php _e('Include / Exclude List', 'BeRocket_AJAX_domain'); ?></h3>
|
4 |
<div>
|
templates/radio.php
CHANGED
@@ -28,28 +28,30 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
28 |
}
|
29 |
$added_categories[] = $term->term_id;
|
30 |
?>
|
|
|
31 |
<li class="berocket_term_parent_<?php echo berocket_isset($term, 'parent'); ?> berocket_term_depth_<?php echo $parent_count; ?>
|
32 |
-
|
33 |
-
|
34 |
-
$hiden_value = true;
|
35 |
-
}
|
36 |
-
if( $hide_sel_value && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
37 |
-
echo 'berocket_hide_sel_value';
|
38 |
-
$hiden_value = true;
|
39 |
-
}
|
40 |
-
if( ! empty($attribute_count) ) {
|
41 |
-
if( $item_i > $attribute_count ) {
|
42 |
-
echo ' berocket_hide_attribute_count_value';
|
43 |
$hiden_value = true;
|
44 |
-
}
|
45 |
-
|
46 |
-
|
|
|
47 |
$hiden_value = true;
|
48 |
}
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
<span>
|
54 |
<input class="<?php echo br_get_value_from_array($uo, array('class', 'checkbox_radio')); ?> radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $term_taxonomy_echo; ?>"
|
55 |
type='radio' id='radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $random_name ?>'
|
@@ -97,18 +99,21 @@ if ( is_array(berocket_isset($terms)) ) {
|
|
97 |
echo '<li>'.$child_parent_previous.'</li>';
|
98 |
}
|
99 |
} else {
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
if( child_parent_depth == <?php echo $child_parent_depth; ?> ) {
|
107 |
-
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
108 |
}
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
if( ! empty($attribute_count_show_hide) ) {
|
114 |
if( $attribute_count_show_hide == 'hidden' ) {
|
28 |
}
|
29 |
$added_categories[] = $term->term_id;
|
30 |
?>
|
31 |
+
|
32 |
<li class="berocket_term_parent_<?php echo berocket_isset($term, 'parent'); ?> berocket_term_depth_<?php echo $parent_count; ?>
|
33 |
+
<?php if( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
34 |
+
echo 'berocket_hide_o_value ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$hiden_value = true;
|
36 |
+
}
|
37 |
+
echo " brw-" . preg_replace( "#^(pa)?_#", "", $attribute ) . "-" . preg_replace( "#^(pa)?_#", "", berocket_isset($term, 'slug') );
|
38 |
+
if( $hide_sel_value && br_is_term_selected( $term, true, $is_child_parent_or, $child_parent_depth ) != '' ) {
|
39 |
+
echo 'berocket_hide_sel_value';
|
40 |
$hiden_value = true;
|
41 |
}
|
42 |
+
if( ! empty($attribute_count) ) {
|
43 |
+
if( $item_i > $attribute_count ) {
|
44 |
+
echo ' berocket_hide_attribute_count_value';
|
45 |
+
$hiden_value = true;
|
46 |
+
} elseif( ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 && ( !$is_child_parent || !$is_first ) ) {
|
47 |
+
echo ' berocket_hide_attribute_count_value';
|
48 |
+
$item_i--;
|
49 |
+
$hiden_value = true;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
if( $hide_child_attributes && berocket_isset($term, 'parent') && in_array(berocket_isset($term, 'parent'), $added_categories) ) {
|
53 |
+
echo ' berocket_hide_child_attributes ';
|
54 |
+
} ?>">
|
55 |
<span>
|
56 |
<input class="<?php echo br_get_value_from_array($uo, array('class', 'checkbox_radio')); ?> radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $term_taxonomy_echo; ?>"
|
57 |
type='radio' id='radio_<?php echo berocket_isset($term, 'term_id') ?>_<?php echo $random_name ?>'
|
99 |
echo '<li>'.$child_parent_previous.'</li>';
|
100 |
}
|
101 |
} else {
|
102 |
+
if( $child_parent_no_values ) {
|
103 |
+
if ( ! $child_parent_depth ) $child_parent_depth = '0';
|
104 |
+
?>
|
105 |
+
<script>
|
106 |
+
if ( typeof(child_parent_depth) == 'undefined' || child_parent_depth < <?php echo $child_parent_depth; ?> ) {
|
107 |
+
child_parent_depth = <?php echo $child_parent_depth; ?>;
|
|
|
|
|
108 |
}
|
109 |
+
jQuery(document).ready(function() {
|
110 |
+
if( child_parent_depth == <?php echo $child_parent_depth; ?> ) {
|
111 |
+
jQuery('.woocommerce-info').text('<?php echo $child_parent_no_values; ?>');
|
112 |
+
}
|
113 |
+
});
|
114 |
+
</script>
|
115 |
+
<?php
|
116 |
+
}
|
117 |
}
|
118 |
if( ! empty($attribute_count_show_hide) ) {
|
119 |
if( $attribute_count_show_hide == 'hidden' ) {
|
templates/select.php
CHANGED
@@ -82,7 +82,7 @@ if( empty($term_taxonomy_echo) ) {
|
|
82 |
class="<?php echo br_get_value_from_array($uo, array('class', 'selectbox')) ?> <?php echo $term_taxonomy_echo ?>"
|
83 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'>
|
84 |
<?php if( empty($select_multiple) ) { ?>
|
85 |
-
<option data-taxonomy='<?php echo $term_taxonomy_echo ?>' value=''><?php echo $select_first_element_text; ?></option>
|
86 |
<?php } foreach ( $terms as $term ):
|
87 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
88 |
if( empty($term_taxonomy_echo) ) {
|
@@ -95,12 +95,13 @@ if( empty($term_taxonomy_echo) ) {
|
|
95 |
} elseif( isset($term->depth) ) {
|
96 |
$parent_count = $term->depth;
|
97 |
}
|
98 |
-
|
99 |
<option value='<?php echo berocket_isset($term, 'term_id') ?>' data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'
|
100 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
101 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
102 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
103 |
-
data-term_name='<?php echo berocket_isset($term, 'name') ?>'
|
|
|
104 |
data-operator='<?php echo berocket_isset($operator) ?>'
|
105 |
<?php if( ! $is_child_parent_or && ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 ) { echo ' hidden disabled'; $hiden_value = true; } ?>
|
106 |
<?php echo br_is_term_selected( $term, false, $is_child_parent_or, $child_parent_depth ); ?>
|
82 |
class="<?php echo br_get_value_from_array($uo, array('class', 'selectbox')) ?> <?php echo $term_taxonomy_echo ?>"
|
83 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'>
|
84 |
<?php if( empty($select_multiple) ) { ?>
|
85 |
+
<option class="<?php echo "brw-" . preg_replace( "#^(pa)?_#", "", $attribute ) . "-" . ((berocket_isset($term, 'slug')) ? preg_replace( "#^(pa)?_#", "", berocket_isset($term, 'slug') ) : 'default' ) ?>" data-taxonomy='<?php echo $term_taxonomy_echo ?>' value=''><?php echo $select_first_element_text; ?></option>
|
86 |
<?php } foreach ( $terms as $term ):
|
87 |
$term_taxonomy_echo = berocket_isset($term, 'wpml_taxonomy');
|
88 |
if( empty($term_taxonomy_echo) ) {
|
95 |
} elseif( isset($term->depth) ) {
|
96 |
$parent_count = $term->depth;
|
97 |
}
|
98 |
+
?>
|
99 |
<option value='<?php echo berocket_isset($term, 'term_id') ?>' data-term_id='<?php echo berocket_isset($term, 'term_id') ?>'
|
100 |
data-taxonomy='<?php echo $term_taxonomy_echo ?>'
|
101 |
data-term_count='<?php echo berocket_isset($term, 'count') ?>'
|
102 |
data-term_slug='<?php echo urldecode(berocket_isset($term, 'slug')) ?>' data-filter_type='<?php echo berocket_isset($filter_type) ?>'
|
103 |
+
data-term_name='<?php echo berocket_isset($term, 'name') ?>'
|
104 |
+
class="select_<?php echo berocket_isset($term, 'term_id') ?><?php if( ! $is_child_parent_or && ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 ) { echo ' berocket_hide_o_value'; $hiden_value = true; } ?> <?php echo "brw-" . preg_replace( "#^(pa)?_#", "", $attribute ) . "-" . preg_replace( "#^(pa)?_#", "", berocket_isset($term, 'slug') ) ?>"
|
105 |
data-operator='<?php echo berocket_isset($operator) ?>'
|
106 |
<?php if( ! $is_child_parent_or && ! empty($hide_o_value) && berocket_isset($term, 'count') == 0 ) { echo ' hidden disabled'; $hiden_value = true; } ?>
|
107 |
<?php echo br_is_term_selected( $term, false, $is_child_parent_or, $child_parent_depth ); ?>
|
templates/settings/design.php
CHANGED
@@ -919,6 +919,8 @@ $fonts_list = g_fonts_list();
|
|
919 |
</select>
|
920 |
</td>
|
921 |
</tr>
|
|
|
|
|
922 |
<tr>
|
923 |
<th scope="row"><?php _e('Product count style', 'BeRocket_AJAX_domain') ?></th>
|
924 |
<td>
|
@@ -936,7 +938,16 @@ $fonts_list = g_fonts_list();
|
|
936 |
<option <?php echo ( $options['styles_input']['product_count_position'] == 'right2em' ) ? 'selected' : '' ?> value="right2em"><?php _e('Right from name', 'BeRocket_AJAX_domain') ?></option>
|
937 |
</select>
|
938 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
</tr>
|
|
|
|
|
940 |
<tr>
|
941 |
<th scope="row"><?php _e('Select(dropdown) Child Tree Indent', 'BeRocket_AJAX_domain') ?></th>
|
942 |
<td>
|
919 |
</select>
|
920 |
</td>
|
921 |
</tr>
|
922 |
+
</table>
|
923 |
+
<table class="form-table">
|
924 |
<tr>
|
925 |
<th scope="row"><?php _e('Product count style', 'BeRocket_AJAX_domain') ?></th>
|
926 |
<td>
|
938 |
<option <?php echo ( $options['styles_input']['product_count_position'] == 'right2em' ) ? 'selected' : '' ?> value="right2em"><?php _e('Right from name', 'BeRocket_AJAX_domain') ?></option>
|
939 |
</select>
|
940 |
</td>
|
941 |
+
<td>
|
942 |
+
<span><?php _e('Position on Image:', 'BeRocket_AJAX_domain') ?> </span>
|
943 |
+
<select name="br_filters_options[styles_input][product_count_position_image]">
|
944 |
+
<option value=""><?php _e('Normal', 'BeRocket_AJAX_domain') ?></option>
|
945 |
+
<option <?php echo ( br_get_value_from_array($options, array('styles_input','product_count_position_image') ) == 'right' ) ? 'selected' : '' ?> value="right"><?php _e('Right', 'BeRocket_AJAX_domain') ?></option>
|
946 |
+
</select>
|
947 |
+
</td>
|
948 |
</tr>
|
949 |
+
</table>
|
950 |
+
<table class="form-table">
|
951 |
<tr>
|
952 |
<th scope="row"><?php _e('Select(dropdown) Child Tree Indent', 'BeRocket_AJAX_domain') ?></th>
|
953 |
<td>
|
templates/widget_start.php
CHANGED
@@ -4,7 +4,7 @@ $child_parent = berocket_isset($child_parent);
|
|
4 |
$is_child = $child_parent == 'child';
|
5 |
$is_child_parent = in_array($child_parent, array('child', 'parent'));
|
6 |
?>
|
7 |
-
<div class="berocket_aapf_widget-wrapper<?php if( $is_child_parent ) echo ' br_child_parent_wrapper'; if ( ! empty($description) ) echo ' berocket_widget_has_description'; ?>">
|
8 |
<?php if( $is_child ) { ?>
|
9 |
<div class="berocket_child_no_values">
|
10 |
<?php echo berocket_isset($child_parent_no_values); ?>
|
@@ -18,12 +18,12 @@ $is_child_parent = in_array($child_parent, array('child', 'parent'));
|
|
18 |
<?php } ?>
|
19 |
<div class="berocket_aapf_widget-title_div<?php if ( ! empty($is_hide_mobile) ) echo ' berocket_aapf_hide_mobile'; if(!empty($widget_collapse_disable)) echo ' disable_collapse';?>">
|
20 |
<?php if ( empty($hide_collapse_arrow) ) { ?>
|
21 |
-
<span class="berocket_aapf_widget_show <?php echo ( ! empty($widget_is_hide) ? 'show_button' : 'hide_button' ) ?> <?php echo ( ! empty($title) ? 'mobile_hide' : '' ) ?>"><i class="fa fa-angle-left "></i></span>
|
22 |
<?php } ?>
|
23 |
<?php if ( ! empty($description) ) { ?><span class="berocket_aapf_description"><i class="fa fa-info-circle"></i><div style="background-color:#<?php echo br_get_value_from_array($notuo, array('description', 'color')).'; border:1px solid #'.br_get_value_from_array($notuo, array('description_border', 'color')).';'?>"><h3 style="<?php echo br_get_value_from_array($uo, array('style', 'description_title'))?>"><?php echo $title; ?></h3><p style="<?php echo br_get_value_from_array($uo, array('style', 'description_text'))?>"><?php echo $description ?></p><div class="berocket_aapf_description_arrow" style="background-color:#<?php echo br_get_value_from_array($notuo, array('description', 'color')).'; border:1px solid #'.br_get_value_from_array($notuo, array('description_border', 'color')).';'?>"></div></div></span><?php } ?>
|
24 |
<?php if( ! empty($title) || ! empty($icon_before_title) || ! empty($icon_after_title) ) { ?><h3 class="widget-title berocket_aapf_widget-title" style="<?php echo ( empty($uo['style']['title']) ? '' : $uo['style']['title'] ) ?>"><span><?php echo ( ( ! empty($icon_before_title) ) ? ( ( substr( $icon_before_title, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_title.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_title.'" alt=""></i>' ) : '' ).( empty($title) ? '' : $title ).( ( ! empty($icon_after_title) ) ? ( ( substr( $icon_after_title, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_title.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_title.'" alt=""></i>' ) : '' ) ?></span></h3><?php } ?>
|
25 |
</div>
|
26 |
-
<ul class='berocket_aapf_widget <?php echo ( ! empty($widget_is_hide) ? 'berocket_style_none' : 'berocket_style_block' ) ?> <?php echo berocket_isset($product_count_style); ?> <?php if ( ! empty($is_hide_mobile) ) echo ' berocket_aapf_hide_mobile' ?> <?php echo berocket_isset($class) ?> <?php echo berocket_isset($css_class) ?> <?php echo ( ( berocket_isset($type) == 'tag_cloud' ) ? 'berocket_aapf_widget-tag_cloud' : '' ) ?>
|
27 |
<?php echo apply_filters('berocket_widget_aapf_start_temp_class', ''); ?>'
|
28 |
style='<?php echo berocket_isset($style) ?>' data-scroll_theme='<?php echo berocket_isset($scroll_theme) ?>'
|
29 |
data-widget_id="<?php echo $widget_id; ?>"
|
4 |
$is_child = $child_parent == 'child';
|
5 |
$is_child_parent = in_array($child_parent, array('child', 'parent'));
|
6 |
?>
|
7 |
+
<div class="berocket_aapf_widget-wrapper <?php echo "brw-" . preg_replace( "#^(pa)?_#", "", $attribute ); ?> <?php if( $is_child_parent ) echo ' br_child_parent_wrapper'; if ( ! empty($description) ) echo ' berocket_widget_has_description'; ?>">
|
8 |
<?php if( $is_child ) { ?>
|
9 |
<div class="berocket_child_no_values">
|
10 |
<?php echo berocket_isset($child_parent_no_values); ?>
|
18 |
<?php } ?>
|
19 |
<div class="berocket_aapf_widget-title_div<?php if ( ! empty($is_hide_mobile) ) echo ' berocket_aapf_hide_mobile'; if(!empty($widget_collapse_disable)) echo ' disable_collapse';?>">
|
20 |
<?php if ( empty($hide_collapse_arrow) ) { ?>
|
21 |
+
<span class="berocket_aapf_widget_show <?php echo ( br_widget_is_hide( $attribute, ! empty( $widget_is_hide ) ) ? 'show_button' : 'hide_button' ) ?> <?php echo ( ! empty($title) ? 'mobile_hide' : '' ) ?>"><i class="fa fa-angle-left "></i></span>
|
22 |
<?php } ?>
|
23 |
<?php if ( ! empty($description) ) { ?><span class="berocket_aapf_description"><i class="fa fa-info-circle"></i><div style="background-color:#<?php echo br_get_value_from_array($notuo, array('description', 'color')).'; border:1px solid #'.br_get_value_from_array($notuo, array('description_border', 'color')).';'?>"><h3 style="<?php echo br_get_value_from_array($uo, array('style', 'description_title'))?>"><?php echo $title; ?></h3><p style="<?php echo br_get_value_from_array($uo, array('style', 'description_text'))?>"><?php echo $description ?></p><div class="berocket_aapf_description_arrow" style="background-color:#<?php echo br_get_value_from_array($notuo, array('description', 'color')).'; border:1px solid #'.br_get_value_from_array($notuo, array('description_border', 'color')).';'?>"></div></div></span><?php } ?>
|
24 |
<?php if( ! empty($title) || ! empty($icon_before_title) || ! empty($icon_after_title) ) { ?><h3 class="widget-title berocket_aapf_widget-title" style="<?php echo ( empty($uo['style']['title']) ? '' : $uo['style']['title'] ) ?>"><span><?php echo ( ( ! empty($icon_before_title) ) ? ( ( substr( $icon_before_title, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_before_title.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_before_title.'" alt=""></i>' ) : '' ).( empty($title) ? '' : $title ).( ( ! empty($icon_after_title) ) ? ( ( substr( $icon_after_title, 0, 3) == 'fa-' ) ? '<i class="fa '.$icon_after_title.'"></i>' : '<i class="fa"><img class="berocket_widget_icon" src="'.$icon_after_title.'" alt=""></i>' ) : '' ) ?></span></h3><?php } ?>
|
25 |
</div>
|
26 |
+
<ul class='berocket_aapf_widget <?php echo ( br_widget_is_hide( $attribute, ! empty( $widget_is_hide ) ) ? 'berocket_style_none' : 'berocket_style_block' ) ?> <?php echo berocket_isset($product_count_style); ?> <?php if ( ! empty($is_hide_mobile) ) echo ' berocket_aapf_hide_mobile' ?> <?php echo berocket_isset($class) ?> <?php echo berocket_isset($css_class) ?> <?php echo ( ( berocket_isset($type) == 'tag_cloud' ) ? 'berocket_aapf_widget-tag_cloud' : '' ) ?>
|
27 |
<?php echo apply_filters('berocket_widget_aapf_start_temp_class', ''); ?>'
|
28 |
style='<?php echo berocket_isset($style) ?>' data-scroll_theme='<?php echo berocket_isset($scroll_theme) ?>'
|
29 |
data-widget_id="<?php echo $widget_id; ?>"
|
woocommerce-filters.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
-
* Version: 1.3.
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
@@ -11,8 +11,8 @@
|
|
11 |
* License URI: http://berocket.com/license
|
12 |
* Text Domain: BeRocket_AJAX_domain
|
13 |
* Domain Path: /languages/
|
14 |
-
* WC tested up to: 3.
|
15 |
*/
|
16 |
-
define( "BeRocket_AJAX_filters_version", '1.3.
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|
3 |
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
* Description: Unlimited AJAX products filters to make your shop perfect
|
6 |
+
* Version: 1.3.2
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
11 |
* License URI: http://berocket.com/license
|
12 |
* Text Domain: BeRocket_AJAX_domain
|
13 |
* Domain Path: /languages/
|
14 |
+
* WC tested up to: 3.6.1
|
15 |
*/
|
16 |
+
define( "BeRocket_AJAX_filters_version", '1.3.2' );
|
17 |
define( "BeRocket_AJAX_filters_file", __FILE__ );
|
18 |
include_once('main.php');
|