Version Description
- Upgrade - more useful subscribe
- Fix - updater fix
Download this release
Release Info
Developer | dholovnia |
Plugin | Advanced AJAX Product Filters |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
- README.md +0 -301
- contributors.txt +0 -1
- includes/admin_notices.php +54 -39
- readme.txt +30 -2
- templates/settings_footer.php +85 -39
- woocommerce-filters.php +26 -8
README.md
DELETED
@@ -1,301 +0,0 @@
|
|
1 |
-
=== Advanced AJAX Product Filters ===
|
2 |
-
Plugin Name: Advanced AJAX Product Filters
|
3 |
-
Contributors: dholovnia, berocket
|
4 |
-
Donate link: http://berocket.com
|
5 |
-
Tags: filters, product filters, ajax product filters, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce ajax product filters, widget, plugin
|
6 |
-
Requires at least: 4.0
|
7 |
-
Tested up to: 4.7.2
|
8 |
-
Stable tag: 1.1.8
|
9 |
-
License: GPLv2 or later
|
10 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
|
12 |
-
WooCommerce AJAX Product Filters - advanced AJAX product filters plugin for WooCommerce.
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
WooCommerce AJAX Product Filters - advanced AJAX product filters plugin for WooCommerce. Add unlimited filters with one widget.
|
17 |
-
|
18 |
-
= Features: =
|
19 |
-
|
20 |
-
* AJAX Filters, Pagination and Sorting!
|
21 |
-
* Unlimited Filters
|
22 |
-
* Multiple User Interface Elements
|
23 |
-
* SEO Friendly Urls ( with HTML5 PushState )
|
24 |
-
* Filter Visibility By Product Category And Globals.
|
25 |
-
* Accessible through shortcode
|
26 |
-
* Filter box height limit with scroll themes
|
27 |
-
* Working great with custom widget area
|
28 |
-
* Drag and Drop Filter Building
|
29 |
-
* And More...
|
30 |
-
|
31 |
-
= Additional Features in Paid Plugin: =
|
32 |
-
|
33 |
-
* Filter by Attribute, Tag, Custom Taxonomy, Color, Sub-categories and Availability( in stock | out of stock | any )
|
34 |
-
* Customize filters look through admin
|
35 |
-
* Option to re-count products amount in values when some value selected
|
36 |
-
* Tag Cloud for Tag filter
|
37 |
-
* Description can be added for the attributes
|
38 |
-
* Slider can use strings as a value
|
39 |
-
* Filters can be collapsed by clicking on title, option to collapse filter on start
|
40 |
-
* Price Filter Custom Min and Max values
|
41 |
-
* Add custom CSS on admin settings page
|
42 |
-
* Show icons before/after widget title and/or before/after values
|
43 |
-
* Option to upload "Loading..." gif image and set label after/before/above/under it
|
44 |
-
* Show icons before/after widget title and/or before/after values
|
45 |
-
* Scroll top position can be controlled by the admin
|
46 |
-
* Option to hide on mobile devices
|
47 |
-
* Much better support for custom theme
|
48 |
-
* Enhancements of the free features
|
49 |
-
|
50 |
-
= Paid Plugin Link =
|
51 |
-
http://berocket.com/product/woocommerce-ajax-products-filter
|
52 |
-
|
53 |
-
= Demo =
|
54 |
-
http://woocommerce-product-filter.berocket.com
|
55 |
-
|
56 |
-
|
57 |
-
= How It Works: =
|
58 |
-
*check installation*
|
59 |
-
|
60 |
-
|
61 |
-
= In recent updates: =
|
62 |
-
* Scroll to the top
|
63 |
-
* Hash for old browsers added for better support
|
64 |
-
* Sort by default WooCommerce value
|
65 |
-
* Fixed out-of-stock filter
|
66 |
-
* Jump to first page when filter changed
|
67 |
-
* Option to add text before and after price input fields
|
68 |
-
* Now only used values must be shown, not all
|
69 |
-
* Minor fixes
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
= Shortcode: =
|
74 |
-
* In editor `[br_filters attribute=price type=slider title="Price Filter"]`
|
75 |
-
* In PHP `do_shortcode('[br_filters attribute=price type=slider title="Price Filter"]');`
|
76 |
-
|
77 |
-
= Shortcode Options: =
|
78 |
-
* `attribute`(required) - product attribute, eg price or length. Don't forget that woocommerce adding pa_ suffix for created attributes.
|
79 |
-
So if you create new attribute `jump` its name is `pa_jump`
|
80 |
-
* `type`(required) - checkbox, radio, slider or select
|
81 |
-
* `operator` - OR or AND
|
82 |
-
* `title` - whatever you want to see as title. Can be empty
|
83 |
-
* `product_cat` - parent category id
|
84 |
-
* `cat_propagation` - should we propagate this filter to child categories? set 1 to turn this on
|
85 |
-
* `height` - max filter box height. When height is met scroll will be added
|
86 |
-
* `scroll_theme` - pretty clear name, scroll theme. Will be used if height is set and real height of box is more
|
87 |
-
|
88 |
-
|
89 |
-
= Advanced Settings (Widget area): =
|
90 |
-
|
91 |
-
* Product Category - if you want to pin your filter to category of the product this is good place to do it.
|
92 |
-
Eg. You selling Phones and Cases for them. If user choose Category "Phones" filter "Have Wi-Fi" will appear
|
93 |
-
but if user will choose "Cases" it will not be there as Admin set that "Have Wi-Fi" filter will be visible only on
|
94 |
-
"Phones" category.
|
95 |
-
* Filter Box Height - if your filter have too much options it is nice to limit height of the filter to not prolong
|
96 |
-
the page too much. Scroll will appear.
|
97 |
-
* Scroll theme - if "Filter Box Height" is set and box length is more than "Filter Box Height" scroll appear and
|
98 |
-
how it looks depends on the theme you choose.
|
99 |
-
|
100 |
-
|
101 |
-
= Advanced Settings (Plugin Settings): =
|
102 |
-
* Plugin settings can be found in admin area, WooCommerce -> Product Filters
|
103 |
-
* "No Products" message - Text that will be shown if no products found
|
104 |
-
* "No Products" class - Add class and use it to style "No Products" box
|
105 |
-
* Products selector - Selector for tag that is holding products
|
106 |
-
* Sorting control - Take control over WooCommerce's sorting selectbox
|
107 |
-
* SEO friendly urls - url will be changed when filter is selected/changed
|
108 |
-
* Turn all filters off - If you want to hide filters without losing current configuration just turn them off
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
== Installation ==
|
113 |
-
|
114 |
-
= Step 1: =
|
115 |
-
* First you need to add attributes to the products ( WooCommerce plugin should be installed and activated already )
|
116 |
-
* Go to Admin area -> Products -> Attributes and add attributes your products will have, add them all
|
117 |
-
* Click attribute's name where type is select and add values to it. Predefine product options
|
118 |
-
* Go to your products and add attributes to each of them
|
119 |
-
|
120 |
-
= Step 2: =
|
121 |
-
* Install and activate plugin
|
122 |
-
* First of all go to Admin area -> WooCommerce -> Product Filter and check what global options you can manage
|
123 |
-
* After that go to Admin area -> Appearance -> Widgets
|
124 |
-
* In Available Widgets ( left side of the screen ) find AJAX Product Filters
|
125 |
-
* Drag it to Sidebar you choose
|
126 |
-
* Enter title, choose attribute that will be used for filtering products, choose filter type,
|
127 |
-
choose operator( whether product should have all selected values (AND) or one of them (OR) ),
|
128 |
-
* Click save and go to your shop to check how it work.
|
129 |
-
* That's it =)
|
130 |
-
|
131 |
-
|
132 |
-
== Frequently Asked Questions ==
|
133 |
-
|
134 |
-
---
|
135 |
-
|
136 |
-
== Screenshots ==
|
137 |
-
|
138 |
-
---
|
139 |
-
|
140 |
-
== Changelog ==
|
141 |
-
|
142 |
-
= 1.1.8 =
|
143 |
-
* Fix - Better compatibility with WPML
|
144 |
-
|
145 |
-
= 1.1.7 =
|
146 |
-
* Fix - Remove notices on PHP 7 and newer
|
147 |
-
* Fix - Fix fo Currency Exchange plugin
|
148 |
-
* Fix - Styles for admin panel
|
149 |
-
* Fix - Remove sliders from all filters
|
150 |
-
|
151 |
-
= 1.1.6 =
|
152 |
-
* Fix - Price for currency exchange
|
153 |
-
* Fix - Optimization for price widget
|
154 |
-
* Fix - Custom JavaScript errors
|
155 |
-
|
156 |
-
= 1.1.5 =
|
157 |
-
* Fix - Shortcode doesn't work
|
158 |
-
* Fix - Optimization for price filters
|
159 |
-
* Fix - Filters work incorrect on search page
|
160 |
-
* Fix - Some strings is not translated with WPML
|
161 |
-
* Fix - Optimization for hiding attribute values without products
|
162 |
-
|
163 |
-
|
164 |
-
= 1.1.4 =
|
165 |
-
* Enhancement - Russian translation
|
166 |
-
* Fix - Translation
|
167 |
-
* Fix - Network activation
|
168 |
-
* Fix - Displaying of filter with price
|
169 |
-
* Fix - Get normal min/max prices for filter with price
|
170 |
-
* Fix - Widgets displays incorrect with some themes
|
171 |
-
* Fix - Not filtering with some plugins
|
172 |
-
* Fix - Scrollbar displays incorrect with some themes
|
173 |
-
|
174 |
-
= 1.1.3 =
|
175 |
-
* Enhancement - load only products from last AJAX request
|
176 |
-
* Enhancement - Uses HTML for widgets from theme
|
177 |
-
* Enhancement/Fix - Attributes page support
|
178 |
-
* Fix - Hash links didn't works with plugin
|
179 |
-
* Fix - Widgets don't display on page with latest version of WooCommerce
|
180 |
-
* Fix - Remove PHP errors
|
181 |
-
|
182 |
-
= 1.1.0.7 =
|
183 |
-
* Enhancement - Option to hide selected values and/or without products. Add at the bottom button to show them
|
184 |
-
* Enhancement - Filters are using product variations now
|
185 |
-
* Enhancement - translation( WPML ) support
|
186 |
-
* Enhancement/Fix - radio-box had issues and there was no chance to remove selection
|
187 |
-
* Fix - Pagination has issues with link building
|
188 |
-
* Fix - Jump to first page wasn't working correctly and jump each time even when user want to change page
|
189 |
-
|
190 |
-
= 1.1.0.6 =
|
191 |
-
* Enhancement - Scroll to the top
|
192 |
-
* Enhancement/Fix - Hash for old browsers added for better support
|
193 |
-
* Enhancement/Fix - Sort by default WooCommerce value
|
194 |
-
* Fix - out-of-stock filter working correctly
|
195 |
-
|
196 |
-
= 1.1.0.5 =
|
197 |
-
* Enhancement - Option to add text before and after price input fields
|
198 |
-
* Enhancement - Jump to first page when filter changed
|
199 |
-
* Fix - Now only used values must be shown, not all
|
200 |
-
* Fix - Products are limited by category we are in
|
201 |
-
* Fix - Products amount on the first page is correct now
|
202 |
-
|
203 |
-
= 1.1.0.4 =
|
204 |
-
* Minor fix
|
205 |
-
|
206 |
-
= 1.1.0.3 =
|
207 |
-
* Enhancement - Custom CSS class can be added per widget/filter
|
208 |
-
* Enhancement - Update button. If added products will be updated only when user click Update button
|
209 |
-
* Enhancement - Radio-box can be unselected by clicking it again
|
210 |
-
* Enhancement/Fix - Urls are shortened using better structure to save filters. `~` symbol is not used now
|
211 |
-
* Fix - issue with shortened tags for shortcode.
|
212 |
-
* Fix - on widgets page widget now has subcategories(hierarchy)
|
213 |
-
* Fix - all categories are visible, not only that have products inside(popular)
|
214 |
-
* Minor fixes
|
215 |
-
|
216 |
-
= 1.1.0.2 =
|
217 |
-
* Fix - another js issue that stops plugin from work
|
218 |
-
* Fix - order by name, name_numeric and attribute ID wasn't working
|
219 |
-
|
220 |
-
= 1.1.0.1 =
|
221 |
-
* Fix - js issue that stops plugin from work
|
222 |
-
|
223 |
-
= 1.1.0 =
|
224 |
-
* Enhancement - Show all values - on plugin settings page you can enable option to show all values no matter if they are used or not
|
225 |
-
* Enhancement - Values order - you can set values order when editing attribute. You can set how to order (by id, name or custom). If
|
226 |
-
you set to order `by custom` you can drag&drop values up and down and set your own order.
|
227 |
-
* Small fixes
|
228 |
-
|
229 |
-
= 1.0.4.5 =
|
230 |
-
* Enhancement - values order added. Now order of values can be controlled through attribute options
|
231 |
-
* Enhancement/Fix - Better support for for category pages
|
232 |
-
* Other small fixes
|
233 |
-
|
234 |
-
= 1.0.4.4 =
|
235 |
-
* Enhancement - adding callback for before_update, on_update, after_update events.
|
236 |
-
* Other small fixes
|
237 |
-
|
238 |
-
= 1.0.4.3 =
|
239 |
-
* Enhancement - shortcode added
|
240 |
-
* Critical/Fix - If slider match none its values wasn't counted
|
241 |
-
* Enhancement/Fix - Changing attribute data location from url to action-element, providing more flexibility for template
|
242 |
-
* Enhancement/Templating - Using full products loop instead of including product content template
|
243 |
-
* Fix - Pagination with SEO url issue
|
244 |
-
|
245 |
-
= 1.0.4.2 =
|
246 |
-
* Enhancement/Fix - Better support for SEO urls with permalinks on/off
|
247 |
-
* Fix - Critical bug that was returning incorrect products.
|
248 |
-
|
249 |
-
= 1.0.4.1 =
|
250 |
-
* Enhancement - Adding AJAX for pagination.
|
251 |
-
* Enhancement - Adding PushState for pagination.
|
252 |
-
* Enhancement/Fix - Pagination wasn't updating when filters used.
|
253 |
-
* Enhancement/Fix - Text with amount of results (Eg "Showing all 2 results") wasn't updating after filters applied
|
254 |
-
* Enhancement/Fix - When choosing Slider in admin Operator became hidden
|
255 |
-
* Fix - All sliders except price wasn't working with SEO url
|
256 |
-
* Fix - When changing attribute to/from price in admin all filters jumping
|
257 |
-
* Fix - After filter applied all products was showed. Even those with Draft status.
|
258 |
-
|
259 |
-
= 1.0.4 =
|
260 |
-
* Enhancement - SEO friendly urls with possibility for users to share/bookmark their search. Will be shortened in future
|
261 |
-
* Enhancement - Option added to turn SEO friendly urls on/off. Off by default as this is first version of this feature
|
262 |
-
* Enhancement - Option to turn filters on/off globally
|
263 |
-
* Enhancement - Option to take control over (default) sorting function, make it AJAXy and work with filters
|
264 |
-
* Fix - Sorting remain correct after using filters. Sorting wasn't counted before
|
265 |
-
* Fix - If there are 2 or more sliders they are not working correctly.
|
266 |
-
* Fix - Values in slider was converted to float even when value ia not a price.
|
267 |
-
* Fix - If there are 2 or more values for attribute it was not validated when used in slider.
|
268 |
-
|
269 |
-
= 1.0.3.6 =
|
270 |
-
* Fix - Removed actions that provide warning messages
|
271 |
-
* Enhancement - Actions and filters inside plugin
|
272 |
-
|
273 |
-
= 1.0.3.3 =
|
274 |
-
* Enhancement/Fix - Showing products and options now depending on woocommerce_hide_out_of_stock_items option
|
275 |
-
* Enhancement/Fix - If not enough data available( quantity of options < 2 ) filters will not be shown.
|
276 |
-
* Fix - If in category, only products/options from this category will be shown
|
277 |
-
|
278 |
-
= 1.0.3.2 =
|
279 |
-
* Fix - wrong path was committed in previous version that killed plugin
|
280 |
-
|
281 |
-
= 1.0.3 =
|
282 |
-
* Enhancement - CSS and JavaScript files minimized
|
283 |
-
* Enhancement - Settings page added
|
284 |
-
* Enhancement - "No Products" message and it's class can be changed through admin
|
285 |
-
* Enhancement - Option added that can enable control over sorting( if visible )
|
286 |
-
* Enhancement - User can select several categories instead of one. Now you don't need to create several same filters
|
287 |
-
for different categories.
|
288 |
-
* Enhancement - Added option "include subcats?". if selected filter will be shown in selected categories and their
|
289 |
-
subcategories
|
290 |
-
* Fix - Adding support to themes that require product div to have "product" class
|
291 |
-
* Fix - Slider in categories wasn't initialized
|
292 |
-
* Fix - Subcategories wasn't working. Only Main categories were showing filters
|
293 |
-
* Templating - return woocommerce/theme default structure for product
|
294 |
-
* Templating - html parts moved to separate files in templates folder. You can overwrite them by creating folder
|
295 |
-
"woocommerce-filters" and file with same name as in plugin templates folder.
|
296 |
-
|
297 |
-
= 1.0.2 =
|
298 |
-
* Fix - better support for older PHP versions
|
299 |
-
|
300 |
-
= 1.0.1 =
|
301 |
-
* First public version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contributors.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
BeRocket
|
|
includes/admin_notices.php
CHANGED
@@ -30,24 +30,24 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
30 |
public static $styles_exist = false;
|
31 |
public static $notice_index = 0;
|
32 |
public static $default_notice_options = array(
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
function __construct($options = array()) {
|
52 |
if( ! is_admin() ) return;
|
53 |
$options = array_merge(self::$default_notice_options, $options);
|
@@ -100,22 +100,26 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
100 |
return $array;
|
101 |
}
|
102 |
public static function get_notice_by_path($find_names) {
|
103 |
-
$notices = get_option('berocket_admin_notices');
|
104 |
-
if( ! is_array($notices) ) {
|
105 |
$notices = array();
|
106 |
}
|
|
|
107 |
$current_notice = &$notices;
|
108 |
-
foreach($find_names as $find_name) {
|
109 |
-
if( isset($current_notice[$find_name]) ) {
|
110 |
-
$new_current_notice = &$current_notice[$find_name];
|
111 |
-
unset($current_notice);
|
112 |
$current_notice = &$new_current_notice;
|
113 |
-
unset($new_current_notice);
|
114 |
} else {
|
115 |
-
unset($current_notice);
|
116 |
break;
|
117 |
}
|
118 |
}
|
|
|
|
|
|
|
119 |
return $current_notice;
|
120 |
}
|
121 |
public static function berocket_array_udiff_assoc_notice($a1, $a2) {
|
@@ -369,8 +373,8 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
369 |
} else {
|
370 |
$user_email = '';
|
371 |
}
|
372 |
-
$notice['righthtml'] =
|
373 |
-
|
374 |
<input type="hidden" name="action" value="berocket_subscribe_email">
|
375 |
<input class="berocket_subscribe_email" type="email" name="email" value="' . $user_email . '">
|
376 |
<input type="submit" class="button-primary button berocket_notice_submit" value="Subscribe">
|
@@ -379,13 +383,13 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
379 |
}
|
380 |
echo '
|
381 |
<div class="notice berocket_admin_notice berocket_admin_notice_', self::$notice_index, '" data-notice=\'', json_encode($notice_data), '\'>',
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
<div class="berocket_notice_content">' . $notice['righthtml'] . '</div>
|
386 |
<div class="berocket_notice_after_content"></div>
|
387 |
</div>' ),
|
388 |
-
|
389 |
<div class="berocket_notice_content">', $notice['html'], '</div>
|
390 |
<div class="berocket_notice_after_content"></div>
|
391 |
</div></div>';
|
@@ -417,20 +421,20 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
417 |
overflow-y: auto;
|
418 |
}
|
419 |
.berocket_admin_notice.berocket_admin_notice_', self::$notice_index, ' .berocket_notice_right_content {',
|
420 |
-
|
421 |
-
|
422 |
float: right;
|
423 |
width: ' . $notice['rightwidth'] . 'px;
|
424 |
-webkit-box-shadow: box-shadow: -1px 0 0 0 rgba(0, 0, 0, 0.1);
|
425 |
box-shadow: -1px 0 0 0 rgba(0, 0, 0, 0.1);
|
426 |
padding-left: 10px;' ),
|
427 |
-
|
428 |
.berocket_admin_notice.berocket_admin_notice_', self::$notice_index, ' .berocket_no_thanks {',
|
429 |
-
|
430 |
color: #0073aa;
|
431 |
opacity: 0.5;
|
432 |
display: inline-block;' ),
|
433 |
-
|
434 |
', ( empty($notice['subscribe']) ? '' : '
|
435 |
.berocket_admin_notice.berocket_admin_notice_' . self::$notice_index . ' .berocket_subscribe_form {
|
436 |
display: inline-block;
|
@@ -628,7 +632,11 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
628 |
if( $this.is("form") ) {
|
629 |
var data = $this.serialize();
|
630 |
} else {
|
631 |
-
|
|
|
|
|
|
|
|
|
632 |
}
|
633 |
var url = $this.attr("action");
|
634 |
$this.trigger("berocket_subscribing");
|
@@ -697,10 +705,17 @@ if( ! class_exists( 'berocket_admin_notices' ) ) {
|
|
697 |
public static function subscribe() {
|
698 |
if( ! empty($_POST['email']) ) {
|
699 |
if( $ch = curl_init() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
700 |
update_option('berocket_email_subscribed', true);
|
701 |
curl_setopt($ch, CURLOPT_URL,"http://berocket.com/main/subscribe");
|
702 |
curl_setopt($ch, CURLOPT_POST, 1);
|
703 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, "type_sub=freeplugin&subs_email=" . $_POST['email']);
|
704 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
705 |
echo curl_exec ($ch);
|
706 |
curl_close ($ch);
|
30 |
public static $styles_exist = false;
|
31 |
public static $notice_index = 0;
|
32 |
public static $default_notice_options = array(
|
33 |
+
'start' => 0,
|
34 |
+
'end' => 0,
|
35 |
+
'name' => 'sale',
|
36 |
+
'html' => '',
|
37 |
+
'righthtml' => '<a class="berocket_no_thanks">No thanks</a>',
|
38 |
+
'rightwidth' => 80,
|
39 |
+
'nothankswidth' => 60,
|
40 |
+
'contentwidth' => 400,
|
41 |
+
'subscribe' => false,
|
42 |
+
'closed' => '0',
|
43 |
+
'priority' => 20,
|
44 |
+
'height' => 50,
|
45 |
+
'repeat' => false,
|
46 |
+
'repeatcount' => 1,
|
47 |
+
'image' => array(
|
48 |
+
'global' => 'http://berocket.com/images/logo-2.png'
|
49 |
+
),
|
50 |
+
);
|
51 |
function __construct($options = array()) {
|
52 |
if( ! is_admin() ) return;
|
53 |
$options = array_merge(self::$default_notice_options, $options);
|
100 |
return $array;
|
101 |
}
|
102 |
public static function get_notice_by_path($find_names) {
|
103 |
+
$notices = get_option( 'berocket_admin_notices' );
|
104 |
+
if ( ! is_array( $notices ) ) {
|
105 |
$notices = array();
|
106 |
}
|
107 |
+
|
108 |
$current_notice = &$notices;
|
109 |
+
foreach ( $find_names as $find_name ) {
|
110 |
+
if ( isset( $current_notice[ $find_name ] ) ) {
|
111 |
+
$new_current_notice = &$current_notice[ $find_name ];
|
112 |
+
unset( $current_notice );
|
113 |
$current_notice = &$new_current_notice;
|
114 |
+
unset( $new_current_notice );
|
115 |
} else {
|
116 |
+
unset( $current_notice );
|
117 |
break;
|
118 |
}
|
119 |
}
|
120 |
+
|
121 |
+
if ( ! isset( $current_notice ) ) $current_notice = false;
|
122 |
+
|
123 |
return $current_notice;
|
124 |
}
|
125 |
public static function berocket_array_udiff_assoc_notice($a1, $a2) {
|
373 |
} else {
|
374 |
$user_email = '';
|
375 |
}
|
376 |
+
$notice['righthtml'] =
|
377 |
+
'<form class="berocket_subscribe_form" method="POST" action="' . admin_url( 'admin-ajax.php' ) . '">
|
378 |
<input type="hidden" name="action" value="berocket_subscribe_email">
|
379 |
<input class="berocket_subscribe_email" type="email" name="email" value="' . $user_email . '">
|
380 |
<input type="submit" class="button-primary button berocket_notice_submit" value="Subscribe">
|
383 |
}
|
384 |
echo '
|
385 |
<div class="notice berocket_admin_notice berocket_admin_notice_', self::$notice_index, '" data-notice=\'', json_encode($notice_data), '\'>',
|
386 |
+
( empty($notice['image']['local']) ? '' : '<img class="berocket_notice_img" src="' . $notice['image']['local'] . '">' ),
|
387 |
+
( empty($notice['righthtml']) ? '' :
|
388 |
+
'<div class="berocket_notice_right_content">
|
389 |
<div class="berocket_notice_content">' . $notice['righthtml'] . '</div>
|
390 |
<div class="berocket_notice_after_content"></div>
|
391 |
</div>' ),
|
392 |
+
'<div class="berocket_notice_content_wrap">
|
393 |
<div class="berocket_notice_content">', $notice['html'], '</div>
|
394 |
<div class="berocket_notice_after_content"></div>
|
395 |
</div></div>';
|
421 |
overflow-y: auto;
|
422 |
}
|
423 |
.berocket_admin_notice.berocket_admin_notice_', self::$notice_index, ' .berocket_notice_right_content {',
|
424 |
+
( $notice['rightwidth'] <= 20 ? ' display: none' :
|
425 |
+
'height: ' . $notice['height'] . 'px;
|
426 |
float: right;
|
427 |
width: ' . $notice['rightwidth'] . 'px;
|
428 |
-webkit-box-shadow: box-shadow: -1px 0 0 0 rgba(0, 0, 0, 0.1);
|
429 |
box-shadow: -1px 0 0 0 rgba(0, 0, 0, 0.1);
|
430 |
padding-left: 10px;' ),
|
431 |
+
'}
|
432 |
.berocket_admin_notice.berocket_admin_notice_', self::$notice_index, ' .berocket_no_thanks {',
|
433 |
+
( $settings_page ? 'display: none!important;' : 'cursor: pointer;
|
434 |
color: #0073aa;
|
435 |
opacity: 0.5;
|
436 |
display: inline-block;' ),
|
437 |
+
'}
|
438 |
', ( empty($notice['subscribe']) ? '' : '
|
439 |
.berocket_admin_notice.berocket_admin_notice_' . self::$notice_index . ' .berocket_subscribe_form {
|
440 |
display: inline-block;
|
632 |
if( $this.is("form") ) {
|
633 |
var data = $this.serialize();
|
634 |
} else {
|
635 |
+
if( jQuery(".berocket_plugin_id_subscribe").length ) {
|
636 |
+
var data = {email:email, action: $this.find("[name=\'action\']").val(), plugin:jQuery(".berocket_plugin_id_subscribe").val()};
|
637 |
+
} else {
|
638 |
+
var data = {email:email, action: $this.find("[name=\'action\']").val()};
|
639 |
+
}
|
640 |
}
|
641 |
var url = $this.attr("action");
|
642 |
$this.trigger("berocket_subscribing");
|
705 |
public static function subscribe() {
|
706 |
if( ! empty($_POST['email']) ) {
|
707 |
if( $ch = curl_init() ) {
|
708 |
+
$plugins = array();
|
709 |
+
if( ! empty($_POST['plugin']) ) {
|
710 |
+
$plugins[] = $_POST['plugin'];
|
711 |
+
}
|
712 |
+
$plugins = apply_filters('berocket_admin_notices_subscribe_plugins', $plugins);
|
713 |
+
$plugins = array_unique($plugins);
|
714 |
+
$plugins = implode(',', $plugins);
|
715 |
update_option('berocket_email_subscribed', true);
|
716 |
curl_setopt($ch, CURLOPT_URL,"http://berocket.com/main/subscribe");
|
717 |
curl_setopt($ch, CURLOPT_POST, 1);
|
718 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, "type_sub=freeplugin&subs_email=" . $_POST['email'] . "&plugins=" . $plugins);
|
719 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
720 |
echo curl_exec ($ch);
|
721 |
curl_close ($ch);
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: dholovnia, berocket
|
|
4 |
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: 4.8.
|
8 |
-
Stable tag: 1.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -15,6 +15,9 @@ WooCommerce AJAX Product Filters - Advanced product filtering ability for your W
|
|
15 |
|
16 |
WooCommerce AJAX Product Filters - Advanced product filtering ability for your WooCommerce shop. Add unlimited filters with one widget.
|
17 |
|
|
|
|
|
|
|
18 |
= Features: =
|
19 |
|
20 |
* AJAX Filters, Pagination and Sorting!
|
@@ -63,6 +66,27 @@ WooCommerce AJAX Product Filters - Advanced product filtering ability for your W
|
|
63 |
[Demo](http://woocommerce-products-filter.berocket.com/shop/)
|
64 |
[Demo Description](http://woocommerce-products-filter.berocket.com/)
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
= How It Works: =
|
68 |
*check installation*
|
@@ -152,6 +176,10 @@ WooCommerce AJAX Product Filters - Advanced product filtering ability for your W
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
155 |
= 1.2.2 =
|
156 |
* Upgrade - Font Awesome
|
157 |
* Upgrade - New admin notices
|
4 |
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: 4.8.3
|
8 |
+
Stable tag: 1.2.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
15 |
|
16 |
WooCommerce AJAX Product Filters - Advanced product filtering ability for your WooCommerce shop. Add unlimited filters with one widget.
|
17 |
|
18 |
+
= BeRocket Promotions: =
|
19 |
+
[-60% discount for the Premium Load More Products - ONLY $10!](http://berocket.com/product/woocommerce-load-more-products)
|
20 |
+
|
21 |
= Features: =
|
22 |
|
23 |
* AJAX Filters, Pagination and Sorting!
|
66 |
[Demo](http://woocommerce-products-filter.berocket.com/shop/)
|
67 |
[Demo Description](http://woocommerce-products-filter.berocket.com/)
|
68 |
|
69 |
+
= Wanna try admin side? =
|
70 |
+
[Admin Demo](http://berocket.com/product/woocommerce-ajax-products-filter#try-admin) - Get access to this plugin's admin and try it from inside. Change things and watch how they work.
|
71 |
+
|
72 |
+
= Premium plugin video =
|
73 |
+
[youtube https://youtu.be/8gaMj-IxUj0]
|
74 |
+
[youtube https://youtu.be/KMjHgOA-4gM]
|
75 |
+
[youtube https://youtu.be/yo0vx5kSlLU]
|
76 |
+
*we don't have video with free plugin right now but we are working on it*
|
77 |
+
|
78 |
+
Advanced AJAX Product Filters has been tested and compatibility is certain with the following WooCommerce plugins that you can add to your site:
|
79 |
+
|
80 |
+
* [**Advanced Product Labels for WooCommerce**](https://wordpress.org/plugins/advanced-product-labels-for-woocommerce/)
|
81 |
+
* [**Load More Products for WooCommerce**](https://wordpress.org/plugins/load-more-products-for-woocommerce/)
|
82 |
+
* [**Brands for WooCommerce**](https://wordpress.org/plugins/brands-for-woocommerce/)
|
83 |
+
* [**Grid/List View for WooCommerce**](https://wordpress.org/plugins/gridlist-view-for-woocommerce/)
|
84 |
+
* [**Product Preview for WooCommerce**](https://wordpress.org/plugins/product-preview-for-woocommerce/)
|
85 |
+
* [**Products Compare for WooCommerce**](https://wordpress.org/plugins/products-compare-for-woocommerce/)
|
86 |
+
* [**Wishlist and Waitlist for WooCommerce**](https://wordpress.org/plugins/wish-wait-list-for-woocommerce/)
|
87 |
+
|
88 |
+
Nevertheless, it could be compatible with many other WooCommerce plugins that have not been tested yet. If you want to inform us about compatibility with other plugins, please, [email to us](http://berocket.com/contact).
|
89 |
+
|
90 |
|
91 |
= How It Works: =
|
92 |
*check installation*
|
176 |
|
177 |
== Changelog ==
|
178 |
|
179 |
+
= 1.2.3 =
|
180 |
+
* Upgrade - more useful subscribe
|
181 |
+
* Fix - updater fix
|
182 |
+
|
183 |
= 1.2.2 =
|
184 |
* Upgrade - Font Awesome
|
185 |
* Upgrade - New admin notices
|
templates/settings_footer.php
CHANGED
@@ -1,28 +1,45 @@
|
|
1 |
-
<?php if( ! empty($feature_list) && count($feature_list) > 0 ) { ?>
|
2 |
<div class="paid_features">
|
3 |
<?php
|
4 |
$feature_text = '';
|
5 |
-
foreach($feature_list as $feature) {
|
6 |
-
$feature_text .= '<li>'
|
7 |
}
|
8 |
-
$text = '<h3>
|
9 |
<div>
|
10 |
<ul>
|
11 |
%feature_list%
|
12 |
</ul>
|
13 |
</div>
|
14 |
<div><a class="get_premium_version" href="%link%">PREMIUM VERSION</a></div>
|
15 |
-
<p>Support the plugin by purchasing paid version. This will provide faster growth,
|
16 |
-
|
17 |
-
|
18 |
-
$text = str_replace('%
|
19 |
-
$text = str_replace('%
|
|
|
|
|
20 |
echo $text;
|
21 |
?>
|
22 |
</div>
|
|
|
23 |
<style>
|
24 |
-
.paid_features
|
25 |
-
border:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
background: white;
|
27 |
float: right;
|
28 |
clear: right;
|
@@ -31,9 +48,8 @@
|
|
31 |
text-align: center;
|
32 |
padding: 0 25px;
|
33 |
margin-bottom: 30px;
|
34 |
-
|
35 |
-
|
36 |
-
font-weight: 600;
|
37 |
}
|
38 |
.paid_features ul li {
|
39 |
text-align: left;
|
@@ -67,37 +83,56 @@
|
|
67 |
}
|
68 |
.berocket_subscribe .berocket_notice_submit,
|
69 |
.get_premium_version {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
display: inline-block;
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
margin: 1em 0 1em 0;
|
78 |
text-decoration: none;
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
|
|
87 |
width: 100%;
|
88 |
-
|
89 |
}
|
90 |
.berocket_subscribe .berocket_notice_submit:hover,
|
91 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
color: white;
|
93 |
background-color: rgb(222, 72, 72);
|
94 |
box-shadow: none;
|
95 |
border: none;
|
96 |
}
|
97 |
.berocket_subscribe .berocket_notice_submit:focus,
|
98 |
-
.
|
99 |
-
.berocket_subscribe .berocket_notice_submit:active,
|
100 |
-
.get_premium_version:active {
|
101 |
color: white;
|
102 |
background-color: rgb(222, 72, 72);
|
103 |
-webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30,140,190,.8);
|
@@ -112,9 +147,18 @@
|
|
112 |
width: 68%;
|
113 |
box-sizing: border-box;
|
114 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
@media screen and (max-width: 900px) {
|
116 |
.show_premium,
|
117 |
.paid_features,
|
|
|
118 |
.berocket_subscribe {
|
119 |
float: none;
|
120 |
width: 100%;
|
@@ -129,9 +173,9 @@
|
|
129 |
</style>
|
130 |
<?php
|
131 |
$subscribed = get_option('berocket_email_subscribed');
|
132 |
-
if( ! $subscribed ) {
|
133 |
$user_email = wp_get_current_user();
|
134 |
-
if( isset($user_email->user_email) ) {
|
135 |
$user_email = $user_email->user_email;
|
136 |
} else {
|
137 |
$user_email = '';
|
@@ -141,6 +185,7 @@
|
|
141 |
<h3>OUR NEWSLETTER</h3>
|
142 |
<p>Get awesome content delivered straight to your inbox</p>
|
143 |
<form class="berocket_subscribe_form" method="POST" action="<?php echo admin_url( 'admin-ajax.php' ); ?>">
|
|
|
144 |
<input type="hidden" name="action" value="berocket_subscribe_email">
|
145 |
<input class="berocket_subscribe_email" type="email" name="email" placeholder="Enter your email address" value="<?php echo $user_email; ?>">
|
146 |
<input type="submit" class="berocket_notice_submit" value="SUBSCRIBE">
|
@@ -153,8 +198,9 @@
|
|
153 |
} else {
|
154 |
$text = '<h4 style="clear:both;"><a href="%plugin_link%" target="_blank">%plugin_name%</a> developed by <a href="http://berocket.com" target="_blank">BeRocket</a></h4>';
|
155 |
}
|
156 |
-
|
157 |
-
$text = str_replace('%
|
158 |
-
$text = str_replace('%
|
|
|
159 |
echo $text;
|
160 |
?>
|
1 |
+
<?php if ( ! empty($feature_list) && count($feature_list) > 0 ) { ?>
|
2 |
<div class="paid_features">
|
3 |
<?php
|
4 |
$feature_text = '';
|
5 |
+
foreach ( $feature_list as $feature ) {
|
6 |
+
$feature_text .= '<li>' . $feature . '</li>';
|
7 |
}
|
8 |
+
$text = '<h3>Unlock all the features with Paid version!</h3>
|
9 |
<div>
|
10 |
<ul>
|
11 |
%feature_list%
|
12 |
</ul>
|
13 |
</div>
|
14 |
<div><a class="get_premium_version" href="%link%">PREMIUM VERSION</a></div>
|
15 |
+
<p>Support the plugin by purchasing paid version. This will provide faster growth,
|
16 |
+
better support and much more functionality for the plugin</p>';
|
17 |
+
|
18 |
+
$text = str_replace( '%feature_list%', $feature_text, $text );
|
19 |
+
$text = str_replace( '%link%', $dplugin_link, $text );
|
20 |
+
$text = str_replace( '%plugin_name%', @ $plugin_info['Name'], $text );
|
21 |
+
$text = str_replace( '%plugin_link%', @ $plugin_info['PluginURI'], $text );
|
22 |
echo $text;
|
23 |
?>
|
24 |
</div>
|
25 |
+
|
26 |
<style>
|
27 |
+
.paid_features {
|
28 |
+
border-radius: 3px;
|
29 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.06);
|
30 |
+
overflow: auto;
|
31 |
+
position: relative;
|
32 |
+
background-color: white;
|
33 |
+
color: rgba(0, 0, 0, 0.87);
|
34 |
+
padding: 0 25px;
|
35 |
+
margin-bottom: 30px;
|
36 |
+
box-sizing: border-box;
|
37 |
+
text-align: center;
|
38 |
+
float: right;
|
39 |
+
clear: right;
|
40 |
+
width: 28%;
|
41 |
+
}
|
42 |
+
.berocket_subscribe {
|
43 |
background: white;
|
44 |
float: right;
|
45 |
clear: right;
|
48 |
text-align: center;
|
49 |
padding: 0 25px;
|
50 |
margin-bottom: 30px;
|
51 |
+
border-radius: 3px;
|
52 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.06);
|
|
|
53 |
}
|
54 |
.paid_features ul li {
|
55 |
text-align: left;
|
83 |
}
|
84 |
.berocket_subscribe .berocket_notice_submit,
|
85 |
.get_premium_version {
|
86 |
+
margin-top: 30px;
|
87 |
+
margin-bottom: 20px;
|
88 |
+
color: #fff;
|
89 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
|
90 |
+
text-shadow: none;
|
91 |
+
border: 0 none;
|
92 |
+
min-width: 120px;
|
93 |
+
width: 90%;
|
94 |
+
-moz-user-select: none;
|
95 |
+
background: #ff5252 none repeat scroll 0 0;
|
96 |
+
box-sizing: border-box;
|
97 |
+
cursor: pointer;
|
98 |
display: inline-block;
|
99 |
+
font-size: 14px;
|
100 |
+
font-weight: normal;
|
101 |
+
outline: 0 none;
|
102 |
+
padding: 8px;
|
103 |
+
position: relative;
|
104 |
+
text-align: center;
|
|
|
105 |
text-decoration: none;
|
106 |
+
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;
|
107 |
+
white-space: nowrap;
|
108 |
+
height: auto;
|
109 |
+
vertical-align: top;
|
110 |
+
line-height: 26px;
|
111 |
+
border-radius: 3px;
|
112 |
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
113 |
+
}
|
114 |
+
.berocket_subscribe .berocket_notice_submit{
|
115 |
width: 100%;
|
116 |
+
margin-top: 20px;
|
117 |
}
|
118 |
.berocket_subscribe .berocket_notice_submit:hover,
|
119 |
+
.berocket_subscribe .berocket_notice_submit:focus,
|
120 |
+
.berocket_subscribe .berocket_notice_submit:active,
|
121 |
+
.get_premium_version:hover,
|
122 |
+
.get_premium_version:focus,
|
123 |
+
.get_premium_version:active {
|
124 |
+
background: #ff6e68 none repeat scroll 0 0;
|
125 |
+
color: white;
|
126 |
+
}
|
127 |
+
|
128 |
+
.berocket_subscribe .berocket_notice_submit:hover {
|
129 |
color: white;
|
130 |
background-color: rgb(222, 72, 72);
|
131 |
box-shadow: none;
|
132 |
border: none;
|
133 |
}
|
134 |
.berocket_subscribe .berocket_notice_submit:focus,
|
135 |
+
.berocket_subscribe .berocket_notice_submit:active {
|
|
|
|
|
136 |
color: white;
|
137 |
background-color: rgb(222, 72, 72);
|
138 |
-webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30,140,190,.8);
|
147 |
width: 68%;
|
148 |
box-sizing: border-box;
|
149 |
}
|
150 |
+
@media screen and (min-width: 901px) and (max-width: 1200px) {
|
151 |
+
.paid_features,
|
152 |
+
.berocket_subscribe {
|
153 |
+
padding-left: 10px;
|
154 |
+
padding-right: 10px;
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
158 |
@media screen and (max-width: 900px) {
|
159 |
.show_premium,
|
160 |
.paid_features,
|
161 |
+
.get_premium_version,
|
162 |
.berocket_subscribe {
|
163 |
float: none;
|
164 |
width: 100%;
|
173 |
</style>
|
174 |
<?php
|
175 |
$subscribed = get_option('berocket_email_subscribed');
|
176 |
+
if ( ! $subscribed ) {
|
177 |
$user_email = wp_get_current_user();
|
178 |
+
if ( isset( $user_email->user_email ) ) {
|
179 |
$user_email = $user_email->user_email;
|
180 |
} else {
|
181 |
$user_email = '';
|
185 |
<h3>OUR NEWSLETTER</h3>
|
186 |
<p>Get awesome content delivered straight to your inbox</p>
|
187 |
<form class="berocket_subscribe_form" method="POST" action="<?php echo admin_url( 'admin-ajax.php' ); ?>">
|
188 |
+
<input type="hidden" name="plugin" value="<?php echo $paid_plugin_info['id']; ?>" class="berocket_plugin_id_subscribe">
|
189 |
<input type="hidden" name="action" value="berocket_subscribe_email">
|
190 |
<input class="berocket_subscribe_email" type="email" name="email" placeholder="Enter your email address" value="<?php echo $user_email; ?>">
|
191 |
<input type="submit" class="berocket_notice_submit" value="SUBSCRIBE">
|
198 |
} else {
|
199 |
$text = '<h4 style="clear:both;"><a href="%plugin_link%" target="_blank">%plugin_name%</a> developed by <a href="http://berocket.com" target="_blank">BeRocket</a></h4>';
|
200 |
}
|
201 |
+
|
202 |
+
$text = str_replace( '%link%', $dplugin_link, $text );
|
203 |
+
$text = str_replace( '%plugin_name%', @ $plugin_info['Name'], $text );
|
204 |
+
$text = str_replace( '%plugin_link%', @ $plugin_info['PluginURI'], $text );
|
205 |
echo $text;
|
206 |
?>
|
woocommerce-filters.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: Advanced AJAX Product
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
-
* Description:
|
6 |
-
* Version: 1.2.
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
@@ -11,7 +11,7 @@
|
|
11 |
* Domain Path: /languages/
|
12 |
*/
|
13 |
|
14 |
-
define( "BeRocket_AJAX_filters_version", '1.2.
|
15 |
define( "BeRocket_AJAX_domain", 'BeRocket_AJAX_domain' );
|
16 |
|
17 |
define( "AAPF_TEMPLATE_PATH", plugin_dir_path( __FILE__ ) . "templates/" );
|
@@ -28,6 +28,15 @@ require_once dirname( __FILE__ ) . '/includes/functions.php';
|
|
28 |
|
29 |
class BeRocket_AAPF {
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
public static $defaults = array(
|
32 |
"br_opened_tab" => "general",
|
33 |
"no_products_message" => "There are no products meeting your criteria",
|
@@ -100,6 +109,11 @@ class BeRocket_AAPF {
|
|
100 |
add_action( 'admin_notices', array( __CLASS__, 'no_woocommerce' ) );
|
101 |
}
|
102 |
}
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
public static function is_settings_page($settings_page) {
|
105 |
if( ! empty($_GET['page']) && $_GET['page'] == self::$values[ 'option_page' ] ) {
|
@@ -192,6 +206,7 @@ class BeRocket_AAPF {
|
|
192 |
wp_enqueue_style( 'berocket_aapf_widget-admin-style' );
|
193 |
|
194 |
$plugin_info = get_plugin_data(__FILE__, false, true);
|
|
|
195 |
include AAPF_TEMPLATE_PATH . "admin-settings.php";
|
196 |
}
|
197 |
|
@@ -466,18 +481,21 @@ new BeRocket_AAPF;
|
|
466 |
|
467 |
berocket_admin_notices::generate_subscribe_notice();
|
468 |
|
|
|
|
|
|
|
469 |
new berocket_admin_notices(array(
|
470 |
'start' => 1505100638, // timestamp when notice start
|
471 |
'end' => 1506816001, // timestamp when notice end
|
472 |
'name' => 'SALE_LABELS', //notice name must be unique for this time period
|
473 |
'html' => 'Only <strong>$9.6</strong> for <strong>Premium</strong> WooCommerce Advanced Product Labels!
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
'righthtml' => '<a class="berocket_no_thanks">No thanks</a>', //content in the right block, this is default value. This html code must be added to all notices
|
478 |
'rightwidth' => 80, //width of right content is static and will be as this value. berocket_no_thanks block is 60px and 20px is additional
|
479 |
'nothankswidth' => 60, //berocket_no_thanks width. set to 0 if block doesn't uses. Or set to any other value if uses other text inside berocket_no_thanks
|
480 |
-
'contentwidth' =>
|
481 |
'subscribe' => false, //add subscribe form to the righthtml
|
482 |
'priority' => 7, //priority of notice. 1-5 is main priority and displays on settings page always
|
483 |
'height' => 50, //height of notice. image will be scaled
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: Advanced AJAX Product Filters for WooCommerce
|
4 |
* Plugin URI: https://wordpress.org/plugins/woocommerce-ajax-filters/
|
5 |
+
* Description: Advanced product filtering ability for your WooCommerce shop. Add unlimited filters with one widget.
|
6 |
+
* Version: 1.2.3
|
7 |
* Author: BeRocket
|
8 |
* Requires at least: 4.0
|
9 |
* Author URI: http://berocket.com
|
11 |
* Domain Path: /languages/
|
12 |
*/
|
13 |
|
14 |
+
define( "BeRocket_AJAX_filters_version", '1.2.3' );
|
15 |
define( "BeRocket_AJAX_domain", 'BeRocket_AJAX_domain' );
|
16 |
|
17 |
define( "AAPF_TEMPLATE_PATH", plugin_dir_path( __FILE__ ) . "templates/" );
|
28 |
|
29 |
class BeRocket_AAPF {
|
30 |
|
31 |
+
public static $info = array(
|
32 |
+
'id' => 1,
|
33 |
+
'version' => BeRocket_AJAX_filters_version,
|
34 |
+
'plugin' => '',
|
35 |
+
'slug' => '',
|
36 |
+
'key' => '',
|
37 |
+
'name' => ''
|
38 |
+
);
|
39 |
+
|
40 |
public static $defaults = array(
|
41 |
"br_opened_tab" => "general",
|
42 |
"no_products_message" => "There are no products meeting your criteria",
|
109 |
add_action( 'admin_notices', array( __CLASS__, 'no_woocommerce' ) );
|
110 |
}
|
111 |
}
|
112 |
+
add_filter('berocket_admin_notices_subscribe_plugins', array(__CLASS__, 'admin_notices_subscribe_plugins'));
|
113 |
+
}
|
114 |
+
public static function admin_notices_subscribe_plugins($plugins) {
|
115 |
+
$plugins[] = self::$info['id'];
|
116 |
+
return $plugins;
|
117 |
}
|
118 |
public static function is_settings_page($settings_page) {
|
119 |
if( ! empty($_GET['page']) && $_GET['page'] == self::$values[ 'option_page' ] ) {
|
206 |
wp_enqueue_style( 'berocket_aapf_widget-admin-style' );
|
207 |
|
208 |
$plugin_info = get_plugin_data(__FILE__, false, true);
|
209 |
+
$paid_plugin_info = self::$info;
|
210 |
include AAPF_TEMPLATE_PATH . "admin-settings.php";
|
211 |
}
|
212 |
|
481 |
|
482 |
berocket_admin_notices::generate_subscribe_notice();
|
483 |
|
484 |
+
/**
|
485 |
+
* Creating admin notice if it not added already
|
486 |
+
*/
|
487 |
new berocket_admin_notices(array(
|
488 |
'start' => 1505100638, // timestamp when notice start
|
489 |
'end' => 1506816001, // timestamp when notice end
|
490 |
'name' => 'SALE_LABELS', //notice name must be unique for this time period
|
491 |
'html' => 'Only <strong>$9.6</strong> for <strong>Premium</strong> WooCommerce Advanced Product Labels!
|
492 |
+
<a class="berocket_button" href="http://berocket.com/product/woocommerce-advanced-product-labels" target="_blank">Buy Now</a>
|
493 |
+
<span>Get your <strong class="red">60% discount</strong> and save <strong>$14.4</strong> today</span>
|
494 |
+
', //text or html code as content of notice
|
495 |
'righthtml' => '<a class="berocket_no_thanks">No thanks</a>', //content in the right block, this is default value. This html code must be added to all notices
|
496 |
'rightwidth' => 80, //width of right content is static and will be as this value. berocket_no_thanks block is 60px and 20px is additional
|
497 |
'nothankswidth' => 60, //berocket_no_thanks width. set to 0 if block doesn't uses. Or set to any other value if uses other text inside berocket_no_thanks
|
498 |
+
'contentwidth' => 910, //width that uses for mediaquery is image + contentwidth + rightwidth + 210 other elements
|
499 |
'subscribe' => false, //add subscribe form to the righthtml
|
500 |
'priority' => 7, //priority of notice. 1-5 is main priority and displays on settings page always
|
501 |
'height' => 50, //height of notice. image will be scaled
|