Version Description
Download this release
Release Info
Developer | damian-gora |
Plugin | Ajax Search for WooCommerce |
Version | 1.19.0 |
Comparing to | |
See all releases |
Code changes from version 1.18.1 to 1.19.0
- ajax-search-for-woocommerce.php +30 -7
- assets/css/admin-style.css +131 -4
- assets/css/style.css +243 -2
- assets/css/style.min.css +1 -1
- assets/img/admin-troubleshooting-woof.png +0 -0
- assets/img/admin-troubleshooting-woof2.png +0 -0
- assets/js/admin.js +357 -36
- assets/js/admin.min.js +1 -1
- assets/js/search.js +767 -484
- assets/js/search.min.js +1 -1
- fs/lib/config.php +3 -3
- fs/lib/includes/class-freemius.php +1 -1
- fs/lib/includes/managers/class-fs-key-value-storage.php +10 -0
- fs/lib/languages/freemius-ru_RU.mo +0 -0
- fs/lib/start.php +1 -1
- includes/Abstracts/ThemeIntegration.php +58 -21
- includes/Admin/AdminMenu.php +2 -0
- includes/Admin/Install.php +60 -7
- includes/Admin/Promo/Upgrade.php +2 -2
- includes/Admin/SettingsAPI.php +13 -0
- includes/Admin/Troubleshooting.php +97 -17
- includes/Analytics/Analytics.php +1 -1
- includes/Analytics/UserInterface.php +3 -3
- includes/EmbeddingViaMenu.php +10 -9
- includes/Helpers.php +140 -13
- includes/Integrations/Plugins/WooCommercePrivateStore/WooCommercePrivateStore.php +1 -0
- includes/Integrations/Plugins/WooCommerceProductsFilter/WooCommerceProductsFilter.php +26 -23
- includes/Integrations/Solver.php +19 -0
- includes/Integrations/Themes/Astra/Astra.php +0 -23
- includes/Integrations/Themes/Avada/Avada.php +0 -385
- includes/Integrations/Themes/BigCart/BigCart.php +0 -20
- includes/Integrations/Themes/BlockShop/BlockShop.php +0 -97
- includes/Integrations/Themes/Bridge/Bridge.php +0 -97
- includes/Integrations/Themes/CiyaShop/CiyaShop.php +0 -20
- includes/Integrations/Themes/DFDRonneby/DFDRonneby.php +9 -87
- includes/Integrations/Themes/Divi/Divi.php +0 -115
- includes/Integrations/Themes/Ekommart/Ekommart.php +0 -119
- includes/Integrations/Themes/Electro/Electro.php +0 -20
- includes/Integrations/Themes/Enfold/Enfold.php +22 -196
- includes/Integrations/Themes/Estore/Estore.php +0 -20
- includes/Integrations/Themes/EstorePro/EstorePro.php +0 -33
- includes/Integrations/Themes/Flatsome/Flatsome.php +0 -311
- includes/Integrations/Themes/GeneratePress/GeneratePress.php +0 -20
- includes/Integrations/Themes/GenericTheme.php +13 -0
- includes/Integrations/Themes/Goya/Goya.php +0 -20
- includes/Integrations/Themes/Impreza/Impreza.php +12 -172
- includes/Integrations/Themes/Kadence/Kadence.php +0 -20
- includes/Integrations/Themes/Konte/Konte.php +0 -20
- includes/Integrations/Themes/OpenShop/OpenShop.php +0 -20
- includes/Integrations/Themes/OpenShopPro/OpenShopPro.php +0 -33
- includes/Integrations/Themes/Rehub/Rehub.php +0 -20
- includes/Integrations/Themes/Restoration/Restoration.php +30 -125
- includes/Integrations/Themes/Salient/Salient.php +0 -20
- includes/Integrations/Themes/Savoy/Savoy.php +6 -129
- includes/Integrations/Themes/ShopIsle/ShopIsle.php +0 -20
- includes/Integrations/Themes/ShopIslePro/ShopIslePro.php +0 -33
- includes/Integrations/Themes/Shopical/Shopical.php +0 -20
- includes/Integrations/Themes/ShopicalPro/ShopicalPro.php +0 -33
- includes/Integrations/Themes/Shopkeeper/Shopkeeper.php +8 -224
- includes/Integrations/Themes/Sober/Sober.php +0 -126
- includes/Integrations/Themes/Storefront/Storefront.php +13 -99
- includes/Integrations/Themes/Supro/Supro.php +0 -20
- includes/Integrations/Themes/The7/The7.php +17 -115
- includes/Integrations/Themes/TheGem/TheGem.php +31 -217
- includes/Integrations/Themes/TheGemElementor/TheGemElementor.php +0 -19
- includes/Integrations/Themes/TheGemWPBakery/TheGemWPBakery.php +0 -31
- includes/Integrations/Themes/ThemesCompatibility.php +145 -82
- includes/Integrations/Themes/TopStore/TopStore.php +0 -33
- includes/Integrations/Themes/TopStorePro/TopStorePro.php +0 -20
- includes/Integrations/Themes/Uncode/Uncode.php +0 -20
- includes/Integrations/Themes/Woodmart/Woodmart.php +3 -85
- includes/Integrations/Themes/Xstore/Xstore.php +0 -20
- includes/Multilingual.php +1 -1
- includes/Settings.php +132 -48
- includes/Shortcode.php +79 -6
- languages/ajax-search-for-woocommerce-el.mo +0 -0
- languages/ajax-search-for-woocommerce-es_CO.mo +0 -0
- languages/ajax-search-for-woocommerce-es_EC.mo +0 -0
- languages/ajax-search-for-woocommerce-es_ES.mo +0 -0
- languages/ajax-search-for-woocommerce-es_VE.mo +0 -0
- languages/ajax-search-for-woocommerce-fr_FR.mo +0 -0
- languages/ajax-search-for-woocommerce-it_IT.mo +0 -0
- languages/ajax-search-for-woocommerce-ja.mo +0 -0
- languages/ajax-search-for-woocommerce-nl_NL.mo +0 -0
- languages/ajax-search-for-woocommerce-pl_PL.mo +0 -0
- languages/ajax-search-for-woocommerce-pt_BR.mo +0 -0
- languages/ajax-search-for-woocommerce-ru_RU.mo +0 -0
- languages/ajax-search-for-woocommerce-sv_SE.mo +0 -0
- languages/ajax-search-for-woocommerce-vi.mo +0 -0
- languages/ajax-search-for-woocommerce.pot +679 -1756
- partials/admin/debug/body-analytics.php +68 -0
- partials/admin/debug/body-maintenance.php +33 -0
- partials/admin/debug/debug.php +149 -0
- partials/admin/embedding-in-theme.php +11 -7
- partials/admin/features.php +2 -2
- partials/admin/search-preview.php +162 -107
- partials/admin/stats/stats.php +4 -4
- partials/search-form.php +18 -8
- partials/themes/astra.php +6 -165
- partials/themes/astra/builder.php +188 -0
- partials/themes/astra/legacy.php +177 -0
- partials/themes/astra/template/header-cover.php +25 -0
- partials/themes/avada.php +248 -0
- partials/themes/divi.php +9 -0
- partials/themes/ekommart.php +13 -0
- partials/themes/enfold.php +61 -0
- partials/themes/flatsome.php +171 -0
- partials/themes/impreza.php +82 -0
- partials/themes/{restoration.php → restoration-searchform.php} +0 -0
- partials/themes/savoy.php +38 -0
- partials/themes/shopkeeper.php +125 -0
- partials/themes/sober.php +23 -3
- partials/themes/thegem.php +96 -0
- readme.txt +34 -1
- vendor/autoload.php +1 -1
- vendor/composer/ClassLoader.php +139 -12
- vendor/composer/InstalledVersions.php +328 -200
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +20 -21
- widget.php +21 -8
ajax-search-for-woocommerce.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
* Plugin Name: FiboSearch - AJAX Search for WooCommerce
|
5 |
* Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
|
6 |
* Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
|
7 |
-
* Version: 1.
|
8 |
* Author: FiboSearch Team
|
9 |
* Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
|
10 |
* Text Domain: ajax-search-for-woocommerce
|
11 |
* Domain Path: /languages
|
12 |
* WC requires at least: 5.5
|
13 |
-
* WC tested up to: 6.
|
14 |
*
|
15 |
*/
|
16 |
// Exit if accessed directly
|
@@ -49,8 +49,6 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
|
|
49 |
* @var \DgoraWcas\Engines\WordPressNative\Search
|
50 |
*/
|
51 |
public $nativeSearch ;
|
52 |
-
public $tntsearch ;
|
53 |
-
public $tntsearchValid = false ;
|
54 |
/**
|
55 |
* @var \DgoraWcas\Engines\TNTSearchMySQL\TNTSearch
|
56 |
*/
|
@@ -149,6 +147,12 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
|
|
149 |
return false;
|
150 |
}
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
return true;
|
153 |
}
|
154 |
|
@@ -192,6 +196,24 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
|
|
192 |
<?php
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
/**
|
196 |
* Setup plugin constants
|
197 |
*
|
@@ -237,9 +259,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
|
|
237 |
*/
|
238 |
public function autoload()
|
239 |
{
|
240 |
-
|
241 |
-
require_once DGWT_WCAS_DIR . 'vendor/autoload.php';
|
242 |
-
}
|
243 |
require_once DGWT_WCAS_DIR . 'widget.php';
|
244 |
}
|
245 |
|
@@ -323,6 +343,9 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
|
|
323 |
if ( \DgoraWcas\Helpers::isCheckoutPage() ) {
|
324 |
wp_enqueue_style( 'dgwt-wcas-admin-style' );
|
325 |
}
|
|
|
|
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
4 |
* Plugin Name: FiboSearch - AJAX Search for WooCommerce
|
5 |
* Plugin URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
|
6 |
* Description: The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions.
|
7 |
+
* Version: 1.19.0
|
8 |
* Author: FiboSearch Team
|
9 |
* Author URI: https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
|
10 |
* Text Domain: ajax-search-for-woocommerce
|
11 |
* Domain Path: /languages
|
12 |
* WC requires at least: 5.5
|
13 |
+
* WC tested up to: 6.8
|
14 |
*
|
15 |
*/
|
16 |
// Exit if accessed directly
|
49 |
* @var \DgoraWcas\Engines\WordPressNative\Search
|
50 |
*/
|
51 |
public $nativeSearch ;
|
|
|
|
|
52 |
/**
|
53 |
* @var \DgoraWcas\Engines\TNTSearchMySQL\TNTSearch
|
54 |
*/
|
147 |
return false;
|
148 |
}
|
149 |
|
150 |
+
|
151 |
+
if ( !file_exists( DGWT_WCAS_DIR . 'vendor/autoload.php' ) ) {
|
152 |
+
add_action( 'admin_notices', array( $this, 'adminNoticeNoVendor' ) );
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
|
156 |
return true;
|
157 |
}
|
158 |
|
196 |
<?php
|
197 |
}
|
198 |
|
199 |
+
/**
|
200 |
+
* Notice: requires /vendor
|
201 |
+
*
|
202 |
+
* @return void
|
203 |
+
*/
|
204 |
+
public function adminNoticeNoVendor()
|
205 |
+
{
|
206 |
+
?>
|
207 |
+
<div class="notice notice-error dgwt-wcas-notice">
|
208 |
+
<p>
|
209 |
+
<?php
|
210 |
+
printf( __( '%s is enabled but not effective. It is missing core files. Please reinstall the plugin.', 'ajax-search-for-woocommerce' ), '<b>' . DGWT_WCAS_FULL_NAME . '</b>' );
|
211 |
+
?>
|
212 |
+
</p>
|
213 |
+
</div>
|
214 |
+
<?php
|
215 |
+
}
|
216 |
+
|
217 |
/**
|
218 |
* Setup plugin constants
|
219 |
*
|
259 |
*/
|
260 |
public function autoload()
|
261 |
{
|
262 |
+
require_once DGWT_WCAS_DIR . 'vendor/autoload.php';
|
|
|
|
|
263 |
require_once DGWT_WCAS_DIR . 'widget.php';
|
264 |
}
|
265 |
|
343 |
if ( \DgoraWcas\Helpers::isCheckoutPage() ) {
|
344 |
wp_enqueue_style( 'dgwt-wcas-admin-style' );
|
345 |
}
|
346 |
+
if ( \DgoraWcas\Helpers::isDebugPage() ) {
|
347 |
+
wp_enqueue_style( 'dgwt-wcas-admin-style' );
|
348 |
+
}
|
349 |
}
|
350 |
|
351 |
/**
|
assets/css/admin-style.css
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
}
|
5 |
|
6 |
.dgwt-wcas-hidden {
|
7 |
-
display: none;
|
8 |
}
|
9 |
|
10 |
.dgwt-wcas-font-thin {
|
@@ -63,7 +63,7 @@
|
|
63 |
|
64 |
.dgwt_wcas_settings-group .form-table th {
|
65 |
vertical-align: middle;
|
66 |
-
min-width:
|
67 |
}
|
68 |
|
69 |
.dgwt_wcas_settings-group .form-table td fieldset {
|
@@ -324,6 +324,47 @@
|
|
324 |
color: #bbb;
|
325 |
}
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
.dgwt-wcas-settings-synonyms textarea.regular-text {
|
328 |
min-height: 200px;
|
329 |
width: 35em;
|
@@ -350,6 +391,17 @@
|
|
350 |
margin-right: 5px;
|
351 |
}
|
352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
.dgwt_wcas_settings-group .form-table td {
|
354 |
margin-bottom: 0;
|
355 |
}
|
@@ -461,7 +513,8 @@ table.widefat.dgwt-wcas-analytics-table {
|
|
461 |
justify-content: flex-start;
|
462 |
align-items: center;
|
463 |
}
|
464 |
-
|
|
|
465 |
color: #0f5132;
|
466 |
}
|
467 |
|
@@ -1216,6 +1269,31 @@ td.dgwt-wcas-indexing-details-row a {
|
|
1216 |
|
1217 |
}
|
1218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1219 |
.dgwt-wcas-requirements {
|
1220 |
margin-right: 20px;
|
1221 |
}
|
@@ -1302,7 +1380,12 @@ td.dgwt-wcas-indexing-details-row a {
|
|
1302 |
.dgwt-wcas-preview {
|
1303 |
display: none;
|
1304 |
width: 100%;
|
1305 |
-
|
|
|
|
|
|
|
|
|
|
|
1306 |
}
|
1307 |
|
1308 |
[data-dgwt-wcas-active="form_body"] .dgwt-wcas-preview,
|
@@ -1436,6 +1519,44 @@ td.dgwt-wcas-indexing-details-row a {
|
|
1436 |
width: 38px;
|
1437 |
}
|
1438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1439 |
@media only screen and (max-width: 782px) {
|
1440 |
.dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .metabox-holder,
|
1441 |
.dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .metabox-holder {
|
@@ -1566,6 +1687,7 @@ td.dgwt-wcas-indexing-details-row a {
|
|
1566 |
|
1567 |
.dgwt-wcas-tooltip-inner {
|
1568 |
max-width: 280px;
|
|
|
1569 |
line-height: 158%;
|
1570 |
font-size: 14px;
|
1571 |
padding: 10px 15px;
|
@@ -1960,6 +2082,11 @@ h3.dgwt-wcas-troubleshooting-issue-title {
|
|
1960 |
width: 110px
|
1961 |
}
|
1962 |
|
|
|
|
|
|
|
|
|
|
|
1963 |
.dgwt-wcas-analytics-module-critical-body {
|
1964 |
display: flex;
|
1965 |
justify-content: flex-start;
|
4 |
}
|
5 |
|
6 |
.dgwt-wcas-hidden {
|
7 |
+
display: none!important;
|
8 |
}
|
9 |
|
10 |
.dgwt-wcas-font-thin {
|
63 |
|
64 |
.dgwt_wcas_settings-group .form-table th {
|
65 |
vertical-align: middle;
|
66 |
+
min-width: 210px;
|
67 |
}
|
68 |
|
69 |
.dgwt_wcas_settings-group .form-table td fieldset {
|
324 |
color: #bbb;
|
325 |
}
|
326 |
|
327 |
+
.dgwt-wcas-settings-suboption {
|
328 |
+
|
329 |
+
}
|
330 |
+
|
331 |
+
.dgwt-wcas-settings-suboption label {
|
332 |
+
padding-left: 34px;
|
333 |
+
position: relative;
|
334 |
+
font-size: 90%;
|
335 |
+
}
|
336 |
+
|
337 |
+
.dgwt_wcas_settings-group .form-table > tbody > tr.dgwt-wcas-settings-suboption > th,
|
338 |
+
.dgwt_wcas_settings-group .form-table > tbody > tr.dgwt-wcas-settings-suboption > td {
|
339 |
+
padding-top: 0;
|
340 |
+
}
|
341 |
+
.dgwt-wcas-settings-suboption th label:before{
|
342 |
+
content: "\f474";
|
343 |
+
position: absolute;
|
344 |
+
color: #676767;
|
345 |
+
left: 7px;
|
346 |
+
top: -2px;
|
347 |
+
display: block;
|
348 |
+
transform: scaleX(-1);
|
349 |
+
font-family: dashicons;
|
350 |
+
display: inline-block;
|
351 |
+
line-height: 1;
|
352 |
+
font-weight: 400;
|
353 |
+
font-style: normal;
|
354 |
+
speak: never;
|
355 |
+
text-decoration: inherit;
|
356 |
+
text-transform: none;
|
357 |
+
text-rendering: auto;
|
358 |
+
-webkit-font-smoothing: antialiased;
|
359 |
+
-moz-osx-font-smoothing: grayscale;
|
360 |
+
width: 20px;
|
361 |
+
height: 20px;
|
362 |
+
font-size: 20px;
|
363 |
+
vertical-align: top;
|
364 |
+
text-align: center;
|
365 |
+
transition: color 0.1s ease-in;
|
366 |
+
}
|
367 |
+
|
368 |
.dgwt-wcas-settings-synonyms textarea.regular-text {
|
369 |
min-height: 200px;
|
370 |
width: 35em;
|
391 |
margin-right: 5px;
|
392 |
}
|
393 |
|
394 |
+
.dgwt-wcas-preview .dgwt-wcas-style-solaris .dgwt-wcas-preloader.dgwt-wcas-close {
|
395 |
+
right: 10px;
|
396 |
+
}
|
397 |
+
|
398 |
+
.dgwt-wcas-preview .dgwt-wcas-style-pirx .dgwt-wcas-preloader.dgwt-wcas-close {
|
399 |
+
right: 33px;
|
400 |
+
}
|
401 |
+
.dgwt-wcas-preview .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
402 |
+
transition: all 150ms ease-in-out;
|
403 |
+
}
|
404 |
+
|
405 |
.dgwt_wcas_settings-group .form-table td {
|
406 |
margin-bottom: 0;
|
407 |
}
|
513 |
justify-content: flex-start;
|
514 |
align-items: center;
|
515 |
}
|
516 |
+
|
517 |
+
.dgwt-wcas-analytics-btn-mark .dashicons {
|
518 |
color: #0f5132;
|
519 |
}
|
520 |
|
1269 |
|
1270 |
}
|
1271 |
|
1272 |
+
.dgwt-wcas-indexing-notices {
|
1273 |
+
margin-bottom: 10px;
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
.dgwt-wcas-indexing-notice {
|
1277 |
+
display: flex;
|
1278 |
+
border: 1px solid #e8e8e8;
|
1279 |
+
padding: 6px 10px;
|
1280 |
+
align-items: center;
|
1281 |
+
margin-bottom: 15px;
|
1282 |
+
line-height: 130%;
|
1283 |
+
background: #fff;
|
1284 |
+
}
|
1285 |
+
|
1286 |
+
.dgwt-wcas-indexing-notice .dashicons {
|
1287 |
+
margin-right: 10px;
|
1288 |
+
width: 25px;
|
1289 |
+
height: 25px;
|
1290 |
+
font-size: 25px;
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
.dgwt-wcas-indexing-notice--info .dashicons {
|
1294 |
+
color: #999;
|
1295 |
+
}
|
1296 |
+
|
1297 |
.dgwt-wcas-requirements {
|
1298 |
margin-right: 20px;
|
1299 |
}
|
1380 |
.dgwt-wcas-preview {
|
1381 |
display: none;
|
1382 |
width: 100%;
|
1383 |
+
position: relative;
|
1384 |
+
}
|
1385 |
+
.dgwt-wcas-preview-inner {
|
1386 |
+
position: absolute;
|
1387 |
+
top: 0;
|
1388 |
+
left: 0;
|
1389 |
}
|
1390 |
|
1391 |
[data-dgwt-wcas-active="form_body"] .dgwt-wcas-preview,
|
1519 |
width: 38px;
|
1520 |
}
|
1521 |
|
1522 |
+
.dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .dgwt-wcas-preview-device-info,
|
1523 |
+
.dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .js-dgwt-wcas-preview-icon-example {
|
1524 |
+
display: none;
|
1525 |
+
}
|
1526 |
+
.dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .js-dgwt-wcas-preview-bar-example {
|
1527 |
+
display: block!important;
|
1528 |
+
}
|
1529 |
+
|
1530 |
+
.dgwt-wcas-preview-source .dgwt-wcas-search-icon {
|
1531 |
+
text-align: center;
|
1532 |
+
margin: 0 auto;
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
.js-dgwt-wcas-preview-icon-example.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
|
1536 |
+
left: 107px;
|
1537 |
+
top: 22px;
|
1538 |
+
z-index: 0;
|
1539 |
+
}
|
1540 |
+
.js-dgwt-wcas-preview-icon-example .dgwt-wcas-search-form {
|
1541 |
+
margin-top: 10px;
|
1542 |
+
}
|
1543 |
+
|
1544 |
+
.dgwt-wcas-preview-device-info {
|
1545 |
+
display: block;
|
1546 |
+
text-align: center;
|
1547 |
+
margin-bottom: 12px;
|
1548 |
+
color: #aaa;
|
1549 |
+
font-size: 19px;
|
1550 |
+
font-weight: 100;
|
1551 |
+
}
|
1552 |
+
.dgwt-wcas-preview-source .dgwt-wcas-preview-device-info:nth-of-type(2) {
|
1553 |
+
margin-top: 35px;
|
1554 |
+
}
|
1555 |
+
.dgwt-wcas-preview-icon-only .dgwt-wcas-search-icon {
|
1556 |
+
margin-left: 106px;
|
1557 |
+
margin-right: 0;
|
1558 |
+
}
|
1559 |
+
|
1560 |
@media only screen and (max-width: 782px) {
|
1561 |
.dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .metabox-holder,
|
1562 |
.dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .metabox-holder {
|
1687 |
|
1688 |
.dgwt-wcas-tooltip-inner {
|
1689 |
max-width: 280px;
|
1690 |
+
min-width: 150px;
|
1691 |
line-height: 158%;
|
1692 |
font-size: 14px;
|
1693 |
padding: 10px 15px;
|
2082 |
width: 110px
|
2083 |
}
|
2084 |
|
2085 |
+
.dgwt-wcas-analytics-module-table .dgwt-wcas-analytics-subtitle {
|
2086 |
+
min-height: 68px;
|
2087 |
+
margin-bottom: 0;
|
2088 |
+
}
|
2089 |
+
|
2090 |
.dgwt-wcas-analytics-module-critical-body {
|
2091 |
display: flex;
|
2092 |
justify-content: flex-start;
|
assets/css/style.css
CHANGED
@@ -799,11 +799,56 @@ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
|
|
799 |
background-size: auto 44%;
|
800 |
}
|
801 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
.rtl .dgwt-wcas-preloader {
|
803 |
right: auto;
|
804 |
left: 5px;
|
805 |
}
|
806 |
|
|
|
|
|
|
|
|
|
|
|
807 |
.dgwt-wcas-inner-preloader {
|
808 |
background-repeat: no-repeat;
|
809 |
background-position: right 8px center;
|
@@ -1514,7 +1559,8 @@ body .dgwt-wcas-content-wrapp .rood {
|
|
1514 |
min-width: unset;
|
1515 |
}
|
1516 |
|
1517 |
-
.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form
|
|
|
1518 |
opacity: 0;
|
1519 |
}
|
1520 |
|
@@ -1589,7 +1635,9 @@ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-
|
|
1589 |
}
|
1590 |
|
1591 |
.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,
|
1592 |
-
.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow
|
|
|
|
|
1593 |
display: none;
|
1594 |
}
|
1595 |
|
@@ -1657,3 +1705,196 @@ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-
|
|
1657 |
border: none;
|
1658 |
border-radius: 0;
|
1659 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
background-size: auto 44%;
|
800 |
}
|
801 |
|
802 |
+
.dgwt-wcas-voice-search {
|
803 |
+
position: absolute;
|
804 |
+
right: 0;
|
805 |
+
top: 0;
|
806 |
+
height: 100%;
|
807 |
+
width: 40px;
|
808 |
+
z-index: 1;
|
809 |
+
opacity: 0.5;
|
810 |
+
cursor: pointer;
|
811 |
+
align-items: center;
|
812 |
+
justify-content: center;
|
813 |
+
display: none;
|
814 |
+
-webkit-transition: all 160ms ease-in-out;
|
815 |
+
-moz-transition: all 160ms ease-in-out;
|
816 |
+
-ms-transition: all 160ms ease-in-out;
|
817 |
+
-o-transition: all 160ms ease-in-out;
|
818 |
+
transition: all 160ms ease-in-out;
|
819 |
+
}
|
820 |
+
|
821 |
+
.dgwt-wcas-voice-search:hover {
|
822 |
+
opacity: 0.3;
|
823 |
+
}
|
824 |
+
|
825 |
+
.dgwt-wcas-voice-search-supported .dgwt-wcas-voice-search {
|
826 |
+
display: flex;
|
827 |
+
}
|
828 |
+
|
829 |
+
.dgwt-wcas-voice-search-supported .dgwt-wcas-preloader {
|
830 |
+
right: 40px;
|
831 |
+
}
|
832 |
+
|
833 |
+
.rtl .dgwt-wcas-voice-search {
|
834 |
+
right: auto;
|
835 |
+
left: 5px;
|
836 |
+
}
|
837 |
+
|
838 |
+
.dgwt-wcas-mobile-overlay-trigger-active .dgwt-wcas-voice-search {
|
839 |
+
z-index: 105;
|
840 |
+
}
|
841 |
+
|
842 |
.rtl .dgwt-wcas-preloader {
|
843 |
right: auto;
|
844 |
left: 5px;
|
845 |
}
|
846 |
|
847 |
+
.rtl .dgwt-wcas-voice-search-supported .dgwt-wcas-preloader {
|
848 |
+
right: auto;
|
849 |
+
left: 45px;
|
850 |
+
}
|
851 |
+
|
852 |
.dgwt-wcas-inner-preloader {
|
853 |
background-repeat: no-repeat;
|
854 |
background-position: right 8px center;
|
1559 |
min-width: unset;
|
1560 |
}
|
1561 |
|
1562 |
+
.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form,
|
1563 |
+
.dgwt-wcas-layout-icon-flexible-inv .dgwt-wcas-search-form{
|
1564 |
opacity: 0;
|
1565 |
}
|
1566 |
|
1635 |
}
|
1636 |
|
1637 |
.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,
|
1638 |
+
.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow,
|
1639 |
+
.dgwt-wcas-layout-icon-flexible-inv:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,
|
1640 |
+
.dgwt-wcas-layout-icon-flexible-inv:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow {
|
1641 |
display: none;
|
1642 |
}
|
1643 |
|
1705 |
border: none;
|
1706 |
border-radius: 0;
|
1707 |
}
|
1708 |
+
|
1709 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
|
1710 |
+
background: #fff;
|
1711 |
+
padding: 10px;
|
1712 |
+
border-radius: 10px;
|
1713 |
+
}
|
1714 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp {
|
1715 |
+
padding-top: 0;
|
1716 |
+
padding-bottom: 0;
|
1717 |
+
}
|
1718 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1719 |
+
padding: 13px 24px 13px 48px;
|
1720 |
+
line-height: 24px;
|
1721 |
+
font-size: 17px;
|
1722 |
+
border: none;
|
1723 |
+
border-radius: 30px;
|
1724 |
+
height: auto;
|
1725 |
+
font-family: Roboto, sans-serif;
|
1726 |
+
background-color: #eee;
|
1727 |
+
border: 2px solid transparent;
|
1728 |
+
}
|
1729 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus {
|
1730 |
+
box-shadow: none;
|
1731 |
+
transition: all 30ms ease-in;
|
1732 |
+
}
|
1733 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:hover {
|
1734 |
+
background-color: #dfdfdf;
|
1735 |
+
}
|
1736 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp.dgwt-wcas-search-focused input[type="search"].dgwt-wcas-search-input:hover {
|
1737 |
+
background-color: #fff;
|
1738 |
+
}
|
1739 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1740 |
+
border-color: #333;
|
1741 |
+
}
|
1742 |
+
.dgwt-wcas-open .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1743 |
+
border-radius: 30px;
|
1744 |
+
}
|
1745 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
|
1746 |
+
background: transparent;
|
1747 |
+
border-radius: 100%;
|
1748 |
+
display: flex;
|
1749 |
+
align-items: center;
|
1750 |
+
justify-content: center;
|
1751 |
+
padding: 0;
|
1752 |
+
margin: 0;
|
1753 |
+
position: absolute;
|
1754 |
+
min-height: 33px;
|
1755 |
+
min-width: 33px;
|
1756 |
+
height: 33px;
|
1757 |
+
width: 33px;
|
1758 |
+
left: 23px;
|
1759 |
+
top: 21px;
|
1760 |
+
pointer-events: none;
|
1761 |
+
transition: none;
|
1762 |
+
}
|
1763 |
+
|
1764 |
+
.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
|
1765 |
+
display: none;
|
1766 |
+
}
|
1767 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg {
|
1768 |
+
width: 18px;
|
1769 |
+
height: 18px;
|
1770 |
+
}
|
1771 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
|
1772 |
+
left: auto;
|
1773 |
+
right: 28px;
|
1774 |
+
pointer-events: auto;
|
1775 |
+
animation: fadeIn 300ms;
|
1776 |
+
}
|
1777 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1778 |
+
padding-left: 24px;
|
1779 |
+
padding-right: 48px;
|
1780 |
+
transition: none !important;
|
1781 |
+
}
|
1782 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
|
1783 |
+
opacity: 1;
|
1784 |
+
}
|
1785 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
|
1786 |
+
background: #e4e4e4;
|
1787 |
+
box-shadow: 0 0 0 2px #e4e4e4;
|
1788 |
+
border-radius: 100%;
|
1789 |
+
}
|
1790 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:before {
|
1791 |
+
display: none;
|
1792 |
+
}
|
1793 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-preloader {
|
1794 |
+
margin-right: 35px;
|
1795 |
+
}
|
1796 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) {
|
1797 |
+
transition: none;
|
1798 |
+
width: 18px;
|
1799 |
+
}
|
1800 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) path {
|
1801 |
+
fill: #111;
|
1802 |
+
}
|
1803 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
|
1804 |
+
fill: #111;
|
1805 |
+
}
|
1806 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
|
1807 |
+
opacity: 1;
|
1808 |
+
font-style: normal;
|
1809 |
+
font-weight: 300;
|
1810 |
+
color: #777;
|
1811 |
+
}
|
1812 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-wrapp,
|
1813 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp {
|
1814 |
+
border-color: #fff;
|
1815 |
+
padding-top: 10px;
|
1816 |
+
padding-bottom: 10px;
|
1817 |
+
}
|
1818 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-inner,
|
1819 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp > .dgwt-wcas-suggestion {
|
1820 |
+
padding-left: 20px;
|
1821 |
+
padding-right: 20px;
|
1822 |
+
}
|
1823 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp > .dgwt-wcas-suggestion {
|
1824 |
+
border-right: 1px solid #ddd;
|
1825 |
+
}
|
1826 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp,
|
1827 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
|
1828 |
+
margin-top: 0;
|
1829 |
+
border-top: none;
|
1830 |
+
}
|
1831 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp,
|
1832 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
|
1833 |
+
margin-top: 0;
|
1834 |
+
border-top: none;
|
1835 |
+
}
|
1836 |
+
.dgwt-wcas-open-pirx body.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp {
|
1837 |
+
border-right: none;
|
1838 |
+
}
|
1839 |
+
.dgwt-wcas-open-pirx body.dgwt-wcas-details-right .dgwt-wcas-details-wrapp {
|
1840 |
+
border-left: 1px solid #ddd;
|
1841 |
+
}
|
1842 |
+
.dgwt-wcas-open-pirx body.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{
|
1843 |
+
border-left: none;
|
1844 |
+
}
|
1845 |
+
.dgwt-wcas-open-pirx body.dgwt-wcas-details-left .dgwt-wcas-details-wrapp {
|
1846 |
+
border-right: 1px solid #ddd;
|
1847 |
+
}
|
1848 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,
|
1849 |
+
.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
|
1850 |
+
min-height: 70px !important;
|
1851 |
+
}
|
1852 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1853 |
+
border-radius: 0;
|
1854 |
+
background: transparent;
|
1855 |
+
padding: 0 10px;
|
1856 |
+
}
|
1857 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1858 |
+
border-color: transparent;
|
1859 |
+
}
|
1860 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
1861 |
+
padding-left: 10px;
|
1862 |
+
}
|
1863 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:hover {
|
1864 |
+
background-color: transparent;
|
1865 |
+
}
|
1866 |
+
.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
|
1867 |
+
border-top: 1px solid #e0e2e5;
|
1868 |
+
}
|
1869 |
+
.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return {
|
1870 |
+
background: #fff;
|
1871 |
+
}
|
1872 |
+
.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return svg {
|
1873 |
+
left: 17px;
|
1874 |
+
top: 16px;
|
1875 |
+
width: 17px;
|
1876 |
+
height: 17px;
|
1877 |
+
}
|
1878 |
+
.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return path {
|
1879 |
+
fill: #111;
|
1880 |
+
}
|
1881 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-voice-search {
|
1882 |
+
right: 15px;
|
1883 |
+
top: 2px;
|
1884 |
+
opacity: 1;
|
1885 |
+
}
|
1886 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-voice-search:hover {
|
1887 |
+
opacity: 0.3;
|
1888 |
+
}
|
1889 |
+
.dgwt-wcas-style-pirx .dgwt-wcas-voice-search svg path{
|
1890 |
+
fill: #111;
|
1891 |
+
}
|
1892 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-search-filled.dgwt-wcas-voice-search-supported .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
|
1893 |
+
right: 47px;
|
1894 |
+
}
|
1895 |
+
.dgwt-wcas-style-pirx.dgwt-wcas-voice-search-supported .dgwt-wcas-preloader {
|
1896 |
+
margin-right: 50px;
|
1897 |
+
}
|
1898 |
+
.dgwt-wcas-suggestions-wrapp-fixed {
|
1899 |
+
position: fixed !important;
|
1900 |
+
}
|
assets/css/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;line-height:100%;display:block;color:#444;min-width:230px;width:100%;text-align:left;margin:0 auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-tpd-image img{margin:0 15px 0 0!important;display:block}.rtl .dgwt-wcas-tpd-image img{margin:0 0 0 15px!important}.dgwt-wcas-preloader-wrapp img{margin:10px auto 0 auto;display:block;max-width:200px}.dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader{display:block;width:100%;height:auto;max-width:300px;margin:0}.dgwt-wcas-suggestions-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.dgwt-wcas-details-wrapp *,.dgwt-wcas-search-wrapp *,.dgwt-wcas-suggestions-wrapp *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-details-wrapp a:focus,.dgwt-wcas-suggestions-wrapp a:focus{outline:0}.dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top{border:1px solid #ddd;border-bottom:none}.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:550px}.dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion{padding:8px 15px}.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0;border-left-color:#eee}.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px;border-right-color:#eee}.dgwt-wcas-suggestion{cursor:pointer;font-size:12px;line-height:110%;text-align:left;padding:7px 10px;position:relative;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:row;justify-content:space-between;align-items:center;resize:vertical;width:100%}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{justify-content:center;color:#6d6d6d}a.dgwt-wcas-details-more-products{padding:15px 0 10px 0;display:block;border-top:1px solid #eee;text-align:center;font-size:12px;text-transform:uppercase;color:#6d6d6d;transition:all .2s ease-in-out}a.dgwt-wcas-details-more-products:hover{text-decoration:underline}a.dgwt-wcas-product-details-readmore{display:block;text-align:right;margin-top:15px;color:#6d6d6d;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-size:12px}a.dgwt-wcas-product-details-readmore:hover{text-decoration:underline}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom{border-bottom:none}.dgwt-wcas-suggestion:after{clear:both;display:block;content:''}.dgwt-wcas-suggestion.dgwt-wcas-nores{cursor:default;opacity:.5}.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{padding-top:8px;padding-bottom:8px;min-height:60px}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{min-height:30px;text-transform:uppercase}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more{padding:0 10px;text-align:center}.dgwt-wcas-st{display:block;color:#444;font-size:15px;width:100%;line-height:110%}.dgwt-wcas-st>span{display:inline-block;vertical-align:middle}.dgwt-wcas-has-sku .dgwt-wcas-st-title{margin-right:6px}.dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:block;font-style:italic;font-size:10px;text-transform:uppercase;opacity:.4;line-height:10px;margin-bottom:1px;letter-spacing:2px}.dgwt-wcas-st-breadcrumbs{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:80%;text-align:left;opacity:.6;width:100%;padding-right:10px}.rtl .dgwt-wcas-st-breadcrumbs{padding-right:0;padding-left:10px;text-align:right}.dgwt-wcas-sku{font-size:80%}.dgwt-wcas-si{width:50px;display:block;height:100%}.dgwt-wcas-si img{background:#fff none repeat scroll 0 0;border:1px solid #e8e8e8;border-radius:3px;display:block;margin:auto;padding:2px;height:auto;width:auto;max-height:90%;max-width:100%}.dgwt-wcas-content-wrapp{display:flex;height:100%;width:100%;justify-content:space-between;align-items:center;resize:vertical;padding-left:10px}.rtl .dgwt-wcas-content-wrapp{padding-left:0;padding-right:10px}.dgwt-wcas-sp{color:#555;font-size:14px;line-height:120%;text-align:right;line-height:4px;padding-left:10px}.dgwt-wcas-sp *{line-height:130%}.dgwt-wcas-search-form{margin:0;padding:0;width:100%}.dgwt-wcas-sp del{opacity:.5;font-size:12px}.dgwt-wcas-sd{color:#777;display:block;line-height:14px;width:100%;margin-top:5px;font-size:.8em}.dgwt-wcas-vendor-city{margin-left:5px;font-size:.8em}.dgwt-wcas-st>.dgwt-wcas-product-vendor{font-size:12px;margin-top:5px;display:block}.dgwt-wcas-suggestion-selected{background-color:#eee}.dgwt-wcas-suggestion-selected:first-child{border-top:none}.rtl .dgwt-wcas-suggestion{padding-left:0;padding-right:15px;text-align:right}.dgwt-wcas-details-wrapp{background:#fff none repeat scroll 0 0;border:1px solid #ddd;border-top:none;border-left:none;padding:0;width:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:100;min-height:340px}.rtl .dgwt-wcas-details-wrapp{border-left:1px solid #ddd;border-right:none}.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-right .dgwt-wcas-details-wrapp{border-left:none;border-right:1px solid #ddd;border-radius:0 5px 5px 0}.dgwt-wcas-details-left .dgwt-wcas-details-wrapp{border-right:none;border-left:1px solid #ddd;border-radius:5px 0 0 5px}.dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp{display:none}.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px 0}.rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-details-inner{display:none}.dgwt-wcas-details-inner.dgwt-wcas-details-inner-active{display:block}.dgwt-wcas-details-inner-taxonomy{margin-top:11px}.woocommerce .dgwt-wcas-pd-rating .star-rating{float:left;margin-right:5px;font-size:12px;color:#ccae72}.rtl .dgwt-wcas-pd-rating .star-rating{float:right;margin-left:5px;margin-right:0}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin-bottom:15px;padding-bottom:5px;font-size:14px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;color:#202020;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;color:#202020;text-transform:uppercase;letter-spacing:-1px;margin:0}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.dgwt-wcas-tax-product-details{text-decoration:none;display:flex;align-items:center;justify-content:left;transition:all .2s ease-in-out;padding:5px;margin:0 -5px 15px -5px}.dgwt-wcas-tax-product-details:after{content:'';clear:both;display:block}.dgwt-wcas-tax-product-details:hover{box-shadow:0 0 11px 2px rgba(0,0,0,.05)}.rtl .dgwt-wcas-tax-product-details{justify-content:right}.dgwt-wcas-details-wrapp .dgwt-wcas-pd-title{margin-bottom:8px}.dgwt-wcas-tpd-image{width:60px;margin-right:15px}.dgwt-wcas-pd-rest .product-title{display:block;line-height:100%;font-weight:500;margin-bottom:5px}.dgwt-wcas-tpd-rest{max-width:200px}.dgwt-wcas-tpd-rest-title{display:block;line-height:125%;font-size:14px;font-weight:500;letter-spacing:0;margin:0 0 8px;overflow:hidden;color:#000}.dgwt-wcas-suggestion-nores{pointer-events:none;opacity:.45}.dgwt-wcas-pd-price,.dgwt-wcas-tpd-price{font-size:14px;line-height:120%;overflow:hidden;color:#000;margin-top:15px;font-weight:700;font-size:18px}.dgwt-wcas-tpd-price{font-size:12px;color:#777}.dgwt-wcas-pd-price .woocommerce-price-suffix,.dgwt-wcas-tpd-price .woocommerce-price-suffix{font-size:12px;font-weight:lighter;color:#999;margin-left:4px;display:inline-block}.dgwt-wcas-pd-price del .amount,.dgwt-wcas-tpd-price del .amount{font-weight:lighter;background:0 0;font-size:90%;opacity:.6}.dgwt-wcas-pd-price ins,.dgwt-wcas-tpd-price ins{background:0 0;text-decoration:none}.dgwt-wcas-pd-rating{font-size:13px;line-height:13px}.dgwt-wcas-pd-rating:after{content:'';clear:both;display:block}.dgwt-wcas-pd-review{color:#777;font-size:11px;line-height:11px}.dgwt-wcas-datails-title{border-bottom:1px dashed #eee;display:block;margin:5px 0 15px 0;padding-bottom:5px}.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;margin-bottom:15px;padding-bottom:5px;display:block;text-decoration:none}.dgwt-wcas-pd-title .product-title{font-weight:900;text-transform:uppercase;letter-spacing:-1px}.dgwt-wcas-details-title-tax{text-transform:uppercase;font-weight:900;letter-spacing:-1px;margin-right:3px}.rtl .dgwt-wcas-details-title-tax{margin:0 0 0 3px;float:right}.dgwt-wcas-tpd-image{width:70px;padding:4px;background-color:#fff;border:1px solid #e8e8e8;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.dgwt-wcas-details-space{padding:0 15px 15px 15px}.dgwt-wcas-details-main-image{border-bottom:1px solid #eee;min-height:200px;display:flex}.dgwt-wcas-details-main-image img{width:auto;height:auto;display:block;max-height:250px;max-width:100%;margin:0 auto;padding:0;border:none;align-self:center}.dgwt-wcas-details-right .dgwt-wcas-details-main-image img{border-radius:0 3px 0 0}.dgwt-wcas-details-left .dgwt-wcas-details-main-image img{border-radius:3px 0 0 0}a.dgwt-wcas-details-post-title,a.dgwt-wcas-details-product-title{color:#333;display:block;line-height:120%;margin:10px 0 0 0;font-size:21px;font-weight:400;text-decoration:none;text-transform:none}a.dgwt-wcas-details-post-title:hover,a.dgwt-wcas-details-product-title:hover{text-decoration:underline}a.dgwt-wcas-details-post-title{margin-bottom:15px}.dgwt-wcas-details-product-sku{display:block;font-size:12px;line-height:110%;color:#999}.dgwt-wcas-tpd-image img{display:block;max-width:100%;width:100%;height:auto}.dgwt-wcas-details-hr{height:1px;width:100%;border-bottom:1px solid #eee;margin:15px 0}.rtl .dgwt-wcas-tpd-image{float:right;margin-right:0;margin-left:15px}.rtl .dgwt-wcas-tpd-rest{float:right;max-width:190px}.rtl input[type=search].dgwt-wcas-search-input{text-align:right}input[type=search].dgwt-wcas-search-input,input[type=text].dgwt-cas-search-input{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;-webkit-box-shadow:none;box-shadow:none;margin:0;-webkit-appearance:textfield;text-align:left}[type=search].dgwt-wcas-search-input::-ms-clear{display:none}[type=search].dgwt-wcas-search-input::-webkit-search-decoration{-webkit-appearance:none}[type=search].dgwt-wcas-search-input::-webkit-search-cancel-button{display:none}.dgwt-wcas-details-desc{font-size:13px;line-height:157%}.dgwt-wcas-details-desc b,.dgwt-wcas-details-desc strong{font-weight:400;color:#000;margin:0;padding:0}.dgwt-wcas-pd-addtc-form{margin:10px 0;display:flex;align-items:center;justify-content:flex-end}.dgwt-wcas-pd-addtc-form>.quantity{margin-right:10px}.dgwt-wcas-pd-addtc-form .add_to_cart_inline,.dgwt-wcas-pd-addtc-form .quantity input.qty{margin-bottom:0;margin-top:0}.dgwt-wcas-stock{display:block;text-align:right;font-size:14px;line-height:14px;margin-bottom:14px}.dgwt-wcas-stock.in-stock{color:#0f834d}.dgwt-wcas-stock.out-of-stock{color:#e2401c}.dgwt-wcas-pd-addtc .add_to_cart_button,.dgwt-wcas-pd-addtc .add_to_cart_inline{margin:0}.dgwt-wcas-pd-addtc .add_to_cart_button.added{display:none}button.dgwt-wcas-search-submit,input[type=submit].dgwt-wcas-search-submit{position:relative}.dgwt-wcas-ico-magnifier{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;height:65%;display:block}.dgwt-wcas-preloader{height:100%;position:absolute;right:0;top:0;width:40px;z-index:-1;background-repeat:no-repeat;background-position:right 15px center;background-size:auto 44%}.rtl .dgwt-wcas-preloader{right:auto;left:5px}.dgwt-wcas-inner-preloader{background-repeat:no-repeat;background-position:right 8px center;background-size:auto 22px;display:flex;align-items:center;justify-content:center;z-index:1}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url('../img/preloader.gif')}}.dgwt-wcas-loader-circular{height:24px;width:24px;-webkit-animation:2s linear infinite rotate;-moz-animation:2s linear infinite rotate;animation:2s linear infinite rotate}.dgwt-wcas-loader-circular-path{fill:transparent;stroke-linecap:round;stroke-width:4px;stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation:1s ease-in-out infinite dash;-moz-animation:1s ease-in-out infinite dash;animation:1s ease-in-out infinite dash}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes rotate{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-moz-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-transition:all 160ms ease-in-out;-moz-transition:all 160ms ease-in-out;-ms-transition:all 160ms ease-in-out;-o-transition:all 160ms ease-in-out;transition:all 160ms ease-in-out;z-index:1}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader):before{content:'';display:block;position:absolute;background:0 0;height:100%;width:100%;left:0;bottom:0;top:0;right:0;margin:auto}.dgwt-wcas-close:hover{opacity:.3}@media screen and (max-width:992px){.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:none}}.dgwt-wcas-suggestion strong{font-weight:700}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dgwt-wcas-sf-wrapp:after,.dgwt-wcas-sf-wrapp:before{content:"";display:table}.dgwt-wcas-sf-wrapp:after{clear:both}.dgwt-wcas-sf-wrapp{zoom:1;width:100%;max-width:100vw;margin:0;position:relative;background:0 0}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{width:100%;height:40px;font-size:14px;line-height:100%;padding:10px 15px;margin:0;background:#fff;border:1px solid #ddd;border-radius:3px;-webkit-border-radius:3px;-webkit-appearance:none;box-sizing:border-box}.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:3px 3px 0 0}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp{min-height:0!important;border-radius:0 0 5px 5px;border-right-color:#ddd}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{min-height:41px!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-right-color:transparent}.dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores{margin-top:5px}.rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-left-color:transparent}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{outline:0;background:#fff;box-shadow:0 0 9px 1px rgba(0,0,0,.06);-webkit-transition:all 150ms ease-in;-moz-transition:all 150ms ease-in;-ms-transition:all 150ms ease-in;-o-transition:all 150ms ease-in;transition:all 150ms ease-in}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-webkit-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-ms-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{overflow:visible;position:absolute;border:0;padding:0;margin:0;cursor:pointer;height:40px;min-width:50px;width:auto;line-height:100%;min-height:100%;right:0;left:auto;top:0;bottom:auto;padding:0 15px;color:#fff;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out;text-transform:uppercase;background-color:#333;border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;text-shadow:0 -1px 0 rgba(0,0,0,.3);-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none}.rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left:0;right:auto}.dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{border-radius:0 2px 0 0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover{opacity:.7}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus{opacity:.7;outline:0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{content:'';position:absolute;border-width:8px 8px 8px 0;border-style:solid solid solid none;border-color:transparent #333 transparent;top:12px;left:-6px;-webkit-transition:all 250ms ease-in-out;-moz-transition:all 250ms ease-in-out;-ms-transition:all 250ms ease-in-out;-o-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out}.rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{left:auto;right:-6px;border-width:8px 0 8px 8px;border-style:solid none solid solid}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner{border:0;padding:0}.dgwt-wcas-details-wrapp .added_to_cart{display:block}.dgwt-wcas-has-desc .dgwt-wcas-sp>*,.dgwt-wcas-has-img .dgwt-wcas-sp>*{display:block}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{min-height:340px}body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child{border-bottom:none}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{min-height:40px}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{overflow:visible}.dgwt-wcas-is-details .dgwt-wcas-si{width:30px;max-width:100%;box-sizing:border-box}.dgwt-wcas-is-details .dgwt-wcas-sp{display:flex;top:0;flex-direction:column;height:100%;justify-content:center;resize:vertical}.dgwt-wcas-is-details .dgwt-wcas-sd{font-size:11px;line-height:100%}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat],.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag]{padding-left:15px;min-height:0}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat] .dgwt-wcas-st,.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag] .dgwt-wcas-st{padding-left:0}.dgwt-wcas-ico-magnifier,.dgwt-wcas-ico-magnifier-handler{max-width:20px}.dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{height:50%;margin:auto;max-height:20px;width:100%;max-width:20px;left:12px;right:auto;opacity:.5;fill:#000}.rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{left:auto;right:12px}.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 15px 10px 40px}.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 40px 10px 15px}.dgwt-wcas-overlay-mobile-on,.dgwt-wcas-overlay-mobile-on body{overflow:hidden;min-width:100vw;min-height:100vh}html.dgwt-wcas-overlay-mobile-on{scroll-behavior:unset}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar button.dgwt-wcas-om-return,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:active,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative;margin:0;padding:0;box-shadow:none;outline:0;border:medium none;border-spacing:0;border-radius:0}.dgwt-wcas-om-bar .dgwt-wcas-om-return svg{width:23px;height:23px;position:absolute;left:12px;top:12px}.rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg{left:11px;top:9px;-moz-transform:rotate(180deg);-webkit-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path{fill:#fff}.dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{right:0!important}.rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{left:4px!important;right:auto!important}@keyframes dgwt-wcas-preloader-price-anim{0%{background:rgba(128,128,128,.03)}50%{background:rgba(128,128,128,.1)}100%{background:rgba(128,128,128,.03)}}.dgwt-wcas-preloader-price-inner div:nth-child(1){left:0;animation-delay:-.1s}.dgwt-wcas-preloader-price-inner div:nth-child(2){left:13px;animation-delay:-.2s}.dgwt-wcas-preloader-price-inner div:nth-child(3){left:26px;animation-delay:-.3s}.dgwt-wcas-preloader-price{width:34px;height:10px;display:inline-block;overflow:hidden;background:0 0}.dgwt-wcas-preloader-price-inner{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.dgwt-wcas-preloader-price-inner div{position:absolute;width:8px;height:8px;background:rgba(128,128,128,.05);animation:dgwt-wcas-preloader-price-anim .8s cubic-bezier(0,.5,.5,1) infinite;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{display:none}.dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile{width:calc(100% - 45px);max-width:none;margin:0}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-form{width:100%}.dgwt-wcas-overlay-mobile{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;background:#fff}.dgwt-wcas-overlay-mobile *{box-sizing:border-box}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input{height:45px!important;border-top:none;border-right:none;border-left:none;border-radius:0;font-size:16px!important}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input:focus{font-size:16px!important}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp{left:0!important;top:45px!important;width:100%!important;height:calc(100% - 45px)!important;position:absolute;overflow-y:auto;border:none;margin:0;display:block}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestion{width:100%}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form{display:none}.dgwt-wcas-enable-mobile-form{position:absolute;z-index:100;left:0;top:0;width:100%;height:100%;cursor:pointer}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form{display:none;position:relative}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile{min-width:0;display:inline-block;width:28px;height:28px}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler{height:100%;width:100%}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{opacity:1;position:static;max-width:none;max-height:none}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler{display:none}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{height:calc(100% - 45px)!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios{overflow:visible}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome)>:not(.dgwt-wcas-overlay-mobile){display:none}body .dgwt-wcas-content-wrapp .rood,body .dgwt-wcas-content-wrapp .zwave{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon{min-width:unset}.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form{opacity:0}.dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form{opacity:1}.dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form{opacity:0;display:none;position:absolute;left:0;top:calc(100% + 8px);min-width:500px;z-index:1000}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon,.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon-arrow{display:none}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-form{display:block;opacity:1}.dgwt-wcas-search-icon{width:20px;height:auto;cursor:pointer}.dgwt-wcas-ico-magnifier-handler{margin-bottom:-.2em;width:100%}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon{opacity:.6}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open:not(.dgwt-wcas-has-submit) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier{display:none}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:15px}.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow{display:block;position:absolute;top:calc(100% + 2px);left:0;z-index:5;width:15px;height:15px;background:#fff;border:1px solid #ddd;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline{pointer-events:none;display:block;font-weight:500;white-space:nowrap}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st{border-bottom:1px solid #ddd;padding-bottom:3px;text-transform:uppercase;margin-top:16px;font-size:12px}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{border-bottom:none}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st{padding:0}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover{background:0 0;text-decoration:underline}.dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{min-height:30px}.dgwt-wcas-darkened-overlay{display:block;position:absolute;opacity:.15;z-index:100000;left:0;top:0}.dgwt-wcas-darkened-overlay>div{background:#111;position:absolute}.dgwt-wcas-search-wrapp.dgwt-wcas-search-darkoverl-on .dgwt-wcas-search-form{background-color:rgba(17,17,17,.15);border:none;border-radius:0}
|
1 |
+
.dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;line-height:100%;display:block;color:#444;min-width:230px;width:100%;text-align:left;margin:0 auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-tpd-image img{margin:0 15px 0 0!important}.rtl .dgwt-wcas-tpd-image img{margin:0 0 0 15px!important}.dgwt-wcas-preloader-wrapp img{margin:10px auto 0;display:block;max-width:200px}.dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader{display:block;width:100%;height:auto;max-width:300px;margin:0}.dgwt-wcas-suggestions-wrapp{background:#fff;border:1px solid #ddd;border-top:none;padding:0;margin:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.dgwt-wcas-details-wrapp *,.dgwt-wcas-search-wrapp *,.dgwt-wcas-suggestions-wrapp *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.dgwt-wcas-details-wrapp a:focus,.dgwt-wcas-suggestions-wrapp a:focus{outline:0}.dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top{border:1px solid #ddd;border-bottom:none}.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:550px}.dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion{padding:8px 15px}.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px;border-left-color:#eee}.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp{border-radius:0 0 0 5px;border-right-color:#eee}.dgwt-wcas-suggestion{cursor:pointer;font-size:12px;line-height:110%;text-align:left;padding:7px 10px;position:relative;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:row;justify-content:space-between;align-items:center;resize:vertical;width:100%}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{justify-content:center;color:#6d6d6d}a.dgwt-wcas-details-more-products{padding:15px 0 10px;display:block;border-top:1px solid #eee;text-align:center;font-size:12px;text-transform:uppercase;color:#6d6d6d;transition:.2s ease-in-out}a.dgwt-wcas-details-more-products:hover,a.dgwt-wcas-details-post-title:hover,a.dgwt-wcas-details-product-title:hover,a.dgwt-wcas-product-details-readmore:hover{text-decoration:underline}a.dgwt-wcas-product-details-readmore{display:block;text-align:right;margin-top:15px;color:#6d6d6d;text-transform:uppercase;letter-spacing:1px;font-weight:400;font-size:12px}.dgwt-wcas-has-headings .dgwt-wcas-suggestion,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax,.dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom,body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child{border-bottom:none}.dgwt-wcas-suggestion:after{clear:both;display:block;content:''}.dgwt-wcas-suggestion.dgwt-wcas-nores{cursor:default;opacity:.5}.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{padding-top:8px;padding-bottom:8px;min-height:60px}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{min-height:30px;text-transform:uppercase}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more{padding:0 10px;text-align:center}.dgwt-wcas-st{display:block;color:#444;font-size:15px;width:100%;line-height:110%}.dgwt-wcas-st>span{display:inline-block;vertical-align:middle}.dgwt-wcas-has-sku .dgwt-wcas-st-title{margin-right:6px}.dgwt-wcas-st>span.dgwt-wcas-st--direct-headline{display:block;font-style:italic;font-size:10px;text-transform:uppercase;opacity:.4;line-height:10px;margin-bottom:1px;letter-spacing:2px}.dgwt-wcas-st-breadcrumbs{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:80%;text-align:left;opacity:.6;width:100%;padding-right:10px}.rtl .dgwt-wcas-st-breadcrumbs{padding-right:0;padding-left:10px;text-align:right}.dgwt-wcas-sku{font-size:80%}.dgwt-wcas-si{width:50px;display:block;height:100%}.dgwt-wcas-si img{background:#fff;border:1px solid #e8e8e8;border-radius:3px;display:block;margin:auto;padding:2px;height:auto;width:auto;max-height:90%;max-width:100%}.dgwt-wcas-content-wrapp{display:flex;height:100%;width:100%;justify-content:space-between;align-items:center;resize:vertical;padding-left:10px}.rtl .dgwt-wcas-content-wrapp{padding-left:0;padding-right:10px}.dgwt-wcas-sp{color:#555;font-size:14px;text-align:right;line-height:4px;padding-left:10px}.dgwt-wcas-sp *{line-height:130%}.dgwt-wcas-search-form{margin:0;padding:0;width:100%}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores,.dgwt-wcas-sd{margin-top:5px}.dgwt-wcas-sp del{opacity:.5;font-size:12px}.dgwt-wcas-sd{color:#777;display:block;line-height:14px;width:100%;font-size:.8em}.dgwt-wcas-vendor-city{margin-left:5px;font-size:.8em}.dgwt-wcas-st>.dgwt-wcas-product-vendor{font-size:12px;margin-top:5px;display:block}.dgwt-wcas-suggestion-selected{background-color:#eee}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp.dgwt-wcas-search-focused input[type=search].dgwt-wcas-search-input:hover,.dgwt-wcas-tpd-image{background-color:#fff}.dgwt-wcas-suggestion-selected:first-child{border-top:none}.rtl .dgwt-wcas-suggestion{padding-left:0;padding-right:15px;text-align:right}.dgwt-wcas-details-wrapp{background:#fff;border:1px solid #ddd;border-top:none;border-left:none;padding:0;width:300px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;z-index:100;min-height:340px}.dgwt-wcas-datails-title,.dgwt-wcas-pd-title{border-bottom:1px dashed #eee;padding-bottom:5px}.rtl .dgwt-wcas-details-wrapp{border-left:1px solid #ddd;border-right:none}.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp,.dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{margin-top:-1px;border-top:1px solid #ddd}.dgwt-wcas-details-right .dgwt-wcas-details-wrapp{border-left:none;border-right:1px solid #ddd;border-radius:0 5px 5px 0}.dgwt-wcas-details-left .dgwt-wcas-details-wrapp{border-right:none;border-left:1px solid #ddd;border-radius:5px 0 0 5px}.dgwt-wcas-details-inner,.dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp{display:none}.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,.rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp{border-radius:0 0 0 5px}.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{border-radius:0 0 5px}.dgwt-wcas-details-inner.dgwt-wcas-details-inner-active,.dgwt-wcas-details-wrapp .added_to_cart,.dgwt-wcas-has-desc .dgwt-wcas-sp>*,.dgwt-wcas-has-img .dgwt-wcas-sp>*{display:block}.dgwt-wcas-details-inner-taxonomy{margin-top:11px}.woocommerce .dgwt-wcas-pd-rating .star-rating{float:left;margin-right:5px;font-size:12px;color:#ccae72}.rtl .dgwt-wcas-pd-rating .star-rating{float:right;margin-left:5px;margin-right:0}.dgwt-wcas-datails-title{font-size:14px}.dgwt-wcas-pd-title{color:#202020}.dgwt-wcas-pd-title .product-title{color:#202020;text-transform:uppercase;margin:0}.dgwt-wcas-tax-product-details{text-decoration:none;display:flex;align-items:center;justify-content:left;transition:.2s ease-in-out;padding:5px;margin:0 -5px 15px}.dgwt-wcas-pd-rating:after,.dgwt-wcas-tax-product-details:after{content:'';clear:both;display:block}.dgwt-wcas-tax-product-details:hover{box-shadow:0 0 11px 2px rgba(0,0,0,.05)}.rtl .dgwt-wcas-tax-product-details{justify-content:right}.dgwt-wcas-details-wrapp .dgwt-wcas-pd-title{margin-bottom:8px}.dgwt-wcas-tpd-image{margin-right:15px}.dgwt-wcas-pd-rest .product-title{display:block;line-height:100%;font-weight:500;margin-bottom:5px}.dgwt-wcas-tpd-rest{max-width:200px}.dgwt-wcas-tpd-rest-title{display:block;line-height:125%;font-size:14px;font-weight:500;letter-spacing:0;margin:0 0 8px;overflow:hidden;color:#000}.dgwt-wcas-suggestion-nores{pointer-events:none;opacity:.45}.dgwt-wcas-pd-price,.dgwt-wcas-tpd-price{line-height:120%;overflow:hidden;color:#000;margin-top:15px;font-weight:700;font-size:18px}.dgwt-wcas-tpd-price{font-size:12px;color:#777}.dgwt-wcas-pd-price .woocommerce-price-suffix,.dgwt-wcas-tpd-price .woocommerce-price-suffix{font-size:12px;font-weight:lighter;color:#999;margin-left:4px;display:inline-block}.dgwt-wcas-details-title-tax,.dgwt-wcas-pd-title .product-title{font-weight:900;letter-spacing:-1px;text-transform:uppercase}.dgwt-wcas-pd-price del .amount,.dgwt-wcas-tpd-price del .amount{font-weight:lighter;background:0 0;font-size:90%;opacity:.6}.dgwt-wcas-pd-price ins,.dgwt-wcas-tpd-price ins{background:0 0;text-decoration:none}.dgwt-wcas-pd-rating{font-size:13px;line-height:13px}.dgwt-wcas-pd-review{color:#777;font-size:11px;line-height:11px}.dgwt-wcas-datails-title{display:block;margin:5px 0 15px}.dgwt-wcas-pd-title{margin-bottom:15px;display:block;text-decoration:none}.dgwt-wcas-details-title-tax{margin-right:3px}.rtl .dgwt-wcas-details-title-tax{margin:0 0 0 3px;float:right}.dgwt-wcas-tpd-image{width:70px;padding:4px;border:1px solid #e8e8e8;border-radius:4px;display:flex;flex-direction:column;justify-content:center}.dgwt-wcas-details-space{padding:0 15px 15px}.dgwt-wcas-details-main-image{border-bottom:1px solid #eee;min-height:200px;display:flex}.dgwt-wcas-details-main-image img{width:auto;height:auto;display:block;max-height:250px;max-width:100%;margin:0 auto;padding:0;border:none;align-self:center}.dgwt-wcas-details-right .dgwt-wcas-details-main-image img{border-radius:0 3px 0 0}.dgwt-wcas-details-left .dgwt-wcas-details-main-image img{border-radius:3px 0 0}a.dgwt-wcas-details-post-title,a.dgwt-wcas-details-product-title{color:#333;display:block;line-height:120%;margin:10px 0 0;font-size:21px;font-weight:400;text-decoration:none;text-transform:none}a.dgwt-wcas-details-post-title{margin-bottom:15px}.dgwt-wcas-details-product-sku{display:block;font-size:12px;line-height:110%;color:#999}.dgwt-wcas-tpd-image img{display:block;max-width:100%;width:100%;height:auto}.dgwt-wcas-details-hr{height:1px;width:100%;border-bottom:1px solid #eee;margin:15px 0}.rtl .dgwt-wcas-tpd-image{float:right;margin-right:0;margin-left:15px}.rtl .dgwt-wcas-tpd-rest{float:right;max-width:190px}.rtl input[type=search].dgwt-wcas-search-input{text-align:right}input[type=search].dgwt-wcas-search-input,input[type=text].dgwt-cas-search-input{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;-webkit-box-shadow:none;box-shadow:none;margin:0;-webkit-appearance:textfield;text-align:left}[type=search].dgwt-wcas-search-input::-ms-clear{display:none}[type=search].dgwt-wcas-search-input::-webkit-search-decoration{-webkit-appearance:none}[type=search].dgwt-wcas-search-input::-webkit-search-cancel-button{display:none}.dgwt-wcas-details-desc{font-size:13px;line-height:157%}.dgwt-wcas-details-desc b,.dgwt-wcas-details-desc strong{font-weight:400;color:#000;margin:0;padding:0}.dgwt-wcas-pd-addtc-form{margin:10px 0;display:flex;align-items:center;justify-content:flex-end}.dgwt-wcas-pd-addtc-form>.quantity{margin-right:10px}.dgwt-wcas-pd-addtc-form .add_to_cart_inline,.dgwt-wcas-pd-addtc-form .quantity input.qty{margin-bottom:0;margin-top:0}.dgwt-wcas-stock{display:block;text-align:right;font-size:14px;line-height:14px;margin-bottom:14px}.dgwt-wcas-stock.in-stock{color:#0f834d}.dgwt-wcas-stock.out-of-stock{color:#e2401c}.dgwt-wcas-pd-addtc .add_to_cart_button,.dgwt-wcas-pd-addtc .add_to_cart_inline{margin:0}.dgwt-wcas-has-headings .dgwt-wcas-st>span.dgwt-wcas-st--direct-headline,.dgwt-wcas-layout-icon-flexible-inv:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,.dgwt-wcas-layout-icon-flexible-inv:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow,.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon,.dgwt-wcas-layout-icon-flexible:not(.dgwt-wcas-layout-icon) .dgwt-wcas-search-icon-arrow,.dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit,.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon,.dgwt-wcas-overlay-mobile .dgwt-wcas-search-icon-arrow,.dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form,.dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler,.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios body:not(.dgwt-wcas-theme-flatsome)>:not(.dgwt-wcas-overlay-mobile),.dgwt-wcas-pd-addtc .add_to_cart_button.added,.dgwt-wcas-search-icon-arrow,.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open:not(.dgwt-wcas-has-submit) .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier,.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:before,body .dgwt-wcas-content-wrapp .rood,body .dgwt-wcas-content-wrapp .zwave{display:none}button.dgwt-wcas-search-submit,input[type=submit].dgwt-wcas-search-submit{position:relative}.dgwt-wcas-ico-magnifier{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;height:65%;display:block}.dgwt-wcas-preloader{height:100%;position:absolute;right:0;top:0;width:40px;z-index:-1;background-repeat:no-repeat;background-position:right 15px center;background-size:auto 44%}.dgwt-wcas-voice-search{position:absolute;right:0;top:0;height:100%;width:40px;z-index:1;opacity:.5;cursor:pointer;align-items:center;justify-content:center;display:none;-webkit-transition:160ms ease-in-out;-moz-transition:160ms ease-in-out;-ms-transition:160ms ease-in-out;-o-transition:160ms ease-in-out;transition:160ms ease-in-out}.dgwt-wcas-close:hover,.dgwt-wcas-style-pirx .dgwt-wcas-voice-search:hover,.dgwt-wcas-voice-search:hover{opacity:.3}.dgwt-wcas-voice-search-supported .dgwt-wcas-voice-search{display:flex}.dgwt-wcas-voice-search-supported .dgwt-wcas-preloader{right:40px}.rtl .dgwt-wcas-preloader,.rtl .dgwt-wcas-voice-search{right:auto;left:5px}.dgwt-wcas-mobile-overlay-trigger-active .dgwt-wcas-voice-search{z-index:105}.rtl .dgwt-wcas-voice-search-supported .dgwt-wcas-preloader{right:auto;left:45px}.dgwt-wcas-inner-preloader{background-repeat:no-repeat;background-position:right 8px center;background-size:auto 22px;display:flex;align-items:center;justify-content:center;z-index:1}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url('../img/preloader.gif')}}.dgwt-wcas-loader-circular{height:24px;width:24px;-webkit-animation:2s linear infinite rotate;-moz-animation:2s linear infinite rotate;animation:2s linear infinite rotate}.dgwt-wcas-loader-circular-path{fill:transparent;stroke-linecap:round;stroke-width:4px;stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation:1s ease-in-out infinite dash;-moz-animation:1s ease-in-out infinite dash;animation:1s ease-in-out infinite dash}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes rotate{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-moz-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-transition:160ms ease-in-out;-moz-transition:160ms ease-in-out;-ms-transition:160ms ease-in-out;-o-transition:160ms ease-in-out;transition:160ms ease-in-out;z-index:1}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader):before{content:'';display:block;position:absolute;background:0 0;height:100%;width:100%;left:0;bottom:0;top:0;right:0;margin:auto}@media screen and (max-width:992px){.dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp{max-width:none}}.dgwt-wcas-suggestion strong{font-weight:700}.screen-reader-text{clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}.dgwt-wcas-sf-wrapp:after,.dgwt-wcas-sf-wrapp:before{content:"";display:table}.dgwt-wcas-sf-wrapp:after{clear:both}.dgwt-wcas-sf-wrapp{zoom:1;width:100%;max-width:100vw;margin:0;position:relative;background:0 0}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{width:100%;height:40px;font-size:14px;line-height:100%;padding:10px 15px;margin:0;background:#fff;border:1px solid #ddd;border-radius:3px;-webkit-border-radius:3px;-webkit-appearance:none;box-sizing:border-box}.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:3px 3px 0 0}.dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp,.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp{display:none!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp{min-height:0!important;border-radius:0 0 5px 5px;border-right-color:#ddd}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{min-height:41px!important}.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-right-color:transparent}.rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp{border-left-color:transparent}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{outline:0;background:#fff;box-shadow:0 0 9px 1px rgba(0,0,0,.06);-webkit-transition:150ms ease-in;-moz-transition:150ms ease-in;-ms-transition:150ms ease-in;-o-transition:150ms ease-in;transition:150ms ease-in}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-webkit-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::-moz-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:-ms-input-placeholder{color:#999;font-weight:400;font-style:italic;line-height:normal}.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{overflow:visible;position:absolute;border:0;padding:0 15px;margin:0;cursor:pointer;height:40px;min-width:50px;width:auto;line-height:100%;min-height:100%;right:0;left:auto;top:0;bottom:auto;color:#fff;-webkit-transition:250ms ease-in-out;-moz-transition:250ms ease-in-out;-ms-transition:250ms ease-in-out;-o-transition:250ms ease-in-out;transition:250ms ease-in-out;text-transform:uppercase;background-color:#333;border-radius:0 2px 2px 0;-webkit-border-radius:0 2px 2px 0;text-shadow:0 -1px 0 rgba(0,0,0,.3);-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none}.rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left:0;right:auto}.dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit{border-radius:0 2px 0 0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover{opacity:.7}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus{opacity:.7;outline:0}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{content:'';position:absolute;border-width:8px 8px 8px 0;border-style:solid solid solid none;border-color:transparent #333;top:12px;left:-6px;-webkit-transition:250ms ease-in-out;-moz-transition:250ms ease-in-out;-ms-transition:250ms ease-in-out;-o-transition:250ms ease-in-out;transition:250ms ease-in-out}.rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before{left:auto;right:-6px;border-width:8px 0 8px 8px;border-style:solid none solid solid}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before,.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before{border-right-color:#333}.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner{border:0;padding:0}.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{min-height:340px;overflow:visible}.dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product{min-height:40px}.dgwt-wcas-is-details .dgwt-wcas-si{width:30px;max-width:100%;box-sizing:border-box}.dgwt-wcas-is-details .dgwt-wcas-sp{display:flex;top:0;flex-direction:column;height:100%;justify-content:center;resize:vertical}.dgwt-wcas-is-details .dgwt-wcas-sd{font-size:11px;line-height:100%}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat],.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag]{padding-left:15px;min-height:0}.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_cat] .dgwt-wcas-st,.dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy=product_tag] .dgwt-wcas-st{padding-left:0}.dgwt-wcas-ico-magnifier,.dgwt-wcas-ico-magnifier-handler{max-width:20px}.dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{height:50%;margin:auto;max-height:20px;width:100%;max-width:20px;left:12px;right:auto;opacity:.5;fill:#000}.rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier{left:auto;right:12px}.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 15px 10px 40px}.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:10px 40px 10px 15px}.dgwt-wcas-overlay-mobile-on,.dgwt-wcas-overlay-mobile-on body{overflow:hidden;min-width:100vw;min-height:100vh}html.dgwt-wcas-overlay-mobile-on{scroll-behavior:unset}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar button.dgwt-wcas-om-return,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:active,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus,.dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative;margin:0;padding:0;box-shadow:none;outline:0;border:none;border-spacing:0;border-radius:0}.dgwt-wcas-om-bar .dgwt-wcas-om-return svg{width:23px;height:23px;position:absolute;left:12px;top:12px}.rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg{left:11px;top:9px;-moz-transform:rotate(180deg);-webkit-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path{fill:#fff}.dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{right:0!important}.rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader{left:4px!important;right:auto!important}@keyframes dgwt-wcas-preloader-price-anim{0%,100%{background:rgba(128,128,128,.03)}50%{background:rgba(128,128,128,.1)}}.dgwt-wcas-preloader-price-inner div:first-child{left:0;animation-delay:-.1s}.dgwt-wcas-preloader-price-inner div:nth-child(2){left:13px;animation-delay:-.2s}.dgwt-wcas-preloader-price-inner div:nth-child(3){left:26px;animation-delay:-.3s}.dgwt-wcas-preloader-price{width:34px;height:10px;display:inline-block;overflow:hidden;background:0 0}.dgwt-wcas-preloader-price-inner{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.dgwt-wcas-preloader-price-inner div{position:absolute;width:8px;height:8px;background:rgba(128,128,128,.05);animation:.8s cubic-bezier(0,.5,.5,1) infinite dgwt-wcas-preloader-price-anim;-webkit-transition:.2s ease-in-out;-moz-transition:.2s ease-in-out;-ms-transition:.2s ease-in-out;-o-transition:.2s ease-in-out;transition:.2s ease-in-out}.dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile{width:calc(100% - 45px);max-width:none;margin:0}.dgwt-wcas-overlay-mobile .dgwt-wcas-search-form,.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestion{width:100%}.dgwt-wcas-overlay-mobile{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;background:#fff}.dgwt-wcas-overlay-mobile *{box-sizing:border-box}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input{height:45px!important;border-top:none;border-right:none;border-left:none;border-radius:0;font-size:16px!important}.dgwt-wcas-search-wrapp-mobile input[type=search].dgwt-wcas-search-input:focus{font-size:16px!important}.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp{left:0!important;top:45px!important;width:100%!important;height:calc(100% - 45px)!important;position:absolute;overflow-y:auto;border:none;margin:0;display:block}.dgwt-wcas-enable-mobile-form{position:absolute;z-index:100;left:0;top:0;width:100%;height:100%;cursor:pointer}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form{display:none;position:relative}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile{min-width:0;display:inline-block;width:28px;height:28px}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler{height:100%;width:100%}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{opacity:1;position:static;max-width:none;max-height:none}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios{overflow:visible}.dgwt-wcas-overlay-mobile-on.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon{min-width:unset}.dgwt-wcas-layout-icon-flexible .dgwt-wcas-search-form,.dgwt-wcas-layout-icon-flexible-inv .dgwt-wcas-search-form{opacity:0}.dgwt-wcas-layout-icon-flexible-loaded .dgwt-wcas-search-form{opacity:1}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form{opacity:0;display:none;position:absolute;left:0;top:calc(100% + 8px);min-width:500px;z-index:1000}html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-form{display:block;opacity:1}.dgwt-wcas-search-icon{width:20px;height:auto;cursor:pointer}.dgwt-wcas-ico-magnifier-handler{margin-bottom:-.2em;width:100%}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon{opacity:.6}.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:15px}.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow{display:block;position:absolute;top:calc(100% + 2px);left:0;z-index:5;width:15px;height:15px;background:#fff;border:1px solid #ddd;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline{pointer-events:none;display:block;font-weight:500;white-space:nowrap}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st{border-bottom:1px solid #ddd;padding-bottom:3px;text-transform:uppercase;margin-top:16px;font-size:12px}.dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st{padding:0}.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected,.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover{background:0 0;text-decoration:underline}.dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax{min-height:30px}.dgwt-wcas-darkened-overlay{display:block;position:absolute;opacity:.15;z-index:100000;left:0;top:0}.dgwt-wcas-darkened-overlay>div{background:#111;position:absolute}.dgwt-wcas-search-wrapp.dgwt-wcas-search-darkoverl-on .dgwt-wcas-search-form{background-color:rgba(17,17,17,.15);border:none;border-radius:0}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp{background:#fff;padding:10px;border-radius:10px}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp{padding-top:0;padding-bottom:0}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding:13px 24px 13px 48px;line-height:24px;font-size:17px;border:2px solid transparent;border-radius:30px;height:auto;font-family:Roboto,sans-serif;background-color:#eee}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus{box-shadow:none;transition:30ms ease-in}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:hover{background-color:#dfdfdf}.dgwt-wcas-style-pirx.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-color:#333}.dgwt-wcas-open .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:30px}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{background:0 0;border-radius:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0;position:absolute;min-height:33px;min-width:33px;height:33px;width:33px;left:23px;top:21px;pointer-events:none;transition:none}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg{width:18px;height:18px}.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{left:auto;right:28px;pointer-events:auto;animation:.3s fadeIn}.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:24px;padding-right:48px;transition:none!important}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover{opacity:1;background:#e4e4e4;box-shadow:0 0 0 2px #e4e4e4;border-radius:100%}.dgwt-wcas-style-pirx .dgwt-wcas-preloader{margin-right:35px}.dgwt-wcas-style-pirx .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){transition:none;width:18px}.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return path,.dgwt-wcas-style-pirx .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) path,.dgwt-wcas-style-pirx .dgwt-wcas-voice-search svg path,.dgwt-wcas-style-pirx.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path{fill:#111}.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder{opacity:1;font-style:normal;font-weight:300;color:#777}.dgwt-wcas-open-pirx .dgwt-wcas-details-wrapp,.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp{border-color:#fff;padding-top:10px;padding-bottom:10px}.dgwt-wcas-open-pirx .dgwt-wcas-details-inner,.dgwt-wcas-open-pirx .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion{padding-left:20px;padding-right:20px}.dgwt-wcas-open-pirx .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp>.dgwt-wcas-suggestion,.dgwt-wcas-open-pirx body.dgwt-wcas-details-left .dgwt-wcas-details-wrapp{border-right:1px solid #ddd}.dgwt-wcas-open-pirx .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp,.dgwt-wcas-open-pirx .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp{margin-top:0;border-top:none}.dgwt-wcas-open-pirx body.dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp{border-right:none}.dgwt-wcas-open-pirx body.dgwt-wcas-details-right .dgwt-wcas-details-wrapp{border-left:1px solid #ddd}.dgwt-wcas-open-pirx body.dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp{border-left:none}.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp,.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp{min-height:70px!important}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-radius:0;background:0 0;padding:0 10px}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile.dgwt-wcas-search-focused .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{border-color:transparent}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input{padding-left:10px}.dgwt-wcas-style-pirx.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:hover{background-color:transparent}.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp{border-top:1px solid #e0e2e5}.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return{background:#fff}.dgwt-wcas-open-pirx.dgwt-wcas-overlay-mobile-on .dgwt-wcas-om-bar button.dgwt-wcas-om-return svg{left:17px;top:16px;width:17px;height:17px}.dgwt-wcas-style-pirx .dgwt-wcas-voice-search{right:15px;top:2px;opacity:1}.dgwt-wcas-style-pirx.dgwt-wcas-search-filled.dgwt-wcas-voice-search-supported .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit{right:47px}.dgwt-wcas-style-pirx.dgwt-wcas-voice-search-supported .dgwt-wcas-preloader{margin-right:50px}.dgwt-wcas-suggestions-wrapp-fixed{position:fixed!important}
|
assets/img/admin-troubleshooting-woof.png
CHANGED
Binary file
|
assets/img/admin-troubleshooting-woof2.png
ADDED
Binary file
|
assets/js/admin.js
CHANGED
@@ -169,24 +169,27 @@
|
|
169 |
var CONDITIONAL_LAYOUT_SETTINGS = {
|
170 |
layoutSelect: "select[id*='search_layout']",
|
171 |
overlayMobile: "input[id*='enable_mobile_overlay']",
|
172 |
-
|
|
|
173 |
searchIconColor: "input[id*='search_icon_color']",
|
174 |
-
$
|
175 |
$overlayMobileEl: null,
|
176 |
-
$
|
|
|
177 |
$searchIconColorEl: null,
|
178 |
setConditions: function () {
|
179 |
var _this = this,
|
180 |
-
|
|
|
181 |
hasAdvSettings = $('.js-dgwt-wcas-adv-settings-toggle').hasClass('woocommerce-input-toggle--enabled');
|
182 |
|
183 |
-
_this.hideOption(_this.$
|
184 |
-
_this.hideOption(_this.$
|
185 |
_this.hideOption(_this.$searchIconColorEl);
|
186 |
|
187 |
$("input[id*='bg_search_icon_color']").closest('tr').show();
|
188 |
|
189 |
-
switch (
|
190 |
case 'icon':
|
191 |
|
192 |
if (hasAdvSettings) {
|
@@ -195,9 +198,10 @@
|
|
195 |
|
196 |
break;
|
197 |
case 'icon-flexible':
|
|
|
198 |
|
199 |
if (hasAdvSettings) {
|
200 |
-
_this.showOption(_this.$
|
201 |
_this.showOption(_this.$searchIconColorEl);
|
202 |
}
|
203 |
|
@@ -205,18 +209,15 @@
|
|
205 |
default:
|
206 |
|
207 |
if (hasAdvSettings) {
|
208 |
-
|
209 |
-
_this.showOption(_this.$overlayMobileEl);
|
210 |
-
|
211 |
$("input[id*='bg_search_icon_color']").closest('tr').hide();
|
212 |
-
|
213 |
-
if (_this.$overlayMobileEl.is(':checked')) {
|
214 |
-
_this.showOption(_this.$mobileBreakpointEl);
|
215 |
-
}
|
216 |
}
|
217 |
-
|
218 |
break;
|
219 |
}
|
|
|
|
|
|
|
|
|
|
|
220 |
},
|
221 |
hideOption: function ($el) {
|
222 |
$el.closest('tr').hide();
|
@@ -227,7 +228,7 @@
|
|
227 |
registerListeners: function () {
|
228 |
var _this = this;
|
229 |
|
230 |
-
_this.$
|
231 |
_this.setConditions();
|
232 |
});
|
233 |
|
@@ -238,12 +239,13 @@
|
|
238 |
},
|
239 |
init: function () {
|
240 |
var _this = this,
|
241 |
-
$
|
242 |
|
243 |
-
if ($
|
244 |
-
_this.$
|
245 |
_this.$overlayMobileEl = $(_this.overlayMobile);
|
246 |
-
_this.$
|
|
|
247 |
_this.$searchIconColorEl = $(_this.searchIconColor);
|
248 |
_this.registerListeners();
|
249 |
|
@@ -262,6 +264,7 @@
|
|
262 |
indexingWrappoerClass: 'js-dgwt-wcas-indexing-wrapper',
|
263 |
indexerTabProgressClass: 'js-dgwt-wcas-indexer-tab-progress',
|
264 |
indexerTabErrorClass: 'js-dgwt-wcas-indexer-tab-error',
|
|
|
265 |
getWrapper: function () {
|
266 |
var _this = this;
|
267 |
|
@@ -319,6 +322,7 @@
|
|
319 |
var $btn = $(this);
|
320 |
|
321 |
$btn.attr('disabled', 'disabled');
|
|
|
322 |
|
323 |
$.ajax({
|
324 |
url: ajaxurl,
|
@@ -334,7 +338,7 @@
|
|
334 |
}
|
335 |
},
|
336 |
complete: function () {
|
337 |
-
|
338 |
}
|
339 |
});
|
340 |
})
|
@@ -353,6 +357,9 @@
|
|
353 |
},
|
354 |
success: function (response) {
|
355 |
if (typeof response != 'undefined' && response.success) {
|
|
|
|
|
|
|
356 |
_this.getWrapper().html(response.data.html);
|
357 |
|
358 |
if (response.data.loop) {
|
@@ -361,6 +368,8 @@
|
|
361 |
$('.' + _this.indexerTabProgressClass).removeClass('active');
|
362 |
if (response.data.status === 'error') {
|
363 |
$('.' + _this.indexerTabErrorClass).addClass('active');
|
|
|
|
|
364 |
}
|
365 |
}
|
366 |
|
@@ -944,6 +953,7 @@
|
|
944 |
searchWrapp: {},
|
945 |
suggestionWrapp: {},
|
946 |
searchInput: {},
|
|
|
947 |
init: function () {
|
948 |
var _this = this;
|
949 |
|
@@ -961,6 +971,9 @@
|
|
961 |
|
962 |
_this.noResultsHandler();
|
963 |
_this.fixSizesInit();
|
|
|
|
|
|
|
964 |
},
|
965 |
isChecked: function ($el) {
|
966 |
return $el.length > 0 && $el.is(':checked') ? true : false;
|
@@ -1034,6 +1047,8 @@
|
|
1034 |
options = [
|
1035 |
'show_submit_button',
|
1036 |
'max_form_width',
|
|
|
|
|
1037 |
'show_product_image',
|
1038 |
'show_product_sku',
|
1039 |
'show_product_desc',
|
@@ -1050,11 +1065,12 @@
|
|
1050 |
'show_details_box'
|
1051 |
];
|
1052 |
for (var i = 0; i < options.length; i++) {
|
1053 |
-
var
|
1054 |
-
|
1055 |
-
|
1056 |
-
$
|
1057 |
-
|
|
|
1058 |
|
1059 |
if (typeof _this[methodToCall] == 'function' && $el.length > 0) {
|
1060 |
_this[methodToCall]($el, $el.val());
|
@@ -1104,7 +1120,7 @@
|
|
1104 |
|
1105 |
_this[methodToCall]($el, $el.val());
|
1106 |
|
1107 |
-
$(document).on("change", selector, function (
|
1108 |
methodToCall = $(this).attr('id').replace(']', '').replace('dgwt_wcas_settings[', '');
|
1109 |
methodToCall = 'onColor' + _this.camelCase(methodToCall);
|
1110 |
_this[methodToCall]($(this), this.value);
|
@@ -1167,13 +1183,19 @@
|
|
1167 |
_this.onColorBgSubmitColor($textSubmitBgEl, $textSubmitBgEl.val());
|
1168 |
_this.onColorTextSubmitColor($textSubmitTextEl, $textSubmitTextEl.val());
|
1169 |
|
|
|
|
|
|
|
|
|
1170 |
} else {
|
1171 |
_this.searchWrapp.addClass('dgwt-wcas-no-submit');
|
1172 |
_this.searchWrapp.removeClass('dgwt-wcas-has-submit');
|
1173 |
$submit.hide();
|
1174 |
$('.dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier').show();
|
|
|
1175 |
}
|
1176 |
|
|
|
1177 |
},
|
1178 |
onChangeShowProductImage: function ($el, value) {
|
1179 |
var _this = this,
|
@@ -1473,12 +1495,13 @@
|
|
1473 |
|
1474 |
$('.dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)').addClass('dgwt-wcas-suggestion-selected');
|
1475 |
|
1476 |
-
var
|
|
|
1477 |
|
1478 |
if (searchWidth >= 550) {
|
1479 |
_this.previewWrapper.addClass('dgwt-wcas-full-width');
|
1480 |
|
1481 |
-
var realWidth = getComputedStyle(
|
1482 |
realWidth = Math.round(parseFloat(realWidth.replace('px', '')));
|
1483 |
|
1484 |
if (realWidth % 2 == 0) {
|
@@ -1507,7 +1530,120 @@
|
|
1507 |
_this.detailsWrapp.css('width', '');
|
1508 |
}
|
1509 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1510 |
onColorSearchIconColor: function ($el, value) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
},
|
1512 |
onColorBgInputColor: function ($el, value) {
|
1513 |
var _this = this;
|
@@ -1524,11 +1660,7 @@
|
|
1524 |
if (_this.isColor(value)) {
|
1525 |
|
1526 |
var style = '<style class="' + styleClass + '">';
|
1527 |
-
style += '.dgwt-wcas-search-input
|
1528 |
-
style += '.dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:' + value + '!important;}';
|
1529 |
-
style += '.dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:' + value + '!important;}';
|
1530 |
-
style += '.dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:' + value + '!important;}';
|
1531 |
-
style += '.dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:' + value + '!important;}';
|
1532 |
style += '.dgwt-wcas-ico-magnifier path {fill:' + value + '}';
|
1533 |
style += '</style>';
|
1534 |
|
@@ -1692,7 +1824,8 @@
|
|
1692 |
}
|
1693 |
},
|
1694 |
onTypeSearchSubmitText: function ($el, value) {
|
1695 |
-
var
|
|
|
1696 |
$icon = $('.js-dgwt-wcas-search-submit-m');
|
1697 |
|
1698 |
if (value.length > 0) {
|
@@ -1705,6 +1838,7 @@
|
|
1705 |
$icon.show();
|
1706 |
}
|
1707 |
|
|
|
1708 |
},
|
1709 |
onTypeSearchPlaceholder: function ($el, value) {
|
1710 |
var _this = this;
|
@@ -1725,6 +1859,22 @@
|
|
1725 |
}
|
1726 |
$('.js-dgwt-wcas-st-more-label').text(value);
|
1727 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1728 |
fixSizesInit: function () {
|
1729 |
var _this = this;
|
1730 |
|
@@ -1732,6 +1882,177 @@
|
|
1732 |
_this.onChangeShowDetailsBox($("input[id*='show_details_box']"));
|
1733 |
});
|
1734 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1735 |
}
|
1736 |
};
|
1737 |
|
169 |
var CONDITIONAL_LAYOUT_SETTINGS = {
|
170 |
layoutSelect: "select[id*='search_layout']",
|
171 |
overlayMobile: "input[id*='enable_mobile_overlay']",
|
172 |
+
switchLayoutBreakpoint: "input[id*='mobile_breakpoint']",
|
173 |
+
mobileOverlayBreakpoint: "input[id*='mobile_overlay_breakpoint']",
|
174 |
searchIconColor: "input[id*='search_icon_color']",
|
175 |
+
$layoutSelectEl: null,
|
176 |
$overlayMobileEl: null,
|
177 |
+
$switchLayoutBreakpointEl: null,
|
178 |
+
$mobileOverlayBreakpointEl: null,
|
179 |
$searchIconColorEl: null,
|
180 |
setConditions: function () {
|
181 |
var _this = this,
|
182 |
+
layoutVal = _this.$layoutSelectEl.find('option:selected').val(),
|
183 |
+
overlayOnMobileVal = _this.$overlayMobileEl.is(':checked'),
|
184 |
hasAdvSettings = $('.js-dgwt-wcas-adv-settings-toggle').hasClass('woocommerce-input-toggle--enabled');
|
185 |
|
186 |
+
_this.hideOption(_this.$switchLayoutBreakpointEl);
|
187 |
+
_this.hideOption(_this.$mobileOverlayBreakpointEl);
|
188 |
_this.hideOption(_this.$searchIconColorEl);
|
189 |
|
190 |
$("input[id*='bg_search_icon_color']").closest('tr').show();
|
191 |
|
192 |
+
switch (layoutVal) {
|
193 |
case 'icon':
|
194 |
|
195 |
if (hasAdvSettings) {
|
198 |
|
199 |
break;
|
200 |
case 'icon-flexible':
|
201 |
+
case 'icon-flexible-inv':
|
202 |
|
203 |
if (hasAdvSettings) {
|
204 |
+
_this.showOption(_this.$switchLayoutBreakpointEl);
|
205 |
_this.showOption(_this.$searchIconColorEl);
|
206 |
}
|
207 |
|
209 |
default:
|
210 |
|
211 |
if (hasAdvSettings) {
|
|
|
|
|
|
|
212 |
$("input[id*='bg_search_icon_color']").closest('tr').hide();
|
|
|
|
|
|
|
|
|
213 |
}
|
|
|
214 |
break;
|
215 |
}
|
216 |
+
|
217 |
+
if (overlayOnMobileVal) {
|
218 |
+
_this.showOption(_this.$mobileOverlayBreakpointEl);
|
219 |
+
}
|
220 |
+
|
221 |
},
|
222 |
hideOption: function ($el) {
|
223 |
$el.closest('tr').hide();
|
228 |
registerListeners: function () {
|
229 |
var _this = this;
|
230 |
|
231 |
+
_this.$layoutSelectEl.on('change', function () {
|
232 |
_this.setConditions();
|
233 |
});
|
234 |
|
239 |
},
|
240 |
init: function () {
|
241 |
var _this = this,
|
242 |
+
$layoutSelectEl = $(_this.layoutSelect);
|
243 |
|
244 |
+
if ($layoutSelectEl.length > 0) {
|
245 |
+
_this.$layoutSelectEl = $layoutSelectEl;
|
246 |
_this.$overlayMobileEl = $(_this.overlayMobile);
|
247 |
+
_this.$switchLayoutBreakpointEl = $(_this.switchLayoutBreakpoint);
|
248 |
+
_this.$mobileOverlayBreakpointEl = $(_this.mobileOverlayBreakpoint);
|
249 |
_this.$searchIconColorEl = $(_this.searchIconColor);
|
250 |
_this.registerListeners();
|
251 |
|
264 |
indexingWrappoerClass: 'js-dgwt-wcas-indexing-wrapper',
|
265 |
indexerTabProgressClass: 'js-dgwt-wcas-indexer-tab-progress',
|
266 |
indexerTabErrorClass: 'js-dgwt-wcas-indexer-tab-error',
|
267 |
+
indexerMenuErrorClass: 'dgwt-wcas-menu-warning-icon',
|
268 |
getWrapper: function () {
|
269 |
var _this = this;
|
270 |
|
322 |
var $btn = $(this);
|
323 |
|
324 |
$btn.attr('disabled', 'disabled');
|
325 |
+
_this.getWrapper().attr('data-stopping', '1');
|
326 |
|
327 |
$.ajax({
|
328 |
url: ajaxurl,
|
338 |
}
|
339 |
},
|
340 |
complete: function () {
|
341 |
+
_this.getWrapper().attr('data-stopping', '0');
|
342 |
}
|
343 |
});
|
344 |
})
|
357 |
},
|
358 |
success: function (response) {
|
359 |
if (typeof response != 'undefined' && response.success) {
|
360 |
+
if (_this.getWrapper().attr('data-stopping') === '1') {
|
361 |
+
return;
|
362 |
+
}
|
363 |
_this.getWrapper().html(response.data.html);
|
364 |
|
365 |
if (response.data.loop) {
|
368 |
$('.' + _this.indexerTabProgressClass).removeClass('active');
|
369 |
if (response.data.status === 'error') {
|
370 |
$('.' + _this.indexerTabErrorClass).addClass('active');
|
371 |
+
} else if (response.data.status === 'completed') {
|
372 |
+
$('.' + _this.indexerMenuErrorClass).remove();
|
373 |
}
|
374 |
}
|
375 |
|
953 |
searchWrapp: {},
|
954 |
suggestionWrapp: {},
|
955 |
searchInput: {},
|
956 |
+
animateTypingInterval: null,
|
957 |
init: function () {
|
958 |
var _this = this;
|
959 |
|
971 |
|
972 |
_this.noResultsHandler();
|
973 |
_this.fixSizesInit();
|
974 |
+
|
975 |
+
_this.keepPreviewVisible();
|
976 |
+
_this.animationController();
|
977 |
},
|
978 |
isChecked: function ($el) {
|
979 |
return $el.length > 0 && $el.is(':checked') ? true : false;
|
1047 |
options = [
|
1048 |
'show_submit_button',
|
1049 |
'max_form_width',
|
1050 |
+
'search_style',
|
1051 |
+
'search_layout',
|
1052 |
'show_product_image',
|
1053 |
'show_product_sku',
|
1054 |
'show_product_desc',
|
1065 |
'show_details_box'
|
1066 |
];
|
1067 |
for (var i = 0; i < options.length; i++) {
|
1068 |
+
var tag = ['search_style', 'search_layout'].includes(options[i]) ? 'select' : 'input',
|
1069 |
+
selector = tag + "[id='dgwt_wcas_settings\\[" + options[i] + "\\]']",
|
1070 |
+
altSelector = tag + "[id^='dgwt_wcas_settings'][data-option-trigger='" + options[i] + "']",
|
1071 |
+
$el = $(selector),
|
1072 |
+
$altEl = $(altSelector),
|
1073 |
+
methodToCall = 'onChange' + _this.camelCase(options[i]);
|
1074 |
|
1075 |
if (typeof _this[methodToCall] == 'function' && $el.length > 0) {
|
1076 |
_this[methodToCall]($el, $el.val());
|
1120 |
|
1121 |
_this[methodToCall]($el, $el.val());
|
1122 |
|
1123 |
+
$(document).on("change", selector, function () {
|
1124 |
methodToCall = $(this).attr('id').replace(']', '').replace('dgwt_wcas_settings[', '');
|
1125 |
methodToCall = 'onColor' + _this.camelCase(methodToCall);
|
1126 |
_this[methodToCall]($(this), this.value);
|
1183 |
_this.onColorBgSubmitColor($textSubmitBgEl, $textSubmitBgEl.val());
|
1184 |
_this.onColorTextSubmitColor($textSubmitTextEl, $textSubmitTextEl.val());
|
1185 |
|
1186 |
+
setTimeout(function () {
|
1187 |
+
_this.positionPreloader();
|
1188 |
+
}, 10);
|
1189 |
+
|
1190 |
} else {
|
1191 |
_this.searchWrapp.addClass('dgwt-wcas-no-submit');
|
1192 |
_this.searchWrapp.removeClass('dgwt-wcas-has-submit');
|
1193 |
$submit.hide();
|
1194 |
$('.dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier').show();
|
1195 |
+
_this.positionPreloader();
|
1196 |
}
|
1197 |
|
1198 |
+
|
1199 |
},
|
1200 |
onChangeShowProductImage: function ($el, value) {
|
1201 |
var _this = this,
|
1495 |
|
1496 |
$('.dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)').addClass('dgwt-wcas-suggestion-selected');
|
1497 |
|
1498 |
+
var $visibleSearchWrapp = $('.js-dgwt-wcas-preview-bar-example');
|
1499 |
+
var searchWidth = $visibleSearchWrapp.width();
|
1500 |
|
1501 |
if (searchWidth >= 550) {
|
1502 |
_this.previewWrapper.addClass('dgwt-wcas-full-width');
|
1503 |
|
1504 |
+
var realWidth = getComputedStyle($visibleSearchWrapp[0]).width;
|
1505 |
realWidth = Math.round(parseFloat(realWidth.replace('px', '')));
|
1506 |
|
1507 |
if (realWidth % 2 == 0) {
|
1530 |
_this.detailsWrapp.css('width', '');
|
1531 |
}
|
1532 |
},
|
1533 |
+
onChangeSearchStyle: function ($el, value) {
|
1534 |
+
var _this = this,
|
1535 |
+
themes = ['solaris', 'pirx'],
|
1536 |
+
$inputSubmitButton = $('input[id*="show_submit_button"]'),
|
1537 |
+
$inputSubmitBgColor = $('label[for*="bg_submit_color"]'),
|
1538 |
+
i;
|
1539 |
+
|
1540 |
+
$('.dgwt-wcas-ico-magnifier').addClass('dgwt-wcas-hidden');
|
1541 |
+
|
1542 |
+
for (i = 0; i < themes.length; i++) {
|
1543 |
+
$('.js-dgwt-wcas-preview').removeClass('dgwt-wcas-open-' + themes[i]);
|
1544 |
+
$('.js-dgwt-wcas-search-wrapp').removeClass('dgwt-wcas-style-' + themes[i]);
|
1545 |
+
}
|
1546 |
+
|
1547 |
+
$('.js-dgwt-wcas-ico-magnifier-' + value).removeClass('dgwt-wcas-hidden');
|
1548 |
+
|
1549 |
+
$('.js-dgwt-wcas-preview').addClass('dgwt-wcas-open-' + value);
|
1550 |
+
$('.js-dgwt-wcas-search-wrapp').addClass('dgwt-wcas-style-' + value);
|
1551 |
+
|
1552 |
+
if (value === 'solaris') {
|
1553 |
+
$('label[for*="show_submit_button"] .js-dgwt-wcas-tooltip').addClass('dgwt-wcas-hidden');
|
1554 |
+
$('label[for*="search_submit_text"]').closest('tr').removeClass('dgwt-wcas-hidden');
|
1555 |
+
$('input[id*="search_submit_text"]').prop("disabled", false);
|
1556 |
+
$inputSubmitBgColor.closest('tr').removeClass('dgwt-wcas-hidden');
|
1557 |
+
$('label[for*="text_submit_color"] > span:nth-child(1)').removeClass('dgwt-wcas-hidden');
|
1558 |
+
$('label[for*="text_submit_color"] > span:nth-child(2)').addClass('dgwt-wcas-hidden');
|
1559 |
+
$inputSubmitButton.prop("disabled", false);
|
1560 |
+
$('.js-dgwt-wcas-submit-button-pirx-tooltip').removeClass('dgwt-wcas-hidden');
|
1561 |
+
|
1562 |
+
setTimeout(function () {
|
1563 |
+
_this.positionPreloader();
|
1564 |
+
}, 300);
|
1565 |
+
}
|
1566 |
+
|
1567 |
+
if (value === 'pirx') {
|
1568 |
+
$('label[for*="show_submit_button"] .js-dgwt-wcas-tooltip').removeClass('dgwt-wcas-hidden');
|
1569 |
+
$('label[for*="search_submit_text"]').closest('tr').addClass('dgwt-wcas-hidden');
|
1570 |
+
$('input[id*="search_submit_text"]').prop("disabled", true);
|
1571 |
+
$('label[for*="bg_submit_color"]').closest('tr').addClass('dgwt-wcas-hidden');
|
1572 |
+
$('label[for*="text_submit_color"] > span:nth-child(2)').removeClass('dgwt-wcas-hidden');
|
1573 |
+
$('label[for*="text_submit_color"] > span:nth-child(1)').addClass('dgwt-wcas-hidden');
|
1574 |
+
$('input[id*="search_submit_text"]').val('');
|
1575 |
+
|
1576 |
+
var $cPicker = $inputSubmitBgColor.closest('tr').find('.wp-picker-clear');
|
1577 |
+
if($cPicker.length > 0){
|
1578 |
+
$cPicker[0].click();
|
1579 |
+
}
|
1580 |
+
_this.onColorBgSubmitColor();
|
1581 |
+
|
1582 |
+
if (!$inputSubmitButton.is(':checked')) {
|
1583 |
+
$inputSubmitButton[0].click();
|
1584 |
+
}
|
1585 |
+
|
1586 |
+
$inputSubmitButton.prop("disabled", true);
|
1587 |
+
|
1588 |
+
_this.onTypeSearchSubmitText($('input[id*="search_submit_text"]'), '');
|
1589 |
+
|
1590 |
+
setTimeout(function () {
|
1591 |
+
_this.positionPreloader();
|
1592 |
+
}, 10);
|
1593 |
+
|
1594 |
+
}
|
1595 |
+
},
|
1596 |
+
onChangeSearchLayout: function ($el, value) {
|
1597 |
+
var _this = this,
|
1598 |
+
$labels = $('.js-dgwt-wcas-preview-device-info'),
|
1599 |
+
$barExample = $('.js-dgwt-wcas-preview-bar-example'),
|
1600 |
+
$iconExample = $('.js-dgwt-wcas-preview-icon-example'),
|
1601 |
+
i;
|
1602 |
+
|
1603 |
+
$('.js-dgwt-wcas-preview-device-info > span').addClass('dgwt-wcas-hidden');
|
1604 |
+
$iconExample.removeClass('dgwt-wcas-preview-icon-only');
|
1605 |
+
|
1606 |
+
switch (value) {
|
1607 |
+
case 'classic':
|
1608 |
+
$labels.addClass('dgwt-wcas-hidden');
|
1609 |
+
$barExample.removeClass('dgwt-wcas-hidden');
|
1610 |
+
$iconExample.addClass('dgwt-wcas-hidden');
|
1611 |
+
break;
|
1612 |
+
case 'icon':
|
1613 |
+
$labels.addClass('dgwt-wcas-hidden');
|
1614 |
+
$barExample.addClass('dgwt-wcas-hidden');
|
1615 |
+
$iconExample.removeClass('dgwt-wcas-hidden');
|
1616 |
+
$('.dgwt-wcas-search-form').removeClass('dgwt-wcas-hidden');
|
1617 |
+
$('.dgwt-wcas-search-icon-arrow').removeClass('dgwt-wcas-hidden');
|
1618 |
+
$iconExample.addClass('dgwt-wcas-preview-icon-only');
|
1619 |
+
break;
|
1620 |
+
case 'icon-flexible':
|
1621 |
+
$labels.removeClass('dgwt-wcas-hidden');
|
1622 |
+
$barExample.removeClass('dgwt-wcas-hidden');
|
1623 |
+
$iconExample.removeClass('dgwt-wcas-hidden');
|
1624 |
+
$iconExample.find('.dgwt-wcas-search-form').addClass('dgwt-wcas-hidden');
|
1625 |
+
$iconExample.find('.dgwt-wcas-search-icon-arrow').addClass('dgwt-wcas-hidden');
|
1626 |
+
$('.js-dgwt-wcas-preview-device-info[data-device="desktop"] span:nth-child(2)').removeClass('dgwt-wcas-hidden');
|
1627 |
+
$('.js-dgwt-wcas-preview-device-info[data-device="mobile"] span:nth-child(1)').removeClass('dgwt-wcas-hidden');
|
1628 |
+
break;
|
1629 |
+
case 'icon-flexible-inv':
|
1630 |
+
$labels.removeClass('dgwt-wcas-hidden');
|
1631 |
+
$barExample.removeClass('dgwt-wcas-hidden');
|
1632 |
+
$iconExample.removeClass('dgwt-wcas-hidden');
|
1633 |
+
$iconExample.find('.dgwt-wcas-search-form').addClass('dgwt-wcas-hidden');
|
1634 |
+
$iconExample.find('.dgwt-wcas-search-icon-arrow').addClass('dgwt-wcas-hidden');
|
1635 |
+
$('.js-dgwt-wcas-preview-device-info[data-device="desktop"] span:nth-child(1)').removeClass('dgwt-wcas-hidden');
|
1636 |
+
$('.js-dgwt-wcas-preview-device-info[data-device="mobile"] span:nth-child(2)').removeClass('dgwt-wcas-hidden');
|
1637 |
+
break;
|
1638 |
+
}
|
1639 |
+
},
|
1640 |
onColorSearchIconColor: function ($el, value) {
|
1641 |
+
var _this = this;
|
1642 |
+
if (_this.isColor(value)) {
|
1643 |
+
_this.searchWrapp.find('.dgwt-wcas-ico-magnifier-handler path').css('fill', value);
|
1644 |
+
} else {
|
1645 |
+
_this.searchWrapp.find('.dgwt-wcas-ico-magnifier-handler path').css('fill', '');
|
1646 |
+
}
|
1647 |
},
|
1648 |
onColorBgInputColor: function ($el, value) {
|
1649 |
var _this = this;
|
1660 |
if (_this.isColor(value)) {
|
1661 |
|
1662 |
var style = '<style class="' + styleClass + '">';
|
1663 |
+
style += '.dgwt-wcas-search-input {color:' + value + '!important;}';
|
|
|
|
|
|
|
|
|
1664 |
style += '.dgwt-wcas-ico-magnifier path {fill:' + value + '}';
|
1665 |
style += '</style>';
|
1666 |
|
1824 |
}
|
1825 |
},
|
1826 |
onTypeSearchSubmitText: function ($el, value) {
|
1827 |
+
var _this = this,
|
1828 |
+
$label = $('.js-dgwt-wcas-search-submit-l'),
|
1829 |
$icon = $('.js-dgwt-wcas-search-submit-m');
|
1830 |
|
1831 |
if (value.length > 0) {
|
1838 |
$icon.show();
|
1839 |
}
|
1840 |
|
1841 |
+
_this.positionPreloader();
|
1842 |
},
|
1843 |
onTypeSearchPlaceholder: function ($el, value) {
|
1844 |
var _this = this;
|
1859 |
}
|
1860 |
$('.js-dgwt-wcas-st-more-label').text(value);
|
1861 |
},
|
1862 |
+
positionPreloader: function () {
|
1863 |
+
var $submit = $('.js-dgwt-wcas-search-wrapp:not(.dgwt-wcas-hidden) .js-dgwt-wcas-search-submit'),
|
1864 |
+
visible = $submit.is(":visible"),
|
1865 |
+
style = $("select[id*='search_style'] option:selected").val(),
|
1866 |
+
right = ($submit.width() + 35);
|
1867 |
+
|
1868 |
+
if (style == 'pirx') {
|
1869 |
+
right = 38;
|
1870 |
+
}
|
1871 |
+
|
1872 |
+
if (!visible && style == 'solaris') {
|
1873 |
+
right = 7;
|
1874 |
+
}
|
1875 |
+
|
1876 |
+
$('.dgwt-wcas-preloader').css('right', right + 'px');
|
1877 |
+
},
|
1878 |
fixSizesInit: function () {
|
1879 |
var _this = this;
|
1880 |
|
1882 |
_this.onChangeShowDetailsBox($("input[id*='show_details_box']"));
|
1883 |
});
|
1884 |
|
1885 |
+
},
|
1886 |
+
keepPreviewVisible: function () {
|
1887 |
+
var $movingEl = $('.js-dgwt-wcas-preview-inner'),
|
1888 |
+
$startEl = $('.js-dgwt-wcas-preview'),
|
1889 |
+
$endEl = $('.js-dgwt-wcas-preview-source'),
|
1890 |
+
$boundaryEl = $('.dgwt-eq-settings-form');
|
1891 |
+
|
1892 |
+
$(window).on('scroll.autocomplete', function () {
|
1893 |
+
var currentTop = $(document).scrollTop(),
|
1894 |
+
topEdge = $startEl[0].getBoundingClientRect().top,
|
1895 |
+
breakPoint = topEdge - 40;
|
1896 |
+
if (breakPoint < 0) {
|
1897 |
+
var offset = (-1 * breakPoint) < 1 ? 0 : (-1 * breakPoint),
|
1898 |
+
bottomLimit = $endEl.offset().top + $endEl.outerHeight(false),
|
1899 |
+
boundaryBottom = Math.floor($boundaryEl.offset().top + $boundaryEl.outerHeight(false)) - 90;
|
1900 |
+
|
1901 |
+
if (bottomLimit <= boundaryBottom) {
|
1902 |
+
$movingEl.css('top', offset + 'px');
|
1903 |
+
} else {
|
1904 |
+
if ((currentTop + 40) < $movingEl.offset().top) {
|
1905 |
+
var tmp = $movingEl.css('top').replace(/px/i, '') - 10;
|
1906 |
+
$movingEl.css('top', tmp + 'px');
|
1907 |
+
}
|
1908 |
+
}
|
1909 |
+
} else {
|
1910 |
+
$movingEl.css('top', 0);
|
1911 |
+
}
|
1912 |
+
});
|
1913 |
+
},
|
1914 |
+
animationController: function () {
|
1915 |
+
var that = this;
|
1916 |
+
|
1917 |
+
$(window).on('load', function () {
|
1918 |
+
var $searchBarSettings = $('#dgwt_wcas_form_body-tab');
|
1919 |
+
if ($searchBarSettings.length && $searchBarSettings.hasClass('nav-tab-active')) {
|
1920 |
+
that.startAnimateTyping();
|
1921 |
+
}
|
1922 |
+
});
|
1923 |
+
|
1924 |
+
$('.dgwt_wcas_settings-nav-tab-wrapper > a').on('click', function () {
|
1925 |
+
if ($(this).attr('id') === 'dgwt_wcas_form_body-tab') {
|
1926 |
+
that.stopAnimateTyping();
|
1927 |
+
that.startAnimateTyping();
|
1928 |
+
} else {
|
1929 |
+
that.stopAnimateTyping();
|
1930 |
+
}
|
1931 |
+
});
|
1932 |
+
|
1933 |
+
$('.dgwt_wcas_settings-nav-tab-wrapper > a').on('click', function () {
|
1934 |
+
if ($(this).attr('id') === 'dgwt_wcas_form_body-tab') {
|
1935 |
+
that.stopAnimateTyping();
|
1936 |
+
that.startAnimateTyping();
|
1937 |
+
} else {
|
1938 |
+
that.stopAnimateTyping();
|
1939 |
+
}
|
1940 |
+
});
|
1941 |
+
|
1942 |
+
$('input[id*="search_placeholder"]').on('focus', function () {
|
1943 |
+
that.stopAnimateTyping();
|
1944 |
+
_this.searchInput.val('');
|
1945 |
+
});
|
1946 |
+
|
1947 |
+
$('input[id*="search_placeholder"]').on('blur', function () {
|
1948 |
+
that.startAnimateTyping();
|
1949 |
+
});
|
1950 |
+
|
1951 |
+
},
|
1952 |
+
startAnimateTyping: function () {
|
1953 |
+
var that = this,
|
1954 |
+
frame = 0,
|
1955 |
+
$wrapp = $('.js-dgwt-wcas-search-wrapp'),
|
1956 |
+
$searchBar = $('.js-dgwt-wcas-search-input'),
|
1957 |
+
$closeEl = $('.dgwt-wcas-preloader'),
|
1958 |
+
closeSvg = $('.js-dgwt-wcas-preview-elements-close').html();
|
1959 |
+
|
1960 |
+
// TODO [refactor] shorten it using a recursive function
|
1961 |
+
that.animateTypingInterval = setInterval(function () {
|
1962 |
+
frame++;
|
1963 |
+
|
1964 |
+
if (frame === 10) {
|
1965 |
+
$searchBar.val('f');
|
1966 |
+
$wrapp.addClass('dgwt-wcas-search-filled');
|
1967 |
+
$wrapp.addClass('dgwt-wcas-search-focused');
|
1968 |
+
$closeEl.addClass('dgwt-wcas-close');
|
1969 |
+
}
|
1970 |
+
|
1971 |
+
if (frame === 11) {
|
1972 |
+
$searchBar.val('fi');
|
1973 |
+
}
|
1974 |
+
if (frame === 12) {
|
1975 |
+
$searchBar.val('fib');
|
1976 |
+
$closeEl.append(closeSvg);
|
1977 |
+
that.positionPreloader();
|
1978 |
+
}
|
1979 |
+
if (frame === 13) {
|
1980 |
+
$searchBar.val('fibo');
|
1981 |
+
}
|
1982 |
+
if (frame === 14) {
|
1983 |
+
$searchBar.val('fibo ');
|
1984 |
+
}
|
1985 |
+
if (frame === 15) {
|
1986 |
+
$searchBar.val('fibo s');
|
1987 |
+
}
|
1988 |
+
if (frame === 16) {
|
1989 |
+
$searchBar.val('fibo se');
|
1990 |
+
}
|
1991 |
+
if (frame === 17) {
|
1992 |
+
$searchBar.val('fibo sea');
|
1993 |
+
}
|
1994 |
+
if (frame === 18) {
|
1995 |
+
$searchBar.val('fibo sear');
|
1996 |
+
}
|
1997 |
+
if (frame === 19) {
|
1998 |
+
$searchBar.val('fibo searc');
|
1999 |
+
}
|
2000 |
+
if (frame === 20) {
|
2001 |
+
$searchBar.val('fibo search');
|
2002 |
+
}
|
2003 |
+
if (frame === 30) {
|
2004 |
+
$searchBar.val('fibo searc');
|
2005 |
+
}
|
2006 |
+
if (frame === 31) {
|
2007 |
+
$searchBar.val('fibo sear');
|
2008 |
+
}
|
2009 |
+
if (frame === 32) {
|
2010 |
+
$searchBar.val('fibo sea');
|
2011 |
+
}
|
2012 |
+
if (frame === 33) {
|
2013 |
+
$searchBar.val('fibo se');
|
2014 |
+
}
|
2015 |
+
if (frame === 34) {
|
2016 |
+
$searchBar.val('fibo s');
|
2017 |
+
}
|
2018 |
+
if (frame === 35) {
|
2019 |
+
$searchBar.val('fibo ');
|
2020 |
+
}
|
2021 |
+
if (frame === 36) {
|
2022 |
+
$searchBar.val('fibo');
|
2023 |
+
}
|
2024 |
+
if (frame === 37) {
|
2025 |
+
$searchBar.val('fib');
|
2026 |
+
}
|
2027 |
+
if (frame === 38) {
|
2028 |
+
$searchBar.val('fi');
|
2029 |
+
$closeEl.removeClass('dgwt-wcas-close');
|
2030 |
+
}
|
2031 |
+
if (frame === 39) {
|
2032 |
+
$searchBar.val('f');
|
2033 |
+
}
|
2034 |
+
if (frame === 40) {
|
2035 |
+
$searchBar.val('');
|
2036 |
+
$closeEl.html('');
|
2037 |
+
$wrapp.removeClass('dgwt-wcas-search-filled');
|
2038 |
+
}
|
2039 |
+
if (frame === 45) {
|
2040 |
+
frame = 0;
|
2041 |
+
}
|
2042 |
+
}, 200);
|
2043 |
+
},
|
2044 |
+
stopAnimateTyping() {
|
2045 |
+
var that = this,
|
2046 |
+
$wrapp = $('.js-dgwt-wcas-search-wrapp'),
|
2047 |
+
$searchBar = $('.js-dgwt-wcas-search-input'),
|
2048 |
+
$closeEl = $('.dgwt-wcas-preloader');
|
2049 |
+
|
2050 |
+
$closeEl.removeClass('dgwt-wcas-close');
|
2051 |
+
$searchBar.val('');
|
2052 |
+
$closeEl.html('');
|
2053 |
+
$wrapp.removeClass('dgwt-wcas-search-filled');
|
2054 |
+
|
2055 |
+
clearInterval(that.animateTypingInterval);
|
2056 |
}
|
2057 |
};
|
2058 |
|
assets/js/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var s={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=t('[name="'+s+'"]').closest("."+this.groupSel),a=t('[name="'+s+'"]:checked').val(),o="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(o="wcas-opt-"+a),t("."+o).length>0&&t("."+o).fadeIn()},hideAll:function(t){t.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var s=this;t("."+s.inputSel).on("change",function(){s.reloadChoices(t(this).attr("name"))})},init:function(){var s=this,e=t("."+s.inputSel+":checked");e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(s){var e=s.is(":checked"),a=this.getGroupSelector(s);t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&t("."+a).each(function(){t(this).hasClass("js-dgwt-wcas-adv-settings")&&t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||t(this).fadeIn()})},getGroupSelector(s){var e=s.closest(".dgwt-wcas-options-cb-toggle"),a="",o=e.attr("class").split(/\s+/);return t.each(o,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=s)}),a},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.reloadChoices(t(this))})},refresh:function(){var s=this,e=t("."+s.inputSel);e.length>0&&e.each(function(){var e=t(this).is(":checked"),a=s.getGroupSelector(t(this));e?t("."+a).fadeIn():t("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.reloadChoices(t(this))}))}},a={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(t){t.is(":checked")?t.closest("label").next().fadeIn():t.closest("label").next().hide()},registerListeners:function(){var s=this;t(document).on("change","."+s.inputSel,function(){s.toogleSibling(t(this))})},init:function(){var s=this,e=t("."+s.inputSel);e.length>0&&(s.registerListeners(),e.each(function(){s.toogleSibling(t(this))}))}},o={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",mobileBreakpoint:"input[id*='mobile_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$select:null,$overlayMobileEl:null,$mobileBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var s=this.$select.find("option:selected").val(),e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$overlayMobileEl),this.hideOption(this.$mobileBreakpointEl),this.hideOption(this.$searchIconColorEl),t("input[id*='bg_search_icon_color']").closest("tr").show(),s){case"icon":e&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":e&&(this.showOption(this.$mobileBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:e&&(this.showOption(this.$overlayMobileEl),t("input[id*='bg_search_icon_color']").closest("tr").hide(),this.$overlayMobileEl.is(":checked")&&this.showOption(this.$mobileBreakpointEl))}},hideOption:function(t){t.closest("tr").hide()},showOption:function(t){t.closest("tr").show()},registerListeners:function(){var t=this;t.$select.on("change",function(){t.setConditions()}),t.$overlayMobileEl.on("change",function(){t.setConditions()})},init:function(){var s=this,e=t(s.layoutSelect);e.length>0&&(s.$select=e,s.$overlayMobileEl=t(s.overlayMobile),s.$mobileBreakpointEl=t(s.mobileBreakpoint),s.$searchIconColorEl=t(s.searchIconColor),s.registerListeners(),setTimeout(function(){s.setConditions()},400))}},i={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",getWrapper:function(){return t("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var s=this;t(document).on("click","."+s.actionTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),t("."+s.indexerTabErrorClass).removeClass("active"),t("."+s.indexerTabProgressClass).addClass("active");var o=!!a.hasClass("js-ajax-build-index-emergency");o&&(t(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),t(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:o,_wpnonce:dgwt_wcas.nonces.build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled"),t(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),o&&window.location.reload()}})}),t(document).on("click","."+s.actionStopTriggerClass,function(e){e.preventDefault();var a=t(this);a.attr("disabled","disabled"),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(t){void 0!==t&&t.success&&(s.getWrapper().html(t.data.html),s.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var s=this;setTimeout(function(){t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(e){void 0!==e&&e.success&&(s.getWrapper().html(e.data.html),e.data.loop?s.heartbeat():(t("."+s.indexerTabProgressClass).removeClass("active"),"error"===e.data.status&&t("."+s.indexerTabErrorClass).addClass("active")),!e.data.loop&&e.data.refresh_once.length>0&&(document.cookie.split(";").some(function(t){return 0===t.trim().indexOf("dgwt_wcas_refresh_once="+e.data.refresh_once)})||"none"!==t("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+e.data.refresh_once,location.reload())))}})},1e3)},detailsToggle:function(){var s;t(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=t(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),t(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),s=!1):(a.addClass("show"),a.removeClass("hide"),t(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),t(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),s=!0),t.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:s}})})},init:function(){this.registerListeners(),t("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},n={init:function(){var s=this;t(".dgwt-wcas-selectize").length>0&&t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:t(".dgwt-wcas-selectize").data("security")},success:function(t){void 0!==t&&void 0!==t.data&&s.initSelectize(t.data)}})},initSelectize:function(s){var e=t(".dgwt-wcas-selectize");e.length>0&&e.each(function(){var e=t(this),a=e.data("options"),o=s;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var i="";a.forEach(function(t,s){if((s+1)%2==0){var e={value:t,label:i};o.push(e),i=""}i=t})}t(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:o,create:function(t){return{value:t.key,label:t.label}},load:function(s,a){if(!s.length)return a();t.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:e.data("security")},error:function(){a()},success:function(t){a(t.data)}})}})})}},c={init:function(){var s=t(".js-dgwt-wcas-tooltip");s.length>0&&s.each(function(){var s=t(this)[0],e=t(this).data("tooltip-html-el"),a=t(this).data("tooltip-placement");if(e){new DgwtWcasTooltip(s,{title:t("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:a,trigger:"hover",html:!0})}})}},r={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var s=this;t(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",s.saveChoice(e)})},setStartingState:function(){var s=t("."+this.advClass);s.length>0&&(t(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(s.show(),e.refresh()):s.hide())},saveChoice:function(s){t(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),t.ajax({url:ajaxurl,data:{_wpnonce:dgwt_wcas.nonces.advanced_options_switch,action:"dgwt_wcas_adv_settings",adv_settings_value:s}}).done(function(s){t(".dgwt-wcas-adv-settings-saving").remove()});var e=t(".js-dgwt-wcas-adv-settings-toggle");"show"===s&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===s&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(s)},toggleAdvancedOpt:function(s){var a=this,i=t("."+a.advClass);i.length>0&&(i.addClass(a.highlightClass),i.addClass(a.transClass),"show"===s&&i.fadeIn(500,function(){setTimeout(function(){i.removeClass(a.highlightClass),setTimeout(function(){i.removeClass(a.transClass),e.refresh(),o.setConditions()},500)},500)}),"hide"===s&&setTimeout(function(){i.removeClass(a.transClass),i.fadeOut(500,function(){i.removeClass(a.highlightClass)})},500))}},l={placeholderClass:"js-dgwt-wcas-stats-placeholder",placeholderClassLoaded:"js-dgwt-wcas-stats-placeholder-loaded",preloaderClass:"dgwt-wcas-stats-preloader",settingsGroupSel:"#dgwt_wcas_analytics",criticalSearchesLoadMoreClass:"js-dgwt-wcas-critical-searches-load-more",autocompleteWithResultsLoadMoreClass:"js-dgwt-wcas-autocomplete-with-results-load-more",searchPageWithResultsLoadMoreClass:"js-dgwt-wcas-search-page-with-results-load-more",checkPhraseStatusClass:"js-dgwt-wcas-stats-critical-check",checkPhraseStatusInitClass:"js-dgwt-wcas-stats-critical-check-init",rowLoadingClass:"dgwt-wcas-analytics-row-loading",languageSwitcherClass:"js-dgwt-wcas-analytics-lang",excludePhraseClass:"js-dgwt-wcas-analytics-exclude-phrase",checkIndexerAction:"js-dgwt-wcas-analytics-check-indexer",init:function(){void 0!==dgwt_wcas.analytics&&dgwt_wcas.analytics.enabled&&this.interfaceLoaderListener()},interfaceLoaderListener:function(){var s=this,e=t("."+s.languageSwitcherClass);t(document).on("dgwt_wcas_settings_group_active",function(e,a){t(a).length>0&&"dgwt_wcas_analytics"===a.id&&(s.isLoaded()||s.loadInterface())}),e.length>0&&e.on("change",function(){var e=t("."+s.placeholderClass);e.length>0&&(e.html(""),s.loadInterface())})},isLoaded:function(){return t("."+this.placeholderClassLoaded).length>0},showPreloader:function(){var s=t("."+this.placeholderClass),e='<img class="'+this.preloaderClass+'" src="'+dgwt_wcas.analytics.images.placeholder+'" />';s.length&&s.append(e)},loadInterface:function(){var s=this,e=t("."+s.languageSwitcherClass+" option:selected");s.showPreloader();var a={action:"dgwt_wcas_load_stats_interface",_wpnonce:dgwt_wcas.analytics.nonce.analytics_load_interface};e.length>0&&(a.lang=e.val()),t.post(ajaxurl,a,function(e){var a=t("."+s.placeholderClass);"object"==typeof e&&e.success&&a.length>0&&(a.addClass(s.placeholderClassLoaded),a.html(e.data.html),s.loadCheckCriticalSearchesListeners(),s.loadMoreListeners())})},loadCheckCriticalSearchesListeners:function(){var s=this,e=t("."+s.checkPhraseStatusClass+":not(."+s.checkPhraseStatusInitClass+")");e.on("click",function(e){e.preventDefault(),t(e.target).after('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),s.checkPhraseStatus(t(e.target))}),e.each(function(){t(this).addClass(s.checkPhraseStatusInitClass)})},loadMoreListeners:function(){var s=this;t("."+s.criticalSearchesLoadMoreClass).on("click",function(e){e.preventDefault(),t(this).before('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),t(this).closest("tr").addClass(s.rowLoadingClass),s.loadMoreCriticalSearches()}),t("."+s.autocompleteWithResultsLoadMoreClass).on("click",function(e){e.preventDefault(),s.loadMorePhrases("autocomplete",t(e.target))}),t("."+s.searchPageWithResultsLoadMoreClass).on("click",function(e){e.preventDefault(),s.loadMorePhrases("search-page",t(e.target))})},checkPhraseStatus:function(s){var e=this,a=t("."+e.languageSwitcherClass+" option:selected"),o={action:"dgwt_wcas_check_critical_phrase",phrase:s.closest("tr").find("td:nth-child(2)").text(),_wpnonce:dgwt_wcas.analytics.nonce.check_critical_phrase};a.length>0&&(o.lang=a.val()),t.post(ajaxurl,o,function(a){if("object"==typeof a&&a.success){var o=s.closest("tr");s.closest("td").html(a.data.html);var i=o.find("."+e.excludePhraseClass),n=o.find("."+e.checkIndexerAction);i.length>0&&i.on("click",function(s){s.preventDefault();t(s.target).closest("td").html("<p>Processing...</p>"),e.excludePhrase(o)}),n.length>0&&t("."+e.checkIndexerAction).on("click",function(s){s.preventDefault();var e=t("#dgwt_wcas_performance-tab");e.length>0&&(e[0].click(),t([document.documentElement,document.body]).animate({scrollTop:0},1e3))})}})},excludePhrase:function(s){var e=t("."+this.languageSwitcherClass+" option:selected"),a={action:"dgwt_wcas_exclude_critical_phrase",phrase:s.find("td:nth-child(2)").text(),_wpnonce:dgwt_wcas.analytics.nonce.exclude_critical_phrase};e.length>0&&(a.lang=e.val()),t.post(ajaxurl,a,function(t){"object"==typeof t&&t.success&&(s.addClass("dgwt-wcas-analytics-disable-row"),s.find("td:last-child").html(t.data))})},loadMoreCriticalSearches:function(){var s=this,e=t("."+s.languageSwitcherClass+" option:selected"),a={action:"dgwt_wcas_laod_more_critical_searches",loaded:t(".js-dgwt-wcas-critical-searches-row").length,_wpnonce:dgwt_wcas.analytics.nonce.load_more_critical_searches};e.length>0&&(a.lang=e.val()),t.post(ajaxurl,a,function(e){if("object"==typeof e&&e.success){var a=t("."+s.criticalSearchesLoadMoreClass).closest("tr");e.data.html.length>0&&a.before(e.data.html),e.data.more>0?(a.removeClass(s.rowLoadingClass),a.find("img").remove(),t("."+s.criticalSearchesLoadMoreClass+" span:first-child").text(e.data.more_label),s.loadCheckCriticalSearchesListeners()):a.remove()}})},loadMorePhrases:function(s,e){var a=t("."+this.languageSwitcherClass+" option:selected");if(e.before('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),e.closest("tr").addClass(this.rowLoadingClass),"autocomplete"===s)var o={action:"dgwt_wcas_laod_more_autocomplete",loaded:t(".js-dgwt-wcas-autocomplete-row").length,_wpnonce:dgwt_wcas.analytics.nonce.load_more_autocomplete};else o={action:"dgwt_wcas_laod_more_search_page",loaded:t(".js-dgwt-wcas-search-page-row").length,_wpnonce:dgwt_wcas.analytics.nonce.load_more_search_page};a.length>0&&(o.lang=a.val()),t.post(ajaxurl,o,function(t){"object"==typeof t&&t.success&&e.closest("tbody").html(t.data.html)})}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=t(".js-dgwt-wcas-preview"),this.searchWrapp=t(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=t(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=t(".js-dgwt-wcas-details-wrapp"),this.searchInput=t(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(t){return!!(t.length>0&&t.is(":checked"))},isColor:function(t){return"string"==typeof t&&7===t.length&&"#"===t.charAt(0)},camelCase:function(t){for(var s=t.split("_"),e="",a=0;a<s.length;a++)e+=s[a].charAt(0).toUpperCase()+s[a].slice(1);return e},disableSubmit:function(){var s,e;t(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var o=a.pageX-100,i=a.pageY+10;void 0!==s&&(clearTimeout(s),e&&e.remove()),t("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=t(".dgwt-wcas-click-alert")).css({left:o,top:i}),t(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),s=setTimeout(function(){e.fadeOut(500,function(){t(this).remove(),t(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var s=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";t(document).on("focus",a,function(){t(e).addClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),s.detailsWrapp.addClass("dgwt-wcas-hide"),s.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),t(document).on("blur",a,function(){t(e).removeClass("dgwt-wcas-hide"),t(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),s.detailsWrapp.removeClass("dgwt-wcas-hide"),s.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var s=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_categories_images","show_matching_tags","show_matching_brands","show_brands_images","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var o="input[id='dgwt_wcas_settings\\["+e[a]+"\\]']",i="input[id^='dgwt_wcas_settings'][data-option-trigger='"+e[a]+"']",n=t(o),c=t(i);methodToCall="onChange"+s.camelCase(e[a]),"function"==typeof s[methodToCall]&&n.length>0?(s[methodToCall](n,n.val()),t(document).on("change",o,function(){methodToCall=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):"function"==typeof s[methodToCall]&&c.length>0?(s[methodToCall](c,c.val()),t(document).on("change",i,function(){methodToCall=t(this).data("option-trigger"),methodToCall="onChange"+s.camelCase(methodToCall),"function"==typeof s[methodToCall]&&s[methodToCall](t(this),this.value)})):s[methodToCall]("","")}},onColorHandler:function(){for(var s=this,e=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<e.length;a++){var o="input[id*='"+e[a]+"']",i=t(o),n="onColor"+s.camelCase(e[a]);s[n](i,i.val()),t(document).on("change",o,function(e){n=t(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+s.camelCase(n),s[n](t(this),this.value)})}},onColorChangeHandler:function(t,s){var e=t.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](t,s)},onTypeHandler:function(){for(var s=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var o="input[id*='"+e[a]+"']",i=t(o),n="onType"+s.camelCase(e[a]);s[n](i,i.val()),t(document).on("input",o,function(e){n=t(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+s.camelCase(n),s[n](t(e.target),this.value)})}},onChangeMaxFormWidth:function(s,e){e.length>0&&"0"!=e?(this.searchWrapp.css("max-width",e+"px"),this.suggestionWrapp.css("max-width",e+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox(t("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(s,e){var a=t(".js-dgwt-wcas-search-submit");if(this.isChecked(s)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var o=t("input[id*='bg_submit_color']"),i=t("input[id*='text_submit_color']");this.onColorBgSubmitColor(o,o.val()),this.onColorTextSubmitColor(i,i.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),t(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(s,e){var a=t(".js-dgwt-wcas-si"),o=t(".js-dgwt-wcas-content-wrapp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),t(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),o.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),o.each(function(){t(this).closest(".dgwt-wcas-suggestion-product").append(t(this).html())}),o.hide(),a.hide())},onChangeShowProductSku:function(s,e){var a=t(".js-dgwt-wcas-sku");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(s,e){var a=t(".js-dgwt-wcas-sd");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(s,e){var a=t(".js-dgwt-wcas-sp");this.isChecked(s)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-cat"),o=t(".dgwt-wcas-suggestion-cat");this.isChecked(s)?(a.show(),o.show(),o.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),o.hide(),o.addClass("js-dgwt-wcas-suggestion-hidden"));var i=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(i,i.val())},onChangeShowCategoriesImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-cat");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-tag"),o=t(".dgwt-wcas-suggestion-tag");this.isChecked(s)?(a.show(),o.show(),o.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),o.hide(),o.addClass("js-dgwt-wcas-suggestion-hidden"));var i=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(i,i.val())},onChangeShowMatchingBrands:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-brand"),o=t(".dgwt-wcas-suggestion-brand");this.isChecked(s)?(a.show(),o.show(),o.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),o.hide(),o.addClass("js-dgwt-wcas-suggestion-hidden"));var i=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(i,i.val())},onChangeShowBrandsImages:function(s,e){var a=t(".js-dgwt-wcas-suggestion-brand");this.isChecked(s)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-post"),o=t(".dgwt-wcas-suggestion-post");this.isChecked(s)?(a.show(),o.show(),o.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),o.hide(),o.addClass("js-dgwt-wcas-suggestion-hidden"));var i=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(i,i.val())},onChangeShowMatchingPages:function(s,e){var a=t(".dgwt-wcas-suggestion-headline-page"),o=t(".dgwt-wcas-suggestion-page");this.isChecked(s)?(a.show(),o.show(),o.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(t("input[id*='show_grouped_results']"))):(a.hide(),o.hide(),o.addClass("js-dgwt-wcas-suggestion-hidden"));var i=t("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(i,i.val())},onChangeShowGroupedResults:function(s,e){var a=t(".dgwt-wcas-st--direct-headline"),o=t(".dgwt-wcas-suggestion-headline");this.isChecked(s)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),t(".dgwt-wcas-suggestion-headline").show(),this.isChecked(t("input[data-option-trigger='show_matching_categories']"))||t(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(t("input[data-option-trigger='show_matching_tags']"))||t(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(t("input[data-option-trigger='show_matching_brands']"))||t(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(t("input[id*='show_matching_posts']"))||t(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(t("input[id*='show_matching_pages']"))||t(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),o.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(s,e){setTimeout(function(){var a=0,o=7,i=t(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(o=Math.abs(e)),i.length>0&&i.remove();var c=[];for(a=0;a<n.length;a++){var r=t(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");r.length>0&&c.push(r)}var l=c.length;if(c.length>0)for(var d=o-c.length,g=c.length-1;d>0;){var h=c[g].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),c[g].after(h),l++,--g<0&&(g=c.length-1),d--}l>o&&s.val(l)},10)},onChangeShowDetailsBox:function(s,e){var a=this;a.isChecked(s)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){if(t(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected"),a.searchWrapp.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var s=getComputedStyle(a.searchWrapp[0]).width;(s=Math.round(parseFloat(s.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(s/2)),a.detailsWrapp.css("width",Math.round(s/2))):(a.suggestionWrapp.css("width",Math.floor(s/2)),a.detailsWrapp.css("width",Math.ceil(s/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),t(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorSearchIconColor:function(t,s){},onColorBgInputColor:function(t,s){this.isColor(s)?this.searchInput.css("background-color",s):this.searchInput.css("background-color","")},onColorTextInputColor:function(s,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var o='<style class="'+a+'">';o+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",o+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",o+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",o+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",o+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",o+=".dgwt-wcas-ico-magnifier path {fill:"+e+"}",o+="</style>",t("head").append(o),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var i=t("."+a);i.length>0&&i.remove()}},onColorBorderInputColor:function(t,s){this.isColor(s)?this.searchInput.css("border-color",s):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(s,e){if(this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)){var a='<style class="dgwt-wcas-preview-submit-style">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+e+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+e+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+e+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+e+"!important;}",a+="</style>",t("head").append(a)}else{var o=t(".dgwt-wcas-preview-submit-style");o.length>0&&o.remove()}},onColorTextSubmitColor:function(s,e){this.isChecked(t("input[id*='show_submit_button']"))&&this.isColor(e)?(t(".js-dgwt-wcas-search-submit").css("color",e),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",e)):(this.searchInput.css("background-color",""),t(".js-dgwt-wcas-search-submit").css("color",""),t(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(s,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var o='<style class="'+a+'">';o+=".dgwt-wcas-suggestions-wrapp,",o+=".dgwt-wcas-details-wrapp",o+="{background-color: "+e+"!important;}",o+="</style>",t("head").append(o)}else{var i=t("."+a);i.length>0&&i.remove()}},onColorSugHoverColor:function(s,e){this.isColor(e)?setTimeout(function(){t(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):t(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(s,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var o='<style class="'+a+'">';o+=".dgwt-wcas-suggestions-wrapp *,",o+=".dgwt-wcas-details-wrapp *,",o+=".dgwt-wcas-sd,",o+=".dgwt-wcas-suggestion *",o+="{color: "+e+"!important;}",o+="</style>",t("head").append(o)}else{var i=t("."+a);i.length>0&&i.remove()}},onColorSugHighlightColor:function(s,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var o='<style class="'+a+'">';o+=".dgwt-wcas-st strong,",o+=".dgwt-wcas-sd strong",o+="{color: "+e+"!important;}",o+="</style>",t("head").append(o)}else{var i=t("."+a);i.length>0&&i.remove()}},onColorSugBorderColor:function(s,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var o='<style class="'+a+'">';o+=".dgwt-wcas-suggestions-wrapp,",o+=".dgwt-wcas-details-wrapp,",o+=".dgwt-wcas-suggestion,",o+=".dgwt-wcas-datails-title,",o+=".dgwt-wcas-details-more-products",o+="{border-color: "+e+"!important;}",o+="</style>",t("head").append(o)}else{var i=t("."+a);i.length>0&&i.remove()}},onTypeSearchSubmitText:function(s,e){var a=t(".js-dgwt-wcas-search-submit-l"),o=t(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),o.hide()):(a.text(""),a.hide(),o.show())},onTypeSearchPlaceholder:function(t,s){0==s.length&&(s=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",s)},onTypeSearchNoResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.no_results),t(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(s,e){0==e.length&&(e=dgwt_wcas.labels.show_more),t(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var s=this;t(document).on("click","#dgwt_wcas_autocomplete-tab",function(){s.onChangeShowDetailsBox(t("input[id*='show_details_box']"))})}};var d={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",maintenanceAnalyticsButtonName:"dgwt-wcas-maintenance-analytics",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var s=this;if(void 0===dgwt_wcas.troubleshooting)return;const e=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;e>0&&(t(s.counterClass).text(e).addClass("active"),t(s.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.results_async,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&t.each(dgwt_wcas.troubleshooting.tests.direct,function(){s.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&s.maybeRunNextAsyncTest(),t(document).on("click",'input[name="'+s.resetButtonName+'"]',function(e){t('input[name="'+s.resetButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_reset_async_tests",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.fixOutofstockButtonName+'"]',function(e){t('input[name="'+s.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_fix_outofstock",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.maintenanceAnalyticsButtonName+'"]',function(e){t('input[name="'+s.maintenanceAnalyticsButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var a={action:"dgwt_wcas_troubleshooting_maintenance_analytics",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_maintenance_analytics};return t.post(ajaxurl,a,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.switchAlternativeEndpoint+'"]',function(e){var a=1===parseInt(t(this).data("switch"))?"enable":"disable";t('input[name="'+s.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var o={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:a};return t.post(ajaxurl,o,function(){location.reload()}),!1}),t(document).on("click",'input[name="'+s.dismissElementorTemplateButtonName+'"]',function(e){t('input[name="'+s.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var a={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template",_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return t.post(ajaxurl,a,function(){location.reload()}),!1})},appendIssue:function(s,e){var a,o=wp.template("dgwt-wcas-troubleshooting-issue"),i=t(this.issuesListClass+"-"+s.status);"good"!==s.status&&(t(this.noIssuesClass).hide(),e&&dgwt_wcas.troubleshooting.tests.issues[s.status]++,(a=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&(t(this.counterClass).text(a).addClass("active"),t(this.settingsTab).addClass("enabled")),t(i).append(o(s)))},maybeRunNextAsyncTest:function(){var s=this;dgwt_wcas.troubleshooting.tests.async.length>0&&t.each(dgwt_wcas.troubleshooting.tests.async,function(){var e={action:"dgwt_wcas_troubleshooting_test",test:this.test,_wpnonce:dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,t(s.progressBar).show(),t.post(ajaxurl,e,function(t){t.success&&s.appendIssue(t.data,!0),s.maybeRunNextAsyncTest()}),!1)}),s.recalculateProgression()},recalculateProgression:function(){var s=this,e=dgwt_wcas.troubleshooting.tests.async.length,a=0;t.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&a++});var o=Math.ceil(a/e*100);t(s.progressBarInner).css("width",o+"%"),100===o&&setTimeout(function(){t(s.progressBar).slideUp()},2e3)}},g={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var s=t(this.moveOptionClass);s.length>0&&t.each(s,function(s,e){var a=t("#"+t(e).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));a.length>0&&(t(e).closest("tr").hasClass("dgwt-wcas-premium-only")&&t(e).addClass("dgwt-wcas-premium-only"),t(e).clone().appendTo(a.closest("td fieldset"))),t(e).closest("tr").remove()})}},h=function(){if("undefined"!=typeof Vue){Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize:Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(t){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var t=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){t.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(s){var e=void 0===dgwt_wcas_filters_rules_selected_options[s]?[]:dgwt_wcas_filters_rules_selected_options[s];return function({nonce:s,options:e,type:a}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:e,preload:!0,create:function(t){return{value:t.key,label:t.label}},load:function(e,o){t.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:e,type:a,_wpnonce:s},error:function(){o()},success:function(t){o(t.data)}})}}}({nonce:this.nonce,type:s,options:e})}}});new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize:Selectize},data:()=>({rules:[]}),mounted(){try{const s=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);t.each(s,function(t,e){s[t].key=Math.random()}),this.rules=s}catch(t){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(t){this.rules[t].values=[],this.updateInput()},deleteRule(t){this.rules=this.rules.filter(function(s,e){return e!==t}),this.updateInput()},updateInput(){const t=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(t.map(function(t){return t.key,delete t.key,t}))}}})}};t(document).ready(function(){var w,u;(w=t(".js-dgwt-wcas-settings-margin-nob")).length>0&&w.each(function(){var s=t(this).find("td .dgwt-wcas-fieldset");if(s.length>0){var e=t(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=t(this).attr("class").split(/\s+/),o="";t.each(a,function(t,s){-1!==s.indexOf("js-dgwt-wcas-cbtgroup-")&&(o=s)});var i=s.clone(!0,!0);i.addClass("dgwt-wcas-settings-margin-nob"),o&&i.addClass(o),i.appendTo(e.find("td")),t(this).remove()}}}),s.init(),e.init(),o.init(),(u=t(".js-dgwt-wcas-sgs-autocolspan")).length>0&&u.find("td").attr("colspan",2),i.init(),n.init(),c.init(),r.init(),d.init(),g.init(),a.init(),l.init(),h(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
|
1 |
+
!function($){var a={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(c){var d=this,e=$('[name="'+c+'"]').closest("."+d.groupSel),a=$('[name="'+c+'"]:checked').val(),b="";d.hideAll(e),(a=a.replace("_","-")).length>0&&(b="wcas-opt-"+a),$("."+b).length>0&&$("."+b).fadeIn()},hideAll:function(a){a.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var a=this;$("."+a.inputSel).on("change",function(){a.reloadChoices($(this).attr("name"))})},init:function(){var a=this,b=$("."+a.inputSel+":checked");b.length>0&&(a.registerListeners(),b.each(function(){a.reloadChoices($(this).attr("name"))}))}},b={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(a){var c=a.is(":checked"),b=this.getGroupSelector(a);$("."+b+":not(.dgwt-wcas-options-cb-toggle)").hide(),c&&$("."+b).each(function(){$(this).hasClass("js-dgwt-wcas-adv-settings")&&$(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||$(this).fadeIn()})},getGroupSelector(a){var b=a.closest(".dgwt-wcas-options-cb-toggle"),c="",d=b.attr("class").split(/\s+/);return $.each(d,function(b,a){-1!==a.indexOf("js-dgwt-wcas-cbtgroup-")&&(c=a)}),c},registerListeners:function(){var a=this;$(document).on("change","."+a.inputSel,function(){a.reloadChoices($(this))})},refresh:function(){var b=this,a=$("."+b.inputSel);a.length>0&&a.each(function(){var c=$(this).is(":checked"),a=b.getGroupSelector($(this));c?$("."+a).fadeIn():$("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var a=this,b=$("."+a.inputSel);b.length>0&&(a.registerListeners(),b.each(function(){a.reloadChoices($(this))}))}},c={inputSel:"js-dgwt-wcas-options-toggle-sibling input[type=checkbox]",toogleSibling:function(a){a.is(":checked")?a.closest("label").next().fadeIn():a.closest("label").next().hide()},registerListeners:function(){var a=this;$(document).on("change","."+a.inputSel,function(){a.toogleSibling($(this))})},init:function(){var a=this,b=$("."+a.inputSel);b.length>0&&(a.registerListeners(),b.each(function(){a.toogleSibling($(this))}))}},d={layoutSelect:"select[id*='search_layout']",overlayMobile:"input[id*='enable_mobile_overlay']",switchLayoutBreakpoint:"input[id*='mobile_breakpoint']",mobileOverlayBreakpoint:"input[id*='mobile_overlay_breakpoint']",searchIconColor:"input[id*='search_icon_color']",$layoutSelectEl:null,$overlayMobileEl:null,$switchLayoutBreakpointEl:null,$mobileOverlayBreakpointEl:null,$searchIconColorEl:null,setConditions:function(){var b=this.$layoutSelectEl.find("option:selected").val(),c=this.$overlayMobileEl.is(":checked"),a=$(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled");switch(this.hideOption(this.$switchLayoutBreakpointEl),this.hideOption(this.$mobileOverlayBreakpointEl),this.hideOption(this.$searchIconColorEl),$("input[id*='bg_search_icon_color']").closest("tr").show(),b){case"icon":a&&this.showOption(this.$searchIconColorEl);break;case"icon-flexible":case"icon-flexible-inv":a&&(this.showOption(this.$switchLayoutBreakpointEl),this.showOption(this.$searchIconColorEl));break;default:a&&$("input[id*='bg_search_icon_color']").closest("tr").hide()}c&&this.showOption(this.$mobileOverlayBreakpointEl)},hideOption:function(a){a.closest("tr").hide()},showOption:function(a){a.closest("tr").show()},registerListeners:function(){var a=this;a.$layoutSelectEl.on("change",function(){a.setConditions()}),a.$overlayMobileEl.on("change",function(){a.setConditions()})},init:function(){var a=this,b=$(a.layoutSelect);b.length>0&&(a.$layoutSelectEl=b,a.$overlayMobileEl=$(a.overlayMobile),a.$switchLayoutBreakpointEl=$(a.switchLayoutBreakpoint),a.$mobileOverlayBreakpointEl=$(a.mobileOverlayBreakpoint),a.$searchIconColorEl=$(a.searchIconColor),a.registerListeners(),setTimeout(function(){a.setConditions()},400))}},e={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",indexerTabProgressClass:"js-dgwt-wcas-indexer-tab-progress",indexerTabErrorClass:"js-dgwt-wcas-indexer-tab-error",indexerMenuErrorClass:"dgwt-wcas-menu-warning-icon",getWrapper:function(){return $("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var a=this;$(document).on("click","."+a.actionTriggerClass,function(d){d.preventDefault();var b=$(this);b.attr("disabled","disabled"),$(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait"),$("."+a.indexerTabErrorClass).removeClass("active"),$("."+a.indexerTabProgressClass).addClass("active");var c=!!b.hasClass("js-ajax-build-index-emergency");c&&($(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),$(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),$.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:c,_wpnonce:dgwt_wcas.nonces.build_index},success:function(b){void 0!==b&&b.success&&(a.getWrapper().html(b.data.html),a.heartbeat())},complete:function(){b.removeAttr("disabled"),$(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),c&&window.location.reload()}})}),$(document).on("click","."+a.actionStopTriggerClass,function(b){b.preventDefault(),$(this).attr("disabled","disabled"),a.getWrapper().attr("data-stopping","1"),$.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index",_wpnonce:dgwt_wcas.nonces.stop_build_index},success:function(b){void 0!==b&&b.success&&(a.getWrapper().html(b.data.html),a.heartbeat())},complete:function(){a.getWrapper().attr("data-stopping","0")}})})},heartbeat:function(){var a=this;setTimeout(function(){$.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat",_wpnonce:dgwt_wcas.nonces.build_index_heartbeat},success:function(b){void 0!==b&&b.success&&"1"!==a.getWrapper().attr("data-stopping")&&(a.getWrapper().html(b.data.html),b.data.loop?a.heartbeat():($("."+a.indexerTabProgressClass).removeClass("active"),"error"===b.data.status?$("."+a.indexerTabErrorClass).addClass("active"):"completed"===b.data.status&&$("."+a.indexerMenuErrorClass).remove()),b.data.loop||!(b.data.refresh_once.length>0)||document.cookie.split(";").some(function(a){return 0===a.trim().indexOf("dgwt_wcas_refresh_once="+b.data.refresh_once)})||"none"!==$("#dgwt_wcas_troubleshooting-tab").css("display")||(document.cookie="dgwt_wcas_refresh_once="+b.data.refresh_once,location.reload()))}})},1e3)},detailsToggle:function(){var a;$(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(c){c.preventDefault();var b=$(".js-dgwt-wcas-indexer-details");b.hasClass("show")?(b.removeClass("show"),b.addClass("hide"),$(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),$(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),a=!1):(b.addClass("show"),b.removeClass("hide"),$(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),$(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),a=!0),$.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:a}})})},init:function(){this.registerListeners(),$("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},f={init:function(){var a=this;$(".dgwt-wcas-selectize").length>0&&$.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:$(".dgwt-wcas-selectize").data("security")},success:function(b){void 0!==b&& void 0!==b.data&&a.initSelectize(b.data)}})},initSelectize:function(b){var a=$(".dgwt-wcas-selectize");a.length>0&&a.each(function(){var c=$(this),a=c.data("options"),d=b;if(a.length>0){a=JSON.parse('["'+decodeURI(a.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var e="";a.forEach(function(a,b){if((b+1)%2==0){var c={value:a,label:e};d.push(c),e=""}e=a})}$(this).selectize({persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["value","label"],options:d,create:function(a){return{value:a.key,label:a.label}},load:function(a,b){if(!a.length)return b();$.ajax({url:ajaxurl,data:{action:"dgwt_wcas_settings_list_custom_fields",_wpnonce:c.data("security")},error:function(){b()},success:function(a){b(a.data)}})}})})}},g={init:function(){var a=$(".js-dgwt-wcas-tooltip");a.length>0&&a.each(function(){var b=$(this)[0],a=$(this).data("tooltip-html-el"),c=$(this).data("tooltip-placement");a&&new DgwtWcasTooltip(b,{title:$("."+a+" > .dgwt-wcas-tooltip-wrapper")[0],placement:c,trigger:"hover",html:!0})})}},h={advClass:"js-dgwt-wcas-adv-settings",highlightClass:"dgwt-wcas-opt-highlight",transClass:"dgwt-wcas-opt-transition",init:function(){this.clickListener(),this.setStartingState()},clickListener:function(){var a=this;$(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var b;b=$(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",a.saveChoice(b)})},setStartingState:function(){var a=$("."+this.advClass);a.length>0&&($(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(a.show(),b.refresh()):a.hide())},saveChoice:function(a){$(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),$.ajax({url:ajaxurl,data:{_wpnonce:dgwt_wcas.nonces.advanced_options_switch,action:"dgwt_wcas_adv_settings",adv_settings_value:a}}).done(function(a){$(".dgwt-wcas-adv-settings-saving").remove()});var b=$(".js-dgwt-wcas-adv-settings-toggle");"show"===a&&(b.removeClass("woocommerce-input-toggle--disabled"),b.addClass("woocommerce-input-toggle--enabled")),"hide"===a&&(b.removeClass("woocommerce-input-toggle--enabled"),b.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(a)},toggleAdvancedOpt:function(e){var c=this,a=$("."+c.advClass);a.length>0&&(a.addClass(c.highlightClass),a.addClass(c.transClass),"show"===e&&a.fadeIn(500,function(){setTimeout(function(){a.removeClass(c.highlightClass),setTimeout(function(){a.removeClass(c.transClass),b.refresh(),d.setConditions()},500)},500)}),"hide"===e&&setTimeout(function(){a.removeClass(c.transClass),a.fadeOut(500,function(){a.removeClass(c.highlightClass)})},500))}},i={placeholderClass:"js-dgwt-wcas-stats-placeholder",placeholderClassLoaded:"js-dgwt-wcas-stats-placeholder-loaded",preloaderClass:"dgwt-wcas-stats-preloader",settingsGroupSel:"#dgwt_wcas_analytics",criticalSearchesLoadMoreClass:"js-dgwt-wcas-critical-searches-load-more",autocompleteWithResultsLoadMoreClass:"js-dgwt-wcas-autocomplete-with-results-load-more",searchPageWithResultsLoadMoreClass:"js-dgwt-wcas-search-page-with-results-load-more",checkPhraseStatusClass:"js-dgwt-wcas-stats-critical-check",checkPhraseStatusInitClass:"js-dgwt-wcas-stats-critical-check-init",rowLoadingClass:"dgwt-wcas-analytics-row-loading",languageSwitcherClass:"js-dgwt-wcas-analytics-lang",excludePhraseClass:"js-dgwt-wcas-analytics-exclude-phrase",checkIndexerAction:"js-dgwt-wcas-analytics-check-indexer",init:function(){void 0!==dgwt_wcas.analytics&&dgwt_wcas.analytics.enabled&&this.interfaceLoaderListener()},interfaceLoaderListener:function(){var b=this,a=$("."+b.languageSwitcherClass);$(document).on("dgwt_wcas_settings_group_active",function(c,a){$(a).length>0&&"dgwt_wcas_analytics"===a.id&&(b.isLoaded()||b.loadInterface())}),a.length>0&&a.on("change",function(){var a=$("."+b.placeholderClass);a.length>0&&(a.html(""),b.loadInterface())})},isLoaded:function(){return $("."+this.placeholderClassLoaded).length>0},showPreloader:function(){var a=$("."+this.placeholderClass),b='<img class="'+this.preloaderClass+'" src="'+dgwt_wcas.analytics.images.placeholder+'" />';a.length&&a.append(b)},loadInterface:function(){var a=this,b=$("."+a.languageSwitcherClass+" option:selected");a.showPreloader();var c={action:"dgwt_wcas_load_stats_interface","_wpnonce":dgwt_wcas.analytics.nonce.analytics_load_interface};b.length>0&&(c.lang=b.val()),$.post(ajaxurl,c,function(b){var c=$("."+a.placeholderClass);"object"==typeof b&&b.success&&c.length>0&&(c.addClass(a.placeholderClassLoaded),c.html(b.data.html),a.loadCheckCriticalSearchesListeners(),a.loadMoreListeners())})},loadCheckCriticalSearchesListeners:function(){var a=this,b=$("."+a.checkPhraseStatusClass+":not(."+a.checkPhraseStatusInitClass+")");b.on("click",function(b){b.preventDefault(),$(b.target).after('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),a.checkPhraseStatus($(b.target))}),b.each(function(){$(this).addClass(a.checkPhraseStatusInitClass)})},loadMoreListeners:function(){var a=this;$("."+a.criticalSearchesLoadMoreClass).on("click",function(b){b.preventDefault(),$(this).before('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),$(this).closest("tr").addClass(a.rowLoadingClass),a.loadMoreCriticalSearches()}),$("."+a.autocompleteWithResultsLoadMoreClass).on("click",function(b){b.preventDefault(),a.loadMorePhrases("autocomplete",$(b.target))}),$("."+a.searchPageWithResultsLoadMoreClass).on("click",function(b){b.preventDefault(),a.loadMorePhrases("search-page",$(b.target))})},checkPhraseStatus:function(c){var d=this,a=$("."+d.languageSwitcherClass+" option:selected"),b={action:"dgwt_wcas_check_critical_phrase",phrase:c.closest("tr").find("td:nth-child(2)").text(),"_wpnonce":dgwt_wcas.analytics.nonce.check_critical_phrase};a.length>0&&(b.lang=a.val()),$.post(ajaxurl,b,function(a){if("object"==typeof a&&a.success){var b=c.closest("tr");c.closest("td").html(a.data.html);var e=b.find("."+d.excludePhraseClass),f=b.find("."+d.checkIndexerAction);e.length>0&&e.on("click",function(a){a.preventDefault();var c="<p>Processing...</p>";$(a.target).closest("td").html(c),d.excludePhrase(b)}),f.length>0&&$("."+d.checkIndexerAction).on("click",function(b){b.preventDefault();var a=$("#dgwt_wcas_performance-tab");a.length>0&&(a[0].click(),$([document.documentElement,document.body]).animate({scrollTop:0},1e3))})}})},excludePhrase:function(c){var a=$("."+this.languageSwitcherClass+" option:selected"),b={action:"dgwt_wcas_exclude_critical_phrase",phrase:c.find("td:nth-child(2)").text(),"_wpnonce":dgwt_wcas.analytics.nonce.exclude_critical_phrase};a.length>0&&(b.lang=a.val()),$.post(ajaxurl,b,function(a){"object"==typeof a&&a.success&&(c.addClass("dgwt-wcas-analytics-disable-row"),c.find("td:last-child").html(a.data))})},loadMoreCriticalSearches:function(){var c=this,a=$("."+c.languageSwitcherClass+" option:selected"),b={action:"dgwt_wcas_laod_more_critical_searches",loaded:$(".js-dgwt-wcas-critical-searches-row").length,"_wpnonce":dgwt_wcas.analytics.nonce.load_more_critical_searches};a.length>0&&(b.lang=a.val()),$.post(ajaxurl,b,function(a){if("object"==typeof a&&a.success){var b=$("."+c.criticalSearchesLoadMoreClass).closest("tr");a.data.html.length>0&&b.before(a.data.html),a.data.more>0?(b.removeClass(c.rowLoadingClass),b.find("img").remove(),$("."+c.criticalSearchesLoadMoreClass+" span:first-child").text(a.data.more_label),c.loadCheckCriticalSearchesListeners()):b.remove()}})},loadMorePhrases:function(d,b){var c=$("."+this.languageSwitcherClass+" option:selected");if(b.before('<img src="'+dgwt_wcas.images.admin_preloader_url+'" />'),b.closest("tr").addClass(this.rowLoadingClass),"autocomplete"===d)var a={action:"dgwt_wcas_laod_more_autocomplete",loaded:$(".js-dgwt-wcas-autocomplete-row").length,"_wpnonce":dgwt_wcas.analytics.nonce.load_more_autocomplete};else var a={action:"dgwt_wcas_laod_more_search_page",loaded:$(".js-dgwt-wcas-search-page-row").length,"_wpnonce":dgwt_wcas.analytics.nonce.load_more_search_page};c.length>0&&(a.lang=c.val()),$.post(ajaxurl,a,function(a){"object"==typeof a&&a.success&&b.closest("tbody").html(a.data.html)})}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},animateTypingInterval:null,init:function(){var a=this;a.previewWrapper=$(".js-dgwt-wcas-preview"),a.searchWrapp=$(".js-dgwt-wcas-search-wrapp"),a.suggestionWrapp=$(".js-dgwt-wcas-suggestions-wrapp"),a.detailsWrapp=$(".js-dgwt-wcas-details-wrapp"),a.searchInput=$(".js-dgwt-wcas-search-input"),a.onChangeHandler(),a.onColorHandler(),a.onTypeHandler(),a.disableSubmit(),a.noResultsHandler(),a.fixSizesInit(),a.keepPreviewVisible(),a.animationController()},isChecked:function(a){return!!(a.length>0&&a.is(":checked"))},isColor:function(a){return"string"==typeof a&&7===a.length&&"#"===a.charAt(0)},camelCase:function(d){for(var b=d.split("_"),c="",a=0;a<b.length;a++)c+=b[a].charAt(0).toUpperCase()+b[a].slice(1);return c},disableSubmit:function(){var a,b;$(".js-dgwt-wcas-preview-source").on("click",function(c){c.preventDefault();var d=c.pageX-100,e=c.pageY+10;void 0!==a&&(clearTimeout(a),b&&b.remove()),$("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(b=$(".dgwt-wcas-click-alert")).css({left:d,top:e}),$(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),a=setTimeout(function(){b.fadeOut(500,function(){$(this).remove(),$(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var b=this,c=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",d=".js-dgwt-wcas-suggestion-nores",a="input[id*='search_no_results_text']";$(document).on("focus",a,function(){$(c).addClass("dgwt-wcas-hide"),$(d).removeClass("dgwt-wcas-hide"),b.detailsWrapp.addClass("dgwt-wcas-hide"),b.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),$(document).on("blur",a,function(){$(c).removeClass("dgwt-wcas-hide"),$(d).addClass("dgwt-wcas-hide"),b.detailsWrapp.removeClass("dgwt-wcas-hide"),b.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var a=this,c=["show_submit_button","max_form_width","search_style","search_layout","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_categories_images","show_matching_tags","show_matching_brands","show_brands_images","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],b=0;b<c.length;b++){var g=["search_style","search_layout"].includes(c[b])?"select":"input",h=g+"[id='dgwt_wcas_settings\\["+c[b]+"\\]']",i=g+"[id^='dgwt_wcas_settings'][data-option-trigger='"+c[b]+"']",e=$(h),f=$(i),d="onChange"+a.camelCase(c[b]);"function"==typeof a[d]&&e.length>0?(a[d](e,e.val()),$(document).on("change",h,function(){d=$(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),d="onChange"+a.camelCase(d),"function"==typeof a[d]&&a[d]($(this),this.value)})):"function"==typeof a[d]&&f.length>0?(a[d](f,f.val()),$(document).on("change",i,function(){d=$(this).data("option-trigger"),d="onChange"+a.camelCase(d),"function"==typeof a[d]&&a[d]($(this),this.value)})):a[d]("","")}},onColorHandler:function(){for(var c=this,b=["search_icon_color","bg_input_color","text_input_color","border_input_color","bg_submit_color","text_submit_color","sug_bg_color","sug_hover_color","sug_text_color","sug_highlight_color","sug_border_color"],a=0;a<b.length;a++){var d="input[id*='"+b[a]+"']",e=$(d),f="onColor"+c.camelCase(b[a]);c[f](e,e.val()),$(document).on("change",d,function(){f=$(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),f="onColor"+c.camelCase(f),c[f]($(this),this.value)})}},onColorChangeHandler:function(a,c){var b=a.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[b="onColor"+this.camelCase(b)](a,c)},onTypeHandler:function(){for(var c=this,b=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<b.length;a++){var d="input[id*='"+b[a]+"']",e=$(d),f="onType"+c.camelCase(b[a]);c[f](e,e.val()),$(document).on("input",d,function(a){f=$(a.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),f="onType"+c.camelCase(f),c[f]($(a.target),this.value)})}},onChangeMaxFormWidth:function(b,a){a.length>0&&"0"!=a?(this.searchWrapp.css("max-width",a+"px"),this.suggestionWrapp.css("max-width",a+"px")):(this.searchWrapp.css("max-width","100%"),this.suggestionWrapp.css("max-width","100%")),this.onChangeShowDetailsBox($("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(e,f){var a=this,b=$(".js-dgwt-wcas-search-submit");if(a.isChecked(e)){a.searchWrapp.addClass("dgwt-wcas-has-submit"),a.searchWrapp.removeClass("dgwt-wcas-no-submit"),b.show(),$(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var c=$("input[id*='bg_submit_color']"),d=$("input[id*='text_submit_color']");a.onColorBgSubmitColor(c,c.val()),a.onColorTextSubmitColor(d,d.val()),setTimeout(function(){a.positionPreloader()},10)}else a.searchWrapp.addClass("dgwt-wcas-no-submit"),a.searchWrapp.removeClass("dgwt-wcas-has-submit"),b.hide(),$(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show(),a.positionPreloader()},onChangeShowProductImage:function(c,d){var b=$(".js-dgwt-wcas-si"),a=$(".js-dgwt-wcas-content-wrapp");this.isChecked(c)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),$(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),$(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),a.show(),b.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),a.each(function(){$(this).closest(".dgwt-wcas-suggestion-product").append($(this).html())}),a.hide(),b.hide())},onChangeShowProductSku:function(b,c){var a=$(".js-dgwt-wcas-sku");this.isChecked(b)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(b,c){var a=$(".js-dgwt-wcas-sd");this.isChecked(b)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(b,c){var a=$(".js-dgwt-wcas-sp");this.isChecked(b)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(d,e){var b=$(".dgwt-wcas-suggestion-headline-cat"),a=$(".dgwt-wcas-suggestion-cat");this.isChecked(d)?(b.show(),a.show(),a.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"))):(b.hide(),a.hide(),a.addClass("js-dgwt-wcas-suggestion-hidden"));var c=$("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(c,c.val())},onChangeShowCategoriesImages:function(b,c){var a=$(".js-dgwt-wcas-suggestion-cat");this.isChecked(b)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingTags:function(d,e){var b=$(".dgwt-wcas-suggestion-headline-tag"),a=$(".dgwt-wcas-suggestion-tag");this.isChecked(d)?(b.show(),a.show(),a.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"))):(b.hide(),a.hide(),a.addClass("js-dgwt-wcas-suggestion-hidden"));var c=$("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(c,c.val())},onChangeShowMatchingBrands:function(d,e){var b=$(".dgwt-wcas-suggestion-headline-brand"),a=$(".dgwt-wcas-suggestion-brand");this.isChecked(d)?(b.show(),a.show(),a.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"))):(b.hide(),a.hide(),a.addClass("js-dgwt-wcas-suggestion-hidden"));var c=$("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(c,c.val())},onChangeShowBrandsImages:function(b,c){var a=$(".js-dgwt-wcas-suggestion-brand");this.isChecked(b)?a.addClass("dgwt-wcas-has-img"):a.removeClass("dgwt-wcas-has-img")},onChangeShowMatchingPosts:function(d,e){var b=$(".dgwt-wcas-suggestion-headline-post"),a=$(".dgwt-wcas-suggestion-post");this.isChecked(d)?(b.show(),a.show(),a.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"))):(b.hide(),a.hide(),a.addClass("js-dgwt-wcas-suggestion-hidden"));var c=$("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(c,c.val())},onChangeShowMatchingPages:function(d,e){var b=$(".dgwt-wcas-suggestion-headline-page"),a=$(".dgwt-wcas-suggestion-page");this.isChecked(d)?(b.show(),a.show(),a.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults($("input[id*='show_grouped_results']"))):(b.hide(),a.hide(),a.addClass("js-dgwt-wcas-suggestion-hidden"));var c=$("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(c,c.val())},onChangeShowGroupedResults:function(b,d){var a=$(".dgwt-wcas-st--direct-headline"),c=$(".dgwt-wcas-suggestion-headline");this.isChecked(b)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),$(".dgwt-wcas-suggestion-headline").show(),this.isChecked($("input[data-option-trigger='show_matching_categories']"))||$(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked($("input[data-option-trigger='show_matching_tags']"))||$(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked($("input[data-option-trigger='show_matching_brands']"))||$(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked($("input[id*='show_matching_posts']"))||$(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked($("input[id*='show_matching_pages']"))||$(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),c.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(a,b){setTimeout(function(){var d=0,f=7,i=$(".dgwt-wcas-suggestion-duplicated"),j=["brand","cat","tag","post","page","product"];b.length>0&&"0"!=b&&(f=Math.abs(b)),i.length>0&&i.remove();var c=[];for(d=0;d<j.length;d++){var k=$(".dgwt-wcas-suggestion-"+j[d]+":not(.js-dgwt-wcas-suggestion-hidden)");k.length>0&&c.push(k)}var g=c.length;if(c.length>0)for(var l=f-c.length,e=c.length-1;l>0;){var h=c[e].clone();h.addClass("dgwt-wcas-suggestion-duplicated"),h.removeClass("dgwt-wcas-suggestion-selected"),c[e].after(h),g++,--e<0&&(e=c.length-1),l--}g>f&&a.val(g)},10)},onChangeShowDetailsBox:function(b,c){var a=this;a.isChecked(b)?(a.detailsWrapp.show(),a.searchWrapp.addClass("dgwt-wcas-is-detail-box"),a.previewWrapper.addClass("dgwt-wcas-is-details"),a.previewWrapper.addClass("dgwt-wcas-details-right"),setTimeout(function(){$(".dgwt-wcas-suggestion-product:not(.dgwt-wcas-suggestion-duplicated)").addClass("dgwt-wcas-suggestion-selected");var c=$(".js-dgwt-wcas-preview-bar-example");if(c.width()>=550){a.previewWrapper.addClass("dgwt-wcas-full-width");var b=getComputedStyle(c[0]).width;(b=Math.round(parseFloat(b.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(b/2)),a.detailsWrapp.css("width",Math.round(b/2))):(a.suggestionWrapp.css("width",Math.floor(b/2)),a.detailsWrapp.css("width",Math.ceil(b/2)))}else a.suggestionWrapp.width(a.searchWrapp.width())},10)):(a.detailsWrapp.hide(),a.searchWrapp.removeClass("dgwt-wcas-is-detail-box"),a.previewWrapper.removeClass("dgwt-wcas-is-details"),a.previewWrapper.removeClass("dgwt-wcas-details-right"),a.previewWrapper.removeClass("dgwt-wcas-full-width"),$(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onChangeSearchStyle:function(h,a){var b,e=this,d=["solaris","pirx"],c=$('input[id*="show_submit_button"]'),f=$('label[for*="bg_submit_color"]');for($(".dgwt-wcas-ico-magnifier").addClass("dgwt-wcas-hidden"),b=0;b<d.length;b++)$(".js-dgwt-wcas-preview").removeClass("dgwt-wcas-open-"+d[b]),$(".js-dgwt-wcas-search-wrapp").removeClass("dgwt-wcas-style-"+d[b]);if($(".js-dgwt-wcas-ico-magnifier-"+a).removeClass("dgwt-wcas-hidden"),$(".js-dgwt-wcas-preview").addClass("dgwt-wcas-open-"+a),$(".js-dgwt-wcas-search-wrapp").addClass("dgwt-wcas-style-"+a),"solaris"===a&&($('label[for*="show_submit_button"] .js-dgwt-wcas-tooltip').addClass("dgwt-wcas-hidden"),$('label[for*="search_submit_text"]').closest("tr").removeClass("dgwt-wcas-hidden"),$('input[id*="search_submit_text"]').prop("disabled",!1),f.closest("tr").removeClass("dgwt-wcas-hidden"),$('label[for*="text_submit_color"] > span:nth-child(1)').removeClass("dgwt-wcas-hidden"),$('label[for*="text_submit_color"] > span:nth-child(2)').addClass("dgwt-wcas-hidden"),c.prop("disabled",!1),$(".js-dgwt-wcas-submit-button-pirx-tooltip").removeClass("dgwt-wcas-hidden"),setTimeout(function(){e.positionPreloader()},300)),"pirx"===a){$('label[for*="show_submit_button"] .js-dgwt-wcas-tooltip').removeClass("dgwt-wcas-hidden"),$('label[for*="search_submit_text"]').closest("tr").addClass("dgwt-wcas-hidden"),$('input[id*="search_submit_text"]').prop("disabled",!0),$('label[for*="bg_submit_color"]').closest("tr").addClass("dgwt-wcas-hidden"),$('label[for*="text_submit_color"] > span:nth-child(2)').removeClass("dgwt-wcas-hidden"),$('label[for*="text_submit_color"] > span:nth-child(1)').addClass("dgwt-wcas-hidden"),$('input[id*="search_submit_text"]').val("");var g=f.closest("tr").find(".wp-picker-clear");g.length>0&&g[0].click(),e.onColorBgSubmitColor(),c.is(":checked")||c[0].click(),c.prop("disabled",!0),e.onTypeSearchSubmitText($('input[id*="search_submit_text"]'),""),setTimeout(function(){e.positionPreloader()},10)}},onChangeSearchLayout:function(e,d){var b=$(".js-dgwt-wcas-preview-device-info"),c=$(".js-dgwt-wcas-preview-bar-example"),a=$(".js-dgwt-wcas-preview-icon-example");switch($(".js-dgwt-wcas-preview-device-info > span").addClass("dgwt-wcas-hidden"),a.removeClass("dgwt-wcas-preview-icon-only"),d){case"classic":b.addClass("dgwt-wcas-hidden"),c.removeClass("dgwt-wcas-hidden"),a.addClass("dgwt-wcas-hidden");break;case"icon":b.addClass("dgwt-wcas-hidden"),c.addClass("dgwt-wcas-hidden"),a.removeClass("dgwt-wcas-hidden"),$(".dgwt-wcas-search-form").removeClass("dgwt-wcas-hidden"),$(".dgwt-wcas-search-icon-arrow").removeClass("dgwt-wcas-hidden"),a.addClass("dgwt-wcas-preview-icon-only");break;case"icon-flexible":b.removeClass("dgwt-wcas-hidden"),c.removeClass("dgwt-wcas-hidden"),a.removeClass("dgwt-wcas-hidden"),a.find(".dgwt-wcas-search-form").addClass("dgwt-wcas-hidden"),a.find(".dgwt-wcas-search-icon-arrow").addClass("dgwt-wcas-hidden"),$('.js-dgwt-wcas-preview-device-info[data-device="desktop"] span:nth-child(2)').removeClass("dgwt-wcas-hidden"),$('.js-dgwt-wcas-preview-device-info[data-device="mobile"] span:nth-child(1)').removeClass("dgwt-wcas-hidden");break;case"icon-flexible-inv":b.removeClass("dgwt-wcas-hidden"),c.removeClass("dgwt-wcas-hidden"),a.removeClass("dgwt-wcas-hidden"),a.find(".dgwt-wcas-search-form").addClass("dgwt-wcas-hidden"),a.find(".dgwt-wcas-search-icon-arrow").addClass("dgwt-wcas-hidden"),$('.js-dgwt-wcas-preview-device-info[data-device="desktop"] span:nth-child(1)').removeClass("dgwt-wcas-hidden"),$('.js-dgwt-wcas-preview-device-info[data-device="mobile"] span:nth-child(2)').removeClass("dgwt-wcas-hidden")}},onColorSearchIconColor:function(b,a){this.isColor(a)?this.searchWrapp.find(".dgwt-wcas-ico-magnifier-handler path").css("fill",a):this.searchWrapp.find(".dgwt-wcas-ico-magnifier-handler path").css("fill","")},onColorBgInputColor:function(b,a){this.isColor(a)?this.searchInput.css("background-color",a):this.searchInput.css("background-color","")},onColorTextInputColor:function(e,a){var c="dgwt-wcas-preview-placeholder-style";if(this.isColor(a)){var b='<style class="'+c+'">';b+=".dgwt-wcas-search-input {color:"+a+"!important;}",b+=".dgwt-wcas-ico-magnifier path {fill:"+a+"}",b+="</style>",$("head").append(b),this.searchInput.css("color",a)}else{this.searchInput.css("color","");var d=$("."+c);d.length>0&&d.remove()}},onColorBorderInputColor:function(b,a){this.isColor(a)?this.searchInput.css("border-color",a):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(e,b){var c="dgwt-wcas-preview-submit-style";if(this.isChecked($("input[id*='show_submit_button']"))&&this.isColor(b)){var a='<style class="'+c+'">';a+=".dgwt-wcas-search-submit::before{border-color: transparent "+b+"!important;}",a+=".dgwt-wcas-search-submit:hover::before{border-right-color: "+b+"!important;}",a+=".dgwt-wcas-search-submit:focus::before{border-right-color: "+b+"!important;}",a+=".dgwt-wcas-search-submit{background-color: "+b+"!important;}",a+=".dgwt-wcas-om-bar .dgwt-wcas-om-return{background-color: "+b+"!important;}",a+="</style>",$("head").append(a)}else{var d=$("."+c);d.length>0&&d.remove()}},onColorTextSubmitColor:function(b,a){this.isChecked($("input[id*='show_submit_button']"))&&this.isColor(a)?($(".js-dgwt-wcas-search-submit").css("color",a),$(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",a)):(this.searchInput.css("background-color",""),$(".js-dgwt-wcas-search-submit").css("color",""),$(".dgwt-wcas-search-submit .dgwt-wcas-ico-magnifier path").css("fill",""))},onColorSugBgColor:function(e,b){var c="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(b)){var a='<style class="'+c+'">';a+=".dgwt-wcas-suggestions-wrapp,",a+=".dgwt-wcas-details-wrapp",a+="{background-color: "+b+"!important;}",a+="</style>",$("head").append(a)}else{var d=$("."+c);d.length>0&&d.remove()}},onColorSugHoverColor:function(b,a){this.isColor(a)?setTimeout(function(){$(".dgwt-wcas-suggestion-selected").css("background-color",a)},50):$(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(e,b){var c="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(b)){var a='<style class="'+c+'">';a+=".dgwt-wcas-suggestions-wrapp *,",a+=".dgwt-wcas-details-wrapp *,",a+=".dgwt-wcas-sd,",a+=".dgwt-wcas-suggestion *",a+="{color: "+b+"!important;}",a+="</style>",$("head").append(a)}else{var d=$("."+c);d.length>0&&d.remove()}},onColorSugHighlightColor:function(e,b){var c="dgwt-wcas-preview-sughighlight-style";if(this.isColor(b)){var a='<style class="'+c+'">';a+=".dgwt-wcas-st strong,",a+=".dgwt-wcas-sd strong",a+="{color: "+b+"!important;}",a+="</style>",$("head").append(a)}else{var d=$("."+c);d.length>0&&d.remove()}},onColorSugBorderColor:function(e,b){var c="dgwt-wcas-preview-sugborder-style";if(this.isColor(b)){var a='<style class="'+c+'">';a+=".dgwt-wcas-suggestions-wrapp,",a+=".dgwt-wcas-details-wrapp,",a+=".dgwt-wcas-suggestion,",a+=".dgwt-wcas-datails-title,",a+=".dgwt-wcas-details-more-products",a+="{border-color: "+b+"!important;}",a+="</style>",$("head").append(a)}else{var d=$("."+c);d.length>0&&d.remove()}},onTypeSearchSubmitText:function(d,b){var a=$(".js-dgwt-wcas-search-submit-l"),c=$(".js-dgwt-wcas-search-submit-m");b.length>0?(a.text(b),a.show(),c.hide()):(a.text(""),a.hide(),c.show()),this.positionPreloader()},onTypeSearchPlaceholder:function(b,a){0==a.length&&(a=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",a)},onTypeSearchNoResultsText:function(b,a){0==a.length&&(a=dgwt_wcas.labels.no_results),$(".js-dgwt-wcas-suggestion-nores span").text(a)},onTypeSearchSeeAllResultsText:function(b,a){0==a.length&&(a=dgwt_wcas.labels.show_more),$(".js-dgwt-wcas-st-more-label").text(a)},positionPreloader:function(){var b=$(".js-dgwt-wcas-search-wrapp:not(.dgwt-wcas-hidden) .js-dgwt-wcas-search-submit"),d=b.is(":visible"),c=$("select[id*='search_style'] option:selected").val(),a=b.width()+35;"pirx"==c&&(a=38),d||"solaris"!=c||(a=7),$(".dgwt-wcas-preloader").css("right",a+"px")},fixSizesInit:function(){var a=this;$(document).on("click","#dgwt_wcas_autocomplete-tab",function(){a.onChangeShowDetailsBox($("input[id*='show_details_box']"))})},keepPreviewVisible:function(){var a=$(".js-dgwt-wcas-preview-inner"),b=$(".js-dgwt-wcas-preview"),c=$(".js-dgwt-wcas-preview-source"),d=$(".dgwt-eq-settings-form");$(window).on("scroll.autocomplete",function(){var f=$(document).scrollTop(),e=b[0].getBoundingClientRect().top-40;if(e<0){var g=-1*e<1?0:-1*e;if(c.offset().top+c.outerHeight(!1)<=Math.floor(d.offset().top+d.outerHeight(!1))-90)a.css("top",g+"px");else if(f+40<a.offset().top){var h=a.css("top").replace(/px/i,"")-10;a.css("top",h+"px")}}else a.css("top",0)})},animationController:function(){var a=this;$(window).on("load",function(){var b=$("#dgwt_wcas_form_body-tab");b.length&&b.hasClass("nav-tab-active")&&a.startAnimateTyping()}),$(".dgwt_wcas_settings-nav-tab-wrapper > a").on("click",function(){"dgwt_wcas_form_body-tab"===$(this).attr("id")?(a.stopAnimateTyping(),a.startAnimateTyping()):a.stopAnimateTyping()}),$(".dgwt_wcas_settings-nav-tab-wrapper > a").on("click",function(){"dgwt_wcas_form_body-tab"===$(this).attr("id")?(a.stopAnimateTyping(),a.startAnimateTyping()):a.stopAnimateTyping()}),$('input[id*="search_placeholder"]').on("focus",function(){a.stopAnimateTyping(),_this.searchInput.val("")}),$('input[id*="search_placeholder"]').on("blur",function(){a.startAnimateTyping()})},startAnimateTyping:function(){var a=this,b=0,c=$(".js-dgwt-wcas-search-wrapp"),d=$(".js-dgwt-wcas-search-input"),e=$(".dgwt-wcas-preloader"),f=$(".js-dgwt-wcas-preview-elements-close").html();a.animateTypingInterval=setInterval(function(){10== ++b&&(d.val("f"),c.addClass("dgwt-wcas-search-filled"),c.addClass("dgwt-wcas-search-focused"),e.addClass("dgwt-wcas-close")),11===b&&d.val("fi"),12===b&&(d.val("fib"),e.append(f),a.positionPreloader()),13===b&&d.val("fibo"),14===b&&d.val("fibo "),15===b&&d.val("fibo s"),16===b&&d.val("fibo se"),17===b&&d.val("fibo sea"),18===b&&d.val("fibo sear"),19===b&&d.val("fibo searc"),20===b&&d.val("fibo search"),30===b&&d.val("fibo searc"),31===b&&d.val("fibo sear"),32===b&&d.val("fibo sea"),33===b&&d.val("fibo se"),34===b&&d.val("fibo s"),35===b&&d.val("fibo "),36===b&&d.val("fibo"),37===b&&d.val("fib"),38===b&&(d.val("fi"),e.removeClass("dgwt-wcas-close")),39===b&&d.val("f"),40===b&&(d.val(""),e.html(""),c.removeClass("dgwt-wcas-search-filled")),45===b&&(b=0)},200)},stopAnimateTyping(){var b=$(".js-dgwt-wcas-search-wrapp"),c=$(".js-dgwt-wcas-search-input"),a=$(".dgwt-wcas-preloader");a.removeClass("dgwt-wcas-close"),c.val(""),a.html(""),b.removeClass("dgwt-wcas-search-filled"),clearInterval(this.animateTypingInterval)}};var j={settingsTab:"#dgwt_wcas_troubleshooting-tab",noIssuesClass:".js-dgwt-wcas-troubleshooting-no-issues",counterClass:".js-dgwt-wcas-troubleshooting-count",issuesListClass:".js-dgwt-wcas-troubleshooting-issues",progressBar:".dgwt-wcas-troubleshooting-wrapper .progress_bar",progressBarInner:".dgwt-wcas-troubleshooting-wrapper .progress-bar-inner",resetButtonName:"dgwt-wcas-reset-async-tests",fixOutofstockButtonName:"dgwt-wcas-fix-out-of-stock-relationships",maintenanceAnalyticsButtonName:"dgwt-wcas-maintenance-analytics",switchAlternativeEndpoint:"dgwt-wcas-switch-alternative-endpoint",dismissElementorTemplateButtonName:"dgwt-wcas-dismiss-elementor-template",init:function(){var a=this;if(void 0===dgwt_wcas.troubleshooting)return;let b=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended;b>0&&($(a.counterClass).text(b).addClass("active"),$(a.settingsTab).addClass("enabled")),dgwt_wcas.troubleshooting.tests.results_async.length>0&&$.each(dgwt_wcas.troubleshooting.tests.results_async,function(){a.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.direct.length>0&&$.each(dgwt_wcas.troubleshooting.tests.direct,function(){a.appendIssue(this,!1)}),dgwt_wcas.troubleshooting.tests.async.length>0&&a.maybeRunNextAsyncTest(),$(document).on("click",'input[name="'+a.resetButtonName+'"]',function(c){$('input[name="'+a.resetButtonName+'"]').attr("disabled","disabled");var b={action:"dgwt_wcas_troubleshooting_reset_async_tests","_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_reset_async_tests};return $.post(ajaxurl,b,function(){location.reload()}),!1}),$(document).on("click",'input[name="'+a.fixOutofstockButtonName+'"]',function(c){$('input[name="'+a.fixOutofstockButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var b={action:"dgwt_wcas_troubleshooting_fix_outofstock","_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_fix_outofstock};return $.post(ajaxurl,b,function(){location.reload()}),!1}),$(document).on("click",'input[name="'+a.maintenanceAnalyticsButtonName+'"]',function(c){$('input[name="'+a.maintenanceAnalyticsButtonName+'"]').attr("disabled","disabled").next().addClass("loading");var b={action:"dgwt_wcas_troubleshooting_maintenance_analytics","_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_maintenance_analytics};return $.post(ajaxurl,b,function(){location.reload()}),!1}),$(document).on("click",'input[name="'+a.switchAlternativeEndpoint+'"]',function(d){var b=1===parseInt($(this).data("switch"))?"enable":"disable";$('input[name="'+a.switchAlternativeEndpoint+'"]').attr("disabled","disabled").next().addClass("loading");var c={action:"dgwt_wcas_troubleshooting_switch_alternative_endpoint","_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_switch_alternative_endpoint,switch:b};return $.post(ajaxurl,c,function(){location.reload()}),!1}),$(document).on("click",'input[name="'+a.dismissElementorTemplateButtonName+'"]',function(c){$('input[name="'+a.dismissElementorTemplateButtonName+'"]').attr("disabled","disabled");var b={action:"dgwt_wcas_troubleshooting_dismiss_elementor_template","_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_dismiss_elementor_template};return $.post(ajaxurl,b,function(){location.reload()}),!1})},appendIssue:function(a,c){var b,d=wp.template("dgwt-wcas-troubleshooting-issue"),e=$(this.issuesListClass+"-"+a.status);"good"!==a.status&&($(this.noIssuesClass).hide(),c&&dgwt_wcas.troubleshooting.tests.issues[a.status]++,(b=dgwt_wcas.troubleshooting.tests.issues.critical+dgwt_wcas.troubleshooting.tests.issues.recommended)>0&&($(this.counterClass).text(b).addClass("active"),$(this.settingsTab).addClass("enabled")),$(e).append(d(a)))},maybeRunNextAsyncTest:function(){var a=this;dgwt_wcas.troubleshooting.tests.async.length>0&&$.each(dgwt_wcas.troubleshooting.tests.async,function(){var b={action:"dgwt_wcas_troubleshooting_test",test:this.test,"_wpnonce":dgwt_wcas.troubleshooting.nonce.troubleshooting_async_test};return!!this.completed||(this.completed=!0,$(a.progressBar).show(),$.post(ajaxurl,b,function(b){b.success&&a.appendIssue(b.data,!0),a.maybeRunNextAsyncTest()}),!1)}),a.recalculateProgression()},recalculateProgression:function(){var b=this,c=dgwt_wcas.troubleshooting.tests.async.length,d=0;$.each(dgwt_wcas.troubleshooting.tests.async,function(){this.completed&&d++});var a=Math.ceil(d/c*100);$(b.progressBarInner).css("width",a+"%"),100===a&&setTimeout(function(){$(b.progressBar).slideUp()},2e3)}},k={moveOptionClass:".js-dgwt-wcas-move-option",init:function(){var a=$(this.moveOptionClass);a.length>0&&$.each(a,function(c,a){var b=$("#"+$(a).data("move-dest").replace(/(:|\.|\[|\])/g,"\\$1"));b.length>0&&($(a).closest("tr").hasClass("dgwt-wcas-premium-only")&&$(a).addClass("dgwt-wcas-premium-only"),$(a).clone().appendTo(b.closest("td fieldset"))),$(a).closest("tr").remove()})}},l={init:function(){"undefined"!=typeof Vue&&(Vue.component("dgwt-wcas-rule",{template:"#dgwt-wcas-settings-filters-rules-rule",components:{Selectize},props:["nonce","rule","rules","index"],data:()=>({isSelectActive:!0}),computed:{ruleValue(a){return this.rule.group}},watch:{rule:{handler:function(){this.$emit("update:rule",this.index)},deep:!0},ruleValue(){var a=this;this.$emit("change:group",this.index),this.isSelectActive=!1,setTimeout(function(){a.isSelectActive=!0},0)}},methods:{deleteRule(){this.$emit("delete:rule",this.index)},getSelectizeSettings(a){var b=void 0===dgwt_wcas_filters_rules_selected_options[a]?[]:dgwt_wcas_filters_rules_selected_options[a];return function({nonce:b,options:a,type:c}){return{persist:!1,maxItems:null,valueField:"key",labelField:"label",searchField:["label"],options:a,preload:!0,create:function(a){return{value:a.key,label:a.label}},load:function(a,d){$.ajax({url:ajaxurl,method:"POST",data:{action:"dgwt_wcas_settings_search_terms",query:a,type:c,_wpnonce:b},error:function(){d()},success:function(a){d(a.data)}})}}}({nonce:this.nonce,type:a,options:b})}}}),new Vue({el:"#dgwt-wcas-settings-filters-rules",components:{Selectize},data:()=>({rules:[]}),mounted(){try{let a=JSON.parse(this.$refs["dgwt-wcas-settings-filters-rules-ref"].value);$.each(a,function(b,c){a[b].key=Math.random()}),this.rules=a}catch(b){}this.updateInput()},methods:{addRule(){this.rules.push({group:"",values:[],key:Math.random()}),this.updateInput()},changeGroup(a){this.rules[a].values=[],this.updateInput()},deleteRule(a){this.rules=this.rules.filter(function(c,b){return b!==a}),this.updateInput()},updateInput(){let a=JSON.parse(JSON.stringify(this.rules));this.$refs["dgwt-wcas-settings-filters-rules-ref"].value=JSON.stringify(a.map(function(a){return a.key,delete a.key,a}))}}}))}};$(document).ready(function(){var m,n;(m=$(".js-dgwt-wcas-settings-margin-nob")).length>0&&m.each(function(){var b=$(this).find("td .dgwt-wcas-fieldset");if(b.length>0){var c=$(this).prev(".js-dgwt-wcas-settings-margin");if(c.length>0){var e=$(this).attr("class").split(/\s+/),d="";$.each(e,function(b,a){-1!==a.indexOf("js-dgwt-wcas-cbtgroup-")&&(d=a)});var a=b.clone(!0,!0);a.addClass("dgwt-wcas-settings-margin-nob"),d&&a.addClass(d),a.appendTo(c.find("td")),$(this).remove()}}}),a.init(),b.init(),d.init(),(n=$(".js-dgwt-wcas-sgs-autocolspan")).length>0&&n.find("td").attr("colspan",2),e.init(),f.init(),g.init(),h.init(),j.init(),k.init(),c.init(),i.init(),l.init(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery)
|
assets/js/search.js
CHANGED
@@ -212,7 +212,8 @@
|
|
212 |
suggestion: 'dgwt-wcas-suggestion',
|
213 |
suggestionsContainerOrientTop: 'dgwt-wcas-suggestions-wrapp--top',
|
214 |
inputFilled: 'dgwt-wcas-search-filled',
|
215 |
-
darkenOverlayMounted: 'js-dgwt-wcas-search-darkoverl-mounted'
|
|
|
216 |
};
|
217 |
that.hint = null;
|
218 |
that.hintValue = '';
|
@@ -221,6 +222,10 @@
|
|
221 |
that.overlayDarkenedState = 'off';
|
222 |
that.isMouseDownOnSearchElements = false;
|
223 |
|
|
|
|
|
|
|
|
|
224 |
// Initialize and set options:
|
225 |
that.initialize();
|
226 |
that.setOptions(options);
|
@@ -272,6 +277,10 @@
|
|
272 |
preloaderClass: 'dgwt-wcas-preloader',
|
273 |
closeTrigger: 'dgwt-wcas-close',
|
274 |
formClass: 'dgwt-wcas-search-form',
|
|
|
|
|
|
|
|
|
275 |
tabDisabled: false,
|
276 |
dataType: 'text',
|
277 |
currentRequest: null,
|
@@ -283,7 +292,6 @@
|
|
283 |
paramName: 'query',
|
284 |
transformResult: _transformResult,
|
285 |
noSuggestionNotice: 'No results',
|
286 |
-
orientation: 'bottom',
|
287 |
forceFixPosition: false,
|
288 |
positionFixed: false,
|
289 |
debounceWaitMs: 400,
|
@@ -292,6 +300,8 @@
|
|
292 |
showProductVendor: false,
|
293 |
disableHits: false,
|
294 |
disableSubmit: false,
|
|
|
|
|
295 |
}
|
296 |
|
297 |
function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
|
@@ -336,26 +346,47 @@
|
|
336 |
// Remove autocomplete attribute to prevent native suggestions:
|
337 |
that.element.setAttribute('autocomplete', 'off');
|
338 |
|
|
|
|
|
339 |
that.createContainers();
|
340 |
|
341 |
that.registerEventsSearchBar();
|
342 |
that.registerEventsSuggestions();
|
343 |
that.registerEventsDetailsPanel();
|
344 |
that.registerIconHandler();
|
345 |
-
that.
|
|
|
346 |
|
347 |
-
that.
|
348 |
that.adjustContainerWidth();
|
349 |
if (that.visible) {
|
350 |
-
that.
|
|
|
|
|
|
|
351 |
}
|
352 |
that.positionOverlayDarkened();
|
353 |
};
|
354 |
|
|
|
355 |
$(window).on('resize.autocomplete', function () {
|
356 |
var that = utils.getActiveInstance();
|
|
|
357 |
if (typeof that != 'undefined') {
|
358 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
360 |
});
|
361 |
|
@@ -364,25 +395,23 @@
|
|
364 |
$(window).on('resize.autocomplete', function () {
|
365 |
var newWidth = $(window).width();
|
366 |
if (newWidth != windowWidth) {
|
367 |
-
that.
|
368 |
windowWidth = newWidth;
|
369 |
}
|
370 |
});
|
371 |
|
372 |
-
if (that.
|
373 |
-
that.
|
374 |
}
|
375 |
|
376 |
that.hideAfterClickOutsideListener();
|
377 |
|
378 |
-
|
379 |
// Mark as initialized
|
380 |
that.suggestionsContainer.addClass('js-dgwt-wcas-initialized');
|
381 |
|
382 |
if (that.detailsContainer && that.detailsContainer.length > 0) {
|
383 |
that.detailsContainer.addClass('js-dgwt-wcas-initialized');
|
384 |
}
|
385 |
-
|
386 |
},
|
387 |
createContainers: function (type) {
|
388 |
var that = this,
|
@@ -429,7 +458,7 @@
|
|
429 |
}
|
430 |
|
431 |
// Details Panel
|
432 |
-
if (that.
|
433 |
|
434 |
if ($('.' + options.containerDetailsClass).length == 0) {
|
435 |
that.detailsContainer = $(DgwtWcasAutocompleteSearch.utils.createNode(options.containerDetailsClass));
|
@@ -448,7 +477,7 @@
|
|
448 |
var that = this;
|
449 |
|
450 |
// Extra tasks on submit
|
451 |
-
that.
|
452 |
|
453 |
if (that.options.disableSubmit) {
|
454 |
e.preventDefault();
|
@@ -480,16 +509,16 @@
|
|
480 |
}
|
481 |
|
482 |
// Clean before submit
|
483 |
-
that.
|
484 |
|
485 |
});
|
486 |
|
487 |
// Position preloader
|
488 |
if (document.readyState === 'complete') {
|
489 |
-
that.
|
490 |
} else {
|
491 |
$(window).on('load', function () {
|
492 |
-
that.
|
493 |
});
|
494 |
}
|
495 |
|
@@ -534,7 +563,7 @@
|
|
534 |
var currentIndex = $(this).data('index');
|
535 |
var selector = '.dgwt-wcas-suggestion[data-index="' + currentIndex + '"]';
|
536 |
|
537 |
-
var timeOffset = that.
|
538 |
|
539 |
if (that.selectedIndex != currentIndex) {
|
540 |
utils.mouseHoverDebounce(function () {
|
@@ -593,7 +622,7 @@
|
|
593 |
var that = this,
|
594 |
detailsContainer = that.getDetailsContainer();
|
595 |
|
596 |
-
if (!that.
|
597 |
return;
|
598 |
}
|
599 |
|
@@ -612,15 +641,14 @@
|
|
612 |
},
|
613 |
registerIconHandler: function () {
|
614 |
var that = this,
|
615 |
-
$formWrapper = that.getFormWrapper()
|
616 |
-
|
617 |
|
618 |
$formWrapper.on('click.autocomplete', '.js-dgwt-wcas-search-icon-handler', function (e) {
|
619 |
|
620 |
var $input = $formWrapper.find('.' + that.options.searchInputClass);
|
621 |
|
622 |
if ($formWrapper.hasClass('dgwt-wcas-layout-icon-open')) {
|
623 |
-
|
624 |
that.hide();
|
625 |
$form.hide(true);
|
626 |
|
@@ -634,14 +662,17 @@
|
|
634 |
$formWrapper.addClass('dgwt-wcas-layout-icon-open');
|
635 |
that.positionIconSearchMode($formWrapper);
|
636 |
|
637 |
-
$form.fadeIn(
|
638 |
$arrow.show();
|
639 |
-
that.
|
640 |
$input.focus();
|
641 |
});
|
642 |
|
643 |
-
|
|
|
|
|
644 |
|
|
|
645 |
|
646 |
});
|
647 |
|
@@ -663,50 +694,30 @@
|
|
663 |
}
|
664 |
});
|
665 |
}
|
|
|
|
|
|
|
666 |
|
667 |
// Trigger only when x axis is changed
|
668 |
var windowWidth = $(window).width();
|
669 |
$(window).on('resize.autocomplete', function () {
|
670 |
var newWidth = $(window).width();
|
671 |
if (newWidth != windowWidth) {
|
672 |
-
that.
|
673 |
windowWidth = newWidth;
|
674 |
}
|
675 |
});
|
676 |
|
677 |
if (document.readyState == 'complete') {
|
678 |
-
that.
|
679 |
} else {
|
680 |
$(window).on('load.autocomplete', function () {
|
681 |
-
that.
|
682 |
});
|
683 |
}
|
684 |
|
685 |
},
|
686 |
-
|
687 |
-
var that = this;
|
688 |
-
|
689 |
-
$(window).on('scroll.autocomplete', function () {
|
690 |
-
|
691 |
-
if (that.suggestions.length > 0 && that.elementOrParentIsFixed(that.getFormWrapper())) {
|
692 |
-
if ($(window).scrollTop() === 0) {
|
693 |
-
var timeSteps = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 120, 140, 170, 200, 250, 400, 700, 1000, 2000];
|
694 |
-
|
695 |
-
timeSteps.forEach(function (offset) {
|
696 |
-
setTimeout(function () {
|
697 |
-
that.fixHeight();
|
698 |
-
that.fixPositionCapture();
|
699 |
-
}, offset);
|
700 |
-
});
|
701 |
-
} else {
|
702 |
-
that.fixHeight();
|
703 |
-
that.fixPositionCapture();
|
704 |
-
}
|
705 |
-
}
|
706 |
-
});
|
707 |
-
|
708 |
-
},
|
709 |
-
initMobileMode: function () {
|
710 |
var that = this,
|
711 |
$formWrapper = that.getFormWrapper();
|
712 |
|
@@ -716,6 +727,7 @@
|
|
716 |
) {
|
717 |
|
718 |
$formWrapper.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>');
|
|
|
719 |
|
720 |
var $el = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
|
721 |
|
@@ -723,10 +735,10 @@
|
|
723 |
|
724 |
if (that.options.mobileOverlayDelay > 0) {
|
725 |
setTimeout(function () {
|
726 |
-
that.
|
727 |
}, that.options.mobileOverlayDelay);
|
728 |
} else {
|
729 |
-
that.
|
730 |
}
|
731 |
|
732 |
});
|
@@ -734,7 +746,7 @@
|
|
734 |
}
|
735 |
|
736 |
},
|
737 |
-
|
738 |
var that = this,
|
739 |
$formWrapper = that.getFormWrapper(),
|
740 |
$suggestionsWrapper = that.getSuggestionsContainer();
|
@@ -744,17 +756,16 @@
|
|
744 |
if ($formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
|
745 |
&& $el.length
|
746 |
) {
|
747 |
-
|
748 |
-
that.disableOverlayMobile();
|
749 |
$el.remove();
|
750 |
-
|
751 |
}
|
752 |
|
753 |
},
|
754 |
-
|
755 |
var that = this,
|
756 |
$formWrapper = that.getFormWrapper(),
|
757 |
-
|
758 |
|
759 |
// Break early if this search bar shouldn't open in overlay mobile mode
|
760 |
if (!$formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')) {
|
@@ -763,12 +774,13 @@
|
|
763 |
|
764 |
// Determine the search should open in mobile overlay
|
765 |
if ($formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length) {
|
766 |
-
|
767 |
}
|
768 |
|
769 |
// Toggled?
|
770 |
-
if (
|
771 |
-
|
|
|
772 |
) {
|
773 |
|
774 |
var $suggestionsWrapper = that.getSuggestionsContainer();
|
@@ -780,34 +792,140 @@
|
|
780 |
}
|
781 |
|
782 |
that.hideIconModeSearch();
|
|
|
783 |
|
|
|
|
|
|
|
784 |
}
|
785 |
|
786 |
-
//
|
787 |
-
if (
|
788 |
-
that.
|
789 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
|
791 |
-
|
792 |
-
|
793 |
-
|
|
|
|
|
|
|
|
|
794 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
},
|
796 |
-
|
797 |
var that = this;
|
798 |
-
var $flexibleSearch = $('.js-dgwt-wcas-layout-icon-flexible');
|
799 |
|
800 |
-
if (
|
|
|
|
|
|
|
801 |
|
802 |
-
|
803 |
-
|
804 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
} else {
|
806 |
-
$
|
807 |
-
$
|
808 |
}
|
809 |
|
810 |
-
$
|
811 |
}
|
812 |
},
|
813 |
onFocus: function (e) {
|
@@ -826,7 +944,7 @@
|
|
826 |
that.enableOverlayDarkened();
|
827 |
}
|
828 |
|
829 |
-
that.
|
830 |
if (that.el.val().length >= that.options.minChars) {
|
831 |
that.onValueChange();
|
832 |
}
|
@@ -842,12 +960,8 @@
|
|
842 |
$('body').removeClass('dgwt-wcas-focused');
|
843 |
$('.' + options.searchFormClass).removeClass('dgwt-wcas-search-focused');
|
844 |
|
845 |
-
|
846 |
-
if (that.isMobileMode()) {
|
847 |
-
return;
|
848 |
-
}
|
849 |
-
|
850 |
if (!that.isMouseDownOnSearchElements) {
|
|
|
851 |
that.hide();
|
852 |
|
853 |
if (that.selection && that.currentValue !== query) {
|
@@ -874,15 +988,13 @@
|
|
874 |
options.lookup = that.verifySuggestionsFormat(options.lookup);
|
875 |
}
|
876 |
|
877 |
-
options.orientation = that.validateOrientation(options.orientation, 'bottom');
|
878 |
-
|
879 |
$suggestionsContainer.css({
|
880 |
-
'max-height': !that.
|
881 |
'z-index': options.zIndex
|
882 |
});
|
883 |
|
884 |
// Add classes
|
885 |
-
if (
|
886 |
var $detailsContainer = that.getDetailsContainer();
|
887 |
|
888 |
$detailsContainer.css({
|
@@ -927,32 +1039,52 @@
|
|
927 |
$el.focus();
|
928 |
}
|
929 |
},
|
930 |
-
|
931 |
var that = this,
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
|
|
|
|
|
|
|
|
|
|
936 |
|
937 |
-
|
938 |
-
|
|
|
|
|
|
|
|
|
939 |
}
|
940 |
|
|
|
941 |
},
|
942 |
-
|
943 |
var that = this,
|
944 |
$searchBar = that.getFormWrapper(),
|
945 |
-
$
|
946 |
-
$
|
947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
|
949 |
-
|
950 |
-
|
|
|
|
|
|
|
|
|
951 |
}
|
952 |
|
953 |
-
//
|
954 |
-
|
955 |
-
$containerDetails.css({top: searchBarOffset.top, 'left': leftAbsolute});
|
956 |
|
957 |
$('body').removeClass('dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit');
|
958 |
|
@@ -961,19 +1093,19 @@
|
|
961 |
$('body').addClass('dgwt-wcas-full-width');
|
962 |
|
963 |
if (that.options.isRtl === true) {
|
964 |
-
|
965 |
-
$
|
966 |
-
$
|
967 |
}
|
968 |
|
969 |
return;
|
970 |
}
|
971 |
|
972 |
-
// Details Panel Mode 2: The suggestions wrapper has the same width as the search bar.
|
973 |
// Details panel clings to the left or right side of the suggestion wrapper.
|
974 |
var windowWidth = $(window).width(),
|
975 |
-
cDWidth = $
|
976 |
-
cOffset = $
|
977 |
|
978 |
$('body').addClass('dgwt-wcas-details-outside dgwt-wcas-details-right');
|
979 |
|
@@ -982,12 +1114,12 @@
|
|
982 |
if (windowWidth < (cOffset.left + cDWidth)) {
|
983 |
$('body').removeClass('dgwt-wcas-details-right');
|
984 |
$('body').addClass('dgwt-wcas-details-left');
|
985 |
-
|
986 |
-
$
|
987 |
-
cOffset = $
|
988 |
}
|
989 |
|
990 |
-
// Is the details panel fits the space of the left side?
|
991 |
// Not? Try to hide it by adding class "dgwt-wcas-details-notfit"
|
992 |
if (cOffset.left < 1) {
|
993 |
$('body').removeClass('dgwt-wcas-details-left dgwt-wcas-details-right');
|
@@ -995,11 +1127,9 @@
|
|
995 |
}
|
996 |
},
|
997 |
fixHeight: function () {
|
|
|
998 |
|
999 |
-
|
1000 |
-
options = that.options;
|
1001 |
-
|
1002 |
-
if (options.showDetailsPanel != true) {
|
1003 |
return false;
|
1004 |
}
|
1005 |
|
@@ -1042,14 +1172,14 @@
|
|
1042 |
}
|
1043 |
|
1044 |
var markers = [$input.width(), $suggestionsContainer.height()];
|
1045 |
-
if (that.
|
1046 |
markers[2] = $detailsWrapp.height();
|
1047 |
}
|
1048 |
|
1049 |
that.autoAligmentprocess = setInterval(function () {
|
1050 |
|
1051 |
var newMarkers = [$input.width(), $suggestionsContainer.height()];
|
1052 |
-
if (that.
|
1053 |
newMarkers[2] = $detailsWrapp.height();
|
1054 |
}
|
1055 |
|
@@ -1058,14 +1188,14 @@
|
|
1058 |
if (markers[i] != newMarkers[i]) {
|
1059 |
|
1060 |
that.fixHeight();
|
1061 |
-
that.
|
1062 |
markers = newMarkers;
|
1063 |
break;
|
1064 |
}
|
1065 |
}
|
1066 |
|
1067 |
|
1068 |
-
if (that.
|
1069 |
|
1070 |
var innerDetailsHeight = $detailsWrapp.find('.dgwt-wcas-details-inner').height();
|
1071 |
|
@@ -1078,75 +1208,33 @@
|
|
1078 |
}, 10);
|
1079 |
|
1080 |
},
|
1081 |
-
|
1082 |
-
var
|
1083 |
-
|
1084 |
-
data = {},
|
1085 |
offset;
|
1086 |
|
1087 |
-
|
1088 |
-
|
1089 |
-
$form = $form.find('.' + that.options.formClass);
|
1090 |
-
}
|
1091 |
-
|
1092 |
-
|
1093 |
-
offset = $form.offset();
|
1094 |
|
1095 |
data.left = offset.left;
|
1096 |
data.top = offset.top;
|
1097 |
-
data.width = $
|
1098 |
-
data.height = $
|
1099 |
data.right = data.left + data.width;
|
1100 |
data.bottom = data.top + data.height;
|
|
|
|
|
1101 |
|
1102 |
return data;
|
1103 |
-
|
1104 |
-
},
|
1105 |
-
getFormOffset: function () {
|
1106 |
-
var that = this,
|
1107 |
-
$wrapp = that.getFormWrapper(),
|
1108 |
-
$suggestionsContainer = that.getSuggestionsContainer(),
|
1109 |
-
$baseElementXAxis = $wrapp.find('.' + that.options.formClass),
|
1110 |
-
$baseElementYAxis = that.el,
|
1111 |
-
offsetTop = $baseElementYAxis.offset().top,
|
1112 |
-
offsetLeft = $baseElementXAxis.offset().left;
|
1113 |
-
|
1114 |
-
|
1115 |
-
// Choose orientation
|
1116 |
-
var orientation = that.options.orientation,
|
1117 |
-
containerHeight = $wrapp.outerHeight(false),
|
1118 |
-
height = $baseElementYAxis.outerHeight(false),
|
1119 |
-
styles = {'top': offsetTop, 'left': offsetLeft};
|
1120 |
-
|
1121 |
-
if (orientation === 'auto') {
|
1122 |
-
var viewPortHeight = $(window).height(),
|
1123 |
-
scrollTop = $(window).scrollTop(),
|
1124 |
-
topOverflow = -scrollTop + offsetTop - containerHeight,
|
1125 |
-
bottomOverflow = scrollTop + viewPortHeight - (offsetTop + height + containerHeight);
|
1126 |
-
|
1127 |
-
orientation = (Math.max(topOverflow, bottomOverflow) === topOverflow) ? 'top' : 'bottom';
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
if (orientation === 'top') {
|
1131 |
-
var ft = $baseElementYAxis[0].getBoundingClientRect().top;
|
1132 |
-
|
1133 |
-
$suggestionsContainer.css('height', 'auto');
|
1134 |
-
if (ft < $suggestionsContainer.height()) {
|
1135 |
-
$suggestionsContainer.height(ft - 10);
|
1136 |
-
}
|
1137 |
-
styles.top += -$suggestionsContainer.outerHeight(false);
|
1138 |
-
} else {
|
1139 |
-
styles.top += height;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
return styles;
|
1143 |
-
|
1144 |
},
|
1145 |
getFormWrapper: function () {
|
1146 |
var that = this;
|
1147 |
-
|
1148 |
return that.el.closest('.' + that.options.searchFormClass);
|
1149 |
},
|
|
|
|
|
|
|
|
|
1150 |
getSuggestionsContainer: function () {
|
1151 |
var that = this;
|
1152 |
return $('.' + that.options.containerClass);
|
@@ -1180,6 +1268,8 @@
|
|
1180 |
var that = this,
|
1181 |
$wrapp = that.getFormWrapper();
|
1182 |
|
|
|
|
|
1183 |
// If suggestions are hidden and user presses arrow down, display suggestions:
|
1184 |
if (!that.visible && e.keyCode === keys.DOWN && that.currentValue) {
|
1185 |
that.suggest();
|
@@ -1318,14 +1408,35 @@
|
|
1318 |
|
1319 |
return (suggestions.length === 1 && suggestions[0].value.toLowerCase() === query.toLowerCase());
|
1320 |
},
|
1321 |
-
|
1322 |
-
var that = this
|
|
|
1323 |
|
1324 |
-
|
|
|
|
|
|
|
1325 |
},
|
1326 |
-
|
1327 |
-
var that = this
|
1328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1329 |
},
|
1330 |
getQuery: function (value) {
|
1331 |
var delimiter = this.options.delimiter,
|
@@ -1374,8 +1485,6 @@
|
|
1374 |
options.params['l'] = dgwt_wcas.current_lang;
|
1375 |
}
|
1376 |
|
1377 |
-
options.params = that.applyCustomParams(options.params);
|
1378 |
-
|
1379 |
that.preloader('show', 'form', 'dgwt-wcas-inner-preloader');
|
1380 |
searchForm.addClass('dgwt-wcas-processing');
|
1381 |
|
@@ -1458,7 +1567,7 @@
|
|
1458 |
|
1459 |
}
|
1460 |
|
1461 |
-
that.
|
1462 |
|
1463 |
that.options.onSearchComplete.call(that.element, q, result.suggestions);
|
1464 |
|
@@ -1481,7 +1590,7 @@
|
|
1481 |
var that = this;
|
1482 |
|
1483 |
// Disable details panel
|
1484 |
-
if (!that.
|
1485 |
return false;
|
1486 |
}
|
1487 |
|
@@ -1509,7 +1618,7 @@
|
|
1509 |
// Load response from cache
|
1510 |
that.detailsPanelSetScene(currentObjectID);
|
1511 |
that.fixHeight();
|
1512 |
-
that.
|
1513 |
|
1514 |
} else {
|
1515 |
|
@@ -1574,7 +1683,7 @@
|
|
1574 |
// @TODO Maybe display some error or placeholder
|
1575 |
that.detailsPanelClearScene();
|
1576 |
}
|
1577 |
-
that.
|
1578 |
that.fixHeight();
|
1579 |
|
1580 |
that.updatePrices(true);
|
@@ -1584,7 +1693,7 @@
|
|
1584 |
that.preloader('hide', 'details', '');
|
1585 |
|
1586 |
that.detailsPanelClearScene();
|
1587 |
-
that.
|
1588 |
that.fixHeight();
|
1589 |
},
|
1590 |
});
|
@@ -1713,6 +1822,14 @@
|
|
1713 |
|
1714 |
return params;
|
1715 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1716 |
applyPreloaderForPrice: function (index) {
|
1717 |
var that = this;
|
1718 |
|
@@ -1792,7 +1909,7 @@
|
|
1792 |
index = 0,
|
1793 |
noResults = false;
|
1794 |
|
1795 |
-
if (!that.
|
1796 |
return;
|
1797 |
}
|
1798 |
|
@@ -1842,9 +1959,8 @@
|
|
1842 |
},
|
1843 |
hide: function (clear) {
|
1844 |
var that = this,
|
1845 |
-
$
|
1846 |
-
$
|
1847 |
-
$containerDetails = that.getDetailsContainer();
|
1848 |
|
1849 |
if ($.isFunction(that.options.onHide) && that.visible) {
|
1850 |
that.options.onHide.call(that.element, container);
|
@@ -1853,11 +1969,19 @@
|
|
1853 |
that.visible = false;
|
1854 |
that.selectedIndex = -1;
|
1855 |
clearTimeout(that.onChangeTimeout);
|
1856 |
-
$
|
1857 |
-
$
|
1858 |
-
$
|
|
|
|
|
|
|
|
|
|
|
1859 |
|
1860 |
$('body').removeClass('dgwt-wcas-open');
|
|
|
|
|
|
|
1861 |
$('body').removeClass('dgwt-wcas-block-scroll');
|
1862 |
$('body').removeClass('dgwt-wcas-is-details');
|
1863 |
$('body').removeClass('dgwt-wcas-full-width');
|
@@ -1886,20 +2010,12 @@
|
|
1886 |
},
|
1887 |
positionIconSearchMode: function ($formWrapper) {
|
1888 |
var that = this,
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
var $form = $formWrapper.find('.' + that.options.formClass);
|
1893 |
-
var formWidth = $form.width(),
|
1894 |
windowWidth = $(window).width();
|
1895 |
|
1896 |
var iconLeftOffset = $formWrapper[0].getBoundingClientRect().left;
|
1897 |
-
var formLeftOffset = $form[0].getBoundingClientRect().left;
|
1898 |
-
|
1899 |
-
// Is the icon on left or right side of screen?
|
1900 |
-
if (iconLeftOffset + 10 < windowWidth / 2) {
|
1901 |
-
side = 'left';
|
1902 |
-
}
|
1903 |
|
1904 |
var iconLeftRatio = (iconLeftOffset + 10) / windowWidth;
|
1905 |
|
@@ -1928,20 +2044,17 @@
|
|
1928 |
},
|
1929 |
hideAfterClickOutsideListener: function () {
|
1930 |
var that = this;
|
1931 |
-
if (!
|
1932 |
|
1933 |
$(document).mouseup(function (e) {
|
1934 |
if (!that.visible) {
|
1935 |
return;
|
1936 |
}
|
1937 |
|
1938 |
-
var
|
1939 |
-
$containerDetails = that.getDetailsContainer(),
|
1940 |
-
outsideForm = !($(e.target).closest('.' + that.options.searchFormClass).length > 0 || $(e.target).hasClass(that.options.searchFormClass)),
|
1941 |
outsideContainer = !($(e.target).closest('.' + that.options.containerClass).length > 0 || $(e.target).hasClass(that.options.containerClass));
|
1942 |
|
1943 |
-
|
1944 |
-
if (!that.canShowDetailsBox()) {
|
1945 |
|
1946 |
if (outsideForm && outsideContainer) {
|
1947 |
that.hide();
|
@@ -2052,12 +2165,12 @@
|
|
2052 |
if (!options.showHeadings) {
|
2053 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.vendor + '</span>';
|
2054 |
}
|
2055 |
-
} else if (options.isPremium && suggestion.type === 'post') {
|
2056 |
-
classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-
|
2057 |
if (!options.showHeadings) {
|
2058 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.post + '</span>';
|
2059 |
}
|
2060 |
-
} else if (options.isPremium && suggestion.type === 'page') {
|
2061 |
classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page';
|
2062 |
if (!options.showHeadings) {
|
2063 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.page + '</span>';
|
@@ -2077,7 +2190,7 @@
|
|
2077 |
classes += ' dgwt-wcas-suggestion-nores';
|
2078 |
suggestion.value = dgwt_wcas.labels.no_results;
|
2079 |
highlight = false;
|
2080 |
-
if (
|
2081 |
that.detailsPanelClearScene();
|
2082 |
}
|
2083 |
$('body').addClass('dgwt-wcas-nores');
|
@@ -2237,13 +2350,14 @@
|
|
2237 |
|
2238 |
// Add class on show
|
2239 |
$('body').addClass('dgwt-wcas-open');
|
|
|
2240 |
|
2241 |
// Reset the latest mousedown position
|
2242 |
that.isMouseDownOnSearchElements = false;
|
2243 |
|
2244 |
that.automaticAlignment();
|
2245 |
|
2246 |
-
if (
|
2247 |
$('body').addClass('dgwt-wcas-is-details');
|
2248 |
containerDetails.show();
|
2249 |
that.fixHeight();
|
@@ -2257,24 +2371,29 @@
|
|
2257 |
}
|
2258 |
|
2259 |
that.visible = true;
|
2260 |
-
that.
|
2261 |
-
|
2262 |
-
if (that.options.orientation === 'top') {
|
2263 |
-
that.getSuggestionsContainer().addClass(that.classes.suggestionsContainerOrientTop);
|
2264 |
-
$('body').addClass('dgwt-wcas-block-scroll');
|
2265 |
-
setTimeout(function () {
|
2266 |
-
that.scrollDownSuggestions();
|
2267 |
-
}, 300);
|
2268 |
-
}
|
2269 |
|
2270 |
that.findBestHint();
|
2271 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2272 |
adjustContainerWidth: function () {
|
2273 |
var that = this,
|
2274 |
$searchBar = that.getFormWrapper(),
|
2275 |
$suggestions = that.getSuggestionsContainer(),
|
2276 |
$detailsPanel = that.getDetailsContainer(),
|
2277 |
-
$baseElement =
|
2278 |
baseWidth = $baseElement.outerWidth();
|
2279 |
|
2280 |
if (!$searchBar.length) {
|
@@ -2285,7 +2404,7 @@
|
|
2285 |
$suggestions.css('width', baseWidth + 'px');
|
2286 |
|
2287 |
// Mode 2 - keep the suggestions wrapper and the details panel together under the search bar
|
2288 |
-
if (that.
|
2289 |
var measurementError = 0;
|
2290 |
|
2291 |
// Width 50:50
|
@@ -2299,19 +2418,31 @@
|
|
2299 |
}
|
2300 |
}
|
2301 |
},
|
2302 |
-
|
|
|
2303 |
|
2304 |
var $submit = typeof $formWrapper == 'object' ? $formWrapper.find('.dgwt-wcas-search-submit') : $('.dgwt-wcas-search-submit');
|
2305 |
|
2306 |
if ($submit.length > 0) {
|
2307 |
$submit.each(function () {
|
2308 |
-
|
2309 |
var $preloader = $(this).closest('.dgwt-wcas-search-wrapp').find('.dgwt-wcas-preloader');
|
|
|
|
|
2310 |
|
2311 |
-
if (
|
2312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2313 |
} else {
|
2314 |
-
|
|
|
|
|
|
|
|
|
2315 |
}
|
2316 |
});
|
2317 |
}
|
@@ -2425,15 +2556,6 @@
|
|
2425 |
|
2426 |
return suggestions;
|
2427 |
},
|
2428 |
-
validateOrientation: function (orientation, fallback) {
|
2429 |
-
orientation = $.trim(orientation || '').toLowerCase();
|
2430 |
-
|
2431 |
-
if ($.inArray(orientation, ['auto', 'bottom', 'top']) === -1) {
|
2432 |
-
orientation = fallback;
|
2433 |
-
}
|
2434 |
-
|
2435 |
-
return orientation;
|
2436 |
-
},
|
2437 |
processResponse: function (result, originalQuery, cacheKey) {
|
2438 |
var that = this,
|
2439 |
options = that.options;
|
@@ -2453,10 +2575,6 @@
|
|
2453 |
return;
|
2454 |
}
|
2455 |
|
2456 |
-
if (that.options.orientation === 'top') {
|
2457 |
-
result.suggestions.reverse();
|
2458 |
-
}
|
2459 |
-
|
2460 |
that.suggestions = result.suggestions;
|
2461 |
that.suggest();
|
2462 |
},
|
@@ -2492,7 +2610,7 @@
|
|
2492 |
return;
|
2493 |
}
|
2494 |
|
2495 |
-
that.
|
2496 |
that.hide();
|
2497 |
that.onSelect(i);
|
2498 |
},
|
@@ -2548,7 +2666,7 @@
|
|
2548 |
return;
|
2549 |
}
|
2550 |
|
2551 |
-
if (!activeItem || that.
|
2552 |
return;
|
2553 |
}
|
2554 |
|
@@ -2641,8 +2759,6 @@
|
|
2641 |
$el = that.el,
|
2642 |
$formWrapper = that.getFormWrapper(),
|
2643 |
$suggestionsWrapper = that.getSuggestionsContainer(),
|
2644 |
-
$detailsWrapper = that.getDetailsContainer(),
|
2645 |
-
$form = $el.closest('.' + that.options.formClass),
|
2646 |
$mobileHandler = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
|
2647 |
|
2648 |
// Remove all events
|
@@ -2654,7 +2770,7 @@
|
|
2654 |
}
|
2655 |
|
2656 |
$el.removeData('autocomplete');
|
2657 |
-
$(window).off('resize.autocomplete', that.
|
2658 |
|
2659 |
$formWrapper.removeClass('dgwt-wcas-active');
|
2660 |
|
@@ -2735,21 +2851,45 @@
|
|
2735 |
},
|
2736 |
positionOverlayDarkened: function () {
|
2737 |
var that = this,
|
|
|
2738 |
$darkenedOverlay = $('.' + that.options.darkenedOverlayClass);
|
2739 |
|
2740 |
if ($darkenedOverlay.length > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2741 |
$darkenedOverlay.children('div').each(function (i) {
|
2742 |
-
that.positionOverlayDarkenedDiv($(this), i + 1);
|
2743 |
});
|
2744 |
}
|
2745 |
},
|
2746 |
-
positionOverlayDarkenedDiv: function ($el, orient) {
|
2747 |
var that = this,
|
2748 |
-
elData
|
|
|
2749 |
css,
|
2750 |
-
secureOffset = 200; // Secure
|
2751 |
|
2752 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2753 |
|
2754 |
switch (orient) {
|
2755 |
case 1:
|
@@ -2761,11 +2901,12 @@
|
|
2761 |
};
|
2762 |
break;
|
2763 |
case 2:
|
|
|
2764 |
css = {
|
2765 |
left: (-secureOffset) + 'px',
|
2766 |
top: (-secureOffset) + 'px',
|
2767 |
width: ($(window).outerWidth(false) + secureOffset) + 'px',
|
2768 |
-
height: (
|
2769 |
};
|
2770 |
break;
|
2771 |
case 3:
|
@@ -2777,9 +2918,10 @@
|
|
2777 |
};
|
2778 |
break;
|
2779 |
case 4:
|
|
|
2780 |
css = {
|
2781 |
left: (-secureOffset) + 'px',
|
2782 |
-
top: (
|
2783 |
width: ($(window).outerWidth(false) + secureOffset) + 'px',
|
2784 |
height: ($(document).outerHeight(false) - elData.bottom - 1) + 'px'
|
2785 |
};
|
@@ -2790,98 +2932,15 @@
|
|
2790 |
$el.css(css);
|
2791 |
}
|
2792 |
},
|
2793 |
-
enableOverlayMobile: function () {
|
2794 |
-
var that = this;
|
2795 |
-
|
2796 |
-
if (that.overlayMobileState === 'on') {
|
2797 |
-
return;
|
2798 |
-
}
|
2799 |
-
|
2800 |
-
that.overlayMobileState = 'on';
|
2801 |
-
|
2802 |
-
var zIndex = 99999999999,
|
2803 |
-
$wrapper = that.getFormWrapper(),
|
2804 |
-
$suggestionsWrapp = that.getSuggestionsContainer(),
|
2805 |
-
$overlayWrap,
|
2806 |
-
html = '';
|
2807 |
-
|
2808 |
-
$('html').addClass('dgwt-wcas-overlay-mobile-on');
|
2809 |
-
html += '<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">';
|
2810 |
-
html += '<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">';
|
2811 |
-
html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
|
2812 |
-
if (typeof dgwt_wcas.back_icon == 'string') {
|
2813 |
-
html += dgwt_wcas.back_icon;
|
2814 |
-
}
|
2815 |
-
html += '</button>';
|
2816 |
-
html += '</div>';
|
2817 |
-
html += '</div>';
|
2818 |
-
|
2819 |
-
// Create overlay
|
2820 |
-
$(that.options.mobileOverlayWrapper).append(html);
|
2821 |
-
$overlayWrap = $('.js-dgwt-wcas-overlay-mobile');
|
2822 |
-
$overlayWrap.css('zIndex', zIndex);
|
2823 |
-
|
2824 |
-
$wrapper.after('<span class="js-dgwt-wcas-om-hook"></span>');
|
2825 |
-
$wrapper.appendTo('.js-dgwt-wcas-om-bar');
|
2826 |
-
$suggestionsWrapp.appendTo('.js-dgwt-wcas-om-bar');
|
2827 |
-
$wrapper.addClass('dgwt-wcas-search-wrapp-mobile');
|
2828 |
-
|
2829 |
-
if ($wrapper.hasClass('dgwt-wcas-has-submit')) {
|
2830 |
-
$wrapper.addClass('dgwt-wcas-has-submit-off');
|
2831 |
-
$wrapper.removeClass('dgwt-wcas-has-submit');
|
2832 |
-
}
|
2833 |
-
|
2834 |
-
$wrapper.find('.' + that.options.searchInputClass).focus();
|
2835 |
-
|
2836 |
-
$(document).on('click.autocomplete', '.js-dgwt-wcas-om-return', function (e) {
|
2837 |
-
that.disableOverlayMobile($overlayWrap);
|
2838 |
-
});
|
2839 |
-
},
|
2840 |
-
disableOverlayMobile: function ($overlayWrap) {
|
2841 |
-
var that = this;
|
2842 |
-
|
2843 |
-
if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
|
2844 |
-
that.overlayMobileState = 'off';
|
2845 |
-
return;
|
2846 |
-
}
|
2847 |
-
|
2848 |
-
var $suggestionsWrapp = that.getSuggestionsContainer();
|
2849 |
-
|
2850 |
-
var $clonedForm = $('.js-dgwt-wcas-om-bar').find('.' + that.options.searchFormClass);
|
2851 |
-
|
2852 |
-
if ($clonedForm.hasClass('dgwt-wcas-has-submit-off')) {
|
2853 |
-
$clonedForm.removeClass('dgwt-wcas-has-submit-off');
|
2854 |
-
$clonedForm.addClass('dgwt-wcas-has-submit');
|
2855 |
-
}
|
2856 |
-
|
2857 |
-
$clonedForm.removeClass('dgwt-wcas-search-wrapp-mobile');
|
2858 |
-
$('html').removeClass('dgwt-wcas-overlay-mobile-on');
|
2859 |
-
$suggestionsWrapp.appendTo('body');
|
2860 |
-
$suggestionsWrapp.removeAttr('body-scroll-lock-ignore');
|
2861 |
-
$('.js-dgwt-wcas-om-hook').after($clonedForm);
|
2862 |
-
$('.js-dgwt-wcas-overlay-mobile').remove();
|
2863 |
-
$('.js-dgwt-wcas-om-hook').remove();
|
2864 |
-
|
2865 |
-
setTimeout(function () {
|
2866 |
-
$clonedForm.find('.' + that.options.searchInputClass).val('');
|
2867 |
-
var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
|
2868 |
-
if ($clonedForm.length > 0) {
|
2869 |
-
$closeBtn.removeClass('dgwt-wcas-close');
|
2870 |
-
$closeBtn.html('');
|
2871 |
-
}
|
2872 |
-
|
2873 |
-
that.hide();
|
2874 |
-
|
2875 |
-
}, 150);
|
2876 |
-
|
2877 |
-
|
2878 |
-
that.overlayMobileState = 'off';
|
2879 |
-
},
|
2880 |
showCloseButton: function () {
|
2881 |
var that = this,
|
2882 |
iconBody = typeof dgwt_wcas.close_icon != 'undefined' ? dgwt_wcas.close_icon : '',
|
2883 |
$actionsEl = that.getFormWrapper().find('.' + that.options.preloaderClass);
|
2884 |
|
|
|
|
|
|
|
|
|
2885 |
// Click close icon
|
2886 |
if (!$actionsEl.hasClass(that.options.closeTrigger)) {
|
2887 |
$actionsEl.on('click.autocomplete', function () {
|
@@ -2904,7 +2963,22 @@
|
|
2904 |
|
2905 |
$btn.off('click.autocomplete');
|
2906 |
},
|
2907 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2908 |
|
2909 |
var $checkElements = $element.add($element.parents());
|
2910 |
var isFixed = false;
|
@@ -2958,9 +3032,127 @@
|
|
2958 |
}
|
2959 |
|
2960 |
$(document).trigger('dgwtWcasGAEvent', {'term': label, 'category': category});
|
2961 |
-
}
|
2962 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2963 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2964 |
|
2965 |
// Create chainable jQuery plugin:
|
2966 |
$.fn.dgwtWcasAutocomplete = function (options, args) {
|
@@ -3189,15 +3381,14 @@
|
|
3189 |
}
|
3190 |
|
3191 |
/*-----------------------------------------------------------------
|
3192 |
-
/*
|
3193 |
/*-----------------------------------------------------------------*/
|
3194 |
-
|
3195 |
-
|
3196 |
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
}
|
3201 |
|
3202 |
window.dgwt_wcas.config = {
|
3203 |
minChars: dgwt_wcas.min_chars,
|
@@ -3206,7 +3397,7 @@
|
|
3206 |
triggerSelectOnValidInput: false,
|
3207 |
serviceUrl: dgwt_wcas.ajax_search_endpoint,
|
3208 |
paramName: 's',
|
3209 |
-
showDetailsPanel:
|
3210 |
showImage: dgwt_wcas.show_images == 1 ? true : false,
|
3211 |
showPrice: dgwt_wcas.show_price == 1 ? true : false,
|
3212 |
showDescription: dgwt_wcas.show_desc == 1 ? true : false,
|
@@ -3220,7 +3411,8 @@
|
|
3220 |
showHeadings: dgwt_wcas.show_headings == 1 ? true : false,
|
3221 |
isPremium: dgwt_wcas.is_premium == 1 ? true : false,
|
3222 |
taxonomyBrands: dgwt_wcas.taxonomy_brands,
|
3223 |
-
|
|
|
3224 |
mobileOverlayWrapper: dgwt_wcas.mobile_overlay_wrapper,
|
3225 |
mobileOverlayDelay: dgwt_wcas.mobile_overlay_delay,
|
3226 |
debounceWaitMs: dgwt_wcas.debounce_wait_ms,
|
@@ -3231,174 +3423,265 @@
|
|
3231 |
showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false,
|
3232 |
disableHits: typeof dgwt_wcas.disable_hits != 'undefined' && dgwt_wcas.disable_hits ? true : false,
|
3233 |
disableSubmit: typeof dgwt_wcas.disable_submit != 'undefined' && dgwt_wcas.disable_submit ? true : false,
|
|
|
|
|
3234 |
};
|
3235 |
|
3236 |
$('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
|
3237 |
|
3238 |
});
|
3239 |
|
3240 |
-
/*-----------------------------------------------------------------
|
3241 |
-
/* Fix broken search bars after click browser's back arrow.
|
3242 |
-
/* Not worked for some browsers especially Safari and FF
|
3243 |
-
/* Add dgwt-wcas-active class if wasn't added for some reason
|
3244 |
-
/*
|
3245 |
-
/*------------ -----------------------------------------------------*/
|
3246 |
-
$(window).on('load', function () {
|
3247 |
-
var i = 0;
|
3248 |
-
var interval = setInterval(function () {
|
3249 |
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
|
3261 |
-
|
3262 |
-
|
3263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3264 |
}
|
3265 |
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
|
|
|
|
3269 |
}
|
3270 |
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
/* Some page builders can copy instances of search bar without events
|
3279 |
-
/* for eg. mobile usage. We try to fix all broken search bars.
|
3280 |
-
/*------------ -----------------------------------------------------*/
|
3281 |
-
$(document).ready(function () {
|
3282 |
-
setTimeout(function () {
|
3283 |
-
makeIDUnique();
|
3284 |
-
maybeReinit();
|
3285 |
-
}, 500);
|
3286 |
-
});
|
3287 |
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
|
|
|
|
|
|
|
|
|
|
3293 |
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
|
|
|
|
3300 |
|
3301 |
-
|
3302 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3303 |
|
3304 |
-
|
|
|
|
|
|
|
|
|
3305 |
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3309 |
|
3310 |
-
|
|
|
|
|
|
|
3311 |
|
|
|
|
|
|
|
|
|
3312 |
}
|
3313 |
});
|
|
|
|
|
|
|
|
|
3314 |
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
/**
|
3319 |
-
* Fix duplicated ID created by some themes or builders
|
3320 |
-
*/
|
3321 |
-
function makeIDUnique() {
|
3322 |
-
|
3323 |
-
var $inputs = $('.dgwt-wcas-search-input');
|
3324 |
-
|
3325 |
-
var uniqueID = [];
|
3326 |
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3330 |
|
3331 |
-
|
3332 |
-
uniqueID.push(id);
|
3333 |
|
3334 |
-
|
3335 |
-
var newID = Math.random().toString(36).substring(2, 6);
|
3336 |
-
newID = 'dgwt-wcas-search-input-' + newID;
|
3337 |
|
3338 |
-
|
3339 |
-
|
|
|
|
|
3340 |
|
|
|
|
|
|
|
3341 |
}
|
3342 |
});
|
3343 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3344 |
|
3345 |
-
|
|
|
|
|
|
|
|
|
|
|
3346 |
|
3347 |
-
|
3348 |
-
* Init not initialized search bar
|
3349 |
-
*/
|
3350 |
-
function maybeReinit() {
|
3351 |
|
3352 |
-
|
|
|
|
|
|
|
|
|
3353 |
|
3354 |
-
|
3355 |
-
|
|
|
|
|
3356 |
|
3357 |
-
|
3358 |
-
$(this).dgwtWcasAutocomplete(window.dgwt_wcas.config);
|
3359 |
-
}
|
3360 |
|
|
|
3361 |
});
|
3362 |
-
}
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
* Refreshing the content on the checkout page when a product is added to the cart from the search Details Panel
|
3368 |
-
*/
|
3369 |
-
$(document.body).on('added_to_cart', function () {
|
3370 |
-
if (
|
3371 |
-
$(document.body).hasClass('woocommerce-checkout') &&
|
3372 |
-
$('.dgwt-wcas-search-input').length > 0
|
3373 |
-
) {
|
3374 |
-
$(document.body).trigger('update_checkout');
|
3375 |
-
}
|
3376 |
-
});
|
3377 |
-
}());
|
3378 |
-
|
3379 |
-
/**
|
3380 |
-
* Fix Elementor popups
|
3381 |
-
* Reinit the search bars after loading Elementor popup
|
3382 |
-
*/
|
3383 |
-
$(document).ready(function () {
|
3384 |
-
if ($('[href^="#elementor-action%3Aaction%3Dpopup%3Aopen"]').length > 0) {
|
3385 |
-
$(document).on('elementor/popup/show', () => {
|
3386 |
-
var $inputs = $('.elementor-popup-modal .dgwt-wcas-search-input');
|
3387 |
|
3388 |
if ($inputs.length > 0) {
|
3389 |
$inputs.each(function () {
|
3390 |
-
var $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3391 |
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
|
|
|
|
3395 |
}
|
3396 |
-
|
3397 |
-
|
|
|
|
|
|
|
|
|
|
|
3398 |
});
|
3399 |
}
|
3400 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3401 |
}
|
3402 |
-
|
|
|
|
|
3403 |
|
3404 |
}));
|
212 |
suggestion: 'dgwt-wcas-suggestion',
|
213 |
suggestionsContainerOrientTop: 'dgwt-wcas-suggestions-wrapp--top',
|
214 |
inputFilled: 'dgwt-wcas-search-filled',
|
215 |
+
darkenOverlayMounted: 'js-dgwt-wcas-search-darkoverl-mounted',
|
216 |
+
fixed: 'dgwt-wcas-suggestions-wrapp-fixed'
|
217 |
};
|
218 |
that.hint = null;
|
219 |
that.hintValue = '';
|
222 |
that.overlayDarkenedState = 'off';
|
223 |
that.isMouseDownOnSearchElements = false;
|
224 |
|
225 |
+
// Voice search
|
226 |
+
that.voiceSearchRecognition = null;
|
227 |
+
that.voiceSearchStarted = null;
|
228 |
+
|
229 |
// Initialize and set options:
|
230 |
that.initialize();
|
231 |
that.setOptions(options);
|
277 |
preloaderClass: 'dgwt-wcas-preloader',
|
278 |
closeTrigger: 'dgwt-wcas-close',
|
279 |
formClass: 'dgwt-wcas-search-form',
|
280 |
+
voiceSearchClass: 'dgwt-wcas-voice-search',
|
281 |
+
voiceSearchSupportedClass: 'dgwt-wcas-voice-search-supported',
|
282 |
+
voiceSearchActiveClass: 'dgwt-wcas-voice-search-active',
|
283 |
+
voiceSearchDisabledClass: 'dgwt-wcas-voice-search-disabled',
|
284 |
tabDisabled: false,
|
285 |
dataType: 'text',
|
286 |
currentRequest: null,
|
292 |
paramName: 'query',
|
293 |
transformResult: _transformResult,
|
294 |
noSuggestionNotice: 'No results',
|
|
|
295 |
forceFixPosition: false,
|
296 |
positionFixed: false,
|
297 |
debounceWaitMs: 400,
|
300 |
showProductVendor: false,
|
301 |
disableHits: false,
|
302 |
disableSubmit: false,
|
303 |
+
voiceSearchEnabled: false,
|
304 |
+
voiceSearchLang: '',
|
305 |
}
|
306 |
|
307 |
function _lookupFilter(suggestion, originalQuery, queryLowerCase) {
|
346 |
// Remove autocomplete attribute to prevent native suggestions:
|
347 |
that.element.setAttribute('autocomplete', 'off');
|
348 |
|
349 |
+
that.options.params = that.applyCustomParams(that.options.params);
|
350 |
+
|
351 |
that.createContainers();
|
352 |
|
353 |
that.registerEventsSearchBar();
|
354 |
that.registerEventsSuggestions();
|
355 |
that.registerEventsDetailsPanel();
|
356 |
that.registerIconHandler();
|
357 |
+
that.registerFlexibleLayout();
|
358 |
+
that.initVoiceSearch();
|
359 |
|
360 |
+
that.fixPosition = function () {
|
361 |
that.adjustContainerWidth();
|
362 |
if (that.visible) {
|
363 |
+
that.fixPositionSuggestions();
|
364 |
+
if (that.canShowDetailsPanel()) {
|
365 |
+
that.fixPositionDetailsPanel();
|
366 |
+
}
|
367 |
}
|
368 |
that.positionOverlayDarkened();
|
369 |
};
|
370 |
|
371 |
+
// Fix position on resize
|
372 |
$(window).on('resize.autocomplete', function () {
|
373 |
var that = utils.getActiveInstance();
|
374 |
+
clearTimeout(window.dgwt_wcas.resizeOnlyOnce);
|
375 |
if (typeof that != 'undefined') {
|
376 |
+
window.dgwt_wcas.resizeOnlyOnce = setTimeout(function () {
|
377 |
+
that.fixPosition();
|
378 |
+
}, 100);
|
379 |
+
}
|
380 |
+
});
|
381 |
+
|
382 |
+
// Fix position on scroll
|
383 |
+
$(window).on('scroll.autocomplete', function () {
|
384 |
+
var that = utils.getActiveInstance();
|
385 |
+
clearTimeout(window.dgwt_wcas.scrollOnlyOnce);
|
386 |
+
if (typeof that != 'undefined') {
|
387 |
+
window.dgwt_wcas.scrollOnlyOnce = setTimeout(function () {
|
388 |
+
that.fixPosition();
|
389 |
+
}, 100);
|
390 |
}
|
391 |
});
|
392 |
|
395 |
$(window).on('resize.autocomplete', function () {
|
396 |
var newWidth = $(window).width();
|
397 |
if (newWidth != windowWidth) {
|
398 |
+
that.toggleMobileOverlayMode();
|
399 |
windowWidth = newWidth;
|
400 |
}
|
401 |
});
|
402 |
|
403 |
+
if (that.isBreakpointReached('mobile-overlay')) {
|
404 |
+
that.activateMobileOverlayMode();
|
405 |
}
|
406 |
|
407 |
that.hideAfterClickOutsideListener();
|
408 |
|
|
|
409 |
// Mark as initialized
|
410 |
that.suggestionsContainer.addClass('js-dgwt-wcas-initialized');
|
411 |
|
412 |
if (that.detailsContainer && that.detailsContainer.length > 0) {
|
413 |
that.detailsContainer.addClass('js-dgwt-wcas-initialized');
|
414 |
}
|
|
|
415 |
},
|
416 |
createContainers: function (type) {
|
417 |
var that = this,
|
458 |
}
|
459 |
|
460 |
// Details Panel
|
461 |
+
if (that.canShowDetailsPanel()) {
|
462 |
|
463 |
if ($('.' + options.containerDetailsClass).length == 0) {
|
464 |
that.detailsContainer = $(DgwtWcasAutocompleteSearch.utils.createNode(options.containerDetailsClass));
|
477 |
var that = this;
|
478 |
|
479 |
// Extra tasks on submit
|
480 |
+
that.getForm().on('submit.autocomplete', function (e) {
|
481 |
|
482 |
if (that.options.disableSubmit) {
|
483 |
e.preventDefault();
|
509 |
}
|
510 |
|
511 |
// Clean before submit
|
512 |
+
that.closeOverlayMobile();
|
513 |
|
514 |
});
|
515 |
|
516 |
// Position preloader
|
517 |
if (document.readyState === 'complete') {
|
518 |
+
that.positionPreloaderAndMic();
|
519 |
} else {
|
520 |
$(window).on('load', function () {
|
521 |
+
that.positionPreloaderAndMic();
|
522 |
});
|
523 |
}
|
524 |
|
563 |
var currentIndex = $(this).data('index');
|
564 |
var selector = '.dgwt-wcas-suggestion[data-index="' + currentIndex + '"]';
|
565 |
|
566 |
+
var timeOffset = that.canShowDetailsPanel() ? 100 : 1;
|
567 |
|
568 |
if (that.selectedIndex != currentIndex) {
|
569 |
utils.mouseHoverDebounce(function () {
|
622 |
var that = this,
|
623 |
detailsContainer = that.getDetailsContainer();
|
624 |
|
625 |
+
if (!that.canShowDetailsPanel() || detailsContainer.hasClass('js-dgwt-wcas-initialized')) {
|
626 |
return;
|
627 |
}
|
628 |
|
641 |
},
|
642 |
registerIconHandler: function () {
|
643 |
var that = this,
|
644 |
+
$formWrapper = that.getFormWrapper(),
|
645 |
+
$form = that.getForm();
|
646 |
|
647 |
$formWrapper.on('click.autocomplete', '.js-dgwt-wcas-search-icon-handler', function (e) {
|
648 |
|
649 |
var $input = $formWrapper.find('.' + that.options.searchInputClass);
|
650 |
|
651 |
if ($formWrapper.hasClass('dgwt-wcas-layout-icon-open')) {
|
|
|
652 |
that.hide();
|
653 |
$form.hide(true);
|
654 |
|
662 |
$formWrapper.addClass('dgwt-wcas-layout-icon-open');
|
663 |
that.positionIconSearchMode($formWrapper);
|
664 |
|
665 |
+
$form.fadeIn(50, function () {
|
666 |
$arrow.show();
|
667 |
+
that.positionPreloaderAndMic($formWrapper);
|
668 |
$input.focus();
|
669 |
});
|
670 |
|
671 |
+
setTimeout(function () {
|
672 |
+
that.fixPosition();
|
673 |
+
}, 110);
|
674 |
|
675 |
+
}
|
676 |
|
677 |
});
|
678 |
|
694 |
}
|
695 |
});
|
696 |
}
|
697 |
+
},
|
698 |
+
registerFlexibleLayout: function () {
|
699 |
+
var that = this;
|
700 |
|
701 |
// Trigger only when x axis is changed
|
702 |
var windowWidth = $(window).width();
|
703 |
$(window).on('resize.autocomplete', function () {
|
704 |
var newWidth = $(window).width();
|
705 |
if (newWidth != windowWidth) {
|
706 |
+
that.reloadFlexibleLayout();
|
707 |
windowWidth = newWidth;
|
708 |
}
|
709 |
});
|
710 |
|
711 |
if (document.readyState == 'complete') {
|
712 |
+
that.reloadFlexibleLayout();
|
713 |
} else {
|
714 |
$(window).on('load.autocomplete', function () {
|
715 |
+
that.reloadFlexibleLayout();
|
716 |
});
|
717 |
}
|
718 |
|
719 |
},
|
720 |
+
activateMobileOverlayMode: function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
var that = this,
|
722 |
$formWrapper = that.getFormWrapper();
|
723 |
|
727 |
) {
|
728 |
|
729 |
$formWrapper.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>');
|
730 |
+
$formWrapper.addClass('dgwt-wcas-mobile-overlay-trigger-active');
|
731 |
|
732 |
var $el = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
|
733 |
|
735 |
|
736 |
if (that.options.mobileOverlayDelay > 0) {
|
737 |
setTimeout(function () {
|
738 |
+
that.showMobileOverlay();
|
739 |
}, that.options.mobileOverlayDelay);
|
740 |
} else {
|
741 |
+
that.showMobileOverlay();
|
742 |
}
|
743 |
|
744 |
});
|
746 |
}
|
747 |
|
748 |
},
|
749 |
+
deactivateMobileOverlayMode: function () {
|
750 |
var that = this,
|
751 |
$formWrapper = that.getFormWrapper(),
|
752 |
$suggestionsWrapper = that.getSuggestionsContainer();
|
756 |
if ($formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')
|
757 |
&& $el.length
|
758 |
) {
|
759 |
+
that.closeOverlayMobile();
|
|
|
760 |
$el.remove();
|
761 |
+
$formWrapper.removeClass('dgwt-wcas-mobile-overlay-trigger-active');
|
762 |
}
|
763 |
|
764 |
},
|
765 |
+
toggleMobileOverlayMode: function () {
|
766 |
var that = this,
|
767 |
$formWrapper = that.getFormWrapper(),
|
768 |
+
isMobOverlayEnabled = false;
|
769 |
|
770 |
// Break early if this search bar shouldn't open in overlay mobile mode
|
771 |
if (!$formWrapper.hasClass('js-dgwt-wcas-mobile-overlay-enabled')) {
|
774 |
|
775 |
// Determine the search should open in mobile overlay
|
776 |
if ($formWrapper.find('.js-dgwt-wcas-enable-mobile-form').length) {
|
777 |
+
isMobOverlayEnabled = true;
|
778 |
}
|
779 |
|
780 |
// Toggled?
|
781 |
+
if (
|
782 |
+
(!isMobOverlayEnabled && that.isBreakpointReached('mobile-overlay'))
|
783 |
+
|| (isMobOverlayEnabled && !that.isBreakpointReached('mobile-overlay'))
|
784 |
) {
|
785 |
|
786 |
var $suggestionsWrapper = that.getSuggestionsContainer();
|
792 |
}
|
793 |
|
794 |
that.hideIconModeSearch();
|
795 |
+
}
|
796 |
|
797 |
+
// Activate overlay on mobile feature
|
798 |
+
if (!isMobOverlayEnabled && that.isBreakpointReached('mobile-overlay')) {
|
799 |
+
that.activateMobileOverlayMode();
|
800 |
}
|
801 |
|
802 |
+
// Deactivate overlay on mobile feature
|
803 |
+
if (isMobOverlayEnabled && !that.isBreakpointReached('mobile-overlay')) {
|
804 |
+
that.deactivateMobileOverlayMode();
|
805 |
}
|
806 |
+
},
|
807 |
+
showMobileOverlay: function () {
|
808 |
+
var that = this;
|
809 |
+
|
810 |
+
if (that.overlayMobileState === 'on') {
|
811 |
+
return;
|
812 |
+
}
|
813 |
+
|
814 |
+
that.overlayMobileState = 'on';
|
815 |
+
|
816 |
+
var zIndex = 99999999999,
|
817 |
+
$wrapper = that.getFormWrapper(),
|
818 |
+
$suggestionsWrapp = that.getSuggestionsContainer(),
|
819 |
+
$overlayWrap,
|
820 |
+
html = '';
|
821 |
|
822 |
+
$('html').addClass('dgwt-wcas-overlay-mobile-on');
|
823 |
+
$('html').addClass('dgwt-wcas-open-' + that.getSearchStyle());
|
824 |
+
html += '<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">';
|
825 |
+
html += '<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">';
|
826 |
+
html += '<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">'
|
827 |
+
if (typeof dgwt_wcas.back_icon == 'string') {
|
828 |
+
html += dgwt_wcas.back_icon;
|
829 |
}
|
830 |
+
html += '</button>';
|
831 |
+
html += '</div>';
|
832 |
+
html += '</div>';
|
833 |
+
|
834 |
+
// Create overlay
|
835 |
+
$(that.options.mobileOverlayWrapper).append(html);
|
836 |
+
$overlayWrap = $('.js-dgwt-wcas-overlay-mobile');
|
837 |
+
$overlayWrap.css('zIndex', zIndex);
|
838 |
+
|
839 |
+
$wrapper.after('<span class="js-dgwt-wcas-om-hook"></span>');
|
840 |
+
$wrapper.appendTo('.js-dgwt-wcas-om-bar');
|
841 |
+
$suggestionsWrapp.appendTo('.js-dgwt-wcas-om-bar');
|
842 |
+
$wrapper.addClass('dgwt-wcas-search-wrapp-mobile');
|
843 |
+
|
844 |
+
if ($wrapper.hasClass('dgwt-wcas-has-submit')) {
|
845 |
+
$wrapper.addClass('dgwt-wcas-has-submit-off');
|
846 |
+
$wrapper.removeClass('dgwt-wcas-has-submit');
|
847 |
+
}
|
848 |
+
|
849 |
+
$wrapper.find('.' + that.options.searchInputClass).focus();
|
850 |
+
|
851 |
+
$(document).on('click.autocomplete', '.js-dgwt-wcas-om-return', function (e) {
|
852 |
+
that.closeOverlayMobile($overlayWrap);
|
853 |
+
});
|
854 |
},
|
855 |
+
closeOverlayMobile: function ($overlayWrap) {
|
856 |
var that = this;
|
|
|
857 |
|
858 |
+
if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
|
859 |
+
that.overlayMobileState = 'off';
|
860 |
+
return;
|
861 |
+
}
|
862 |
|
863 |
+
var $suggestionsWrapp = that.getSuggestionsContainer();
|
864 |
+
|
865 |
+
var $clonedForm = $('.js-dgwt-wcas-om-bar').find('.' + that.options.searchFormClass);
|
866 |
+
|
867 |
+
if ($clonedForm.hasClass('dgwt-wcas-has-submit-off')) {
|
868 |
+
$clonedForm.removeClass('dgwt-wcas-has-submit-off');
|
869 |
+
$clonedForm.addClass('dgwt-wcas-has-submit');
|
870 |
+
}
|
871 |
+
|
872 |
+
$clonedForm.removeClass('dgwt-wcas-search-wrapp-mobile');
|
873 |
+
$('html').removeClass('dgwt-wcas-overlay-mobile-on');
|
874 |
+
$('html').removeClass('dgwt-wcas-open-' + that.getSearchStyle());
|
875 |
+
$suggestionsWrapp.appendTo('body');
|
876 |
+
$suggestionsWrapp.removeAttr('body-scroll-lock-ignore');
|
877 |
+
$('.js-dgwt-wcas-om-hook').after($clonedForm);
|
878 |
+
$('.js-dgwt-wcas-overlay-mobile').remove();
|
879 |
+
$('.js-dgwt-wcas-om-hook').remove();
|
880 |
+
|
881 |
+
setTimeout(function () {
|
882 |
+
$clonedForm.find('.' + that.options.searchInputClass).val('');
|
883 |
+
var $closeBtn = $clonedForm.find('.dgwt-wcas-close');
|
884 |
+
if ($clonedForm.length > 0) {
|
885 |
+
$closeBtn.removeClass('dgwt-wcas-close');
|
886 |
+
$closeBtn.html('');
|
887 |
+
}
|
888 |
+
|
889 |
+
that.hide();
|
890 |
+
|
891 |
+
}, 150);
|
892 |
+
|
893 |
+
|
894 |
+
that.overlayMobileState = 'off';
|
895 |
+
},
|
896 |
+
reloadFlexibleLayout: function () {
|
897 |
+
var that = this,
|
898 |
+
$searchWrapp = that.getFormWrapper(),
|
899 |
+
flexibleMode = 0;
|
900 |
+
|
901 |
+
/**
|
902 |
+
* flexibleMode
|
903 |
+
* 0 = not set
|
904 |
+
* 1 = Icon on mobile, search bar on desktop
|
905 |
+
* 2 = Icon on desktop, search bar on mobile
|
906 |
+
*/
|
907 |
+
|
908 |
+
if ($searchWrapp.hasClass('js-dgwt-wcas-layout-icon-flexible')) {
|
909 |
+
flexibleMode = 1;
|
910 |
+
}
|
911 |
+
|
912 |
+
if ($searchWrapp.hasClass('js-dgwt-wcas-layout-icon-flexible-inv')) {
|
913 |
+
flexibleMode = 2;
|
914 |
+
}
|
915 |
+
if (flexibleMode > 0) {
|
916 |
+
|
917 |
+
if (
|
918 |
+
(flexibleMode === 1 && that.isBreakpointReached('search-layout'))
|
919 |
+
|| (flexibleMode === 2 && !that.isBreakpointReached('search-layout'))
|
920 |
+
) {
|
921 |
+
$searchWrapp.addClass('js-dgwt-wcas-layout-icon');
|
922 |
+
$searchWrapp.addClass('dgwt-wcas-layout-icon');
|
923 |
} else {
|
924 |
+
$searchWrapp.removeClass('js-dgwt-wcas-layout-icon');
|
925 |
+
$searchWrapp.removeClass('dgwt-wcas-layout-icon');
|
926 |
}
|
927 |
|
928 |
+
$searchWrapp.addClass('dgwt-wcas-layout-icon-flexible-loaded');
|
929 |
}
|
930 |
},
|
931 |
onFocus: function (e) {
|
944 |
that.enableOverlayDarkened();
|
945 |
}
|
946 |
|
947 |
+
that.fixPosition();
|
948 |
if (that.el.val().length >= that.options.minChars) {
|
949 |
that.onValueChange();
|
950 |
}
|
960 |
$('body').removeClass('dgwt-wcas-focused');
|
961 |
$('.' + options.searchFormClass).removeClass('dgwt-wcas-search-focused');
|
962 |
|
|
|
|
|
|
|
|
|
|
|
963 |
if (!that.isMouseDownOnSearchElements) {
|
964 |
+
|
965 |
that.hide();
|
966 |
|
967 |
if (that.selection && that.currentValue !== query) {
|
988 |
options.lookup = that.verifySuggestionsFormat(options.lookup);
|
989 |
}
|
990 |
|
|
|
|
|
991 |
$suggestionsContainer.css({
|
992 |
+
'max-height': !that.canShowDetailsPanel() ? options.maxHeight + 'px' : 'none',
|
993 |
'z-index': options.zIndex
|
994 |
});
|
995 |
|
996 |
// Add classes
|
997 |
+
if (that.canShowDetailsPanel()) {
|
998 |
var $detailsContainer = that.getDetailsContainer();
|
999 |
|
1000 |
$detailsContainer.css({
|
1039 |
$el.focus();
|
1040 |
}
|
1041 |
},
|
1042 |
+
fixPositionSuggestions: function () {
|
1043 |
var that = this,
|
1044 |
+
$suggestions = that.getSuggestionsContainer(),
|
1045 |
+
$formEl = that.getForm(),
|
1046 |
+
$input = that.el,
|
1047 |
+
formData = that.getElementInfo($formEl),
|
1048 |
+
inputData = that.getElementInfo($input),
|
1049 |
+
offset = {
|
1050 |
+
top: inputData.top + inputData.height,
|
1051 |
+
left: formData.left
|
1052 |
+
};
|
1053 |
|
1054 |
+
// Set different vertical coordinates when the search bar is in the fixed position
|
1055 |
+
if (that.ancestorHasPositionFixed($formEl)) {
|
1056 |
+
offset.top = inputData.topViewPort + inputData.height;
|
1057 |
+
$suggestions.addClass(that.classes.fixed);
|
1058 |
+
} else {
|
1059 |
+
$suggestions.removeClass(that.classes.fixed);
|
1060 |
}
|
1061 |
|
1062 |
+
that.getSuggestionsContainer().css(offset);
|
1063 |
},
|
1064 |
+
fixPositionDetailsPanel: function () {
|
1065 |
var that = this,
|
1066 |
$searchBar = that.getFormWrapper(),
|
1067 |
+
$suggestions = that.getSuggestionsContainer(),
|
1068 |
+
$detailsPanel = that.getDetailsContainer(),
|
1069 |
+
$formEl = that.getForm(),
|
1070 |
+
$input = that.el,
|
1071 |
+
formData = that.getElementInfo($formEl),
|
1072 |
+
inputData = that.getElementInfo($input),
|
1073 |
+
offset = {
|
1074 |
+
top: inputData.top + inputData.height,
|
1075 |
+
left: formData.left + $suggestions.outerWidth(false)
|
1076 |
+
};
|
1077 |
|
1078 |
+
// Set different vertical coordinate when the search bar is in the fixed position
|
1079 |
+
if(that.ancestorHasPositionFixed($searchBar)) {
|
1080 |
+
offset.top = inputData.topViewPort + inputData.height;
|
1081 |
+
$detailsPanel.addClass(that.classes.fixed);
|
1082 |
+
}else{
|
1083 |
+
$detailsPanel.removeClass(that.classes.fixed)
|
1084 |
}
|
1085 |
|
1086 |
+
// Stick the details panel to the right side of the suggestion wrapper and to the bottom border of the search form
|
1087 |
+
$detailsPanel.css(offset);
|
|
|
1088 |
|
1089 |
$('body').removeClass('dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit');
|
1090 |
|
1093 |
$('body').addClass('dgwt-wcas-full-width');
|
1094 |
|
1095 |
if (that.options.isRtl === true) {
|
1096 |
+
offset.left = formData.left + $detailsPanel.outerWidth(false);
|
1097 |
+
$suggestions.css('left', offset.left);
|
1098 |
+
$detailsPanel.css('left', formData.left);
|
1099 |
}
|
1100 |
|
1101 |
return;
|
1102 |
}
|
1103 |
|
1104 |
+
// Details Panel Mode 2: The suggestions' wrapper has the same width as the search bar.
|
1105 |
// Details panel clings to the left or right side of the suggestion wrapper.
|
1106 |
var windowWidth = $(window).width(),
|
1107 |
+
cDWidth = $detailsPanel.outerWidth(),
|
1108 |
+
cOffset = $detailsPanel.offset();
|
1109 |
|
1110 |
$('body').addClass('dgwt-wcas-details-outside dgwt-wcas-details-right');
|
1111 |
|
1114 |
if (windowWidth < (cOffset.left + cDWidth)) {
|
1115 |
$('body').removeClass('dgwt-wcas-details-right');
|
1116 |
$('body').addClass('dgwt-wcas-details-left');
|
1117 |
+
offset.left = $suggestions.offset().left - $detailsPanel.outerWidth(false);
|
1118 |
+
$detailsPanel.css('left', offset.left);
|
1119 |
+
cOffset = $detailsPanel.offset();
|
1120 |
}
|
1121 |
|
1122 |
+
// Is the details' panel fits the space of the left side?
|
1123 |
// Not? Try to hide it by adding class "dgwt-wcas-details-notfit"
|
1124 |
if (cOffset.left < 1) {
|
1125 |
$('body').removeClass('dgwt-wcas-details-left dgwt-wcas-details-right');
|
1127 |
}
|
1128 |
},
|
1129 |
fixHeight: function () {
|
1130 |
+
var that = this;
|
1131 |
|
1132 |
+
if (!that.canShowDetailsPanel()) {
|
|
|
|
|
|
|
1133 |
return false;
|
1134 |
}
|
1135 |
|
1172 |
}
|
1173 |
|
1174 |
var markers = [$input.width(), $suggestionsContainer.height()];
|
1175 |
+
if (that.canShowDetailsPanel()) {
|
1176 |
markers[2] = $detailsWrapp.height();
|
1177 |
}
|
1178 |
|
1179 |
that.autoAligmentprocess = setInterval(function () {
|
1180 |
|
1181 |
var newMarkers = [$input.width(), $suggestionsContainer.height()];
|
1182 |
+
if (that.canShowDetailsPanel()) {
|
1183 |
newMarkers[2] = $detailsWrapp.height();
|
1184 |
}
|
1185 |
|
1188 |
if (markers[i] != newMarkers[i]) {
|
1189 |
|
1190 |
that.fixHeight();
|
1191 |
+
that.fixPosition();
|
1192 |
markers = newMarkers;
|
1193 |
break;
|
1194 |
}
|
1195 |
}
|
1196 |
|
1197 |
|
1198 |
+
if (that.canShowDetailsPanel()) {
|
1199 |
|
1200 |
var innerDetailsHeight = $detailsWrapp.find('.dgwt-wcas-details-inner').height();
|
1201 |
|
1208 |
}, 10);
|
1209 |
|
1210 |
},
|
1211 |
+
getElementInfo: function ($el) {
|
1212 |
+
var data = {},
|
1213 |
+
viewPort,
|
|
|
1214 |
offset;
|
1215 |
|
1216 |
+
viewPort = $el[0].getBoundingClientRect();
|
1217 |
+
offset = $el.offset();
|
|
|
|
|
|
|
|
|
|
|
1218 |
|
1219 |
data.left = offset.left;
|
1220 |
data.top = offset.top;
|
1221 |
+
data.width = $el.outerWidth(false);
|
1222 |
+
data.height = $el.outerHeight(false);
|
1223 |
data.right = data.left + data.width;
|
1224 |
data.bottom = data.top + data.height;
|
1225 |
+
data.topViewPort = viewPort.top;
|
1226 |
+
data.bottomViewPort = viewPort.top + data.height;
|
1227 |
|
1228 |
return data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1229 |
},
|
1230 |
getFormWrapper: function () {
|
1231 |
var that = this;
|
|
|
1232 |
return that.el.closest('.' + that.options.searchFormClass);
|
1233 |
},
|
1234 |
+
getForm: function () {
|
1235 |
+
var that = this;
|
1236 |
+
return that.el.closest('.' + that.options.formClass);
|
1237 |
+
},
|
1238 |
getSuggestionsContainer: function () {
|
1239 |
var that = this;
|
1240 |
return $('.' + that.options.containerClass);
|
1268 |
var that = this,
|
1269 |
$wrapp = that.getFormWrapper();
|
1270 |
|
1271 |
+
that.addActiveClassIfMissing();
|
1272 |
+
|
1273 |
// If suggestions are hidden and user presses arrow down, display suggestions:
|
1274 |
if (!that.visible && e.keyCode === keys.DOWN && that.currentValue) {
|
1275 |
that.suggest();
|
1408 |
|
1409 |
return (suggestions.length === 1 && suggestions[0].value.toLowerCase() === query.toLowerCase());
|
1410 |
},
|
1411 |
+
canShowDetailsPanel: function () {
|
1412 |
+
var that = this,
|
1413 |
+
show = that.options.showDetailsPanel;
|
1414 |
|
1415 |
+
if ($(window).width() < 768 || ('ontouchend' in document)) {
|
1416 |
+
show = false;
|
1417 |
+
}
|
1418 |
+
return show;
|
1419 |
},
|
1420 |
+
isBreakpointReached: function (context) {
|
1421 |
+
var that = this,
|
1422 |
+
breakpoint = 0;
|
1423 |
+
|
1424 |
+
switch (context) {
|
1425 |
+
case 'search-layout':
|
1426 |
+
breakpoint = that.options.layoutBreakpoint;
|
1427 |
+
if (that.isSetParam('layout_breakpoint')) {
|
1428 |
+
breakpoint = Number.parseInt(that.getParam('layout_breakpoint'));
|
1429 |
+
}
|
1430 |
+
break;
|
1431 |
+
case 'mobile-overlay':
|
1432 |
+
breakpoint = that.options.mobileOverlayBreakpoint;
|
1433 |
+
if (that.isSetParam('mobile_overlay_breakpoint')) {
|
1434 |
+
breakpoint = Number.parseInt(that.getParam('mobile_overlay_breakpoint'));
|
1435 |
+
}
|
1436 |
+
break;
|
1437 |
+
}
|
1438 |
+
|
1439 |
+
return $(window).width() <= breakpoint;
|
1440 |
},
|
1441 |
getQuery: function (value) {
|
1442 |
var delimiter = this.options.delimiter,
|
1485 |
options.params['l'] = dgwt_wcas.current_lang;
|
1486 |
}
|
1487 |
|
|
|
|
|
1488 |
that.preloader('show', 'form', 'dgwt-wcas-inner-preloader');
|
1489 |
searchForm.addClass('dgwt-wcas-processing');
|
1490 |
|
1567 |
|
1568 |
}
|
1569 |
|
1570 |
+
that.fixPosition();
|
1571 |
|
1572 |
that.options.onSearchComplete.call(that.element, q, result.suggestions);
|
1573 |
|
1590 |
var that = this;
|
1591 |
|
1592 |
// Disable details panel
|
1593 |
+
if (!that.canShowDetailsPanel()) {
|
1594 |
return false;
|
1595 |
}
|
1596 |
|
1618 |
// Load response from cache
|
1619 |
that.detailsPanelSetScene(currentObjectID);
|
1620 |
that.fixHeight();
|
1621 |
+
that.fixPosition();
|
1622 |
|
1623 |
} else {
|
1624 |
|
1683 |
// @TODO Maybe display some error or placeholder
|
1684 |
that.detailsPanelClearScene();
|
1685 |
}
|
1686 |
+
that.fixPosition();
|
1687 |
that.fixHeight();
|
1688 |
|
1689 |
that.updatePrices(true);
|
1693 |
that.preloader('hide', 'details', '');
|
1694 |
|
1695 |
that.detailsPanelClearScene();
|
1696 |
+
that.fixPosition();
|
1697 |
that.fixHeight();
|
1698 |
},
|
1699 |
});
|
1822 |
|
1823 |
return params;
|
1824 |
},
|
1825 |
+
isSetParam: function (param) {
|
1826 |
+
var that = this;
|
1827 |
+
return typeof that.options.params[param] != 'undefined';
|
1828 |
+
},
|
1829 |
+
getParam: function (param) {
|
1830 |
+
var that = this;
|
1831 |
+
return that.isSetParam(param) ? that.options.params[param] : '';
|
1832 |
+
},
|
1833 |
applyPreloaderForPrice: function (index) {
|
1834 |
var that = this;
|
1835 |
|
1909 |
index = 0,
|
1910 |
noResults = false;
|
1911 |
|
1912 |
+
if (!that.canShowDetailsPanel()) {
|
1913 |
return;
|
1914 |
}
|
1915 |
|
1959 |
},
|
1960 |
hide: function (clear) {
|
1961 |
var that = this,
|
1962 |
+
$suggestions = that.getSuggestionsContainer(),
|
1963 |
+
$detailsPanel = that.getDetailsContainer();
|
|
|
1964 |
|
1965 |
if ($.isFunction(that.options.onHide) && that.visible) {
|
1966 |
that.options.onHide.call(that.element, container);
|
1969 |
that.visible = false;
|
1970 |
that.selectedIndex = -1;
|
1971 |
clearTimeout(that.onChangeTimeout);
|
1972 |
+
$suggestions.hide();
|
1973 |
+
$suggestions.removeClass(that.classes.suggestionsContainerOrientTop);
|
1974 |
+
$suggestions.removeClass(that.classes.fixed);
|
1975 |
+
|
1976 |
+
if (that.canShowDetailsPanel()) {
|
1977 |
+
$detailsPanel.hide();
|
1978 |
+
$detailsPanel.removeClass(that.classes.fixed);
|
1979 |
+
}
|
1980 |
|
1981 |
$('body').removeClass('dgwt-wcas-open');
|
1982 |
+
if (!$('html').hasClass('dgwt-wcas-overlay-mobile-on')) {
|
1983 |
+
$('html').removeClass('dgwt-wcas-open-' + that.getSearchStyle());
|
1984 |
+
}
|
1985 |
$('body').removeClass('dgwt-wcas-block-scroll');
|
1986 |
$('body').removeClass('dgwt-wcas-is-details');
|
1987 |
$('body').removeClass('dgwt-wcas-full-width');
|
2010 |
},
|
2011 |
positionIconSearchMode: function ($formWrapper) {
|
2012 |
var that = this,
|
2013 |
+
formLeftValue = -20,
|
2014 |
+
$form = that.getForm(),
|
2015 |
+
formWidth = $form.width(),
|
|
|
|
|
2016 |
windowWidth = $(window).width();
|
2017 |
|
2018 |
var iconLeftOffset = $formWrapper[0].getBoundingClientRect().left;
|
|
|
|
|
|
|
|
|
|
|
|
|
2019 |
|
2020 |
var iconLeftRatio = (iconLeftOffset + 10) / windowWidth;
|
2021 |
|
2044 |
},
|
2045 |
hideAfterClickOutsideListener: function () {
|
2046 |
var that = this;
|
2047 |
+
if (!('ontouchend' in document)) {
|
2048 |
|
2049 |
$(document).mouseup(function (e) {
|
2050 |
if (!that.visible) {
|
2051 |
return;
|
2052 |
}
|
2053 |
|
2054 |
+
var outsideForm = !($(e.target).closest('.' + that.options.searchFormClass).length > 0 || $(e.target).hasClass(that.options.searchFormClass)),
|
|
|
|
|
2055 |
outsideContainer = !($(e.target).closest('.' + that.options.containerClass).length > 0 || $(e.target).hasClass(that.options.containerClass));
|
2056 |
|
2057 |
+
if (!that.canShowDetailsPanel()) {
|
|
|
2058 |
|
2059 |
if (outsideForm && outsideContainer) {
|
2060 |
that.hide();
|
2165 |
if (!options.showHeadings) {
|
2166 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.vendor + '</span>';
|
2167 |
}
|
2168 |
+
} else if (options.isPremium && suggestion.type === 'post' && typeof suggestion.post_type !== 'undefined' && suggestion.post_type === 'post') {
|
2169 |
+
classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-post';
|
2170 |
if (!options.showHeadings) {
|
2171 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.post + '</span>';
|
2172 |
}
|
2173 |
+
} else if (options.isPremium && suggestion.type === 'post' && typeof suggestion.post_type !== 'undefined' && suggestion.post_type === 'page') {
|
2174 |
classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page';
|
2175 |
if (!options.showHeadings) {
|
2176 |
prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.page + '</span>';
|
2190 |
classes += ' dgwt-wcas-suggestion-nores';
|
2191 |
suggestion.value = dgwt_wcas.labels.no_results;
|
2192 |
highlight = false;
|
2193 |
+
if (that.canShowDetailsPanel()) {
|
2194 |
that.detailsPanelClearScene();
|
2195 |
}
|
2196 |
$('body').addClass('dgwt-wcas-nores');
|
2350 |
|
2351 |
// Add class on show
|
2352 |
$('body').addClass('dgwt-wcas-open');
|
2353 |
+
$('html').addClass('dgwt-wcas-open-' + that.getSearchStyle());
|
2354 |
|
2355 |
// Reset the latest mousedown position
|
2356 |
that.isMouseDownOnSearchElements = false;
|
2357 |
|
2358 |
that.automaticAlignment();
|
2359 |
|
2360 |
+
if (that.canShowDetailsPanel()) {
|
2361 |
$('body').addClass('dgwt-wcas-is-details');
|
2362 |
containerDetails.show();
|
2363 |
that.fixHeight();
|
2371 |
}
|
2372 |
|
2373 |
that.visible = true;
|
2374 |
+
that.fixPosition();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2375 |
|
2376 |
that.findBestHint();
|
2377 |
},
|
2378 |
+
getSearchStyle() {
|
2379 |
+
var that = this,
|
2380 |
+
$searchWrapp = that.getFormWrapper(),
|
2381 |
+
style = 'solaris'; //Default style
|
2382 |
+
|
2383 |
+
$($searchWrapp.attr('class').split(/\s+/)).each(function (index) {
|
2384 |
+
if (/dgwt-wcas-style-/i.test(this)) {
|
2385 |
+
style = this.replace(/dgwt-wcas-style-/i, '');
|
2386 |
+
}
|
2387 |
+
});
|
2388 |
+
|
2389 |
+
return style;
|
2390 |
+
},
|
2391 |
adjustContainerWidth: function () {
|
2392 |
var that = this,
|
2393 |
$searchBar = that.getFormWrapper(),
|
2394 |
$suggestions = that.getSuggestionsContainer(),
|
2395 |
$detailsPanel = that.getDetailsContainer(),
|
2396 |
+
$baseElement = that.getForm(),
|
2397 |
baseWidth = $baseElement.outerWidth();
|
2398 |
|
2399 |
if (!$searchBar.length) {
|
2404 |
$suggestions.css('width', baseWidth + 'px');
|
2405 |
|
2406 |
// Mode 2 - keep the suggestions wrapper and the details panel together under the search bar
|
2407 |
+
if (that.canShowDetailsPanel() && baseWidth >= that.options.dpusbBreakpoint) {
|
2408 |
var measurementError = 0;
|
2409 |
|
2410 |
// Width 50:50
|
2418 |
}
|
2419 |
}
|
2420 |
},
|
2421 |
+
positionPreloaderAndMic: function ($formWrapper) {
|
2422 |
+
var that = this;
|
2423 |
|
2424 |
var $submit = typeof $formWrapper == 'object' ? $formWrapper.find('.dgwt-wcas-search-submit') : $('.dgwt-wcas-search-submit');
|
2425 |
|
2426 |
if ($submit.length > 0) {
|
2427 |
$submit.each(function () {
|
|
|
2428 |
var $preloader = $(this).closest('.dgwt-wcas-search-wrapp').find('.dgwt-wcas-preloader');
|
2429 |
+
var $isVoiceSearchSupported = $(this).closest('.dgwt-wcas-search-wrapp').hasClass(that.options.voiceSearchSupportedClass);
|
2430 |
+
var $voiceSearch = $(this).closest('.dgwt-wcas-search-wrapp').find('.' + that.options.voiceSearchClass);
|
2431 |
|
2432 |
+
if ($isVoiceSearchSupported) {
|
2433 |
+
if (dgwt_wcas.is_rtl == 1) {
|
2434 |
+
$voiceSearch.css('left', (6 + $(this).outerWidth()) + 'px');
|
2435 |
+
$preloader.css('left', (46 + $(this).outerWidth()) + 'px');
|
2436 |
+
} else {
|
2437 |
+
$voiceSearch.css('right', $(this).outerWidth() + 'px');
|
2438 |
+
$preloader.css('right', 40 + $(this).outerWidth() + 'px');
|
2439 |
+
}
|
2440 |
} else {
|
2441 |
+
if (dgwt_wcas.is_rtl == 1) {
|
2442 |
+
$preloader.css('left', (6 + $(this).outerWidth()) + 'px');
|
2443 |
+
} else {
|
2444 |
+
$preloader.css('right', $(this).outerWidth() + 'px');
|
2445 |
+
}
|
2446 |
}
|
2447 |
});
|
2448 |
}
|
2556 |
|
2557 |
return suggestions;
|
2558 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2559 |
processResponse: function (result, originalQuery, cacheKey) {
|
2560 |
var that = this,
|
2561 |
options = that.options;
|
2575 |
return;
|
2576 |
}
|
2577 |
|
|
|
|
|
|
|
|
|
2578 |
that.suggestions = result.suggestions;
|
2579 |
that.suggest();
|
2580 |
},
|
2610 |
return;
|
2611 |
}
|
2612 |
|
2613 |
+
that.closeOverlayMobile();
|
2614 |
that.hide();
|
2615 |
that.onSelect(i);
|
2616 |
},
|
2666 |
return;
|
2667 |
}
|
2668 |
|
2669 |
+
if (!activeItem || that.canShowDetailsPanel()) {
|
2670 |
return;
|
2671 |
}
|
2672 |
|
2759 |
$el = that.el,
|
2760 |
$formWrapper = that.getFormWrapper(),
|
2761 |
$suggestionsWrapper = that.getSuggestionsContainer(),
|
|
|
|
|
2762 |
$mobileHandler = $formWrapper.find('.js-dgwt-wcas-enable-mobile-form');
|
2763 |
|
2764 |
// Remove all events
|
2770 |
}
|
2771 |
|
2772 |
$el.removeData('autocomplete');
|
2773 |
+
$(window).off('resize.autocomplete', that.fixPosition);
|
2774 |
|
2775 |
$formWrapper.removeClass('dgwt-wcas-active');
|
2776 |
|
2851 |
},
|
2852 |
positionOverlayDarkened: function () {
|
2853 |
var that = this,
|
2854 |
+
fixed = false,
|
2855 |
$darkenedOverlay = $('.' + that.options.darkenedOverlayClass);
|
2856 |
|
2857 |
if ($darkenedOverlay.length > 0) {
|
2858 |
+
|
2859 |
+
if (that.ancestorHasPositionFixed(that.getFormWrapper())) {
|
2860 |
+
fixed = true;
|
2861 |
+
$darkenedOverlay.addClass('dgwt-wcas-suggestions-wrapp-fixed');
|
2862 |
+
} else {
|
2863 |
+
$darkenedOverlay.removeClass('dgwt-wcas-suggestions-wrapp-fixed');
|
2864 |
+
}
|
2865 |
+
|
2866 |
$darkenedOverlay.children('div').each(function (i) {
|
2867 |
+
that.positionOverlayDarkenedDiv($(this), i + 1, fixed);
|
2868 |
});
|
2869 |
}
|
2870 |
},
|
2871 |
+
positionOverlayDarkenedDiv: function ($el, orient, fixed) {
|
2872 |
var that = this,
|
2873 |
+
elData,
|
2874 |
+
$baseEl = that.getFormWrapper(),
|
2875 |
css,
|
2876 |
+
secureOffset = 200; // Secure buffer
|
2877 |
|
2878 |
+
|
2879 |
+
// Different position for search icon layout
|
2880 |
+
if ($baseEl.hasClass('js-dgwt-wcas-layout-icon')) {
|
2881 |
+
$baseEl = that.getForm();
|
2882 |
+
}
|
2883 |
+
|
2884 |
+
elData = that.getElementInfo($baseEl);
|
2885 |
+
|
2886 |
+
/**
|
2887 |
+
* Note 1: If fixed == true, it means position should be calculated related to screen,
|
2888 |
+
* otherwise it will be calculated related to document
|
2889 |
+
*
|
2890 |
+
* Note 2: It concerns cases 1,3 and 4. 1px is subtracted to achieve an exact match of document height.
|
2891 |
+
* I don't know why it's needed.
|
2892 |
+
*/
|
2893 |
|
2894 |
switch (orient) {
|
2895 |
case 1:
|
2901 |
};
|
2902 |
break;
|
2903 |
case 2:
|
2904 |
+
var topSpan = fixed ? elData.topViewPort : elData.top;
|
2905 |
css = {
|
2906 |
left: (-secureOffset) + 'px',
|
2907 |
top: (-secureOffset) + 'px',
|
2908 |
width: ($(window).outerWidth(false) + secureOffset) + 'px',
|
2909 |
+
height: (topSpan + secureOffset) + 'px',
|
2910 |
};
|
2911 |
break;
|
2912 |
case 3:
|
2918 |
};
|
2919 |
break;
|
2920 |
case 4:
|
2921 |
+
var topSpan = fixed ? elData.topViewPort : elData.top;
|
2922 |
css = {
|
2923 |
left: (-secureOffset) + 'px',
|
2924 |
+
top: (topSpan + elData.height) + 'px',
|
2925 |
width: ($(window).outerWidth(false) + secureOffset) + 'px',
|
2926 |
height: ($(document).outerHeight(false) - elData.bottom - 1) + 'px'
|
2927 |
};
|
2932 |
$el.css(css);
|
2933 |
}
|
2934 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2935 |
showCloseButton: function () {
|
2936 |
var that = this,
|
2937 |
iconBody = typeof dgwt_wcas.close_icon != 'undefined' ? dgwt_wcas.close_icon : '',
|
2938 |
$actionsEl = that.getFormWrapper().find('.' + that.options.preloaderClass);
|
2939 |
|
2940 |
+
if (that.el.val().length < that.options.minChars) {
|
2941 |
+
return;
|
2942 |
+
}
|
2943 |
+
|
2944 |
// Click close icon
|
2945 |
if (!$actionsEl.hasClass(that.options.closeTrigger)) {
|
2946 |
$actionsEl.on('click.autocomplete', function () {
|
2963 |
|
2964 |
$btn.off('click.autocomplete');
|
2965 |
},
|
2966 |
+
addActiveClassIfMissing: function () {
|
2967 |
+
var activeEl = document.activeElement;
|
2968 |
+
if (
|
2969 |
+
typeof activeEl == 'object'
|
2970 |
+
&& $(activeEl).length
|
2971 |
+
&& $(activeEl).hasClass('dgwt-wcas-search-input')
|
2972 |
+
) {
|
2973 |
+
|
2974 |
+
var $search = $(activeEl).closest('.dgwt-wcas-search-wrapp');
|
2975 |
+
|
2976 |
+
if ($search.length && !$search.hasClass('dgwt-wcas-active')) {
|
2977 |
+
$search.addClass('dgwt-wcas-active');
|
2978 |
+
}
|
2979 |
+
}
|
2980 |
+
},
|
2981 |
+
ancestorHasPositionFixed: function ($element) {
|
2982 |
|
2983 |
var $checkElements = $element.add($element.parents());
|
2984 |
var isFixed = false;
|
3032 |
}
|
3033 |
|
3034 |
$(document).trigger('dgwtWcasGAEvent', {'term': label, 'category': category});
|
3035 |
+
},
|
3036 |
+
initVoiceSearch: function () {
|
3037 |
+
var that = this;
|
3038 |
+
if (!that.options.voiceSearchEnabled) {
|
3039 |
+
return false;
|
3040 |
+
}
|
3041 |
+
var $formWrapper = that.getFormWrapper();
|
3042 |
+
var $input = $formWrapper.find('.' + that.options.searchInputClass);
|
3043 |
+
var $voiceSearch = $formWrapper.find('.' + that.options.voiceSearchClass);
|
3044 |
+
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition;
|
3045 |
|
3046 |
+
if (!SpeechRecognition) {
|
3047 |
+
return false;
|
3048 |
+
}
|
3049 |
+
|
3050 |
+
that.voiceSearchSetState('inactive', $voiceSearch);
|
3051 |
+
$formWrapper.addClass(that.options.voiceSearchSupportedClass);
|
3052 |
+
|
3053 |
+
that.voiceSearchRecognition = new SpeechRecognition();
|
3054 |
+
that.voiceSearchRecognition.lang = that.options.voiceSearchLang;
|
3055 |
+
that.voiceSearchRecognition.continuous = false;
|
3056 |
+
that.voiceSearchRecognition.interimResults = true;
|
3057 |
+
that.voiceSearchRecognition.maxAlternatives = 1;
|
3058 |
+
|
3059 |
+
$voiceSearch.on('click', function () {
|
3060 |
+
if (
|
3061 |
+
$formWrapper.hasClass('dgwt-wcas-mobile-overlay-trigger-active') &&
|
3062 |
+
!$('html').hasClass('dgwt-wcas-overlay-mobile-on')
|
3063 |
+
) {
|
3064 |
+
$formWrapper.find('.js-dgwt-wcas-enable-mobile-form').click();
|
3065 |
+
$formWrapper.find('.' + that.options.searchInputClass).blur();
|
3066 |
+
}
|
3067 |
+
if (that.voiceSearchStarted) {
|
3068 |
+
that.voiceSearchAbort();
|
3069 |
+
return;
|
3070 |
+
}
|
3071 |
+
if (that.voiceSearchIsInitialized()) {
|
3072 |
+
that.voiceSearchAbort();
|
3073 |
+
}
|
3074 |
+
that.voiceSearchRecognition.start();
|
3075 |
+
});
|
3076 |
+
|
3077 |
+
that.voiceSearchRecognition.onstart = function (event) {
|
3078 |
+
that.voiceSearchSetState('active', $voiceSearch);
|
3079 |
+
}
|
3080 |
+
|
3081 |
+
that.voiceSearchRecognition.onresult = function (event) {
|
3082 |
+
const result = event.results[0];
|
3083 |
+
const text = result[0].transcript;
|
3084 |
+
$input.val(text);
|
3085 |
+
if (result.isFinal) {
|
3086 |
+
$input.trigger('change');
|
3087 |
+
if (!'ontouchend' in document) {
|
3088 |
+
$input.focus();
|
3089 |
+
}
|
3090 |
+
that.voiceSearchSetState('inactive', $voiceSearch);
|
3091 |
+
}
|
3092 |
+
}
|
3093 |
+
|
3094 |
+
that.voiceSearchRecognition.onspeechend = function () {
|
3095 |
+
that.voiceSearchSetState('inactive', $voiceSearch);
|
3096 |
+
that.voiceSearchRecognition.stop();
|
3097 |
+
}
|
3098 |
+
|
3099 |
+
that.voiceSearchRecognition.onnomatch = function (event) {
|
3100 |
+
that.voiceSearchSetState('inactive', $voiceSearch);
|
3101 |
+
}
|
3102 |
+
|
3103 |
+
that.voiceSearchRecognition.onerror = function (event) {
|
3104 |
+
switch (event.error) {
|
3105 |
+
case 'aborted':
|
3106 |
+
case 'no-speech':
|
3107 |
+
that.voiceSearchSetState('inactive', $voiceSearch);
|
3108 |
+
break;
|
3109 |
+
case 'network':
|
3110 |
+
break;
|
3111 |
+
case 'not-allowed':
|
3112 |
+
case 'service-not-allowed':
|
3113 |
+
that.voiceSearchSetState('off', $voiceSearch);
|
3114 |
+
break;
|
3115 |
+
}
|
3116 |
+
}
|
3117 |
+
},
|
3118 |
+
voiceSearchAbort: function () {
|
3119 |
+
var that = this;
|
3120 |
+
if (that.voiceSearchIsInitialized()) {
|
3121 |
+
that.voiceSearchRecognition.abort();
|
3122 |
+
that.voiceSearchStarted = false;
|
3123 |
+
}
|
3124 |
+
},
|
3125 |
+
voiceSearchIsInitialized: function () {
|
3126 |
+
var that = this;
|
3127 |
+
return that.voiceSearchRecognition !== null;
|
3128 |
+
},
|
3129 |
+
voiceSearchSetState: function (state, $voiceSearch) {
|
3130 |
+
var that = this;
|
3131 |
+
switch (state) {
|
3132 |
+
case 'active':
|
3133 |
+
that.voiceSearchStarted = true;
|
3134 |
+
if (typeof dgwt_wcas.voice_search_active_icon == 'string') {
|
3135 |
+
$voiceSearch.html(dgwt_wcas.voice_search_active_icon);
|
3136 |
+
}
|
3137 |
+
// $voiceSearch.removeClass(that.options.voiceSearchDisabledClass).addClass(that.options.voiceSearchActiveClass);
|
3138 |
+
break;
|
3139 |
+
case 'inactive':
|
3140 |
+
that.voiceSearchStarted = false;
|
3141 |
+
if (typeof dgwt_wcas.voice_search_inactive_icon == 'string') {
|
3142 |
+
$voiceSearch.html(dgwt_wcas.voice_search_inactive_icon);
|
3143 |
+
}
|
3144 |
+
// $voiceSearch.removeClass(that.options.voiceSearchActiveClass + ' ' + that.options.voiceSearchDisabledClass);
|
3145 |
+
break;
|
3146 |
+
case 'off':
|
3147 |
+
that.voiceSearchStarted = false;
|
3148 |
+
// $voiceSearch.removeClass(that.options.voiceSearchActiveClass).addClass(that.options.voiceSearchDisabledClass);
|
3149 |
+
if (typeof dgwt_wcas.voice_search_disabled_icon == 'string') {
|
3150 |
+
$voiceSearch.html(dgwt_wcas.voice_search_disabled_icon);
|
3151 |
+
}
|
3152 |
+
break;
|
3153 |
+
}
|
3154 |
+
},
|
3155 |
+
};
|
3156 |
|
3157 |
// Create chainable jQuery plugin:
|
3158 |
$.fn.dgwtWcasAutocomplete = function (options, args) {
|
3381 |
}
|
3382 |
|
3383 |
/*-----------------------------------------------------------------
|
3384 |
+
/* Set some global variables
|
3385 |
/*-----------------------------------------------------------------*/
|
3386 |
+
window.dgwt_wcas.resizeOnlyOnce = null;
|
3387 |
+
window.dgwt_wcas.scrollOnlyOnce = null;
|
3388 |
|
3389 |
+
/*-----------------------------------------------------------------
|
3390 |
+
/* Fire autocomplete
|
3391 |
+
/*-----------------------------------------------------------------*/
|
|
|
3392 |
|
3393 |
window.dgwt_wcas.config = {
|
3394 |
minChars: dgwt_wcas.min_chars,
|
3397 |
triggerSelectOnValidInput: false,
|
3398 |
serviceUrl: dgwt_wcas.ajax_search_endpoint,
|
3399 |
paramName: 's',
|
3400 |
+
showDetailsPanel: dgwt_wcas.show_details_panel == 1 ? true : false,
|
3401 |
showImage: dgwt_wcas.show_images == 1 ? true : false,
|
3402 |
showPrice: dgwt_wcas.show_price == 1 ? true : false,
|
3403 |
showDescription: dgwt_wcas.show_desc == 1 ? true : false,
|
3411 |
showHeadings: dgwt_wcas.show_headings == 1 ? true : false,
|
3412 |
isPremium: dgwt_wcas.is_premium == 1 ? true : false,
|
3413 |
taxonomyBrands: dgwt_wcas.taxonomy_brands,
|
3414 |
+
layoutBreakpoint: dgwt_wcas.layout_breakpoint,
|
3415 |
+
mobileOverlayBreakpoint: dgwt_wcas.mobile_overlay_breakpoint,
|
3416 |
mobileOverlayWrapper: dgwt_wcas.mobile_overlay_wrapper,
|
3417 |
mobileOverlayDelay: dgwt_wcas.mobile_overlay_delay,
|
3418 |
debounceWaitMs: dgwt_wcas.debounce_wait_ms,
|
3423 |
showProductVendor: typeof dgwt_wcas.show_product_vendor != 'undefined' && dgwt_wcas.show_product_vendor ? true : false,
|
3424 |
disableHits: typeof dgwt_wcas.disable_hits != 'undefined' && dgwt_wcas.disable_hits ? true : false,
|
3425 |
disableSubmit: typeof dgwt_wcas.disable_submit != 'undefined' && dgwt_wcas.disable_submit ? true : false,
|
3426 |
+
voiceSearchEnabled: typeof dgwt_wcas.voice_search_enabled != 'undefined' && dgwt_wcas.voice_search_enabled ? true : false,
|
3427 |
+
voiceSearchLang: typeof dgwt_wcas.voice_search_lang != 'undefined' ? dgwt_wcas.voice_search_lang : '',
|
3428 |
};
|
3429 |
|
3430 |
$('.dgwt-wcas-search-input').dgwtWcasAutocomplete(window.dgwt_wcas.config);
|
3431 |
|
3432 |
});
|
3433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3434 |
|
3435 |
+
/**
|
3436 |
+
* UI Fixer. Fixes several known UX issues related to search bars
|
3437 |
+
*/
|
3438 |
+
var UI_FIXER = {
|
3439 |
+
brokenSearchUi: typeof dgwt_wcas.fixer.broken_search_ui != 'undefined' && dgwt_wcas.fixer.broken_search_ui ? true : false,
|
3440 |
+
brokenSearchUiAjax: typeof dgwt_wcas.fixer.broken_search_ui_ajax != 'undefined' && dgwt_wcas.fixer.broken_search_ui_ajax ? true : false,
|
3441 |
+
brokenSearchUiHard: typeof dgwt_wcas.fixer.broken_search_ui_hard != 'undefined' && dgwt_wcas.fixer.broken_search_ui_hard ? true : false,
|
3442 |
+
brokenSearchElementorPopups: typeof dgwt_wcas.fixer.broken_search_elementor_popups != 'undefined' && dgwt_wcas.fixer.broken_search_elementor_popups ? true : false,
|
3443 |
+
brokenSearchBrowserBackArrow: typeof dgwt_wcas.fixer.broken_search_browsers_back_arrow != 'undefined' && dgwt_wcas.fixer.broken_search_browsers_back_arrow ? true : false,
|
3444 |
+
forceRefreshCheckout: typeof dgwt_wcas.fixer.force_refresh_checkout != 'undefined' && dgwt_wcas.fixer.force_refresh_checkout ? true : false,
|
3445 |
+
searchBars: [],
|
3446 |
+
init: function () {
|
3447 |
+
var that = this;
|
3448 |
+
|
3449 |
+
/**
|
3450 |
+
* Fix broken search bars UI - first approach, after loading the page
|
3451 |
+
* Some page builders can copy instances of search bar without events eg. mobile usage.
|
3452 |
+
*/
|
3453 |
+
if (that.brokenSearchUi) {
|
3454 |
+
$(document).ready(function () {
|
3455 |
+
that.fixBrokenSearchUi();
|
3456 |
+
});
|
3457 |
}
|
3458 |
|
3459 |
+
/**
|
3460 |
+
*
|
3461 |
+
*/
|
3462 |
+
if (that.brokenSearchUiAjax) {
|
3463 |
+
that.fixBrokenSearchUiAjax();
|
3464 |
}
|
3465 |
|
3466 |
+
/**
|
3467 |
+
* Repair search bars continuously
|
3468 |
+
* May overload the browser. Disabled by default.
|
3469 |
+
*/
|
3470 |
+
if (that.brokenSearchUiHard) {
|
3471 |
+
that.fixBrokenSearchUiHard();
|
3472 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3473 |
|
3474 |
+
/**
|
3475 |
+
* Fix Elementor popups
|
3476 |
+
* Reinit the search bars after loading Elementor popup
|
3477 |
+
*/
|
3478 |
+
if (that.brokenSearchElementorPopups) {
|
3479 |
+
$(document).ready(function () {
|
3480 |
+
that.fixBrokenSearchOnElementorPopupsV1();
|
3481 |
+
that.fixBrokenSearchOnElementorPopupsV2();
|
3482 |
+
});
|
3483 |
+
}
|
3484 |
|
3485 |
+
/**
|
3486 |
+
* Fix broken search bars after click browser's back arrow.
|
3487 |
+
* Not worked for some browsers especially Safari and FF
|
3488 |
+
* Add dgwt-wcas-active class if wasn't added for some reason
|
3489 |
+
*/
|
3490 |
+
if (that.brokenSearchBrowserBackArrow) {
|
3491 |
+
that.fixbrokenSearchBrowserBackArrow();
|
3492 |
+
}
|
3493 |
|
3494 |
+
/**
|
3495 |
+
* Refreshing the content on the checkout page when a product is added to the cart from the search Details Panel
|
3496 |
+
*/
|
3497 |
+
if (that.forceRefreshCheckout) {
|
3498 |
+
that.fixforceRefreshCheckout();
|
3499 |
+
}
|
3500 |
+
},
|
3501 |
+
fixBrokenSearchUi: function () {
|
3502 |
+
var that = this;
|
3503 |
|
3504 |
+
$(document).ready(function () {
|
3505 |
+
setTimeout(function () {
|
3506 |
+
that.pullAndReconditionSearchBars();
|
3507 |
+
}, 50);
|
3508 |
+
});
|
3509 |
|
3510 |
+
$(window).on('load', function () {
|
3511 |
+
setTimeout(function () {
|
3512 |
+
that.pullAndReconditionSearchBars();
|
3513 |
+
}, 500);
|
3514 |
+
});
|
3515 |
+
},
|
3516 |
+
fixBrokenSearchUiAjax: function () {
|
3517 |
+
var that = this;
|
3518 |
+
$(document).ajaxSuccess(function (event, request, settings) {
|
3519 |
|
3520 |
+
// Exclude FiboSearch and WooCommerce AJAX requests
|
3521 |
+
if (typeof settings.url == 'string' && new RegExp('search\.php|wc-ajax').test(settings.url)) {
|
3522 |
+
return;
|
3523 |
+
}
|
3524 |
|
3525 |
+
if (typeof request.responseText == 'string' && request.responseText.includes('dgwt-wcas-search-input')) {
|
3526 |
+
setTimeout(function () {
|
3527 |
+
that.pullAndReconditionSearchBars();
|
3528 |
+
}, 500);
|
3529 |
}
|
3530 |
});
|
3531 |
+
},
|
3532 |
+
fixBrokenSearchUiHard: function () {
|
3533 |
+
var that = this;
|
3534 |
+
$(document).ready(function () {
|
3535 |
|
3536 |
+
if (that.searchBars.length === 0) {
|
3537 |
+
that.pullAndReconditionSearchBars();
|
3538 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3539 |
|
3540 |
+
setInterval(function () {
|
3541 |
+
that.pullAndReconditionSearchBars();
|
3542 |
+
}, 1000);
|
3543 |
+
});
|
3544 |
+
},
|
3545 |
+
fixBrokenSearchOnElementorPopupsV1: function () {
|
3546 |
+
var that = this;
|
3547 |
+
$(document).on('elementor/popup/show', () => {
|
3548 |
+
setTimeout(function () {
|
3549 |
+
that.pullAndReconditionSearchBars();
|
3550 |
+
}, 500);
|
3551 |
+
});
|
3552 |
+
},
|
3553 |
+
fixBrokenSearchOnElementorPopupsV2: function () {
|
3554 |
+
var that = this;
|
3555 |
+
$(document).ready(function () {
|
3556 |
+
if (
|
3557 |
+
typeof window.elementorFrontend != 'undefined'
|
3558 |
+
&& typeof window.elementorFrontend.documentsManager != 'undefined'
|
3559 |
+
&& typeof window.elementorFrontend.documentsManager.documents != 'undefined'
|
3560 |
+
) {
|
3561 |
|
3562 |
+
$.each(elementorFrontend.documentsManager.documents, function (id, document) {
|
|
|
3563 |
|
3564 |
+
if (typeof document.getModal != 'undefined' && document.getModal) {
|
|
|
|
|
3565 |
|
3566 |
+
document.getModal().on('show', function () {
|
3567 |
+
setTimeout(function () {
|
3568 |
+
that.pullAndReconditionSearchBars();
|
3569 |
+
}, 500);
|
3570 |
|
3571 |
+
});
|
3572 |
+
}
|
3573 |
+
});
|
3574 |
}
|
3575 |
});
|
3576 |
+
},
|
3577 |
+
fixforceRefreshCheckout: function () {
|
3578 |
+
$(document.body).on('added_to_cart', function () {
|
3579 |
+
if (
|
3580 |
+
$(document.body).hasClass('woocommerce-checkout') &&
|
3581 |
+
$('.dgwt-wcas-search-input').length > 0
|
3582 |
+
) {
|
3583 |
+
$(document.body).trigger('update_checkout');
|
3584 |
+
}
|
3585 |
+
});
|
3586 |
+
},
|
3587 |
+
fixbrokenSearchBrowserBackArrow: function () {
|
3588 |
+
$(window).on('load', function () {
|
3589 |
+
var i = 0;
|
3590 |
+
var interval = setInterval(function () {
|
3591 |
|
3592 |
+
var activeEl = document.activeElement;
|
3593 |
+
if (
|
3594 |
+
typeof activeEl == 'object'
|
3595 |
+
&& $(activeEl).length
|
3596 |
+
&& $(activeEl).hasClass('dgwt-wcas-search-input')
|
3597 |
+
) {
|
3598 |
|
3599 |
+
var $search = $(activeEl).closest('.dgwt-wcas-search-wrapp');
|
|
|
|
|
|
|
3600 |
|
3601 |
+
if ($search.length && !$search.hasClass('dgwt-wcas-active')) {
|
3602 |
+
$search.addClass('dgwt-wcas-active');
|
3603 |
+
clearInterval(interval);
|
3604 |
+
}
|
3605 |
+
}
|
3606 |
|
3607 |
+
// Stop after 5 seconds
|
3608 |
+
if (i > 10) {
|
3609 |
+
clearInterval(interval);
|
3610 |
+
}
|
3611 |
|
3612 |
+
i++;
|
|
|
|
|
3613 |
|
3614 |
+
}, 500);
|
3615 |
});
|
3616 |
+
},
|
3617 |
+
pullAndReconditionSearchBars: function () {
|
3618 |
+
var that = this,
|
3619 |
+
$inputs = $('.dgwt-wcas-search-input'),
|
3620 |
+
firstPull = that.searchBars.length == 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3621 |
|
3622 |
if ($inputs.length > 0) {
|
3623 |
$inputs.each(function () {
|
3624 |
+
var $searchBar = $(this),
|
3625 |
+
isNew = true,
|
3626 |
+
i;
|
3627 |
+
|
3628 |
+
// Check if this search bar is new one or not
|
3629 |
+
if (that.searchBars.length > 0) {
|
3630 |
+
for (i = 0; i < that.searchBars.length; i++) {
|
3631 |
+
if ($searchBar[0] === that.searchBars[i][0]) {
|
3632 |
+
isNew = false;
|
3633 |
+
break;
|
3634 |
+
}
|
3635 |
+
}
|
3636 |
+
}
|
3637 |
|
3638 |
+
if (isNew) {
|
3639 |
+
var changedId = false;
|
3640 |
+
if (!that.hasUniqueId($searchBar)) {
|
3641 |
+
that.makeUniqueID($searchBar);
|
3642 |
+
changedId = true;
|
3643 |
}
|
3644 |
+
|
3645 |
+
if (!firstPull || !that.isInitialized($searchBar) || changedId) {
|
3646 |
+
that.reinitSearchBar($searchBar)
|
3647 |
+
}
|
3648 |
+
|
3649 |
+
that.searchBars.push($searchBar);
|
3650 |
+
}
|
3651 |
});
|
3652 |
}
|
3653 |
+
},
|
3654 |
+
isInitialized: function ($searchBarInput) {
|
3655 |
+
return typeof $searchBarInput.data('autocomplete') == 'object';
|
3656 |
+
},
|
3657 |
+
hasUniqueId: function ($searchBarInput) {
|
3658 |
+
var that = this,
|
3659 |
+
unique = true;
|
3660 |
+
if (that.searchBars.length > 0) {
|
3661 |
+
for (var i = 0; i < that.searchBars.length; i++) {
|
3662 |
+
if ($searchBarInput.attr('id') === that.searchBars[i].attr('id')) {
|
3663 |
+
unique = false;
|
3664 |
+
}
|
3665 |
+
}
|
3666 |
+
}
|
3667 |
+
return unique;
|
3668 |
+
},
|
3669 |
+
reinitSearchBar: function ($searchBarInput) {
|
3670 |
+
if (typeof $searchBarInput.data('autocomplete') == 'object') {
|
3671 |
+
$searchBarInput.data('autocomplete').dispose();
|
3672 |
+
}
|
3673 |
+
$searchBarInput.dgwtWcasAutocomplete(window.dgwt_wcas.config);
|
3674 |
+
},
|
3675 |
+
makeUniqueID: function ($searchBarInput) {
|
3676 |
+
var newID = Math.random().toString(36).substring(2, 6);
|
3677 |
+
newID = 'dgwt-wcas-search-input-' + newID;
|
3678 |
+
|
3679 |
+
$searchBarInput.attr('id', newID);
|
3680 |
+
$searchBarInput.closest('form').find('label').attr('for', newID);
|
3681 |
+
},
|
3682 |
}
|
3683 |
+
|
3684 |
+
UI_FIXER.init();
|
3685 |
+
}());
|
3686 |
|
3687 |
}));
|
assets/js/search.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}(function(e){"use strict";var t={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t.setAttribute("unselectable","on"),t},highlight:function(e,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /),a=!1,n="";if(o)for(n=o[o.length-1],o=o.sort(function(e,t){return t.length-e.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>=1){var r=o[i].replace(/[\^\@]/g,"");if(r.length>0){if(1===r.trim().length&&o[i]!==n)var l="((\\s|^)"+t.escapeRegExChars(r.trim())+"\\s)";else l=1===r.trim().length&&o[i]===n?"((\\s|^)"+t.escapeRegExChars(r.trim())+")":"("+t.escapeRegExChars(r.trim())+")";e=e.replace(new RegExp(l,"gi"),"^^$1@@"),a=!0}}a&&(e=(e=e.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else l="("+t.escapeRegExChars(s)+")",e=e.replace(new RegExp(l,"gi"),"<strong>$1</strong>");return e},debounce:function(e,t){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void e();s.id=o,i=setTimeout(function(){o===s.id?(e(),s.id=""):clearTimeout(i)},t)},mouseHoverDebounce:function(t,s,i){var o;o=setTimeout(function(){e(s+":hover").length>0?t():clearTimeout(o)},i)},isTextSelected:function(){var e=!1,t=document.getSelection();return"object"==typeof t&&t.toString().length>0&&(e=!0),e},getActiveInstance:function(){var t,s=e(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return s.length>0&&s.each(function(){var s=e(this).find(".dgwt-wcas-search-input");if("object"==typeof s.data("autocomplete"))return t=s.data("autocomplete"),!1}),t},hashCode:function(e){for(var t=0,s=e.length;s>0;)t=(t<<5)-t+e.charCodeAt(--s)|0;return t<0?-1*t:t}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=e.noop;function d(t,s){this.element=t,this.el=e(t),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.latestActivateSource="",this.actionTriggerSource="",this.options=e.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top",inputFilled:"dgwt-wcas-search-filled",darkenOverlayMounted:"js-dgwt-wcas-search-darkoverl-mounted"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.overlayDarkenedState="off",this.isMouseDownOnSearchElements=!1,this.initialize(),this.setOptions(s)}d.utils=t,e.DgwtWcasAutocompleteSearch=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,dpusbBreakpoint:550,deferRequestBy:0,params:{},formatResult:function(e,s,i,o){if(!s)return e;i&&(e=t.highlight(e,s));if(!o.convertHtml)return e;return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/<sup/g,"<sup").replace(/<\/sup/g,"</sup").replace(/sup>/g,"sup>").replace(/<(\/?(strong|b|br|span))>/g,"<$1>").replace(/<(strong|span)\s+class\s*=\s*"([^&]+)">/g,'<$1 class="$2">')},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",darkenedOverlayClass:"dgwt-wcas-darkened-overlay",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(e,t,s){return-1!==e.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?JSON.parse(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1,disableHits:!1,disableSubmit:!1},d.prototype={initialize:function(){var s=this;s.element.setAttribute("autocomplete","off"),s.createContainers(),s.registerEventsSearchBar(),s.registerEventsSuggestions(),s.registerEventsDetailsPanel(),s.registerIconHandler(),s.registerEventsFixedMenu(),s.fixPositionCapture=function(){s.adjustContainerWidth(),s.visible&&s.fixPosition(),s.positionOverlayDarkened()},e(window).on("resize.autocomplete",function(){var e=t.getActiveInstance();void 0!==e&&e.fixPositionCapture()});var i=e(window).width();e(window).on("resize.autocomplete",function(){var t=e(window).width();t!=i&&(s.toggleMobileMode(),i=t)}),s.isMobileMode()&&s.initMobileMode(),s.hideAfterClickOutsideListener(),s.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),s.detailsContainer&&s.detailsContainer.length>0&&s.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(t){var s=this.options;0==e("."+s.containerClass).length?(this.suggestionsContainer=e(d.utils.createNode(s.containerClass)),this.suggestionsContainer.appendTo(s.appendTo||"body"),this.suggestionsContainer.addClass("woocommerce"),!0===s.showImage&&this.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===s.showPrice&&this.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===s.showDescription&&this.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===s.showSKU&&this.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===s.showHeadings&&this.suggestionsContainer.addClass("dgwt-wcas-has-headings")):this.suggestionsContainer=e("."+this.options.containerClass),this.canShowDetailsBox()&&(0==e("."+s.containerDetailsClass).length?(this.detailsContainer=e(d.utils.createNode(s.containerDetailsClass)),this.detailsContainer.appendTo(s.appendTo||"body"),this.detailsContainer.addClass("woocommerce")):this.detailsContainer=e("."+s.containerDetailsClass))},registerEventsSearchBar:function(){var t=this;t.el.closest("."+t.options.formClass).on("submit.autocomplete",function(s){if(t.options.disableSubmit)return s.preventDefault(),!1;var i=e(this).find("."+t.options.searchInputClass);if(i.length&&0===i.val().length)return s.preventDefault(),!1;t.suggestions.length>0&&e.each(t.suggestions,function(e,i){if(void 0!==i.type&&"product_variation"==i.type)return t.select(e),s.preventDefault(),!1}),t.disableOverlayMobile()}),"complete"===document.readyState?t.positionPreloader():e(window).on("load",function(){t.positionPreloader()}),t.el.on("keydown.autocomplete",function(e){t.onKeyPress(e)}),t.el.on("keyup.autocomplete",function(e){t.onKeyUp(e)}),t.el.on("blur.autocomplete",function(){t.onBlur()}),t.el.on("focus.autocomplete",function(e){t.onFocus(e)}),t.el.on("change.autocomplete",function(e){t.onKeyUp(e)}),t.el.on("input.autocomplete",function(e){t.onKeyUp(e)})},registerEventsSuggestions:function(){var s="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){e(document).on("mouseenter.autocomplete",s,function(){var s=t.getActiveInstance();if(void 0!==s){var i=e(this).data("index"),o='.dgwt-wcas-suggestion[data-index="'+i+'"]',a=s.canShowDetailsBox()?100:1;s.selectedIndex!=i&&t.mouseHoverDebounce(function(){s.selectedIndex!==i&&(s.latestActivateSource="mouse",s.getDetails(s.suggestions[i]),s.activate(i))},o,a)}});var i=!1;e(document).on("click.autocomplete",s,function(s){if(i)s.preventDefault();else{var o=t.getActiveInstance();o.actionTriggerSource="click",i=!0,setTimeout(function(){i=!1},500),void 0!==s.ctrlKey&&!1!==s.ctrlKey||(o.select(e(this).data("index")),s.preventDefault())}}),e(document).on("mousedown.autocomplete",s,function(s){var o=this;0===s.button&&setTimeout(function(){i||t.getActiveInstance().select(e(o).data("index"))},250)}),e("."+this.options.containerClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var s=this.getDetailsContainer();this.canShowDetailsBox()&&!s.hasClass("js-dgwt-wcas-initialized")&&(e(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(t){e(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",e(this).val())}),e("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(e){t.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var t=this,s=t.getFormWrapper(),i=s.find("."+t.options.formClass);s.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(e){var o=s.find("."+t.options.searchInputClass);if(s.hasClass("dgwt-wcas-layout-icon-open"))t.hide(),i.hide(!0),s.removeClass("dgwt-wcas-layout-icon-open");else{var a=s.find(".dgwt-wcas-search-icon-arrow");i.hide(),a.hide(),s.addClass("dgwt-wcas-layout-icon-open"),t.positionIconSearchMode(s),i.fadeIn(200,function(){a.show(),t.positionPreloader(s),o.focus()})}}),0==e(".js-dgwt-wcas-initialized").length&&e(".js-dgwt-wcas-search-icon-handler").length>0&&e(document).on("click.autocomplete",function(s){if(e(".dgwt-wcas-layout-icon-open").length){var i=e(s.target);i.closest("."+t.options.searchFormClass).length>0||i.closest("."+t.options.containerClass).length>0||i.closest("."+t.options.containerDetailsClass).length>0||t.hideIconModeSearch()}});var o=e(window).width();e(window).on("resize.autocomplete",function(){var s=e(window).width();s!=o&&(t.applyFlexibleMode(),o=s)}),"complete"==document.readyState?t.applyFlexibleMode():e(window).on("load.autocomplete",function(){t.applyFlexibleMode()})},registerEventsFixedMenu:function(){var t=this;e(window).on("scroll.autocomplete",function(){if(t.suggestions.length>0&&t.elementOrParentIsFixed(t.getFormWrapper()))if(0===e(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(e){setTimeout(function(){t.fixHeight(),t.fixPositionCapture()},e)})}else t.fixHeight(),t.fixPositionCapture()})},initMobileMode:function(){var e=this,t=e.getFormWrapper();t.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&!t.find(".js-dgwt-wcas-enable-mobile-form").length&&(t.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),t.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(t){e.options.mobileOverlayDelay>0?setTimeout(function(){e.enableOverlayMobile()},e.options.mobileOverlayDelay):e.enableOverlayMobile()}))},destroyMobileMode:function(){var e=this.getFormWrapper(),t=(this.getSuggestionsContainer(),e.find(".js-dgwt-wcas-enable-mobile-form"));e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&t.length&&(this.disableOverlayMobile(),t.remove())},toggleMobileMode:function(){var e=this.getFormWrapper(),t="desktop";if(e.hasClass("js-dgwt-wcas-mobile-overlay-enabled")){if(e.find(".js-dgwt-wcas-enable-mobile-form").length&&(t="mobile"),"desktop"===t&&this.isMobileMode()||"mobile"===t&&!this.isMobileMode()){var s=this.getSuggestionsContainer();this.close(!1),s.length&&s.html(""),this.hideIconModeSearch()}"desktop"===t&&this.isMobileMode()&&this.initMobileMode(),"mobile"!==t||this.isMobileMode()||this.destroyMobileMode()}},applyFlexibleMode:function(){var t=e(".js-dgwt-wcas-layout-icon-flexible");t.length&&(this.isMobileMode()?(t.addClass("js-dgwt-wcas-layout-icon"),t.addClass("dgwt-wcas-layout-icon")):(t.removeClass("js-dgwt-wcas-layout-icon"),t.removeClass("dgwt-wcas-layout-icon")),t.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(t){var s=this.getFormWrapper(),i=this.options;e("."+i.searchFormClass).removeClass("dgwt-wcas-active"),s.addClass("dgwt-wcas-active"),e("body").addClass("dgwt-wcas-focused"),s.addClass("dgwt-wcas-search-focused"),0==e(t.target).closest(".dgwt-wcas-search-wrapp-mobile").length&&this.enableOverlayDarkened(),this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var t=this.options,s=this.el.val(),i=this.getQuery(s);e("body").removeClass("dgwt-wcas-focused"),e("."+t.searchFormClass).removeClass("dgwt-wcas-search-focused"),this.isMobileMode()||this.isMouseDownOnSearchElements||(this.hide(),this.selection&&this.currentValue!==i&&(t.onInvalidateSelection||e.noop).call(this.element))},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(t){var s=this,i=s.getSuggestionsContainer(),o=e.extend({},s.options,t);(s.isLocal=Array.isArray(o.lookup),s.isLocal&&(o.lookup=s.verifySuggestionsFormat(o.lookup)),o.orientation=s.validateOrientation(o.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":o.maxHeight+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":o.zIndex-1});o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.showCloseButton()},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(e){e&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(e){var t=this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass),s=this.getFormWrapper();this.hide(),this.clear(!1),this.hideCloseButton(),t.val(""),s.removeClass(this.classes.inputFilled),e&&t.focus()},fixPosition:function(){var e=this.getFormOffset();this.getSuggestionsContainer().css(e),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.getDetailsContainer(),o=this.getFormOffset();if(0==i.length)return!1;var a=o.left+s.outerWidth(!1);if(i.css({top:o.top,left:a}),e("body").removeClass("dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit"),t.outerWidth()>=this.options.dpusbBreakpoint)return e("body").addClass("dgwt-wcas-full-width"),void(!0===this.options.isRtl&&(a=o.left+i.outerWidth(!1),s.css("left",a),i.css("left",o.left)));var n=e(window).width(),r=i.outerWidth(),l=i.offset();e("body").addClass("dgwt-wcas-details-outside dgwt-wcas-details-right"),n<l.left+r&&(e("body").removeClass("dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-left"),a=s.offset().left-i.outerWidth(),i.css("left",a),l=i.offset()),l.left<1&&(e("body").removeClass("dgwt-wcas-details-left dgwt-wcas-details-right"),e("body").addClass("dgwt-wcas-details-notfit"))},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var e=this.getSuggestionsContainer(),t=this.getDetailsContainer();e.css("height","auto"),t.css("height","auto");var s=e.outerHeight(!1),i=t.outerHeight(!1);return e.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(e.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&t.css("height",s+"px"),s<i&&e.css("height",i+"px"),!1)},automaticAlignment:function(){var e=this,t=e.getFormWrapper().find(".dgwt-wcas-search-input"),s=e.getSuggestionsContainer(),i=e.getDetailsContainer();if(null==e.autoAligmentprocess){var o=[t.width(),s.height()];e.options.showDetailsPanel&&(o[2]=i.height()),e.autoAligmentprocess=setInterval(function(){var a=[t.width(),s.height()];e.options.showDetailsPanel&&(a[2]=i.height());for(var n=0;n<o.length;n++)if(o[n]!=a[n]){e.fixHeight(),e.fixPositionCapture(),o=a;break}e.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&e.fixHeight())},10)}},getFormElementInfo:function(){var e,t=this.getFormWrapper(),s={};return t.hasClass("js-dgwt-wcas-layout-icon")&&(t=t.find("."+this.options.formClass)),e=t.offset(),s.left=e.left,s.top=e.top,s.width=t.outerWidth(!1),s.height=t.outerHeight(!1),s.right=s.left+s.width,s.bottom=s.top+s.height,s},getFormOffset:function(){var t=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=t.find("."+this.options.formClass),o=this.el,a=o.offset().top,n=i.offset().left,r=this.options.orientation,l=t.outerHeight(!1),c=o.outerHeight(!1),d={top:a,left:n};if("auto"===r){var g=e(window).height(),u=e(window).scrollTop(),h=-u+a-l,p=u+g-(a+c+l);r=Math.max(h,p)===h?"top":"bottom"}if("top"===r){var w=o[0].getBoundingClientRect().top;s.css("height","auto"),w<s.height()&&s.height(w-10),d.top+=-s.outerHeight(!1)}else d.top+=c;return d},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getSuggestionsContainer:function(){return e("."+this.options.containerClass)},getDetailsContainer:function(){return e("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var e=this.getSuggestionsContainer();e[0].scrollTop=e[0].scrollHeight},isCursorAtEnd:function(){var e,t=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this.getFormWrapper();if(this.visible||e.keyCode!==l||!this.currentValue){if(!this.visible)return e.keyCode===i&&t.hasClass("dgwt-wcas-layout-icon-open")&&this.hideIconModeSearch(),void(e.keyCode===i&&this.isMountedOverlayDarkened()&&(this.disableOverlayDarkened(),this.el.blur()));if(!e.ctrlKey&&!e.metaKey||e.keyCode!==a){switch(e.keyCode){case i:this.close();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:break;case a:if(-1===this.selectedIndex)return!this.options.disableSubmit&&void this.hide();this.actionTriggerSource="enter",this.select(this.selectedIndex);break;case n:this.moveUp();break;case l:this.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}else this.selectedIndex>-1&&this.openInNewTab(this.selectedIndex)}else this.suggest()},onKeyUp:function(e){var t=this;switch(e.keyCode){case n:case l:return}clearTimeout(t.onChangeTimeout),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeTimeout=setTimeout(function(){t.onValueChange()},t.options.deferRequestBy):t.onValueChange())},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var t=this.options,s=this.el.val(),i=this.getQuery(s),o=this.getFormWrapper();this.selection&&this.currentValue!==i&&(this.selection=null,(t.onInvalidateSelection||e.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,t.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):(i.length>0?o.hasClass(this.classes.inputFilled)||o.addClass(this.classes.inputFilled):o.removeClass(this.classes.inputFilled),i.length<t.minChars?(this.hideCloseButton(),this.hide()):this.getSuggestions(i))}},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return e(window).width()<this.options.mobileBreakpoint},getQuery:function(t){var s,i=this.options.delimiter;return i?(s=t.split(i),e.trim(s[s.length-1])):t.trim()},getSuggestionsLocal:function(t){var s,i=this.options,o=t.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:e.grep(i.lookup,function(e){return a(e,t,o)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var o,a,n,r,l=this,c=l.options,d=c.serviceUrl,g=l.getFormWrapper(),u=l.isActiveIconModeSearch();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),c.params=l.applyCustomParams(c.params),l.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(l.element,c.params)&&(a=c.ignoreParams?null:c.params,e.isFunction(c.lookup)?c.lookup(i,function(e){l.suggestions=e.suggestions,l.suggest(),l.selectFirstSuggestion(e.suggestions),c.onSearchComplete.call(l.element,i,e.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(e.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+e.param(a||{}),o=l.cachedResponse[n]),o&&Array.isArray(o.suggestions)?(l.suggestions=o.suggestions,l.suggest(),l.selectFirstSuggestion(o.suggestions),c.onSearchComplete.call(l.element,i,o.suggestions)):l.isBadQuery(i)?c.onSearchComplete.call(l.element,i,[]):(l.abortAjax(),r={url:d,data:a,type:c.type,dataType:c.dataType},e.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,t.debounce(function(){var t=s.object,o=s.ajaxSettings;t.currentRequest=e.ajax(o).done(function(e){var s;u&&!t.isActiveIconModeSearch()||(t.currentRequest=null,void 0!==(s=t.options.transformResult(e,i)).suggestions&&(t.processResponse(s,i,n),t.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?t.gaEvent(i,"Autocomplete Search without results"):t.gaEvent(i,"Autocomplete Search with results")),t.fixPositionCapture(),t.options.onSearchComplete.call(t.element,i,s.suggestions),t.updatePrices())}).fail(function(e,s,o){t.options.onSearchError.call(t.element,i,e,s,o)})},c.debounceWaitMs))))},getDetails:function(t){var s=this;if(!s.canShowDetailsBox())return!1;if(null!=t&&void 0!==t.type&&("string"!=typeof t.type||"more_products"!==t.type)){s.fixHeight();s.getDetailsContainer();var i=s.prepareSuggestionObjectID(t);if(null!=s.cachedDetails[i])s.detailsPanelSetScene(i),s.fixHeight(),s.fixPositionCapture();else{var o={action:dgwt_wcas.action_result_details,items:[]};if(e.each(s.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type){var i={objectID:s.prepareSuggestionObjectID(t),value:null!=t.value?t.value:""};o.items.push(i)}}),s.detailsPanelClearScene(),s.preloader("show","details",""),-1!=e.inArray(i,s.detailsRequestsSent))return;s.detailsRequestsSent.push(i),e.ajax({data:o,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(e){var t="string"==typeof e?JSON.parse(e):e;if(void 0!==t.items)for(var i=0;i<t.items.length;i++){var o=t.items[i].objectID;s.cachedDetails[o]={html:t.items[i].html},s.detailsPanelAddToScene(o),void 0!==t.items[i].price&&t.items[i].price.length>0&&(s.cachedPrices[o]=t.items[i].price)}s.preloader("hide","details","");var a=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[a]?s.detailsPanelSetScene(a):s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight(),s.updatePrices(!0)},error:function(e,t){s.preloader("hide","details",""),s.detailsPanelClearScene(),s.fixPositionCapture(),s.fixHeight()}})}e(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},updatePrices:function(t){var s,i,o=this,a=[];if(o.options.showPrice&&o.options.dynamicPrices&&0!=o.suggestions.length){for(s=0;s<o.suggestions.length;s++)if(void 0!==o.suggestions[s].type&&("product"==o.suggestions[s].type||"product_variation"==o.suggestions[s].type)){var n="product__"+o.suggestions[s].post_id;void 0!==o.cachedPrices[n]?o.updatePrice(s,o.cachedPrices[n]):(o.applyPreloaderForPrice(s),a.push(o.suggestions[s].post_id))}if(!t&&a.length>0){var r={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:a};e.ajax({data:r,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(e){if(void 0!==e.success&&e.success&&e.data.length>0)for(s=0;s<e.data.length;s++){var t=e.data[s].id,a=e.data[s].price;if(o.suggestions.length>0)for(i=0;i<o.suggestions.length;i++)if(void 0!==o.suggestions[i].type&&("product"==o.suggestions[i].type||"product_variation"==o.suggestions[i].type)&&o.suggestions[i].post_id==t){var n="product__"+t;o.cachedPrices[n]=a,o.updatePrice(i,a)}}},error:function(e,t){}})}}},updatePrice:function(t,s){if(void 0!==this.suggestions[t]){this.suggestions[t].price=s;var i=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .dgwt-wcas-sp');i.length&&i.html(s)}},applyCustomParams:function(e){if("object"==typeof dgwt_wcas.custom_params){var t=dgwt_wcas.custom_params;for(var s in t)e[s]=t[s]}var i=this.el.data("custom-params");if("object"==typeof i)for(var s in i)e[s]=i[s];return e},applyPreloaderForPrice:function(t){if(void 0!==this.suggestions[t]){var s=e(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+t+'"] .dgwt-wcas-sp');s.length&&s.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(e){var t="";return void 0!==e&&void 0!==e.type&&(null!=e.post_id&&(t=e.type+"__"+e.post_id,"product_variation"===e.type&&(t+="__"+e.variation_id),void 0!==e.post_type&&(t=e.type+"__"+e.post_id+"__"+e.post_type)),null!=e.term_id&&null!=e.taxonomy&&(t=e.type+"__"+e.term_id+"__"+e.taxonomy)),t},detailsPanelSetScene:function(e){var s=this.getDetailsContainer(),i=t.hashCode(e),o=s.find('.dgwt-wcas-details-inner[data-object="'+i+'"]');o.length&&(this.preloader("hide","details",""),this.detailsPanelClearScene(),o.addClass("dgwt-wcas-details-inner-active"))},detailsPanelAddToScene:function(e){var s=this.getDetailsContainer(),i=this.cachedDetails[e],o=t.hashCode(e),a="";void 0!==i&&"string"==typeof i.html&&(a=i.html.replace("<div ",'<div data-object="'+o+'" ')),0==s.find('.dgwt-wcas-details-inner[data-object="'+o+'"]').length&&s.append(a)},detailsPanelClearScene:function(){var e=this.getDetailsContainer().find(".dgwt-wcas-details-inner");e.length&&e.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(t){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=t&&t.length>0&&e.each(this.suggestions,function(e,t){if(void 0!==t.type&&"more_products"!=t.type&&"headline"!=t.type&&"no-results"!=t.type)return s=e,!1;void 0!==t.type&&"no-results"!==t.type||(i=!0)}),i||(this.latestActivateSource="system",this.getDetails(t[s]),this.activate(s)))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,s=t.length;s--;)if(0===e.indexOf(t[s]))return!0;return!1},hide:function(t){this.getFormWrapper();var s=this.getSuggestionsContainer(),i=this.getDetailsContainer();e.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),s.hide(),s.removeClass(this.classes.suggestionsContainerOrientTop),i.hide(),e("body").removeClass("dgwt-wcas-open"),e("body").removeClass("dgwt-wcas-block-scroll"),e("body").removeClass("dgwt-wcas-is-details"),e("body").removeClass("dgwt-wcas-full-width"),e("body").removeClass("dgwt-wcas-nores"),e("body").removeClass("dgwt-wcas-details-outside"),e("body").removeClass("dgwt-wcas-details-right"),e("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),this.isMouseDownOnSearchElements=!1,"boolean"==typeof t&&t&&(this.hideCloseButton(),this.currentValue="",this.suggestions=[]),this.signalHint(null)},positionIconSearchMode:function(t){var s=-20,i=t.find("."+this.options.formClass),o=i.width(),a=e(window).width(),n=t[0].getBoundingClientRect().left;i[0].getBoundingClientRect().left;var r=(n+10)/a;s=Math.floor(o*r*-1),s=Math.max(s,-1*n),i.css({left:s+"px"})},isActiveIconModeSearch:function(){var t=!1;return e(".dgwt-wcas-layout-icon-open").length>0&&(t=!0),t},hideIconModeSearch:function(){this.isActiveIconModeSearch()&&!t.isTextSelected()&&e(".dgwt-wcas-layout-icon-open").removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var t=this;t.isMobileMode()||e(document).mouseup(function(s){if(t.visible){t.getSuggestionsContainer(),t.getDetailsContainer();var i=!(e(s.target).closest("."+t.options.searchFormClass).length>0||e(s.target).hasClass(t.options.searchFormClass)),o=!(e(s.target).closest("."+t.options.containerClass).length>0||e(s.target).hasClass(t.options.containerClass));if(t.canShowDetailsBox()){var a=!(e(s.target).closest("."+t.options.containerDetailsClass).length>0||e(s.target).hasClass(t.options.containerDetailsClass));i&&o&&a&&t.hide()}else i&&o&&t.hide()}})},suggest:function(){if(this.suggestions.length){var t,s=this,i=s.options,o=i.groupBy,a=i.formatResult,n=s.getQuery(s.currentValue),r=s.classes.suggestion,l=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=e(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(e("body").removeClass("dgwt-wcas-nores"),e.each(s.suggestions,function(l,c){var d="",g=!1,u="string"==typeof c.url&&c.url.length?c.url:"#";if(o&&(h+=function(e,s){var i=e.data[o];return t===i?"":'<div class="autocomplete-group"><strong>'+(t=i)+"</strong></div>"}(c,0)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var p,w=r,f="dgwt-wcas-st",m="",v="",b="",y=!0;"product_cat"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(b=c.breadcrumbs+" > "+c.value,v+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&c.taxonomy===i.taxonomyBrands?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"taxonomy"===c.type?(w+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):i.isPremium&&"vendor"===c.type?(w+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):i.isPremium&&"post"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===c.type?(w+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(m+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(w+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",f="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",y=!1):i.showHeadings&&"headline"===c.type?(w+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),y=!1):(w+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,y=!1,!0===i.showDetailsPanel&&s.detailsPanelClearScene(),e("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(p=!0),b=b.length>0?' title="'+b+'"':"",h+='<a href="'+u+'" class="'+w+'" data-index="'+l+'">',p&&(h+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',h+='<div class="dgwt-wcas-content-wrapp">'),h+="<span"+b+' class="'+f+'">',"vendor"===c.type?(h+='<span class="dgwt-wcas-st-title">'+m+a(c.value,n,y,i)+v+"</span>",c.shop_city&&(h+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+a(c.shop_city,n,!0,i)+"</span>"),void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>")):h+=m+a(c.value,n,y,i)+v,h+="</span>",h+=p?"</div>":"",h+="</a>"}else{!0===i.showImage&&void 0!==c.thumb_html&&(g=!0);var C="product_variation"===c.type?" dgwt-wcas-suggestion-product-var":"";if(d+=void 0!==c.post_id?'data-post-id="'+c.post_id+'" ':"",d+=void 0!==c.taxonomy?'data-taxonomy="'+c.taxonomy+'" ':"",d+=void 0!==c.term_id?'data-term-id="'+c.term_id+'" ':"",h+='<a href="'+u+'" class="'+r+" dgwt-wcas-suggestion-product"+C+'" data-index="'+l+'" '+d+">",g&&(h+='<span class="dgwt-wcas-si">'+c.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(h+=c.title_before),h+='<span class="dgwt-wcas-st-title">'+a(c.value,n,!0,i)+"</span>",void 0!==c.title_after&&c.title_after&&(h+=c.title_after),!0===i.showSKU&&void 0!==c.sku&&c.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+a(c.sku,n,!0,i)+")</span>"),!0===i.showDescription&&void 0!==c.desc&&c.desc&&(h+='<span class="dgwt-wcas-sd">'+a(c.desc,n,!0,i)+"</span>"),!0===i.showProductVendor&&void 0!==c.vendor&&c.vendor){var _='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+c.vendor+"</span>";void 0!==c.vendor_url&&c.vendor_url?h+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+_+"</span>":h+=_}void 0!==c.content_after&&c.content_after&&(h+=c.content_after),h+="</div>";var S=!0===i.showPrice&&void 0!==c.price,x=void 0!==c.meta_before,D=void 0!==c.meta_after,M=S||x||D;h+=M?'<div class="dgwt-wcas-meta">':"",x&&(h+=c.meta_before),S&&(h+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),D&&(h+=c.meta_after),h+=M?"</div>":"",h+=g?"</div>":"",h+="</a>"}}),this.adjustContainerWidth(),g.detach(),c.html(h),e.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),e("body").addClass("dgwt-wcas-open"),s.isMouseDownOnSearchElements=!1,s.automaticAlignment(),!0===i.showDetailsPanel&&(e("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),e("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e=this.getFormWrapper(),t=this.getSuggestionsContainer(),s=this.getDetailsContainer(),i=e.find("."+this.options.formClass).outerWidth();if(e.length&&(t.css("width",i+"px"),this.canShowDetailsBox()&&i>=this.options.dpusbBreakpoint)){var o;t.css("width",i/2),s.css("width",i/2),0!=(o=i-(t.outerWidth()+s.outerWidth()))&&s.css("width",s.outerWidth()+o)}},positionPreloader:function(t){var s="object"==typeof t?t.find(".dgwt-wcas-search-submit"):e(".dgwt-wcas-search-submit");s.length>0&&s.each(function(){var t=e(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?t.css("left",6+e(this).outerWidth()+"px"):t.css("right",e(this).outerWidth()+"px")})},findBestHint:function(){var t=this.el.val().toLowerCase(),s=null;t&&(e.each(this.suggestions,function(e,i){var o=0===i.value.toLowerCase().indexOf(t);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(t){var s="";t&&(s=this.currentValue+t.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=t,(this.options.onHint||e.noop)(s))},preloader:function(e,t,s){var i,o,a="dgwt-wcas-preloader-wrapp",n=null==s?a:a+" "+s;if("form"===t){if(1!=dgwt_wcas.show_preloader)return;o=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===t&&(o=this.getDetailsContainer());if(0!=o.length)if("form"!==t){var r=o.find("."+a);if("hide"!==e){if("show"===e){var l=this.options.isRtl?"-rtl":"";i='<div class="'+n+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+l+'.png" /></div>',this.detailsPanelClearScene(),r.length&&r.remove(),o.prepend(i)}}else r.length&&r.remove()}else"hide"===e?(o.removeClass(s),o.html("")):(o.addClass(s),"string"==typeof dgwt_wcas.preloader_icon&&o.html(dgwt_wcas.preloader_icon))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,function(e){return{value:e,data:null}}):t},validateOrientation:function(t,s){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=s),t},processResponse:function(e,t,s){var i=this.options;e.suggestions=this.verifySuggestionsFormat(e.suggestions),i.noCache||(this.cachedResponse[s]=e,i.preventBadQueries&&!e.suggestions.length&&this.badQueries.push(t)),t===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&e.suggestions.reverse(),this.suggestions=e.suggestions,this.suggest())},activate:function(t){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=t,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),e(s).addClass(i),s):null},selectHint:function(){var t=e.inArray(this.hint,this.suggestions);this.select(t)},select:function(e){this.options.disableHits||(this.disableOverlayMobile(),this.hide(),this.onSelect(e))},moveUp:function(){if(-1!==this.selectedIndex){if(this.latestActivateSource="key",0===this.selectedIndex)return this.getSuggestionsContainer().children("."+this.classes.suggestion).first().removeClass(this.classes.selected),this.selectedIndex=-1,this.ignoreValueChange=!1,this.el.val(this.currentValue),void this.findBestHint();this.adjustScroll(this.selectedIndex-1,"up")}},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&(this.latestActivateSource="key",this.adjustScroll(this.selectedIndex+1,"down"))},adjustScroll:function(t,s){if("headline"===this.suggestions[t].type&&(t="down"===s?t+1:t-1),void 0!==this.suggestions[t]){var i=this.activate(t);if(this.getDetails(this.suggestions[t]),"more_products"!==this.suggestions[t].type&&i&&!this.canShowDetailsBox()){var o,a,n,r=this.getSuggestionsContainer(),l=e(i).outerHeight(!1);o=i.offsetTop,n=(a=r.scrollTop())+this.options.maxHeight-l,o<a?r.scrollTop(o):o>n&&r.scrollTop(o-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0),this.signalHint(null)}}},onSelect:function(t){var s=this.options.onSelect,i=this.suggestions[t];void 0===i.type||"more_products"!==i.type&&("enter"!==this.actionTriggerSource||"key"==this.latestActivateSource||"product_variation"==i.type)?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,e.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},openInNewTab:function(e){var t=this.suggestions[e];t.url.length>0&&window.open(t.url,"_blank").focus()},getValue:function(e){var t,s,i=this.options.delimiter;return i?1===(s=(t=this.currentValue).split(i)).length?e:t.substr(0,t.length-s[s.length-1].length)+e:e},dispose:function(){var t=this.el,s=this.getFormWrapper(),i=this.getSuggestionsContainer(),o=(this.getDetailsContainer(),t.closest("."+this.options.formClass),s.find(".js-dgwt-wcas-enable-mobile-form"));s.length&&s.find("*").each(function(){e(this).off(".autocomplete")});t.removeData("autocomplete"),e(window).off("resize.autocomplete",this.fixPositionCapture),s.removeClass("dgwt-wcas-active"),this.close(!1),o.length&&o.remove(),i.length&&i.html("")},isMountedOverlayDarkened:function(){var e=!1;return this.getFormWrapper().hasClass(this.classes.darkenOverlayMounted)&&(e=!0),e},enableOverlayDarkened:function(){var t=this,s=t.options;if(t.isMountedOverlayDarkened()){if(t.getFormWrapper().addClass("dgwt-wcas-search-darkoverl-on"),e("body").addClass("dgwt-wcas-darkoverl-on"),0==e("."+s.darkenedOverlayClass).length){var i='<div class="'+s.darkenedOverlayClass+'"><div></div><div></div><div></div><div></div></div>';e("body").append(i);var o=e("."+t.options.darkenedOverlayClass);t.positionOverlayDarkened(),o.on("click.autocomplete",function(e){t.disableOverlayDarkened()})}t.overlayDarkenedState="on"}},disableOverlayDarkened:function(){var t,s=this.options;if(this.isMountedOverlayDarkened()){(t=e(".dgwt-wcas-search-darkoverl-on")).length&&t.removeClass("dgwt-wcas-search-darkoverl-on"),e("body").removeClass("dgwt-wcas-darkoverl-on");var i=e("."+s.darkenedOverlayClass);i.length>0&&(i.remove(),this.overlayDarkenedState="off")}},positionOverlayDarkened:function(){var t=this,s=e("."+t.options.darkenedOverlayClass);s.length>0&&s.children("div").each(function(s){t.positionOverlayDarkenedDiv(e(this),s+1)})},positionOverlayDarkenedDiv:function(t,s){var i,o=this.getFormElementInfo();switch(s){case 1:i={left:"-200px",top:"-200px",width:o.left+200+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 2:i={left:"-200px",top:"-200px",width:e(window).outerWidth(!1)+200+"px",height:o.top+200+"px"};break;case 3:i={left:o.left+o.width+"px",top:"-200px",width:e(window).outerWidth(!1)-o.right+"px",height:e(document).outerHeight(!1)+200-1+"px"};break;case 4:i={left:"-200px",top:o.top+o.height+"px",width:e(window).outerWidth(!1)+200+"px",height:e(document).outerHeight(!1)-o.bottom-1+"px"}}i&&t.css(i)},enableOverlayMobile:function(){var t=this;if("on"!==t.overlayMobileState){t.overlayMobileState="on";var s,i=t.getFormWrapper(),o=t.getSuggestionsContainer(),a="";e("html").addClass("dgwt-wcas-overlay-mobile-on"),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon&&(a+=dgwt_wcas.back_icon),a+="</button>",a+="</div>",a+="</div>",e(t.options.mobileOverlayWrapper).append(a),(s=e(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),o.appendTo(".js-dgwt-wcas-om-bar"),i.addClass("dgwt-wcas-search-wrapp-mobile"),i.hasClass("dgwt-wcas-has-submit")&&(i.addClass("dgwt-wcas-has-submit-off"),i.removeClass("dgwt-wcas-has-submit")),i.find("."+t.options.searchInputClass).focus(),e(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(e){t.disableOverlayMobile(s)})}},disableOverlayMobile:function(t){var s=this;if(e("html").hasClass("dgwt-wcas-overlay-mobile-on")){var i=s.getSuggestionsContainer(),o=e(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);o.hasClass("dgwt-wcas-has-submit-off")&&(o.removeClass("dgwt-wcas-has-submit-off"),o.addClass("dgwt-wcas-has-submit")),o.removeClass("dgwt-wcas-search-wrapp-mobile"),e("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),e(".js-dgwt-wcas-om-hook").after(o),e(".js-dgwt-wcas-overlay-mobile").remove(),e(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var e=o.find(".dgwt-wcas-close");o.length>0&&(e.removeClass("dgwt-wcas-close"),e.html("")),s.hide()},150),s.overlayMobileState="off"}else s.overlayMobileState="off"},showCloseButton:function(){var e=this,t=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",s=e.getFormWrapper().find("."+e.options.preloaderClass);s.hasClass(e.options.closeTrigger)||s.on("click.autocomplete",function(){e.close(!0)}),s.addClass(e.options.closeTrigger),s.html(t)},hideCloseButton:function(){var e=this.getFormWrapper().find("."+this.options.closeTrigger);e.length&&(e.removeClass(this.options.closeTrigger),e.html("")),e.off("click.autocomplete")},elementOrParentIsFixed:function(t){var s=t.add(t.parents()),i=!1;return s.each(function(){if("fixed"===e(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,s){var i=!(!window.hasOwnProperty("GoogleAnalyticsObject")||!window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:t,event_category:s});else if(!1!==i){var o=i.getAll()[0];o&&o.send({hitType:"event",eventCategory:s,eventAction:"autocomplete_search",eventLabel:t})}}catch(e){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"});else if(!1!==i){var a=i.getAll()[0];a&&(a.set("page","/?s="+encodeURI(t)+"&post_type=product&dgwt_wcas=1"),a.send("pageview"))}}catch(e){}e(document).trigger("dgwtWcasGAEvent",{term:t,category:s})}},e.fn.dgwtWcasAutocomplete=function(t,s){return arguments.length?this.each(function(){var i=e(this),o=i.data("autocomplete");"string"==typeof t?o&&"function"==typeof o[t]&&o[t](s):(o&&o.dispose&&o.dispose(),o=new d(this,t),i.data("autocomplete",o))}):this.first().data("autocomplete")},e.fn.autocomplete||(e.fn.autocomplete=e.fn.dgwtWcasAutocomplete),function(){function t(){var t=e(".dgwt-wcas-search-input"),s=[];t.length>1&&t.each(function(){var t=e(this).attr("id");if(-1==e.inArray(t,s))s.push(t);else{var i=Math.random().toString(36).substring(2,6);i="dgwt-wcas-search-input-"+i,e(this).attr("id",i),e(this).closest("form").find("label").attr("for",i)}})}function s(){var t=e(".dgwt-wcas-search-input");t.length>0&&t.each(function(){"object"!=typeof e(this).data("autocomplete")&&e(this).dgwtWcasAutocomplete(window.dgwt_wcas.config)})}navigator.userAgent.match(/Trident\/7\./)&&function(e,t){function s(e,t){var s=arguments.length>2?arguments[2]:[];if(!1===a(e))throw new TypeError(Object.prototype.toString.call(e)+"is not a function.");return e.apply(t,s)}function i(e,t,s){var i={value:s,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,t,i)}function o(e,t){return e[t]}function a(e){return"function"==typeof e}function n(e){if(null===e||e===t)throw TypeError();return Object(e)}function r(e,s){var i=function(e,t){return n(e)[t]}(e,s);if(null===i||i===t)return t;if(!1===a(i))throw new TypeError("Method not callable: "+s);return i}function l(t){switch(typeof t){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===t?"null":"Symbol"in e&&(t instanceof e.Symbol||t.constructor===e.Symbol)?"symbol":"object"}}function c(s){if("object"!==l(s))return!1;var i="Symbol"in e&&"match"in e.Symbol?o(s,e.Symbol.match):t;if(i!==t)return Boolean(i);try{var a=s.lastIndex;return s.lastIndex=0,RegExp.prototype.exec.call(s),!0}catch(e){}finally{s.lastIndex=a}return!1}function d(e,t){return l(e)===l(t)&&("number"===l(e)?!(!isNaN(e)||!isNaN(t))||1/e==1/0&&1/t==-1/0||1/e==-1/0&&1/t==1/0||e===t:function(e,t){return e===t}(e,t))}function g(e){if("symbol"===l(e))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(e);return isNaN(t)?0:1/t==1/0||1/t==-1/0||t===1/0||t===-1/0?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function u(i){var n=arguments.length>1?arguments[1]:t;if("object"===l(i)){if(arguments.length<2)var c="default";else n===String?c="string":n===Number&&(c="number");var d="function"==typeof e.Symbol&&"symbol"==typeof e.Symbol.toPrimitive?r(i,e.Symbol.toPrimitive):t;if(d!==t){var g=s(d,i,[c]);if("object"!==l(g))return g;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===c&&(c="number"),function(e,t){if("string"===t)var i=["toString","valueOf"];else i=["valueOf","toString"];for(var n=0;n<i.length;++n){var r=o(e,i[n]);if(a(r)){var c=s(r,e);if("object"!==l(c))return c}}throw new TypeError("Cannot convert to primitive.")}(i,c)}return i}function h(e){switch(l(e)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(u(e,String));default:return String(e)}}i(Array.prototype,"includes",function(e){var t=n(this),s=function(e){var t=g(e);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}(o(t,"length"));if(0===s)return!1;var i=g(arguments[1]);if(i>=0)var a=i;else(a=s+i)<0&&(a=0);for(;a<s;){if(d(e,o(t,h(a))))return!0;a+=1}return!1}),i(String.prototype,"includes",function(e){var s=arguments.length>1?arguments[1]:t,i=h(function(e){if(null===e||e===t)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}(this));if(c(e))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=h(e),a=g(s),n=i.length,r=Math.min(Math.max(a,0),n);return-1!==String.prototype.indexOf.call(i,o,r)})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),e(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&e("html").addClass("dgwt-wcas-is-ios");var t=1==dgwt_wcas.show_details_box,s=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<s||"ontouchend"in document)&&(t=!1),window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:t,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:!(void 0===dgwt_wcas.dynamic_prices||!dgwt_wcas.dynamic_prices),saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,mobileBreakpoint:s,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:!(void 0===dgwt_wcas.show_product_vendor||!dgwt_wcas.show_product_vendor),disableHits:!(void 0===dgwt_wcas.disable_hits||!dgwt_wcas.disable_hits),disableSubmit:!(void 0===dgwt_wcas.disable_submit||!dgwt_wcas.disable_submit)},e(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),e(window).on("load",function(){var t=0,s=setInterval(function(){var i=document.activeElement;if("object"==typeof i&&e(i).length&&e(i).hasClass("dgwt-wcas-search-input")){var o=e(i).closest(".dgwt-wcas-search-wrapp");o.length&&!o.hasClass("dgwt-wcas-active")&&(o.addClass("dgwt-wcas-active"),clearInterval(s))}t>10&&clearInterval(s),t++},500)}),e(document).ready(function(){setTimeout(function(){t(),s()},500)}),e(window).on("load",function(){setTimeout(function(){t(),s()},500),void 0!==window.elementorFrontend&&void 0!==window.elementorFrontend.documentsManager&&void 0!==window.elementorFrontend.documentsManager.documents&&e.each(elementorFrontend.documentsManager.documents,function(e,t){void 0!==t.getModal&&t.getModal&&t.getModal().on("show",function(){setTimeout(function(){s()},300)})})}),e(document.body).on("added_to_cart",function(){e(document.body).hasClass("woocommerce-checkout")&&e(".dgwt-wcas-search-input").length>0&&e(document.body).trigger("update_checkout")})}(),e(document).ready(function(){e('[href^="#elementor-action%3Aaction%3Dpopup%3Aopen"]').length>0&&e(document).on("elementor/popup/show",()=>{var t=e(".elementor-popup-modal .dgwt-wcas-search-input");t.length>0&&t.each(function(){var t=e(this);setTimeout(function(){"object"==typeof t.data("autocomplete")&&t.data("autocomplete").dispose(),t.dgwtWcasAutocomplete(window.dgwt_wcas.config)},500)})})})});
|
1 |
+
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}(function($){"use strict";var c={escapeRegExChars:function(a){return a.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(b){var a=document.createElement("div");return a.className=b,a.style.position="absolute",a.style.display="none",a.setAttribute("unselectable","on"),a},highlight:function(b,h){if(dgwt_wcas.is_premium){var d,a=h.split(/ /),i=!1,g="";if(a){for(d=0,g=a[a.length-1],a=a.sort(function(a,b){return b.length-a.length});d<a.length;d++)if(a[d]&&a[d].length>=1){var e=a[d].replace(/[\^\@]/g,"");if(e.length>0){if(1===e.trim().length&&a[d]!==g)var f="((\\s|^)"+c.escapeRegExChars(e.trim())+"\\s)";else if(1===e.trim().length&&a[d]===g)var f="((\\s|^)"+c.escapeRegExChars(e.trim())+")";else var f="("+c.escapeRegExChars(e.trim())+")";b=b.replace(new RegExp(f,"gi"),"^^$1@@"),i=!0}}}i&&(b=(b=b.replace(/\^\^/g,"<strong>")).replace(/@@/g,"</strong>"))}else{var f="("+c.escapeRegExChars(h)+")";b=b.replace(new RegExp(f,"gi"),"<strong>$1</strong>")}return b},debounce:function(b,c){var e,a=new Date().getUTCMilliseconds();if(0===d.id.length){d.id=a,b();return}d.id=a,e=setTimeout(function(){if(a!==d.id){clearTimeout(e);return}b(),d.id=""},c)},mouseHoverDebounce:function(c,d,a){var b;b=setTimeout(function(){if($(d+":hover").length>0)c();else{clearTimeout(b);return}},a)},isTextSelected:function(){var a=!1,b=document.getSelection();return"object"==typeof b&&b.toString().length>0&&(a=!0),a},getActiveInstance:function(){var b,a=$(".dgwt-wcas-search-wrapp.dgwt-wcas-active");return a.length>0&&a.each(function(){var a=$(this).find(".dgwt-wcas-search-input");if("object"==typeof a.data("autocomplete"))return b=a.data("autocomplete"),!1}),b},hashCode:function(b){for(var a=0,c=b.length;c>0;)a=(a<<5)-a+b.charCodeAt(--c)|0;return a<0?-1*a:a}},d={id:"",callback:null,ajaxSettings:null,object:null},e={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40},b=$.noop;function a(c,d){var b=this;b.element=c,b.el=$(c),b.suggestions=[],b.badQueries=[],b.selectedIndex=-1,b.currentValue=b.element.value,b.timeoutId=null,b.cachedResponse={},b.cachedDetails={},b.cachedPrices={},b.detailsRequestsSent=[],b.onChangeTimeout=null,b.onChange=null,b.isLocal=!1,b.suggestionsContainer=null,b.detailsContainer=null,b.autoAligmentprocess=null,b.noSuggestionsContainer=null,b.latestActivateSource="",b.actionTriggerSource="",b.options=$.extend(!0,{},a.defaults,d),b.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top",inputFilled:"dgwt-wcas-search-filled",darkenOverlayMounted:"js-dgwt-wcas-search-darkoverl-mounted",fixed:"dgwt-wcas-suggestions-wrapp-fixed"},b.hint=null,b.hintValue="",b.selection=null,b.overlayMobileState="off",b.overlayDarkenedState="off",b.isMouseDownOnSearchElements=!1,b.voiceSearchRecognition=null,b.voiceSearchStarted=null,b.initialize(),b.setOptions(d)}a.utils=c,$.DgwtWcasAutocompleteSearch=a,a.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,dynamicPrices:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,dpusbBreakpoint:550,deferRequestBy:0,params:{},formatResult:function(a,b,d,e){return b&&(d&&(a=c.highlight(a,b)),e.convertHtml)?a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/<sup/g,"<sup").replace(/<\/sup/g,"</sup").replace(/sup>/g,"sup>").replace(/<(\/?(strong|b|br|span))>/g,"<$1>").replace(/<(strong|span)\s+class\s*=\s*"([^&]+)">/g,'<$1 class="$2">'):a},delimiter:null,zIndex:999999999,type:"GET",noCache:!1,isRtl:!1,onSearchStart:b,onSearchComplete:b,onSearchError:b,preserveInput:!1,searchFormClass:"dgwt-wcas-search-wrapp",containerClass:"dgwt-wcas-suggestions-wrapp",containerDetailsClass:"dgwt-wcas-details-wrapp",darkenedOverlayClass:"dgwt-wcas-darkened-overlay",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",formClass:"dgwt-wcas-search-form",voiceSearchClass:"dgwt-wcas-voice-search",voiceSearchSupportedClass:"dgwt-wcas-voice-search-supported",voiceSearchActiveClass:"dgwt-wcas-voice-search-active",voiceSearchDisabledClass:"dgwt-wcas-voice-search-disabled",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(a,c,b){return -1!==a.value.toLowerCase().indexOf(b)},paramName:"query",transformResult:function(a){return"string"==typeof a?JSON.parse(a):a},noSuggestionNotice:"No results",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0,enableGASiteSearchModule:!1,showProductVendor:!1,disableHits:!1,disableSubmit:!1,voiceSearchEnabled:!1,voiceSearchLang:""},a.prototype={initialize:function(){var a=this;a.element.setAttribute("autocomplete","off"),a.options.params=a.applyCustomParams(a.options.params),a.createContainers(),a.registerEventsSearchBar(),a.registerEventsSuggestions(),a.registerEventsDetailsPanel(),a.registerIconHandler(),a.registerFlexibleLayout(),a.initVoiceSearch(),a.fixPosition=function(){a.adjustContainerWidth(),a.visible&&(a.fixPositionSuggestions(),a.canShowDetailsPanel()&&a.fixPositionDetailsPanel()),a.positionOverlayDarkened()},$(window).on("resize.autocomplete",function(){var a=c.getActiveInstance();clearTimeout(window.dgwt_wcas.resizeOnlyOnce),void 0!==a&&(window.dgwt_wcas.resizeOnlyOnce=setTimeout(function(){a.fixPosition()},100))}),$(window).on("scroll.autocomplete",function(){var a=c.getActiveInstance();clearTimeout(window.dgwt_wcas.scrollOnlyOnce),void 0!==a&&(window.dgwt_wcas.scrollOnlyOnce=setTimeout(function(){a.fixPosition()},100))});var b=$(window).width();$(window).on("resize.autocomplete",function(){var c=$(window).width();c!=b&&(a.toggleMobileOverlayMode(),b=c)}),a.isBreakpointReached("mobile-overlay")&&a.activateMobileOverlayMode(),a.hideAfterClickOutsideListener(),a.suggestionsContainer.addClass("js-dgwt-wcas-initialized"),a.detailsContainer&&a.detailsContainer.length>0&&a.detailsContainer.addClass("js-dgwt-wcas-initialized")},createContainers:function(d){var b=this,c=b.options;0==$("."+c.containerClass).length?(b.suggestionsContainer=$(a.utils.createNode(c.containerClass)),b.suggestionsContainer.appendTo(c.appendTo||"body"),b.suggestionsContainer.addClass("woocommerce"),!0===c.showImage&&b.suggestionsContainer.addClass("dgwt-wcas-has-img"),!0===c.showPrice&&b.suggestionsContainer.addClass("dgwt-wcas-has-price"),!0===c.showDescription&&b.suggestionsContainer.addClass("dgwt-wcas-has-desc"),!0===c.showSKU&&b.suggestionsContainer.addClass("dgwt-wcas-has-sku"),!0===c.showHeadings&&b.suggestionsContainer.addClass("dgwt-wcas-has-headings")):b.suggestionsContainer=$("."+b.options.containerClass),b.canShowDetailsPanel()&&(0==$("."+c.containerDetailsClass).length?(b.detailsContainer=$(a.utils.createNode(c.containerDetailsClass)),b.detailsContainer.appendTo(c.appendTo||"body"),b.detailsContainer.addClass("woocommerce")):b.detailsContainer=$("."+c.containerDetailsClass))},registerEventsSearchBar:function(){var a=this;a.getForm().on("submit.autocomplete",function(b){if(a.options.disableSubmit)return b.preventDefault(),!1;var c=$(this).find("."+a.options.searchInputClass);if(c.length&&0===c.val().length)return b.preventDefault(),!1;a.suggestions.length>0&&$.each(a.suggestions,function(d,c){if(void 0!==c.type&&"product_variation"==c.type)return a.select(d),b.preventDefault(),!1}),a.closeOverlayMobile()}),"complete"===document.readyState?a.positionPreloaderAndMic():$(window).on("load",function(){a.positionPreloaderAndMic()}),a.el.on("keydown.autocomplete",function(b){a.onKeyPress(b)}),a.el.on("keyup.autocomplete",function(b){a.onKeyUp(b)}),a.el.on("blur.autocomplete",function(){a.onBlur()}),a.el.on("focus.autocomplete",function(b){a.onFocus(b)}),a.el.on("change.autocomplete",function(b){a.onKeyUp(b)}),a.el.on("input.autocomplete",function(b){a.onKeyUp(b)})},registerEventsSuggestions:function(){var a="."+this.classes.suggestion;if(!this.getSuggestionsContainer().hasClass("js-dgwt-wcas-initialized")){$(document).on("mouseenter.autocomplete",a,function(){var a=c.getActiveInstance();if(void 0!==a){var b=$(this).data("index"),d=a.canShowDetailsPanel()?100:1;a.selectedIndex!=b&&c.mouseHoverDebounce(function(){a.selectedIndex!==b&&(a.latestActivateSource="mouse",a.getDetails(a.suggestions[b]),a.activate(b))},'.dgwt-wcas-suggestion[data-index="'+b+'"]',d)}});var b=!1;$(document).on("click.autocomplete",a,function(a){if(b)a.preventDefault();else{var d=c.getActiveInstance();d.actionTriggerSource="click",b=!0,setTimeout(function(){b=!1},500),(void 0===a.ctrlKey|| !1===a.ctrlKey)&&(d.select($(this).data("index")),a.preventDefault())}}),$(document).on("mousedown.autocomplete",a,function(a){var d=this;0===a.button&&setTimeout(function(){b||c.getActiveInstance().select($(d).data("index"))},250)}),$("."+this.options.containerClass).on("mousedown.autocomplete",function(a){c.getActiveInstance().isMouseDownOnSearchElements=!0})}},registerEventsDetailsPanel:function(){var a=this.getDetailsContainer();!this.canShowDetailsPanel()||a.hasClass("js-dgwt-wcas-initialized")||($(document).on("change.autocomplete",'[name="js-dgwt-wcas-quantity"]',function(a){$(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",$(this).val())}),$("."+this.options.containerDetailsClass).on("mousedown.autocomplete",function(a){c.getActiveInstance().isMouseDownOnSearchElements=!0}))},registerIconHandler:function(){var a=this,b=a.getFormWrapper(),c=a.getForm();b.on("click.autocomplete",".js-dgwt-wcas-search-icon-handler",function(e){var f=b.find("."+a.options.searchInputClass);if(b.hasClass("dgwt-wcas-layout-icon-open"))a.hide(),c.hide(!0),b.removeClass("dgwt-wcas-layout-icon-open");else{var d=b.find(".dgwt-wcas-search-icon-arrow");c.hide(),d.hide(),b.addClass("dgwt-wcas-layout-icon-open"),a.positionIconSearchMode(b),c.fadeIn(50,function(){d.show(),a.positionPreloaderAndMic(b),f.focus()}),setTimeout(function(){a.fixPosition()},110)}}),0==$(".js-dgwt-wcas-initialized").length&&$(".js-dgwt-wcas-search-icon-handler").length>0&&$(document).on("click.autocomplete",function(c){if($(".dgwt-wcas-layout-icon-open").length){var b=$(c.target);b.closest("."+a.options.searchFormClass).length>0||b.closest("."+a.options.containerClass).length>0||b.closest("."+a.options.containerDetailsClass).length>0||a.hideIconModeSearch()}})},registerFlexibleLayout:function(){var a=this,b=$(window).width();$(window).on("resize.autocomplete",function(){var c=$(window).width();c!=b&&(a.reloadFlexibleLayout(),b=c)}),"complete"==document.readyState?a.reloadFlexibleLayout():$(window).on("load.autocomplete",function(){a.reloadFlexibleLayout()})},activateMobileOverlayMode:function(){var b=this,a=b.getFormWrapper();a.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&!a.find(".js-dgwt-wcas-enable-mobile-form").length&&(a.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),a.addClass("dgwt-wcas-mobile-overlay-trigger-active"),a.find(".js-dgwt-wcas-enable-mobile-form").on("click.autocomplete",function(a){b.options.mobileOverlayDelay>0?setTimeout(function(){b.showMobileOverlay()},b.options.mobileOverlayDelay):b.showMobileOverlay()}))},deactivateMobileOverlayMode:function(){var a=this.getFormWrapper();this.getSuggestionsContainer();var b=a.find(".js-dgwt-wcas-enable-mobile-form");a.hasClass("js-dgwt-wcas-mobile-overlay-enabled")&&b.length&&(this.closeOverlayMobile(),b.remove(),a.removeClass("dgwt-wcas-mobile-overlay-trigger-active"))},toggleMobileOverlayMode:function(){var b=this.getFormWrapper(),a=!1;if(b.hasClass("js-dgwt-wcas-mobile-overlay-enabled")){if(b.find(".js-dgwt-wcas-enable-mobile-form").length&&(a=!0),!a&&this.isBreakpointReached("mobile-overlay")||a&&!this.isBreakpointReached("mobile-overlay")){var c=this.getSuggestionsContainer();this.close(!1),c.length&&c.html(""),this.hideIconModeSearch()}!a&&this.isBreakpointReached("mobile-overlay")&&this.activateMobileOverlayMode(),a&&!this.isBreakpointReached("mobile-overlay")&&this.deactivateMobileOverlayMode()}},showMobileOverlay:function(){var b=this;if("on"!==b.overlayMobileState){b.overlayMobileState="on";var d,c=b.getFormWrapper(),e=b.getSuggestionsContainer(),a="";$("html").addClass("dgwt-wcas-overlay-mobile-on"),$("html").addClass("dgwt-wcas-open-"+b.getSearchStyle()),a+='<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">',a+='<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">',a+='<button class="dgwt-wcas-om-return js-dgwt-wcas-om-return">',"string"==typeof dgwt_wcas.back_icon&&(a+=dgwt_wcas.back_icon),a+="</button>",a+="</div>",a+="</div>",$(b.options.mobileOverlayWrapper).append(a),(d=$(".js-dgwt-wcas-overlay-mobile")).css("zIndex",99999999999),c.after('<span class="js-dgwt-wcas-om-hook"></span>'),c.appendTo(".js-dgwt-wcas-om-bar"),e.appendTo(".js-dgwt-wcas-om-bar"),c.addClass("dgwt-wcas-search-wrapp-mobile"),c.hasClass("dgwt-wcas-has-submit")&&(c.addClass("dgwt-wcas-has-submit-off"),c.removeClass("dgwt-wcas-has-submit")),c.find("."+b.options.searchInputClass).focus(),$(document).on("click.autocomplete",".js-dgwt-wcas-om-return",function(a){b.closeOverlayMobile(d)})}},closeOverlayMobile:function(d){var a=this;if(!$("html").hasClass("dgwt-wcas-overlay-mobile-on")){a.overlayMobileState="off";return}var c=a.getSuggestionsContainer(),b=$(".js-dgwt-wcas-om-bar").find("."+a.options.searchFormClass);b.hasClass("dgwt-wcas-has-submit-off")&&(b.removeClass("dgwt-wcas-has-submit-off"),b.addClass("dgwt-wcas-has-submit")),b.removeClass("dgwt-wcas-search-wrapp-mobile"),$("html").removeClass("dgwt-wcas-overlay-mobile-on"),$("html").removeClass("dgwt-wcas-open-"+a.getSearchStyle()),c.appendTo("body"),c.removeAttr("body-scroll-lock-ignore"),$(".js-dgwt-wcas-om-hook").after(b),$(".js-dgwt-wcas-overlay-mobile").remove(),$(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){b.find("."+a.options.searchInputClass).val("");var c=b.find(".dgwt-wcas-close");b.length>0&&(c.removeClass("dgwt-wcas-close"),c.html("")),a.hide()},150),a.overlayMobileState="off"},reloadFlexibleLayout:function(){var a=this.getFormWrapper(),b=0;a.hasClass("js-dgwt-wcas-layout-icon-flexible")&&(b=1),a.hasClass("js-dgwt-wcas-layout-icon-flexible-inv")&&(b=2),b>0&&(1===b&&this.isBreakpointReached("search-layout")||2===b&&!this.isBreakpointReached("search-layout")?(a.addClass("js-dgwt-wcas-layout-icon"),a.addClass("dgwt-wcas-layout-icon")):(a.removeClass("js-dgwt-wcas-layout-icon"),a.removeClass("dgwt-wcas-layout-icon")),a.addClass("dgwt-wcas-layout-icon-flexible-loaded"))},onFocus:function(b){var a=this.getFormWrapper();$("."+this.options.searchFormClass).removeClass("dgwt-wcas-active"),a.addClass("dgwt-wcas-active"),$("body").addClass("dgwt-wcas-focused"),a.addClass("dgwt-wcas-search-focused"),0==$(b.target).closest(".dgwt-wcas-search-wrapp-mobile").length&&this.enableOverlayDarkened(),this.fixPosition(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var a=this.options,b=this.el.val(),c=this.getQuery(b);$("body").removeClass("dgwt-wcas-focused"),$("."+a.searchFormClass).removeClass("dgwt-wcas-search-focused"),!this.isMouseDownOnSearchElements&&(this.hide(),this.selection&&this.currentValue!==c&&(a.onInvalidateSelection||$.noop).call(this.element))},abortAjax:function(){var a=this;a.currentRequest&&(a.currentRequest.abort(),a.currentRequest=null)},setOptions:function(c){var a=this,d=a.getSuggestionsContainer(),b=$.extend({},a.options,c);a.isLocal=Array.isArray(b.lookup),a.isLocal&&(b.lookup=a.verifySuggestionsFormat(b.lookup)),d.css({"max-height":a.canShowDetailsPanel()?"none":b.maxHeight+"px","z-index":b.zIndex}),a.canShowDetailsPanel()&&a.getDetailsContainer().css({"z-index":b.zIndex-1}),b.onSearchComplete=function(){a.getFormWrapper().removeClass("dgwt-wcas-processing"),a.preloader("hide","form","dgwt-wcas-inner-preloader"),a.showCloseButton()},this.options=b},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.cachedPrices={},this.badQueries=[]},clear:function(a){a&&this.clearCache(),this.currentValue="",this.suggestions=[]},close:function(b){var a=this.el.closest("."+this.options.searchFormClass).find("."+this.options.searchInputClass),c=this.getFormWrapper();this.hide(),this.clear(!1),this.hideCloseButton(),a.val(""),c.removeClass(this.classes.inputFilled),b&&a.focus()},fixPositionSuggestions:function(){var b=this.getSuggestionsContainer(),c=this.getForm(),e=this.el,f=this.getElementInfo(c),a=this.getElementInfo(e),d={top:a.top+a.height,left:f.left};this.ancestorHasPositionFixed(c)?(d.top=a.topViewPort+a.height,b.addClass(this.classes.fixed)):b.removeClass(this.classes.fixed),this.getSuggestionsContainer().css(d)},fixPositionDetailsPanel:function(){var g=this.getFormWrapper(),d=this.getSuggestionsContainer(),a=this.getDetailsContainer(),h=this.getForm(),i=this.el,e=this.getElementInfo(h),c=this.getElementInfo(i),b={top:c.top+c.height,left:e.left+d.outerWidth(!1)};if(this.ancestorHasPositionFixed(g)?(b.top=c.topViewPort+c.height,a.addClass(this.classes.fixed)):a.removeClass(this.classes.fixed),a.css(b),$("body").removeClass("dgwt-wcas-full-width dgwt-wcas-details-outside dgwt-wcas-details-right dgwt-wcas-details-left dgwt-wcas-details-notfit"),g.outerWidth()>=this.options.dpusbBreakpoint){$("body").addClass("dgwt-wcas-full-width"),!0===this.options.isRtl&&(b.left=e.left+a.outerWidth(!1),d.css("left",b.left),a.css("left",e.left));return}var j=$(window).width(),k=a.outerWidth(),f=a.offset();$("body").addClass("dgwt-wcas-details-outside dgwt-wcas-details-right"),j<f.left+k&&($("body").removeClass("dgwt-wcas-details-right"),$("body").addClass("dgwt-wcas-details-left"),b.left=d.offset().left-a.outerWidth(!1),a.css("left",b.left),f=a.offset()),f.left<1&&($("body").removeClass("dgwt-wcas-details-left dgwt-wcas-details-right"),$("body").addClass("dgwt-wcas-details-notfit"))},fixHeight:function(){if(!this.canShowDetailsPanel())return!1;var a=this.getSuggestionsContainer(),d=this.getDetailsContainer();a.css("height","auto"),d.css("height","auto");var b=a.outerHeight(!1),c=d.outerHeight(!1);return a.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),(!(b<=340)||!(c<=340))&&(a.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),c<b&&d.css("height",b+"px"),b<c&&a.css("height",c+"px"),!1)},automaticAlignment:function(){var a=this,b=a.getFormWrapper().find(".dgwt-wcas-search-input"),c=a.getSuggestionsContainer(),d=a.getDetailsContainer();if(null==a.autoAligmentprocess){var e=[b.width(),c.height()];a.canShowDetailsPanel()&&(e[2]=d.height()),a.autoAligmentprocess=setInterval(function(){var g=[b.width(),c.height()];a.canShowDetailsPanel()&&(g[2]=d.height());for(var f=0;f<e.length;f++)if(e[f]!=g[f]){a.fixHeight(),a.fixPosition(),e=g;break}a.canShowDetailsPanel()&&d.find(".dgwt-wcas-details-inner").height()-d.height()>2&&a.fixHeight()},10)}},getElementInfo:function(b){var c,d,a={};return c=b[0].getBoundingClientRect(),d=b.offset(),a.left=d.left,a.top=d.top,a.width=b.outerWidth(!1),a.height=b.outerHeight(!1),a.right=a.left+a.width,a.bottom=a.top+a.height,a.topViewPort=c.top,a.bottomViewPort=c.top+a.height,a},getFormWrapper:function(){return this.el.closest("."+this.options.searchFormClass)},getForm:function(){return this.el.closest("."+this.options.formClass)},getSuggestionsContainer:function(){return $("."+this.options.containerClass)},getDetailsContainer:function(){return $("."+this.options.containerDetailsClass)},scrollDownSuggestions:function(){var a=this.getSuggestionsContainer();a[0].scrollTop=a[0].scrollHeight},isCursorAtEnd:function(){var b,a=this.el.val().length,c=this.element.selectionStart;return"number"==typeof c?c===a:!document.selection||((b=document.selection.createRange()).moveStart("character",-a),a===b.text.length)},onKeyPress:function(b){var a=this,c=a.getFormWrapper();if(a.addActiveClassIfMissing(),!a.visible&&b.keyCode===e.DOWN&&a.currentValue){a.suggest();return}if(!a.visible){b.keyCode===e.ESC&&c.hasClass("dgwt-wcas-layout-icon-open")&&a.hideIconModeSearch(),b.keyCode===e.ESC&&a.isMountedOverlayDarkened()&&(a.disableOverlayDarkened(),a.el.blur());return}if((b.ctrlKey||b.metaKey)&&b.keyCode===e.RETURN){a.selectedIndex> -1&&a.openInNewTab(a.selectedIndex);return}switch(b.keyCode){case e.ESC:a.close();break;case e.RIGHT:if(a.hint&&a.options.onHint&&a.isCursorAtEnd()){a.selectHint();break}return;case e.TAB:break;case e.RETURN:if(-1===a.selectedIndex){if(a.options.disableSubmit)return!1;a.hide();return}a.actionTriggerSource="enter",a.select(a.selectedIndex);break;case e.UP:a.moveUp();break;case e.DOWN:a.moveDown();break;default:return}b.stopImmediatePropagation(),b.preventDefault()},onKeyUp:function(b){var a=this;switch(b.keyCode){case e.UP:case e.DOWN:return}clearTimeout(a.onChangeTimeout),a.currentValue!==a.el.val()&&(a.findBestHint(),a.options.deferRequestBy>0?a.onChangeTimeout=setTimeout(function(){a.onValueChange()},a.options.deferRequestBy):a.onValueChange())},onValueChange:function(){if(this.ignoreValueChange){this.ignoreValueChange=!1;return}var a=this,c=a.options,e=a.el.val(),b=a.getQuery(e),d=a.getFormWrapper();if(a.selection&&a.currentValue!==b&&(a.selection=null,(c.onInvalidateSelection||$.noop).call(a.element)),clearTimeout(a.onChangeTimeout),a.currentValue=e,a.selectedIndex=-1,c.triggerSelectOnValidInput&&a.isExactMatch(b)){a.select(0);return}b.length>0?d.hasClass(a.classes.inputFilled)||d.addClass(a.classes.inputFilled):d.removeClass(a.classes.inputFilled),b.length<c.minChars?(a.hideCloseButton(),a.hide()):a.getSuggestions(b)},isExactMatch:function(b){var a=this.suggestions;return 1===a.length&&a[0].value.toLowerCase()===b.toLowerCase()},canShowDetailsPanel:function(){var a=this.options.showDetailsPanel;return(768>$(window).width()||"ontouchend"in document)&&(a=!1),a},isBreakpointReached:function(b){var a=0;switch(b){case"search-layout":a=this.options.layoutBreakpoint,this.isSetParam("layout_breakpoint")&&(a=Number.parseInt(this.getParam("layout_breakpoint")));break;case"mobile-overlay":a=this.options.mobileOverlayBreakpoint,this.isSetParam("mobile_overlay_breakpoint")&&(a=Number.parseInt(this.getParam("mobile_overlay_breakpoint")))}return $(window).width()<=a},getQuery:function(b){var a,c=this.options.delimiter;return c?(a=b.split(c),$.trim(a[a.length-1])):b.trim()},getSuggestionsLocal:function(d){var a,b=this.options,e=d.toLowerCase(),f=b.lookupFilter,c=parseInt(b.lookupLimit,10);return a={suggestions:$.grep(b.lookup,function(a){return f(a,d,e)})},c&&a.suggestions.length>c&&(a.suggestions=a.suggestions.slice(0,c)),a},getSuggestions:function(e){var f,h,j,i,a=this,b=a.options,g=b.serviceUrl,k=a.getFormWrapper(),l=a.isActiveIconModeSearch();if(b.params[b.paramName]=e,void 0!==dgwt_wcas.current_lang&&(b.params.l=dgwt_wcas.current_lang),a.preloader("show","form","dgwt-wcas-inner-preloader"),k.addClass("dgwt-wcas-processing"),!1!==b.onSearchStart.call(a.element,b.params)){if(h=b.ignoreParams?null:b.params,$.isFunction(b.lookup)){b.lookup(e,function(c){a.suggestions=c.suggestions,a.suggest(),a.selectFirstSuggestion(c.suggestions),b.onSearchComplete.call(a.element,e,c.suggestions)});return}a.isLocal?f=a.getSuggestionsLocal(e):($.isFunction(g)&&(g=g.call(a.element,e)),j=g+"?"+$.param(h||{}),f=a.cachedResponse[j]),f&&Array.isArray(f.suggestions)?(a.suggestions=f.suggestions,a.suggest(),a.selectFirstSuggestion(f.suggestions),b.onSearchComplete.call(a.element,e,f.suggestions)):a.isBadQuery(e)?b.onSearchComplete.call(a.element,e,[]):(a.abortAjax(),i={url:g,data:h,type:b.type,dataType:b.dataType},$.extend(i,b.ajaxSettings),d.object=a,d.ajaxSettings=i,c.debounce(function(){var a=d.object,b=d.ajaxSettings;a.currentRequest=$.ajax(b).done(function(c){var b;(!l||a.isActiveIconModeSearch())&&(a.currentRequest=null,void 0!==(b=a.options.transformResult(c,e)).suggestions&&(a.processResponse(b,e,j),a.selectFirstSuggestion(b.suggestions),1===b.suggestions.length&& void 0!==b.suggestions[0].type&&"no-results"===b.suggestions[0].type?a.gaEvent(e,"Autocomplete Search without results"):a.gaEvent(e,"Autocomplete Search with results")),a.fixPosition(),a.options.onSearchComplete.call(a.element,e,b.suggestions),a.updatePrices())}).fail(function(b,c,d){a.options.onSearchError.call(a.element,e,b,c,d)})},b.debounceWaitMs))}},getDetails:function(b){var a=this;if(!a.canShowDetailsPanel())return!1;if(null!=b&& void 0!==b.type&&("string"!=typeof b.type||"more_products"!==b.type)){a.fixHeight(),a.getDetailsContainer();var c=a.prepareSuggestionObjectID(b);if(null!=a.cachedDetails[c])a.detailsPanelSetScene(c),a.fixHeight(),a.fixPosition();else{var d={action:dgwt_wcas.action_result_details,items:[]};if($.each(a.suggestions,function(e,b){if(void 0!==b.type&&"more_products"!=b.type&&"headline"!=b.type){var c={objectID:a.prepareSuggestionObjectID(b),value:null!=b.value?b.value:""};d.items.push(c)}}),a.detailsPanelClearScene(),a.preloader("show","details",""),-1!=$.inArray(c,a.detailsRequestsSent))return;a.detailsRequestsSent.push(c),$.ajax({data:d,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(d){var b="string"==typeof d?JSON.parse(d):d;if(void 0!==b.items)for(var c=0;c<b.items.length;c++){var e=b.items[c].objectID;a.cachedDetails[e]={html:b.items[c].html},a.detailsPanelAddToScene(e),void 0!==b.items[c].price&&b.items[c].price.length>0&&(a.cachedPrices[e]=b.items[c].price)}a.preloader("hide","details","");var f=a.prepareSuggestionObjectID(a.suggestions[a.selectedIndex]);null!=a.cachedDetails[f]?a.detailsPanelSetScene(f):a.detailsPanelClearScene(),a.fixPosition(),a.fixHeight(),a.updatePrices(!0)},error:function(b,c){a.preloader("hide","details",""),a.detailsPanelClearScene(),a.fixPosition(),a.fixHeight()}})}$(document).trigger("dgwtWcasDetailsPanelLoaded",a)}},updatePrices:function(e){var b,g,a=this,c=[];if(a.options.showPrice&&a.options.dynamicPrices&&0!=a.suggestions.length){for(b=0;b<a.suggestions.length;b++)if(void 0!==a.suggestions[b].type&&("product"==a.suggestions[b].type||"product_variation"==a.suggestions[b].type)){var d="product__"+a.suggestions[b].post_id;void 0!==a.cachedPrices[d]?a.updatePrice(b,a.cachedPrices[d]):(a.applyPreloaderForPrice(b),c.push(a.suggestions[b].post_id))}if(!e&&c.length>0){var f={action:void 0===dgwt_wcas.action_get_prices?"dgwt_wcas_get_prices":dgwt_wcas.action_get_prices,items:c};$.ajax({data:f,type:"post",url:dgwt_wcas.ajax_prices_endpoint,success:function(c){if(void 0!==c.success&&c.success&&c.data.length>0)for(b=0;b<c.data.length;b++){var d=c.data[b].id,e=c.data[b].price;if(a.suggestions.length>0){for(g=0;g<a.suggestions.length;g++)if(void 0!==a.suggestions[g].type&&("product"==a.suggestions[g].type||"product_variation"==a.suggestions[g].type)&&a.suggestions[g].post_id==d){var f="product__"+d;a.cachedPrices[f]=e,a.updatePrice(g,e)}}}},error:function(a,b){}})}}},updatePrice:function(a,b){var c=this;if(void 0!==c.suggestions[a]){c.suggestions[a].price=b;var d=$(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+a+'"] .dgwt-wcas-sp');d.length&&d.html(b)}},applyCustomParams:function(b){if("object"==typeof dgwt_wcas.custom_params){var d=dgwt_wcas.custom_params;for(var a in d)b[a]=d[a]}var c=this.el.data("custom-params");if("object"==typeof c)for(var a in c)b[a]=c[a];return b},isSetParam:function(a){return void 0!==this.options.params[a]},getParam:function(a){return this.isSetParam(a)?this.options.params[a]:""},applyPreloaderForPrice:function(a){if(void 0!==this.suggestions[a]){var b=$(".dgwt-wcas-suggestions-wrapp").find('[data-index="'+a+'"] .dgwt-wcas-sp');b.length&&b.html('<div class="dgwt-wcas-preloader-price"><div class="dgwt-wcas-preloader-price-inner"> <div></div><div></div><div></div></div></div>')}},prepareSuggestionObjectID:function(a){var b="";return void 0!==a&& void 0!==a.type&&(null!=a.post_id&&(b=a.type+"__"+a.post_id,"product_variation"===a.type&&(b+="__"+a.variation_id),void 0!==a.post_type&&(b=a.type+"__"+a.post_id+"__"+a.post_type)),null!=a.term_id&&null!=a.taxonomy&&(b=a.type+"__"+a.term_id+"__"+a.taxonomy)),b},detailsPanelSetScene:function(b){var d=this.getDetailsContainer(),e=c.hashCode(b),a=d.find('.dgwt-wcas-details-inner[data-object="'+e+'"]');a.length&&(this.preloader("hide","details",""),this.detailsPanelClearScene(),a.addClass("dgwt-wcas-details-inner-active"))},detailsPanelAddToScene:function(b){var d=this.getDetailsContainer(),a=this.cachedDetails[b],e=c.hashCode(b),f="";void 0!==a&&"string"==typeof a.html&&(f=a.html.replace("<div ",'<div data-object="'+e+'" ')),0==d.find('.dgwt-wcas-details-inner[data-object="'+e+'"]').length&&d.append(f)},detailsPanelClearScene:function(){var a=this.getDetailsContainer().find(".dgwt-wcas-details-inner");a.length&&a.removeClass("dgwt-wcas-details-inner-active")},selectFirstSuggestion:function(b){var a=this,c=0,d=!1;a.canShowDetailsPanel()&&("undefined"!=b&&b.length>0&&$.each(a.suggestions,function(b,a){if(void 0!==a.type&&"more_products"!=a.type&&"headline"!=a.type&&"no-results"!=a.type)return c=b,!1;(void 0===a.type||"no-results"===a.type)&&(d=!0)}),d||(a.latestActivateSource="system",a.getDetails(b[c]),a.activate(c)))},isBadQuery:function(c){if(!this.options.preventBadQueries)return!1;for(var a=this.badQueries,b=a.length;b--;)if(0===c.indexOf(a[b]))return!0;return!1},hide:function(c){var a=this,b=a.getSuggestionsContainer(),d=a.getDetailsContainer();$.isFunction(a.options.onHide)&&a.visible&&a.options.onHide.call(a.element,container),a.visible=!1,a.selectedIndex=-1,clearTimeout(a.onChangeTimeout),b.hide(),b.removeClass(a.classes.suggestionsContainerOrientTop),b.removeClass(a.classes.fixed),a.canShowDetailsPanel()&&(d.hide(),d.removeClass(a.classes.fixed)),$("body").removeClass("dgwt-wcas-open"),$("html").hasClass("dgwt-wcas-overlay-mobile-on")||$("html").removeClass("dgwt-wcas-open-"+a.getSearchStyle()),$("body").removeClass("dgwt-wcas-block-scroll"),$("body").removeClass("dgwt-wcas-is-details"),$("body").removeClass("dgwt-wcas-full-width"),$("body").removeClass("dgwt-wcas-nores"),$("body").removeClass("dgwt-wcas-details-outside"),$("body").removeClass("dgwt-wcas-details-right"),$("body").removeClass("dgwt-wcas-details-left"),null!=a.autoAligmentprocess&&(clearInterval(a.autoAligmentprocess),a.autoAligmentprocess=null),a.isMouseDownOnSearchElements=!1,"boolean"==typeof c&&c&&(a.hideCloseButton(),a.currentValue="",a.suggestions=[]),a.signalHint(null)},positionIconSearchMode:function(d){var a=-20,b=this.getForm(),e=b.width(),f=$(window).width(),c=d[0].getBoundingClientRect().left;a=Math.floor(-1*(e*((c+10)/f))),a=Math.max(a,-1*c),b.css({left:a+"px"})},isActiveIconModeSearch:function(){var a=!1;return $(".dgwt-wcas-layout-icon-open").length>0&&(a=!0),a},hideIconModeSearch:function(){this.isActiveIconModeSearch()&&!c.isTextSelected()&&$(".dgwt-wcas-layout-icon-open").removeClass("dgwt-wcas-layout-icon-open")},hideAfterClickOutsideListener:function(){var a=this;"ontouchend"in document||$(document).mouseup(function(b){if(a.visible){var c=!($(b.target).closest("."+a.options.searchFormClass).length>0||$(b.target).hasClass(a.options.searchFormClass)),d=!($(b.target).closest("."+a.options.containerClass).length>0||$(b.target).hasClass(a.options.containerClass));if(a.canShowDetailsPanel()){var e=!($(b.target).closest("."+a.options.containerDetailsClass).length>0||$(b.target).hasClass(a.options.containerDetailsClass));c&&d&&e&&a.hide()}else c&&d&&a.hide()}})},suggest:function(){if(!this.suggestions.length){this.hide();return}var k,a=this,b=a.options,l=b.groupBy,m=b.formatResult,e=a.getQuery(a.currentValue),f=a.classes.suggestion,g=a.classes.selected,c=a.getSuggestionsContainer(),h=a.getDetailsContainer(),i=$(a.noSuggestionsContainer),d=b.beforeRender,j="",n=function(b,c){var a=b.data[l];return k===a?"":'<div class="autocomplete-group"><strong>'+(k=a)+"</strong></div>"};if(b.triggerSelectOnValidInput&&a.isExactMatch(e)){a.select(0);return}$("body").removeClass("dgwt-wcas-nores"),$.each(a.suggestions,function(p,c){var k="",o=!1,s="string"==typeof c.url&&c.url.length?c.url:"#";if(l&&(j+=n(c,e,p)),void 0===c.type||"product"!=c.type&&"product_variation"!=c.type){var q,d=f,t="dgwt-wcas-st",g="",r="",h="",i=!0;"product_cat"===c.taxonomy?(d+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>"),void 0!==c.breadcrumbs&&c.breadcrumbs&&(h=c.breadcrumbs+" > "+c.value,r+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+c.breadcrumbs+"</span>")):"product_tag"===c.taxonomy?(d+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):b.isPremium&&c.taxonomy===b.taxonomyBrands?(d+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):b.isPremium&&"taxonomy"===c.type?(d+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tax-"+c.taxonomy,b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels["tax_"+c.taxonomy]+"</span>")):b.isPremium&&"vendor"===c.type?(d+=" dgwt-wcas-suggestion-vendor dgwt-wcas-suggestion-vendor",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.vendor+"</span>")):b.isPremium&&"post"===c.type&& void 0!==c.post_type&&"post"===c.post_type?(d+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-post",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):b.isPremium&&"post"===c.type&& void 0!==c.post_type&&"page"===c.post_type?(d+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",b.showHeadings||(g+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===c.type?(d+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",t="dgwt-wcas-st-more",c.value=dgwt_wcas.labels.show_more+" ("+c.total+")",i=!1):b.showHeadings&&"headline"===c.type?(d+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[c.value+"_plu"]&&(c.value=dgwt_wcas.labels[c.value+"_plu"]),i=!1):(d+=" dgwt-wcas-suggestion-nores",c.value=dgwt_wcas.labels.no_results,i=!1,a.canShowDetailsPanel()&&a.detailsPanelClearScene(),$("body").addClass("dgwt-wcas-nores")),void 0!==c.image_src&&c.image_src&&(q=!0),h=h.length>0?' title="'+h+'"':"",j+='<a href="'+s+'" class="'+d+'" data-index="'+p+'">',q&&(j+='<span class="dgwt-wcas-si"><img src="'+c.image_src+'" /></span>',j+='<div class="dgwt-wcas-content-wrapp">'),j+="<span"+h+' class="'+t+'">',"vendor"===c.type?(j+='<span class="dgwt-wcas-st-title">'+g+m(c.value,e,i,b)+r+"</span>",c.shop_city&&(j+='<span class="dgwt-wcas-vendor-city"><span> - </span>'+m(c.shop_city,e,!0,b)+"</span>"),void 0!==c.desc&&c.desc&&(j+='<span class="dgwt-wcas-sd">'+m(c.desc,e,!0,b)+"</span>")):j+=g+m(c.value,e,i,b)+r,j+="</span>",j+=q?"</div>":"",j+="</a>"}else{!0===b.showImage&& void 0!==c.thumb_html&&(o=!0);var z="product_variation"===c.type?" dgwt-wcas-suggestion-product-var":"";if(k+=void 0!==c.post_id?'data-post-id="'+c.post_id+'" ':"",k+=void 0!==c.taxonomy?'data-taxonomy="'+c.taxonomy+'" ':"",k+=void 0!==c.term_id?'data-term-id="'+c.term_id+'" ':"",j+='<a href="'+s+'" class="'+f+" dgwt-wcas-suggestion-product"+z+'" data-index="'+p+'" '+k+">",o&&(j+='<span class="dgwt-wcas-si">'+c.thumb_html+"</span>"),j+=o?'<div class="dgwt-wcas-content-wrapp">':"",j+='<div class="dgwt-wcas-st">',void 0!==c.title_before&&c.title_before&&(j+=c.title_before),j+='<span class="dgwt-wcas-st-title">'+m(c.value,e,!0,b)+"</span>",void 0!==c.title_after&&c.title_after&&(j+=c.title_after),!0===b.showSKU&& void 0!==c.sku&&c.sku.length>0&&(j+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+m(c.sku,e,!0,b)+")</span>"),!0===b.showDescription&& void 0!==c.desc&&c.desc&&(j+='<span class="dgwt-wcas-sd">'+m(c.desc,e,!0,b)+"</span>"),!0===b.showProductVendor&& void 0!==c.vendor&&c.vendor){var u='<span class="dgwt-wcas-product-vendor"><span class="dgwt-wcas-product-vendor-label">'+dgwt_wcas.labels.vendor_sold_by+" </span>"+c.vendor+"</span>";void 0!==c.vendor_url&&c.vendor_url?j+='<span class="dgwt-wcas-product-vendor-link" data-url="'+c.vendor_url+'">'+u+"</span>":j+=u}void 0!==c.content_after&&c.content_after&&(j+=c.content_after),j+="</div>";var v=!0===b.showPrice&& void 0!==c.price,w=void 0!==c.meta_before,x=void 0!==c.meta_after,y=v||w||x;j+=y?'<div class="dgwt-wcas-meta">':"",w&&(j+=c.meta_before),v&&(j+='<span class="dgwt-wcas-sp">'+c.price+"</span>"),x&&(j+=c.meta_after),j+=y?"</div>":"",j+=o?"</div>":"",j+="</a>"}}),this.adjustContainerWidth(),i.detach(),c.html(j),$.isFunction(d)&&d.call(a.element,c,a.suggestions),c.show(),$("body").addClass("dgwt-wcas-open"),$("html").addClass("dgwt-wcas-open-"+a.getSearchStyle()),a.isMouseDownOnSearchElements=!1,a.automaticAlignment(),a.canShowDetailsPanel()&&($("body").addClass("dgwt-wcas-is-details"),h.show(),a.fixHeight()),b.autoSelectFirst&&(a.selectedIndex=0,c.scrollTop(0),c.children("."+f).first().addClass(g)),a.visible=!0,a.fixPosition(),a.findBestHint()},getSearchStyle(){var a=this.getFormWrapper(),b="solaris";return $(a.attr("class").split(/\s+/)).each(function(a){/dgwt-wcas-style-/i.test(this)&&(b=this.replace(/dgwt-wcas-style-/i,""))}),b},adjustContainerWidth:function(){var e=this.getFormWrapper(),c=this.getSuggestionsContainer(),b=this.getDetailsContainer(),a=this.getForm().outerWidth();if(e.length&&(c.css("width",a+"px"),this.canShowDetailsPanel()&&a>=this.options.dpusbBreakpoint)){var d=0;c.css("width",a/2),b.css("width",a/2),0!=(d=a-(c.outerWidth()+b.outerWidth()))&&b.css("width",b.outerWidth()+d)}},positionPreloaderAndMic:function(a){var c=this,b="object"==typeof a?a.find(".dgwt-wcas-search-submit"):$(".dgwt-wcas-search-submit");b.length>0&&b.each(function(){var a=$(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader"),d=$(this).closest(".dgwt-wcas-search-wrapp").hasClass(c.options.voiceSearchSupportedClass),b=$(this).closest(".dgwt-wcas-search-wrapp").find("."+c.options.voiceSearchClass);d?1==dgwt_wcas.is_rtl?(b.css("left",6+$(this).outerWidth()+"px"),a.css("left",46+$(this).outerWidth()+"px")):(b.css("right",$(this).outerWidth()+"px"),a.css("right",40+$(this).outerWidth()+"px")):1==dgwt_wcas.is_rtl?a.css("left",6+$(this).outerWidth()+"px"):a.css("right",$(this).outerWidth()+"px")})},findBestHint:function(){var a=this.el.val().toLowerCase(),b=null;a&&($.each(this.suggestions,function(e,c){var d=0===c.value.toLowerCase().indexOf(a);return d&&(b=c),!d}),this.signalHint(b))},signalHint:function(c){var b="",a=this;c&&(b=a.currentValue+c.value.substr(a.currentValue.length)),a.hintValue!==b&&(a.hintValue=b,a.hint=c,(this.options.onHint||$.noop)(b))},preloader:function(d,e,b){var g,a,f="dgwt-wcas-preloader-wrapp";if("form"===e){if(1!=dgwt_wcas.show_preloader)return;a=this.getFormWrapper().find(".dgwt-wcas-preloader")}else"details"===e&&(a=this.getDetailsContainer());if(0!=a.length){if("form"===e){"hide"===d?(a.removeClass(b),a.html("")):(a.addClass(b),"string"==typeof dgwt_wcas.preloader_icon&&a.html(dgwt_wcas.preloader_icon));return}var c=a.find("."+f);if("hide"===d){c.length&&c.remove();return}if("show"===d){var h=this.options.isRtl?"-rtl":"";g='<div class="'+(null==b?f:f+" "+b)+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+h+'.png" /></div>',this.detailsPanelClearScene(),c.length&&c.remove(),a.prepend(g)}}},verifySuggestionsFormat:function(a){return a.length&&"string"==typeof a[0]?$.map(a,function(a){return{value:a,data:null}}):a},processResponse:function(b,c,e){var a=this,d=a.options;b.suggestions=a.verifySuggestionsFormat(b.suggestions),d.noCache||(a.cachedResponse[e]=b,d.preventBadQueries&&!b.suggestions.length&&a.badQueries.push(c)),c===a.getQuery(a.currentValue)&&(a.suggestions=b.suggestions,a.suggest())},activate:function(f){var c,a=this,b=a.classes.selected,d=a.getSuggestionsContainer(),e=d.find("."+a.classes.suggestion);return(d.find("."+b).removeClass(b),a.selectedIndex=f,-1!==a.selectedIndex&&e.length>a.selectedIndex)?($(c=e.get(a.selectedIndex)).addClass(b),c):null},selectHint:function(){var a=$.inArray(this.hint,this.suggestions);this.select(a)},select:function(a){this.options.disableHits||(this.closeOverlayMobile(),this.hide(),this.onSelect(a))},moveUp:function(){var a=this;if(-1!==a.selectedIndex){if(a.latestActivateSource="key",0===a.selectedIndex){a.getSuggestionsContainer().children("."+a.classes.suggestion).first().removeClass(a.classes.selected),a.selectedIndex=-1,a.ignoreValueChange=!1,a.el.val(a.currentValue),a.findBestHint();return}a.adjustScroll(a.selectedIndex-1,"up")}},moveDown:function(){var a=this;a.selectedIndex!==a.suggestions.length-1&&(a.latestActivateSource="key",a.adjustScroll(a.selectedIndex+1,"down"))},adjustScroll:function(b,i){var a=this;if("headline"===a.suggestions[b].type&&(b="down"===i?b+1:b-1),void 0!==a.suggestions[b]){var d=a.activate(b);if(a.getDetails(a.suggestions[b]),!("more_products"===a.suggestions[b].type|| !d||a.canShowDetailsPanel())){var c,f,g,e=a.getSuggestionsContainer(),h=$(d).outerHeight(!1);c=d.offsetTop,g=(f=e.scrollTop())+a.options.maxHeight-h,c<f?e.scrollTop(c):c>g&&e.scrollTop(c-a.options.maxHeight+h),a.options.preserveInput||(a.ignoreValueChange=!0),a.signalHint(null)}}},onSelect:function(d){var a=this,c=a.options.onSelect,b=a.suggestions[d];if(void 0!==b.type&&("more_products"===b.type||"enter"===a.actionTriggerSource&&"key"!=a.latestActivateSource&&"product_variation"!=b.type)){a.el.closest("form").trigger("submit");return}a.currentValue=a.getValue(b.value),a.currentValue===a.el.val()||a.options.preserveInput||a.el.val(a.currentValue.replace(/(<([^>]+)>)/gi," ").replace(/\s\s+/g," ")),b.url.length>0&&(window.location.href=b.url),a.signalHint(null),a.suggestions=[],a.selection=b,$.isFunction(c)&&c.call(a.element,b)},openInNewTab:function(b){var a=this.suggestions[b];a.url.length>0&&window.open(a.url,"_blank").focus()},getValue:function(c){var a,b,d=this.options.delimiter;return d&&1!==(b=(a=this.currentValue).split(d)).length?a.substr(0,a.length-b[b.length-1].length)+c:c},dispose:function(){var d=this.el,a=this.getFormWrapper(),b=this.getSuggestionsContainer(),c=a.find(".js-dgwt-wcas-enable-mobile-form");a.length&&a.find("*").each(function(){$(this).off(".autocomplete")}),d.removeData("autocomplete"),$(window).off("resize.autocomplete",this.fixPosition),a.removeClass("dgwt-wcas-active"),this.close(!1),c.length&&c.remove(),b.length&&b.html("")},isMountedOverlayDarkened:function(){var b=this.getFormWrapper(),a=!1;return b.hasClass(this.classes.darkenOverlayMounted)&&(a=!0),a},enableOverlayDarkened:function(){var a=this,b=a.options;if(a.isMountedOverlayDarkened()){if(a.getFormWrapper().addClass("dgwt-wcas-search-darkoverl-on"),$("body").addClass("dgwt-wcas-darkoverl-on"),0==$("."+b.darkenedOverlayClass).length){var c='<div class="'+b.darkenedOverlayClass+'"><div></div><div></div><div></div><div></div></div>';$("body").append(c);var d=$("."+a.options.darkenedOverlayClass);a.positionOverlayDarkened(),d.on("click.autocomplete",function(b){a.disableOverlayDarkened()})}a.overlayDarkenedState="on"}},disableOverlayDarkened:function(){var b,a=this,d=a.options;if(a.isMountedOverlayDarkened()){(b=$(".dgwt-wcas-search-darkoverl-on")).length&&b.removeClass("dgwt-wcas-search-darkoverl-on"),$("body").removeClass("dgwt-wcas-darkoverl-on");var c=$("."+d.darkenedOverlayClass);c.length>0&&(c.remove(),a.overlayDarkenedState="off")}},positionOverlayDarkened:function(){var b=this,c=!1,a=$("."+b.options.darkenedOverlayClass);a.length>0&&(b.ancestorHasPositionFixed(b.getFormWrapper())?(c=!0,a.addClass("dgwt-wcas-suggestions-wrapp-fixed")):a.removeClass("dgwt-wcas-suggestions-wrapp-fixed"),a.children("div").each(function(a){b.positionOverlayDarkenedDiv($(this),a+1,c)}))},positionOverlayDarkenedDiv:function(f,g,e){var a,b,c=this.getFormWrapper();switch(c.hasClass("js-dgwt-wcas-layout-icon")&&(c=this.getForm()),a=this.getElementInfo(c),g){case 1:b={left:"-200px",top:"-200px",width:a.left+200+"px",height:$(document).outerHeight(!1)+200-1+"px"};break;case 2:var d=e?a.topViewPort:a.top;b={left:"-200px",top:"-200px",width:$(window).outerWidth(!1)+200+"px",height:d+200+"px"};break;case 3:b={left:a.left+a.width+"px",top:"-200px",width:$(window).outerWidth(!1)-a.right+"px",height:$(document).outerHeight(!1)+200-1+"px"};break;case 4:var d=e?a.topViewPort:a.top;b={left:"-200px",top:d+a.height+"px",width:$(window).outerWidth(!1)+200+"px",height:$(document).outerHeight(!1)-a.bottom-1+"px"}}b&&f.css(b)},showCloseButton:function(){var a=this,c=void 0!==dgwt_wcas.close_icon?dgwt_wcas.close_icon:"",b=a.getFormWrapper().find("."+a.options.preloaderClass);a.el.val().length<a.options.minChars||(b.hasClass(a.options.closeTrigger)||b.on("click.autocomplete",function(){a.close(!0)}),b.addClass(a.options.closeTrigger),b.html(c))},hideCloseButton:function(){var a=this.getFormWrapper().find("."+this.options.closeTrigger);a.length&&(a.removeClass(this.options.closeTrigger),a.html("")),a.off("click.autocomplete")},addActiveClassIfMissing:function(){var a=document.activeElement;if("object"==typeof a&&$(a).length&&$(a).hasClass("dgwt-wcas-search-input")){var b=$(a).closest(".dgwt-wcas-search-wrapp");b.length&&!b.hasClass("dgwt-wcas-active")&&b.addClass("dgwt-wcas-active")}},ancestorHasPositionFixed:function(a){var b=a.add(a.parents()),c=!1;return b.each(function(){if("fixed"===$(this).css("position"))return c=!0,!1}),c},gaEvent:function(a,c){var b=!!(window.hasOwnProperty("GoogleAnalyticsObject")&&window.hasOwnProperty(window.GoogleAnalyticsObject))&&window[window.GoogleAnalyticsObject];if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)gtag("event","autocomplete_search",{event_label:a,event_category:c});else if(!1!==b){var e=b.getAll()[0];e&&e.send({hitType:"event",eventCategory:c,eventAction:"autocomplete_search",eventLabel:a})}}catch(f){}if(this.options.enableGASiteSearchModule)try{if("undefined"!=typeof gtag)gtag("event","page_view",{page_path:"/?s="+encodeURI(a)+"&post_type=product&dgwt_wcas=1"});else if(!1!==b){var d=b.getAll()[0];d&&(d.set("page","/?s="+encodeURI(a)+"&post_type=product&dgwt_wcas=1"),d.send("pageview"))}}catch(g){}$(document).trigger("dgwtWcasGAEvent",{term:a,category:c})},initVoiceSearch:function(){var a=this;if(!a.options.voiceSearchEnabled)return!1;var b=a.getFormWrapper(),e=b.find("."+a.options.searchInputClass),d=b.find("."+a.options.voiceSearchClass),c=c||webkitSpeechRecognition;if(!c)return!1;a.voiceSearchSetState("inactive",d),b.addClass(a.options.voiceSearchSupportedClass),a.voiceSearchRecognition=new c,a.voiceSearchRecognition.lang=a.options.voiceSearchLang,a.voiceSearchRecognition.continuous=!1,a.voiceSearchRecognition.interimResults=!0,a.voiceSearchRecognition.maxAlternatives=1,d.on("click",function(){if(b.hasClass("dgwt-wcas-mobile-overlay-trigger-active")&&!$("html").hasClass("dgwt-wcas-overlay-mobile-on")&&(b.find(".js-dgwt-wcas-enable-mobile-form").click(),b.find("."+a.options.searchInputClass).blur()),a.voiceSearchStarted){a.voiceSearchAbort();return}a.voiceSearchIsInitialized()&&a.voiceSearchAbort(),a.voiceSearchRecognition.start()}),a.voiceSearchRecognition.onstart=function(b){a.voiceSearchSetState("active",d)},a.voiceSearchRecognition.onresult=function(c){let b=c.results[0],f=b[0].transcript;e.val(f),b.isFinal&&(e.trigger("change"),!1 in document&&e.focus(),a.voiceSearchSetState("inactive",d))},a.voiceSearchRecognition.onspeechend=function(){a.voiceSearchSetState("inactive",d),a.voiceSearchRecognition.stop()},a.voiceSearchRecognition.onnomatch=function(b){a.voiceSearchSetState("inactive",d)},a.voiceSearchRecognition.onerror=function(b){switch(b.error){case"aborted":case"no-speech":a.voiceSearchSetState("inactive",d);break;case"network":break;case"not-allowed":case"service-not-allowed":a.voiceSearchSetState("off",d)}}},voiceSearchAbort:function(){var a=this;a.voiceSearchIsInitialized()&&(a.voiceSearchRecognition.abort(),a.voiceSearchStarted=!1)},voiceSearchIsInitialized:function(){return null!==this.voiceSearchRecognition},voiceSearchSetState:function(c,a){var b=this;switch(c){case"active":b.voiceSearchStarted=!0,"string"==typeof dgwt_wcas.voice_search_active_icon&&a.html(dgwt_wcas.voice_search_active_icon);break;case"inactive":b.voiceSearchStarted=!1,"string"==typeof dgwt_wcas.voice_search_inactive_icon&&a.html(dgwt_wcas.voice_search_inactive_icon);break;case"off":b.voiceSearchStarted=!1,"string"==typeof dgwt_wcas.voice_search_disabled_icon&&a.html(dgwt_wcas.voice_search_disabled_icon)}}},$.fn.dgwtWcasAutocomplete=function(c,d){var b="autocomplete";return arguments.length?this.each(function(){var f=$(this),e=f.data(b);"string"==typeof c?e&&"function"==typeof e[c]&&e[c](d):(e&&e.dispose&&e.dispose(),e=new a(this,c),f.data(b,e))}):this.first().data(b)},$.fn.autocomplete||($.fn.autocomplete=$.fn.dgwtWcasAutocomplete),navigator.userAgent.match(/Trident\/7\./)&&function(b,c){function d(a,b){var c=arguments.length>2?arguments[2]:[];if(!1===f(a))throw new TypeError(Object.prototype.toString.call(a)+"is not a function.");return a.apply(b,c)}function a(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!1,configurable:!0})}function e(a,b){return a[b]}function f(a){return"function"==typeof a}function g(a){if(null===a||a===c)throw TypeError();return Object(a)}function h(a){switch(typeof a){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===a?"null":"Symbol"in b&&(a instanceof b.Symbol||a.constructor===b.Symbol)?"symbol":"object"}}function i(a,b){var c,d;return h(a)===h(b)&&("number"===h(a)?!(!isNaN(a)||!isNaN(b))||1/a==1/0&&1/b== -1/0||1/a== -1/0&&1/b==1/0||a===b:(c=a)===b)}function j(b){if("symbol"===h(b))throw new TypeError("Cannot convert a Symbol value to a number");var a=Number(b);return isNaN(a)?0:1/a==1/0||1/a== -1/0||a===1/0||a=== -1/0?a:(a<0?-1:1)*Math.floor(Math.abs(a))}function k(a){switch(h(a)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return k(function(i){var j=arguments.length>1?arguments[1]:c;if("object"===h(i)){if(arguments.length<2)var a="default";else j===String?a="string":j===Number&&(a="number");var k="function"==typeof b.Symbol&&"symbol"==typeof b.Symbol.toPrimitive?function(h,b){var d,e,a=(d=h,e=b,g(d)[e]);if(null!==a&&a!==c){if(!1===f(a))throw new TypeError("Method not callable: "+b);return a}}(i,b.Symbol.toPrimitive):c;if(k!==c){var l=d(k,i,[a]);if("object"!==h(l))return l;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===a&&(a="number"),function(c,j){if("string"===j)var a=["toString","valueOf"];else a=["valueOf","toString"];for(var b=0;b<a.length;++b){var g=e(c,a[b]);if(f(g)){var i=d(g,c);if("object"!==h(i))return i}}throw new TypeError("Cannot convert to primitive.")}(i,a)}return i}(a,String));default:return String(a)}}a(Array.prototype,"includes",function(l){var d,f,h=g(this),b=(d=e(h,"length"),(f=j(d))<=0?0:Math.min(f,9007199254740991));if(0===b)return!1;var c=j(arguments[1]);if(c>=0)var a=c;else(a=b+c)<0&&(a=0);for(;a<b;){if(i(l,e(h,k(a))))return!0;a+=1}return!1}),a(String.prototype,"includes",function(a){var f=arguments.length>1?arguments[1]:c,d=k(function(a){if(null===a||a===c)throw TypeError(Object.prototype.toString.call(a)+" is not coercible to Object.");return a}(this));if(function(a){if("object"!==h(a))return!1;var g,d="Symbol"in b&&"match"in b.Symbol?e(a,b.Symbol.match):c;if(d!==c)return Boolean(d);try{var f=a.lastIndex;return a.lastIndex=0,RegExp.prototype.exec.call(a),!0}catch(i){}finally{a.lastIndex=f}return!1}(a))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var g=k(a),i=Math.min(Math.max(j(f),0),d.length);return -1!==String.prototype.indexOf.call(d,g,i)})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{}),$(document).ready(function(){(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&$("html").addClass("dgwt-wcas-is-ios"),window.dgwt_wcas.resizeOnlyOnce=null,window.dgwt_wcas.scrollOnlyOnce=null,window.dgwt_wcas.config={minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:1==dgwt_wcas.show_details_panel,showImage:1==dgwt_wcas.show_images,showPrice:1==dgwt_wcas.show_price,showDescription:1==dgwt_wcas.show_desc,showSKU:1==dgwt_wcas.show_sku,showSaleBadge:1==dgwt_wcas.show_sale_badge,showFeaturedBadge:1==dgwt_wcas.show_featured_badge,dynamicPrices:void 0!==dgwt_wcas.dynamic_prices&&!!dgwt_wcas.dynamic_prices,saleBadgeText:dgwt_wcas.labels.sale_badge,featuredBadgeText:dgwt_wcas.labels.featured_badge,isRtl:1==dgwt_wcas.is_rtl,showHeadings:1==dgwt_wcas.show_headings,isPremium:1==dgwt_wcas.is_premium,taxonomyBrands:dgwt_wcas.taxonomy_brands,layoutBreakpoint:dgwt_wcas.layout_breakpoint,mobileOverlayBreakpoint:dgwt_wcas.mobile_overlay_breakpoint,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,mobileOverlayDelay:dgwt_wcas.mobile_overlay_delay,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events,convertHtml:dgwt_wcas.convert_html,enableGASiteSearchModule:dgwt_wcas.enable_ga_site_search_module,appendTo:void 0!==dgwt_wcas.suggestions_wrapper?dgwt_wcas.suggestions_wrapper:"body",showProductVendor:void 0!==dgwt_wcas.show_product_vendor&&!!dgwt_wcas.show_product_vendor,disableHits:void 0!==dgwt_wcas.disable_hits&&!!dgwt_wcas.disable_hits,disableSubmit:void 0!==dgwt_wcas.disable_submit&&!!dgwt_wcas.disable_submit,voiceSearchEnabled:void 0!==dgwt_wcas.voice_search_enabled&&!!dgwt_wcas.voice_search_enabled,voiceSearchLang:void 0!==dgwt_wcas.voice_search_lang?dgwt_wcas.voice_search_lang:""},$(".dgwt-wcas-search-input").dgwtWcasAutocomplete(window.dgwt_wcas.config)}),({brokenSearchUi:void 0!==dgwt_wcas.fixer.broken_search_ui&&!!dgwt_wcas.fixer.broken_search_ui,brokenSearchUiAjax:void 0!==dgwt_wcas.fixer.broken_search_ui_ajax&&!!dgwt_wcas.fixer.broken_search_ui_ajax,brokenSearchUiHard:void 0!==dgwt_wcas.fixer.broken_search_ui_hard&&!!dgwt_wcas.fixer.broken_search_ui_hard,brokenSearchElementorPopups:void 0!==dgwt_wcas.fixer.broken_search_elementor_popups&&!!dgwt_wcas.fixer.broken_search_elementor_popups,brokenSearchBrowserBackArrow:void 0!==dgwt_wcas.fixer.broken_search_browsers_back_arrow&&!!dgwt_wcas.fixer.broken_search_browsers_back_arrow,forceRefreshCheckout:void 0!==dgwt_wcas.fixer.force_refresh_checkout&&!!dgwt_wcas.fixer.force_refresh_checkout,searchBars:[],init:function(){var a=this;a.brokenSearchUi&&$(document).ready(function(){a.fixBrokenSearchUi()}),a.brokenSearchUiAjax&&a.fixBrokenSearchUiAjax(),a.brokenSearchUiHard&&a.fixBrokenSearchUiHard(),a.brokenSearchElementorPopups&&$(document).ready(function(){a.fixBrokenSearchOnElementorPopupsV1(),a.fixBrokenSearchOnElementorPopupsV2()}),a.brokenSearchBrowserBackArrow&&a.fixbrokenSearchBrowserBackArrow(),a.forceRefreshCheckout&&a.fixforceRefreshCheckout()},fixBrokenSearchUi:function(){var a=this;$(document).ready(function(){setTimeout(function(){a.pullAndReconditionSearchBars()},50)}),$(window).on("load",function(){setTimeout(function(){a.pullAndReconditionSearchBars()},500)})},fixBrokenSearchUiAjax:function(){var a=this;$(document).ajaxSuccess(function(d,b,c){!("string"==typeof c.url&&new RegExp("search.php|wc-ajax").test(c.url))&&"string"==typeof b.responseText&&b.responseText.includes("dgwt-wcas-search-input")&&setTimeout(function(){a.pullAndReconditionSearchBars()},500)})},fixBrokenSearchUiHard:function(){var a=this;$(document).ready(function(){0===a.searchBars.length&&a.pullAndReconditionSearchBars(),setInterval(function(){a.pullAndReconditionSearchBars()},1e3)})},fixBrokenSearchOnElementorPopupsV1:function(){var a=this;$(document).on("elementor/popup/show",()=>{setTimeout(function(){a.pullAndReconditionSearchBars()},500)})},fixBrokenSearchOnElementorPopupsV2:function(){var a=this;$(document).ready(function(){void 0!==window.elementorFrontend&& void 0!==window.elementorFrontend.documentsManager&& void 0!==window.elementorFrontend.documentsManager.documents&&$.each(elementorFrontend.documentsManager.documents,function(c,b){void 0!==b.getModal&&b.getModal&&b.getModal().on("show",function(){setTimeout(function(){a.pullAndReconditionSearchBars()},500)})})})},fixforceRefreshCheckout:function(){$(document.body).on("added_to_cart",function(){$(document.body).hasClass("woocommerce-checkout")&&$(".dgwt-wcas-search-input").length>0&&$(document.body).trigger("update_checkout")})},fixbrokenSearchBrowserBackArrow:function(){$(window).on("load",function(){var a=0,b=setInterval(function(){var c=document.activeElement;if("object"==typeof c&&$(c).length&&$(c).hasClass("dgwt-wcas-search-input")){var d=$(c).closest(".dgwt-wcas-search-wrapp");d.length&&!d.hasClass("dgwt-wcas-active")&&(d.addClass("dgwt-wcas-active"),clearInterval(b))}a>10&&clearInterval(b),a++},500)})},pullAndReconditionSearchBars:function(){var b=this,a=$(".dgwt-wcas-search-input"),c=0==b.searchBars.length;a.length>0&&a.each(function(){var d,a=$(this),e=!0;if(b.searchBars.length>0){for(d=0;d<b.searchBars.length;d++)if(a[0]===b.searchBars[d][0]){e=!1;break}}if(e){var f=!1;b.hasUniqueId(a)||(b.makeUniqueID(a),f=!0),c&&b.isInitialized(a)&&!f||b.reinitSearchBar(a),b.searchBars.push(a)}})},isInitialized:function(a){return"object"==typeof a.data("autocomplete")},hasUniqueId:function(c){var b=!0;if(this.searchBars.length>0)for(var a=0;a<this.searchBars.length;a++)c.attr("id")===this.searchBars[a].attr("id")&&(b=!1);return b},reinitSearchBar:function(a){"object"==typeof a.data("autocomplete")&&a.data("autocomplete").dispose(),a.dgwtWcasAutocomplete(window.dgwt_wcas.config)},makeUniqueID:function(b){var a=Math.random().toString(36).substring(2,6);a="dgwt-wcas-search-input-"+a,b.attr("id",a),b.closest("form").find("label").attr("for",a)}}).init()})
|
fs/lib/config.php
CHANGED
@@ -385,7 +385,7 @@
|
|
385 |
|
386 |
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
define( 'WP_FS__DEMO_MODE', false );
|
388 |
-
}
|
389 |
-
if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
|
390 |
-
define( 'FS_SDK__SSLVERIFY', false );
|
391 |
}
|
385 |
|
386 |
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
define( 'WP_FS__DEMO_MODE', false );
|
388 |
+
}
|
389 |
+
if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
|
390 |
+
define( 'FS_SDK__SSLVERIFY', false );
|
391 |
}
|
fs/lib/includes/class-freemius.php
CHANGED
@@ -4058,7 +4058,7 @@
|
|
4058 |
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
4059 |
$key = fs_strip_url_protocol( get_site_url( $blog_id ) );
|
4060 |
|
4061 |
-
$secure_auth = SECURE_AUTH_KEY;
|
4062 |
if ( empty( $secure_auth ) ||
|
4063 |
false !== strpos( $secure_auth, ' ' ) ||
|
4064 |
'put your unique phrase here' === $secure_auth
|
4058 |
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
4059 |
$key = fs_strip_url_protocol( get_site_url( $blog_id ) );
|
4060 |
|
4061 |
+
$secure_auth = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
|
4062 |
if ( empty( $secure_auth ) ||
|
4063 |
false !== strpos( $secure_auth, ' ' ) ||
|
4064 |
'put your unique phrase here' === $secure_auth
|
fs/lib/includes/managers/class-fs-key-value-storage.php
CHANGED
@@ -298,6 +298,7 @@
|
|
298 |
return $this->get( $k, null );
|
299 |
}
|
300 |
|
|
|
301 |
function offsetSet( $k, $v ) {
|
302 |
if ( is_null( $k ) ) {
|
303 |
throw new Exception( 'Can\'t append value to request params.' );
|
@@ -306,14 +307,17 @@
|
|
306 |
}
|
307 |
}
|
308 |
|
|
|
309 |
function offsetExists( $k ) {
|
310 |
return array_key_exists( $k, $this->_data );
|
311 |
}
|
312 |
|
|
|
313 |
function offsetUnset( $k ) {
|
314 |
unset( $this->$k );
|
315 |
}
|
316 |
|
|
|
317 |
function offsetGet( $k ) {
|
318 |
return $this->get( $k, null );
|
319 |
}
|
@@ -325,6 +329,7 @@
|
|
325 |
* @link http://php.net/manual/en/iterator.current.php
|
326 |
* @return mixed Can return any type.
|
327 |
*/
|
|
|
328 |
public function current() {
|
329 |
return current( $this->_data );
|
330 |
}
|
@@ -336,6 +341,7 @@
|
|
336 |
* @link http://php.net/manual/en/iterator.next.php
|
337 |
* @return void Any returned value is ignored.
|
338 |
*/
|
|
|
339 |
public function next() {
|
340 |
next( $this->_data );
|
341 |
}
|
@@ -347,6 +353,7 @@
|
|
347 |
* @link http://php.net/manual/en/iterator.key.php
|
348 |
* @return mixed scalar on success, or null on failure.
|
349 |
*/
|
|
|
350 |
public function key() {
|
351 |
return key( $this->_data );
|
352 |
}
|
@@ -359,6 +366,7 @@
|
|
359 |
* @return boolean The return value will be casted to boolean and then evaluated.
|
360 |
* Returns true on success or false on failure.
|
361 |
*/
|
|
|
362 |
public function valid() {
|
363 |
$key = key( $this->_data );
|
364 |
|
@@ -372,6 +380,7 @@
|
|
372 |
* @link http://php.net/manual/en/iterator.rewind.php
|
373 |
* @return void Any returned value is ignored.
|
374 |
*/
|
|
|
375 |
public function rewind() {
|
376 |
reset( $this->_data );
|
377 |
}
|
@@ -386,6 +395,7 @@
|
|
386 |
* <p>
|
387 |
* The return value is cast to an integer.
|
388 |
*/
|
|
|
389 |
public function count() {
|
390 |
return count( $this->_data );
|
391 |
}
|
298 |
return $this->get( $k, null );
|
299 |
}
|
300 |
|
301 |
+
#[ReturnTypeWillChange]
|
302 |
function offsetSet( $k, $v ) {
|
303 |
if ( is_null( $k ) ) {
|
304 |
throw new Exception( 'Can\'t append value to request params.' );
|
307 |
}
|
308 |
}
|
309 |
|
310 |
+
#[ReturnTypeWillChange]
|
311 |
function offsetExists( $k ) {
|
312 |
return array_key_exists( $k, $this->_data );
|
313 |
}
|
314 |
|
315 |
+
#[ReturnTypeWillChange]
|
316 |
function offsetUnset( $k ) {
|
317 |
unset( $this->$k );
|
318 |
}
|
319 |
|
320 |
+
#[ReturnTypeWillChange]
|
321 |
function offsetGet( $k ) {
|
322 |
return $this->get( $k, null );
|
323 |
}
|
329 |
* @link http://php.net/manual/en/iterator.current.php
|
330 |
* @return mixed Can return any type.
|
331 |
*/
|
332 |
+
#[ReturnTypeWillChange]
|
333 |
public function current() {
|
334 |
return current( $this->_data );
|
335 |
}
|
341 |
* @link http://php.net/manual/en/iterator.next.php
|
342 |
* @return void Any returned value is ignored.
|
343 |
*/
|
344 |
+
#[ReturnTypeWillChange]
|
345 |
public function next() {
|
346 |
next( $this->_data );
|
347 |
}
|
353 |
* @link http://php.net/manual/en/iterator.key.php
|
354 |
* @return mixed scalar on success, or null on failure.
|
355 |
*/
|
356 |
+
#[ReturnTypeWillChange]
|
357 |
public function key() {
|
358 |
return key( $this->_data );
|
359 |
}
|
366 |
* @return boolean The return value will be casted to boolean and then evaluated.
|
367 |
* Returns true on success or false on failure.
|
368 |
*/
|
369 |
+
#[ReturnTypeWillChange]
|
370 |
public function valid() {
|
371 |
$key = key( $this->_data );
|
372 |
|
380 |
* @link http://php.net/manual/en/iterator.rewind.php
|
381 |
* @return void Any returned value is ignored.
|
382 |
*/
|
383 |
+
#[ReturnTypeWillChange]
|
384 |
public function rewind() {
|
385 |
reset( $this->_data );
|
386 |
}
|
395 |
* <p>
|
396 |
* The return value is cast to an integer.
|
397 |
*/
|
398 |
+
#[ReturnTypeWillChange]
|
399 |
public function count() {
|
400 |
return count( $this->_data );
|
401 |
}
|
fs/lib/languages/freemius-ru_RU.mo
CHANGED
Binary file
|
fs/lib/start.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
-
$this_sdk_version = '2.4.
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
15 |
*
|
16 |
* @var string
|
17 |
*/
|
18 |
+
$this_sdk_version = '2.4.4';
|
19 |
|
20 |
#region SDK Selection Logic --------------------------------------------------------------------
|
21 |
|
includes/Abstracts/ThemeIntegration.php
CHANGED
@@ -16,14 +16,35 @@ abstract class ThemeIntegration {
|
|
16 |
|
17 |
protected $themeSlug = '';
|
18 |
protected $themeName = '';
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
public function __construct() {
|
21 |
if ( empty( $this->themeName ) || empty( $this->themeSlug ) ) {
|
22 |
return;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$this->maybeOverwriteSearch();
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
28 |
}
|
29 |
|
@@ -39,31 +60,43 @@ abstract class ThemeIntegration {
|
|
39 |
|
40 |
$settings[ $key ][10] = array(
|
41 |
'name' => $this->themeSlug . '_main_head',
|
42 |
-
'label' => sprintf( __( 'Replace
|
43 |
'type' => 'head',
|
44 |
'class' => 'dgwt-wcas-sgs-header'
|
45 |
);
|
46 |
|
47 |
-
$settings[ $key ][52] = array(
|
48 |
-
'name' => $this->themeSlug . '_settings_head',
|
49 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
50 |
-
'type' => 'desc',
|
51 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
52 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
53 |
-
);
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
-
|
61 |
-
'
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
$settings[ $key ][90] = array(
|
69 |
'name' => $this->themeSlug . '_othersways__head',
|
@@ -83,7 +116,9 @@ abstract class ThemeIntegration {
|
|
83 |
protected function canReplaceSearch() {
|
84 |
$canIntegrate = false;
|
85 |
|
86 |
-
if (
|
|
|
|
|
87 |
$canIntegrate = true;
|
88 |
}
|
89 |
|
@@ -96,7 +131,9 @@ abstract class ThemeIntegration {
|
|
96 |
* @return void
|
97 |
*/
|
98 |
protected function maybeOverwriteSearch() {
|
99 |
-
$
|
|
|
|
|
100 |
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
101 |
require_once( $partialPath );
|
102 |
}
|
16 |
|
17 |
protected $themeSlug = '';
|
18 |
protected $themeName = '';
|
19 |
+
protected $args = array();
|
20 |
+
|
21 |
+
public function __construct( $themeSlug = '', $themeName = '', $args = array() ) {
|
22 |
+
$this->themeSlug = $themeSlug;
|
23 |
+
$this->themeName = $themeName;
|
24 |
|
|
|
25 |
if ( empty( $this->themeName ) || empty( $this->themeSlug ) ) {
|
26 |
return;
|
27 |
}
|
28 |
|
29 |
+
$this->args = wp_parse_args( $args, array(
|
30 |
+
'replaceSearchSuffix' => '',
|
31 |
+
'partialFilename' => '',
|
32 |
+
'alwaysEnabled' => false,
|
33 |
+
'whiteLabel' => false
|
34 |
+
) );
|
35 |
+
|
36 |
$this->maybeOverwriteSearch();
|
37 |
|
38 |
+
// Run additional functions on init.
|
39 |
+
if ( is_callable( array( $this, 'init' ) ) ) {
|
40 |
+
$this->init();
|
41 |
+
}
|
42 |
+
|
43 |
+
// Run additional functions besides loading the file with integration.
|
44 |
+
if ( is_callable( array( $this, 'extraFunctions' ) ) && $this->canReplaceSearch() ) {
|
45 |
+
$this->extraFunctions();
|
46 |
+
}
|
47 |
+
|
48 |
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
49 |
}
|
50 |
|
60 |
|
61 |
$settings[ $key ][10] = array(
|
62 |
'name' => $this->themeSlug . '_main_head',
|
63 |
+
'label' => sprintf( __( 'Replace the search bars', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
64 |
'type' => 'head',
|
65 |
'class' => 'dgwt-wcas-sgs-header'
|
66 |
);
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
if ( ! $this->args['whiteLabel'] ) {
|
70 |
+
$settings[ $key ][52] = array(
|
71 |
+
'name' => $this->themeSlug . '_settings_head',
|
72 |
+
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
73 |
+
'type' => 'desc',
|
74 |
+
'desc' => Helpers::embeddingInThemeHtml(),
|
75 |
+
'class' => 'dgwt-wcas-sgs-themes-label',
|
76 |
+
);
|
77 |
+
|
78 |
+
|
79 |
+
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
80 |
+
if ( ! empty( $img ) ) {
|
81 |
+
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
82 |
+
}
|
83 |
}
|
84 |
|
85 |
+
if ( $this->args['whiteLabel'] ) {
|
86 |
+
$replaceDesc = __( "Replace your theme's default search bars.", 'ajax-search-for-woocommerce' ) . $this->args['replaceSearchSuffix'];
|
87 |
+
} else {
|
88 |
+
$replaceDesc = __( 'Replace them', 'ajax-search-for-woocommerce' ) . $this->args['replaceSearchSuffix'];
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( ! $this->args['alwaysEnabled'] ) {
|
92 |
+
$settings[ $key ][55] = array(
|
93 |
+
'name' => $this->themeSlug . '_replace_search',
|
94 |
+
'label' => __( 'Search bars', 'ajax-search-for-woocommerce' ),
|
95 |
+
'desc' => $replaceDesc,
|
96 |
+
'type' => 'checkbox',
|
97 |
+
'default' => 'off',
|
98 |
+
);
|
99 |
+
}
|
100 |
|
101 |
$settings[ $key ][90] = array(
|
102 |
'name' => $this->themeSlug . '_othersways__head',
|
116 |
protected function canReplaceSearch() {
|
117 |
$canIntegrate = false;
|
118 |
|
119 |
+
if ( $this->args['alwaysEnabled'] ) {
|
120 |
+
$canIntegrate = true;
|
121 |
+
} elseif ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
122 |
$canIntegrate = true;
|
123 |
}
|
124 |
|
131 |
* @return void
|
132 |
*/
|
133 |
protected function maybeOverwriteSearch() {
|
134 |
+
$partialFilename = ! empty( $this->args['partialFilename'] ) ? $this->args['partialFilename'] : $this->themeSlug . '.php';
|
135 |
+
$partialPath = DGWT_WCAS_DIR . 'partials/themes/' . $partialFilename;
|
136 |
+
|
137 |
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
138 |
require_once( $partialPath );
|
139 |
}
|
includes/Admin/AdminMenu.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Admin;
|
4 |
|
|
|
5 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
6 |
use DgoraWcas\Settings ;
|
7 |
// Exit if accessed directly
|
@@ -71,6 +72,7 @@ class AdminMenu
|
|
71 |
*/
|
72 |
public function debugPage()
|
73 |
{
|
|
|
74 |
}
|
75 |
|
76 |
}
|
2 |
|
3 |
namespace DgoraWcas\Admin;
|
4 |
|
5 |
+
use DgoraWcas\Engines\TNTSearchMySQL\Config ;
|
6 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
7 |
use DgoraWcas\Settings ;
|
8 |
// Exit if accessed directly
|
72 |
*/
|
73 |
public function debugPage()
|
74 |
{
|
75 |
+
include_once DGWT_WCAS_DIR . 'partials/admin/debug/debug.php';
|
76 |
}
|
77 |
|
78 |
}
|
includes/Admin/Install.php
CHANGED
@@ -2,13 +2,16 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Admin;
|
4 |
|
|
|
5 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
|
|
6 |
// Exit if accessed directly
|
7 |
if ( !defined( 'ABSPATH' ) ) {
|
8 |
exit;
|
9 |
}
|
10 |
class Install
|
11 |
{
|
|
|
12 |
/**
|
13 |
* Call installation callback
|
14 |
*
|
@@ -43,7 +46,7 @@ class Install
|
|
43 |
*
|
44 |
* @return void
|
45 |
*/
|
46 |
-
|
47 |
{
|
48 |
global $dgwtWcasSettings ;
|
49 |
$sections = DGWT_WCAS()->settings->settingsFields();
|
@@ -63,15 +66,39 @@ class Install
|
|
63 |
update_option( DGWT_WCAS_SETTINGS_KEY, $updateOptions );
|
64 |
}
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
67 |
{
|
68 |
-
$
|
|
|
|
|
|
|
|
|
69 |
|
70 |
-
if ( $
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
-
|
|
|
|
|
|
|
75 |
DGWT_WCAS()->settings->clearCache();
|
76 |
}
|
77 |
|
@@ -141,6 +168,32 @@ class Install
|
|
141 |
update_option( DGWT_WCAS_SETTINGS_KEY, $settings );
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
/**
|
145 |
* Save activation timestamp
|
146 |
* Used to display notice, asking for a feedback
|
2 |
|
3 |
namespace DgoraWcas\Admin;
|
4 |
|
5 |
+
use DgoraWcas\Engines\TNTSearchMySQL\Config ;
|
6 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
7 |
+
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Updater ;
|
8 |
// Exit if accessed directly
|
9 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
11 |
}
|
12 |
class Install
|
13 |
{
|
14 |
+
const SETTINGS_VERSION = 2 ;
|
15 |
/**
|
16 |
* Call installation callback
|
17 |
*
|
46 |
*
|
47 |
* @return void
|
48 |
*/
|
49 |
+
public static function createOptions()
|
50 |
{
|
51 |
global $dgwtWcasSettings ;
|
52 |
$sections = DGWT_WCAS()->settings->settingsFields();
|
66 |
update_option( DGWT_WCAS_SETTINGS_KEY, $updateOptions );
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Maybe update settings structure or values
|
71 |
+
*
|
72 |
+
* @param string $version free | pro
|
73 |
+
*/
|
74 |
+
private static function maybeUpgradeOptions( $version = 'free' )
|
75 |
{
|
76 |
+
$freeSettingsVersion = (int) get_option( 'dgwt_wcas_settings_version', 0 );
|
77 |
+
$proSettingsVersion = (int) get_option( 'dgwt_wcas_settings_version_pro', 0 );
|
78 |
+
$mainVersion = $freeSettingsVersion;
|
79 |
+
$mainKey = 'dgwt_wcas_settings_version';
|
80 |
+
$upgraded = false;
|
81 |
|
82 |
+
if ( $version === 'pro' ) {
|
83 |
+
$mainVersion = $proSettingsVersion;
|
84 |
+
$mainKey = 'dgwt_wcas_settings_version_pro';
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
if ( $freeSettingsVersion === 0 && $proSettingsVersion === 0 ) {
|
89 |
+
self::upgradeOptionsTo1();
|
90 |
+
self::upgradeOptionsTo2();
|
91 |
+
$upgraded = true;
|
92 |
+
}
|
93 |
+
|
94 |
+
if ( !$upgraded ) {
|
95 |
+
if ( $version === 'free' && $freeSettingsVersion < 2 && $proSettingsVersion !== 2 || $version === 'pro' && $proSettingsVersion < 2 && $freeSettingsVersion !== 2 ) {
|
96 |
+
self::upgradeOptionsTo2();
|
97 |
}
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( $mainVersion < self::SETTINGS_VERSION ) {
|
101 |
+
update_option( $mainKey, self::SETTINGS_VERSION );
|
102 |
DGWT_WCAS()->settings->clearCache();
|
103 |
}
|
104 |
|
168 |
update_option( DGWT_WCAS_SETTINGS_KEY, $settings );
|
169 |
}
|
170 |
|
171 |
+
/**
|
172 |
+
* Since v1.19.0 we've started to use two separated breakpoints in the search bar layout settings:
|
173 |
+
*
|
174 |
+
* 1. "mobile_breakpoint" - set the breakpoint for switching between icon and search bar layout
|
175 |
+
*
|
176 |
+
* 2. "mobile_overlay_breakpoint" - new option added since v1.19.0.
|
177 |
+
* Set the breakpoint after which the mobile search overlay is activated
|
178 |
+
*
|
179 |
+
* Before v1.19.0 "mobile_breakpoint" was in charge of these two things.
|
180 |
+
* We don't know if users set "mobile_breakpoint" to handle overlay on mobile or icon/bar toggle.
|
181 |
+
* So we have to copy value of "mobile_breakpoint" to "mobile_overlay_breakpoint" to keep backwards compatibility
|
182 |
+
*/
|
183 |
+
private static function upgradeOptionsTo2()
|
184 |
+
{
|
185 |
+
$settings = get_option( DGWT_WCAS_SETTINGS_KEY );
|
186 |
+
if ( empty($settings) ) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
+
|
190 |
+
if ( isset( $settings['mobile_breakpoint'] ) && isset( $settings['mobile_overlay_breakpoint'] ) ) {
|
191 |
+
$settings['mobile_overlay_breakpoint'] = $settings['mobile_breakpoint'];
|
192 |
+
update_option( DGWT_WCAS_SETTINGS_KEY, $settings );
|
193 |
+
}
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
/**
|
198 |
* Save activation timestamp
|
199 |
* Used to display notice, asking for a feedback
|
includes/Admin/Promo/Upgrade.php
CHANGED
@@ -49,13 +49,13 @@ class Upgrade {
|
|
49 |
__( 'Fuzzy search', 'ajax-search-for-woocommerce' ),
|
50 |
__( 'Synonyms', 'ajax-search-for-woocommerce' ),
|
51 |
__( 'Search in attributes and variation products SKUs (option)', 'ajax-search-for-woocommerce' ),
|
52 |
-
__( 'Individual tips and support
|
53 |
);
|
54 |
echo '<a style="display:none;" class="thickbox js-dgwt-wcas-modal-pro-handler" href="#TB_inline?width=600&height=380&inlineId=dgwt-wcas-modal" title="' . __( 'FiboSearch Pro - Upgrade Now', 'ajax-search-for-woocommerce' ) . '"></a>';
|
55 |
echo '<div id="dgwt-wcas-modal" class="dgwt-wcas-modal-upgrade" style="display:none;">';
|
56 |
echo '<img class="dgwt-wcas-modal-logo" src="' . DGWT_WCAS_URL . 'assets/img/logo-128.png" width="128" height="128" />';
|
57 |
echo '
|
58 |
-
<h2 class="dgwt-wcas-modal-title">' . __( 'Update now and increase your sales. You will receive 30-day satisfaction guarantee. A return on investment will come very quickly.', 'ajax-search-for-woocommerce' ) . '</h2>';
|
59 |
echo '<ul>';
|
60 |
foreach ( $features as $feature ) {
|
61 |
echo '<li><strong>+ ' . $feature . '</strong></li>';
|
49 |
__( 'Fuzzy search', 'ajax-search-for-woocommerce' ),
|
50 |
__( 'Synonyms', 'ajax-search-for-woocommerce' ),
|
51 |
__( 'Search in attributes and variation products SKUs (option)', 'ajax-search-for-woocommerce' ),
|
52 |
+
__( 'Individual tips and support from the FiboSearch team', 'ajax-search-for-woocommerce' )
|
53 |
);
|
54 |
echo '<a style="display:none;" class="thickbox js-dgwt-wcas-modal-pro-handler" href="#TB_inline?width=600&height=380&inlineId=dgwt-wcas-modal" title="' . __( 'FiboSearch Pro - Upgrade Now', 'ajax-search-for-woocommerce' ) . '"></a>';
|
55 |
echo '<div id="dgwt-wcas-modal" class="dgwt-wcas-modal-upgrade" style="display:none;">';
|
56 |
echo '<img class="dgwt-wcas-modal-logo" src="' . DGWT_WCAS_URL . 'assets/img/logo-128.png" width="128" height="128" />';
|
57 |
echo '
|
58 |
+
<h2 class="dgwt-wcas-modal-title">' . __( 'Update now and increase your sales. You will receive a 30-day satisfaction guarantee. A return on investment will come very quickly.', 'ajax-search-for-woocommerce' ) . '</h2>';
|
59 |
echo '<ul>';
|
60 |
foreach ( $features as $feature ) {
|
61 |
echo '<li><strong>+ ' . $feature . '</strong></li>';
|
includes/Admin/SettingsAPI.php
CHANGED
@@ -848,9 +848,22 @@ class SettingsAPI
|
|
848 |
|
849 |
//Initiate Color Picker
|
850 |
if ($('.wp-color-picker-field').length > 0) {
|
|
|
851 |
$('.wp-color-picker-field').wpColorPicker({
|
|
|
852 |
change: function (event, ui) {
|
853 |
window.DGWT_WCAS_SEARCH_PREVIEW.onColorChangeHandler($(event.target), ui.color.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
},
|
855 |
});
|
856 |
}
|
848 |
|
849 |
//Initiate Color Picker
|
850 |
if ($('.wp-color-picker-field').length > 0) {
|
851 |
+
var addedClearer = false;
|
852 |
$('.wp-color-picker-field').wpColorPicker({
|
853 |
+
palettes: false,
|
854 |
change: function (event, ui) {
|
855 |
window.DGWT_WCAS_SEARCH_PREVIEW.onColorChangeHandler($(event.target), ui.color.toString());
|
856 |
+
|
857 |
+
//https://github.com/Automattic/Iris/issues/57#issuecomment-899685019
|
858 |
+
if (!addedClearer) {
|
859 |
+
$('.wp-picker-clear').on('click', function () {
|
860 |
+
var $input = $(this).parent('.wp-picker-input-wrap').find('input.wp-color-picker');
|
861 |
+
if($input.length > 0){
|
862 |
+
window.DGWT_WCAS_SEARCH_PREVIEW.onColorChangeHandler($input, '');
|
863 |
+
}
|
864 |
+
});
|
865 |
+
addedClearer = true;
|
866 |
+
}
|
867 |
},
|
868 |
});
|
869 |
}
|
includes/Admin/Troubleshooting.php
CHANGED
@@ -219,11 +219,11 @@ class Troubleshooting
|
|
219 |
$errors = array();
|
220 |
// GTranslate
|
221 |
if ( class_exists( 'GTranslate' ) ) {
|
222 |
-
$errors[] = sprintf( __( 'You
|
223 |
}
|
224 |
// WooCommerce Product Sort and Display
|
225 |
if ( defined( 'WC_PSAD_VERSION' ) ) {
|
226 |
-
$errors[] = sprintf( __( 'You
|
227 |
}
|
228 |
|
229 |
if ( !empty($errors) ) {
|
@@ -299,13 +299,10 @@ class Troubleshooting
|
|
299 |
$linkToDocs = 'https://fibosearch.com/documentation/troubleshooting/the-search-index-could-not-be-built/';
|
300 |
$linkToWpHealth = admin_url( 'site-health.php' );
|
301 |
$result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
|
302 |
-
if ( !dgoraAsfwFs()->is_premium() ) {
|
303 |
-
$result['description'] = __( 'This issue may affect the search results page and e.g. display all products every time', 'ajax-search-for-woocommerce' );
|
304 |
-
}
|
305 |
$result['description'] .= '<h3 class="dgwt-wcas-font-thin">' . __( 'Solutions:', 'ajax-search-for-woocommerce' ) . '</h3>';
|
306 |
$result['description'] .= '<h4>' . __( "Your server can't send an HTTP request to itself", 'ajax-search-for-woocommerce' ) . '</h4>';
|
307 |
$result['description'] .= '<p>' . sprintf( __( 'Go to <a href="%s" target="_blank">Tools -> Site Health</a> in your WordPress. You should see issues related to REST API or Loopback request. Expand descriptions of these errors and follow the instructions. Probably you will need to contact your hosting provider to solve it.', 'ajax-search-for-woocommerce' ), $linkToWpHealth ) . '</p>';
|
308 |
-
$result['description'] .= '<p>' . __( 'Is your website publicly available only for whitelisted IPs? <b>Add your server IP to the whitelist</b>. That’s all. This is a common mistake when access is blocked by a <code>.htaccess</code> file. Developers add a list of allowed IPs, but they forget to add the IP of the server to allow make HTTP requests to itself.', 'ajax-search-for-woocommerce' ) . '</p>';
|
309 |
}
|
310 |
|
311 |
$this->storeResult( $result );
|
@@ -330,9 +327,6 @@ class Troubleshooting
|
|
330 |
if ( !extension_loaded( 'mbstring' ) ) {
|
331 |
$errors[] = sprintf( __( 'Required PHP extension: %s', 'ajax-search-for-woocommerce' ), 'mbstring' );
|
332 |
}
|
333 |
-
if ( !extension_loaded( 'pdo_mysql' ) ) {
|
334 |
-
$errors[] = sprintf( __( 'Required PHP extension: %s', 'ajax-search-for-woocommerce' ), 'pdo_mysql' );
|
335 |
-
}
|
336 |
|
337 |
if ( !empty($errors) ) {
|
338 |
$result['description'] = join( '<br>', $errors );
|
@@ -362,7 +356,7 @@ class Troubleshooting
|
|
362 |
$result['description'] = __( 'Great! Our plugin works great with this version of WordPress.', 'ajax-search-for-woocommerce' );
|
363 |
$result['status'] = 'good';
|
364 |
} else {
|
365 |
-
$result['description'] = __( 'Install the latest version of WordPress for our plugin
|
366 |
$result['status'] = 'critical';
|
367 |
}
|
368 |
|
@@ -397,7 +391,7 @@ class Troubleshooting
|
|
397 |
$ajaxAtcLabel,
|
398 |
$redirectLabel
|
399 |
) . '</p>';
|
400 |
-
$result['description'] .= __( 'Your settings should
|
401 |
$result['description'] .= '<p><img style="max-width: 720px" src="' . DGWT_WCAS_URL . 'assets/img/admin-troubleshooting-atc.png" /></p>';
|
402 |
$result['status'] = 'critical';
|
403 |
}
|
@@ -406,7 +400,53 @@ class Troubleshooting
|
|
406 |
}
|
407 |
|
408 |
/**
|
409 |
-
* Tests if "Searching by Text" extension from WOOF - WooCommerce Products Filter is enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
* It's incompatible with our plugin and should be disabled.
|
411 |
*
|
412 |
* @return array The test result.
|
@@ -431,7 +471,7 @@ class Troubleshooting
|
|
431 |
return $result;
|
432 |
}
|
433 |
$extPaths = array_filter( $extDirs['default'], function ( $path ) {
|
434 |
-
return
|
435 |
} );
|
436 |
if ( empty($extPaths) ) {
|
437 |
return $result;
|
@@ -440,17 +480,49 @@ class Troubleshooting
|
|
440 |
|
441 |
if ( \WOOF_EXT::is_ext_activated( $extPath ) ) {
|
442 |
$settingsUrl = admin_url( 'admin.php?page=wc-settings&tab=woof' );
|
443 |
-
$result['label'] = __( 'Incompatible "
|
444 |
$result['description'] = '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
445 |
-
$result['description'] .= '<p>' . sprintf( __( 'Go to <code>WooCommerce -> Settings -> <a href="%s" target="_blank">Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>
|
446 |
$result['description'] .= __( 'Extensions should looks like the picture below:', 'ajax-search-for-woocommerce' );
|
447 |
-
$result['description'] .= '<p><img style="max-width: 720px" src="' . DGWT_WCAS_URL . 'assets/img/admin-troubleshooting-
|
448 |
$result['status'] = 'critical';
|
449 |
}
|
450 |
|
451 |
return $result;
|
452 |
}
|
453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
/**
|
455 |
* Test if Elementor has defined correct template for search results
|
456 |
*
|
@@ -503,7 +575,7 @@ class Troubleshooting
|
|
503 |
false
|
504 |
);
|
505 |
$templateLink = '<a target="_blank" href="' . admin_url( 'post.php?post=' . $document->get_post()->ID . '&action=elementor' ) . '">' . $document->get_post()->post_title . '</a>';
|
506 |
-
$result['label'] = __( 'There is no correct template in Elementor Theme Builder for the WooCommerce search results page.', 'ajax-search-for-woocommerce' );
|
507 |
$result['description'] = '<p>' . sprintf( __( 'You are using Elementor and we noticed that the template used in the search results page titled <strong>%s</strong> does not include the <strong>Archive Products</strong> widget.', 'ajax-search-for-woocommerce' ), $templateLink ) . '</p>';
|
508 |
$result['description'] .= '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
509 |
$result['description'] .= '<p>' . sprintf( __( 'Add <strong>Archive Products</strong> widget to the template <strong>%s</strong> or create a new template dedicated to the WooCommerce search results page. Learn how to do it in <a href="%s" target="_blank">our documentation</a>.', 'ajax-search-for-woocommerce' ), $templateLink, $linkToDocs ) . '</p>';
|
@@ -543,7 +615,15 @@ class Troubleshooting
|
|
543 |
),
|
544 |
array(
|
545 |
'label' => __( 'Incompatible "Searching by Text" extension in WOOF - WooCommerce Products Filter', 'ajax-search-for-woocommerce' ),
|
|
|
|
|
|
|
|
|
546 |
'test' => 'WoofSearchTextExtension',
|
|
|
|
|
|
|
|
|
547 |
),
|
548 |
array(
|
549 |
'label' => __( 'Elementor search results template', 'ajax-search-for-woocommerce' ),
|
219 |
$errors = array();
|
220 |
// GTranslate
|
221 |
if ( class_exists( 'GTranslate' ) ) {
|
222 |
+
$errors[] = sprintf( __( 'You are using the %s plugin. The %s does not support this plugin.', 'ajax-search-for-woocommerce' ), 'GTranslate', DGWT_WCAS_NAME );
|
223 |
}
|
224 |
// WooCommerce Product Sort and Display
|
225 |
if ( defined( 'WC_PSAD_VERSION' ) ) {
|
226 |
+
$errors[] = sprintf( __( 'You are using the %s plugin. The %s does not support this plugin.', 'ajax-search-for-woocommerce' ), 'WooCommerce Product Sort and Display', DGWT_WCAS_NAME );
|
227 |
}
|
228 |
|
229 |
if ( !empty($errors) ) {
|
299 |
$linkToDocs = 'https://fibosearch.com/documentation/troubleshooting/the-search-index-could-not-be-built/';
|
300 |
$linkToWpHealth = admin_url( 'site-health.php' );
|
301 |
$result['label'] = __( 'Your site could not complete a loopback request', 'ajax-search-for-woocommerce' );
|
|
|
|
|
|
|
302 |
$result['description'] .= '<h3 class="dgwt-wcas-font-thin">' . __( 'Solutions:', 'ajax-search-for-woocommerce' ) . '</h3>';
|
303 |
$result['description'] .= '<h4>' . __( "Your server can't send an HTTP request to itself", 'ajax-search-for-woocommerce' ) . '</h4>';
|
304 |
$result['description'] .= '<p>' . sprintf( __( 'Go to <a href="%s" target="_blank">Tools -> Site Health</a> in your WordPress. You should see issues related to REST API or Loopback request. Expand descriptions of these errors and follow the instructions. Probably you will need to contact your hosting provider to solve it.', 'ajax-search-for-woocommerce' ), $linkToWpHealth ) . '</p>';
|
305 |
+
$result['description'] .= '<p>' . __( 'Is your website publicly available only for whitelisted IPs? <b>Add your server IP to the whitelist</b>. That’s all. This is a common mistake when access is blocked by a <code>.htaccess</code> file. Developers add a list of allowed IPs, but they forget to add the IP of the server to allow it to make HTTP requests to itself.', 'ajax-search-for-woocommerce' ) . '</p>';
|
306 |
}
|
307 |
|
308 |
$this->storeResult( $result );
|
327 |
if ( !extension_loaded( 'mbstring' ) ) {
|
328 |
$errors[] = sprintf( __( 'Required PHP extension: %s', 'ajax-search-for-woocommerce' ), 'mbstring' );
|
329 |
}
|
|
|
|
|
|
|
330 |
|
331 |
if ( !empty($errors) ) {
|
332 |
$result['description'] = join( '<br>', $errors );
|
356 |
$result['description'] = __( 'Great! Our plugin works great with this version of WordPress.', 'ajax-search-for-woocommerce' );
|
357 |
$result['status'] = 'good';
|
358 |
} else {
|
359 |
+
$result['description'] = __( 'Install the latest version of WordPress for our plugin for optimal performance!', 'ajax-search-for-woocommerce' );
|
360 |
$result['status'] = 'critical';
|
361 |
}
|
362 |
|
391 |
$ajaxAtcLabel,
|
392 |
$redirectLabel
|
393 |
) . '</p>';
|
394 |
+
$result['description'] .= __( 'Your settings should look like the picture below:', 'ajax-search-for-woocommerce' );
|
395 |
$result['description'] .= '<p><img style="max-width: 720px" src="' . DGWT_WCAS_URL . 'assets/img/admin-troubleshooting-atc.png" /></p>';
|
396 |
$result['status'] = 'critical';
|
397 |
}
|
400 |
}
|
401 |
|
402 |
/**
|
403 |
+
* Tests if "Searching by Text (old version)" extension from WOOF - WooCommerce Products Filter is enabled.
|
404 |
+
* It's incompatible with our plugin and should be disabled.
|
405 |
+
*
|
406 |
+
* @return array The test result.
|
407 |
+
*/
|
408 |
+
public function getTestWoofSearchText2Extension()
|
409 |
+
{
|
410 |
+
$result = array(
|
411 |
+
'label' => '',
|
412 |
+
'status' => 'good',
|
413 |
+
'description' => '',
|
414 |
+
'actions' => '',
|
415 |
+
'test' => 'WoofSearchText2Extension',
|
416 |
+
);
|
417 |
+
if ( !defined( 'WOOF_VERSION' ) || !isset( $GLOBALS['WOOF'] ) ) {
|
418 |
+
return $result;
|
419 |
+
}
|
420 |
+
if ( !method_exists( 'WOOF_EXT', 'is_ext_activated' ) ) {
|
421 |
+
return $result;
|
422 |
+
}
|
423 |
+
$extDirs = $GLOBALS['WOOF']->get_ext_directories();
|
424 |
+
if ( empty($extDirs['default']) ) {
|
425 |
+
return $result;
|
426 |
+
}
|
427 |
+
$extPaths = array_filter( $extDirs['default'], function ( $path ) {
|
428 |
+
return Helpers::endsWith( $path, 'ext/by_text_2' );
|
429 |
+
} );
|
430 |
+
if ( empty($extPaths) ) {
|
431 |
+
return $result;
|
432 |
+
}
|
433 |
+
$extPath = array_shift( $extPaths );
|
434 |
+
|
435 |
+
if ( \WOOF_EXT::is_ext_activated( $extPath ) ) {
|
436 |
+
$settingsUrl = admin_url( 'admin.php?page=wc-settings&tab=woof' );
|
437 |
+
$result['label'] = __( 'Incompatible "Searching by Text" extension from "WOOF - WooCommerce Products Filter plugin" is active', 'ajax-search-for-woocommerce' );
|
438 |
+
$result['description'] = '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
439 |
+
$result['description'] .= '<p>' . sprintf( __( 'Go to <code>WooCommerce -> Settings -> <a href="%s" target="_blank">Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>Searching by Text</code> extension and save changes.', 'ajax-search-for-woocommerce' ), $settingsUrl ) . '</p>';
|
440 |
+
$result['description'] .= __( 'Extensions should looks like the picture below:', 'ajax-search-for-woocommerce' );
|
441 |
+
$result['description'] .= '<p><img style="max-width: 720px" src="' . DGWT_WCAS_URL . 'assets/img/admin-troubleshooting-woof.png?rev=2" /></p>';
|
442 |
+
$result['status'] = 'critical';
|
443 |
+
}
|
444 |
+
|
445 |
+
return $result;
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Tests if "HUSKY - Advanced searching by Text" extension from WOOF - WooCommerce Products Filter is enabled.
|
450 |
* It's incompatible with our plugin and should be disabled.
|
451 |
*
|
452 |
* @return array The test result.
|
471 |
return $result;
|
472 |
}
|
473 |
$extPaths = array_filter( $extDirs['default'], function ( $path ) {
|
474 |
+
return Helpers::endsWith( $path, 'ext/by_text' );
|
475 |
} );
|
476 |
if ( empty($extPaths) ) {
|
477 |
return $result;
|
480 |
|
481 |
if ( \WOOF_EXT::is_ext_activated( $extPath ) ) {
|
482 |
$settingsUrl = admin_url( 'admin.php?page=wc-settings&tab=woof' );
|
483 |
+
$result['label'] = __( 'Incompatible "HUSKY - Advanced searching by Text" extension from "WOOF - WooCommerce Products Filter plugin" is active', 'ajax-search-for-woocommerce' );
|
484 |
$result['description'] = '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
485 |
+
$result['description'] .= '<p>' . sprintf( __( 'Go to <code>WooCommerce -> Settings -> <a href="%s" target="_blank">Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>HUSKY - Advanced searching by Text</code> extension and save changes.', 'ajax-search-for-woocommerce' ), $settingsUrl ) . '</p>';
|
486 |
$result['description'] .= __( 'Extensions should looks like the picture below:', 'ajax-search-for-woocommerce' );
|
487 |
+
$result['description'] .= '<p><img style="max-width: 720px" src="' . DGWT_WCAS_URL . 'assets/img/admin-troubleshooting-woof2.png" /></p>';
|
488 |
$result['status'] = 'critical';
|
489 |
}
|
490 |
|
491 |
return $result;
|
492 |
}
|
493 |
|
494 |
+
/**
|
495 |
+
* Tests if "Try to ajaxify the shop" option from WOOF - WooCommerce Products Filter is enabled.
|
496 |
+
* It's incompatible with our plugin and should be disabled.
|
497 |
+
*
|
498 |
+
* @return array The test result.
|
499 |
+
*/
|
500 |
+
public function getTestWoofTryToAjaxifyOption()
|
501 |
+
{
|
502 |
+
$result = array(
|
503 |
+
'label' => '',
|
504 |
+
'status' => 'good',
|
505 |
+
'description' => '',
|
506 |
+
'actions' => '',
|
507 |
+
'test' => 'WoofTryToAjaxifyOption',
|
508 |
+
);
|
509 |
+
if ( !defined( 'WOOF_VERSION' ) ) {
|
510 |
+
return $result;
|
511 |
+
}
|
512 |
+
if ( version_compare( WOOF_VERSION, '1.2.3' ) < 0 ) {
|
513 |
+
return $result;
|
514 |
+
}
|
515 |
+
if ( !get_option( 'woof_try_ajax', 0 ) ) {
|
516 |
+
return $result;
|
517 |
+
}
|
518 |
+
$settingsUrl = admin_url( 'admin.php?page=wc-settings&tab=woof' );
|
519 |
+
$result['label'] = __( 'Incompatible "Try to ajaxify the shop" option from WOOF - WooCommerce Products Filter plugin is enabled', 'ajax-search-for-woocommerce' );
|
520 |
+
$result['description'] = '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
521 |
+
$result['description'] .= '<p>' . sprintf( __( 'Go to <code>WooCommerce -> Settings -> <a href="%s" target="_blank">Products Filter (tab)</a> -> Options (tab)</code>, set <code>Try to ajaxify the shop</code> option to <code>No</code> and save changes.', 'ajax-search-for-woocommerce' ), $settingsUrl ) . '</p>';
|
522 |
+
$result['status'] = 'critical';
|
523 |
+
return $result;
|
524 |
+
}
|
525 |
+
|
526 |
/**
|
527 |
* Test if Elementor has defined correct template for search results
|
528 |
*
|
575 |
false
|
576 |
);
|
577 |
$templateLink = '<a target="_blank" href="' . admin_url( 'post.php?post=' . $document->get_post()->ID . '&action=elementor' ) . '">' . $document->get_post()->post_title . '</a>';
|
578 |
+
$result['label'] = __( 'There is no correct template in the Elementor Theme Builder for the WooCommerce search results page.', 'ajax-search-for-woocommerce' );
|
579 |
$result['description'] = '<p>' . sprintf( __( 'You are using Elementor and we noticed that the template used in the search results page titled <strong>%s</strong> does not include the <strong>Archive Products</strong> widget.', 'ajax-search-for-woocommerce' ), $templateLink ) . '</p>';
|
580 |
$result['description'] .= '<p><b>' . __( 'Solution', 'ajax-search-for-woocommerce' ) . '</b></p>';
|
581 |
$result['description'] .= '<p>' . sprintf( __( 'Add <strong>Archive Products</strong> widget to the template <strong>%s</strong> or create a new template dedicated to the WooCommerce search results page. Learn how to do it in <a href="%s" target="_blank">our documentation</a>.', 'ajax-search-for-woocommerce' ), $templateLink, $linkToDocs ) . '</p>';
|
615 |
),
|
616 |
array(
|
617 |
'label' => __( 'Incompatible "Searching by Text" extension in WOOF - WooCommerce Products Filter', 'ajax-search-for-woocommerce' ),
|
618 |
+
'test' => 'WoofSearchText2Extension',
|
619 |
+
),
|
620 |
+
array(
|
621 |
+
'label' => __( 'Incompatible "HUSKY - Advanced searching by Text" extension in WOOF - WooCommerce Products Filter', 'ajax-search-for-woocommerce' ),
|
622 |
'test' => 'WoofSearchTextExtension',
|
623 |
+
),
|
624 |
+
array(
|
625 |
+
'label' => __( 'Incompatible "Try to ajaxify the shop" option in WOOF - WooCommerce Products Filter', 'ajax-search-for-woocommerce' ),
|
626 |
+
'test' => 'WoofTryToAjaxifyOption',
|
627 |
),
|
628 |
array(
|
629 |
'label' => __( 'Elementor search results template', 'ajax-search-for-woocommerce' ),
|
includes/Analytics/Analytics.php
CHANGED
@@ -16,7 +16,7 @@ class Analytics {
|
|
16 |
|
17 |
// Publish this module conditionally in v1.18.0 and for everyone in v1.19.0
|
18 |
if ( ! $this->isModuleEnabled()
|
19 |
-
&& version_compare( DGWT_WCAS_VERSION, '1.
|
20 |
&& ! $allowByConstant
|
21 |
) {
|
22 |
return;
|
16 |
|
17 |
// Publish this module conditionally in v1.18.0 and for everyone in v1.19.0
|
18 |
if ( ! $this->isModuleEnabled()
|
19 |
+
&& version_compare( DGWT_WCAS_VERSION, '1.18.99' ) < 0
|
20 |
&& ! $allowByConstant
|
21 |
) {
|
22 |
return;
|
includes/Analytics/UserInterface.php
CHANGED
@@ -356,7 +356,7 @@ class UserInterface
|
|
356 |
case 'with-results':
|
357 |
$html = '<p>';
|
358 |
$html .= '<b class="dgwt-wcas-analytics-text-good">' . __( "Perfect!", 'ajax-search-for-woocommerce' ) . '</b>';
|
359 |
-
$html .= ' ' . __( "It's
|
360 |
$html .= ' ' . sprintf( _n(
|
361 |
"This phrase returns 1 product.",
|
362 |
"This phrase returns %d products.",
|
@@ -369,7 +369,7 @@ class UserInterface
|
|
369 |
break;
|
370 |
case 'without-results':
|
371 |
$html = '<p>';
|
372 |
-
$html .= '<b class="dgwt-wcas-analytics-text-poorly">' . __( "
|
373 |
$html .= ' ' . __( "Still this phrase doesn't return any results. Learn how to fix it.", 'ajax-search-for-woocommerce' );
|
374 |
$html .= '</p>';
|
375 |
break;
|
@@ -408,7 +408,7 @@ class UserInterface
|
|
408 |
$data->setLang( $lang );
|
409 |
}
|
410 |
if ( $data->markAsSolved( $phrase ) ) {
|
411 |
-
wp_send_json_success( '<p>' . __( 'This phrase has been
|
412 |
}
|
413 |
}
|
414 |
|
356 |
case 'with-results':
|
357 |
$html = '<p>';
|
358 |
$html .= '<b class="dgwt-wcas-analytics-text-good">' . __( "Perfect!", 'ajax-search-for-woocommerce' ) . '</b>';
|
359 |
+
$html .= ' ' . __( "It's sorted.", 'ajax-search-for-woocommerce' );
|
360 |
$html .= ' ' . sprintf( _n(
|
361 |
"This phrase returns 1 product.",
|
362 |
"This phrase returns %d products.",
|
369 |
break;
|
370 |
case 'without-results':
|
371 |
$html = '<p>';
|
372 |
+
$html .= '<b class="dgwt-wcas-analytics-text-poorly">' . __( "Poor!", 'ajax-search-for-woocommerce' ) . '</b>';
|
373 |
$html .= ' ' . __( "Still this phrase doesn't return any results. Learn how to fix it.", 'ajax-search-for-woocommerce' );
|
374 |
$html .= '</p>';
|
375 |
break;
|
408 |
$data->setLang( $lang );
|
409 |
}
|
410 |
if ( $data->markAsSolved( $phrase ) ) {
|
411 |
+
wp_send_json_success( '<p>' . __( 'This phrase has been resolved! This row will disappear after refreshing the page.', 'ajax-search-for-woocommerce' ) . '</p>' );
|
412 |
}
|
413 |
}
|
414 |
|
includes/EmbeddingViaMenu.php
CHANGED
@@ -125,15 +125,15 @@ class EmbeddingViaMenu {
|
|
125 |
$args = '';
|
126 |
$style = '';
|
127 |
$layout = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_layout', true );
|
128 |
-
if ( in_array( $layout, array( 'classic', 'icon', 'icon-flexible' ) ) ) {
|
129 |
$args .= 'layout="' . $layout . '" ';
|
130 |
}
|
131 |
$searchIconColor = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_search_icon_color', true );
|
132 |
-
if ( in_array( $layout, array( 'icon', 'icon-flexible' ) ) && ! empty( $searchIconColor ) ) {
|
133 |
$args .= 'class="dgwt-wcas-menu-item-' . $item->ID . ' " ';
|
134 |
$style = sprintf( '<style>.dgwt-wcas-menu-item-%d .dgwt-wcas-ico-magnifier-handler path {fill: %s;}</style>', $item->ID, esc_attr( $searchIconColor ) );
|
135 |
}
|
136 |
-
$itemOutput = do_shortcode( sprintf( '[
|
137 |
}
|
138 |
|
139 |
return $itemOutput;
|
@@ -153,7 +153,7 @@ class EmbeddingViaMenu {
|
|
153 |
<li>
|
154 |
<label class="menu-item-title">
|
155 |
<input type="checkbox" class="menu-item-checkbox" name="menu-item[-1][menu-item-object-id]"
|
156 |
-
|
157 |
</label>
|
158 |
<input type="hidden" class="menu-item-type" name="menu-item[-1][menu-item-type]" value="custom"/>
|
159 |
<input type="hidden" class="menu-item-title" name="menu-item[-1][menu-item-title]" value="<?php echo self::SEARCH_PLACEHOLDER; ?>"/>
|
@@ -164,7 +164,7 @@ class EmbeddingViaMenu {
|
|
164 |
<p class="button-controls">
|
165 |
<span class="add-to-menu">
|
166 |
<button type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to menu', 'woocommerce' ); ?>"
|
167 |
-
|
168 |
<span class="spinner"></span>
|
169 |
</span>
|
170 |
</p>
|
@@ -183,10 +183,11 @@ class EmbeddingViaMenu {
|
|
183 |
|
184 |
public function getLayoutOptions() {
|
185 |
return array(
|
186 |
-
'default'
|
187 |
-
'classic'
|
188 |
-
'icon'
|
189 |
-
'icon-flexible'
|
|
|
190 |
);
|
191 |
}
|
192 |
|
125 |
$args = '';
|
126 |
$style = '';
|
127 |
$layout = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_layout', true );
|
128 |
+
if ( in_array( $layout, array( 'classic', 'icon', 'icon-flexible', 'icon-flexible-inv' ) ) ) {
|
129 |
$args .= 'layout="' . $layout . '" ';
|
130 |
}
|
131 |
$searchIconColor = get_post_meta( $item->ID, '_menu_item_dgwt_wcas_search_icon_color', true );
|
132 |
+
if ( in_array( $layout, array( 'icon', 'icon-flexible', 'icon-flexible-inv' ) ) && ! empty( $searchIconColor ) ) {
|
133 |
$args .= 'class="dgwt-wcas-menu-item-' . $item->ID . ' " ';
|
134 |
$style = sprintf( '<style>.dgwt-wcas-menu-item-%d .dgwt-wcas-ico-magnifier-handler path {fill: %s;}</style>', $item->ID, esc_attr( $searchIconColor ) );
|
135 |
}
|
136 |
+
$itemOutput = do_shortcode( sprintf( '[fibosearch %s]', $args ) ) . $style;
|
137 |
}
|
138 |
|
139 |
return $itemOutput;
|
153 |
<li>
|
154 |
<label class="menu-item-title">
|
155 |
<input type="checkbox" class="menu-item-checkbox" name="menu-item[-1][menu-item-object-id]"
|
156 |
+
value="-1"/> <?php echo __( 'FiboSearch bar', 'ajax-search-for-woocommerce' ); ?>
|
157 |
</label>
|
158 |
<input type="hidden" class="menu-item-type" name="menu-item[-1][menu-item-type]" value="custom"/>
|
159 |
<input type="hidden" class="menu-item-title" name="menu-item[-1][menu-item-title]" value="<?php echo self::SEARCH_PLACEHOLDER; ?>"/>
|
164 |
<p class="button-controls">
|
165 |
<span class="add-to-menu">
|
166 |
<button type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e( 'Add to menu', 'woocommerce' ); ?>"
|
167 |
+
name="add-post-type-menu-item" id="submit-posttype-dgwt-wcas-endpoints"><?php esc_html_e( 'Add to menu', 'woocommerce' ); ?></button>
|
168 |
<span class="spinner"></span>
|
169 |
</span>
|
170 |
</p>
|
183 |
|
184 |
public function getLayoutOptions() {
|
185 |
return array(
|
186 |
+
'default' => __( 'Default', 'ajax-search-for-woocommerce' ),
|
187 |
+
'classic' => __( 'Search bar', 'ajax-search-for-woocommerce' ),
|
188 |
+
'icon' => __( 'Search icon', 'ajax-search-for-woocommerce' ),
|
189 |
+
'icon-flexible' => __( 'Icon on mobile, search bar on desktop', 'ajax-search-for-woocommerce' ),
|
190 |
+
'icon-flexible-inv' => __( 'Icon on desktop, search bar on mobile', 'ajax-search-for-woocommerce' ),
|
191 |
);
|
192 |
}
|
193 |
|
includes/Helpers.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
namespace DgoraWcas;
|
4 |
|
5 |
-
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
6 |
use DgoraWcas\Engines\TNTSearchMySQL\SearchQuery\SearchResultsPageQuery ;
|
7 |
use DgoraWcas\Integrations\Solver ;
|
8 |
// Exit if accessed directly
|
@@ -70,8 +69,9 @@ class Helpers
|
|
70 |
if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
|
71 |
$classes[] = 'dgwt-wcas-is-detail-box';
|
72 |
}
|
|
|
73 |
|
74 |
-
if (
|
75 |
$classes[] = 'dgwt-wcas-has-submit';
|
76 |
} else {
|
77 |
$classes[] = 'dgwt-wcas-no-submit';
|
@@ -81,6 +81,12 @@ class Helpers
|
|
81 |
$classes[] = esc_html( $args['class'] );
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
if ( !empty($args['layout']) ) {
|
85 |
$type = esc_html( $args['layout'] );
|
86 |
$classes[] = 'js-dgwt-wcas-layout-' . $type . ' dgwt-wcas-layout-' . $type;
|
@@ -250,6 +256,90 @@ class Helpers
|
|
250 |
</svg>
|
251 |
<?php
|
252 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
}
|
254 |
$svg .= ob_get_clean();
|
255 |
return apply_filters(
|
@@ -1055,6 +1145,9 @@ class Helpers
|
|
1055 |
*/
|
1056 |
public static function localDate( $timestamp, $format = '' )
|
1057 |
{
|
|
|
|
|
|
|
1058 |
if ( empty($format) ) {
|
1059 |
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
1060 |
}
|
@@ -1245,16 +1338,22 @@ class Helpers
|
|
1245 |
*/
|
1246 |
public static function getLayoutSettings()
|
1247 |
{
|
1248 |
-
$
|
|
|
|
|
|
|
1249 |
$layout = array(
|
1250 |
-
'
|
1251 |
-
'
|
1252 |
-
'
|
1253 |
-
'
|
1254 |
-
'
|
|
|
|
|
|
|
1255 |
);
|
1256 |
-
if (
|
1257 |
-
$layout['
|
1258 |
}
|
1259 |
return (object) $layout;
|
1260 |
}
|
@@ -1278,7 +1377,7 @@ class Helpers
|
|
1278 |
'action_get_prices' => DGWT_WCAS_GET_PRICES_ACTION,
|
1279 |
'min_chars' => 3,
|
1280 |
'width' => 'auto',
|
1281 |
-
'
|
1282 |
'show_images' => false,
|
1283 |
'show_price' => false,
|
1284 |
'show_desc' => false,
|
@@ -1292,7 +1391,8 @@ class Helpers
|
|
1292 |
'taxonomy_brands' => '',
|
1293 |
'img_url' => DGWT_WCAS_URL . 'assets/img/',
|
1294 |
'is_premium' => dgoraAsfwFs()->is_premium(),
|
1295 |
-
'
|
|
|
1296 |
'mobile_overlay_wrapper' => $layout->mobile_overlay_wrapper,
|
1297 |
'mobile_overlay_delay' => apply_filters( 'dgwt/wcas/scripts/overlay_delay_ms', 0 ),
|
1298 |
'debounce_wait_ms' => apply_filters( 'dgwt/wcas/scripts/debounce_wait_ms', 400 ),
|
@@ -1302,12 +1402,25 @@ class Helpers
|
|
1302 |
'close_icon' => self::getIcon( 'close' ),
|
1303 |
'back_icon' => self::getIcon( 'arrow-left' ),
|
1304 |
'preloader_icon' => self::getIcon( 'preloader' ),
|
|
|
|
|
|
|
1305 |
'custom_params' => (object) apply_filters( 'dgwt/wcas/scripts/custom_params', array() ),
|
1306 |
'convert_html' => true,
|
1307 |
'suggestions_wrapper' => apply_filters( 'dgwt/wcas/scripts/suggestions_wrapper', 'body' ),
|
1308 |
'show_product_vendor' => dgoraAsfwFs()->is_premium() && class_exists( 'DgoraWcas\\Integrations\\Marketplace\\Marketplace' ) && DGWT_WCAS()->marketplace->showProductVendor(),
|
1309 |
'disable_hits' => apply_filters( 'dgwt/wcas/scripts/disable_hits', false ),
|
1310 |
'disable_submit' => apply_filters( 'dgwt/wcas/scripts/disable_submit', false ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1311 |
);
|
1312 |
if ( Multilingual::isMultilingual() ) {
|
1313 |
$localize['current_lang'] = Multilingual::getCurrentLanguage();
|
@@ -1323,7 +1436,7 @@ class Helpers
|
|
1323 |
}
|
1324 |
// Show/hide Details panel
|
1325 |
if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
|
1326 |
-
$localize['
|
1327 |
}
|
1328 |
// Show/hide images
|
1329 |
if ( DGWT_WCAS()->settings->getOption( 'show_product_image' ) === 'on' ) {
|
@@ -1633,5 +1746,19 @@ class Helpers
|
|
1633 |
}
|
1634 |
return apply_filters( 'dgwt/wcas/db/collation/sql', $sql, $context );
|
1635 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1636 |
|
1637 |
}
|
2 |
|
3 |
namespace DgoraWcas;
|
4 |
|
|
|
5 |
use DgoraWcas\Engines\TNTSearchMySQL\SearchQuery\SearchResultsPageQuery ;
|
6 |
use DgoraWcas\Integrations\Solver ;
|
7 |
// Exit if accessed directly
|
69 |
if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
|
70 |
$classes[] = 'dgwt-wcas-is-detail-box';
|
71 |
}
|
72 |
+
$hasSubmit = ( isset( $args['submit_btn'] ) ? $args['submit_btn'] : DGWT_WCAS()->settings->getOption( 'show_submit_button' ) );
|
73 |
|
74 |
+
if ( $hasSubmit === 'on' ) {
|
75 |
$classes[] = 'dgwt-wcas-has-submit';
|
76 |
} else {
|
77 |
$classes[] = 'dgwt-wcas-no-submit';
|
81 |
$classes[] = esc_html( $args['class'] );
|
82 |
}
|
83 |
|
84 |
+
if ( !empty($args['style']) ) {
|
85 |
+
$type = esc_html( $args['style'] );
|
86 |
+
$classes[] = 'dgwt-wcas-style-' . $type;
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
if ( !empty($args['layout']) ) {
|
91 |
$type = esc_html( $args['layout'] );
|
92 |
$classes[] = 'js-dgwt-wcas-layout-' . $type . ' dgwt-wcas-layout-' . $type;
|
256 |
</svg>
|
257 |
<?php
|
258 |
break;
|
259 |
+
case 'voice-search-inactive':
|
260 |
+
$color = ( empty($color) ? '#444' : $color );
|
261 |
+
?>
|
262 |
+
<svg class="<?php
|
263 |
+
echo $class ;
|
264 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24"
|
265 |
+
width="24">
|
266 |
+
<path fill="<?php
|
267 |
+
echo $color ;
|
268 |
+
?>"
|
269 |
+
d="M12 13Q11.15 13 10.575 12.425Q10 11.85 10 11V5Q10 4.15 10.575 3.575Q11.15 3 12 3Q12.85 3 13.425 3.575Q14 4.15 14 5V11Q14 11.85 13.425 12.425Q12.85 13 12 13ZM12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8Q12 8 12 8ZM11.5 20.5V16.975Q9.15 16.775 7.575 15.062Q6 13.35 6 11H7Q7 13.075 8.463 14.537Q9.925 16 12 16Q14.075 16 15.538 14.537Q17 13.075 17 11H18Q18 13.35 16.425 15.062Q14.85 16.775 12.5 16.975V20.5ZM12 12Q12.425 12 12.713 11.712Q13 11.425 13 11V5Q13 4.575 12.713 4.287Q12.425 4 12 4Q11.575 4 11.288 4.287Q11 4.575 11 5V11Q11 11.425 11.288 11.712Q11.575 12 12 12Z"/>
|
270 |
+
</svg>
|
271 |
+
<?php
|
272 |
+
break;
|
273 |
+
case 'voice-search-inactive-pirx':
|
274 |
+
// https://fonts.google.com/icons Icon: Mic Fill: 0 Weight: 400 Grade: 0 Optical size: 24
|
275 |
+
$color = ( empty($color) ? '#444' : $color );
|
276 |
+
?>
|
277 |
+
<svg class="<?php
|
278 |
+
echo $class ;
|
279 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24" width="24">
|
280 |
+
<path fill="<?php
|
281 |
+
echo $color ;
|
282 |
+
?>"
|
283 |
+
d="M12 14q-1.25 0-2.125-.875T9 11V5q0-1.25.875-2.125T12 2q1.25 0 2.125.875T15 5v6q0 1.25-.875 2.125T12 14Zm0-6Zm-1 13v-3.075q-2.6-.35-4.3-2.325Q5 13.625 5 11h2q0 2.075 1.463 3.537Q9.925 16 12 16t3.538-1.463Q17 13.075 17 11h2q0 2.625-1.7 4.6-1.7 1.975-4.3 2.325V21Zm1-9q.425 0 .713-.288Q13 11.425 13 11V5q0-.425-.287-.713Q12.425 4 12 4t-.712.287Q11 4.575 11 5v6q0 .425.288.712.287.288.712.288Z"/>
|
284 |
+
</svg>
|
285 |
+
<?php
|
286 |
+
break;
|
287 |
+
case 'voice-search-active':
|
288 |
+
$color = ( empty($color) ? '#444' : $color );
|
289 |
+
?>
|
290 |
+
<svg class="<?php
|
291 |
+
echo $class ;
|
292 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24"
|
293 |
+
width="24">
|
294 |
+
<path fill="<?php
|
295 |
+
echo $color ;
|
296 |
+
?>"
|
297 |
+
d="M12 13Q11.15 13 10.575 12.425Q10 11.85 10 11V5Q10 4.15 10.575 3.575Q11.15 3 12 3Q12.85 3 13.425 3.575Q14 4.15 14 5V11Q14 11.85 13.425 12.425Q12.85 13 12 13ZM11.5 20.5V16.975Q9.15 16.775 7.575 15.062Q6 13.35 6 11H7Q7 13.075 8.463 14.537Q9.925 16 12 16Q14.075 16 15.538 14.537Q17 13.075 17 11H18Q18 13.35 16.425 15.062Q14.85 16.775 12.5 16.975V20.5Z"/>
|
298 |
+
</svg>
|
299 |
+
<?php
|
300 |
+
break;
|
301 |
+
case 'voice-search-active-pirx':
|
302 |
+
// https://fonts.google.com/icons Icon: Mic Fill: 1 Weight: 400 Grade: 0 Optical size: 24
|
303 |
+
$color = ( empty($color) ? '#444' : $color );
|
304 |
+
?>
|
305 |
+
<svg class="<?php
|
306 |
+
echo $class ;
|
307 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24"
|
308 |
+
width="24">
|
309 |
+
<path fill="<?php
|
310 |
+
echo $color ;
|
311 |
+
?>"
|
312 |
+
d="M12 14q-1.25 0-2.125-.875T9 11V5q0-1.25.875-2.125T12 2q1.25 0 2.125.875T15 5v6q0 1.25-.875 2.125T12 14Zm-1 7v-3.075q-2.6-.35-4.3-2.325Q5 13.625 5 11h2q0 2.075 1.463 3.537Q9.925 16 12 16t3.538-1.463Q17 13.075 17 11h2q0 2.625-1.7 4.6-1.7 1.975-4.3 2.325V21Z"/>
|
313 |
+
</svg>
|
314 |
+
<?php
|
315 |
+
break;
|
316 |
+
case 'voice-search-disabled':
|
317 |
+
$color = ( empty($color) ? '#444' : $color );
|
318 |
+
?>
|
319 |
+
<svg class="<?php
|
320 |
+
echo $class ;
|
321 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24" width="24">
|
322 |
+
<path fill="<?php
|
323 |
+
echo $color ;
|
324 |
+
?>"
|
325 |
+
d="M16.725 13.4 15.975 12.625Q16.1 12.325 16.2 11.9Q16.3 11.475 16.3 11H17.3Q17.3 11.75 17.138 12.337Q16.975 12.925 16.725 13.4ZM13.25 9.9 9.3 5.925V5Q9.3 4.15 9.875 3.575Q10.45 3 11.3 3Q12.125 3 12.713 3.575Q13.3 4.15 13.3 5V9.7Q13.3 9.75 13.275 9.8Q13.25 9.85 13.25 9.9ZM10.8 20.5V17.025Q8.45 16.775 6.875 15.062Q5.3 13.35 5.3 11H6.3Q6.3 13.075 7.763 14.537Q9.225 16 11.3 16Q12.375 16 13.312 15.575Q14.25 15.15 14.925 14.4L15.625 15.125Q14.9 15.9 13.913 16.4Q12.925 16.9 11.8 17.025V20.5ZM19.925 20.825 1.95 2.85 2.675 2.15 20.65 20.125Z"/>
|
326 |
+
</svg>
|
327 |
+
<?php
|
328 |
+
break;
|
329 |
+
case 'voice-search-disabled-pirx':
|
330 |
+
// https://fonts.google.com/icons Icon: Mic Off Fill: 1 Weight: 400 Grade: 0 Optical size: 24
|
331 |
+
$color = ( empty($color) ? '#444' : $color );
|
332 |
+
?>
|
333 |
+
<svg class="<?php
|
334 |
+
echo $class ;
|
335 |
+
?>" xmlns="http://www.w3.org/2000/svg" height="24" width="24">
|
336 |
+
<path fill="<?php
|
337 |
+
echo $color ;
|
338 |
+
?>"
|
339 |
+
d="M17.75 14.95 16.3 13.5q.35-.575.525-1.2Q17 11.675 17 11h2q0 1.1-.325 2.087-.325.988-.925 1.863Zm-2.95-3L9 6.15V5q0-1.25.875-2.125T12 2q1.25 0 2.125.875T15 5v6q0 .275-.062.5-.063.225-.138.45ZM11 21v-3.1q-2.6-.35-4.3-2.312Q5 13.625 5 11h2q0 2.075 1.463 3.537Q9.925 16 12 16q.85 0 1.613-.262.762-.263 1.387-.738l1.425 1.425q-.725.575-1.587.962-.863.388-1.838.513V21Zm8.8 1.6L1.4 4.2l1.4-1.4 18.4 18.4Z"/>
|
340 |
+
</svg>
|
341 |
+
<?php
|
342 |
+
break;
|
343 |
}
|
344 |
$svg .= ob_get_clean();
|
345 |
return apply_filters(
|
1145 |
*/
|
1146 |
public static function localDate( $timestamp, $format = '' )
|
1147 |
{
|
1148 |
+
if ( empty($timestamp) ) {
|
1149 |
+
return '';
|
1150 |
+
}
|
1151 |
if ( empty($format) ) {
|
1152 |
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
1153 |
}
|
1338 |
*/
|
1339 |
public static function getLayoutSettings()
|
1340 |
{
|
1341 |
+
$layoutBreakpoint = DGWT_WCAS()->settings->getOption( 'mobile_breakpoint', 992 );
|
1342 |
+
$layoutBreakpoint = apply_filters( 'dgwt/wcas/scripts/mobile_breakpoint', $layoutBreakpoint );
|
1343 |
+
// deprecated
|
1344 |
+
$mobileOverlayBreakpoint = DGWT_WCAS()->settings->getOption( 'mobile_overlay_breakpoint', 992 );
|
1345 |
$layout = array(
|
1346 |
+
'style' => DGWT_WCAS()->settings->getOption( 'search_style', 'solaris' ),
|
1347 |
+
'icon' => 'magnifier-thin',
|
1348 |
+
'layout' => DGWT_WCAS()->settings->getOption( 'search_layout', 'classic' ),
|
1349 |
+
'layout_breakpoint' => apply_filters( 'dgwt/wcas/scripts/layout_breakpoint', $layoutBreakpoint ),
|
1350 |
+
'mobile_overlay' => ( DGWT_WCAS()->settings->getOption( 'enable_mobile_overlay' ) === 'on' ? true : false ),
|
1351 |
+
'mobile_overlay_breakpoint' => apply_filters( 'dgwt/wcas/scripts/mobile_overlay_breakpoint', $mobileOverlayBreakpoint ),
|
1352 |
+
'mobile_overlay_wrapper' => apply_filters( 'dgwt/wcas/scripts/mobile_overlay_wrapper', 'body' ),
|
1353 |
+
'darken_background' => ( DGWT_WCAS()->settings->getOption( 'darken_background', 'off' ) === 'on' ? true : false ),
|
1354 |
);
|
1355 |
+
if ( $layout['style'] === 'pirx' ) {
|
1356 |
+
$layout['icon'] = 'magnifier-pirx';
|
1357 |
}
|
1358 |
return (object) $layout;
|
1359 |
}
|
1377 |
'action_get_prices' => DGWT_WCAS_GET_PRICES_ACTION,
|
1378 |
'min_chars' => 3,
|
1379 |
'width' => 'auto',
|
1380 |
+
'show_details_panel' => false,
|
1381 |
'show_images' => false,
|
1382 |
'show_price' => false,
|
1383 |
'show_desc' => false,
|
1391 |
'taxonomy_brands' => '',
|
1392 |
'img_url' => DGWT_WCAS_URL . 'assets/img/',
|
1393 |
'is_premium' => dgoraAsfwFs()->is_premium(),
|
1394 |
+
'layout_breakpoint' => $layout->layout_breakpoint,
|
1395 |
+
'mobile_overlay_breakpoint' => $layout->mobile_overlay_breakpoint,
|
1396 |
'mobile_overlay_wrapper' => $layout->mobile_overlay_wrapper,
|
1397 |
'mobile_overlay_delay' => apply_filters( 'dgwt/wcas/scripts/overlay_delay_ms', 0 ),
|
1398 |
'debounce_wait_ms' => apply_filters( 'dgwt/wcas/scripts/debounce_wait_ms', 400 ),
|
1402 |
'close_icon' => self::getIcon( 'close' ),
|
1403 |
'back_icon' => self::getIcon( 'arrow-left' ),
|
1404 |
'preloader_icon' => self::getIcon( 'preloader' ),
|
1405 |
+
'voice_search_inactive_icon' => self::getIcon( ( $layout->style === 'pirx' ? 'voice-search-inactive-pirx' : 'voice-search-inactive' ), 'dgwt-wcas-voice-search-mic-inactive' ),
|
1406 |
+
'voice_search_active_icon' => self::getIcon( ( $layout->style === 'pirx' ? 'voice-search-active-pirx' : 'voice-search-active' ), 'dgwt-wcas-voice-search-mic-active' ),
|
1407 |
+
'voice_search_disabled_icon' => self::getIcon( ( $layout->style === 'pirx' ? 'voice-search-disabled-pirx' : 'voice-search-disabled' ), 'dgwt-wcas-voice-search-mic-disabled' ),
|
1408 |
'custom_params' => (object) apply_filters( 'dgwt/wcas/scripts/custom_params', array() ),
|
1409 |
'convert_html' => true,
|
1410 |
'suggestions_wrapper' => apply_filters( 'dgwt/wcas/scripts/suggestions_wrapper', 'body' ),
|
1411 |
'show_product_vendor' => dgoraAsfwFs()->is_premium() && class_exists( 'DgoraWcas\\Integrations\\Marketplace\\Marketplace' ) && DGWT_WCAS()->marketplace->showProductVendor(),
|
1412 |
'disable_hits' => apply_filters( 'dgwt/wcas/scripts/disable_hits', false ),
|
1413 |
'disable_submit' => apply_filters( 'dgwt/wcas/scripts/disable_submit', false ),
|
1414 |
+
'fixer' => apply_filters( 'dgwt/wcas/scripts/fixer', array(
|
1415 |
+
'broken_search_ui' => true,
|
1416 |
+
'broken_search_ui_ajax' => true,
|
1417 |
+
'broken_search_ui_hard' => false,
|
1418 |
+
'broken_search_elementor_popups' => true,
|
1419 |
+
'broken_search_browsers_back_arrow' => true,
|
1420 |
+
'force_refresh_checkout' => true,
|
1421 |
+
) ),
|
1422 |
+
'voice_search_enabled' => defined( 'DGWT_WCAS_VOICE_SEARCH_ENABLE' ) && DGWT_WCAS_VOICE_SEARCH_ENABLE,
|
1423 |
+
'voice_search_lang' => apply_filters( 'dgwt/wcas/scripts/voice_search_lang', get_bloginfo( 'language' ) ),
|
1424 |
);
|
1425 |
if ( Multilingual::isMultilingual() ) {
|
1426 |
$localize['current_lang'] = Multilingual::getCurrentLanguage();
|
1436 |
}
|
1437 |
// Show/hide Details panel
|
1438 |
if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
|
1439 |
+
$localize['show_details_panel'] = true;
|
1440 |
}
|
1441 |
// Show/hide images
|
1442 |
if ( DGWT_WCAS()->settings->getOption( 'show_product_image' ) === 'on' ) {
|
1746 |
}
|
1747 |
return apply_filters( 'dgwt/wcas/db/collation/sql', $sql, $context );
|
1748 |
}
|
1749 |
+
|
1750 |
+
/**
|
1751 |
+
* Check if string ends with another string
|
1752 |
+
*
|
1753 |
+
* @param string $haystack
|
1754 |
+
* @param string $needle
|
1755 |
+
*
|
1756 |
+
* @return bool
|
1757 |
+
*/
|
1758 |
+
public static function endsWith( $haystack, $needle )
|
1759 |
+
{
|
1760 |
+
$length = strlen( $needle );
|
1761 |
+
return ( $length > 0 ? substr( $haystack, -$length ) === $needle : true );
|
1762 |
+
}
|
1763 |
|
1764 |
}
|
includes/Integrations/Plugins/WooCommercePrivateStore/WooCommercePrivateStore.php
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
*/
|
6 |
namespace DgoraWcas\Integrations\Plugins\WooCommercePrivateStore;
|
7 |
|
|
|
8 |
// Exit if accessed directly
|
9 |
if ( !defined( 'ABSPATH' ) ) {
|
10 |
exit;
|
5 |
*/
|
6 |
namespace DgoraWcas\Integrations\Plugins\WooCommercePrivateStore;
|
7 |
|
8 |
+
use DgoraWcas\Helpers ;
|
9 |
// Exit if accessed directly
|
10 |
if ( !defined( 'ABSPATH' ) ) {
|
11 |
exit;
|
includes/Integrations/Plugins/WooCommerceProductsFilter/WooCommerceProductsFilter.php
CHANGED
@@ -33,9 +33,9 @@ class WooCommerceProductsFilter {
|
|
33 |
|
34 |
add_filter( 'woof_get_filtered_price_query', array( $this, 'get_filtered_price_query' ) );
|
35 |
|
36 |
-
add_filter( 'woof_get_terms_args', array( $this, 'get_terms_args' ) );
|
37 |
-
|
38 |
add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
|
|
|
|
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -109,25 +109,6 @@ class WooCommerceProductsFilter {
|
|
109 |
return $sql;
|
110 |
}
|
111 |
|
112 |
-
/**
|
113 |
-
* Passing our search results to plugin's terms filters
|
114 |
-
*
|
115 |
-
* The plugin will use our products IDs to determine terms in the displayed filters.
|
116 |
-
*
|
117 |
-
* @param array $args
|
118 |
-
*
|
119 |
-
* @return array
|
120 |
-
*/
|
121 |
-
public function get_terms_args( $args ) {
|
122 |
-
$post_ids = apply_filters( 'dgwt/wcas/search_page/result_post_ids', array() );
|
123 |
-
|
124 |
-
if ( $post_ids ) {
|
125 |
-
$args['object_ids'] = $post_ids;
|
126 |
-
}
|
127 |
-
|
128 |
-
return $args;
|
129 |
-
}
|
130 |
-
|
131 |
/**
|
132 |
* Check if it's search page
|
133 |
*
|
@@ -151,16 +132,38 @@ class WooCommerceProductsFilter {
|
|
151 |
/**
|
152 |
* Filter posts used to show counters next to the filters
|
153 |
*
|
154 |
-
* @param $query
|
155 |
*
|
156 |
* @return mixed
|
157 |
*/
|
158 |
public function pre_get_posts( $query ) {
|
159 |
-
if ( $this->is_search() && Helpers::is_running_inside_class( 'WP_QueryWoofCounter' ) ) {
|
160 |
$post_ids = apply_filters( 'dgwt/wcas/search_page/result_post_ids', array() );
|
161 |
$query->set( 'post__in', $post_ids );
|
162 |
}
|
163 |
|
164 |
return $query;
|
165 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
33 |
|
34 |
add_filter( 'woof_get_filtered_price_query', array( $this, 'get_filtered_price_query' ) );
|
35 |
|
|
|
|
|
36 |
add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
|
37 |
+
|
38 |
+
add_filter( 'woof_dynamic_count_attr', array( $this, 'dynamic_count_attr' ), 10, 2 );
|
39 |
}
|
40 |
|
41 |
/**
|
109 |
return $sql;
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
/**
|
113 |
* Check if it's search page
|
114 |
*
|
132 |
/**
|
133 |
* Filter posts used to show counters next to the filters
|
134 |
*
|
135 |
+
* @param \WP_Query $query
|
136 |
*
|
137 |
* @return mixed
|
138 |
*/
|
139 |
public function pre_get_posts( $query ) {
|
140 |
+
if ( $this->is_search() && Helpers::is_running_inside_class( 'WP_QueryWoofCounter', 15 ) ) {
|
141 |
$post_ids = apply_filters( 'dgwt/wcas/search_page/result_post_ids', array() );
|
142 |
$query->set( 'post__in', $post_ids );
|
143 |
}
|
144 |
|
145 |
return $query;
|
146 |
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Including search results in the query used to determine the counters for the filters
|
150 |
+
*
|
151 |
+
* @param array $args
|
152 |
+
* @param string $custom_type
|
153 |
+
*
|
154 |
+
* @return array
|
155 |
+
*/
|
156 |
+
public function dynamic_count_attr( $args, $custom_type ) {
|
157 |
+
if ( ! empty( $custom_type ) ) {
|
158 |
+
return $args;
|
159 |
+
}
|
160 |
+
|
161 |
+
$post_ids = apply_filters( 'dgwt/wcas/search_page/result_post_ids', array() );
|
162 |
+
|
163 |
+
if ( $post_ids ) {
|
164 |
+
$args['post__in'] = $post_ids;
|
165 |
+
}
|
166 |
+
|
167 |
+
return $args;
|
168 |
+
}
|
169 |
}
|
includes/Integrations/Solver.php
CHANGED
@@ -19,6 +19,7 @@ class Solver
|
|
19 |
$this->solveSearchWPWooCommerceIntegration();
|
20 |
$this->solveDiviWithBuilderWC();
|
21 |
$this->solveMedicorCoreScrips();
|
|
|
22 |
}
|
23 |
|
24 |
/**
|
@@ -66,5 +67,23 @@ class Solver
|
|
66 |
}, PHP_INT_MAX );
|
67 |
}
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
}
|
19 |
$this->solveSearchWPWooCommerceIntegration();
|
20 |
$this->solveDiviWithBuilderWC();
|
21 |
$this->solveMedicorCoreScrips();
|
22 |
+
$this->solveGeoTargetingWPScripts();
|
23 |
}
|
24 |
|
25 |
/**
|
67 |
}, PHP_INT_MAX );
|
68 |
}
|
69 |
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Preventing the GeoTargetingWP plugin from loading scripts in the settings page
|
73 |
+
* because the Selectize.js script is loaded twice
|
74 |
+
*
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function solveGeoTargetingWPScripts()
|
78 |
+
{
|
79 |
+
if ( !Helpers::isSettingsPage() ) {
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
add_action( 'admin_enqueue_scripts', function () {
|
83 |
+
wp_dequeue_script( 'geot' );
|
84 |
+
wp_dequeue_script( 'geot-chosen' );
|
85 |
+
wp_dequeue_script( 'geot-selectize' );
|
86 |
+
}, 999 );
|
87 |
+
}
|
88 |
|
89 |
}
|
includes/Integrations/Themes/Astra/Astra.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Astra;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Astra extends ThemeIntegration {
|
13 |
-
public function __construct() {
|
14 |
-
$this->themeSlug = 'astra';
|
15 |
-
$this->themeName = 'Astra';
|
16 |
-
|
17 |
-
if ( defined( 'ASTRA_EXT_VER' ) ) {
|
18 |
-
add_filter( 'dgwt/wcas/suggestion_details/show_quantity', '__return_false' );
|
19 |
-
}
|
20 |
-
|
21 |
-
parent::__construct();
|
22 |
-
}
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Avada/Avada.php
DELETED
@@ -1,385 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Avada;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Avada {
|
13 |
-
|
14 |
-
private $themeSlug = 'avada';
|
15 |
-
|
16 |
-
private $themeName = 'Avada';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Add settings
|
29 |
-
*
|
30 |
-
* @param array $settings
|
31 |
-
*
|
32 |
-
* @return array
|
33 |
-
*/
|
34 |
-
public function registerSettings( $settings ) {
|
35 |
-
$key = 'dgwt_wcas_basic';
|
36 |
-
|
37 |
-
$settings[ $key ][10] = array(
|
38 |
-
'name' => $this->themeSlug . '_main_head',
|
39 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
40 |
-
'type' => 'head',
|
41 |
-
'class' => 'dgwt-wcas-sgs-header'
|
42 |
-
);
|
43 |
-
|
44 |
-
$settings[ $key ][52] = array(
|
45 |
-
'name' => $this->themeSlug . '_settings_head',
|
46 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
47 |
-
'type' => 'desc',
|
48 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
49 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
50 |
-
);
|
51 |
-
|
52 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
53 |
-
if ( ! empty( $img ) ) {
|
54 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
55 |
-
}
|
56 |
-
|
57 |
-
$settings[ $key ][55] = array(
|
58 |
-
'name' => $this->themeSlug . '_replace_search',
|
59 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
60 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
61 |
-
'type' => 'checkbox',
|
62 |
-
'default' => 'off',
|
63 |
-
);
|
64 |
-
|
65 |
-
$settings[ $key ][90] = array(
|
66 |
-
'name' => $this->themeSlug . '_othersways__head',
|
67 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
68 |
-
'type' => 'head',
|
69 |
-
'class' => 'dgwt-wcas-sgs-header'
|
70 |
-
);
|
71 |
-
|
72 |
-
return $settings;
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Check if can replace the native Woodmart search form with the FiboSearch form.
|
77 |
-
*
|
78 |
-
* @return bool
|
79 |
-
*/
|
80 |
-
private function canReplaceSearch() {
|
81 |
-
$canIntegrate = false;
|
82 |
-
|
83 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
84 |
-
$canIntegrate = true;
|
85 |
-
}
|
86 |
-
|
87 |
-
return $canIntegrate;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Overwrite search
|
92 |
-
*
|
93 |
-
* @return void
|
94 |
-
*/
|
95 |
-
private function maybeOverwriteSearch() {
|
96 |
-
if ( $this->canReplaceSearch() ) {
|
97 |
-
|
98 |
-
$this->applyCSS();
|
99 |
-
$this->applyJS();
|
100 |
-
|
101 |
-
|
102 |
-
add_filter( 'get_search_form', function ( $form ) {
|
103 |
-
return do_shortcode( '[wcas-search-form]' );
|
104 |
-
}, 100 );
|
105 |
-
|
106 |
-
add_action( 'init', function () {
|
107 |
-
remove_filter( 'wp_nav_menu_items', 'avada_add_search_to_main_nav', 20, 2 );
|
108 |
-
add_filter( 'wp_nav_menu_items', array( $this, 'addSearchToMainNav' ), 20, 2 );
|
109 |
-
} );
|
110 |
-
|
111 |
-
// Fusion search
|
112 |
-
add_filter( 'search_form_after_fields', function ( $args ) {
|
113 |
-
|
114 |
-
add_action( 'wp_footer', function () {
|
115 |
-
echo '<div class="dgwt-wcas-avada-fus-search-replace-wrapper">';
|
116 |
-
echo do_shortcode( '[wcas-search-form]' );
|
117 |
-
echo '</div>';
|
118 |
-
} );
|
119 |
-
|
120 |
-
|
121 |
-
$args['after_fields'] = '<div class="dgwt-wcas-avada-fus-search-replace"></div>';
|
122 |
-
|
123 |
-
return $args;
|
124 |
-
} );
|
125 |
-
|
126 |
-
add_filter( 'dgwt/wcas/icon', function ( $svg, $name, $class, $color ) {
|
127 |
-
if ( $name === 'magnifier-thin' ) {
|
128 |
-
ob_start();
|
129 |
-
?>
|
130 |
-
<svg version="1.1" class="<?php echo $class; ?>" xmlns="http://www.w3.org/2000/svg"
|
131 |
-
viewBox="0 0 30 32">
|
132 |
-
<path
|
133 |
-
d="M20.571 15.143q0-3.304-2.348-5.652t-5.652-2.348-5.652 2.348-2.348 5.652 2.348 5.652 5.652 2.348 5.652-2.348 2.348-5.652zM29.714 30q0 0.929-0.679 1.607t-1.607 0.679q-0.964 0-1.607-0.679l-6.125-6.107q-3.196 2.214-7.125 2.214-2.554 0-4.884-0.991t-4.018-2.679-2.679-4.018-0.991-4.884 0.991-4.884 2.679-4.018 4.018-2.679 4.884-0.991 4.884 0.991 4.018 2.679 2.679 4.018 0.991 4.884q0 3.929-2.214 7.125l6.125 6.125q0.661 0.661 0.661 1.607z"></path>
|
134 |
-
</svg>
|
135 |
-
<?php
|
136 |
-
$svg = ob_get_clean();
|
137 |
-
}
|
138 |
-
|
139 |
-
return $svg;
|
140 |
-
}, 10, 4 );
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Add search to the main navigation.
|
146 |
-
*
|
147 |
-
* @param string $items HTML for the main menu items.
|
148 |
-
* @param array $args Arguments for the WP menu.
|
149 |
-
*
|
150 |
-
* @return string
|
151 |
-
*/
|
152 |
-
public function addSearchToMainNav( $items, $args ) {
|
153 |
-
// Disable woo cart on ubermenu navigations.
|
154 |
-
$ubermenu = ( function_exists( 'ubermenu_get_menu_instance_by_theme_location' ) && ubermenu_get_menu_instance_by_theme_location( $args->theme_location ) );
|
155 |
-
|
156 |
-
if ( 'v6' !== Avada()->settings->get( 'header_layout' ) && false === $ubermenu ) {
|
157 |
-
if ( 'main_navigation' === $args->theme_location || 'sticky_navigation' === $args->theme_location ) {
|
158 |
-
if ( Avada()->settings->get( 'main_nav_search_icon' ) ) {
|
159 |
-
$items .= '<li class="fusion-custom-menu-item fusion-main-menu-search">';
|
160 |
-
$items .= do_shortcode( '[wcas-search-form layout="icon"]' );
|
161 |
-
$items .= '</li>';
|
162 |
-
}
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
return $items;
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Apply custom CSS
|
171 |
-
*
|
172 |
-
* @return void
|
173 |
-
*/
|
174 |
-
private function applyCSS() {
|
175 |
-
|
176 |
-
add_action( 'wp_head', function () {
|
177 |
-
?>
|
178 |
-
<style>
|
179 |
-
.fusion-secondary-menu-search {
|
180 |
-
width: 500px;
|
181 |
-
}
|
182 |
-
|
183 |
-
.fusion-flyout-search .dgwt-wcas-search-wrapp {
|
184 |
-
margin-top: 21px;
|
185 |
-
}
|
186 |
-
|
187 |
-
.dgwt-wcas-details-wrapp .quantity {
|
188 |
-
width: auto;
|
189 |
-
}
|
190 |
-
|
191 |
-
.fusion-main-menu-search .dgwt-wcas-search-wrapp {
|
192 |
-
margin-top: calc((var(--nav_height) / 2) - (var(--nav_typography-font-size) / 2));
|
193 |
-
}
|
194 |
-
|
195 |
-
.fusion-header-v7 .fusion-main-menu-search .dgwt-wcas-search-wrapp {
|
196 |
-
margin-top: 0;
|
197 |
-
}
|
198 |
-
|
199 |
-
.dgwt-wcas-ico-magnifier, .dgwt-wcas-ico-magnifier-handler {
|
200 |
-
max-width: none;
|
201 |
-
fill: var(--nav_typography-color);
|
202 |
-
max-height: var(--nav_typography-font-size);
|
203 |
-
}
|
204 |
-
|
205 |
-
.dgwt-wcas-ico-magnifier:hover, .dgwt-wcas-ico-magnifier-handler:hover {
|
206 |
-
fill: var(--menu_hover_first_color);
|
207 |
-
}
|
208 |
-
.dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier:hover {
|
209 |
-
fill: currentColor;
|
210 |
-
opacity: 0.7;
|
211 |
-
}
|
212 |
-
|
213 |
-
.fusion-is-sticky .dgwt-wcas-ico-magnifier, .fusion-is-sticky .dgwt-wcas-ico-magnifier-handler {
|
214 |
-
fill: var(--header_sticky_menu_color);
|
215 |
-
}
|
216 |
-
|
217 |
-
.fusion-is-sticky .dgwt-wcas-ico-magnifier:hover, .fusion-is-sticky .dgwt-wcas-ico-magnifier-handler:hover {
|
218 |
-
fill: var(--menu_hover_first_color);
|
219 |
-
}
|
220 |
-
|
221 |
-
.fusion-header-v4 .fusion-main-menu {
|
222 |
-
overflow: visible;
|
223 |
-
}
|
224 |
-
|
225 |
-
.fusion-search-form {
|
226 |
-
display: none;
|
227 |
-
}
|
228 |
-
|
229 |
-
html:not(.dgwt-wcas-overlay-mobile-on) .fusion-header-v4 .fusion-main-menu .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form {
|
230 |
-
top: 100%;
|
231 |
-
}
|
232 |
-
|
233 |
-
.fusion-header-v4 .fusion-main-menu .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
|
234 |
-
top: calc(100% + -4px);
|
235 |
-
}
|
236 |
-
|
237 |
-
@media (max-width: 1100px) {
|
238 |
-
.fusion-flyout-search .dgwt-wcas-search-wrapp {
|
239 |
-
margin-top: 73px;
|
240 |
-
max-width: 100%;
|
241 |
-
padding: 0 30px 0 30px;
|
242 |
-
}
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
@media (max-width: 800px) {
|
247 |
-
.fusion-logo .dgwt-wcas-search-wrapp {
|
248 |
-
display: none;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
</style>
|
252 |
-
<?php
|
253 |
-
} );
|
254 |
-
|
255 |
-
}
|
256 |
-
|
257 |
-
/**
|
258 |
-
* Apply custom JS
|
259 |
-
*
|
260 |
-
* @return void
|
261 |
-
*/
|
262 |
-
private function applyJS() {
|
263 |
-
|
264 |
-
add_action( 'wp_footer', function () {
|
265 |
-
|
266 |
-
?>
|
267 |
-
<script>
|
268 |
-
(function ($) {
|
269 |
-
|
270 |
-
function dgwtWcasAvadaGetActiveInstance() {
|
271 |
-
var $el = $('.dgwt-wcas-search-wrapp.dgwt-wcas-active'),
|
272 |
-
instance;
|
273 |
-
if ($el.length > 0) {
|
274 |
-
$el.each(function () {
|
275 |
-
var $input = $(this).find('.dgwt-wcas-search-input');
|
276 |
-
if (typeof $input.data('autocomplete') == 'object') {
|
277 |
-
instance = $input.data('autocomplete');
|
278 |
-
return false;
|
279 |
-
}
|
280 |
-
});
|
281 |
-
}
|
282 |
-
|
283 |
-
return instance;
|
284 |
-
}
|
285 |
-
|
286 |
-
$(document).ready(function () {
|
287 |
-
|
288 |
-
// Header 6
|
289 |
-
if ($('.fusion-header-v6').length) {
|
290 |
-
|
291 |
-
$('.fusion-header-v6 .fusion-icon-search').on('click', function () {
|
292 |
-
var $input = $('.fusion-flyout-search .dgwt-wcas-search-input');
|
293 |
-
if ($input.length > 0) {
|
294 |
-
$input.focus();
|
295 |
-
}
|
296 |
-
});
|
297 |
-
|
298 |
-
$('.fusion-header-v6 .fusion-icon-search').on('click', function () {
|
299 |
-
var $input = $('.fusion-flyout-search .dgwt-wcas-search-input');
|
300 |
-
if ($input.length > 0) {
|
301 |
-
$input.focus();
|
302 |
-
}
|
303 |
-
});
|
304 |
-
|
305 |
-
|
306 |
-
$('.fusion-icon-search').on('click', function () {
|
307 |
-
|
308 |
-
if ($('.fusion-header-v6').hasClass('fusion-flyout-search-active')) {
|
309 |
-
|
310 |
-
var instance = dgwtWcasAvadaGetActiveInstance();
|
311 |
-
|
312 |
-
if (typeof instance == 'object') {
|
313 |
-
instance.suggestions = [];
|
314 |
-
instance.hide();
|
315 |
-
instance.el.val('');
|
316 |
-
}
|
317 |
-
}
|
318 |
-
});
|
319 |
-
}
|
320 |
-
|
321 |
-
// Fusion search
|
322 |
-
var $fusionSearchForm = $('.fusion-search-form');
|
323 |
-
if ($fusionSearchForm.length) {
|
324 |
-
$(this).remove();
|
325 |
-
}
|
326 |
-
|
327 |
-
var $placeholders = $('.dgwt-wcas-avada-fus-search-replace')
|
328 |
-
var $barsToReplace = $('.dgwt-wcas-avada-fus-search-replace-wrapper .dgwt-wcas-search-wrapp')
|
329 |
-
if ($placeholders.length && $barsToReplace.length) {
|
330 |
-
$placeholders.each(function (i) {
|
331 |
-
var $parentForm = $(this).closest('form');
|
332 |
-
$parentForm.after($(this));
|
333 |
-
$parentForm.remove();
|
334 |
-
});
|
335 |
-
|
336 |
-
$placeholders.each(function (i) {
|
337 |
-
$(this).append($($barsToReplace[i]));
|
338 |
-
});
|
339 |
-
}
|
340 |
-
|
341 |
-
// Remove unused search forms
|
342 |
-
$('.dgwt-wcas-avada-fus-search-replace-wrapper').remove();
|
343 |
-
|
344 |
-
$(document).on('click', '.fusion-icon-search', function () {
|
345 |
-
|
346 |
-
|
347 |
-
var $handler = $('.fusion-mobile-menu-search .js-dgwt-wcas-enable-mobile-form');
|
348 |
-
var $handler2 = $('.fusion-flyout-search .js-dgwt-wcas-enable-mobile-form');
|
349 |
-
|
350 |
-
if ($handler.length) {
|
351 |
-
|
352 |
-
setTimeout(function () {
|
353 |
-
$('.fusion-mobile-menu-search').hide();
|
354 |
-
}, 100);
|
355 |
-
|
356 |
-
$handler[0].click();
|
357 |
-
}
|
358 |
-
|
359 |
-
if ($handler2.length) {
|
360 |
-
$handler2[0].click();
|
361 |
-
}
|
362 |
-
|
363 |
-
});
|
364 |
-
|
365 |
-
$(document).on('click', '.js-dgwt-wcas-om-return', function () {
|
366 |
-
var $activeFlyout = $('.fusion-flyout-active');
|
367 |
-
if ($activeFlyout) {
|
368 |
-
$activeFlyout.removeClass('fusion-flyout-search-active');
|
369 |
-
$activeFlyout.removeClass('fusion-flyout-active');
|
370 |
-
}
|
371 |
-
|
372 |
-
});
|
373 |
-
|
374 |
-
|
375 |
-
});
|
376 |
-
|
377 |
-
|
378 |
-
}(jQuery));
|
379 |
-
</script>
|
380 |
-
<?php
|
381 |
-
}, 1000 );
|
382 |
-
|
383 |
-
}
|
384 |
-
|
385 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/BigCart/BigCart.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\BigCart;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class BigCart extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'bigcart';
|
16 |
-
$this->themeName = 'BigCart';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/BlockShop/BlockShop.php
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\BlockShop;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class BlockShop {
|
13 |
-
|
14 |
-
private $themeSlug = 'block-shop';
|
15 |
-
|
16 |
-
private $themeName = 'Block Shop';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Overwrite search
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function maybeOverwriteSearch() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/block-shop.php';
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Bridge/Bridge.php
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Bridge;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Bridge {
|
13 |
-
|
14 |
-
private $themeSlug = 'bridge';
|
15 |
-
|
16 |
-
private $themeName = 'Bridge';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Overwrite search
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function maybeOverwriteSearch() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/bridge.php';
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/CiyaShop/CiyaShop.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\CiyaShop;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class CiyaShop extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'ciyashop';
|
16 |
-
$this->themeName = 'CiyaShop';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/DFDRonneby/DFDRonneby.php
CHANGED
@@ -2,99 +2,21 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\DFDRonneby;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class DFDRonneby {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$desc = sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME );
|
55 |
-
$desc .= '<br><span style="color: red;">' . __( 'Note: We currently only support the header type: "Header 10"', 'ajax-search-for-woocommerce' ) . '</span>';
|
56 |
-
|
57 |
-
$settings[ $key ][55] = array(
|
58 |
-
'name' => $this->themeSlug . '_replace_search',
|
59 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
60 |
-
'desc' => $desc,
|
61 |
-
'type' => 'checkbox',
|
62 |
-
'default' => 'off',
|
63 |
-
);
|
64 |
-
|
65 |
-
$settings[ $key ][90] = array(
|
66 |
-
'name' => $this->themeSlug . '_othersways__head',
|
67 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
68 |
-
'type' => 'head',
|
69 |
-
'class' => 'dgwt-wcas-sgs-header'
|
70 |
);
|
71 |
-
|
72 |
-
return $settings;
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Check if can replace the native search form with the FiboSearch form.
|
77 |
-
*
|
78 |
-
* @return bool
|
79 |
-
*/
|
80 |
-
private function canReplaceSearch() {
|
81 |
-
$canIntegrate = false;
|
82 |
-
|
83 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
84 |
-
$canIntegrate = true;
|
85 |
-
}
|
86 |
-
|
87 |
-
return $canIntegrate;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Overwrite search
|
92 |
-
*
|
93 |
-
* @return void
|
94 |
-
*/
|
95 |
-
private function maybeOverwriteSearch() {
|
96 |
-
if ( $this->canReplaceSearch() ) {
|
97 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/dfd-ronneby.php';
|
98 |
-
}
|
99 |
}
|
100 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\DFDRonneby;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class DFDRonneby extends ThemeIntegration {
|
13 |
+
public function __construct( $themeSlug, $themeName ) {
|
14 |
+
parent::__construct(
|
15 |
+
$themeSlug,
|
16 |
+
$themeName,
|
17 |
+
array(
|
18 |
+
'replaceSearchSuffix' => '<br><span style="color: red;">' . __( 'Note: We currently only support the header type: "Header 10"', 'ajax-search-for-woocommerce' ) . '</span>'
|
19 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
}
|
includes/Integrations/Themes/Divi/Divi.php
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Divi;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Divi {
|
13 |
-
|
14 |
-
private $themeSlug = 'divi';
|
15 |
-
|
16 |
-
private $themeName = 'Divi';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
|
23 |
-
add_filter( 'et_builder_load_requests', array( $this, 'loadDiviInAjaxRequests' ) );
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Force to load Divi builder during AJAX queries for objects details
|
28 |
-
*
|
29 |
-
* @param array $requests
|
30 |
-
*
|
31 |
-
* @return array
|
32 |
-
*/
|
33 |
-
public function loadDiviInAjaxRequests( $requests ) {
|
34 |
-
if ( ! isset( $requests['wc-ajax'] ) ) {
|
35 |
-
$requests['wc-ajax'] = array();
|
36 |
-
}
|
37 |
-
$requests['wc-ajax'][] = 'dgwt_wcas_result_details';
|
38 |
-
|
39 |
-
return $requests;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Add settings
|
44 |
-
*
|
45 |
-
* @param array $settings
|
46 |
-
*
|
47 |
-
* @return array
|
48 |
-
*/
|
49 |
-
public function registerSettings( $settings ) {
|
50 |
-
$key = 'dgwt_wcas_basic';
|
51 |
-
|
52 |
-
$settings[ $key ][10] = array(
|
53 |
-
'name' => $this->themeSlug . '_main_head',
|
54 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
55 |
-
'type' => 'head',
|
56 |
-
'class' => 'dgwt-wcas-sgs-header'
|
57 |
-
);
|
58 |
-
|
59 |
-
$settings[ $key ][52] = array(
|
60 |
-
'name' => $this->themeSlug . '_settings_head',
|
61 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
62 |
-
'type' => 'desc',
|
63 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
64 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
65 |
-
);
|
66 |
-
|
67 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
68 |
-
if ( ! empty( $img ) ) {
|
69 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
70 |
-
}
|
71 |
-
|
72 |
-
$settings[ $key ][55] = array(
|
73 |
-
'name' => $this->themeSlug . '_replace_search',
|
74 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
75 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
76 |
-
'type' => 'checkbox',
|
77 |
-
'default' => 'off',
|
78 |
-
);
|
79 |
-
|
80 |
-
$settings[ $key ][90] = array(
|
81 |
-
'name' => $this->themeSlug . '_othersways__head',
|
82 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
83 |
-
'type' => 'head',
|
84 |
-
'class' => 'dgwt-wcas-sgs-header'
|
85 |
-
);
|
86 |
-
|
87 |
-
return $settings;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Check if can replace the native search form with the FiboSearch form.
|
92 |
-
*
|
93 |
-
* @return bool
|
94 |
-
*/
|
95 |
-
private function canReplaceSearch() {
|
96 |
-
$canIntegrate = false;
|
97 |
-
|
98 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
99 |
-
$canIntegrate = true;
|
100 |
-
}
|
101 |
-
|
102 |
-
return $canIntegrate;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Overwrite search
|
107 |
-
*
|
108 |
-
* @return void
|
109 |
-
*/
|
110 |
-
private function maybeOverwriteSearch() {
|
111 |
-
if ( $this->canReplaceSearch() ) {
|
112 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/divi.php';
|
113 |
-
}
|
114 |
-
}
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Ekommart/Ekommart.php
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Ekommart;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Ekommart {
|
13 |
-
|
14 |
-
private $themeSlug = 'ekommart';
|
15 |
-
|
16 |
-
private $themeName = 'Ekommart';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Overwrite search
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function maybeOverwriteSearch() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
$this->applyCSS();
|
95 |
-
|
96 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/ekommart.php';
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Apply custom CSS
|
102 |
-
*
|
103 |
-
* @return void
|
104 |
-
*/
|
105 |
-
private function applyCSS() {
|
106 |
-
add_action( 'wp_head', function () {
|
107 |
-
?>
|
108 |
-
<style>
|
109 |
-
.dgwt-wcas-search-wrapp {
|
110 |
-
max-width: none;
|
111 |
-
}
|
112 |
-
.ekommart-handheld-footer-bar ul li.search.active .site-search{
|
113 |
-
bottom: -100%;
|
114 |
-
}
|
115 |
-
</style>
|
116 |
-
<?php
|
117 |
-
} );
|
118 |
-
}
|
119 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Electro/Electro.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Electro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Electro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'electro';
|
16 |
-
$this->themeName = 'Electro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Enfold/Enfold.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Enfold;
|
4 |
|
|
|
5 |
use DgoraWcas\Helpers;
|
6 |
|
7 |
// Exit if accessed directly
|
@@ -9,208 +10,33 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Enfold {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
|
23 |
-
add_action( 'init', function () {
|
24 |
-
|
25 |
-
add_action( 'wp_head', array( $this, 'customCSS' ) );
|
26 |
-
add_action( 'wp_footer', array( $this, 'customJS' ) );
|
27 |
-
|
28 |
} );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Add settings
|
33 |
-
*
|
34 |
-
* @param array $settings
|
35 |
-
*
|
36 |
-
* @return array
|
37 |
-
*/
|
38 |
-
public function registerSettings( $settings ) {
|
39 |
-
$key = 'dgwt_wcas_basic';
|
40 |
-
|
41 |
-
$settings[ $key ][10] = array(
|
42 |
-
'name' => $this->themeSlug . '_main_head',
|
43 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'head',
|
45 |
-
'class' => 'dgwt-wcas-sgs-header'
|
46 |
-
);
|
47 |
-
|
48 |
-
$settings[ $key ][52] = array(
|
49 |
-
'name' => $this->themeSlug . '_settings_head',
|
50 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
51 |
-
'type' => 'desc',
|
52 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
53 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
54 |
-
);
|
55 |
-
|
56 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
57 |
-
if ( ! empty( $img ) ) {
|
58 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
59 |
-
}
|
60 |
-
|
61 |
-
$settings[ $key ][55] = array(
|
62 |
-
'name' => $this->themeSlug . '_replace_search',
|
63 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
64 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
65 |
-
'type' => 'checkbox',
|
66 |
-
'default' => 'off',
|
67 |
-
);
|
68 |
-
|
69 |
-
$settings[ $key ][90] = array(
|
70 |
-
'name' => $this->themeSlug . '_othersways__head',
|
71 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
72 |
-
'type' => 'head',
|
73 |
-
'class' => 'dgwt-wcas-sgs-header'
|
74 |
-
);
|
75 |
-
|
76 |
-
return $settings;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Check if can replace the native search form with the FiboSearch form.
|
81 |
-
*
|
82 |
-
* @return bool
|
83 |
-
*/
|
84 |
-
private function canReplaceSearch() {
|
85 |
-
$canIntegrate = false;
|
86 |
-
|
87 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
88 |
-
$canIntegrate = true;
|
89 |
-
}
|
90 |
-
|
91 |
-
return $canIntegrate;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Overwrite search
|
96 |
-
*
|
97 |
-
* @return void
|
98 |
-
*/
|
99 |
-
private function maybeOverwriteSearch() {
|
100 |
-
if ( $this->canReplaceSearch() ) {
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
$settings[680]['disabled'] = true;
|
110 |
-
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
111 |
-
|
112 |
-
return $settings;
|
113 |
-
} );
|
114 |
-
|
115 |
-
|
116 |
-
// Change mobile breakpoint to 768
|
117 |
-
add_filter( 'dgwt/wcas/settings/load_value/key=mobile_breakpoint', function () {
|
118 |
-
return 768;
|
119 |
-
} );
|
120 |
-
|
121 |
-
// Mark that the value of the option "mobile breakpoint" is forced
|
122 |
-
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
123 |
-
$settings[690]['disabled'] = true;
|
124 |
-
$settings[690]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-breakpoint', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[690]['label'];
|
125 |
-
|
126 |
-
return $settings;
|
127 |
-
} );
|
128 |
-
|
129 |
-
|
130 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/enfold.php';
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Custom CSS
|
136 |
-
*
|
137 |
-
* @return void
|
138 |
-
*/
|
139 |
-
public function customCSS() {
|
140 |
-
?>
|
141 |
-
<style>
|
142 |
-
#top .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
143 |
-
padding: 10px 15px 10px 40px;
|
144 |
-
margin: 0;
|
145 |
-
}
|
146 |
-
|
147 |
-
#top.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
148 |
-
padding: 10px 40px 10px 15px
|
149 |
-
}
|
150 |
-
|
151 |
-
#top .av-main-nav .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
152 |
-
padding: 10px 15px 10px 15px;
|
153 |
-
margin: 0;
|
154 |
-
}
|
155 |
-
|
156 |
-
#top.rtl .av-main-nav .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
157 |
-
padding: 10px 15px 10px 15px
|
158 |
-
}
|
159 |
-
</style>
|
160 |
-
<?php
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Custom JS
|
165 |
-
*
|
166 |
-
* @return void
|
167 |
-
*/
|
168 |
-
public function customJS() {
|
169 |
-
?>
|
170 |
-
<script>
|
171 |
-
(function ($) {
|
172 |
-
function avia_apply_quant_btn() {
|
173 |
-
jQuery(".quantity input[type=number]").each(function () {
|
174 |
-
var number = $(this),
|
175 |
-
max = parseFloat(number.attr('max')),
|
176 |
-
min = parseFloat(number.attr('min')),
|
177 |
-
step = parseInt(number.attr('step'), 10),
|
178 |
-
newNum = jQuery(jQuery('<div />').append(number.clone(true)).html().replace('number', 'text')).insertAfter(number);
|
179 |
-
number.remove();
|
180 |
-
|
181 |
-
setTimeout(function () {
|
182 |
-
if (newNum.next('.plus').length === 0) {
|
183 |
-
var minus = jQuery('<input type="button" value="-" class="minus">').insertBefore(newNum),
|
184 |
-
plus = jQuery('<input type="button" value="+" class="plus">').insertAfter(newNum);
|
185 |
-
|
186 |
-
minus.on('click', function () {
|
187 |
-
var the_val = parseInt(newNum.val(), 10) - step;
|
188 |
-
the_val = the_val < 0 ? 0 : the_val;
|
189 |
-
the_val = the_val < min ? min : the_val;
|
190 |
-
newNum.val(the_val).trigger("change");
|
191 |
-
});
|
192 |
-
plus.on('click', function () {
|
193 |
-
var the_val = parseInt(newNum.val(), 10) + step;
|
194 |
-
the_val = the_val > max ? max : the_val;
|
195 |
-
newNum.val(the_val).trigger("change");
|
196 |
-
|
197 |
-
});
|
198 |
-
}
|
199 |
-
}, 10);
|
200 |
|
201 |
-
});
|
202 |
-
}
|
203 |
|
204 |
-
|
|
|
|
|
|
|
205 |
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
<?php
|
214 |
}
|
215 |
-
|
216 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Enfold;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
use DgoraWcas\Helpers;
|
7 |
|
8 |
// Exit if accessed directly
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
class Enfold extends ThemeIntegration {
|
14 |
+
public function extraFunctions() {
|
15 |
+
// Force enable overlay for mobile search
|
16 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
|
17 |
+
return 'on';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
// Mark that the value of the option "mobile overlay" is forced
|
21 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
22 |
+
$settings[680]['disabled'] = true;
|
23 |
+
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
24 |
|
25 |
+
return $settings;
|
26 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
|
|
|
|
28 |
|
29 |
+
// Change mobile breakpoint to 768
|
30 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=mobile_breakpoint', function () {
|
31 |
+
return 768;
|
32 |
+
} );
|
33 |
|
34 |
+
// Mark that the value of the option "mobile breakpoint" is forced
|
35 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
36 |
+
$settings[690]['disabled'] = true;
|
37 |
+
$settings[690]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-breakpoint', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[690]['label'];
|
38 |
|
39 |
+
return $settings;
|
40 |
+
} );
|
|
|
41 |
}
|
|
|
42 |
}
|
includes/Integrations/Themes/Estore/Estore.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Estore;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Estore extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'estore';
|
16 |
-
$this->themeName = 'eStore';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/EstorePro/EstorePro.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\EstorePro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class EstorePro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'estore-pro';
|
16 |
-
$this->themeName = 'eStore Pro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Overwrite search
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
protected function maybeOverwriteSearch() {
|
27 |
-
// We load partial from free version of theme
|
28 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/estore.php';
|
29 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
30 |
-
require_once( $partialPath );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Flatsome/Flatsome.php
DELETED
@@ -1,311 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Flatsome;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Flatsome {
|
13 |
-
|
14 |
-
private $themeSlug = 'flatsome';
|
15 |
-
|
16 |
-
private $themeName = 'Flatsome';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->replaceForm();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => __( 'Replace Flatsome search bar', 'ajax-search-for-woocommerce' ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => __( 'Flatsome Theme', 'ajax-search-for-woocommerce' ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native Storefront search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Mark the native search form to replace
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function replaceForm() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
|
95 |
-
$this->applyCSS();
|
96 |
-
$this->applyJS();
|
97 |
-
|
98 |
-
add_filter( 'body_class', function ( $classes ) {
|
99 |
-
$classes[] = 'dgwt-wcas-theme-flatsome';
|
100 |
-
|
101 |
-
return $classes;
|
102 |
-
} );
|
103 |
-
|
104 |
-
add_action( 'wp_loaded', function () {
|
105 |
-
remove_shortcode( 'search' );
|
106 |
-
add_shortcode( 'search', array( 'DgoraWcas\\Shortcode', 'addBody' ) );
|
107 |
-
} );
|
108 |
-
|
109 |
-
// Change mobile breakpoint from 992 to 850
|
110 |
-
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
111 |
-
return 850;
|
112 |
-
} );
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
$this->applyGeneralJS();
|
117 |
-
}
|
118 |
-
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Apply custom CSS
|
122 |
-
*
|
123 |
-
* @return void
|
124 |
-
*/
|
125 |
-
private function applyCSS() {
|
126 |
-
|
127 |
-
add_action( 'wp_head', function () {
|
128 |
-
?>
|
129 |
-
<style>
|
130 |
-
.dgwt-wcas-flatsome-up {
|
131 |
-
margin-top: -40vh;
|
132 |
-
}
|
133 |
-
|
134 |
-
#search-lightbox .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
|
135 |
-
height: 60px;
|
136 |
-
font-size: 20px;
|
137 |
-
}
|
138 |
-
|
139 |
-
#search-lightbox .dgwt-wcas-search-wrapp {
|
140 |
-
-webkit-transition: all 100ms ease-in-out;
|
141 |
-
-moz-transition: all 100ms ease-in-out;
|
142 |
-
-ms-transition: all 100ms ease-in-out;
|
143 |
-
-o-transition: all 100ms ease-in-out;
|
144 |
-
transition: all 100ms ease-in-out;
|
145 |
-
}
|
146 |
-
|
147 |
-
.dgwt-wcas-overlay-mobile-on .mfp-wrap .mfp-content {
|
148 |
-
width: 100vw;
|
149 |
-
}
|
150 |
-
|
151 |
-
.dgwt-wcas-overlay-mobile-on .mfp-close,
|
152 |
-
.dgwt-wcas-overlay-mobile-on .nav-sidebar {
|
153 |
-
display: none;
|
154 |
-
}
|
155 |
-
|
156 |
-
.dgwt-wcas-overlay-mobile-on .main-menu-overlay {
|
157 |
-
display: none;
|
158 |
-
}
|
159 |
-
|
160 |
-
.dgwt-wcas-open .header-search-dropdown .nav-dropdown {
|
161 |
-
opacity: 1;
|
162 |
-
max-height: inherit;
|
163 |
-
left: -15px !important;
|
164 |
-
}
|
165 |
-
|
166 |
-
.dgwt-wcas-open:not(.dgwt-wcas-theme-flatsome-dd-sc) .nav-right .header-search-dropdown .nav-dropdown {
|
167 |
-
left: auto;
|
168 |
-
/*right: -15px;*/
|
169 |
-
}
|
170 |
-
|
171 |
-
.dgwt-wcas-theme-flatsome .nav-dropdown .dgwt-wcas-search-wrapp {
|
172 |
-
min-width: 450px;
|
173 |
-
}
|
174 |
-
|
175 |
-
.header-search-form {
|
176 |
-
min-width: 250px;
|
177 |
-
}
|
178 |
-
|
179 |
-
</style>
|
180 |
-
<?php
|
181 |
-
} );
|
182 |
-
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Apply custom JS
|
187 |
-
*
|
188 |
-
* @return void
|
189 |
-
*/
|
190 |
-
private function applyJS() {
|
191 |
-
|
192 |
-
add_action( 'wp_footer', function () {
|
193 |
-
|
194 |
-
$minChars = DGWT_WCAS()->settings->getOption( 'min_chars' );
|
195 |
-
if ( empty( $minChars ) || ! is_numeric( $minChars ) ) {
|
196 |
-
$minChars = 3;
|
197 |
-
}
|
198 |
-
|
199 |
-
// @TODO Dropdown on search hover
|
200 |
-
?>
|
201 |
-
<script>
|
202 |
-
(function ($) {
|
203 |
-
|
204 |
-
$(document).ready(function () {
|
205 |
-
|
206 |
-
$(document).on('keyup', '#search-lightbox .dgwt-wcas-search-wrapp .dgwt-wcas-search-input', function () {
|
207 |
-
if (this.value.length >= <?php echo $minChars; ?>) {
|
208 |
-
$(this).closest('.dgwt-wcas-search-wrapp').addClass('dgwt-wcas-flatsome-up')
|
209 |
-
}
|
210 |
-
});
|
211 |
-
|
212 |
-
var refreshDropdownPosition;
|
213 |
-
var style = '';
|
214 |
-
var positioning = false;
|
215 |
-
$(document).on('mouseenter', '.header-search-dropdown a', function (e) {
|
216 |
-
|
217 |
-
if (positioning) {
|
218 |
-
return;
|
219 |
-
}
|
220 |
-
|
221 |
-
setTimeout(function () {
|
222 |
-
var pos = $(e.target).closest('.header-search').find('.nav-dropdown').attr('style');
|
223 |
-
|
224 |
-
if (typeof pos == 'string' && pos.length > 0) {
|
225 |
-
style = pos;
|
226 |
-
}
|
227 |
-
|
228 |
-
refreshDropdownPosition = setInterval(function () {
|
229 |
-
|
230 |
-
if ($('body').hasClass('dgwt-wcas-open') && style.length > 0) {
|
231 |
-
$('.nav-dropdown').attr('style', style);
|
232 |
-
}
|
233 |
-
|
234 |
-
|
235 |
-
if (!$('body').hasClass('dgwt-wcas-open') && !$('.header-search').hasClass('current-dropdown')) {
|
236 |
-
clearInterval(refreshDropdownPosition);
|
237 |
-
$('.nav-dropdown').removeAttr('style');
|
238 |
-
style = '';
|
239 |
-
positioning = false;
|
240 |
-
}
|
241 |
-
|
242 |
-
}, 10)
|
243 |
-
|
244 |
-
}, 400);
|
245 |
-
|
246 |
-
positioning = true;
|
247 |
-
});
|
248 |
-
|
249 |
-
$(document).on('click', '.header-search-lightbox .header-button a', function () {
|
250 |
-
|
251 |
-
var formWrapper = $('#search-lightbox').find('.dgwt-wcas-search-wrapp');
|
252 |
-
setTimeout(function () {
|
253 |
-
if (formWrapper.find('.dgwt-wcas-close')[0]) {
|
254 |
-
formWrapper.find('.dgwt-wcas-close')[0].click();
|
255 |
-
}
|
256 |
-
|
257 |
-
formWrapper.removeClass('dgwt-wcas-flatsome-up');
|
258 |
-
formWrapper.find('.dgwt-wcas-search-input').focus();
|
259 |
-
}, 1);
|
260 |
-
|
261 |
-
});
|
262 |
-
|
263 |
-
// Mobile
|
264 |
-
$(document).on('click', '.mobile-nav .header-search .icon-search', function () {
|
265 |
-
|
266 |
-
var $handler = $('.mobile-nav .header-search').find('.js-dgwt-wcas-enable-mobile-form');
|
267 |
-
if ($handler.length) {
|
268 |
-
$handler[0].click();
|
269 |
-
}
|
270 |
-
});
|
271 |
-
});
|
272 |
-
|
273 |
-
})(jQuery);
|
274 |
-
|
275 |
-
</script>
|
276 |
-
<?php
|
277 |
-
}, 1000 );
|
278 |
-
|
279 |
-
}
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Apply general JS
|
283 |
-
*
|
284 |
-
* @return void
|
285 |
-
*/
|
286 |
-
private function applyGeneralJS() {
|
287 |
-
|
288 |
-
add_action( 'wp_footer', function () {
|
289 |
-
?>
|
290 |
-
<script>
|
291 |
-
(function ($) {
|
292 |
-
|
293 |
-
// Fix Quantity buttons
|
294 |
-
$(document).on('dgwtWcasDetailsPanelLoaded', function () {
|
295 |
-
var $quantityFields = $('.dgwt-wcas-details-wrapp .quantity');
|
296 |
-
|
297 |
-
if ($quantityFields.length) {
|
298 |
-
$quantityFields.addQty();
|
299 |
-
}
|
300 |
-
|
301 |
-
});
|
302 |
-
|
303 |
-
})(jQuery);
|
304 |
-
|
305 |
-
</script>
|
306 |
-
<?php
|
307 |
-
}, 1001 );
|
308 |
-
|
309 |
-
}
|
310 |
-
|
311 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/GeneratePress/GeneratePress.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\GeneratePress;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class GeneratePress extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'generatepress';
|
16 |
-
$this->themeName = 'GeneratePress';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/GenericTheme.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DgoraWcas\Integrations\Themes;
|
4 |
+
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
+
|
7 |
+
// Exit if accessed directly
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
class GenericTheme extends ThemeIntegration {
|
13 |
+
}
|
includes/Integrations/Themes/Goya/Goya.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Goya;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Goya extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'goya';
|
16 |
-
$this->themeName = 'Goya';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Impreza/Impreza.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Impreza;
|
4 |
|
|
|
5 |
use DgoraWcas\Helpers;
|
6 |
|
7 |
// Exit if accessed directly
|
@@ -9,73 +10,22 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Impreza {
|
13 |
|
14 |
-
|
|
|
|
|
|
|
15 |
|
16 |
-
|
|
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$articleLink = 'https://fibosearch.com/documentation/themes-integrations/impreza-theme/';
|
35 |
-
$articleText = sprintf( __( 'Here is <a href="%s" target="_blank">article</a> about how to do it using Impreza child-theme.', 'ajax-search-for-woocommerce' ), $articleLink );
|
36 |
-
|
37 |
-
$settings[ $key ][10] = array(
|
38 |
-
'name' => $this->themeSlug . '_main_head',
|
39 |
-
'label' => __( 'Replace Impreza search bar', 'ajax-search-for-woocommerce' ),
|
40 |
-
'type' => 'head',
|
41 |
-
'class' => 'dgwt-wcas-sgs-header'
|
42 |
-
);
|
43 |
-
|
44 |
-
$settings[ $key ][52] = array(
|
45 |
-
'name' => $this->themeSlug . '_settings_head',
|
46 |
-
'label' => __( 'Impreza Theme', 'ajax-search-for-woocommerce' ),
|
47 |
-
'type' => 'desc',
|
48 |
-
'desc' => Helpers::embeddingInThemeHtml() . '<br />' . $articleText,
|
49 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
50 |
-
);
|
51 |
-
|
52 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
53 |
-
if ( ! empty( $img ) ) {
|
54 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
$settings[ $key ][90] = array(
|
59 |
-
'name' => $this->themeSlug . '_othersways__head',
|
60 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
61 |
-
'type' => 'head',
|
62 |
-
'class' => 'dgwt-wcas-sgs-header'
|
63 |
-
);
|
64 |
-
|
65 |
-
return $settings;
|
66 |
}
|
67 |
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Mark the native search form to replace
|
71 |
-
*
|
72 |
-
* @return void
|
73 |
-
*/
|
74 |
-
private function replaceForm() {
|
75 |
-
|
76 |
-
$this->applyCSS();
|
77 |
-
$this->applyJS();
|
78 |
-
|
79 |
add_filter( 'body_class', function ( $classes ) {
|
80 |
$classes[] = 'dgwt-wcas-theme-' . $this->themeSlug;
|
81 |
|
@@ -108,115 +58,5 @@ class Impreza {
|
|
108 |
|
109 |
return $settings;
|
110 |
} );
|
111 |
-
|
112 |
-
}
|
113 |
-
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Apply custom CSS
|
117 |
-
*
|
118 |
-
* @return void
|
119 |
-
*/
|
120 |
-
private function applyCSS() {
|
121 |
-
|
122 |
-
add_action( 'wp_head', function () {
|
123 |
-
?>
|
124 |
-
<style>
|
125 |
-
.w-search.layout_modern .w-search-close {
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
.w-search.layout_modern .w-search-close {
|
130 |
-
color: rgba(0, 0, 0, 0.5) !important;
|
131 |
-
}
|
132 |
-
|
133 |
-
.w-search.layout_modern .dgwt-wcas-close {
|
134 |
-
display: none;
|
135 |
-
}
|
136 |
-
|
137 |
-
.w-search.layout_modern .dgwt-wcas-preloader {
|
138 |
-
right: 20px;
|
139 |
-
}
|
140 |
-
|
141 |
-
.w-search.layout_fullscreen .w-form-row-field {
|
142 |
-
top: 48px;
|
143 |
-
}
|
144 |
-
</style>
|
145 |
-
<?php
|
146 |
-
} );
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Apply custom JS
|
152 |
-
*
|
153 |
-
* @return void
|
154 |
-
*/
|
155 |
-
private function applyJS() {
|
156 |
-
|
157 |
-
add_action( 'wp_footer', function () {
|
158 |
-
|
159 |
-
?>
|
160 |
-
<script>
|
161 |
-
(function ($) {
|
162 |
-
|
163 |
-
function dgwtWcasImprezaGetActiveInstance() {
|
164 |
-
var $el = $('.dgwt-wcas-search-wrapp.dgwt-wcas-active'),
|
165 |
-
instance;
|
166 |
-
if ($el.length > 0) {
|
167 |
-
$el.each(function () {
|
168 |
-
var $input = $(this).find('.dgwt-wcas-search-input');
|
169 |
-
if (typeof $input.data('autocomplete') == 'object') {
|
170 |
-
instance = $input.data('autocomplete');
|
171 |
-
return false;
|
172 |
-
}
|
173 |
-
});
|
174 |
-
}
|
175 |
-
|
176 |
-
return instance;
|
177 |
-
}
|
178 |
-
|
179 |
-
$(document).ready(function () {
|
180 |
-
|
181 |
-
$('.w-search.layout_modern .w-search-close').on('click', function () {
|
182 |
-
|
183 |
-
var instance = dgwtWcasImprezaGetActiveInstance();
|
184 |
-
|
185 |
-
if (typeof instance == 'object') {
|
186 |
-
instance.suggestions = [];
|
187 |
-
instance.hide();
|
188 |
-
instance.el.val('');
|
189 |
-
}
|
190 |
-
|
191 |
-
});
|
192 |
-
|
193 |
-
$('.w-search-open').on('click', function (e) {
|
194 |
-
|
195 |
-
if ($(window).width() < 900) {
|
196 |
-
e.preventDefault();
|
197 |
-
|
198 |
-
var $mobileHandler = $(e.target).closest('.w-search').find('.js-dgwt-wcas-enable-mobile-form');
|
199 |
-
|
200 |
-
if ($mobileHandler.length) {
|
201 |
-
$mobileHandler[0].click();
|
202 |
-
}
|
203 |
-
|
204 |
-
setTimeout(function () {
|
205 |
-
$('.w-search').removeClass('active');
|
206 |
-
}, 500);
|
207 |
-
}
|
208 |
-
|
209 |
-
});
|
210 |
-
|
211 |
-
});
|
212 |
-
|
213 |
-
|
214 |
-
})(jQuery);
|
215 |
-
|
216 |
-
</script>
|
217 |
-
<?php
|
218 |
-
}, 1000 );
|
219 |
-
|
220 |
}
|
221 |
-
|
222 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Impreza;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
use DgoraWcas\Helpers;
|
7 |
|
8 |
// Exit if accessed directly
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
class Impreza extends ThemeIntegration {
|
14 |
|
15 |
+
public function init() {
|
16 |
+
add_filter( 'dgwt/wcas/settings', function ( $settings ) {
|
17 |
+
$articleLink = 'https://fibosearch.com/documentation/themes-integrations/impreza-theme/';
|
18 |
+
$articleText = sprintf( __( 'Here is <a href="%s" target="_blank">article</a> about how to do it using Impreza child-theme.', 'ajax-search-for-woocommerce' ), $articleLink );
|
19 |
|
20 |
+
if ( isset( $settings['dgwt_wcas_basic'][52]['desc'] ) ) {
|
21 |
+
$settings['dgwt_wcas_basic'][52]['desc'] .= '<br />' . $articleText;
|
22 |
+
}
|
23 |
|
24 |
+
return $settings;
|
25 |
+
}, 20 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
+
public function extraFunctions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
add_filter( 'body_class', function ( $classes ) {
|
30 |
$classes[] = 'dgwt-wcas-theme-' . $this->themeSlug;
|
31 |
|
58 |
|
59 |
return $settings;
|
60 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
|
|
62 |
}
|
includes/Integrations/Themes/Kadence/Kadence.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Kadence;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Kadence extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'kadence';
|
16 |
-
$this->themeName = 'Kadence';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Konte/Konte.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Konte;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Konte extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'konte';
|
16 |
-
$this->themeName = 'Konte';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/OpenShop/OpenShop.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\OpenShop;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class OpenShop extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'open-shop';
|
16 |
-
$this->themeName = 'Open Shop';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/OpenShopPro/OpenShopPro.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\OpenShopPro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class OpenShopPro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'open-shop-pro';
|
16 |
-
$this->themeName = 'Open Shop Pro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Overwrite search
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
protected function maybeOverwriteSearch() {
|
27 |
-
// We load partial from free version of theme
|
28 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/open-shop.php';
|
29 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
30 |
-
require_once( $partialPath );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Rehub/Rehub.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Rehub;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Rehub extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'rehub-theme';
|
16 |
-
$this->themeName = 'Rehub';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Restoration/Restoration.php
CHANGED
@@ -2,143 +2,48 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Restoration;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Restoration {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
|
20 |
-
$this->maybeOverwriteSearch();
|
21 |
-
|
22 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Add settings
|
28 |
-
*
|
29 |
-
* @param array $settings
|
30 |
-
*
|
31 |
-
* @return array
|
32 |
-
*/
|
33 |
-
public function registerSettings( $settings ) {
|
34 |
-
$key = 'dgwt_wcas_basic';
|
35 |
-
|
36 |
-
$settings[ $key ][10] = array(
|
37 |
-
'name' => $this->themeSlug . '_main_head',
|
38 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
39 |
-
'type' => 'head',
|
40 |
-
'class' => 'dgwt-wcas-sgs-header'
|
41 |
-
);
|
42 |
-
|
43 |
-
$settings[ $key ][52] = array(
|
44 |
-
'name' => $this->themeSlug . '_settings_head',
|
45 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
46 |
-
'type' => 'desc',
|
47 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
48 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
49 |
-
);
|
50 |
-
|
51 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
52 |
-
if ( ! empty( $img ) ) {
|
53 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
54 |
-
}
|
55 |
-
|
56 |
-
$settings[ $key ][55] = array(
|
57 |
-
'name' => $this->themeSlug . '_replace_search',
|
58 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
59 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
60 |
-
'type' => 'checkbox',
|
61 |
-
'default' => 'off',
|
62 |
-
);
|
63 |
-
|
64 |
-
$settings[ $key ][90] = array(
|
65 |
-
'name' => $this->themeSlug . '_othersways__head',
|
66 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
67 |
-
'type' => 'head',
|
68 |
-
'class' => 'dgwt-wcas-sgs-header'
|
69 |
-
);
|
70 |
-
|
71 |
-
return $settings;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Check if can replace the native search form with the FiboSearch form.
|
76 |
-
*
|
77 |
-
* @return bool
|
78 |
-
*/
|
79 |
-
private function canReplaceSearch() {
|
80 |
-
$canIntegrate = false;
|
81 |
-
|
82 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
83 |
-
$canIntegrate = true;
|
84 |
-
}
|
85 |
-
|
86 |
-
return $canIntegrate;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Overwrite search
|
91 |
-
*
|
92 |
-
* @return void
|
93 |
-
*/
|
94 |
-
private function maybeOverwriteSearch() {
|
95 |
|
96 |
-
|
|
|
97 |
|
98 |
-
add_filter( 'wc_get_template', function ( $template, $templateName ) {
|
99 |
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
add_action( 'init', function () {
|
109 |
-
add_action( 'wp_head', array( $this, 'customCSS' ) );
|
110 |
-
} );
|
111 |
|
112 |
-
|
113 |
-
|
|
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
<style>
|
123 |
-
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
|
124 |
-
border: none;
|
125 |
-
background: transparent;
|
126 |
-
color: #fff;
|
127 |
-
text-align: center;
|
128 |
-
padding-right: 40px;
|
129 |
-
}
|
130 |
-
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus {
|
131 |
-
box-shadow: none;
|
132 |
-
}
|
133 |
-
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier {
|
134 |
-
display: none;
|
135 |
-
}
|
136 |
-
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
|
137 |
-
opacity: 0.8!important;
|
138 |
-
color: #fff;
|
139 |
-
}
|
140 |
-
</style>
|
141 |
-
<?php
|
142 |
}
|
143 |
-
|
144 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Restoration;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class Restoration extends ThemeIntegration {
|
13 |
+
public function extraFunctions() {
|
14 |
+
add_filter( 'wc_get_template', function ( $template, $templateName ) {
|
15 |
+
if ( ! empty( $templateName ) && $templateName === 'product-searchform.php' ) {
|
16 |
+
$template = DGWT_WCAS_DIR . 'partials/themes/restoration-searchform.php';
|
17 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
return $template;
|
20 |
+
}, 10, 5 );
|
21 |
|
|
|
22 |
|
23 |
+
add_action( 'wp_head', function () { ?>
|
24 |
+
<style>
|
25 |
+
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
|
26 |
+
border: none;
|
27 |
+
background: transparent;
|
28 |
+
color: #fff;
|
29 |
+
text-align: center;
|
30 |
+
padding-right: 40px;
|
31 |
}
|
32 |
|
33 |
+
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input:focus {
|
34 |
+
box-shadow: none;
|
35 |
+
}
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier {
|
38 |
+
display: none;
|
39 |
+
}
|
40 |
|
41 |
+
.thb-header-inline-search-inner .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
|
42 |
+
opacity: 0.8 !important;
|
43 |
+
color: #fff;
|
44 |
+
}
|
45 |
+
</style>
|
46 |
+
<?php
|
47 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
|
|
49 |
}
|
includes/Integrations/Themes/Salient/Salient.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Salient;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Salient extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'salient';
|
16 |
-
$this->themeName = 'Salient';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Savoy/Savoy.php
CHANGED
@@ -2,102 +2,19 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Savoy;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Savoy {
|
|
|
|
|
|
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
private $themeName = 'Savoy';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Overwrite search
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function maybeOverwriteSearch() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
$this->applyCSS();
|
95 |
-
|
96 |
-
add_filter( 'wc_get_template', array( $this, 'getTemplate' ), 10, 5 );
|
97 |
-
add_filter( 'nm_header_default_links', array( $this, 'headerLinks' ) );
|
98 |
-
|
99 |
-
add_action( 'wp_footer', array( $this, 'overwriteMobileSearch' ), 100 );
|
100 |
-
}
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -146,44 +63,4 @@ class Savoy {
|
|
146 |
<?php
|
147 |
}
|
148 |
}
|
149 |
-
|
150 |
-
/**
|
151 |
-
* Apply custom CSS
|
152 |
-
*
|
153 |
-
* @return void
|
154 |
-
*/
|
155 |
-
private function applyCSS() {
|
156 |
-
add_action( 'wp_head', function () {
|
157 |
-
global $nm_theme_options;
|
158 |
-
?>
|
159 |
-
<style>
|
160 |
-
.nm-shop-search-input-wrap .dgwt-wcas-search-wrapp {
|
161 |
-
max-width: 100%;
|
162 |
-
}
|
163 |
-
|
164 |
-
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon {
|
165 |
-
padding: 16px 12px 16px 0;
|
166 |
-
margin-left: 12px;
|
167 |
-
}
|
168 |
-
|
169 |
-
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
170 |
-
max-width: 16px;
|
171 |
-
}
|
172 |
-
|
173 |
-
<?php if (isset($nm_theme_options['header_navigation_highlight_color'])) { ?>
|
174 |
-
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
175 |
-
fill: <?php echo esc_attr( $nm_theme_options['header_navigation_color'] ); ?>
|
176 |
-
}
|
177 |
-
|
178 |
-
<?php }
|
179 |
-
if (isset($nm_theme_options['header_navigation_highlight_color'])) { ?>
|
180 |
-
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler:hover {
|
181 |
-
fill: <?php echo esc_attr( $nm_theme_options['header_navigation_highlight_color'] ); ?>
|
182 |
-
}
|
183 |
-
|
184 |
-
<?php } ?>
|
185 |
-
</style>
|
186 |
-
<?php
|
187 |
-
} );
|
188 |
-
}
|
189 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Savoy;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class Savoy extends ThemeIntegration {
|
13 |
+
public function extraFunctions() {
|
14 |
+
add_filter( 'wc_get_template', array( $this, 'getTemplate' ), 10, 5 );
|
15 |
+
add_filter( 'nm_header_default_links', array( $this, 'headerLinks' ) );
|
16 |
|
17 |
+
add_action( 'wp_footer', array( $this, 'overwriteMobileSearch' ), 100 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
/**
|
63 |
<?php
|
64 |
}
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
includes/Integrations/Themes/ShopIsle/ShopIsle.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\ShopIsle;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class ShopIsle extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'shop-isle';
|
16 |
-
$this->themeName = 'Shop Isle';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/ShopIslePro/ShopIslePro.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\ShopIslePro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class ShopIslePro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'shop-isle-pro';
|
16 |
-
$this->themeName = 'ShopIsle PRO';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Overwrite search
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
protected function maybeOverwriteSearch() {
|
27 |
-
// We load partial from free version of theme
|
28 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/shop-isle.php';
|
29 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
30 |
-
require_once( $partialPath );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Shopical/Shopical.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Shopical;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Shopical extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'shopical';
|
16 |
-
$this->themeName = 'Shopical';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/ShopicalPro/ShopicalPro.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\ShopicalPro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class ShopicalPro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'shopical-pro';
|
16 |
-
$this->themeName = 'Shopical Pro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Overwrite search
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
protected function maybeOverwriteSearch() {
|
27 |
-
// We load partial from free version of theme
|
28 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/shopical.php';
|
29 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
30 |
-
require_once( $partialPath );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Shopkeeper/Shopkeeper.php
CHANGED
@@ -2,27 +2,18 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Shopkeeper;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Shopkeeper {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
private $themeName = 'Shopkeeper';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
|
20 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
21 |
-
|
22 |
-
$this->maybeReplaceSearch();
|
23 |
}
|
24 |
|
25 |
-
|
26 |
/**
|
27 |
* Add settings
|
28 |
*
|
@@ -30,41 +21,13 @@ class Shopkeeper {
|
|
30 |
*
|
31 |
* @return array
|
32 |
*/
|
33 |
-
public function
|
34 |
$key = 'dgwt_wcas_basic';
|
35 |
|
36 |
-
|
37 |
-
'name' => $this->themeSlug . '_main_head',
|
38 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
39 |
-
'type' => 'head',
|
40 |
-
'class' => 'dgwt-wcas-sgs-header'
|
41 |
-
);
|
42 |
-
|
43 |
-
$settings[ $key ][52] = array(
|
44 |
-
'name' => $this->themeSlug . '_settings_head',
|
45 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
46 |
-
'type' => 'desc',
|
47 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
48 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
49 |
-
);
|
50 |
-
|
51 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
52 |
-
if ( ! empty( $img ) ) {
|
53 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
54 |
-
}
|
55 |
-
|
56 |
-
$settings[ $key ][55] = array(
|
57 |
-
'name' => 'shopkeeper_replace_search',
|
58 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
59 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
60 |
-
'type' => 'checkbox',
|
61 |
-
'default' => 'on',
|
62 |
-
);
|
63 |
-
|
64 |
-
if( class_exists('Shopkeeper_Opt') && !\Shopkeeper_Opt::getOption( 'predictive_search', true ) ) {
|
65 |
|
66 |
-
$desc =
|
67 |
-
$desc .=
|
68 |
|
69 |
|
70 |
$settings[ $key ][58] = array(
|
@@ -76,185 +39,6 @@ class Shopkeeper {
|
|
76 |
);
|
77 |
}
|
78 |
|
79 |
-
$settings[ $key ][90] = array(
|
80 |
-
'name' => $this->themeSlug . '_othersways__head',
|
81 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
82 |
-
'type' => 'head',
|
83 |
-
'class' => 'dgwt-wcas-sgs-header'
|
84 |
-
);
|
85 |
-
|
86 |
return $settings;
|
87 |
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Check if can replace the native Woodmart search form with the FiboSearch form.
|
91 |
-
*
|
92 |
-
* @return bool
|
93 |
-
*/
|
94 |
-
private function canReplaceSearch() {
|
95 |
-
$canIntegrate = false;
|
96 |
-
|
97 |
-
if ( DGWT_WCAS()->settings->getOption( 'shopkeeper_replace_search', 'on' ) === 'on' ) {
|
98 |
-
$canIntegrate = true;
|
99 |
-
}
|
100 |
-
|
101 |
-
return $canIntegrate;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Maybe replace the default search bar
|
106 |
-
*
|
107 |
-
* @return void
|
108 |
-
*/
|
109 |
-
private function maybeReplaceSearch() {
|
110 |
-
|
111 |
-
if ( $this->canReplaceSearch() ) {
|
112 |
-
|
113 |
-
// Add scripts
|
114 |
-
add_action( 'wp_head', array( $this, 'customCSS' ) );
|
115 |
-
add_action( 'wp_footer', array( $this, 'customJS' ) );
|
116 |
-
|
117 |
-
// Remove native form
|
118 |
-
add_action( 'init', function () {
|
119 |
-
remove_action( 'wp_loaded', 'shopkeeper_predictive_search', 100 );
|
120 |
-
} );
|
121 |
-
|
122 |
-
// Embed search bar
|
123 |
-
add_action( 'getbowtied_product_search', function () {
|
124 |
-
echo do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="767"]' );
|
125 |
-
} );
|
126 |
-
|
127 |
-
// Change mobile breakpoint from 992 to 767
|
128 |
-
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
129 |
-
return 767;
|
130 |
-
} );
|
131 |
-
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Custom CSS
|
137 |
-
*
|
138 |
-
* @return void
|
139 |
-
*/
|
140 |
-
public function customCSS() {
|
141 |
-
?>
|
142 |
-
<style>
|
143 |
-
.site-search.off-canvas {
|
144 |
-
min-height: 100px;
|
145 |
-
}
|
146 |
-
|
147 |
-
.admin-bar .site-search.off-canvas {
|
148 |
-
min-height: 130px;
|
149 |
-
}
|
150 |
-
|
151 |
-
.site-search.off-canvas > .row {
|
152 |
-
margin-top: 30px;
|
153 |
-
}
|
154 |
-
|
155 |
-
.site-search.off-canvas p.search-text {
|
156 |
-
position: absolute;
|
157 |
-
top: 14px;
|
158 |
-
left: 20px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.site-search-close {
|
162 |
-
position: absolute;
|
163 |
-
top: 5px;
|
164 |
-
right: 20px;
|
165 |
-
}
|
166 |
-
|
167 |
-
.site-search .dgwt-wcas-search-wrapp {
|
168 |
-
max-width: 800px;
|
169 |
-
}
|
170 |
-
|
171 |
-
.site-search .dgwt-wcas-search-input {
|
172 |
-
font-size: 20px;
|
173 |
-
border: none;
|
174 |
-
border-bottom: 1px solid #ccc;
|
175 |
-
}
|
176 |
-
|
177 |
-
@media (max-width: 1400px) {
|
178 |
-
.site-search .dgwt-wcas-search-wrapp {
|
179 |
-
max-width: 700px;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
@media (max-width: 1250px) {
|
184 |
-
.site-search .dgwt-wcas-search-wrapp {
|
185 |
-
max-width: 500px;
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
@media (max-width: 1000px) {
|
190 |
-
.site-search.off-canvas p.search-text {
|
191 |
-
display: none;
|
192 |
-
}
|
193 |
-
|
194 |
-
.site-search .dgwt-wcas-search-wrapp {
|
195 |
-
max-width: calc(100% - 30px);
|
196 |
-
margin-left: 0;
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
@media (max-width: 768px) {
|
201 |
-
/*.site-search.off-canvas {*/
|
202 |
-
/* display: none;*/
|
203 |
-
/*}*/
|
204 |
-
}
|
205 |
-
|
206 |
-
</style>
|
207 |
-
<?php
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Custom JS
|
212 |
-
*
|
213 |
-
* @return void
|
214 |
-
*/
|
215 |
-
public function customJS() {
|
216 |
-
?>
|
217 |
-
<script>
|
218 |
-
(function ($) {
|
219 |
-
|
220 |
-
if ($(window).width() > 767) {
|
221 |
-
|
222 |
-
$('.search-button').on('click', function () {
|
223 |
-
|
224 |
-
var $input = $('.site-search .dgwt-wcas-search-input');
|
225 |
-
|
226 |
-
if ($input.length) {
|
227 |
-
setTimeout(function () {
|
228 |
-
$input.focus();
|
229 |
-
}, 300);
|
230 |
-
}
|
231 |
-
});
|
232 |
-
|
233 |
-
} else {
|
234 |
-
|
235 |
-
$('.search-button').on('click', function () {
|
236 |
-
|
237 |
-
var $mobileHandler = $('.site-search .js-dgwt-wcas-enable-mobile-form');
|
238 |
-
|
239 |
-
if ($mobileHandler.length) {
|
240 |
-
$mobileHandler[0].click();
|
241 |
-
|
242 |
-
setTimeout(function () {
|
243 |
-
if($('.site-search-close button').length){
|
244 |
-
$('.site-search-close button').click();
|
245 |
-
}
|
246 |
-
}, 300);
|
247 |
-
|
248 |
-
}
|
249 |
-
|
250 |
-
});
|
251 |
-
|
252 |
-
|
253 |
-
}
|
254 |
-
|
255 |
-
})(jQuery);
|
256 |
-
</script>
|
257 |
-
<?php
|
258 |
-
}
|
259 |
-
|
260 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Shopkeeper;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class Shopkeeper extends ThemeIntegration {
|
13 |
+
public function init() {
|
14 |
+
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettingsExtra' ), 20 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
|
|
17 |
/**
|
18 |
* Add settings
|
19 |
*
|
21 |
*
|
22 |
* @return array
|
23 |
*/
|
24 |
+
public function registerSettingsExtra( $settings ) {
|
25 |
$key = 'dgwt_wcas_basic';
|
26 |
|
27 |
+
if ( class_exists( 'Shopkeeper_Opt' ) && ! \Shopkeeper_Opt::getOption( 'predictive_search', true ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
+
$desc = '<p>' . __( 'To replace the search bar you have to enable the "Predictive Search" option in the Shopkeeper settings.', 'ajax-search-for-woocommerce' ) . '<p>';
|
30 |
+
$desc .= '<p>' . sprintf( __( 'Go to <code>Appearance -> <a target="_blank" href="%s">Customize</a> -> Header -> Search</code> and enable <code>Predictive Search</code>', 'ajax-search-for-woocommerce' ), admin_url( 'customize.php' ) ) . '<p>';
|
31 |
|
32 |
|
33 |
$settings[ $key ][58] = array(
|
39 |
);
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
return $settings;
|
43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
includes/Integrations/Themes/Sober/Sober.php
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Sober;
|
4 |
-
|
5 |
-
use DgoraWcas\Helpers;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Sober {
|
13 |
-
|
14 |
-
private $themeSlug = 'sober';
|
15 |
-
|
16 |
-
private $themeName = 'Sober';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->maybeOverwriteSearch();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Add settings
|
26 |
-
*
|
27 |
-
* @param array $settings
|
28 |
-
*
|
29 |
-
* @return array
|
30 |
-
*/
|
31 |
-
public function registerSettings( $settings ) {
|
32 |
-
$key = 'dgwt_wcas_basic';
|
33 |
-
|
34 |
-
$settings[ $key ][10] = array(
|
35 |
-
'name' => $this->themeSlug . '_main_head',
|
36 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
37 |
-
'type' => 'head',
|
38 |
-
'class' => 'dgwt-wcas-sgs-header'
|
39 |
-
);
|
40 |
-
|
41 |
-
$settings[ $key ][52] = array(
|
42 |
-
'name' => $this->themeSlug . '_settings_head',
|
43 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
44 |
-
'type' => 'desc',
|
45 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
46 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
47 |
-
);
|
48 |
-
|
49 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
50 |
-
if ( ! empty( $img ) ) {
|
51 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
52 |
-
}
|
53 |
-
|
54 |
-
$settings[ $key ][55] = array(
|
55 |
-
'name' => $this->themeSlug . '_replace_search',
|
56 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
57 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
58 |
-
'type' => 'checkbox',
|
59 |
-
'default' => 'off',
|
60 |
-
);
|
61 |
-
|
62 |
-
$settings[ $key ][90] = array(
|
63 |
-
'name' => $this->themeSlug . '_othersways__head',
|
64 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
65 |
-
'type' => 'head',
|
66 |
-
'class' => 'dgwt-wcas-sgs-header'
|
67 |
-
);
|
68 |
-
|
69 |
-
return $settings;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Check if can replace the native search form with the FiboSearch form.
|
74 |
-
*
|
75 |
-
* @return bool
|
76 |
-
*/
|
77 |
-
private function canReplaceSearch() {
|
78 |
-
$canIntegrate = false;
|
79 |
-
|
80 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
81 |
-
$canIntegrate = true;
|
82 |
-
}
|
83 |
-
|
84 |
-
return $canIntegrate;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Overwrite search
|
89 |
-
*
|
90 |
-
* @return void
|
91 |
-
*/
|
92 |
-
private function maybeOverwriteSearch() {
|
93 |
-
if ( $this->canReplaceSearch() ) {
|
94 |
-
$this->applyCSS();
|
95 |
-
|
96 |
-
add_filter( 'dgwt/wcas/form/magnifier_ico', function ( $html, $class ) {
|
97 |
-
if ( $class === 'dgwt-wcas-ico-magnifier-handler' ) {
|
98 |
-
$html = '<svg class="dgwt-wcas-ico-magnifier-handler" viewBox="0 0 20 20" id="search"><circle fill="none" stroke-width="2" stroke-miterlimit="10" cx="8.35" cy="8.35" r="6.5"></circle><path fill="none" stroke-width="2" stroke-miterlimit="10" d="M12.945 12.945l5.205 5.205"></path></svg>';
|
99 |
-
}
|
100 |
-
return $html;
|
101 |
-
}, 10, 2 );
|
102 |
-
|
103 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/sober.php';
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Apply custom CSS
|
109 |
-
*
|
110 |
-
* @return void
|
111 |
-
*/
|
112 |
-
private function applyCSS() {
|
113 |
-
add_action( 'wp_head', function () {
|
114 |
-
?>
|
115 |
-
<style>
|
116 |
-
#mobile-menu .dgwt-wcas-search-wrapp {
|
117 |
-
margin-bottom: 15px;
|
118 |
-
}
|
119 |
-
.menu-item-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
120 |
-
max-width: 18px;
|
121 |
-
}
|
122 |
-
</style>
|
123 |
-
<?php
|
124 |
-
} );
|
125 |
-
}
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Storefront/Storefront.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Storefront;
|
4 |
|
|
|
5 |
use DgoraWcas\Helpers;
|
6 |
|
7 |
// Exit if accessed directly
|
@@ -9,106 +10,19 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Storefront {
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->overwriteFunctions();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Add settings
|
27 |
-
*
|
28 |
-
* @param array $settings
|
29 |
-
*
|
30 |
-
* @return array
|
31 |
-
*/
|
32 |
-
public function registerSettings( $settings ) {
|
33 |
-
$key = 'dgwt_wcas_basic';
|
34 |
-
|
35 |
-
$settings[ $key ][10] = array(
|
36 |
-
'name' => $this->themeSlug . '_main_head',
|
37 |
-
'label' => __( 'Replace Storefront search bar', 'ajax-search-for-woocommerce' ),
|
38 |
-
'type' => 'head',
|
39 |
-
'class' => 'dgwt-wcas-sgs-header'
|
40 |
-
);
|
41 |
-
|
42 |
-
$settings[ $key ][52] = array(
|
43 |
-
'name' => $this->themeSlug . '_settings_head',
|
44 |
-
'label' => __( 'Storefront Theme', 'ajax-search-for-woocommerce' ),
|
45 |
-
'type' => 'desc',
|
46 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
47 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
48 |
-
);
|
49 |
-
|
50 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
51 |
-
if ( ! empty( $img ) ) {
|
52 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
53 |
-
}
|
54 |
-
|
55 |
-
$settings[ $key ][55] = array(
|
56 |
-
'name' => 'storefront_replace_search',
|
57 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
58 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
59 |
-
'type' => 'checkbox',
|
60 |
-
'default' => 'off',
|
61 |
-
);
|
62 |
-
|
63 |
-
$settings[ $key ][90] = array(
|
64 |
-
'name' => $this->themeSlug . '_othersways__head',
|
65 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
66 |
-
'type' => 'head',
|
67 |
-
'class' => 'dgwt-wcas-sgs-header'
|
68 |
-
);
|
69 |
-
|
70 |
-
return $settings;
|
71 |
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Check if can replace the native Storefront search form with the FiboSearch form.
|
75 |
-
*
|
76 |
-
* @return bool
|
77 |
-
*/
|
78 |
-
private function canReplaceSearch() {
|
79 |
-
$canIntegrate = false;
|
80 |
-
|
81 |
-
if ( DGWT_WCAS()->settings->getOption( 'storefront_replace_search', 'off' ) === 'on' ) {
|
82 |
-
$canIntegrate = true;
|
83 |
-
}
|
84 |
-
|
85 |
-
return $canIntegrate;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Overwrite funtions
|
90 |
-
*
|
91 |
-
* @return void
|
92 |
-
*/
|
93 |
-
private function overwriteFunctions() {
|
94 |
-
if ( $this->canReplaceSearch() ) {
|
95 |
-
|
96 |
-
// Force enabling the option "mobile overlay"
|
97 |
-
add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
|
98 |
-
return 'on';
|
99 |
-
} );
|
100 |
-
|
101 |
-
// Mark that the value of the option "mobile overlay" is forced
|
102 |
-
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
103 |
-
$settings[680]['disabled'] = true;
|
104 |
-
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
105 |
-
|
106 |
-
return $settings;
|
107 |
-
} );
|
108 |
-
|
109 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/storefront.php';
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
|
114 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Storefront;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
use DgoraWcas\Helpers;
|
7 |
|
8 |
// Exit if accessed directly
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
class Storefront extends ThemeIntegration {
|
14 |
+
public function extraFunctions() {
|
15 |
+
// Force enabling the option "mobile overlay"
|
16 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
|
17 |
+
return 'on';
|
18 |
+
} );
|
19 |
|
20 |
+
// Mark that the value of the option "mobile overlay" is forced
|
21 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
22 |
+
$settings[680]['disabled'] = true;
|
23 |
+
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
24 |
|
25 |
+
return $settings;
|
26 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
includes/Integrations/Themes/Supro/Supro.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Supro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Supro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'supro';
|
16 |
-
$this->themeName = 'Supro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/The7/The7.php
CHANGED
@@ -2,104 +2,31 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\The7;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class The7 {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
-
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Add settings
|
29 |
-
*
|
30 |
-
* @param array $settings
|
31 |
-
*
|
32 |
-
* @return array
|
33 |
-
*/
|
34 |
-
public function registerSettings( $settings ) {
|
35 |
-
$key = 'dgwt_wcas_basic';
|
36 |
-
|
37 |
-
$settings[ $key ][10] = array(
|
38 |
-
'name' => $this->themeSlug . '_main_head',
|
39 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
40 |
-
'type' => 'head',
|
41 |
-
'class' => 'dgwt-wcas-sgs-header'
|
42 |
-
);
|
43 |
-
|
44 |
-
$settings[ $key ][52] = array(
|
45 |
-
'name' => $this->themeSlug . '_settings_head',
|
46 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
47 |
-
'type' => 'desc',
|
48 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
49 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
50 |
-
);
|
51 |
-
|
52 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
53 |
-
if ( ! empty( $img ) ) {
|
54 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
55 |
-
}
|
56 |
-
|
57 |
-
$settings[ $key ][55] = array(
|
58 |
-
'name' => $this->themeSlug . '_replace_search',
|
59 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
60 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
61 |
-
'type' => 'checkbox',
|
62 |
-
'default' => 'off',
|
63 |
-
);
|
64 |
-
|
65 |
-
$settings[ $key ][90] = array(
|
66 |
-
'name' => $this->themeSlug . '_othersways__head',
|
67 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
68 |
-
'type' => 'head',
|
69 |
-
'class' => 'dgwt-wcas-sgs-header'
|
70 |
-
);
|
71 |
-
|
72 |
-
return $settings;
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Check if can replace the native Woodmart search form with the FiboSearch form.
|
77 |
-
*
|
78 |
-
* @return bool
|
79 |
-
*/
|
80 |
-
private function canReplaceSearch() {
|
81 |
-
$canIntegrate = false;
|
82 |
-
|
83 |
-
if ( DGWT_WCAS()->settings->getOption( $this->themeSlug . '_replace_search', 'off' ) === 'on' ) {
|
84 |
-
$canIntegrate = true;
|
85 |
-
}
|
86 |
-
|
87 |
-
return $canIntegrate;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Overwrite search
|
92 |
-
*
|
93 |
-
* @return void
|
94 |
-
*/
|
95 |
-
private function maybeOverwriteSearch() {
|
96 |
-
if ( $this->canReplaceSearch() ) {
|
97 |
-
|
98 |
-
$this->applyCSS();
|
99 |
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
|
103 |
}
|
104 |
|
105 |
/**
|
@@ -109,35 +36,10 @@ class The7 {
|
|
109 |
* @param array $templateNames
|
110 |
*/
|
111 |
public function changeTemplatePath( $templateName, $templateNames ) {
|
112 |
-
|
113 |
if ( strpos( $templateName, 'searchform.php' ) !== false ) {
|
114 |
$templateName = DGWT_WCAS_DIR . 'partials/themes/the7-searchform.php';
|
115 |
}
|
116 |
|
117 |
return $templateName;
|
118 |
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Apply custom CSS
|
122 |
-
*
|
123 |
-
* @return void
|
124 |
-
*/
|
125 |
-
private function applyCSS() {
|
126 |
-
|
127 |
-
add_action( 'wp_head', function () {
|
128 |
-
?>
|
129 |
-
<style>
|
130 |
-
.mini-widgets .dgwt-wcas-search-icon {
|
131 |
-
width: 17px;
|
132 |
-
margin-top: -2px;
|
133 |
-
}
|
134 |
-
.mini-widgets .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
|
135 |
-
top: calc(100% + 5px);
|
136 |
-
}
|
137 |
-
</style>
|
138 |
-
<?php
|
139 |
-
} );
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\The7;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class The7 extends ThemeIntegration {
|
13 |
+
public function extraFunctions() {
|
14 |
+
add_action( 'wp_head', function () {
|
15 |
+
?>
|
16 |
+
<style>
|
17 |
+
.mini-widgets .dgwt-wcas-search-icon {
|
18 |
+
width: 17px;
|
19 |
+
margin-top: -2px;
|
20 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
.mini-widgets .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
|
23 |
+
top: calc(100% + 5px);
|
24 |
+
}
|
25 |
+
</style>
|
26 |
+
<?php
|
27 |
+
} );
|
28 |
|
29 |
+
add_filter( 'presscore_template_manager_located_template', array( $this, 'changeTemplatePath' ), 10, 2 );
|
30 |
}
|
31 |
|
32 |
/**
|
36 |
* @param array $templateNames
|
37 |
*/
|
38 |
public function changeTemplatePath( $templateName, $templateNames ) {
|
|
|
39 |
if ( strpos( $templateName, 'searchform.php' ) !== false ) {
|
40 |
$templateName = DGWT_WCAS_DIR . 'partials/themes/the7-searchform.php';
|
41 |
}
|
42 |
|
43 |
return $templateName;
|
44 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
includes/Integrations/Themes/TheGem/TheGem.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\TheGem;
|
4 |
|
|
|
5 |
use DgoraWcas\Helpers;
|
6 |
|
7 |
// Exit if accessed directly
|
@@ -9,62 +10,48 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class TheGem {
|
|
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
if ( $this->canReplaceSearch() ) {
|
22 |
-
add_action( 'init', function () {
|
23 |
-
|
24 |
-
// Header Vertical
|
25 |
-
remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_search', 10, 2 );
|
26 |
-
add_filter( 'wp_nav_menu_items', array( $this, 'replaceSearchInMenu' ), 10, 2 );
|
27 |
-
|
28 |
-
// Header Fullwidth hamburger
|
29 |
-
remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_hamburger_widget', 100, 2 );
|
30 |
-
add_action( 'thegem_before_nav_menu', function () {
|
31 |
-
if ( in_array( thegem_get_option( 'header_layout' ), array( 'perspective', 'fullwidth_hamburger' ) ) ) {
|
32 |
-
echo do_shortcode( '[wcas-search-form]' );
|
33 |
-
}
|
34 |
-
} );
|
35 |
-
|
36 |
-
// Perspective header
|
37 |
-
remove_filter( 'get_search_form', 'thegem_serch_form_vertical_header' );
|
38 |
-
add_action( 'thegem_perspective_menu_buttons', function () {
|
39 |
echo do_shortcode( '[wcas-search-form]' );
|
40 |
-
}
|
41 |
-
|
42 |
} );
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
|
49 |
-
return 'on';
|
50 |
} );
|
51 |
|
52 |
-
|
53 |
-
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
54 |
-
$settings[680]['disabled'] = true;
|
55 |
-
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
56 |
|
57 |
-
|
58 |
-
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
63 |
|
|
|
|
|
|
|
|
|
64 |
|
|
|
|
|
65 |
}
|
66 |
|
67 |
-
|
68 |
/**
|
69 |
* Add settings
|
70 |
*
|
@@ -72,52 +59,7 @@ class TheGem {
|
|
72 |
*
|
73 |
* @return array
|
74 |
*/
|
75 |
-
public function
|
76 |
-
$key = 'dgwt_wcas_basic';
|
77 |
-
|
78 |
-
$settings[ $key ][10] = array(
|
79 |
-
'name' => $this->themeSlug . '_main_head',
|
80 |
-
'label' => __( 'Replace a search bar in TheGem ', 'ajax-search-for-woocommerce' ),
|
81 |
-
'type' => 'head',
|
82 |
-
'class' => 'dgwt-wcas-sgs-header'
|
83 |
-
);
|
84 |
-
|
85 |
-
$settings[ $key ][52] = array(
|
86 |
-
'name' => $this->themeSlug . '_settings_head',
|
87 |
-
'label' => __( 'TheGem Theme', 'ajax-search-for-woocommerce' ),
|
88 |
-
'type' => 'desc',
|
89 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
90 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
91 |
-
);
|
92 |
-
|
93 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
94 |
-
if ( ! empty( $img ) ) {
|
95 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
96 |
-
}
|
97 |
-
|
98 |
-
$settings[ $key ][55] = array(
|
99 |
-
'name' => 'thegem_replace_search',
|
100 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
101 |
-
'desc' => __( 'Replace the TheGem default search', 'ajax-search-for-woocommerce' ),
|
102 |
-
'type' => 'checkbox',
|
103 |
-
'default' => 'off',
|
104 |
-
);
|
105 |
-
|
106 |
-
$settings[ $key ][90] = array(
|
107 |
-
'name' => $this->themeSlug . '_othersways__head',
|
108 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
109 |
-
'type' => 'head',
|
110 |
-
'class' => 'dgwt-wcas-sgs-header'
|
111 |
-
);
|
112 |
-
|
113 |
-
|
114 |
-
$settings[ $key ][90] = array(
|
115 |
-
'name' => $this->themeSlug . '_othersways__head',
|
116 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
117 |
-
'type' => 'head',
|
118 |
-
'class' => 'dgwt-wcas-sgs-header'
|
119 |
-
);
|
120 |
-
|
121 |
// Remove overlay search from settings because enable mobile overlay will be forced
|
122 |
if ( $this->canReplaceSearch() ) {
|
123 |
unset( $settings['dgwt_wcas_form_body'][1300] );
|
@@ -127,21 +69,6 @@ class TheGem {
|
|
127 |
return $settings;
|
128 |
}
|
129 |
|
130 |
-
/**
|
131 |
-
* Check if can replace the native TheGem search form with the FiboSearch form.
|
132 |
-
*
|
133 |
-
* @return bool
|
134 |
-
*/
|
135 |
-
private function canReplaceSearch() {
|
136 |
-
$canIntegrate = false;
|
137 |
-
|
138 |
-
if ( DGWT_WCAS()->settings->getOption( 'thegem_replace_search', 'off' ) === 'on' ) {
|
139 |
-
$canIntegrate = true;
|
140 |
-
}
|
141 |
-
|
142 |
-
return $canIntegrate;
|
143 |
-
}
|
144 |
-
|
145 |
/**
|
146 |
* Replace the search in main menu
|
147 |
*
|
@@ -151,7 +78,6 @@ class TheGem {
|
|
151 |
* @return string
|
152 |
*/
|
153 |
public function replaceSearchInMenu( $items, $args ) {
|
154 |
-
|
155 |
if ( $args->theme_location == 'primary' && ! thegem_get_option( 'hide_search_icon' ) ) {
|
156 |
$items .= '<li class="menu-item menu-item-search dgwt-wcas-thegem-menu-search">';
|
157 |
$items .= '<a href="#"></a>';
|
@@ -173,12 +99,10 @@ class TheGem {
|
|
173 |
* @return string
|
174 |
*/
|
175 |
public function removeSearchBarFromVerticalHeader( $form ) {
|
176 |
-
|
177 |
if ( in_array( thegem_get_option( 'header_layout' ), array( 'fullwidth_hamburger', 'vertical' ) ) ) {
|
178 |
$form = '';
|
179 |
}
|
180 |
|
181 |
-
|
182 |
return $form;
|
183 |
}
|
184 |
|
@@ -188,7 +112,6 @@ class TheGem {
|
|
188 |
* @return void
|
189 |
*/
|
190 |
public function addSearchBarToVerticalHeader() {
|
191 |
-
|
192 |
if ( ! in_array( thegem_get_option( 'header_layout' ), array( 'vertical' ) ) ) {
|
193 |
return;
|
194 |
}
|
@@ -199,113 +122,4 @@ class TheGem {
|
|
199 |
|
200 |
echo $html;
|
201 |
}
|
202 |
-
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Custom CSS
|
206 |
-
*
|
207 |
-
* @return void
|
208 |
-
*/
|
209 |
-
public function customCSS() {
|
210 |
-
?>
|
211 |
-
<style>
|
212 |
-
.dgwt-wcas-thegem-menu-search .minisearch {
|
213 |
-
width: 500px;
|
214 |
-
}
|
215 |
-
|
216 |
-
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
217 |
-
top: 30px;
|
218 |
-
position: absolute;
|
219 |
-
max-width: 600px;
|
220 |
-
left: 270px;
|
221 |
-
right: auto;
|
222 |
-
margin: 0 auto;
|
223 |
-
z-index: 10;
|
224 |
-
}
|
225 |
-
|
226 |
-
@media (max-width: 979px) {
|
227 |
-
.dgwt-wcas-thegem-menu-search .minisearch {
|
228 |
-
width: 100%;
|
229 |
-
}
|
230 |
-
|
231 |
-
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
232 |
-
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
233 |
-
max-width: 350px;
|
234 |
-
}
|
235 |
-
|
236 |
-
.header-style-vertical #site-header-wrapper .dgwt-wcas-thegem-vertical-search {
|
237 |
-
display: none;
|
238 |
-
}
|
239 |
-
}
|
240 |
-
|
241 |
-
@media (max-width: 769px) {
|
242 |
-
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
243 |
-
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
244 |
-
display: none;
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
|
249 |
-
#page.vertical-header .dgwt-wcas-thegem-vertical-search {
|
250 |
-
margin-right: auto;
|
251 |
-
margin-left: auto;
|
252 |
-
padding-left: 21px;
|
253 |
-
padding-right: 21px;
|
254 |
-
}
|
255 |
-
|
256 |
-
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp {
|
257 |
-
top: 30px;
|
258 |
-
position: absolute;
|
259 |
-
left: 50px;
|
260 |
-
max-width: 600px;
|
261 |
-
}
|
262 |
-
|
263 |
-
.site-header.fixed .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
264 |
-
.site-header.fixed .header-layout-perspective > .dgwt-wcas-search-wrapp {
|
265 |
-
top: 8px;
|
266 |
-
}
|
267 |
-
|
268 |
-
body .header-layout-overlay #primary-menu.no-responsive.overlay-search-form-show.animated-minisearch > li.menu-item-search > .minisearch {
|
269 |
-
top: 0;
|
270 |
-
bottom: auto;
|
271 |
-
}
|
272 |
-
</style>
|
273 |
-
<?php
|
274 |
-
}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* Custom JS
|
278 |
-
*
|
279 |
-
* @return void
|
280 |
-
*/
|
281 |
-
public function customJS() {
|
282 |
-
?>
|
283 |
-
<script>
|
284 |
-
(function ($) {
|
285 |
-
|
286 |
-
$('.header-layout-overlay .dgwt-wcas-thegem-menu-search').on('click', function () {
|
287 |
-
var $searchHandler = $(this).find('.js-dgwt-wcas-enable-mobile-form');
|
288 |
-
|
289 |
-
if ($searchHandler.length) {
|
290 |
-
$searchHandler[0].click();
|
291 |
-
}
|
292 |
-
|
293 |
-
|
294 |
-
});
|
295 |
-
|
296 |
-
$('.dgwt-wcas-thegem-menu-search').on('click', function () {
|
297 |
-
var $input = $(this).find('.dgwt-wcas-search-input');
|
298 |
-
|
299 |
-
if ($input.length) {
|
300 |
-
setTimeout(function () {
|
301 |
-
$input.focus();
|
302 |
-
}, 300);
|
303 |
-
}
|
304 |
-
});
|
305 |
-
|
306 |
-
})(jQuery);
|
307 |
-
</script>
|
308 |
-
<?php
|
309 |
-
}
|
310 |
-
|
311 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\TheGem;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
use DgoraWcas\Helpers;
|
7 |
|
8 |
// Exit if accessed directly
|
10 |
exit;
|
11 |
}
|
12 |
|
13 |
+
class TheGem extends ThemeIntegration {
|
14 |
+
public function extraFunctions() {
|
15 |
+
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettingsExtra' ), 20 );
|
16 |
|
17 |
+
add_action( 'init', function () {
|
18 |
+
// Header Vertical
|
19 |
+
remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_search', 10, 2 );
|
20 |
+
add_filter( 'wp_nav_menu_items', array( $this, 'replaceSearchInMenu' ), 10, 2 );
|
21 |
|
22 |
+
// Header Fullwidth hamburger
|
23 |
+
remove_filter( 'wp_nav_menu_items', 'thegem_menu_item_hamburger_widget', 100, 2 );
|
24 |
+
add_action( 'thegem_before_nav_menu', function () {
|
25 |
+
if ( in_array( thegem_get_option( 'header_layout' ), array( 'perspective', 'fullwidth_hamburger' ) ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
echo do_shortcode( '[wcas-search-form]' );
|
27 |
+
}
|
|
|
28 |
} );
|
29 |
|
30 |
+
// Perspective header
|
31 |
+
remove_filter( 'get_search_form', 'thegem_serch_form_vertical_header' );
|
32 |
+
add_action( 'thegem_perspective_menu_buttons', function () {
|
33 |
+
echo do_shortcode( '[wcas-search-form]' );
|
|
|
|
|
34 |
} );
|
35 |
|
36 |
+
} );
|
|
|
|
|
|
|
37 |
|
38 |
+
add_filter( 'get_search_form', array( $this, 'removeSearchBarFromVerticalHeader' ), 100 );
|
39 |
+
add_action( 'thegem_before_header', array( $this, 'addSearchBarToVerticalHeader' ), 20 );
|
40 |
|
41 |
+
// Force enabling the option "mobile overlay"
|
42 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=enable_mobile_overlay', function () {
|
43 |
+
return 'on';
|
44 |
+
} );
|
45 |
|
46 |
+
// Mark that the value of the option "mobile overlay" is forced
|
47 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
48 |
+
$settings[680]['disabled'] = true;
|
49 |
+
$settings[680]['label'] = Helpers::createOverrideTooltip( 'ovtt-storefront-mobile-overlay', Helpers::getOverrideOptionText( $this->themeName ) ) . $settings[680]['label'];
|
50 |
|
51 |
+
return $settings;
|
52 |
+
} );
|
53 |
}
|
54 |
|
|
|
55 |
/**
|
56 |
* Add settings
|
57 |
*
|
59 |
*
|
60 |
* @return array
|
61 |
*/
|
62 |
+
public function registerSettingsExtra( $settings ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
// Remove overlay search from settings because enable mobile overlay will be forced
|
64 |
if ( $this->canReplaceSearch() ) {
|
65 |
unset( $settings['dgwt_wcas_form_body'][1300] );
|
69 |
return $settings;
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
/**
|
73 |
* Replace the search in main menu
|
74 |
*
|
78 |
* @return string
|
79 |
*/
|
80 |
public function replaceSearchInMenu( $items, $args ) {
|
|
|
81 |
if ( $args->theme_location == 'primary' && ! thegem_get_option( 'hide_search_icon' ) ) {
|
82 |
$items .= '<li class="menu-item menu-item-search dgwt-wcas-thegem-menu-search">';
|
83 |
$items .= '<a href="#"></a>';
|
99 |
* @return string
|
100 |
*/
|
101 |
public function removeSearchBarFromVerticalHeader( $form ) {
|
|
|
102 |
if ( in_array( thegem_get_option( 'header_layout' ), array( 'fullwidth_hamburger', 'vertical' ) ) ) {
|
103 |
$form = '';
|
104 |
}
|
105 |
|
|
|
106 |
return $form;
|
107 |
}
|
108 |
|
112 |
* @return void
|
113 |
*/
|
114 |
public function addSearchBarToVerticalHeader() {
|
|
|
115 |
if ( ! in_array( thegem_get_option( 'header_layout' ), array( 'vertical' ) ) ) {
|
116 |
return;
|
117 |
}
|
122 |
|
123 |
echo $html;
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
includes/Integrations/Themes/TheGemElementor/TheGemElementor.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\TheGemElementor;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class TheGemElementor extends ThemeIntegration {
|
13 |
-
public function __construct() {
|
14 |
-
$this->themeSlug = 'thegem-elementor';
|
15 |
-
$this->themeName = 'TheGem (Elementor)';
|
16 |
-
|
17 |
-
parent::__construct();
|
18 |
-
}
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/TheGemWPBakery/TheGemWPBakery.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\TheGemWPBakery;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class TheGemWPBakery extends ThemeIntegration {
|
13 |
-
public function __construct() {
|
14 |
-
$this->themeSlug = 'thegem-wpbakery';
|
15 |
-
$this->themeName = 'TheGem (WPBakery)';
|
16 |
-
|
17 |
-
parent::__construct();
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Overwrite search
|
22 |
-
*
|
23 |
-
* @return void
|
24 |
-
*/
|
25 |
-
protected function maybeOverwriteSearch() {
|
26 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/thegem-elementor.php';
|
27 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
28 |
-
require_once( $partialPath );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/ThemesCompatibility.php
CHANGED
@@ -8,7 +8,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
8 |
}
|
9 |
|
10 |
class ThemesCompatibility {
|
|
|
11 |
private $themeName = '';
|
|
|
12 |
private $theme = null;
|
13 |
private $supportActive = false;
|
14 |
|
@@ -19,25 +21,28 @@ class ThemesCompatibility {
|
|
19 |
}
|
20 |
|
21 |
private function setCurrentTheme() {
|
22 |
-
$name = '';
|
23 |
-
|
24 |
$theme = wp_get_theme();
|
25 |
|
26 |
if ( is_object( $theme ) && is_a( $theme, 'WP_Theme' ) ) {
|
27 |
-
$template
|
28 |
-
$stylesheet
|
29 |
-
$isChildTheme
|
30 |
-
$
|
31 |
|
32 |
if ( $isChildTheme ) {
|
33 |
-
$
|
34 |
}
|
35 |
|
36 |
-
$this->theme
|
|
|
|
|
37 |
}
|
38 |
|
39 |
-
$this->
|
40 |
-
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -47,185 +52,198 @@ class ThemesCompatibility {
|
|
47 |
*/
|
48 |
public function supportedThemes() {
|
49 |
return array(
|
50 |
-
'storefront'
|
51 |
'slug' => 'storefront',
|
52 |
'name' => 'Storefront',
|
53 |
),
|
54 |
-
'flatsome'
|
55 |
'slug' => 'flatsome',
|
56 |
'name' => 'Flatsome',
|
57 |
),
|
58 |
-
'astra'
|
59 |
'slug' => 'astra',
|
60 |
'name' => 'Astra',
|
61 |
),
|
62 |
-
'thegem'
|
63 |
'slug' => 'thegem',
|
64 |
'name' => 'TheGem',
|
65 |
),
|
66 |
-
'impreza'
|
67 |
'slug' => 'impreza',
|
68 |
'name' => 'Impreza',
|
|
|
|
|
|
|
69 |
),
|
70 |
-
'woodmart'
|
71 |
'slug' => 'woodmart',
|
72 |
'name' => 'Woodmart',
|
73 |
),
|
74 |
-
'enfold'
|
75 |
'slug' => 'enfold',
|
76 |
'name' => 'Enfold',
|
77 |
),
|
78 |
-
'shopkeeper'
|
79 |
'slug' => 'shopkeeper',
|
80 |
'name' => 'Shopkeeper',
|
81 |
),
|
82 |
-
'the7'
|
83 |
'slug' => 'the7',
|
84 |
'name' => 'The7',
|
85 |
),
|
86 |
-
'dt-the7'
|
87 |
'slug' => 'dt-the7',
|
88 |
'name' => 'The7',
|
89 |
),
|
90 |
-
'avada'
|
91 |
'slug' => 'avada',
|
92 |
'name' => 'Avada',
|
93 |
),
|
94 |
-
'shop-isle'
|
95 |
-
'slug'
|
96 |
-
'
|
97 |
-
'name' => 'Shop Isle',
|
98 |
),
|
99 |
-
'shopical'
|
100 |
'slug' => 'shopical',
|
101 |
'name' => 'Shopical',
|
102 |
),
|
103 |
-
'shopical-pro'
|
104 |
'slug' => 'shopical-pro',
|
105 |
'name' => 'ShopicalPro',
|
|
|
|
|
|
|
106 |
),
|
107 |
-
'ekommart'
|
108 |
'slug' => 'ekommart',
|
109 |
'name' => 'Ekommart',
|
110 |
),
|
111 |
-
'savoy'
|
112 |
'slug' => 'savoy',
|
113 |
'name' => 'Savoy',
|
114 |
),
|
115 |
-
'sober'
|
116 |
'slug' => 'sober',
|
117 |
'name' => 'Sober',
|
118 |
),
|
119 |
-
'bridge'
|
120 |
'slug' => 'bridge',
|
121 |
'name' => 'Bridge',
|
122 |
),
|
123 |
-
'divi'
|
124 |
'slug' => 'divi',
|
125 |
'name' => 'Divi',
|
126 |
),
|
127 |
-
'block-shop'
|
128 |
'slug' => 'block-shop',
|
129 |
'name' => 'BlockShop',
|
130 |
),
|
131 |
-
'dfd-ronneby'
|
132 |
'slug' => 'dfd-ronneby',
|
133 |
'name' => 'DFDRonneby',
|
134 |
),
|
135 |
-
'restoration'
|
136 |
'slug' => 'restoration',
|
137 |
'name' => 'Restoration',
|
138 |
),
|
139 |
-
'salient'
|
140 |
'slug' => 'salient',
|
141 |
'name' => 'Salient',
|
142 |
),
|
143 |
-
'konte'
|
144 |
'slug' => 'konte',
|
145 |
'name' => 'Konte',
|
146 |
),
|
147 |
-
'rehub-theme'
|
148 |
'slug' => 'rehub-theme',
|
149 |
'name' => 'Rehub',
|
150 |
),
|
151 |
-
'supro'
|
152 |
'slug' => 'supro',
|
153 |
'name' => 'Supro',
|
154 |
),
|
155 |
-
'open-shop'
|
156 |
'slug' => 'open-shop',
|
157 |
'name' => 'OpenShop',
|
158 |
),
|
159 |
-
'ciyashop'
|
160 |
'slug' => 'ciyashop',
|
161 |
'name' => 'CiyaShop',
|
162 |
),
|
163 |
-
'bigcart'
|
164 |
'slug' => 'bigcart',
|
165 |
'name' => 'BigCart',
|
166 |
),
|
167 |
-
'top-store-pro'
|
168 |
'slug' => 'top-store-pro',
|
169 |
'name' => 'TopStorePro',
|
170 |
),
|
171 |
-
'top-store'
|
172 |
'slug' => 'top-store',
|
173 |
'name' => 'TopStore',
|
|
|
|
|
|
|
174 |
),
|
175 |
-
'goya'
|
176 |
'slug' => 'goya',
|
177 |
'name' => 'Goya',
|
178 |
),
|
179 |
-
'electro'
|
180 |
'slug' => 'electro',
|
181 |
'name' => 'Electro',
|
182 |
),
|
183 |
-
'shopisle-pro'
|
184 |
-
'slug'
|
185 |
-
'
|
186 |
-
'
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
'
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
'
|
196 |
-
'name'
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
199 |
'slug' => 'generatepress',
|
200 |
'name' => 'GeneratePress',
|
201 |
),
|
202 |
-
'open-shop-pro'
|
203 |
-
'slug'
|
204 |
-
'
|
205 |
-
'
|
|
|
|
|
206 |
),
|
207 |
-
'uncode'
|
208 |
'slug' => 'uncode',
|
209 |
'name' => 'Uncode',
|
210 |
),
|
211 |
-
'xstore'
|
212 |
-
'slug'
|
213 |
-
'
|
214 |
-
'name' => 'XStore',
|
215 |
),
|
216 |
-
'kadence'
|
217 |
'slug' => 'kadence',
|
218 |
'name' => 'Kadence',
|
219 |
),
|
220 |
'thegem-elementor' => array(
|
221 |
-
'slug'
|
222 |
-
'
|
223 |
-
'name' => 'TheGem (Elementor)',
|
224 |
),
|
225 |
-
'thegem-wpbakery'
|
226 |
-
'slug'
|
227 |
-
'
|
228 |
-
'
|
|
|
|
|
229 |
),
|
230 |
);
|
231 |
}
|
@@ -237,8 +255,7 @@ class ThemesCompatibility {
|
|
237 |
*/
|
238 |
private function loadCompatibilities() {
|
239 |
foreach ( $this->supportedThemes() as $theme ) {
|
240 |
-
if ( $theme['slug'] === $this->
|
241 |
-
|
242 |
$this->supportActive = true;
|
243 |
|
244 |
$class = '\\DgoraWcas\\Integrations\\Themes\\';
|
@@ -249,7 +266,17 @@ class ThemesCompatibility {
|
|
249 |
$class .= $theme['name'] . '\\' . $theme['name'];
|
250 |
}
|
251 |
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
break;
|
255 |
}
|
@@ -274,6 +301,42 @@ class ThemesCompatibility {
|
|
274 |
return $this->theme;
|
275 |
}
|
276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
/**
|
278 |
* Get current theme image src
|
279 |
*
|
8 |
}
|
9 |
|
10 |
class ThemesCompatibility {
|
11 |
+
private $themeSlug = '';
|
12 |
private $themeName = '';
|
13 |
+
private $parentThemeName = '';
|
14 |
private $theme = null;
|
15 |
private $supportActive = false;
|
16 |
|
21 |
}
|
22 |
|
23 |
private function setCurrentTheme() {
|
|
|
|
|
24 |
$theme = wp_get_theme();
|
25 |
|
26 |
if ( is_object( $theme ) && is_a( $theme, 'WP_Theme' ) ) {
|
27 |
+
$template = $theme->get_template();
|
28 |
+
$stylesheet = $theme->get_stylesheet();
|
29 |
+
$isChildTheme = $template !== $stylesheet;
|
30 |
+
$this->themeSlug = sanitize_title( $theme->Name );
|
31 |
|
32 |
if ( $isChildTheme ) {
|
33 |
+
$this->themeSlug = strtolower( $template );
|
34 |
}
|
35 |
|
36 |
+
$this->theme = $theme;
|
37 |
+
$this->themeName = $theme->name;
|
38 |
+
$this->parentThemeName = ! empty( $theme->parent_theme ) ? $theme->parent_theme : '';
|
39 |
}
|
40 |
|
41 |
+
$this->themeSlug = apply_filters( 'dgwt/wcas/integrations/themes/current_theme_slug', $this->themeSlug );
|
42 |
+
$this->themeName = apply_filters( 'dgwt/wcas/integrations/themes/current_theme_name', $this->themeName );
|
43 |
+
if ( $this->isChildTheme() ) {
|
44 |
+
$this->parentThemeName = apply_filters( 'dgwt/wcas/integrations/themes/current_parent_theme_name', $this->parentThemeName );
|
45 |
+
}
|
46 |
}
|
47 |
|
48 |
/**
|
52 |
*/
|
53 |
public function supportedThemes() {
|
54 |
return array(
|
55 |
+
'storefront' => array(
|
56 |
'slug' => 'storefront',
|
57 |
'name' => 'Storefront',
|
58 |
),
|
59 |
+
'flatsome' => array(
|
60 |
'slug' => 'flatsome',
|
61 |
'name' => 'Flatsome',
|
62 |
),
|
63 |
+
'astra' => array(
|
64 |
'slug' => 'astra',
|
65 |
'name' => 'Astra',
|
66 |
),
|
67 |
+
'thegem' => array(
|
68 |
'slug' => 'thegem',
|
69 |
'name' => 'TheGem',
|
70 |
),
|
71 |
+
'impreza' => array(
|
72 |
'slug' => 'impreza',
|
73 |
'name' => 'Impreza',
|
74 |
+
'args' => array(
|
75 |
+
'alwaysEnabled' => true,
|
76 |
+
),
|
77 |
),
|
78 |
+
'woodmart' => array(
|
79 |
'slug' => 'woodmart',
|
80 |
'name' => 'Woodmart',
|
81 |
),
|
82 |
+
'enfold' => array(
|
83 |
'slug' => 'enfold',
|
84 |
'name' => 'Enfold',
|
85 |
),
|
86 |
+
'shopkeeper' => array(
|
87 |
'slug' => 'shopkeeper',
|
88 |
'name' => 'Shopkeeper',
|
89 |
),
|
90 |
+
'the7' => array(
|
91 |
'slug' => 'the7',
|
92 |
'name' => 'The7',
|
93 |
),
|
94 |
+
'dt-the7' => array(
|
95 |
'slug' => 'dt-the7',
|
96 |
'name' => 'The7',
|
97 |
),
|
98 |
+
'avada' => array(
|
99 |
'slug' => 'avada',
|
100 |
'name' => 'Avada',
|
101 |
),
|
102 |
+
'shop-isle' => array(
|
103 |
+
'slug' => 'shop-isle',
|
104 |
+
'name' => 'Shop Isle',
|
|
|
105 |
),
|
106 |
+
'shopical' => array(
|
107 |
'slug' => 'shopical',
|
108 |
'name' => 'Shopical',
|
109 |
),
|
110 |
+
'shopical-pro' => array(
|
111 |
'slug' => 'shopical-pro',
|
112 |
'name' => 'ShopicalPro',
|
113 |
+
'args' => array(
|
114 |
+
'partialFilename' => 'shopical.php',
|
115 |
+
)
|
116 |
),
|
117 |
+
'ekommart' => array(
|
118 |
'slug' => 'ekommart',
|
119 |
'name' => 'Ekommart',
|
120 |
),
|
121 |
+
'savoy' => array(
|
122 |
'slug' => 'savoy',
|
123 |
'name' => 'Savoy',
|
124 |
),
|
125 |
+
'sober' => array(
|
126 |
'slug' => 'sober',
|
127 |
'name' => 'Sober',
|
128 |
),
|
129 |
+
'bridge' => array(
|
130 |
'slug' => 'bridge',
|
131 |
'name' => 'Bridge',
|
132 |
),
|
133 |
+
'divi' => array(
|
134 |
'slug' => 'divi',
|
135 |
'name' => 'Divi',
|
136 |
),
|
137 |
+
'block-shop' => array(
|
138 |
'slug' => 'block-shop',
|
139 |
'name' => 'BlockShop',
|
140 |
),
|
141 |
+
'dfd-ronneby' => array(
|
142 |
'slug' => 'dfd-ronneby',
|
143 |
'name' => 'DFDRonneby',
|
144 |
),
|
145 |
+
'restoration' => array(
|
146 |
'slug' => 'restoration',
|
147 |
'name' => 'Restoration',
|
148 |
),
|
149 |
+
'salient' => array(
|
150 |
'slug' => 'salient',
|
151 |
'name' => 'Salient',
|
152 |
),
|
153 |
+
'konte' => array(
|
154 |
'slug' => 'konte',
|
155 |
'name' => 'Konte',
|
156 |
),
|
157 |
+
'rehub-theme' => array(
|
158 |
'slug' => 'rehub-theme',
|
159 |
'name' => 'Rehub',
|
160 |
),
|
161 |
+
'supro' => array(
|
162 |
'slug' => 'supro',
|
163 |
'name' => 'Supro',
|
164 |
),
|
165 |
+
'open-shop' => array(
|
166 |
'slug' => 'open-shop',
|
167 |
'name' => 'OpenShop',
|
168 |
),
|
169 |
+
'ciyashop' => array(
|
170 |
'slug' => 'ciyashop',
|
171 |
'name' => 'CiyaShop',
|
172 |
),
|
173 |
+
'bigcart' => array(
|
174 |
'slug' => 'bigcart',
|
175 |
'name' => 'BigCart',
|
176 |
),
|
177 |
+
'top-store-pro' => array(
|
178 |
'slug' => 'top-store-pro',
|
179 |
'name' => 'TopStorePro',
|
180 |
),
|
181 |
+
'top-store' => array(
|
182 |
'slug' => 'top-store',
|
183 |
'name' => 'TopStore',
|
184 |
+
'args' => array(
|
185 |
+
'partialFilename' => 'top-store-pro.php',
|
186 |
+
)
|
187 |
),
|
188 |
+
'goya' => array(
|
189 |
'slug' => 'goya',
|
190 |
'name' => 'Goya',
|
191 |
),
|
192 |
+
'electro' => array(
|
193 |
'slug' => 'electro',
|
194 |
'name' => 'Electro',
|
195 |
),
|
196 |
+
'shopisle-pro' => array(
|
197 |
+
'slug' => 'shopisle-pro',
|
198 |
+
'name' => 'ShopIsle PRO',
|
199 |
+
'args' => array(
|
200 |
+
'partialFilename' => 'shop-isle.php',
|
201 |
+
)
|
202 |
+
),
|
203 |
+
'estore' => array(
|
204 |
+
'slug' => 'estore',
|
205 |
+
'name' => 'eStore',
|
206 |
+
),
|
207 |
+
'estore-pro' => array(
|
208 |
+
'slug' => 'estore-pro',
|
209 |
+
'name' => 'eStore Pro',
|
210 |
+
'args' => array(
|
211 |
+
'partialFilename' => 'estore.php',
|
212 |
+
)
|
213 |
+
),
|
214 |
+
'generatepress' => array(
|
215 |
'slug' => 'generatepress',
|
216 |
'name' => 'GeneratePress',
|
217 |
),
|
218 |
+
'open-shop-pro' => array(
|
219 |
+
'slug' => 'open-shop-pro',
|
220 |
+
'name' => 'Open Shop Pro',
|
221 |
+
'args' => array(
|
222 |
+
'partialFilename' => 'open-shop.php',
|
223 |
+
)
|
224 |
),
|
225 |
+
'uncode' => array(
|
226 |
'slug' => 'uncode',
|
227 |
'name' => 'Uncode',
|
228 |
),
|
229 |
+
'xstore' => array(
|
230 |
+
'slug' => 'xstore',
|
231 |
+
'name' => 'XStore',
|
|
|
232 |
),
|
233 |
+
'kadence' => array(
|
234 |
'slug' => 'kadence',
|
235 |
'name' => 'Kadence',
|
236 |
),
|
237 |
'thegem-elementor' => array(
|
238 |
+
'slug' => 'thegem-elementor',
|
239 |
+
'name' => 'TheGem (Elementor)',
|
|
|
240 |
),
|
241 |
+
'thegem-wpbakery' => array(
|
242 |
+
'slug' => 'thegem-wpbakery',
|
243 |
+
'name' => 'TheGem (WPBakery)',
|
244 |
+
'args' => array(
|
245 |
+
'partialFilename' => 'thegem-elementor.php',
|
246 |
+
)
|
247 |
),
|
248 |
);
|
249 |
}
|
255 |
*/
|
256 |
private function loadCompatibilities() {
|
257 |
foreach ( $this->supportedThemes() as $theme ) {
|
258 |
+
if ( $theme['slug'] === $this->themeSlug ) {
|
|
|
259 |
$this->supportActive = true;
|
260 |
|
261 |
$class = '\\DgoraWcas\\Integrations\\Themes\\';
|
266 |
$class .= $theme['name'] . '\\' . $theme['name'];
|
267 |
}
|
268 |
|
269 |
+
$args = isset( $theme['args'] ) && is_array( $theme['args'] ) ? $theme['args'] : array();
|
270 |
+
|
271 |
+
if ( $this->isWhiteLabel() ) {
|
272 |
+
$args['whiteLabel'] = true;
|
273 |
+
}
|
274 |
+
|
275 |
+
if ( class_exists( $class ) ) {
|
276 |
+
new $class( $this->themeSlug, $this->themeName, $args );
|
277 |
+
} else {
|
278 |
+
new GenericTheme( $this->themeSlug, $this->themeName, $args );
|
279 |
+
}
|
280 |
|
281 |
break;
|
282 |
}
|
301 |
return $this->theme;
|
302 |
}
|
303 |
|
304 |
+
/**
|
305 |
+
* Get the name of the current theme
|
306 |
+
*
|
307 |
+
* @return string
|
308 |
+
*/
|
309 |
+
public function getThemeName() {
|
310 |
+
return ! empty( $this->themeName ) && is_string( $this->themeName ) ? $this->themeName : '';
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Check if the current them is child theme
|
315 |
+
*
|
316 |
+
* @return bool
|
317 |
+
*/
|
318 |
+
public function isChildTheme() {
|
319 |
+
return ! empty( $this->parentThemeName );
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Check if the integration is under white label
|
324 |
+
*
|
325 |
+
* @return bool
|
326 |
+
*/
|
327 |
+
public function isWhiteLabel() {
|
328 |
+
return apply_filters( 'dgwt/wcas/integrations/themes/white_label', false );
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Get the name of the current parent theme
|
333 |
+
*
|
334 |
+
* @return string
|
335 |
+
*/
|
336 |
+
public function getParentThemeName() {
|
337 |
+
return ! empty( $this->parentThemeName ) ? $this->parentThemeName : '';
|
338 |
+
}
|
339 |
+
|
340 |
/**
|
341 |
* Get current theme image src
|
342 |
*
|
includes/Integrations/Themes/TopStore/TopStore.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\TopStore;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class TopStore extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'top-store';
|
16 |
-
$this->themeName = 'Top Store';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Overwrite search
|
23 |
-
*
|
24 |
-
* @return void
|
25 |
-
*/
|
26 |
-
protected function maybeOverwriteSearch() {
|
27 |
-
// We load partial from Pro version
|
28 |
-
$partialPath = DGWT_WCAS_DIR . 'partials/themes/' . $this->themeSlug . '-pro.php';
|
29 |
-
if ( $this->canReplaceSearch() && file_exists( $partialPath ) ) {
|
30 |
-
require_once( $partialPath );
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/TopStorePro/TopStorePro.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\TopStorePro;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class TopStorePro extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'top-store-pro';
|
16 |
-
$this->themeName = 'Top Store Pro';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Uncode/Uncode.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Uncode;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Uncode extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'uncode';
|
16 |
-
$this->themeName = 'Uncode';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Integrations/Themes/Woodmart/Woodmart.php
CHANGED
@@ -2,23 +2,15 @@
|
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Woodmart;
|
4 |
|
5 |
-
use DgoraWcas\
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
-
class Woodmart {
|
13 |
-
|
14 |
-
private $themeSlug = 'woodmart';
|
15 |
-
|
16 |
-
private $themeName = 'Woodmart';
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->overwriteFunctions();
|
20 |
-
|
21 |
-
add_filter( 'dgwt/wcas/settings', array( $this, 'registerSettings' ) );
|
22 |
add_filter( 'woodmart_shop_page_link', array( $this, 'shop_page_link' ), 10, 3 );
|
23 |
}
|
24 |
|
@@ -38,78 +30,4 @@ class Woodmart {
|
|
38 |
|
39 |
return $link;
|
40 |
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Add settings
|
44 |
-
*
|
45 |
-
* @param array $settings
|
46 |
-
*
|
47 |
-
* @return array
|
48 |
-
*/
|
49 |
-
public function registerSettings( $settings ) {
|
50 |
-
$key = 'dgwt_wcas_basic';
|
51 |
-
|
52 |
-
$settings[ $key ][10] = array(
|
53 |
-
'name' => $this->themeSlug . '_main_head',
|
54 |
-
'label' => sprintf( __( 'Replace %s search bar', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
55 |
-
'type' => 'head',
|
56 |
-
'class' => 'dgwt-wcas-sgs-header'
|
57 |
-
);
|
58 |
-
|
59 |
-
$settings[ $key ][52] = array(
|
60 |
-
'name' => $this->themeSlug . '_settings_head',
|
61 |
-
'label' => sprintf( __( '%s Theme', 'ajax-search-for-woocommerce' ), $this->themeName ),
|
62 |
-
'type' => 'desc',
|
63 |
-
'desc' => Helpers::embeddingInThemeHtml(),
|
64 |
-
'class' => 'dgwt-wcas-sgs-themes-label',
|
65 |
-
);
|
66 |
-
|
67 |
-
$img = DGWT_WCAS()->themeCompatibility->getThemeImageSrc();
|
68 |
-
if ( ! empty( $img ) ) {
|
69 |
-
$settings[ $key ][52]['label'] = '<img src="' . $img . '">';
|
70 |
-
}
|
71 |
-
|
72 |
-
$settings[ $key ][55] = array(
|
73 |
-
'name' => 'woodmart_replace_search',
|
74 |
-
'label' => __( 'Replace', 'ajax-search-for-woocommerce' ),
|
75 |
-
'desc' => sprintf( __( 'Replace all %s search bars with the %s.', 'ajax-search-for-woocommerce' ), $this->themeName, DGWT_WCAS_NAME ),
|
76 |
-
'type' => 'checkbox',
|
77 |
-
'default' => 'off',
|
78 |
-
);
|
79 |
-
|
80 |
-
$settings[ $key ][90] = array(
|
81 |
-
'name' => $this->themeSlug . '_othersways__head',
|
82 |
-
'label' => __( 'Alternative ways to embed a search bar', 'ajax-search-for-woocommerce' ),
|
83 |
-
'type' => 'head',
|
84 |
-
'class' => 'dgwt-wcas-sgs-header'
|
85 |
-
);
|
86 |
-
|
87 |
-
return $settings;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Check if can replace the native Woodmart search form with the FiboSearch form.
|
92 |
-
*
|
93 |
-
* @return bool
|
94 |
-
*/
|
95 |
-
private function canReplaceSearch() {
|
96 |
-
$canIntegrate = false;
|
97 |
-
|
98 |
-
if ( DGWT_WCAS()->settings->getOption( 'woodmart_replace_search', 'off' ) === 'on' ) {
|
99 |
-
$canIntegrate = true;
|
100 |
-
}
|
101 |
-
|
102 |
-
return $canIntegrate;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Overwrite functions
|
107 |
-
*
|
108 |
-
* @return void
|
109 |
-
*/
|
110 |
-
private function overwriteFunctions() {
|
111 |
-
if ( $this->canReplaceSearch() ) {
|
112 |
-
require_once DGWT_WCAS_DIR . 'partials/themes/woodmart.php';
|
113 |
-
}
|
114 |
-
}
|
115 |
}
|
2 |
|
3 |
namespace DgoraWcas\Integrations\Themes\Woodmart;
|
4 |
|
5 |
+
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
|
7 |
// Exit if accessed directly
|
8 |
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
exit;
|
10 |
}
|
11 |
|
12 |
+
class Woodmart extends ThemeIntegration {
|
13 |
+
public function extraFunctions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
add_filter( 'woodmart_shop_page_link', array( $this, 'shop_page_link' ), 10, 3 );
|
15 |
}
|
16 |
|
30 |
|
31 |
return $link;
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
includes/Integrations/Themes/Xstore/Xstore.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace DgoraWcas\Integrations\Themes\Xstore;
|
4 |
-
|
5 |
-
use DgoraWcas\Abstracts\ThemeIntegration;
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
class Xstore extends ThemeIntegration {
|
13 |
-
|
14 |
-
public function __construct() {
|
15 |
-
$this->themeSlug = 'xstore';
|
16 |
-
$this->themeName = 'XStore';
|
17 |
-
|
18 |
-
parent::__construct();
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/Multilingual.php
CHANGED
@@ -52,7 +52,7 @@ class Multilingual {
|
|
52 |
/**
|
53 |
* Get Provider
|
54 |
*
|
55 |
-
* @return
|
56 |
*/
|
57 |
public static function getProvider() {
|
58 |
$provider = 'not set';
|
52 |
/**
|
53 |
* Get Provider
|
54 |
*
|
55 |
+
* @return string
|
56 |
*/
|
57 |
public static function getProvider() {
|
58 |
$provider = 'not set';
|
includes/Settings.php
CHANGED
@@ -5,6 +5,7 @@ namespace DgoraWcas;
|
|
5 |
use DgoraWcas\Admin\Promo\Upgrade ;
|
6 |
use DgoraWcas\Admin\SettingsAPI ;
|
7 |
use DgoraWcas\Admin\Promo\FeedbackNotice ;
|
|
|
8 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
9 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Scheduler ;
|
10 |
// Exit if accessed directly
|
@@ -67,6 +68,7 @@ class Settings
|
|
67 |
3
|
68 |
);
|
69 |
add_action( 'wp_ajax_dgwt_wcas_adv_settings', array( $this, 'toggleAdvancedSettings' ) );
|
|
|
70 |
}
|
71 |
|
72 |
/**
|
@@ -111,15 +113,16 @@ class Settings
|
|
111 |
|
112 |
if ( dgoraAsfwFs()->is_premium() ) {
|
113 |
$suffix = '';
|
|
|
114 |
|
115 |
-
if ( Builder::getInfo( 'status' ) === 'error' || Builder::isIndexerWorkingTooLong() ) {
|
116 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-error dgwt-wcas-tab-mark active">!</span>';
|
117 |
} else {
|
118 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-error dgwt-wcas-tab-mark">!</span>';
|
119 |
}
|
120 |
|
121 |
|
122 |
-
if ( in_array( Builder::getInfo( 'status' ), array( 'preparing', 'building', 'cancellation' ) ) ) {
|
123 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-progress dgwt-wcas-tab-progress active"></span>';
|
124 |
} else {
|
125 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-progress dgwt-wcas-tab-progress"></span>';
|
@@ -150,8 +153,17 @@ class Settings
|
|
150 |
*/
|
151 |
function settingsFields()
|
152 |
{
|
|
|
153 |
$darkenedBgLink = 'https://fibosearch.com/darkened-background/';
|
154 |
$fuzzySearchLink = 'https://fibosearch.com/documentation/features/fuzzy-search/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
$settingsFields = array(
|
156 |
'dgwt_wcas_basic' => apply_filters( 'dgwt/wcas/settings/section=basic', array(
|
157 |
90 => array(
|
@@ -203,10 +215,24 @@ class Settings
|
|
203 |
),
|
204 |
500 => array(
|
205 |
'name' => 'search_submit_text',
|
206 |
-
'label' => __( '
|
207 |
'type' => 'text',
|
208 |
-
'class' => 'js-dgwt-wcas-cbtgroup-submit-btn',
|
209 |
'default' => __( 'Search', 'ajax-search-for-woocommerce' ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
),
|
211 |
600 => array(
|
212 |
'name' => 'search_placeholder',
|
@@ -216,42 +242,70 @@ class Settings
|
|
216 |
),
|
217 |
630 => array(
|
218 |
'name' => 'layout_head',
|
219 |
-
'label' => __( '
|
220 |
'type' => 'head',
|
221 |
'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
),
|
223 |
660 => array(
|
224 |
'name' => 'search_layout',
|
225 |
-
'label' => __( 'Layout', 'ajax-search-for-woocommerce' ),
|
226 |
'type' => 'select',
|
227 |
'options' => array(
|
228 |
-
'classic'
|
229 |
-
'icon'
|
230 |
-
'icon-flexible'
|
|
|
231 |
),
|
232 |
'default' => 'classic',
|
233 |
'class' => 'js-dgwt-wcas-adv-settings',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
),
|
235 |
680 => array(
|
236 |
'name' => 'enable_mobile_overlay',
|
237 |
-
'label' => __( 'Overlay on mobile', 'ajax-search-for-woocommerce' ),
|
238 |
-
'desc' => __( 'The search will open
|
239 |
'type' => 'checkbox',
|
240 |
'default' => 'on',
|
241 |
'class' => 'js-dgwt-wcas-adv-settings',
|
242 |
),
|
243 |
-
|
244 |
-
'name' => '
|
245 |
-
'label' => __( '
|
246 |
'desc' => __( 'px', 'ajax-search-for-woocommerce' ),
|
247 |
'type' => 'number',
|
248 |
-
'class' => 'js-dgwt-wcas-adv-settings',
|
249 |
'size' => 'small',
|
250 |
'default' => 992,
|
251 |
),
|
252 |
695 => array(
|
253 |
'name' => 'darken_background',
|
254 |
-
'label' => __( 'Darkened background', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'darken-_background',
|
255 |
'desc' => __( '(beta feature)', 'ajax-search-for-woocommerce' ),
|
256 |
'type' => 'checkbox',
|
257 |
'class' => 'js-dgwt-wcas-adv-settings',
|
@@ -260,16 +314,9 @@ class Settings
|
|
260 |
),
|
261 |
700 => array(
|
262 |
'name' => 'search_form',
|
263 |
-
'label' => __( '
|
264 |
'type' => 'head',
|
265 |
'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
|
266 |
-
),
|
267 |
-
750 => array(
|
268 |
-
'name' => 'search_icon_color',
|
269 |
-
'label' => __( 'Search icon', 'ajax-search-for-woocommerce' ),
|
270 |
-
'type' => 'color',
|
271 |
-
'class' => 'js-dgwt-wcas-adv-settings',
|
272 |
-
'default' => '',
|
273 |
),
|
274 |
800 => array(
|
275 |
'name' => 'bg_input_color',
|
@@ -291,20 +338,6 @@ class Settings
|
|
291 |
'type' => 'color',
|
292 |
'class' => 'js-dgwt-wcas-adv-settings',
|
293 |
'default' => '',
|
294 |
-
),
|
295 |
-
1100 => array(
|
296 |
-
'name' => 'bg_submit_color',
|
297 |
-
'label' => __( 'Search submit background', 'ajax-search-for-woocommerce' ),
|
298 |
-
'type' => 'color',
|
299 |
-
'class' => 'js-dgwt-wcas-adv-settings js-dgwt-wcas-cbtgroup-submit-btn',
|
300 |
-
'default' => '',
|
301 |
-
),
|
302 |
-
1200 => array(
|
303 |
-
'name' => 'text_submit_color',
|
304 |
-
'label' => __( 'Search submit text', 'ajax-search-for-woocommerce' ),
|
305 |
-
'type' => 'color',
|
306 |
-
'class' => 'js-dgwt-wcas-adv-settings js-dgwt-wcas-cbtgroup-submit-btn',
|
307 |
-
'default' => '',
|
308 |
),
|
309 |
1500 => array(
|
310 |
'name' => 'preloader_head',
|
@@ -447,7 +480,7 @@ class Settings
|
|
447 |
),
|
448 |
2100 => array(
|
449 |
'name' => 'show_details_box',
|
450 |
-
'label' => __( 'Show Details panel', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'details-box', __( 'The Details panel is an additional container for extended information. The details
|
451 |
'type' => 'checkbox',
|
452 |
'size' => 'small',
|
453 |
'default' => 'off',
|
@@ -543,7 +576,7 @@ class Settings
|
|
543 |
),
|
544 |
300 => array(
|
545 |
'name' => 'search_in_custom_fields',
|
546 |
-
'label' => __( 'Search in custom fields', 'ajax-search-for-woocommerce' ),
|
547 |
'class' => 'dgwt-wcas-premium-only',
|
548 |
'type' => 'text',
|
549 |
'default' => '',
|
@@ -568,9 +601,9 @@ class Settings
|
|
568 |
),
|
569 |
520 => array(
|
570 |
'name' => 'search_synonyms',
|
571 |
-
'label' => __( 'Synonyms', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'synonyms', __(
|
572 |
'type' => 'textarea',
|
573 |
-
'desc' => __( 'Synonyms should be separated by a comma. Each new synonyms group is entered
|
574 |
'class' => 'dgwt-wcas-settings-synonyms js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
|
575 |
),
|
576 |
600 => array(
|
@@ -583,7 +616,7 @@ class Settings
|
|
583 |
'name' => 'filter_products_mode',
|
584 |
'label' => __( 'Filtering mode', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark(
|
585 |
'filter_products_mode',
|
586 |
-
__( 'Exclude the product group from the search results or allow search only among the indicated product group', 'ajax-search-for-woocommerce' ),
|
587 |
'',
|
588 |
'right'
|
589 |
),
|
@@ -629,7 +662,7 @@ class Settings
|
|
629 |
),
|
630 |
110 => array(
|
631 |
'name' => 'indexer_schedule',
|
632 |
-
'label' => __( 'Enable Scheduler', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'indexer-schedule', __( "In most cases, you don't need to use the scheduler because the search index updates when you edit products. If you use import tools or custom code to refresh prices or bulk add/edit products, the indexing scheduler will be helpful.", 'ajax-search-for-woocommerce' ) ),
|
633 |
'type' => 'checkbox',
|
634 |
'size' => 'small',
|
635 |
'class' => 'dgwt-wcas-options-cb-toggle js-dgwt-wcas-cbtgroup-indexer-schedule js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
|
@@ -657,7 +690,7 @@ class Settings
|
|
657 |
) ),
|
658 |
);
|
659 |
$fuzzinesText1 = '<strong>' . __( 'Increases sales conversions', 'ajax-search-for-woocommerce' ) . '</strong>';
|
660 |
-
$fuzzinesText2 = sprintf( __( 'Returns suggestions based on likely relevance, even though a search keyword may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same results as for “iphone”. <a target="_blank" href="%s">Read more</a> about fuzzy search feature.', 'ajax-search-for-woocommerce' ), $fuzzySearchLink );
|
661 |
|
662 |
if ( dgoraAsfwFs()->is_premium() ) {
|
663 |
} else {
|
@@ -758,10 +791,10 @@ class Settings
|
|
758 |
return $value;
|
759 |
}
|
760 |
|
761 |
-
|
762 |
* Update option
|
763 |
*
|
764 |
-
* @param string $
|
765 |
* @param string $value
|
766 |
*
|
767 |
* @return bool
|
@@ -784,7 +817,12 @@ class Settings
|
|
784 |
|
785 |
if ( $canUpdate ) {
|
786 |
$updated = update_option( $this->settingSlug, $settings );
|
787 |
-
|
|
|
|
|
|
|
|
|
|
|
788 |
}
|
789 |
|
790 |
}
|
@@ -883,6 +921,52 @@ class Settings
|
|
883 |
return $is_premium;
|
884 |
}
|
885 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
886 |
/**
|
887 |
* Clear settings cache
|
888 |
*/
|
5 |
use DgoraWcas\Admin\Promo\Upgrade ;
|
6 |
use DgoraWcas\Admin\SettingsAPI ;
|
7 |
use DgoraWcas\Admin\Promo\FeedbackNotice ;
|
8 |
+
use DgoraWcas\Engines\TNTSearchMySQL\Config ;
|
9 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Builder ;
|
10 |
use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Scheduler ;
|
11 |
// Exit if accessed directly
|
68 |
3
|
69 |
);
|
70 |
add_action( 'wp_ajax_dgwt_wcas_adv_settings', array( $this, 'toggleAdvancedSettings' ) );
|
71 |
+
$this->dependentOptions();
|
72 |
}
|
73 |
|
74 |
/**
|
113 |
|
114 |
if ( dgoraAsfwFs()->is_premium() ) {
|
115 |
$suffix = '';
|
116 |
+
// TODO tutaj trzeba wskazac budowany indeks
|
117 |
|
118 |
+
if ( Builder::getInfo( 'status', Config::getIndexRole() ) === 'error' || Builder::isIndexerWorkingTooLong() ) {
|
119 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-error dgwt-wcas-tab-mark active">!</span>';
|
120 |
} else {
|
121 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-error dgwt-wcas-tab-mark">!</span>';
|
122 |
}
|
123 |
|
124 |
|
125 |
+
if ( in_array( Builder::getInfo( 'status', Config::getIndexRole() ), array( 'preparing', 'building', 'cancellation' ) ) ) {
|
126 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-progress dgwt-wcas-tab-progress active"></span>';
|
127 |
} else {
|
128 |
$suffix .= '<span class="js-dgwt-wcas-indexer-tab-progress dgwt-wcas-tab-progress"></span>';
|
153 |
*/
|
154 |
function settingsFields()
|
155 |
{
|
156 |
+
$styleLink = 'https://fibosearch.com/pirx-a-bean-shaped-search-bar-design-youll-love/';
|
157 |
$darkenedBgLink = 'https://fibosearch.com/darkened-background/';
|
158 |
$fuzzySearchLink = 'https://fibosearch.com/documentation/features/fuzzy-search/';
|
159 |
+
$synonymsLink = 'https://fibosearch.com/documentation/features/synonyms/';
|
160 |
+
$excludeIncludeLink = 'https://fibosearch.com/documentation/features/exclude-include/';
|
161 |
+
$detailsPanelLink = 'https://fibosearch.com/feature/details-panel/';
|
162 |
+
$schedulerLink = 'https://fibosearch.com/documentation/features/index-scheduling/';
|
163 |
+
$customFieldsLink = 'https://fibosearch.com/documentation/features/search-in-custom-fields/';
|
164 |
+
$mobileOverlayLink = 'https://fibosearch.com/documentation/features/overlay-on-mobile/';
|
165 |
+
$searchLayoutLink = 'https://fibosearch.com/documentation/features/search-bar-layout/';
|
166 |
+
$readMore = __( '<a target="_blank" href="%s">Read more</a> about this feature.', 'ajax-search-for-woocommerce' );
|
167 |
$settingsFields = array(
|
168 |
'dgwt_wcas_basic' => apply_filters( 'dgwt/wcas/settings/section=basic', array(
|
169 |
90 => array(
|
215 |
),
|
216 |
500 => array(
|
217 |
'name' => 'search_submit_text',
|
218 |
+
'label' => __( 'Label', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'search-submit-text', __( 'To display the magnifier icon leave this field empty.', 'ajax-search-for-woocommerce' ) ),
|
219 |
'type' => 'text',
|
220 |
+
'class' => 'js-dgwt-wcas-cbtgroup-submit-btn dgwt-wcas-settings-suboption',
|
221 |
'default' => __( 'Search', 'ajax-search-for-woocommerce' ),
|
222 |
+
),
|
223 |
+
510 => array(
|
224 |
+
'name' => 'bg_submit_color',
|
225 |
+
'label' => __( 'Background color', 'ajax-search-for-woocommerce' ),
|
226 |
+
'type' => 'color',
|
227 |
+
'class' => 'js-dgwt-wcas-adv-settings js-dgwt-wcas-cbtgroup-submit-btn dgwt-wcas-settings-suboption',
|
228 |
+
'default' => '',
|
229 |
+
),
|
230 |
+
520 => array(
|
231 |
+
'name' => 'text_submit_color',
|
232 |
+
'label' => '<span>' . __( 'Text color', 'ajax-search-for-woocommerce' ) . ' </span><span>' . __( 'Search icon color', 'ajax-search-for-woocommerce' ) . '</span>',
|
233 |
+
'type' => 'color',
|
234 |
+
'class' => 'js-dgwt-wcas-adv-settings js-dgwt-wcas-cbtgroup-submit-btn dgwt-wcas-settings-suboption',
|
235 |
+
'default' => '',
|
236 |
),
|
237 |
600 => array(
|
238 |
'name' => 'search_placeholder',
|
242 |
),
|
243 |
630 => array(
|
244 |
'name' => 'layout_head',
|
245 |
+
'label' => __( 'Appearance', 'ajax-search-for-woocommerce' ),
|
246 |
'type' => 'head',
|
247 |
'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
|
248 |
+
),
|
249 |
+
645 => array(
|
250 |
+
'name' => 'search_style',
|
251 |
+
'label' => __( 'Style', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'search_style', sprintf( __( 'FiboSearch provides two different styles of search bars: Solaris and Pirx. Solaris has a rectangular shape while Pirx is a bean-shaped bar with curvy and smooth edges. <a target="_blank" href="%s">See the differences</a> between Solaris and Pirx style.', 'ajax-search-for-woocommerce' ), $styleLink ) ),
|
252 |
+
'type' => 'select',
|
253 |
+
'options' => array(
|
254 |
+
'solaris' => _x( 'Solaris (default)', 'Solaris is proper name.', 'ajax-search-for-woocommerce' ),
|
255 |
+
'pirx' => _x( 'Pirx (beta)', 'Pirx is proper name.', 'ajax-search-for-woocommerce' ),
|
256 |
+
),
|
257 |
+
'default' => 'solaris',
|
258 |
+
'class' => 'js-dgwt-wcas-adv-settings',
|
259 |
),
|
260 |
660 => array(
|
261 |
'name' => 'search_layout',
|
262 |
+
'label' => __( 'Layout', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'search_layout', __( 'FiboSearch might be displayed as a search bar, icon, or mixed of them.', 'ajax-search-for-woocommerce' ) . ' <a target="_blank" href="' . $searchLayoutLink . '">' . __( 'See what each of these layouts looks like', 'ajax-search-for-woocommerce' ) . '</a>' ),
|
263 |
'type' => 'select',
|
264 |
'options' => array(
|
265 |
+
'classic' => __( 'Search bar', 'ajax-search-for-woocommerce' ),
|
266 |
+
'icon' => __( 'Search icon', 'ajax-search-for-woocommerce' ),
|
267 |
+
'icon-flexible' => __( 'Icon on mobile, search bar on desktop', 'ajax-search-for-woocommerce' ),
|
268 |
+
'icon-flexible-inv' => __( 'Icon on desktop, search bar on mobile', 'ajax-search-for-woocommerce' ),
|
269 |
),
|
270 |
'default' => 'classic',
|
271 |
'class' => 'js-dgwt-wcas-adv-settings',
|
272 |
+
),
|
273 |
+
670 => array(
|
274 |
+
'name' => 'mobile_breakpoint',
|
275 |
+
'label' => __( 'Breakpoint', 'ajax-search-for-woocommerce' ),
|
276 |
+
'desc' => __( 'px', 'ajax-search-for-woocommerce' ),
|
277 |
+
'type' => 'number',
|
278 |
+
'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-settings-suboption',
|
279 |
+
'size' => 'small',
|
280 |
+
'default' => 992,
|
281 |
+
),
|
282 |
+
675 => array(
|
283 |
+
'name' => 'search_icon_color',
|
284 |
+
'label' => __( 'Search icon color', 'ajax-search-for-woocommerce' ),
|
285 |
+
'type' => 'color',
|
286 |
+
'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-settings-suboption',
|
287 |
+
'default' => '',
|
288 |
),
|
289 |
680 => array(
|
290 |
'name' => 'enable_mobile_overlay',
|
291 |
+
'label' => __( 'Overlay on mobile', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'enable_mobile_overlay', __( 'Covers anything that is displayed on the screen and simplifies the view to search bar + results.', 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $mobileOverlayLink ) ),
|
292 |
+
'desc' => __( 'The search will open as an overlay on mobile', 'ajax-search-for-woocommerce' ),
|
293 |
'type' => 'checkbox',
|
294 |
'default' => 'on',
|
295 |
'class' => 'js-dgwt-wcas-adv-settings',
|
296 |
),
|
297 |
+
685 => array(
|
298 |
+
'name' => 'mobile_overlay_breakpoint',
|
299 |
+
'label' => __( 'Breakpoint', 'ajax-search-for-woocommerce' ),
|
300 |
'desc' => __( 'px', 'ajax-search-for-woocommerce' ),
|
301 |
'type' => 'number',
|
302 |
+
'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-settings-suboption',
|
303 |
'size' => 'small',
|
304 |
'default' => 992,
|
305 |
),
|
306 |
695 => array(
|
307 |
'name' => 'darken_background',
|
308 |
+
'label' => __( 'Darkened background', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'darken-_background', __( 'Darkening the page background while autocomplete is active gives it stronger emphasis, minimizing elements (e.g., ads, carousels, and other page content) that could distract users from considering autocomplete suggestions.', 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $darkenedBgLink ) ),
|
309 |
'desc' => __( '(beta feature)', 'ajax-search-for-woocommerce' ),
|
310 |
'type' => 'checkbox',
|
311 |
'class' => 'js-dgwt-wcas-adv-settings',
|
314 |
),
|
315 |
700 => array(
|
316 |
'name' => 'search_form',
|
317 |
+
'label' => __( 'Other colors', 'ajax-search-for-woocommerce' ),
|
318 |
'type' => 'head',
|
319 |
'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
),
|
321 |
800 => array(
|
322 |
'name' => 'bg_input_color',
|
338 |
'type' => 'color',
|
339 |
'class' => 'js-dgwt-wcas-adv-settings',
|
340 |
'default' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
),
|
342 |
1500 => array(
|
343 |
'name' => 'preloader_head',
|
480 |
),
|
481 |
2100 => array(
|
482 |
'name' => 'show_details_box',
|
483 |
+
'label' => __( 'Show Details panel', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'details-box', __( 'The Details panel is an additional container for extended information. The details change dynamically when the cursor hovers over one of the suggestions.', 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $detailsPanelLink ) ),
|
484 |
'type' => 'checkbox',
|
485 |
'size' => 'small',
|
486 |
'default' => 'off',
|
576 |
),
|
577 |
300 => array(
|
578 |
'name' => 'search_in_custom_fields',
|
579 |
+
'label' => __( 'Search in custom fields', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'search_in_custom_fields', __( 'Make your custom fields searchable from our search bar.', 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $customFieldsLink ) ),
|
580 |
'class' => 'dgwt-wcas-premium-only',
|
581 |
'type' => 'text',
|
582 |
'default' => '',
|
601 |
),
|
602 |
520 => array(
|
603 |
'name' => 'search_synonyms',
|
604 |
+
'label' => __( 'Synonyms', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'synonyms', sprintf( __( 'The synonyms feature allows your users to find more relevant results. If your products have alternative names and users often misspell them, consider adding synonyms. <a target="_blank" href="%s">Read more</a> about this feature.', 'ajax-search-for-woocommerce' ), $synonymsLink ) ),
|
605 |
'type' => 'textarea',
|
606 |
+
'desc' => __( 'Synonyms should be separated by a comma. Each new synonyms group is entered in a new line. You can use a phrase instead of a single word. <br /> <br />Sample list:<br /> <br /><span class="dgwt-wcas-synonyms-sample">sofa, couch, davenport, divan, settee<br />big, grand, great, large, outsize</span>', 'ajax-search-for-woocommerce' ),
|
607 |
'class' => 'dgwt-wcas-settings-synonyms js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
|
608 |
),
|
609 |
600 => array(
|
616 |
'name' => 'filter_products_mode',
|
617 |
'label' => __( 'Filtering mode', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark(
|
618 |
'filter_products_mode',
|
619 |
+
__( 'Exclude the product group from the search results or allow search only among the indicated product group.', 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $excludeIncludeLink ),
|
620 |
'',
|
621 |
'right'
|
622 |
),
|
662 |
),
|
663 |
110 => array(
|
664 |
'name' => 'indexer_schedule',
|
665 |
+
'label' => __( 'Enable Scheduler', 'ajax-search-for-woocommerce' ) . ' ' . Helpers::createQuestionMark( 'indexer-schedule', __( "In most cases, you don't need to use the scheduler because the search index updates when you edit products. If you use import tools or custom code to refresh prices or bulk add/edit products, the indexing scheduler will be helpful.", 'ajax-search-for-woocommerce' ) . ' ' . sprintf( $readMore, $schedulerLink ) ),
|
666 |
'type' => 'checkbox',
|
667 |
'size' => 'small',
|
668 |
'class' => 'dgwt-wcas-options-cb-toggle js-dgwt-wcas-cbtgroup-indexer-schedule js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
|
690 |
) ),
|
691 |
);
|
692 |
$fuzzinesText1 = '<strong>' . __( 'Increases sales conversions', 'ajax-search-for-woocommerce' ) . '</strong>';
|
693 |
+
$fuzzinesText2 = sprintf( __( 'Returns suggestions based on likely relevance, even though a search keyword may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same results as for “iphone”. <a target="_blank" href="%s">Read more</a> about the fuzzy search feature.', 'ajax-search-for-woocommerce' ), $fuzzySearchLink );
|
694 |
|
695 |
if ( dgoraAsfwFs()->is_premium() ) {
|
696 |
} else {
|
791 |
return $value;
|
792 |
}
|
793 |
|
794 |
+
/**
|
795 |
* Update option
|
796 |
*
|
797 |
+
* @param string $optionKey
|
798 |
* @param string $value
|
799 |
*
|
800 |
* @return bool
|
817 |
|
818 |
if ( $canUpdate ) {
|
819 |
$updated = update_option( $this->settingSlug, $settings );
|
820 |
+
|
821 |
+
if ( $updated ) {
|
822 |
+
$this->settingsCache = array();
|
823 |
+
do_action( 'dgwt/wcas/settings/option_updated', $optionKey, $value );
|
824 |
+
}
|
825 |
+
|
826 |
}
|
827 |
|
828 |
}
|
921 |
return $is_premium;
|
922 |
}
|
923 |
|
924 |
+
/**
|
925 |
+
* Force values of some settings if they depend on other settings
|
926 |
+
*
|
927 |
+
* @return void
|
928 |
+
*/
|
929 |
+
private function dependentOptions()
|
930 |
+
{
|
931 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
932 |
+
$text = __( "You have selected the <b>Style -> Style -> Pirx (bean-shaped)</b> option. Pirx style forces a submit button to be enabled. You can find this option a few rows below. That's why this option is blocked.", 'ajax-search-for-woocommerce' );
|
933 |
+
$settings[400]['label'] = Helpers::createOverrideTooltip( 'ovtt-pirx-submit-button', '<p>' . $text . '</p>' ) . $settings[400]['label'];
|
934 |
+
return $settings;
|
935 |
+
} );
|
936 |
+
// Pirx style - force options for submit button
|
937 |
+
// Mark that the value of the option "mobile overlay" is forced
|
938 |
+
|
939 |
+
if ( $this->getOption( 'search_style' ) === 'pirx' ) {
|
940 |
+
//Submit button
|
941 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=show_submit_button', function () {
|
942 |
+
return 'on';
|
943 |
+
} );
|
944 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
945 |
+
$settings[400]['disabled'] = true;
|
946 |
+
return $settings;
|
947 |
+
} );
|
948 |
+
// Value of submit button
|
949 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=search_submit_text', function () {
|
950 |
+
return '';
|
951 |
+
} );
|
952 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
953 |
+
$settings[500]['disabled'] = true;
|
954 |
+
$settings[500]['class'] = $settings[500]['class'] . ' dgwt-wcas-hidden';
|
955 |
+
return $settings;
|
956 |
+
} );
|
957 |
+
// Submit background color
|
958 |
+
add_filter( 'dgwt/wcas/settings/load_value/key=bg_submit_color', function () {
|
959 |
+
return '';
|
960 |
+
} );
|
961 |
+
add_filter( 'dgwt/wcas/settings/section=form', function ( $settings ) {
|
962 |
+
$settings[510]['disabled'] = true;
|
963 |
+
$settings[510]['class'] = $settings[510]['class'] . ' dgwt-wcas-hidden';
|
964 |
+
return $settings;
|
965 |
+
} );
|
966 |
+
}
|
967 |
+
|
968 |
+
}
|
969 |
+
|
970 |
/**
|
971 |
* Clear settings cache
|
972 |
*/
|
includes/Shortcode.php
CHANGED
@@ -25,14 +25,19 @@ class Shortcode {
|
|
25 |
$layout = Helpers::getLayoutSettings();
|
26 |
|
27 |
$searchArgs = shortcode_atts( array(
|
28 |
-
'class'
|
29 |
-
'
|
30 |
-
'
|
31 |
-
'
|
32 |
-
'
|
|
|
|
|
|
|
|
|
|
|
33 |
), $atts, $tag );
|
34 |
|
35 |
-
$searchArgs['class'] .= empty( $
|
36 |
|
37 |
$args = apply_filters( 'dgwt/wcas/shortcode/args', $searchArgs );
|
38 |
|
@@ -57,6 +62,10 @@ class Shortcode {
|
|
57 |
}
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
60 |
ob_start();
|
61 |
$filename = apply_filters( 'dgwt/wcas/form/partial_path', DGWT_WCAS_DIR . 'partials/search-form.php' );
|
62 |
if ( file_exists( $filename ) ) {
|
@@ -71,4 +80,68 @@ class Shortcode {
|
|
71 |
return apply_filters( 'dgwt/wcas/form/html', $html, $args );
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
25 |
$layout = Helpers::getLayoutSettings();
|
26 |
|
27 |
$searchArgs = shortcode_atts( array(
|
28 |
+
'class' => '',
|
29 |
+
'style' => $layout->style,
|
30 |
+
'icon' => $layout->icon,
|
31 |
+
'layout' => $layout->layout,
|
32 |
+
'layout_breakpoint' => '',
|
33 |
+
'mobile_overlay' => $layout->mobile_overlay,
|
34 |
+
'mobile_overlay_breakpoint' => '',
|
35 |
+
'darken_bg' => $layout->darken_background,
|
36 |
+
'submit_btn' => null,
|
37 |
+
'submit_text' => null
|
38 |
), $atts, $tag );
|
39 |
|
40 |
+
$searchArgs['class'] .= empty( $searchArgs['class'] ) ? 'woocommerce' : ' woocommerce';
|
41 |
|
42 |
$args = apply_filters( 'dgwt/wcas/shortcode/args', $searchArgs );
|
43 |
|
62 |
}
|
63 |
}
|
64 |
|
65 |
+
$args = self::mapAlternativeFormArgs( $args );
|
66 |
+
|
67 |
+
$args = self::applyCondtitionalFormArgs( $args );
|
68 |
+
|
69 |
ob_start();
|
70 |
$filename = apply_filters( 'dgwt/wcas/form/partial_path', DGWT_WCAS_DIR . 'partials/search-form.php' );
|
71 |
if ( file_exists( $filename ) ) {
|
80 |
return apply_filters( 'dgwt/wcas/form/html', $html, $args );
|
81 |
}
|
82 |
|
83 |
+
/**
|
84 |
+
* Map alternative form of shortcode params values
|
85 |
+
*
|
86 |
+
* @param array $args
|
87 |
+
*
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
public static function mapAlternativeFormArgs( $args ) {
|
91 |
+
|
92 |
+
// Show submit button
|
93 |
+
if ( isset( $args['submit_btn'] ) ) {
|
94 |
+
if ( in_array( $args['submit_btn'], array( '1', 'yes', 'show' ) ) ) {
|
95 |
+
$args['submit_btn'] = 'on';
|
96 |
+
}
|
97 |
+
|
98 |
+
if ( in_array( $args['submit_btn'], array( '0', 'no', 'hide' ) ) ) {
|
99 |
+
$args['submit_btn'] = 'off';
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
// Style: solaris, pirx
|
104 |
+
if ( ! empty( $args['style'] ) ) {
|
105 |
+
if ( in_array( $args['style'], array( 'default', 'classic' ) ) ) {
|
106 |
+
$args['style'] = 'solaris';
|
107 |
+
}
|
108 |
+
if ( in_array( $args['style'], array( 'bean', 'rounded' ) ) ) {
|
109 |
+
$args['style'] = 'pirx';
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
// Layout: classic, icon, icon-flexible, icon-flexible-inv
|
114 |
+
if ( ! empty( $args['layout'] ) ) {
|
115 |
+
if ( in_array( $args['layout'], array( 'search-bar', 'default' ) ) ) {
|
116 |
+
$args['layout'] = 'classic';
|
117 |
+
}
|
118 |
+
if ( in_array( $args['layout'], array( 'flex-icon-on-mobile', 'flex-icon-mob', ) ) ) {
|
119 |
+
$args['layout'] = 'icon-flexible';
|
120 |
+
}
|
121 |
+
if ( in_array( $args['layout'], array( 'flex-icon-on-desktop', 'flex-icon-desktop', ) ) ) {
|
122 |
+
$args['layout'] = 'icon-flexible-inv';
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
return $args;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Apply some conditions before pass shortcode args forward
|
131 |
+
*
|
132 |
+
* @param array $args
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
public static function applyCondtitionalFormArgs( $args ) {
|
137 |
+
|
138 |
+
// Force requires options for Pirx style
|
139 |
+
if ( ! empty( $args['style'] ) && $args['style'] === 'pirx' ) {
|
140 |
+
$args['submit_btn'] = 'on';
|
141 |
+
$args['submit_text'] = '';
|
142 |
+
}
|
143 |
+
|
144 |
+
return $args;
|
145 |
+
}
|
146 |
+
|
147 |
}
|
languages/ajax-search-for-woocommerce-el.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-es_CO.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-es_EC.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-es_ES.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-es_VE.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-fr_FR.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-it_IT.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-ja.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-nl_NL.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-pl_PL.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-pt_BR.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-ru_RU.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-sv_SE.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce-vi.mo
DELETED
Binary file
|
languages/ajax-search-for-woocommerce.pot
CHANGED
@@ -1,2356 +1,1279 @@
|
|
1 |
-
|
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version:
|
5 |
-
"Report-Msgid-Bugs-To: \n"
|
6 |
-
"
|
7 |
-
"
|
8 |
-
"Last-Translator: Damian Góra <support@fibosearch.com>\n"
|
9 |
-
"Language-Team: \n"
|
10 |
-
"Language: \n"
|
11 |
-
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
msgstr ""
|
20 |
-
|
21 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Logger.php:41
|
22 |
-
#, php-format
|
23 |
-
msgid "%1$s was called with an invalid level \"%2$s\"."
|
24 |
-
msgstr ""
|
25 |
-
|
26 |
-
#: ajax-search-for-woocommerce.php:270
|
27 |
-
#, php-format
|
28 |
-
msgid "%s is enabled but not effective. It requires %s in order to work."
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: includes/Abstracts/ThemeIntegration.php:49
|
32 |
-
#: includes/Integrations/Themes/Enfold/Enfold.php:50
|
33 |
-
#: includes/Integrations/Themes/Sober/Sober.php:43
|
34 |
-
#: includes/Integrations/Themes/The7/The7.php:46
|
35 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:45
|
36 |
-
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:43
|
37 |
-
#: includes/Integrations/Themes/Bridge/Bridge.php:43
|
38 |
-
#: includes/Integrations/Themes/BlockShop/BlockShop.php:43
|
39 |
-
#: includes/Integrations/Themes/Avada/Avada.php:46
|
40 |
-
#: includes/Integrations/Themes/Savoy/Savoy.php:43
|
41 |
-
#: includes/Integrations/Themes/Ekommart/Ekommart.php:43
|
42 |
-
#: includes/Integrations/Themes/Woodmart/Woodmart.php:61
|
43 |
-
#: includes/Integrations/Themes/Restoration/Restoration.php:45
|
44 |
-
#: includes/Integrations/Themes/Divi/Divi.php:61
|
45 |
-
#, php-format
|
46 |
-
msgid "%s Theme"
|
47 |
-
msgstr ""
|
48 |
-
|
49 |
-
#: includes/Admin/RegenerateImages.php:96
|
50 |
-
#, php-format
|
51 |
-
msgid ""
|
52 |
-
"%s: it is recommended to generate a special small image size for existing "
|
53 |
-
"products to ensure a better user experience. This is a one-time action. <br "
|
54 |
-
"/><br />You can do it by clicking %s or use an external plugin such as %s."
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: ajax-search-for-woocommerce.php:250
|
58 |
-
#, php-format
|
59 |
-
msgid ""
|
60 |
-
"%s: You need PHP version at least 7.0 to run this plugin. You are currently "
|
61 |
-
"using PHP version "
|
62 |
-
msgstr ""
|
63 |
-
|
64 |
-
#: includes/Settings.php:278
|
65 |
-
msgid "(beta feature)"
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: includes/Settings.php:759 includes/Settings.php:822
|
69 |
-
msgid "-- Disabled"
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: partials/admin/stats/stats.php:159 partials/admin/stats/stats.php:208
|
73 |
-
msgid "0 searches with results"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: includes/Admin/Troubleshooting.php:1288
|
77 |
-
#, php-format
|
78 |
-
msgid ""
|
79 |
-
"1. Unblock the default endpoint or get around the restrictions. Learn how to "
|
80 |
-
"solve the issue on our <a target=\"_blank\" href=\"%s\">documentation</a> "
|
81 |
-
"and fix it as soon as possible."
|
82 |
-
msgstr ""
|
83 |
|
84 |
-
|
85 |
-
msgid ""
|
86 |
-
"2. Once you do that, turn off the safe mode by clicking the following button:"
|
87 |
msgstr ""
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
"
|
92 |
-
"product name, description, SKU, custom field, tag or anything else that's in "
|
93 |
-
"your current search scope"
|
94 |
msgstr ""
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
msgid ""
|
99 |
-
"<b>Maybe your server can’t send an HTTP requests to itself</b>. Visit the "
|
100 |
-
"documentation and read the section <a target=\"_blank\" href=\"%s\">“Your "
|
101 |
-
"server can’t send an HTTP request to itself”</a>."
|
102 |
msgstr ""
|
103 |
|
104 |
-
|
105 |
-
msgid ""
|
106 |
-
"<b>New Ultra-Fast Search Engine</b> – works very fast even with 100,000+ "
|
107 |
-
"products "
|
108 |
msgstr ""
|
109 |
|
110 |
-
#:
|
111 |
-
|
112 |
-
msgid ""
|
113 |
-
"<b>Synonyms</b> - if the phrase is an alternate version of any other words, "
|
114 |
-
"add it as a synonym. Learn more about <a href=\"%s\" target=\"_blank\">the "
|
115 |
-
"synonyms feature."
|
116 |
msgstr ""
|
117 |
|
118 |
-
#:
|
119 |
-
|
120 |
-
msgid ""
|
121 |
-
"<b>Varied naming convention</b> - this issue occurs when users may type a "
|
122 |
-
"phrase in several different way – eg. you have SKU \"CB-978-8-7290\", but "
|
123 |
-
"users might type it in a different way: \"CB978 8 7290\", \"CB/978/8/7290\", "
|
124 |
-
"\"CB97887290\" and so on. To solve such problems, contact our <a href=\"%s\" "
|
125 |
-
"target=\"_blank\">technical support</a>, because the solution may be "
|
126 |
-
"different for each case."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#:
|
130 |
-
msgid ""
|
131 |
-
"<strong>Warning:</strong> We have detected that the search endpoint is being "
|
132 |
-
"overwritten by the filter and alternative search endpoint will not work "
|
133 |
-
"properly. Remove filters that override the search engine endpoint."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/
|
137 |
-
msgid ""
|
138 |
-
"A real solution is to find the reason why the WP-Cron doesn’t work and fix "
|
139 |
-
"it."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/
|
143 |
-
msgid "
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/
|
147 |
-
|
148 |
-
msgid ""
|
149 |
-
"Add <strong>Archive Products</strong> widget to the template <strong>"
|
150 |
-
"%s</strong> or create a new template dedicated to the WooCommerce search "
|
151 |
-
"results page. Learn how to do it in <a href=\"%s\" target=\"_blank\">our "
|
152 |
-
"documentation</a>."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: includes/
|
156 |
-
|
157 |
-
#: includes/Admin/Troubleshooting.php:1340
|
158 |
-
#: includes/Admin/Troubleshooting.php:1343
|
159 |
-
#, php-format
|
160 |
-
msgid "Add a constant <code>%s</code> to your <code>wp-config.php</code> file."
|
161 |
msgstr ""
|
162 |
|
163 |
-
#:
|
164 |
-
msgid ""
|
165 |
-
"Add below code to your child theme’s <em>functions.php</em> file or via a "
|
166 |
-
"plugin that allows custom functions to be added, such as the <a href=\"https:"
|
167 |
-
"//wordpress.org/plugins/code-snippets/\" target=\"_blank\">Code snippets</a> "
|
168 |
-
"plugin."
|
169 |
msgstr ""
|
170 |
|
171 |
-
#:
|
172 |
-
msgid ""
|
173 |
-
"Add below code to your child theme’s <em>functions.php</em> file or via a "
|
174 |
-
"plugin that allows custom functions to be added, such as the <a href=\"https:"
|
175 |
-
"//wordpress.org/plugins/code-snippets/\" target=\"_blank\">Code snippets</a> "
|
176 |
-
"plugin. Please don’t add custom code directly to your parent theme’s "
|
177 |
-
"functions.php file as this will be wiped entirely when you update the theme."
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/
|
181 |
-
|
|
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/Admin/
|
185 |
-
msgid "
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/Admin/
|
189 |
-
msgid ""
|
190 |
-
"Add the following PHP code to your functions.php file in the child theme or "
|
191 |
-
"use e.g. CodeSnippets plugin."
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: includes/Admin/
|
195 |
-
msgid "
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: includes/Admin/
|
199 |
-
msgid ""
|
200 |
-
"Adding extra rules to <code>/usr/local/nginx/conf/wpsecure_${vhostname}."
|
201 |
-
"conf</code>"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/
|
205 |
-
|
206 |
-
msgid "No results label"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: includes/Admin/
|
210 |
-
|
211 |
-
msgid ""
|
212 |
-
"After following the above solutions, perform some search analytics table "
|
213 |
-
"maintenance: %s"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#:
|
217 |
-
|
|
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: includes/Admin/
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
"50%%."
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: partials/admin/indexer-header.php:21
|
229 |
-
msgid "All product changes will be <strong>re-indexed automatically</strong>"
|
230 |
-
msgstr ""
|
231 |
-
|
232 |
-
#: includes/Admin/Troubleshooting.php:1293
|
233 |
-
#, php-format
|
234 |
-
msgid "Alternative endpoint: <code>%s</code>"
|
235 |
-
msgstr ""
|
236 |
-
|
237 |
-
#: includes/Admin/Troubleshooting.php:1951
|
238 |
-
msgid "Alternative search endpoint"
|
239 |
-
msgstr ""
|
240 |
-
|
241 |
-
#: includes/Abstracts/ThemeIntegration.php:70
|
242 |
-
#: includes/Integrations/Themes/TheGem/TheGem.php:108
|
243 |
-
#: includes/Integrations/Themes/TheGem/TheGem.php:116
|
244 |
-
#: includes/Integrations/Themes/Enfold/Enfold.php:71
|
245 |
-
#: includes/Integrations/Themes/Sober/Sober.php:64
|
246 |
-
#: includes/Integrations/Themes/The7/The7.php:67
|
247 |
-
#: includes/Integrations/Themes/Flatsome/Flatsome.php:64
|
248 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:81
|
249 |
-
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:67
|
250 |
-
#: includes/Integrations/Themes/Storefront/Storefront.php:65
|
251 |
-
#: includes/Integrations/Themes/Bridge/Bridge.php:64
|
252 |
-
#: includes/Integrations/Themes/BlockShop/BlockShop.php:64
|
253 |
-
#: includes/Integrations/Themes/Impreza/Impreza.php:60
|
254 |
-
#: includes/Integrations/Themes/Avada/Avada.php:67
|
255 |
-
#: includes/Integrations/Themes/Savoy/Savoy.php:64
|
256 |
-
#: includes/Integrations/Themes/Ekommart/Ekommart.php:64
|
257 |
-
#: includes/Integrations/Themes/Woodmart/Woodmart.php:82
|
258 |
-
#: includes/Integrations/Themes/Restoration/Restoration.php:66
|
259 |
-
#: includes/Integrations/Themes/Divi/Divi.php:82
|
260 |
-
msgid "Alternative ways to embed a search bar"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: includes/Admin/
|
264 |
-
|
265 |
-
msgid ""
|
266 |
-
"An error occurred while trying to connect to the database using a PDO_MYSQL "
|
267 |
-
"driver: <code>%s</code>."
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: includes/
|
271 |
-
msgid "
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: includes/Admin/
|
275 |
-
msgid "
|
276 |
msgstr ""
|
277 |
|
278 |
-
#:
|
279 |
-
msgid "
|
280 |
msgstr ""
|
281 |
|
282 |
#: includes/Admin/Promo/Upgrade.php:63
|
283 |
msgid "and more..."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#:
|
287 |
-
|
288 |
-
msgid ""
|
289 |
-
"Are there any difficulties? <b>We will do it for you!</b> We offer free of "
|
290 |
-
"charge search bar implementation for Pro users. <a target=\"_blank\" "
|
291 |
-
"href=\"%s\">Become one now!</a>"
|
292 |
-
msgstr ""
|
293 |
-
|
294 |
-
#: partials/admin/how-to-use.php:15
|
295 |
-
#, php-format
|
296 |
-
msgid ""
|
297 |
-
"As a menu item - go to the %s and add the menu item “FiboSearch bar”. Done!"
|
298 |
-
msgstr ""
|
299 |
-
|
300 |
-
#: partials/admin/how-to-use.php:17
|
301 |
-
#, php-format
|
302 |
-
msgid "As a widget - go to the %s and choose “FiboSearch bar”"
|
303 |
-
msgstr ""
|
304 |
-
|
305 |
-
#: includes/Admin/SettingsAPI.php:588
|
306 |
-
#, php-format
|
307 |
-
msgid "Attributes: %s"
|
308 |
-
msgstr ""
|
309 |
-
|
310 |
-
#: includes/Settings.php:121 partials/admin/search-preview.php:22
|
311 |
-
msgid "Autocomplete"
|
312 |
-
msgstr ""
|
313 |
-
|
314 |
-
#: partials/admin/stats/stats.php:77 partials/admin/stats/stats.php:122
|
315 |
-
msgid "autocomplete"
|
316 |
-
msgstr ""
|
317 |
-
|
318 |
-
#: includes/Integrations/Brands.php:192 includes/Integrations/Brands.php:214
|
319 |
-
#, php-format
|
320 |
-
msgid "Based on the plugin %s"
|
321 |
-
msgstr ""
|
322 |
-
|
323 |
-
#: includes/Settings.php:195 includes/Settings.php:356
|
324 |
-
msgid "Basic"
|
325 |
-
msgstr ""
|
326 |
-
|
327 |
-
#: includes/Admin/Troubleshooting.php:1966
|
328 |
-
msgid "Blocked search endpoint test"
|
329 |
-
msgstr ""
|
330 |
-
|
331 |
-
#: includes/Settings.php:567
|
332 |
-
msgid "Border color"
|
333 |
-
msgstr ""
|
334 |
-
|
335 |
-
#: includes/Integrations/Brands.php:323
|
336 |
-
msgid "Brand"
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
#: includes/Integrations/Brands.php:322
|
340 |
-
msgid "Brands"
|
341 |
-
msgstr ""
|
342 |
-
|
343 |
-
#: partials/admin/indexer-body.php:42
|
344 |
-
msgid "Build ID"
|
345 |
-
msgstr ""
|
346 |
-
|
347 |
-
#: partials/admin/indexer-header-demo.php:15
|
348 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:710
|
349 |
-
msgid "Build index"
|
350 |
-
msgstr ""
|
351 |
-
|
352 |
-
#: includes/Analytics/UserInterface.php:421
|
353 |
-
msgid ""
|
354 |
-
"Can't check the status. The search index hasn't been completed. Go to the "
|
355 |
-
"Indexer tab and wait until the search index is completed."
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:659
|
359 |
-
msgid "Canceling..."
|
360 |
-
msgstr ""
|
361 |
-
|
362 |
-
#: partials/admin/indexer-body.php:25
|
363 |
-
msgid "Cancellation..."
|
364 |
-
msgstr ""
|
365 |
-
|
366 |
-
#: includes/Admin/Troubleshooting.php:1185
|
367 |
-
msgid ""
|
368 |
-
"Change the above-mentioned language codes to the correct format: <code>"
|
369 |
-
"xx</code>, <code>xxx</code>, <code>xx-xx</code> or <code>xx-xxxx</code>."
|
370 |
-
msgstr ""
|
371 |
-
|
372 |
-
#: partials/admin/stats/critical-searches-row.php:12
|
373 |
-
msgid "Check"
|
374 |
-
msgstr ""
|
375 |
-
|
376 |
-
#: includes/Admin/Troubleshooting.php:1592
|
377 |
-
#, php-format
|
378 |
-
msgid ""
|
379 |
-
"Check how to solve this issue in <a target=\"_blank\" href=\"%s\">our "
|
380 |
-
"documentation.</a> Before you fix the problem, switch on the alternative "
|
381 |
-
"search endpoint here: %s. This will allow the search engine to work again, "
|
382 |
-
"but search speed may not be optimal. Activate the alternative endpoint only "
|
383 |
-
"temporarily, and solve the source of the problem as soon as possible."
|
384 |
-
msgstr ""
|
385 |
-
|
386 |
-
#: partials/admin/stats/stats.php:20
|
387 |
-
msgid "Check if it's been solved"
|
388 |
-
msgstr ""
|
389 |
-
|
390 |
-
#: includes/Analytics/UserInterface.php:422
|
391 |
-
msgid "Check the indexer status"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#:
|
395 |
-
|
396 |
-
msgid "child theme of <b>%s</b>"
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: includes/
|
400 |
-
msgid "
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: includes/
|
404 |
-
msgid "
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: includes/
|
408 |
-
msgid "
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: includes/Admin/SettingsAPI.php:
|
412 |
msgid "Contact"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#:
|
416 |
-
msgid ""
|
417 |
-
"Contact your hosting provider and ask for increasing the value of the <code>"
|
418 |
-
"max_allowed_packet</code> variable in your MySQL server. It will definitely "
|
419 |
-
"solve the problem."
|
420 |
-
msgstr ""
|
421 |
-
|
422 |
-
#: partials/admin/indexer-header.php:64
|
423 |
-
msgid ""
|
424 |
-
"Contact your hosting provider and ask for increasing the value of the <code>"
|
425 |
-
"max_connections</code> variable in your MySQL server. It will definitely "
|
426 |
-
"solve the problem."
|
427 |
-
msgstr ""
|
428 |
-
|
429 |
-
#: partials/admin/indexer-header.php:55
|
430 |
-
msgid ""
|
431 |
-
"Contact your hosting provider and ask for increasing the value of the <code>"
|
432 |
-
"wait_timeout</code> variable in your MySQL server. It should solve the "
|
433 |
-
"source of the problem. If your hosting provider isn't able to change MySQL "
|
434 |
-
"variables, try to solve it in an alternative way. Follow steps below:"
|
435 |
-
msgstr ""
|
436 |
-
|
437 |
-
#: includes/Helpers.php:1101
|
438 |
-
msgid "continue reading"
|
439 |
-
msgstr ""
|
440 |
-
|
441 |
-
#: includes/Admin/Troubleshooting.php:823
|
442 |
-
#, php-format
|
443 |
-
msgid ""
|
444 |
-
"Could not load <code>wp-load.php</code> from the locations it normally is. "
|
445 |
-
"To solve this issue, contact the <a target=\"_blank\" href=\"%s\">technical "
|
446 |
-
"support</a>."
|
447 |
-
msgstr ""
|
448 |
-
|
449 |
-
#: partials/admin/stats/stats.php:8
|
450 |
-
msgid "Critical searches without result"
|
451 |
-
msgstr ""
|
452 |
-
|
453 |
-
#: includes/Admin/Troubleshooting.php:1296
|
454 |
-
#, php-format
|
455 |
-
msgid "Current endpoint: <code>%s</code>"
|
456 |
-
msgstr ""
|
457 |
-
|
458 |
-
#: includes/Admin/Troubleshooting.php:822
|
459 |
-
msgid "Custom location of wp-load.php file"
|
460 |
-
msgstr ""
|
461 |
-
|
462 |
-
#: includes/Settings.php:718
|
463 |
-
msgid "daily"
|
464 |
-
msgstr ""
|
465 |
-
|
466 |
-
#: includes/Settings.php:275
|
467 |
-
msgid "Darkened background"
|
468 |
-
msgstr ""
|
469 |
-
|
470 |
-
#: includes/Settings.php:276
|
471 |
-
#, php-format
|
472 |
-
msgid ""
|
473 |
-
"Darkening the page background while autocomplete is active gives it stronger "
|
474 |
-
"emphasis, minimizing elements (e.g., ads, carousels, and other page content) "
|
475 |
-
"that could distract users from considering autocomplete suggestions. <a "
|
476 |
-
"target=\"_blank\" href=\"%s\">Read more</a> about this feature."
|
477 |
-
msgstr ""
|
478 |
-
|
479 |
-
#: partials/admin/indexer-body.php:46
|
480 |
-
msgid "DB"
|
481 |
-
msgstr ""
|
482 |
-
|
483 |
-
#: partials/admin/debug/debug.php:20
|
484 |
-
msgid "Debug page"
|
485 |
-
msgstr ""
|
486 |
-
|
487 |
-
#: widget.php:37 includes/EmbeddingViaMenu.php:186
|
488 |
-
msgid "Default"
|
489 |
-
msgstr ""
|
490 |
-
|
491 |
-
#: includes/Admin/Troubleshooting.php:1292
|
492 |
-
#, php-format
|
493 |
-
msgid "Default endpoint: <code>%s</code>"
|
494 |
-
msgstr ""
|
495 |
-
|
496 |
-
#: includes/Admin/Troubleshooting.php:1705
|
497 |
-
msgid "Defender plugin by WPMU DEV blocks AJAX calls of the live search"
|
498 |
-
msgstr ""
|
499 |
-
|
500 |
-
#: includes/Settings.php:479
|
501 |
-
msgid "Details panel"
|
502 |
-
msgstr ""
|
503 |
-
|
504 |
-
#: includes/Admin/Troubleshooting.php:691
|
505 |
-
msgid "Dismiss"
|
506 |
-
msgstr ""
|
507 |
-
|
508 |
-
#: includes/Admin/Troubleshooting.php:397
|
509 |
-
#, php-format
|
510 |
-
msgid ""
|
511 |
-
"Due to the way the TranslatePress - Multilingual plugin works, we can only "
|
512 |
-
"provide support for it in the <a href=\"%s\" target=\"_blank\">Pro "
|
513 |
-
"version</a>."
|
514 |
-
msgstr ""
|
515 |
-
|
516 |
-
#: includes/Admin/Troubleshooting.php:951
|
517 |
-
msgid ""
|
518 |
-
"Edit <code>wp-config.php</code> file, find the <code>DB_HOST</code> constant,"
|
519 |
-
" and change its value from <code>localhost</code> to <code>127.0.0.1</code>."
|
520 |
-
msgstr ""
|
521 |
-
|
522 |
-
#: includes/Admin/Troubleshooting.php:1874
|
523 |
-
msgid "Elementor search results template"
|
524 |
-
msgstr ""
|
525 |
-
|
526 |
-
#: includes/Admin/Troubleshooting.php:1581
|
527 |
-
msgid "Enable alternative search endpoint"
|
528 |
-
msgstr ""
|
529 |
-
|
530 |
-
#: includes/Settings.php:705
|
531 |
-
msgid "Enable Scheduler"
|
532 |
-
msgstr ""
|
533 |
-
|
534 |
-
#: includes/Analytics/UserInterface.php:97
|
535 |
-
msgid "Enable search analytics"
|
536 |
-
msgstr ""
|
537 |
-
|
538 |
-
#: partials/admin/indexer-body.php:76 partials/admin/indexer-body.php:99
|
539 |
-
#: partials/admin/indexer-body.php:124
|
540 |
-
msgid "End"
|
541 |
-
msgstr ""
|
542 |
-
|
543 |
-
#: partials/admin/indexer-header.php:45
|
544 |
-
#, php-format
|
545 |
-
msgid "Error code %s"
|
546 |
-
msgstr ""
|
547 |
-
|
548 |
-
#: includes/Admin/Troubleshooting.php:942
|
549 |
-
msgid "Error establishing a database connection"
|
550 |
-
msgstr ""
|
551 |
-
|
552 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:674
|
553 |
-
msgid "Errors"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: includes/
|
557 |
-
|
|
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: includes/
|
561 |
-
msgid ""
|
562 |
-
"Exclude the product group from the search results or allow search only among "
|
563 |
-
"the indicated product group"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/
|
567 |
-
|
|
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: includes/
|
571 |
-
msgid "
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: includes/Admin/Troubleshooting.php:
|
575 |
-
msgid "
|
576 |
msgstr ""
|
577 |
|
578 |
-
#:
|
579 |
-
|
580 |
-
msgid ""
|
581 |
-
"Fantastic! The FiboSearch analyzer hasn't found any critical search phrases "
|
582 |
-
"for the last %d days."
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: includes/Admin/
|
586 |
-
msgid "
|
587 |
msgstr ""
|
588 |
|
589 |
-
|
590 |
-
msgid "
|
591 |
-
msgstr ""
|
592 |
-
|
593 |
-
#: widget.php:26 includes/EmbeddingViaMenu.php:55
|
594 |
-
#: includes/EmbeddingViaMenu.php:156
|
595 |
-
msgid "FiboSearch bar"
|
596 |
-
msgstr ""
|
597 |
-
|
598 |
-
#: includes/EmbeddingViaMenu.php:178
|
599 |
-
msgid "FiboSearch bar will be displayed here."
|
600 |
-
msgstr ""
|
601 |
-
|
602 |
-
#: includes/Admin/Promo/Upgrade.php:54
|
603 |
-
msgid "FiboSearch Pro - Upgrade Now"
|
604 |
-
msgstr ""
|
605 |
-
|
606 |
-
#. Author of the plugin
|
607 |
-
msgid "FiboSearch Team"
|
608 |
-
msgstr ""
|
609 |
-
|
610 |
-
#: includes/Admin/Troubleshooting.php:944
|
611 |
-
msgid ""
|
612 |
-
"FiboSearch uses a PDO_MYSQL driver in the search engine. A proper database "
|
613 |
-
"connection is required."
|
614 |
-
msgstr ""
|
615 |
-
|
616 |
-
#: includes/Settings.php:664 includes/Settings.php:776
|
617 |
-
msgid "Filtering mode"
|
618 |
-
msgstr ""
|
619 |
-
|
620 |
-
#: includes/Settings.php:676 includes/Settings.php:788
|
621 |
-
msgid "Filters"
|
622 |
-
msgstr ""
|
623 |
-
|
624 |
-
#: includes/Settings.php:677 includes/Settings.php:789
|
625 |
-
msgid ""
|
626 |
-
"Filters that specify the product group that will be affected by the above "
|
627 |
-
"mode"
|
628 |
-
msgstr ""
|
629 |
-
|
630 |
-
#: partials/admin/indexer-body.php:21
|
631 |
-
#, php-format
|
632 |
-
msgid "Finalization... Wait a moment. (%s products)"
|
633 |
-
msgstr ""
|
634 |
-
|
635 |
-
#: includes/Admin/Troubleshooting.php:1836
|
636 |
-
msgid "Find section <code>Access Control -> whitelist URL</code>"
|
637 |
-
msgstr ""
|
638 |
-
|
639 |
-
#: includes/Admin/Troubleshooting.php:1413
|
640 |
-
msgid "Fix “Out of stock“ relationships"
|
641 |
-
msgstr ""
|
642 |
-
|
643 |
-
#: includes/Integrations/Themes/Flatsome/Flatsome.php:43
|
644 |
-
msgid "Flatsome Theme"
|
645 |
-
msgstr ""
|
646 |
-
|
647 |
-
#: includes/Helpers.php:999
|
648 |
-
#, php-format
|
649 |
-
msgid ""
|
650 |
-
"Furthermore, you can override this option for a specific search bar via "
|
651 |
-
"shortcode params. <a href=\"%s\" target=\"_blank\">Learn more about "
|
652 |
-
"shortcodes parameters</a>."
|
653 |
-
msgstr ""
|
654 |
-
|
655 |
-
#: includes/Settings.php:637
|
656 |
-
msgid "Fuzziness"
|
657 |
-
msgstr ""
|
658 |
-
|
659 |
-
#: includes/Settings.php:755 includes/Settings.php:817
|
660 |
-
msgid "Fuzzy matching"
|
661 |
-
msgstr ""
|
662 |
-
|
663 |
-
#: partials/admin/features.php:21 includes/Admin/Promo/Upgrade.php:49
|
664 |
-
msgid "Fuzzy search"
|
665 |
-
msgstr ""
|
666 |
-
|
667 |
-
#: includes/Admin/Troubleshooting.php:477
|
668 |
-
#, php-format
|
669 |
-
msgid ""
|
670 |
-
"Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your "
|
671 |
-
"WordPress. You should see issues related to REST API or Loopback request. "
|
672 |
-
"Expand descriptions of these errors and follow the instructions. Probably "
|
673 |
-
"you will need to contact your hosting provider to solve it."
|
674 |
-
msgstr ""
|
675 |
-
|
676 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:67
|
677 |
-
#, php-format
|
678 |
-
msgid ""
|
679 |
-
"Go to <code>Appearance -> <a target=\"_blank\" href=\"%s\">Customize</a> -> "
|
680 |
-
"Header -> Search</code> and enable <code>Predictive Search</code>"
|
681 |
-
msgstr ""
|
682 |
-
|
683 |
-
#: includes/Admin/Troubleshooting.php:1707
|
684 |
-
#, php-format
|
685 |
-
msgid ""
|
686 |
-
"Go to <code>Defender -> Security Tweaks -> <a href=\"%s\" target=\"_blank\">"
|
687 |
-
"Resolved</a> -> Prevent PHP execution</code> and add following file path as "
|
688 |
-
"exceptions: <code>%s</code>"
|
689 |
-
msgstr ""
|
690 |
-
|
691 |
-
#: includes/Admin/Troubleshooting.php:756
|
692 |
-
#, php-format
|
693 |
-
msgid ""
|
694 |
-
"Go to <code>Security -> Settings -> Advanced -> <a href=\"%s\" "
|
695 |
-
"target=\"_blank\">System Tweaks</a></code>."
|
696 |
-
msgstr ""
|
697 |
-
|
698 |
-
#: includes/Admin/Troubleshooting.php:580
|
699 |
-
#, php-format
|
700 |
-
msgid ""
|
701 |
-
"Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
|
702 |
-
"Products (tab)</a></code> and check option <code>%s</code> and uncheck "
|
703 |
-
"option <code>%s</code>."
|
704 |
-
msgstr ""
|
705 |
-
|
706 |
-
#: includes/Admin/Troubleshooting.php:630
|
707 |
-
#, php-format
|
708 |
-
msgid ""
|
709 |
-
"Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">"
|
710 |
-
"Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>"
|
711 |
-
"Searching by Text</code> extension and save changes."
|
712 |
-
msgstr ""
|
713 |
-
|
714 |
-
#: includes/Admin/Troubleshooting.php:984
|
715 |
-
#, php-format
|
716 |
-
msgid ""
|
717 |
-
"Go to the <code>Jetpack settings page -> <a href=\"%s\" target=\"_blank\">"
|
718 |
-
"Performance tab</a> -> disable the Search module</code>"
|
719 |
-
msgstr ""
|
720 |
-
|
721 |
-
#: includes/Admin/Troubleshooting.php:909
|
722 |
-
#: includes/Admin/Troubleshooting.php:1066
|
723 |
-
#: includes/Admin/Troubleshooting.php:1100
|
724 |
-
#: includes/Admin/Troubleshooting.php:1186
|
725 |
-
#: includes/Admin/Troubleshooting.php:1219
|
726 |
-
#, php-format
|
727 |
-
msgid "Go to the Indexer tab and click the button <i>%s</i>."
|
728 |
-
msgstr ""
|
729 |
-
|
730 |
-
#: includes/Admin/Troubleshooting.php:1184
|
731 |
-
msgid ""
|
732 |
-
"Go to the multilingual plugin settings page and find the section where you "
|
733 |
-
"can edit the available languages."
|
734 |
-
msgstr ""
|
735 |
-
|
736 |
-
#: includes/Admin/Troubleshooting.php:1835
|
737 |
-
msgid "Go to the settings"
|
738 |
-
msgstr ""
|
739 |
-
|
740 |
-
#: includes/Admin/Troubleshooting.php:541
|
741 |
-
msgid "Great! Our plugin works great with this version of WordPress."
|
742 |
-
msgstr ""
|
743 |
-
|
744 |
-
#: partials/admin/troubleshooting.php:18
|
745 |
-
msgid ""
|
746 |
-
"Great! We have not detected any problems that could affect the correct "
|
747 |
-
"functioning of our plugin."
|
748 |
-
msgstr ""
|
749 |
-
|
750 |
-
#: includes/Settings.php:370
|
751 |
-
msgid "Group results"
|
752 |
-
msgstr ""
|
753 |
-
|
754 |
-
#: includes/Settings.php:762 includes/Settings.php:825
|
755 |
-
msgid "Hard"
|
756 |
-
msgstr ""
|
757 |
-
|
758 |
-
#: includes/Admin/Troubleshooting.php:1784
|
759 |
-
msgid "Here are few samples NGINX config which helps other users:"
|
760 |
-
msgstr ""
|
761 |
-
|
762 |
-
#: includes/Integrations/Themes/Impreza/Impreza.php:35
|
763 |
-
#, php-format
|
764 |
-
msgid ""
|
765 |
-
"Here is <a href=\"%s\" target=\"_blank\">article</a> about how to do it "
|
766 |
-
"using Impreza child-theme."
|
767 |
-
msgstr ""
|
768 |
-
|
769 |
-
#: includes/Admin/Promo/FeedbackNotice.php:71
|
770 |
-
#, php-format
|
771 |
-
msgid ""
|
772 |
-
"Hey %s, it's Damian Góra from %s. You have used this free plugin for some "
|
773 |
-
"time now, and I hope you like it!"
|
774 |
-
msgstr ""
|
775 |
-
|
776 |
-
#: partials/admin/indexer-header.php:103
|
777 |
-
msgid "Hide details"
|
778 |
-
msgstr ""
|
779 |
-
|
780 |
-
#: includes/Settings.php:560
|
781 |
-
msgid "Highlight color"
|
782 |
-
msgstr ""
|
783 |
-
|
784 |
-
#: includes/Settings.php:180
|
785 |
-
msgid "How to add search bar in your theme?"
|
786 |
-
msgstr ""
|
787 |
-
|
788 |
-
#: includes/Settings.php:186
|
789 |
-
msgid "How to add?"
|
790 |
-
msgstr ""
|
791 |
-
|
792 |
-
#: partials/admin/stats/stats.php:48
|
793 |
-
msgid "How to fix it?"
|
794 |
-
msgstr ""
|
795 |
-
|
796 |
-
#. URI of the plugin
|
797 |
-
#. Author URI of the plugin
|
798 |
-
msgid ""
|
799 |
-
"https://fibosearch.com?utm_source=wp-"
|
800 |
-
"admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
|
801 |
-
msgstr ""
|
802 |
-
|
803 |
-
#: includes/Admin/Troubleshooting.php:1278
|
804 |
-
msgid "I've fixed it! Restore the default endpoint"
|
805 |
-
msgstr ""
|
806 |
-
|
807 |
-
#: widget.php:40 includes/Settings.php:251 includes/EmbeddingViaMenu.php:189
|
808 |
-
msgid "Icon on mobile, search bar on desktop"
|
809 |
-
msgstr ""
|
810 |
-
|
811 |
-
#: includes/Admin/Troubleshooting.php:1131
|
812 |
-
#, php-format
|
813 |
-
msgid ""
|
814 |
-
"If the following errors are related to your theme or plugins, try to fix "
|
815 |
-
"them yourself or contact your developers. Otherwise, please <a href=\"%s\" "
|
816 |
-
"target=\"_blank\">create a support ticket</a>."
|
817 |
-
msgstr ""
|
818 |
-
|
819 |
-
#: partials/admin/indexer-header.php:89
|
820 |
-
msgid ""
|
821 |
-
"If the indexer still doesn't work, add a constant <code>"
|
822 |
-
"define('DGWT_WCAS_INDEXER_MODE', 'sync');</code> to your <code>wp-config."
|
823 |
-
"php</code> file and try to rebuild the search index again"
|
824 |
-
msgstr ""
|
825 |
-
|
826 |
-
#: partials/admin/features.php:14
|
827 |
-
msgid ""
|
828 |
-
"If users can’t find the product they’re searching for, they can’t buy it. "
|
829 |
-
"Help your customers to find the right products even <span>10× faster</span>."
|
830 |
-
msgstr ""
|
831 |
-
|
832 |
-
#: includes/Admin/Troubleshooting.php:1794
|
833 |
-
#, php-format
|
834 |
-
msgid ""
|
835 |
-
"If you can't solve it on the NGINX level, try alternative 100%% reliable "
|
836 |
-
"solution described <a target=\"_blank\" href=\"%s\">in this article</a>."
|
837 |
-
msgstr ""
|
838 |
-
|
839 |
-
#: partials/admin/indexer-header.php:66
|
840 |
-
msgid ""
|
841 |
-
"If you see the <b>Troubleshooting tab</b> above, click it and try to solve "
|
842 |
-
"the issues mentioned there"
|
843 |
-
msgstr ""
|
844 |
-
|
845 |
-
#: includes/Admin/Troubleshooting.php:701
|
846 |
-
#, php-format
|
847 |
-
msgid ""
|
848 |
-
"If you think the search results page is displaying your products correctly, "
|
849 |
-
"you can ignore and dismiss this message: %s"
|
850 |
-
msgstr ""
|
851 |
-
|
852 |
-
#: includes/Admin/Troubleshooting.php:1345
|
853 |
-
#, php-format
|
854 |
-
msgid ""
|
855 |
-
"If your current numbers of records in the <code>%s</code> table is not a "
|
856 |
-
"issue, increase the limit to 500k, for example, and this alert will "
|
857 |
-
"disappear."
|
858 |
-
msgstr ""
|
859 |
-
|
860 |
-
#: includes/Integrations/Themes/Impreza/Impreza.php:46
|
861 |
-
msgid "Impreza Theme"
|
862 |
-
msgstr ""
|
863 |
-
|
864 |
-
#: includes/Helpers.php:1100
|
865 |
-
msgctxt "in categories fe. in Books > Crime stories"
|
866 |
-
msgid "in"
|
867 |
-
msgstr ""
|
868 |
-
|
869 |
-
#: includes/Settings.php:706
|
870 |
-
msgid ""
|
871 |
-
"In most cases, you don't need to use the scheduler because the search index "
|
872 |
-
"updates when you edit products. If you use import tools or custom code to "
|
873 |
-
"refresh prices or bulk add/edit products, the indexing scheduler will be "
|
874 |
-
"helpful."
|
875 |
-
msgstr ""
|
876 |
-
|
877 |
-
#: includes/Settings.php:670 includes/Settings.php:782
|
878 |
-
msgid "Include"
|
879 |
-
msgstr ""
|
880 |
-
|
881 |
-
#: includes/Admin/Troubleshooting.php:628
|
882 |
-
msgid ""
|
883 |
-
"Incompatible \"Searching by Text\" extension from WOOF - WooCommerce "
|
884 |
-
"Products Filter plugin is active"
|
885 |
-
msgstr ""
|
886 |
-
|
887 |
-
#: includes/Admin/Troubleshooting.php:1870
|
888 |
-
msgid ""
|
889 |
-
"Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products "
|
890 |
-
"Filter"
|
891 |
-
msgstr ""
|
892 |
-
|
893 |
-
#: includes/Admin/Troubleshooting.php:1180
|
894 |
-
msgid "Incompatible multilingual plugin setting"
|
895 |
-
msgstr ""
|
896 |
-
|
897 |
-
#: includes/Admin/Troubleshooting.php:1862
|
898 |
-
msgid "Incompatible plugins"
|
899 |
-
msgstr ""
|
900 |
-
|
901 |
-
#: includes/Admin/Troubleshooting.php:1096
|
902 |
-
msgid "Incompatible Polylang plugin setting"
|
903 |
-
msgstr ""
|
904 |
-
|
905 |
-
#: includes/Admin/Troubleshooting.php:1062
|
906 |
-
msgid "Incompatible WPML Multilingual CMS plugin setting"
|
907 |
-
msgstr ""
|
908 |
-
|
909 |
-
#: includes/Admin/Troubleshooting.php:578
|
910 |
-
#: includes/Admin/Troubleshooting.php:1866
|
911 |
-
msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
|
912 |
-
msgstr ""
|
913 |
-
|
914 |
-
#: includes/Settings.php:150
|
915 |
-
msgid "Increase sales"
|
916 |
-
msgstr ""
|
917 |
-
|
918 |
-
#: includes/Settings.php:734
|
919 |
-
msgid "Increases sales conversions"
|
920 |
-
msgstr ""
|
921 |
-
|
922 |
-
#: partials/admin/indexer-body.php:18
|
923 |
-
msgid "Index build progress"
|
924 |
-
msgstr ""
|
925 |
-
|
926 |
-
#: partials/admin/indexer-body.php:50
|
927 |
-
msgid "Index build start"
|
928 |
-
msgstr ""
|
929 |
-
|
930 |
-
#: includes/Admin/Troubleshooting.php:1901
|
931 |
-
msgid "Index completeness test"
|
932 |
-
msgstr ""
|
933 |
-
|
934 |
-
#: includes/Settings.php:799 includes/Settings.php:833
|
935 |
-
msgid "Index status"
|
936 |
-
msgstr ""
|
937 |
-
|
938 |
-
#: partials/admin/indexer-header.php:16
|
939 |
-
#, php-format
|
940 |
-
msgid "Indexed <strong>100%</strong>, <strong>%d products</strong>."
|
941 |
-
msgstr ""
|
942 |
-
|
943 |
-
#: includes/Settings.php:144
|
944 |
-
msgid "Indexer"
|
945 |
-
msgstr ""
|
946 |
-
|
947 |
-
#: partials/admin/indexer-body.php:16
|
948 |
-
msgid ""
|
949 |
-
"Indexing... This process will continue in the background. You can leave this "
|
950 |
-
"page."
|
951 |
-
msgstr ""
|
952 |
-
|
953 |
-
#: partials/admin/features.php:30
|
954 |
-
msgid "Individual customization of the search bar (simple CSS improvements)"
|
955 |
-
msgstr ""
|
956 |
-
|
957 |
-
#: includes/Admin/Promo/Upgrade.php:52
|
958 |
-
msgid "Individual tips and support by FiboSearch team"
|
959 |
-
msgstr ""
|
960 |
-
|
961 |
-
#: includes/Admin/Troubleshooting.php:1946
|
962 |
-
msgid "InnoDB support"
|
963 |
-
msgstr ""
|
964 |
-
|
965 |
-
#: includes/Admin/Troubleshooting.php:860
|
966 |
-
msgid ""
|
967 |
-
"Install the <a target=\"_blank\" href=\"https://wordpress."
|
968 |
-
"org/plugins/advanced-cron-manager/\">Advanced Cron Manager</a> plugin to "
|
969 |
-
"verify if WP-Cron works correctly. You should see some of the actions "
|
970 |
-
"related to the Indexer:"
|
971 |
-
msgstr ""
|
972 |
-
|
973 |
-
#: includes/Admin/Troubleshooting.php:544
|
974 |
-
msgid ""
|
975 |
-
"Install the latest version of WordPress for our plugin to work as best it "
|
976 |
-
"can!"
|
977 |
-
msgstr ""
|
978 |
-
|
979 |
-
#: includes/Settings.php:714
|
980 |
-
msgid "Interval"
|
981 |
-
msgstr ""
|
982 |
-
|
983 |
-
#: includes/Admin/Troubleshooting.php:1182
|
984 |
-
#, php-format
|
985 |
-
msgid "Invalid language code: <code>%s</code>"
|
986 |
-
msgid_plural "Invalid language codes: <code>%s</code>"
|
987 |
-
msgstr[0] ""
|
988 |
-
msgstr[1] ""
|
989 |
-
|
990 |
-
#: partials/admin/indexer-header.php:92
|
991 |
-
#, php-format
|
992 |
-
msgid ""
|
993 |
-
"Is it still not working? Visit the <a target=\"_blank\" href=\"%s\">"
|
994 |
-
"documentation</a> or write a <a target=\"_blank\" href=\"%s\">support "
|
995 |
-
"request</a>"
|
996 |
-
msgstr ""
|
997 |
-
|
998 |
-
#: includes/Admin/Troubleshooting.php:486
|
999 |
-
#, php-format
|
1000 |
-
msgid ""
|
1001 |
-
"Is it still not working? Write a <a target=\"_blank\" href=\"%s\">support "
|
1002 |
-
"request</a>"
|
1003 |
-
msgstr ""
|
1004 |
-
|
1005 |
-
#: includes/Admin/Troubleshooting.php:480
|
1006 |
-
msgid ""
|
1007 |
-
"Is your website publicly available only for whitelisted IPs? <b>Add your "
|
1008 |
-
"server IP to the whitelist</b>. That’s all. This is a common mistake when "
|
1009 |
-
"access is blocked by a <code>.htaccess</code> file. Developers add a list of "
|
1010 |
-
"allowed IPs, but they forget to add the IP of the server to allow make HTTP "
|
1011 |
-
"requests to itself."
|
1012 |
-
msgstr ""
|
1013 |
-
|
1014 |
-
#: includes/Admin/Troubleshooting.php:837
|
1015 |
-
#: includes/Admin/Troubleshooting.php:1896
|
1016 |
-
msgid "Issue with WP-Cron"
|
1017 |
-
msgstr ""
|
1018 |
-
|
1019 |
-
#: includes/Analytics/UserInterface.php:407
|
1020 |
-
msgid "It's solved."
|
1021 |
-
msgstr ""
|
1022 |
-
|
1023 |
-
#: includes/Admin/Troubleshooting.php:750
|
1024 |
-
msgid ""
|
1025 |
-
"iThemes Security plugin blocks AJAX requests. Take a look at the solution."
|
1026 |
-
msgstr ""
|
1027 |
-
|
1028 |
-
#: includes/Admin/Troubleshooting.php:1911
|
1029 |
-
msgid "Jetpack search module"
|
1030 |
-
msgstr ""
|
1031 |
-
|
1032 |
-
#: partials/admin/stats/langs.php:10
|
1033 |
-
msgid "Language"
|
1034 |
-
msgstr ""
|
1035 |
-
|
1036 |
-
#: partials/admin/indexer-header.php:20
|
1037 |
-
#, php-format
|
1038 |
-
msgid "Last build %s"
|
1039 |
-
msgstr ""
|
1040 |
-
|
1041 |
-
#: widget.php:42 includes/Settings.php:240 includes/Settings.php:246
|
1042 |
-
#: includes/EmbeddingViaMenu.php:74
|
1043 |
-
msgid "Layout"
|
1044 |
-
msgstr ""
|
1045 |
-
|
1046 |
-
#: includes/Settings.php:362
|
1047 |
-
msgid "Limit"
|
1048 |
-
msgstr ""
|
1049 |
-
|
1050 |
-
#: includes/Analytics/UserInterface.php:240 partials/admin/stats/stats.php:36
|
1051 |
-
#, php-format
|
1052 |
-
msgid "load another %d phrase"
|
1053 |
-
msgid_plural "load another %d phrases"
|
1054 |
-
msgstr[0] ""
|
1055 |
-
msgstr[1] ""
|
1056 |
-
|
1057 |
-
#: includes/Admin/Troubleshooting.php:1339
|
1058 |
-
#, php-format
|
1059 |
-
msgid ""
|
1060 |
-
"Log only critical phrases. This will reduce the growth of records in the "
|
1061 |
-
"database by about 70%%."
|
1062 |
-
msgstr ""
|
1063 |
-
|
1064 |
-
#: partials/admin/indexer-body.php:143
|
1065 |
-
msgid "Logs"
|
1066 |
-
msgstr ""
|
1067 |
-
|
1068 |
-
#: includes/Admin/Troubleshooting.php:1961
|
1069 |
-
msgid "Loopback request"
|
1070 |
-
msgstr ""
|
1071 |
-
|
1072 |
-
#: partials/admin/search-preview.php:148 partials/admin/search-preview.php:193
|
1073 |
-
msgid ""
|
1074 |
-
"Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. "
|
1075 |
-
"Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin "
|
1076 |
-
"pharetra imperdiet neque, non varius."
|
1077 |
-
msgstr ""
|
1078 |
-
|
1079 |
-
#: includes/Admin/Troubleshooting.php:1329
|
1080 |
-
msgid "Maintain the search analytics table"
|
1081 |
-
msgstr ""
|
1082 |
-
|
1083 |
-
#: includes/Analytics/UserInterface.php:410
|
1084 |
-
msgid "Mark this phrase as resolved"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
-
#: includes/
|
1088 |
-
msgid "
|
1089 |
msgstr ""
|
1090 |
|
1091 |
-
#: includes/
|
1092 |
-
msgid "
|
1093 |
msgstr ""
|
1094 |
|
1095 |
-
#: includes/
|
1096 |
-
msgid "
|
1097 |
msgstr ""
|
1098 |
|
1099 |
-
#: includes/
|
1100 |
-
msgid "
|
1101 |
msgstr ""
|
1102 |
|
1103 |
-
#: includes/Admin/Troubleshooting.php:
|
1104 |
-
msgid ""
|
1105 |
-
"Maybe your server blocks it by the Apache module <code>mod_security</code>. "
|
1106 |
-
"Contact your hosting provider and ask what can block the URL you see above."
|
1107 |
msgstr ""
|
1108 |
|
1109 |
-
#:
|
1110 |
-
|
|
|
1111 |
msgstr ""
|
1112 |
|
1113 |
-
#: includes/
|
1114 |
-
msgid "
|
1115 |
msgstr ""
|
1116 |
|
1117 |
-
#: includes/
|
1118 |
-
msgid "
|
1119 |
msgstr ""
|
1120 |
|
1121 |
-
#: includes/Admin/Troubleshooting.php:
|
1122 |
-
|
|
|
1123 |
msgstr ""
|
1124 |
|
1125 |
-
#: includes/
|
1126 |
-
|
|
|
|
|
|
|
|
|
1127 |
msgstr ""
|
1128 |
|
1129 |
-
#: includes/Admin/
|
1130 |
-
msgid ""
|
1131 |
-
"Modern search engine based on an inverted index and advanced matching "
|
1132 |
-
"algorithms"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: includes/
|
1136 |
-
msgid "
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: includes/Admin/Troubleshooting.php:
|
1140 |
-
msgid "
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: includes/Admin/
|
1144 |
-
msgid "
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: includes/Admin/Troubleshooting.php:
|
1148 |
-
|
|
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: includes/
|
1152 |
-
msgid "
|
1153 |
msgstr ""
|
1154 |
|
1155 |
-
#: includes/Admin/
|
1156 |
-
msgid "
|
1157 |
msgstr ""
|
1158 |
|
1159 |
-
#: includes/Admin/
|
1160 |
-
msgid "
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: includes/Admin/Troubleshooting.php:
|
1164 |
-
msgid "
|
1165 |
msgstr ""
|
1166 |
|
1167 |
-
#: includes/
|
1168 |
-
msgid "
|
1169 |
msgstr ""
|
1170 |
|
1171 |
-
#: includes/
|
1172 |
-
msgid "
|
1173 |
msgstr ""
|
1174 |
|
1175 |
-
#: includes/
|
1176 |
-
msgid "
|
1177 |
msgstr ""
|
1178 |
|
1179 |
-
#: includes/
|
1180 |
-
msgid "
|
1181 |
msgstr ""
|
1182 |
|
1183 |
-
#: includes/Admin/Troubleshooting.php:
|
1184 |
-
msgid "
|
1185 |
msgstr ""
|
1186 |
|
1187 |
-
#: includes/Admin/Troubleshooting.php:
|
1188 |
-
msgid "
|
1189 |
msgstr ""
|
1190 |
|
1191 |
-
#: includes/
|
1192 |
-
msgid "
|
1193 |
msgstr ""
|
1194 |
|
1195 |
-
#: includes/Admin/Troubleshooting.php:
|
1196 |
-
msgid "
|
1197 |
msgstr ""
|
1198 |
|
1199 |
-
#: includes/
|
1200 |
-
msgid "
|
1201 |
msgstr ""
|
1202 |
|
1203 |
-
#: includes/Admin/Troubleshooting.php:
|
1204 |
-
msgid "
|
1205 |
msgstr ""
|
1206 |
|
1207 |
-
#:
|
1208 |
-
|
1209 |
-
msgid "Phrase"
|
1210 |
msgstr ""
|
1211 |
|
1212 |
-
#: includes/Admin/Troubleshooting.php:
|
1213 |
-
msgid "
|
1214 |
msgstr ""
|
1215 |
|
1216 |
-
#: includes/
|
1217 |
-
msgid "
|
1218 |
msgstr ""
|
1219 |
|
1220 |
-
#:
|
1221 |
-
msgid "
|
1222 |
msgstr ""
|
1223 |
|
1224 |
-
#: includes/
|
1225 |
-
msgid "
|
1226 |
msgstr ""
|
1227 |
|
1228 |
-
#:
|
1229 |
-
msgid "
|
1230 |
msgstr ""
|
1231 |
|
1232 |
-
#: includes/
|
1233 |
-
|
1234 |
-
|
|
|
|
|
|
|
1235 |
|
1236 |
-
#: includes/
|
1237 |
-
msgid "
|
1238 |
msgstr ""
|
1239 |
|
1240 |
-
#:
|
1241 |
-
msgid "
|
1242 |
msgstr ""
|
1243 |
|
1244 |
-
#: includes/
|
1245 |
-
msgid "
|
1246 |
-
|
|
|
|
|
1247 |
|
1248 |
-
#: includes/
|
1249 |
-
msgid "
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: includes/
|
1253 |
-
msgid "
|
1254 |
msgstr ""
|
1255 |
|
1256 |
-
#:
|
1257 |
-
msgid "
|
1258 |
msgstr ""
|
1259 |
|
1260 |
-
#: includes/
|
1261 |
-
msgid "
|
1262 |
msgstr ""
|
1263 |
|
1264 |
-
#:
|
1265 |
-
msgid ""
|
1266 |
-
"Professional and fast <b>help with embedding</b> or <b>replacing</b> the "
|
1267 |
-
"search bar in your theme"
|
1268 |
msgstr ""
|
1269 |
|
1270 |
-
#: includes/
|
1271 |
-
msgid "
|
1272 |
msgstr ""
|
1273 |
|
1274 |
-
#: includes/
|
1275 |
-
|
1276 |
-
msgid ""
|
1277 |
-
"Read more about indexer issues on <a target=\"_blank\" href=\"%s\">our "
|
1278 |
-
"documentation</a> and read the section “Your server can’t send an HTTP "
|
1279 |
-
"request to itself”."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
-
#: includes/
|
1283 |
-
|
1284 |
-
msgid ""
|
1285 |
-
"Read more about this issue in <a href=\"%s\" target=\"_blank\">our "
|
1286 |
-
"documentation</a>."
|
1287 |
msgstr ""
|
1288 |
|
1289 |
-
#:
|
1290 |
-
|
|
|
|
|
1291 |
msgstr ""
|
1292 |
|
1293 |
-
#: includes/
|
1294 |
-
#: includes/
|
1295 |
-
#:
|
1296 |
-
|
1297 |
-
#: includes/Admin/Troubleshooting.php:1215
|
1298 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:704
|
1299 |
-
msgid "Rebuild index"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
-
#:
|
1303 |
-
|
|
|
|
|
1304 |
msgstr ""
|
1305 |
|
1306 |
-
#:
|
1307 |
-
|
1308 |
-
msgid "Repetitions"
|
1309 |
msgstr ""
|
1310 |
|
1311 |
-
#: includes/
|
1312 |
-
|
1313 |
-
#: includes/Integrations/Themes/Enfold/Enfold.php:63
|
1314 |
-
#: includes/Integrations/Themes/Sober/Sober.php:56
|
1315 |
-
#: includes/Integrations/Themes/The7/The7.php:59
|
1316 |
-
#: includes/Integrations/Themes/Flatsome/Flatsome.php:56
|
1317 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:58
|
1318 |
-
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:59
|
1319 |
-
#: includes/Integrations/Themes/Storefront/Storefront.php:57
|
1320 |
-
#: includes/Integrations/Themes/Bridge/Bridge.php:56
|
1321 |
-
#: includes/Integrations/Themes/BlockShop/BlockShop.php:56
|
1322 |
-
#: includes/Integrations/Themes/Avada/Avada.php:59
|
1323 |
-
#: includes/Integrations/Themes/Savoy/Savoy.php:56
|
1324 |
-
#: includes/Integrations/Themes/Ekommart/Ekommart.php:56
|
1325 |
-
#: includes/Integrations/Themes/Woodmart/Woodmart.php:74
|
1326 |
-
#: includes/Integrations/Themes/Restoration/Restoration.php:58
|
1327 |
-
#: includes/Integrations/Themes/Divi/Divi.php:74
|
1328 |
-
msgid "Replace"
|
1329 |
-
msgstr ""
|
1330 |
-
|
1331 |
-
#: includes/Abstracts/ThemeIntegration.php:42
|
1332 |
-
#: includes/Integrations/Themes/Enfold/Enfold.php:43
|
1333 |
-
#: includes/Integrations/Themes/Sober/Sober.php:36
|
1334 |
-
#: includes/Integrations/Themes/The7/The7.php:39
|
1335 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:38
|
1336 |
-
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:36
|
1337 |
-
#: includes/Integrations/Themes/Bridge/Bridge.php:36
|
1338 |
-
#: includes/Integrations/Themes/BlockShop/BlockShop.php:36
|
1339 |
-
#: includes/Integrations/Themes/Avada/Avada.php:39
|
1340 |
-
#: includes/Integrations/Themes/Savoy/Savoy.php:36
|
1341 |
-
#: includes/Integrations/Themes/Ekommart/Ekommart.php:36
|
1342 |
-
#: includes/Integrations/Themes/Woodmart/Woodmart.php:54
|
1343 |
-
#: includes/Integrations/Themes/Restoration/Restoration.php:38
|
1344 |
-
#: includes/Integrations/Themes/Divi/Divi.php:54
|
1345 |
-
#, php-format
|
1346 |
-
msgid "Replace %s search bar"
|
1347 |
-
msgstr ""
|
1348 |
-
|
1349 |
-
#: includes/Integrations/Themes/TheGem/TheGem.php:80
|
1350 |
-
msgid "Replace a search bar in TheGem "
|
1351 |
msgstr ""
|
1352 |
|
1353 |
-
#: includes/
|
1354 |
-
#:
|
1355 |
-
|
1356 |
-
#: includes/Integrations/Themes/The7/The7.php:60
|
1357 |
-
#: includes/Integrations/Themes/Flatsome/Flatsome.php:57
|
1358 |
-
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:59
|
1359 |
-
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:54
|
1360 |
-
#: includes/Integrations/Themes/Storefront/Storefront.php:58
|
1361 |
-
#: includes/Integrations/Themes/Bridge/Bridge.php:57
|
1362 |
-
#: includes/Integrations/Themes/BlockShop/BlockShop.php:57
|
1363 |
-
#: includes/Integrations/Themes/Avada/Avada.php:60
|
1364 |
-
#: includes/Integrations/Themes/Savoy/Savoy.php:57
|
1365 |
-
#: includes/Integrations/Themes/Ekommart/Ekommart.php:57
|
1366 |
-
#: includes/Integrations/Themes/Woodmart/Woodmart.php:75
|
1367 |
-
#: includes/Integrations/Themes/Restoration/Restoration.php:59
|
1368 |
-
#: includes/Integrations/Themes/Divi/Divi.php:75
|
1369 |
-
#, php-format
|
1370 |
-
msgid "Replace all %s search bars with the %s."
|
1371 |
msgstr ""
|
1372 |
|
1373 |
-
#: includes/
|
1374 |
-
|
|
|
|
|
|
|
|
|
|
|
1375 |
msgstr ""
|
1376 |
|
1377 |
-
#: includes/
|
1378 |
-
|
|
|
|
|
1379 |
msgstr ""
|
1380 |
|
1381 |
-
#: includes/
|
1382 |
-
|
|
|
|
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: includes/
|
1386 |
-
|
|
|
|
|
1387 |
msgstr ""
|
1388 |
|
1389 |
-
#: includes/
|
1390 |
-
#: includes/
|
1391 |
-
|
1392 |
-
msgid "Required PHP extension: %s"
|
1393 |
msgstr ""
|
1394 |
|
1395 |
-
#: includes/
|
1396 |
-
msgid "
|
1397 |
msgstr ""
|
1398 |
|
1399 |
-
#:
|
1400 |
-
msgid "
|
1401 |
msgstr ""
|
1402 |
|
1403 |
-
#: includes/
|
1404 |
-
|
1405 |
-
msgid ""
|
1406 |
-
"Returns suggestions based on likely relevance, even though a search keyword "
|
1407 |
-
"may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same "
|
1408 |
-
"results as for “iphone”. <a target=\"_blank\" href=\"%s\">Read more</a> "
|
1409 |
-
"about fuzzy search feature."
|
1410 |
msgstr ""
|
1411 |
|
1412 |
-
#: includes/
|
1413 |
-
|
1414 |
-
msgid "Review %s"
|
1415 |
msgstr ""
|
1416 |
|
1417 |
-
#:
|
1418 |
-
msgid "
|
1419 |
msgstr ""
|
1420 |
|
1421 |
-
#:
|
1422 |
-
|
|
|
1423 |
msgstr ""
|
1424 |
|
1425 |
-
#:
|
1426 |
-
msgid "
|
1427 |
msgstr ""
|
1428 |
|
1429 |
-
#:
|
1430 |
-
|
|
|
1431 |
msgstr ""
|
1432 |
|
1433 |
-
#:
|
1434 |
-
|
|
|
|
|
1435 |
msgstr ""
|
1436 |
|
1437 |
-
#:
|
1438 |
-
|
|
|
1439 |
msgstr ""
|
1440 |
|
1441 |
-
#:
|
1442 |
-
|
|
|
1443 |
msgstr ""
|
1444 |
|
1445 |
-
#: includes/
|
1446 |
-
msgid "
|
1447 |
msgstr ""
|
1448 |
|
1449 |
-
#: includes/
|
1450 |
-
msgid "
|
1451 |
msgstr ""
|
1452 |
|
1453 |
-
#: includes/
|
1454 |
-
|
|
|
|
|
|
|
1455 |
msgstr ""
|
1456 |
|
1457 |
-
#: includes/
|
1458 |
-
msgid "
|
1459 |
msgstr ""
|
1460 |
|
1461 |
-
#: includes/
|
1462 |
-
|
1463 |
-
msgid "Search bar"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#:
|
1467 |
-
msgid "
|
1468 |
msgstr ""
|
1469 |
|
1470 |
-
#:
|
1471 |
-
msgid "
|
1472 |
msgstr ""
|
1473 |
|
1474 |
-
#: includes/
|
1475 |
-
msgid "Search
|
1476 |
msgstr ""
|
1477 |
|
1478 |
-
#:
|
1479 |
-
msgid "
|
1480 |
msgstr ""
|
1481 |
|
1482 |
-
#: includes/
|
1483 |
-
msgid "
|
1484 |
msgstr ""
|
1485 |
|
1486 |
-
#:
|
1487 |
-
|
1488 |
-
msgid "Search icon"
|
1489 |
msgstr ""
|
1490 |
|
1491 |
-
#: includes/
|
1492 |
-
|
|
|
1493 |
msgstr ""
|
1494 |
|
1495 |
-
#: includes/
|
1496 |
-
|
1497 |
-
msgid "Search in %s"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: includes/Settings.php:
|
1501 |
-
msgid "
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: includes/
|
1505 |
-
msgid "
|
1506 |
msgstr ""
|
1507 |
|
1508 |
-
#: includes/
|
1509 |
-
msgid "
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#:
|
1513 |
-
msgid "
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: includes/Settings.php:
|
1517 |
-
msgid "
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: includes/Settings.php:
|
1521 |
-
|
1522 |
-
msgid "Search in custom fields"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
-
#: includes/Settings.php:
|
1526 |
-
|
|
|
1527 |
msgstr ""
|
1528 |
|
1529 |
-
#: includes/Settings.php:
|
1530 |
-
msgid "
|
1531 |
msgstr ""
|
1532 |
|
1533 |
-
#: includes/Settings.php:
|
1534 |
-
msgid "
|
1535 |
msgstr ""
|
1536 |
|
1537 |
-
#: includes/Settings.php:
|
1538 |
-
msgid "
|
1539 |
msgstr ""
|
1540 |
|
1541 |
-
#: includes/
|
1542 |
-
msgid "
|
1543 |
msgstr ""
|
1544 |
|
1545 |
-
#: includes/Settings.php:
|
1546 |
-
msgid "
|
1547 |
msgstr ""
|
1548 |
|
1549 |
-
#: includes/Settings.php:
|
1550 |
-
msgid "
|
1551 |
msgstr ""
|
1552 |
|
1553 |
-
#: includes/Settings.php:
|
1554 |
-
msgid "
|
1555 |
msgstr ""
|
1556 |
|
1557 |
-
#: includes/Settings.php:
|
1558 |
-
|
|
|
1559 |
msgstr ""
|
1560 |
|
1561 |
-
#:
|
1562 |
-
msgid "
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: includes/Settings.php:
|
1566 |
-
|
|
|
1567 |
msgstr ""
|
1568 |
|
1569 |
-
#: includes/Settings.php:
|
1570 |
-
msgid "Search
|
1571 |
msgstr ""
|
1572 |
|
1573 |
-
#:
|
1574 |
-
msgid "
|
1575 |
msgstr ""
|
1576 |
|
1577 |
-
#:
|
1578 |
-
msgid "
|
1579 |
msgstr ""
|
1580 |
|
1581 |
-
#:
|
1582 |
-
|
1583 |
-
msgid "Searches stats (last %d days)"
|
1584 |
msgstr ""
|
1585 |
|
1586 |
-
#: includes/Settings.php:
|
1587 |
-
|
|
|
1588 |
msgstr ""
|
1589 |
|
1590 |
-
#: includes/Settings.php:
|
1591 |
-
|
1592 |
-
msgid ""
|
1593 |
-
"Searching in variable products SKU is available only in <a target=\"_blank\" "
|
1594 |
-
"href=\"%s\">the pro version</a>."
|
1595 |
msgstr ""
|
1596 |
|
1597 |
-
#:
|
1598 |
-
msgid "
|
1599 |
msgstr ""
|
1600 |
|
1601 |
-
#: includes/Settings.php:
|
1602 |
-
|
1603 |
-
msgid "See all products..."
|
1604 |
msgstr ""
|
1605 |
|
1606 |
-
#: includes/
|
1607 |
-
|
|
|
1608 |
msgstr ""
|
1609 |
|
1610 |
-
#: includes/Settings.php:
|
1611 |
-
|
|
|
1612 |
msgstr ""
|
1613 |
|
1614 |
-
#: includes/
|
1615 |
-
|
|
|
1616 |
msgstr ""
|
1617 |
|
1618 |
-
#: includes/
|
1619 |
-
|
1620 |
-
#, php-format
|
1621 |
-
msgid ""
|
1622 |
-
"Server response with message <code>%s</code> and status code <code>%s</code>."
|
1623 |
msgstr ""
|
1624 |
|
1625 |
-
#:
|
1626 |
-
|
1627 |
-
msgid "Settings"
|
1628 |
msgstr ""
|
1629 |
|
1630 |
-
#: includes/
|
1631 |
-
|
1632 |
-
msgid "Show %s"
|
1633 |
msgstr ""
|
1634 |
|
1635 |
-
#:
|
1636 |
-
msgid "
|
1637 |
msgstr ""
|
1638 |
|
1639 |
-
#: includes/
|
1640 |
-
msgid "
|
1641 |
msgstr ""
|
1642 |
|
1643 |
-
#: includes/Settings.php:
|
1644 |
-
msgid "
|
1645 |
msgstr ""
|
1646 |
|
1647 |
-
#:
|
1648 |
-
|
1649 |
-
msgid "Show details"
|
1650 |
msgstr ""
|
1651 |
|
1652 |
-
#: includes/Settings.php:
|
1653 |
-
msgid "
|
1654 |
msgstr ""
|
1655 |
|
1656 |
-
#: includes/Settings.php:
|
1657 |
-
|
1658 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:213
|
1659 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:217
|
1660 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:258
|
1661 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Taxonomies.php:262
|
1662 |
-
msgid "show images"
|
1663 |
msgstr ""
|
1664 |
|
1665 |
-
#: includes/Settings.php:
|
1666 |
-
msgid "
|
1667 |
msgstr ""
|
1668 |
|
1669 |
-
#: includes/Settings.php:
|
1670 |
-
msgid "Show
|
1671 |
msgstr ""
|
1672 |
|
1673 |
-
#: includes/Settings.php:
|
1674 |
-
msgid "
|
1675 |
msgstr ""
|
1676 |
|
1677 |
-
#: includes/Settings.php:
|
1678 |
-
msgid "
|
1679 |
msgstr ""
|
1680 |
|
1681 |
-
#: includes/Settings.php:
|
1682 |
-
msgid "
|
1683 |
msgstr ""
|
1684 |
|
1685 |
-
#: includes/Settings.php:
|
1686 |
-
msgid "
|
1687 |
msgstr ""
|
1688 |
|
1689 |
-
#: includes/Settings.php:
|
1690 |
-
|
|
|
1691 |
msgstr ""
|
1692 |
|
1693 |
-
#: includes/Settings.php:
|
1694 |
-
msgid "
|
1695 |
msgstr ""
|
1696 |
|
1697 |
-
#: includes/Settings.php:
|
1698 |
-
msgid "Show
|
1699 |
msgstr ""
|
1700 |
|
1701 |
-
#:
|
1702 |
-
msgid "
|
1703 |
msgstr ""
|
1704 |
|
1705 |
-
#: includes/
|
1706 |
-
msgid "Show
|
1707 |
msgstr ""
|
1708 |
|
1709 |
-
#: includes/
|
1710 |
-
msgid "
|
1711 |
msgstr ""
|
1712 |
|
1713 |
-
#:
|
1714 |
-
msgid "
|
1715 |
msgstr ""
|
1716 |
|
1717 |
-
#: includes/Settings.php:
|
1718 |
-
msgid "
|
1719 |
msgstr ""
|
1720 |
|
1721 |
-
#: includes/
|
1722 |
-
msgid "
|
1723 |
msgstr ""
|
1724 |
|
1725 |
-
#: includes/
|
1726 |
-
|
1727 |
-
#: includes/Admin/Troubleshooting.php:697
|
1728 |
-
#: includes/Admin/Troubleshooting.php:859
|
1729 |
-
#: includes/Admin/Troubleshooting.php:950
|
1730 |
-
#: includes/Admin/Troubleshooting.php:1064
|
1731 |
-
#: includes/Admin/Troubleshooting.php:1098
|
1732 |
-
#: includes/Admin/Troubleshooting.php:1183
|
1733 |
-
#: includes/Admin/Troubleshooting.php:1706
|
1734 |
-
#: includes/Admin/Troubleshooting.php:1753
|
1735 |
-
#: includes/Admin/Troubleshooting.php:1833
|
1736 |
-
msgid "Solution"
|
1737 |
msgstr ""
|
1738 |
|
1739 |
-
#: includes/
|
1740 |
-
msgid "
|
1741 |
msgstr ""
|
1742 |
|
1743 |
-
#: includes/
|
1744 |
-
msgid "
|
1745 |
msgstr ""
|
1746 |
|
1747 |
-
#: includes/
|
1748 |
-
|
1749 |
-
msgid ""
|
1750 |
-
"Some NGINX configuration may block executing PHP files included directly in "
|
1751 |
-
"the plugins directory. There is no one solution. It depends on your NGINX "
|
1752 |
-
"configuration. We recommend contact your hosting provider and ask to allow "
|
1753 |
-
"to execute the following file: %s"
|
1754 |
msgstr ""
|
1755 |
|
1756 |
-
#: includes/
|
1757 |
-
msgid "
|
1758 |
msgstr ""
|
1759 |
|
1760 |
-
#: includes/Settings.php:
|
1761 |
-
msgid "
|
1762 |
msgstr ""
|
1763 |
|
1764 |
-
#: includes/
|
1765 |
-
msgid "
|
1766 |
msgstr ""
|
1767 |
|
1768 |
-
#:
|
1769 |
-
|
1770 |
-
msgid "Start"
|
1771 |
msgstr ""
|
1772 |
|
1773 |
-
#: includes/Settings.php:
|
1774 |
-
msgid "
|
1775 |
msgstr ""
|
1776 |
|
1777 |
-
#:
|
1778 |
-
msgid "
|
1779 |
msgstr ""
|
1780 |
|
1781 |
-
#: includes/
|
1782 |
-
|
1783 |
-
#, php-format
|
1784 |
-
msgid "Step %d"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: includes/
|
1788 |
-
msgid "
|
1789 |
msgstr ""
|
1790 |
|
1791 |
-
#: includes/
|
1792 |
-
msgid "
|
1793 |
msgstr ""
|
1794 |
|
1795 |
-
#: includes/
|
1796 |
-
msgid "
|
1797 |
msgstr ""
|
1798 |
|
1799 |
-
#: includes/Settings.php:
|
1800 |
-
msgid "
|
1801 |
msgstr ""
|
1802 |
|
1803 |
-
#: includes/
|
1804 |
-
msgid "
|
1805 |
msgstr ""
|
1806 |
|
1807 |
-
#: includes/Settings.php:
|
1808 |
-
msgid "
|
1809 |
msgstr ""
|
1810 |
|
1811 |
-
#: includes/Settings.php:
|
1812 |
-
|
|
|
1813 |
msgstr ""
|
1814 |
|
1815 |
-
#: includes/Settings.php:
|
1816 |
-
|
|
|
1817 |
msgstr ""
|
1818 |
|
1819 |
-
#: includes/Settings.php:
|
1820 |
-
#: partials/admin/features.php:
|
1821 |
-
msgid "
|
1822 |
msgstr ""
|
1823 |
|
1824 |
-
#: includes/Settings.php:
|
1825 |
-
|
1826 |
-
"
|
1827 |
-
"on a new line. You can use a phrase instead of a single word. <br /> <br />"
|
1828 |
-
"Sample list:<br /> <br /><span class=\"dgwt-wcas-synonyms-sample\">sofa, "
|
1829 |
-
"couch, davenport, divan, settee<br />big, grand, great, large, outsize</span>"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
-
#:
|
1833 |
-
msgid "
|
1834 |
msgstr ""
|
1835 |
|
1836 |
-
#: includes/Settings.php:
|
1837 |
-
msgid "
|
1838 |
msgstr ""
|
1839 |
|
1840 |
-
#: includes/
|
1841 |
-
msgid "
|
1842 |
msgstr ""
|
1843 |
|
1844 |
-
#: includes/
|
1845 |
-
msgid ""
|
1846 |
-
"The default search endpoint has been blocked and you decided to switch on "
|
1847 |
-
"the alternative endpoint to make the search working in emergency mode. What "
|
1848 |
-
"should you do next?"
|
1849 |
msgstr ""
|
1850 |
|
1851 |
-
#: includes/Settings.php:
|
1852 |
-
msgid ""
|
1853 |
-
"The Details panel is an additional container for extended information. The "
|
1854 |
-
"details are changed dynamically when a user mouse over one of the "
|
1855 |
-
"suggestions."
|
1856 |
msgstr ""
|
1857 |
|
1858 |
-
#:
|
1859 |
-
|
1860 |
-
msgid ""
|
1861 |
-
"The FiboSearch analyzer found <b>%d critical search phrases</b> that have "
|
1862 |
-
"been typed by users over the last %d days. These phrases don`t return any "
|
1863 |
-
"search results. It's time to fix it."
|
1864 |
msgstr ""
|
1865 |
|
1866 |
-
#: includes/
|
1867 |
-
|
1868 |
-
msgid ""
|
1869 |
-
"The FiboSearch team have spent countless hours developing it, and it would "
|
1870 |
-
"mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
|
1871 |
msgstr ""
|
1872 |
|
1873 |
-
#:
|
1874 |
-
msgid "
|
1875 |
msgstr ""
|
1876 |
|
1877 |
-
#: includes/
|
1878 |
-
msgid "
|
1879 |
msgstr ""
|
1880 |
|
1881 |
-
#: includes/
|
1882 |
-
msgid ""
|
1883 |
-
"The Indexer uses the WordPress function <code>wp_remote_post()</code> to "
|
1884 |
-
"build the index in background. Sometimes the server can block this kind of "
|
1885 |
-
"request and responses with HTTP 401 Unauthorized or 403 Forbidden errors."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
-
#: includes/
|
1889 |
-
msgid ""
|
1890 |
-
"The InnoDB engine within the MySQL server must be enabled for our plugin to "
|
1891 |
-
"work properly. Contact your hosting provider and ask for enabling InnoDB "
|
1892 |
-
"engine in your MySQL server."
|
1893 |
msgstr ""
|
1894 |
|
1895 |
-
#: includes/
|
1896 |
-
|
1897 |
-
msgid "The Jetpack Search module is incompatible with the %s plugin."
|
1898 |
msgstr ""
|
1899 |
|
1900 |
-
|
1901 |
-
msgid ""
|
1902 |
-
"The most popular WooCommerce product search. Gives your users a well-"
|
1903 |
-
"designed advanced AJAX search bar with live search suggestions."
|
1904 |
msgstr ""
|
1905 |
|
1906 |
-
#: includes/
|
1907 |
-
msgid "
|
1908 |
msgstr ""
|
1909 |
|
1910 |
-
#: includes/
|
1911 |
-
|
1912 |
-
msgid "the next index rebuild: %s"
|
1913 |
msgstr ""
|
1914 |
|
1915 |
-
#: includes/
|
1916 |
-
msgid "
|
1917 |
msgstr ""
|
1918 |
|
1919 |
-
#: includes/
|
1920 |
-
msgid "
|
1921 |
msgstr ""
|
1922 |
|
1923 |
-
#:
|
1924 |
-
|
1925 |
-
msgid "The search index does not exist yet. Build it now."
|
1926 |
msgstr ""
|
1927 |
|
1928 |
-
#: includes/
|
1929 |
-
msgid "
|
1930 |
msgstr ""
|
1931 |
|
1932 |
-
#: includes/
|
1933 |
-
msgid ""
|
1934 |
-
"The search index was built successfully, but some non-critical errors "
|
1935 |
-
"occurred."
|
1936 |
msgstr ""
|
1937 |
|
1938 |
-
#: includes/
|
1939 |
-
msgid "
|
1940 |
msgstr ""
|
1941 |
|
1942 |
-
#: includes/
|
1943 |
-
msgid ""
|
1944 |
-
"The search index was built, but some significant errors occurred during this "
|
1945 |
-
"process. There is a risk that some products may not be available during the "
|
1946 |
-
"search."
|
1947 |
msgstr ""
|
1948 |
|
1949 |
-
#: includes/
|
1950 |
-
msgid ""
|
1951 |
-
"The search uses a dedicated URL to makes queries. In your case, this URL is "
|
1952 |
-
"blocked for some reason. Let visit it directly in your browser:"
|
1953 |
msgstr ""
|
1954 |
|
1955 |
-
#: includes/Settings.php:
|
1956 |
-
msgid "
|
1957 |
msgstr ""
|
1958 |
|
1959 |
-
#: includes/
|
1960 |
-
msgid ""
|
1961 |
-
"The server returns an incorrect response for the search engine's AJAX calls"
|
1962 |
msgstr ""
|
1963 |
|
1964 |
-
#: includes/Settings.php:
|
1965 |
-
msgid ""
|
1966 |
-
"The synonyms feature allows your users to find more relevant results. If "
|
1967 |
-
"your products have alternative names and users often misspell them, consider "
|
1968 |
-
"adding synonyms."
|
1969 |
msgstr ""
|
1970 |
|
1971 |
-
#: includes/
|
1972 |
-
msgid "
|
1973 |
msgstr ""
|
1974 |
|
1975 |
-
#:
|
1976 |
-
msgid "
|
1977 |
msgstr ""
|
1978 |
|
1979 |
-
#:
|
1980 |
-
msgid ""
|
1981 |
-
"There are several ways to solve these problems. Every phrase may require a "
|
1982 |
-
"different approach. See what methods you could use:"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
-
#: includes/
|
1986 |
-
msgid ""
|
1987 |
-
"There is a problem with the visibility of products with “Out of stock“ status"
|
1988 |
msgstr ""
|
1989 |
|
1990 |
-
#:
|
1991 |
-
msgid ""
|
1992 |
-
"There is no correct template in Elementor Theme Builder for the WooCommerce "
|
1993 |
-
"search results page."
|
1994 |
msgstr ""
|
1995 |
|
1996 |
-
#:
|
1997 |
-
msgid ""
|
1998 |
-
"Think about what can block the execution of PHP scripts inside <code>wp-"
|
1999 |
-
"content</code> or <code>wp-content/plugins</code> directory. Maybe you use "
|
2000 |
-
"some security plugins or you have custom code that may block it."
|
2001 |
msgstr ""
|
2002 |
|
2003 |
-
#:
|
2004 |
-
msgid ""
|
2005 |
-
"This issue may affect the building of the search index. Indexer may stuck at "
|
2006 |
-
"0%."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
-
#:
|
2010 |
-
msgid ""
|
2011 |
-
"This issue may affect the search results page and e.g. display all products "
|
2012 |
-
"every time"
|
2013 |
msgstr ""
|
2014 |
|
2015 |
-
#:
|
2016 |
-
|
2017 |
-
msgid ""
|
2018 |
-
"This option is <b>overridden</b> by the seamless integration with the %s "
|
2019 |
-
"theme. If you want to change the value of this option, disable the "
|
2020 |
-
"integration in <br /><b>WooCommerce -> FiboSearch -> Starting (tab)</b>."
|
2021 |
msgstr ""
|
2022 |
|
2023 |
-
#:
|
2024 |
-
msgid ""
|
2025 |
-
"This phrase has been solved! This row will disappear after refreshing the "
|
2026 |
-
"page."
|
2027 |
msgstr ""
|
2028 |
|
2029 |
-
#:
|
2030 |
-
|
2031 |
-
msgid "This phrase returns 1 product."
|
2032 |
-
msgid_plural "This phrase returns %d products."
|
2033 |
-
msgstr[0] ""
|
2034 |
-
msgstr[1] ""
|
2035 |
-
|
2036 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:647
|
2037 |
-
#: includes/Engines/TNTSearchMySQL/Indexer/Builder.php:653
|
2038 |
-
msgid "This process will continue in the background. You can leave this page!"
|
2039 |
msgstr ""
|
2040 |
|
2041 |
-
#: partials/admin/
|
2042 |
-
|
2043 |
-
msgid "Time"
|
2044 |
msgstr ""
|
2045 |
|
2046 |
-
#:
|
2047 |
-
msgid "
|
2048 |
msgstr ""
|
2049 |
|
2050 |
-
#:
|
2051 |
-
msgid "
|
2052 |
msgstr ""
|
2053 |
|
2054 |
-
#:
|
2055 |
-
msgid ""
|
2056 |
-
"To replace the search bar you have to enable \"Predictive Search\" option in "
|
2057 |
-
"the Shopkeeper settings."
|
2058 |
msgstr ""
|
2059 |
|
2060 |
-
#:
|
2061 |
-
msgid "
|
2062 |
msgstr ""
|
2063 |
|
2064 |
-
#: partials/admin/
|
2065 |
-
msgid "
|
2066 |
msgstr ""
|
2067 |
|
2068 |
-
#: partials/admin/
|
2069 |
-
msgid "
|
2070 |
msgstr ""
|
2071 |
|
2072 |
-
#:
|
2073 |
-
|
2074 |
-
msgid ""
|
2075 |
-
"Total “out of stock“ products calculated by SQL query on <code>%s</code> and "
|
2076 |
-
"<code>%s</code>: <b>%d</b>"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
-
#:
|
2080 |
-
|
2081 |
-
msgid ""
|
2082 |
-
"Total “out of stock“ products calculated by SQL query on <code>%s</code>: <b>"
|
2083 |
-
"%d</b>"
|
2084 |
msgstr ""
|
2085 |
|
2086 |
-
#:
|
2087 |
-
msgid "
|
2088 |
msgstr ""
|
2089 |
|
2090 |
-
#:
|
2091 |
-
|
2092 |
-
msgid "Troubleshooting"
|
2093 |
msgstr ""
|
2094 |
|
2095 |
-
#:
|
2096 |
-
msgid "
|
2097 |
msgstr ""
|
2098 |
|
2099 |
-
#:
|
2100 |
-
msgid ""
|
2101 |
-
"Uncheck the option <code>Disable PHP in Plugins</code>. Save settings. Right "
|
2102 |
-
"after that <b>check this option again</b> and save settings one more time."
|
2103 |
msgstr ""
|
2104 |
|
2105 |
-
#: partials/admin/
|
2106 |
-
msgid ""
|
2107 |
-
"Update now and boosts your sales. You will receive <b>30-day satisfaction "
|
2108 |
-
"guarantee</b>. A return on investment will come very quickly."
|
2109 |
msgstr ""
|
2110 |
|
2111 |
-
#:
|
2112 |
-
msgid ""
|
2113 |
-
"Update now and increase your sales. You will receive 30-day satisfaction "
|
2114 |
-
"guarantee. A return on investment will come very quickly."
|
2115 |
msgstr ""
|
2116 |
|
2117 |
-
#:
|
2118 |
-
msgid "
|
2119 |
msgstr ""
|
2120 |
|
2121 |
-
#: partials/admin/
|
2122 |
-
msgid "
|
2123 |
msgstr ""
|
2124 |
|
2125 |
-
#:
|
2126 |
-
msgid "
|
2127 |
msgstr ""
|
2128 |
|
2129 |
-
#: partials/admin/
|
2130 |
-
|
2131 |
-
msgid "Using a shortcode - %s"
|
2132 |
msgstr ""
|
2133 |
|
2134 |
-
#: partials/admin/
|
2135 |
-
|
2136 |
-
msgid "
|
2137 |
msgstr ""
|
2138 |
|
2139 |
-
#:
|
2140 |
-
|
|
|
2141 |
msgstr ""
|
2142 |
|
2143 |
-
#:
|
2144 |
-
|
|
|
|
|
2145 |
msgstr ""
|
2146 |
|
2147 |
-
#:
|
2148 |
-
msgid "
|
2149 |
msgstr ""
|
2150 |
|
2151 |
-
#:
|
2152 |
-
msgid "
|
2153 |
msgstr ""
|
2154 |
|
2155 |
-
#:
|
2156 |
-
msgid "
|
2157 |
msgstr ""
|
2158 |
|
2159 |
-
#:
|
2160 |
-
msgid "
|
2161 |
msgstr ""
|
2162 |
|
2163 |
-
#:
|
2164 |
-
msgid "
|
2165 |
msgstr ""
|
2166 |
|
2167 |
-
#:
|
2168 |
-
msgid "
|
2169 |
msgstr ""
|
2170 |
|
2171 |
-
#:
|
2172 |
-
|
2173 |
-
msgid ""
|
2174 |
-
"We recommend contact your hosting provider and ask to check <code>%s</code> "
|
2175 |
-
"file(s) on your server."
|
2176 |
msgstr ""
|
2177 |
|
2178 |
-
#:
|
2179 |
-
msgid "
|
2180 |
msgstr ""
|
2181 |
|
2182 |
-
#: partials/admin/
|
2183 |
-
msgid ""
|
2184 |
-
"We support this theme and you can easily replace all default search bars."
|
2185 |
msgstr ""
|
2186 |
|
2187 |
-
#:
|
2188 |
-
|
2189 |
-
"
|
2190 |
-
"something wrong with relationships in the database. It affects visibility of "
|
2191 |
-
"products in the search engine. This error is often the result of migrating "
|
2192 |
-
"from a different WordPress."
|
2193 |
msgstr ""
|
2194 |
|
2195 |
-
#:
|
2196 |
-
msgid "
|
2197 |
msgstr ""
|
2198 |
|
2199 |
-
#:
|
2200 |
-
msgid "
|
2201 |
msgstr ""
|
2202 |
|
2203 |
-
#: partials/admin/
|
2204 |
-
msgid "
|
2205 |
msgstr ""
|
2206 |
|
2207 |
-
#:
|
2208 |
-
msgid "
|
2209 |
msgstr ""
|
2210 |
|
2211 |
-
#:
|
2212 |
-
msgid "
|
2213 |
msgstr ""
|
2214 |
|
2215 |
-
#:
|
2216 |
-
|
|
|
|
|
2217 |
msgstr ""
|
2218 |
|
2219 |
-
#:
|
2220 |
-
|
|
|
|
|
2221 |
msgstr ""
|
2222 |
|
2223 |
-
#:
|
2224 |
-
|
2225 |
-
msgid "WordPress version"
|
2226 |
msgstr ""
|
2227 |
|
2228 |
-
#:
|
2229 |
-
msgid "
|
2230 |
msgstr ""
|
2231 |
|
2232 |
-
#:
|
2233 |
-
|
2234 |
-
msgid ""
|
2235 |
-
"You are using Elementor and we noticed that the template used in the search "
|
2236 |
-
"results page titled <strong>%s</strong> does not include the <strong>Archive "
|
2237 |
-
"Products</strong> widget."
|
2238 |
msgstr ""
|
2239 |
|
2240 |
-
#:
|
2241 |
-
msgid "
|
2242 |
msgstr ""
|
2243 |
|
2244 |
-
#:
|
2245 |
-
msgid ""
|
2246 |
-
"You are using Polylang, but you have product translations disabled, so for "
|
2247 |
-
"the search engine to function properly, you must disable its multi-language "
|
2248 |
-
"support feature."
|
2249 |
msgstr ""
|
2250 |
|
2251 |
-
#:
|
2252 |
-
msgid ""
|
2253 |
-
"You are using the multilingual plugin, but one or more of the language codes "
|
2254 |
-
"has wrong format. This needs to be corrected or the index will not be able "
|
2255 |
-
"to build properly."
|
2256 |
msgstr ""
|
2257 |
|
2258 |
-
#:
|
2259 |
-
msgid "
|
2260 |
msgstr ""
|
2261 |
|
2262 |
-
#:
|
2263 |
-
msgid ""
|
2264 |
-
"You are using WPML Multilingual CMS, but you have product translations "
|
2265 |
-
"disabled, so for the search engine to function properly, you must disable "
|
2266 |
-
"its multi-language support feature."
|
2267 |
msgstr ""
|
2268 |
|
2269 |
-
#:
|
2270 |
-
|
2271 |
-
msgid "
|
2272 |
msgstr ""
|
2273 |
|
2274 |
-
#:
|
2275 |
-
msgid ""
|
2276 |
-
"You can run these actions manually via Advanced Cron Manager. Then the "
|
2277 |
-
"Indexer should run. If the index stuck again, run these actions manually one "
|
2278 |
-
"more time until the finished index."
|
2279 |
msgstr ""
|
2280 |
|
2281 |
-
#:
|
2282 |
-
msgid "
|
2283 |
msgstr ""
|
2284 |
|
2285 |
-
#:
|
2286 |
-
|
2287 |
-
msgid "You have reached <b>%s records</b> in the <code>%s</code> table."
|
2288 |
msgstr ""
|
2289 |
|
2290 |
-
#:
|
2291 |
-
msgid ""
|
2292 |
-
"You need to log in to your <a href=\"https://login.sucuri.net\" "
|
2293 |
-
"target=\"_blank\">Sucuri panel</a>."
|
2294 |
msgstr ""
|
2295 |
|
2296 |
-
#:
|
2297 |
-
msgid ""
|
2298 |
-
"You should see <code>pong</code> word as a response. Probably you see "
|
2299 |
-
"something else."
|
2300 |
msgstr ""
|
2301 |
|
2302 |
-
#:
|
2303 |
-
|
2304 |
-
msgid "You use %s plugin version %s"
|
2305 |
msgstr ""
|
2306 |
|
2307 |
-
#:
|
2308 |
-
#:
|
2309 |
-
|
2310 |
-
msgid ""
|
2311 |
-
"You use the %s plugin, which may cause errors in the search results returned "
|
2312 |
-
"by our plugin."
|
2313 |
msgstr ""
|
2314 |
|
2315 |
-
#:
|
2316 |
-
#:
|
2317 |
-
|
2318 |
-
msgid "You use the %s plugin. The %s does not support this plugin."
|
2319 |
msgstr ""
|
2320 |
|
2321 |
-
#: partials/admin/
|
2322 |
-
|
2323 |
-
msgid "You use the <b>%s</b> theme%s. Fantastic!"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
-
#:
|
2327 |
-
|
2328 |
-
msgid ""
|
2329 |
-
"You use the WPML Multilingual CMS and WooCommerce Multilingual plugins, but "
|
2330 |
-
"the latter requires action to be fully functional. Check <a href=\"%s\" "
|
2331 |
-
"target=\"_blank\">WooCommerce Multilingual status</a>."
|
2332 |
msgstr ""
|
2333 |
|
2334 |
-
#:
|
2335 |
-
|
2336 |
-
msgid ""
|
2337 |
-
"You use the WPML Multilingual CMS plugin and to correctly search for "
|
2338 |
-
"products in multiple languages, you must also install the <a href=\"%s\" "
|
2339 |
-
"target=\"_blank\">WooCommerce Multilingual</a> plugin."
|
2340 |
msgstr ""
|
2341 |
|
2342 |
-
#:
|
2343 |
-
msgid "
|
2344 |
msgstr ""
|
2345 |
|
2346 |
-
#:
|
2347 |
-
msgid "
|
2348 |
msgstr ""
|
2349 |
|
2350 |
-
#:
|
2351 |
-
msgid "
|
2352 |
msgstr ""
|
2353 |
|
2354 |
-
#:
|
2355 |
-
msgid "
|
2356 |
msgstr ""
|
1 |
+
# Copyright (C) 2022 FiboSearch Team
|
2 |
+
# This file is distributed under the same license as the FiboSearch - AJAX Search for WooCommerce plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: FiboSearch - AJAX Search for WooCommerce 1.19.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ajax-search-for-woocommerce\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-07-19T11:31:31+02:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
+
"X-Domain: ajax-search-for-woocommerce\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
msgid "FiboSearch - AJAX Search for WooCommerce"
|
|
|
19 |
msgstr ""
|
20 |
|
21 |
+
#. Plugin URI of the plugin
|
22 |
+
#. Author URI of the plugin
|
23 |
+
msgid "https://fibosearch.com?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc"
|
|
|
|
|
24 |
msgstr ""
|
25 |
|
26 |
+
#. Description of the plugin
|
27 |
+
msgid "The most popular WooCommerce product search. Gives your users a well-designed advanced AJAX search bar with live search suggestions."
|
|
|
|
|
|
|
|
|
28 |
msgstr ""
|
29 |
|
30 |
+
#. Author of the plugin
|
31 |
+
msgid "FiboSearch Team"
|
|
|
|
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: ajax-search-for-woocommerce.php:173
|
35 |
+
msgid "%s: You need PHP version at least 7.0 to run this plugin. You are currently using PHP version "
|
|
|
|
|
|
|
|
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: ajax-search-for-woocommerce.php:192
|
39 |
+
msgid "%s is enabled but not effective. It requires %s in order to work."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: ajax-search-for-woocommerce.php:210
|
43 |
+
msgid "%s is enabled but not effective. It is missing core files. Please reinstall the plugin."
|
|
|
|
|
|
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: includes/Abstracts/ThemeIntegration.php:63
|
47 |
+
msgid "Replace the search bars"
|
|
|
|
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: includes/Abstracts/ThemeIntegration.php:72
|
51 |
+
msgid "%s Theme"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: includes/Abstracts/ThemeIntegration.php:86
|
55 |
+
msgid "Replace your theme's default search bars."
|
|
|
|
|
|
|
|
|
|
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/Abstracts/ThemeIntegration.php:88
|
59 |
+
msgid "Replace them"
|
|
|
|
|
|
|
|
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: includes/Abstracts/ThemeIntegration.php:94
|
63 |
+
msgid "Search bars"
|
|
|
|
|
|
|
|
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: includes/Abstracts/ThemeIntegration.php:103
|
67 |
+
msgid "Alternative ways to embed a search bar"
|
|
|
|
|
|
|
|
|
|
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: includes/Admin/AdminMenu.php:40
|
71 |
+
#: includes/Admin/AdminMenu.php:41
|
72 |
+
msgid "FiboSearch"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: includes/Admin/Promo/FeedbackNotice.php:71
|
76 |
+
msgid "Hey %s, it's Damian Góra from %s. You have used this free plugin for some time now, and I hope you like it!"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: includes/Admin/Promo/FeedbackNotice.php:76
|
80 |
+
msgid "The FiboSearch team have spent countless hours developing it, and it would mean a lot to me if you %ssupport it with a quick review on WordPress.org.%s"
|
|
|
|
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: includes/Admin/Promo/FeedbackNotice.php:82
|
84 |
+
msgid "Review %s"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/Admin/Promo/FeedbackNotice.php:86
|
88 |
+
msgid "No thanks"
|
|
|
|
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: includes/Admin/Promo/Upgrade.php:47
|
92 |
+
msgid "Speed up search! (even 10× faster) - users love it!"
|
|
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: includes/Admin/Promo/Upgrade.php:48
|
96 |
+
msgid "Modern search engine based on an inverted index and advanced matching algorithms"
|
|
|
|
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/Admin/Promo/Upgrade.php:49
|
100 |
+
#: partials/admin/features.php:21
|
101 |
+
msgid "Fuzzy search"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/Admin/Promo/Upgrade.php:50
|
105 |
+
#: includes/Settings.php:598
|
106 |
+
#: includes/Settings.php:604
|
107 |
+
#: partials/admin/features.php:29
|
108 |
+
msgid "Synonyms"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: includes/Admin/Promo/Upgrade.php:51
|
112 |
+
msgid "Search in attributes and variation products SKUs (option)"
|
|
|
|
|
|
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: includes/Admin/Promo/Upgrade.php:52
|
116 |
+
msgid "Individual tips and support from the FiboSearch team"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: includes/Admin/Promo/Upgrade.php:54
|
120 |
+
msgid "FiboSearch Pro - Upgrade Now"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: includes/Admin/Promo/Upgrade.php:58
|
124 |
+
msgid "Update now and increase your sales. You will receive a 30-day satisfaction guarantee. A return on investment will come very quickly."
|
125 |
msgstr ""
|
126 |
|
127 |
#: includes/Admin/Promo/Upgrade.php:63
|
128 |
msgid "and more..."
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: includes/Admin/Promo/Upgrade.php:63
|
132 |
+
#: partials/admin/features.php:31
|
133 |
+
msgid "See a comparison of all free and premium features!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: includes/Admin/Promo/Upgrade.php:65
|
137 |
+
msgid "Upgrade Now"
|
|
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/Admin/RegenerateImages.php:96
|
141 |
+
msgid "%s: it is recommended to generate a special small image size for existing products to ensure a better user experience. This is a one-time action. <br /><br />You can do it by clicking %s or use an external plugin such as %s."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/Admin/SettingsAPI.php:627
|
145 |
+
msgid "No rules"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/Admin/SettingsAPI.php:632
|
149 |
+
msgid "Add new rule"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/Admin/SettingsAPI.php:774
|
153 |
msgid "Contact"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/Admin/SettingsAPI.php:776
|
157 |
+
msgid "Showcase"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: includes/Admin/Troubleshooting.php:49
|
161 |
+
#: includes/Admin/Troubleshooting.php:68
|
162 |
+
msgid "Troubleshooting"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: includes/Admin/Troubleshooting.php:213
|
166 |
+
msgid "You are using one or more incompatible plugins"
|
|
|
|
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: includes/Admin/Troubleshooting.php:222
|
170 |
+
#: includes/Admin/Troubleshooting.php:226
|
171 |
+
msgid "You are using the %s plugin. The %s does not support this plugin."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/Admin/Troubleshooting.php:245
|
175 |
+
msgid "You are using TranslatePress with Free version of our plugin"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: includes/Admin/Troubleshooting.php:254
|
179 |
+
msgid "Due to the way the TranslatePress - Multilingual plugin works, we can only provide support for it in the <a href=\"%s\" target=\"_blank\">Pro version</a>."
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/Admin/Troubleshooting.php:267
|
183 |
+
msgid "Your site can perform loopback requests"
|
|
|
|
|
|
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/Admin/Troubleshooting.php:301
|
187 |
+
msgid "Your site could not complete a loopback request"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/Admin/Troubleshooting.php:302
|
191 |
+
msgid "Solutions:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/Admin/Troubleshooting.php:303
|
195 |
+
msgid "Your server can't send an HTTP request to itself"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/Admin/Troubleshooting.php:304
|
199 |
+
msgid "Go to <a href=\"%s\" target=\"_blank\">Tools -> Site Health</a> in your WordPress. You should see issues related to REST API or Loopback request. Expand descriptions of these errors and follow the instructions. Probably you will need to contact your hosting provider to solve it."
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/Admin/Troubleshooting.php:305
|
203 |
+
msgid "Is your website publicly available only for whitelisted IPs? <b>Add your server IP to the whitelist</b>. That’s all. This is a common mistake when access is blocked by a <code>.htaccess</code> file. Developers add a list of allowed IPs, but they forget to add the IP of the server to allow it to make HTTP requests to itself."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/Admin/Troubleshooting.php:320
|
207 |
+
msgid "One or more required PHP extensions are missing on your server"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/Admin/Troubleshooting.php:328
|
211 |
+
msgid "Required PHP extension: %s"
|
|
|
|
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: includes/Admin/Troubleshooting.php:347
|
215 |
+
#: includes/Admin/Troubleshooting.php:601
|
216 |
+
msgid "WordPress version"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: includes/Admin/Troubleshooting.php:356
|
220 |
+
msgid "Great! Our plugin works great with this version of WordPress."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: includes/Admin/Troubleshooting.php:359
|
224 |
+
msgid "Install the latest version of WordPress for our plugin for optimal performance!"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: includes/Admin/Troubleshooting.php:386
|
228 |
+
#: includes/Admin/Troubleshooting.php:613
|
229 |
+
msgid "Incorrect \"Add to cart\" behaviour in WooCommerce settings"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/Admin/Troubleshooting.php:387
|
233 |
+
#: includes/Admin/Troubleshooting.php:438
|
234 |
+
#: includes/Admin/Troubleshooting.php:484
|
235 |
+
#: includes/Admin/Troubleshooting.php:520
|
236 |
+
#: includes/Admin/Troubleshooting.php:580
|
237 |
+
msgid "Solution"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: includes/Admin/Troubleshooting.php:389
|
241 |
+
msgid "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">Products (tab)</a></code> and check option <code>%s</code> and uncheck option <code>%s</code>."
|
|
|
|
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: includes/Admin/Troubleshooting.php:394
|
245 |
+
msgid "Your settings should look like the picture below:"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: includes/Admin/Troubleshooting.php:437
|
249 |
+
msgid "Incompatible \"Searching by Text\" extension from \"WOOF - WooCommerce Products Filter plugin\" is active"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: includes/Admin/Troubleshooting.php:439
|
253 |
+
msgid "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>Searching by Text</code> extension and save changes."
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: includes/Admin/Troubleshooting.php:440
|
257 |
+
#: includes/Admin/Troubleshooting.php:486
|
258 |
+
msgid "Extensions should looks like the picture below:"
|
259 |
msgstr ""
|
260 |
|
261 |
+
#: includes/Admin/Troubleshooting.php:483
|
262 |
+
msgid "Incompatible \"HUSKY - Advanced searching by Text\" extension from \"WOOF - WooCommerce Products Filter plugin\" is active"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: includes/Admin/Troubleshooting.php:485
|
266 |
+
msgid "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">Products Filter (tab)</a> -> Extensions (tab)</code>, uncheck <code>HUSKY - Advanced searching by Text</code> extension and save changes."
|
267 |
msgstr ""
|
268 |
|
269 |
+
#: includes/Admin/Troubleshooting.php:519
|
270 |
+
msgid "Incompatible \"Try to ajaxify the shop\" option from WOOF - WooCommerce Products Filter plugin is enabled"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: includes/Admin/Troubleshooting.php:521
|
274 |
+
msgid "Go to <code>WooCommerce -> Settings -> <a href=\"%s\" target=\"_blank\">Products Filter (tab)</a> -> Options (tab)</code>, set <code>Try to ajaxify the shop</code> option to <code>No</code> and save changes."
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: includes/Admin/Troubleshooting.php:572
|
278 |
+
msgid "Dismiss"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/Admin/Troubleshooting.php:578
|
282 |
+
msgid "There is no correct template in the Elementor Theme Builder for the WooCommerce search results page."
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: includes/Admin/Troubleshooting.php:579
|
286 |
+
msgid "You are using Elementor and we noticed that the template used in the search results page titled <strong>%s</strong> does not include the <strong>Archive Products</strong> widget."
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/Admin/Troubleshooting.php:581
|
290 |
+
msgid "Add <strong>Archive Products</strong> widget to the template <strong>%s</strong> or create a new template dedicated to the WooCommerce search results page. Learn how to do it in <a href=\"%s\" target=\"_blank\">our documentation</a>."
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: includes/Admin/Troubleshooting.php:583
|
294 |
+
msgid "If you think the search results page is displaying your products correctly, you can ignore and dismiss this message: %s"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: includes/Admin/Troubleshooting.php:605
|
298 |
+
msgid "PHP extensions"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: includes/Admin/Troubleshooting.php:609
|
302 |
+
msgid "Incompatible plugins"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: includes/Admin/Troubleshooting.php:617
|
306 |
+
msgid "Incompatible \"Searching by Text\" extension in WOOF - WooCommerce Products Filter"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: includes/Admin/Troubleshooting.php:621
|
310 |
+
msgid "Incompatible \"HUSKY - Advanced searching by Text\" extension in WOOF - WooCommerce Products Filter"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: includes/Admin/Troubleshooting.php:625
|
314 |
+
msgid "Incompatible \"Try to ajaxify the shop\" option in WOOF - WooCommerce Products Filter"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/Admin/Troubleshooting.php:629
|
318 |
+
msgid "Elementor search results template"
|
|
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: includes/Admin/Troubleshooting.php:637
|
322 |
+
msgid "TranslatePress"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: includes/Admin/Troubleshooting.php:761
|
326 |
+
msgid "Server environment"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: includes/Analytics/UserInterface.php:70
|
330 |
+
msgid "Analytics (beta)"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: includes/Analytics/UserInterface.php:87
|
334 |
+
msgid "Search Analytics"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/Analytics/UserInterface.php:93
|
338 |
+
msgid "Enable search analytics"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/Analytics/UserInterface.php:224
|
342 |
+
#: partials/admin/stats/stats.php:36
|
343 |
+
msgid "load another %d phrase"
|
344 |
+
msgid_plural "load another %d phrases"
|
345 |
+
msgstr[0] ""
|
346 |
+
msgstr[1] ""
|
347 |
|
348 |
+
#: includes/Analytics/UserInterface.php:358
|
349 |
+
msgid "Perfect!"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/Analytics/UserInterface.php:359
|
353 |
+
msgid "It's sorted."
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/Analytics/UserInterface.php:360
|
357 |
+
msgid "This phrase returns 1 product."
|
358 |
+
msgid_plural "This phrase returns %d products."
|
359 |
+
msgstr[0] ""
|
360 |
+
msgstr[1] ""
|
361 |
|
362 |
+
#: includes/Analytics/UserInterface.php:366
|
363 |
+
msgid "Click the button below to remove this phrase from the list."
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: includes/Analytics/UserInterface.php:367
|
367 |
+
msgid "Mark this phrase as resolved"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: includes/Analytics/UserInterface.php:372
|
371 |
+
msgid "Poor!"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: includes/Analytics/UserInterface.php:373
|
375 |
+
msgid "Still this phrase doesn't return any results. Learn how to fix it."
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: includes/Analytics/UserInterface.php:378
|
379 |
+
msgid "Can't check the status. The search index hasn't been completed. Go to the Indexer tab and wait until the search index is completed."
|
|
|
|
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: includes/Analytics/UserInterface.php:379
|
383 |
+
msgid "Check the indexer status"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: includes/Analytics/UserInterface.php:384
|
387 |
+
msgid "Something went wrong"
|
|
|
|
|
|
|
|
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: includes/Analytics/UserInterface.php:411
|
391 |
+
msgid "This phrase has been resolved! This row will disappear after refreshing the page."
|
|
|
|
|
|
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: includes/EmbeddingViaMenu.php:55
|
395 |
+
#: includes/EmbeddingViaMenu.php:156
|
396 |
+
#: widget.php:26
|
397 |
+
msgid "FiboSearch bar"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/EmbeddingViaMenu.php:74
|
401 |
+
#: includes/Settings.php:262
|
402 |
+
#: widget.php:43
|
403 |
+
msgid "Layout"
|
|
|
|
|
|
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: includes/EmbeddingViaMenu.php:86
|
407 |
+
#: includes/Settings.php:232
|
408 |
+
#: includes/Settings.php:284
|
409 |
+
msgid "Search icon color"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: includes/EmbeddingViaMenu.php:150
|
413 |
+
msgid "Add FiboSearch as a menu item."
|
|
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: includes/EmbeddingViaMenu.php:178
|
417 |
+
msgid "FiboSearch bar will be displayed here."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: includes/EmbeddingViaMenu.php:186
|
421 |
+
#: widget.php:37
|
422 |
+
msgid "Default"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: includes/EmbeddingViaMenu.php:187
|
426 |
+
#: includes/EmbeddingViaMenu.php:248
|
427 |
+
#: includes/Settings.php:102
|
428 |
+
#: includes/Settings.php:265
|
429 |
+
#: partials/admin/search-preview.php:22
|
430 |
+
#: widget.php:38
|
431 |
+
msgid "Search bar"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: includes/EmbeddingViaMenu.php:188
|
435 |
+
#: includes/Settings.php:266
|
436 |
+
#: widget.php:39
|
437 |
+
msgid "Search icon"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/EmbeddingViaMenu.php:189
|
441 |
+
#: includes/Settings.php:267
|
442 |
+
#: widget.php:40
|
443 |
+
msgid "Icon on mobile, search bar on desktop"
|
444 |
msgstr ""
|
445 |
|
446 |
+
#: includes/EmbeddingViaMenu.php:190
|
447 |
+
#: includes/Settings.php:268
|
448 |
+
#: widget.php:41
|
449 |
+
msgid "Icon on desktop, search bar on mobile"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: includes/Helpers.php:641
|
453 |
+
#: includes/Helpers.php:644
|
454 |
+
msgid "Pro"
|
|
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: includes/Helpers.php:1054
|
458 |
+
msgid "This option is <b>overridden</b> by the seamless integration with the %s theme. If you want to change the value of this option, disable the integration in <br /><b>WooCommerce -> FiboSearch -> Starting (tab)</b>."
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: includes/Helpers.php:1055
|
462 |
+
msgid "Furthermore, you can override this option for a specific search bar via shortcode params. <a href=\"%s\" target=\"_blank\">Learn more about shortcodes parameters</a>."
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: includes/Helpers.php:1169
|
466 |
+
msgid "Vendor"
|
|
|
|
|
|
|
|
|
|
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: includes/Helpers.php:1173
|
470 |
+
msgid "Vendors"
|
|
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: includes/Helpers.php:1176
|
474 |
+
msgid "Sold by:"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: includes/Helpers.php:1178
|
478 |
+
msgctxt "in categories fe. in Books > Crime stories"
|
479 |
+
msgid "in"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/Helpers.php:1179
|
483 |
+
msgid "continue reading"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: includes/Helpers.php:1180
|
487 |
+
#: includes/Settings.php:390
|
488 |
+
msgid "No results"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: includes/Helpers.php:1181
|
492 |
+
#: includes/Helpers.php:1182
|
493 |
+
#: includes/Settings.php:427
|
494 |
+
msgid "See all products..."
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: includes/Helpers.php:1183
|
498 |
+
#: includes/Settings.php:241
|
499 |
+
msgid "Search for products..."
|
500 |
msgstr ""
|
501 |
|
502 |
+
#: includes/Integrations/Brands.php:192
|
503 |
+
#: includes/Integrations/Brands.php:214
|
504 |
+
msgid "Based on the plugin %s"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: includes/Integrations/Brands.php:197
|
508 |
+
msgid "Search in brands"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: includes/Integrations/Brands.php:219
|
512 |
+
msgid "Show brands"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: includes/Integrations/Brands.php:229
|
516 |
+
#: includes/Integrations/Brands.php:233
|
517 |
+
#: includes/Settings.php:445
|
518 |
+
#: includes/Settings.php:449
|
519 |
+
msgid "show images"
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: includes/Integrations/Brands.php:322
|
523 |
+
msgid "Brands"
|
524 |
msgstr ""
|
525 |
|
526 |
+
#: includes/Integrations/Brands.php:323
|
527 |
+
msgid "Brand"
|
|
|
528 |
msgstr ""
|
529 |
|
530 |
+
#: includes/Integrations/Themes/DFDRonneby/DFDRonneby.php:18
|
531 |
+
msgid "Note: We currently only support the header type: \"Header 10\""
|
532 |
msgstr ""
|
533 |
|
534 |
+
#: includes/Integrations/Themes/Impreza/Impreza.php:18
|
535 |
+
msgid "Here is <a href=\"%s\" target=\"_blank\">article</a> about how to do it using Impreza child-theme."
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:29
|
539 |
+
msgid "To replace the search bar you have to enable the \"Predictive Search\" option in the Shopkeeper settings."
|
540 |
msgstr ""
|
541 |
|
542 |
+
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:30
|
543 |
+
msgid "Go to <code>Appearance -> <a target=\"_blank\" href=\"%s\">Customize</a> -> Header -> Search</code> and enable <code>Predictive Search</code>"
|
544 |
msgstr ""
|
545 |
|
546 |
+
#: includes/Integrations/Themes/Shopkeeper/Shopkeeper.php:35
|
547 |
+
msgid "Warning!"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/Settings.php:98
|
551 |
+
msgid "Starting"
|
|
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/Settings.php:106
|
555 |
+
#: partials/admin/search-preview.php:23
|
556 |
+
msgid "Autocomplete"
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: includes/Settings.php:110
|
560 |
+
msgid "Search config"
|
|
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: includes/Settings.php:133
|
564 |
+
msgid "Indexer"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: includes/Settings.php:138
|
568 |
+
msgid "Increase sales"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: includes/Settings.php:138
|
572 |
+
msgid "with simple tricks"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/Settings.php:166
|
576 |
+
msgid "<a target=\"_blank\" href=\"%s\">Read more</a> about this feature."
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: includes/Settings.php:171
|
580 |
+
msgid "How to add search bar in your theme?"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: includes/Settings.php:177
|
584 |
+
msgid "How to add?"
|
|
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: includes/Settings.php:186
|
588 |
+
#: includes/Settings.php:366
|
589 |
+
msgid "Basic"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: includes/Settings.php:192
|
593 |
+
msgid "Minimum characters"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: includes/Settings.php:196
|
597 |
+
msgid "Min characters to show autocomplete"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: includes/Settings.php:201
|
601 |
+
msgid "Max form width"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: includes/Settings.php:204
|
605 |
+
msgid "To set 100% width leave blank"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: includes/Settings.php:210
|
609 |
+
msgid "Show submit button"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: includes/Settings.php:218
|
613 |
+
msgid "Label"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: includes/Settings.php:218
|
617 |
+
msgid "To display the magnifier icon leave this field empty."
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: includes/Settings.php:221
|
621 |
+
#: partials/search-form.php:57
|
622 |
+
msgid "Search"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: includes/Settings.php:225
|
626 |
+
msgid "Background color"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: includes/Settings.php:232
|
630 |
+
#: includes/Settings.php:510
|
631 |
+
msgid "Text color"
|
632 |
msgstr ""
|
633 |
|
634 |
+
#: includes/Settings.php:239
|
635 |
+
msgid "Search input placeholder"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: includes/Settings.php:245
|
639 |
+
msgid "Appearance"
|
640 |
msgstr ""
|
641 |
|
642 |
+
#: includes/Settings.php:251
|
643 |
+
msgid "Style"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: includes/Settings.php:251
|
647 |
+
msgid "FiboSearch provides two different styles of search bars: Solaris and Pirx. Solaris has a rectangular shape while Pirx is a bean-shaped bar with curvy and smooth edges. <a target=\"_blank\" href=\"%s\">See the differences</a> between Solaris and Pirx style."
|
|
|
648 |
msgstr ""
|
649 |
|
650 |
+
#: includes/Settings.php:254
|
651 |
+
msgctxt "Solaris is proper name."
|
652 |
+
msgid "Solaris (default)"
|
653 |
msgstr ""
|
654 |
|
655 |
+
#: includes/Settings.php:255
|
656 |
+
msgctxt "Pirx is proper name."
|
657 |
+
msgid "Pirx (beta)"
|
|
|
|
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: includes/Settings.php:262
|
661 |
+
msgid "FiboSearch might be displayed as a search bar, icon, or mixed of them."
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: includes/Settings.php:262
|
665 |
+
msgid "See what each of these layouts looks like"
|
|
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: includes/Settings.php:275
|
669 |
+
#: includes/Settings.php:299
|
670 |
+
msgid "Breakpoint"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/Settings.php:276
|
674 |
+
#: includes/Settings.php:300
|
675 |
+
msgid "px"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/Settings.php:291
|
679 |
+
#: widget.php:48
|
680 |
+
msgid "Overlay on mobile"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: includes/Settings.php:291
|
684 |
+
msgid "Covers anything that is displayed on the screen and simplifies the view to search bar + results."
|
|
|
|
|
|
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: includes/Settings.php:292
|
688 |
+
msgid "The search will open as an overlay on mobile"
|
|
|
689 |
msgstr ""
|
690 |
|
691 |
+
#: includes/Settings.php:308
|
692 |
+
msgid "Darkened background"
|
|
|
693 |
msgstr ""
|
694 |
|
695 |
+
#: includes/Settings.php:308
|
696 |
+
msgid "Darkening the page background while autocomplete is active gives it stronger emphasis, minimizing elements (e.g., ads, carousels, and other page content) that could distract users from considering autocomplete suggestions."
|
697 |
msgstr ""
|
698 |
|
699 |
+
#: includes/Settings.php:309
|
700 |
+
msgid "(beta feature)"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: includes/Settings.php:317
|
704 |
+
msgid "Other colors"
|
705 |
msgstr ""
|
706 |
|
707 |
+
#: includes/Settings.php:323
|
708 |
+
msgid "Search input background"
|
|
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/Settings.php:330
|
712 |
+
msgid "Search input text"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: includes/Settings.php:337
|
716 |
+
msgid "Search input border"
|
|
|
|
|
|
|
|
|
|
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: includes/Settings.php:344
|
720 |
+
msgid "Preloader"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/Settings.php:350
|
724 |
+
msgid "Show preloader"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: includes/Settings.php:357
|
728 |
+
msgid "Upload preloader image"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: includes/Settings.php:372
|
732 |
+
msgid "Limit"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: includes/Settings.php:375
|
736 |
+
msgid "maximum number of suggestions"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: includes/Settings.php:380
|
740 |
+
msgid "Group results"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: includes/Settings.php:388
|
744 |
+
msgctxt "admin"
|
745 |
+
msgid "No results label"
|
746 |
msgstr ""
|
747 |
|
748 |
+
#: includes/Settings.php:394
|
749 |
+
msgid "Products"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: includes/Settings.php:400
|
753 |
+
msgid "Show product image"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: includes/Settings.php:406
|
757 |
+
msgid "Show price"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: includes/Settings.php:412
|
761 |
+
msgid "Show product description"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: includes/Settings.php:419
|
765 |
+
msgid "Show SKU"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/Settings.php:425
|
769 |
+
msgid "More results label"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: includes/Settings.php:431
|
773 |
+
msgid "Non-products in autocomplete"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: includes/Settings.php:437
|
777 |
+
msgid "Show categories"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: includes/Settings.php:455
|
781 |
+
msgid "Show tags"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: includes/Settings.php:463
|
785 |
+
msgid "Show posts"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: includes/Settings.php:470
|
789 |
+
msgid "Show pages"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: includes/Settings.php:477
|
793 |
+
msgid "Details panel"
|
|
|
|
|
|
|
|
|
|
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: includes/Settings.php:483
|
797 |
+
msgid "Show Details panel"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: includes/Settings.php:483
|
801 |
+
msgid "The Details panel is an additional container for extended information. The details change dynamically when the cursor hovers over one of the suggestions."
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: includes/Settings.php:490
|
805 |
+
msgid "Suggestions colors"
|
806 |
msgstr ""
|
807 |
|
808 |
+
#: includes/Settings.php:496
|
809 |
+
msgid "Suggestion background"
|
|
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: includes/Settings.php:503
|
813 |
+
msgid "Suggestion selected"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: includes/Settings.php:517
|
817 |
+
msgid "Highlight color"
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: includes/Settings.php:524
|
821 |
+
msgid "Border color"
|
|
|
|
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: includes/Settings.php:533
|
825 |
+
msgid "Products search scope"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: includes/Settings.php:539
|
829 |
+
msgid "Search in description"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: includes/Settings.php:545
|
833 |
+
msgid "Search in short description"
|
834 |
msgstr ""
|
835 |
|
836 |
+
#: includes/Settings.php:551
|
837 |
+
msgid "Search in SKU"
|
838 |
msgstr ""
|
839 |
|
840 |
+
#: includes/Settings.php:553
|
841 |
+
msgid "searching also in variable products SKU"
|
842 |
msgstr ""
|
843 |
|
844 |
+
#: includes/Settings.php:553
|
845 |
+
msgid "Searching in variable products SKU is available only in <a target=\"_blank\" href=\"%s\">the pro version</a>."
|
846 |
msgstr ""
|
847 |
|
848 |
+
#: includes/Settings.php:558
|
849 |
+
#: partials/admin/features.php:23
|
850 |
+
msgid "Search in attributes"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/Settings.php:565
|
854 |
+
#: partials/admin/features.php:24
|
855 |
+
msgid "Search in categories"
|
856 |
msgstr ""
|
857 |
|
858 |
+
#: includes/Settings.php:572
|
859 |
+
#: partials/admin/features.php:25
|
860 |
+
msgid "Search in tags"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/Settings.php:579
|
864 |
+
#: partials/admin/features.php:22
|
865 |
+
msgid "Search in custom fields"
|
|
|
|
|
|
|
866 |
msgstr ""
|
867 |
|
868 |
+
#: includes/Settings.php:579
|
869 |
+
msgid "Make your custom fields searchable from our search bar."
|
870 |
msgstr ""
|
871 |
|
872 |
+
#: includes/Settings.php:586
|
873 |
+
msgid "Exclude “out of stock” products"
|
874 |
msgstr ""
|
875 |
|
876 |
+
#: includes/Settings.php:592
|
877 |
+
msgid "Fuzziness"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: includes/Settings.php:604
|
881 |
+
msgid "The synonyms feature allows your users to find more relevant results. If your products have alternative names and users often misspell them, consider adding synonyms. <a target=\"_blank\" href=\"%s\">Read more</a> about this feature."
|
|
|
|
|
|
|
882 |
msgstr ""
|
883 |
|
884 |
+
#: includes/Settings.php:606
|
885 |
+
msgid "Synonyms should be separated by a comma. Each new synonyms group is entered in a new line. You can use a phrase instead of a single word. <br /> <br />Sample list:<br /> <br /><span class=\"dgwt-wcas-synonyms-sample\">sofa, couch, davenport, divan, settee<br />big, grand, great, large, outsize</span>"
|
|
|
|
|
|
|
886 |
msgstr ""
|
887 |
|
888 |
+
#: includes/Settings.php:611
|
889 |
+
msgid "Exclude/include products"
|
|
|
|
|
|
|
|
|
890 |
msgstr ""
|
891 |
|
892 |
+
#: includes/Settings.php:617
|
893 |
+
msgid "Filtering mode"
|
|
|
|
|
|
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: includes/Settings.php:619
|
897 |
+
msgid "Exclude the product group from the search results or allow search only among the indicated product group."
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/Settings.php:626
|
901 |
+
msgid "Exclude"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: includes/Settings.php:627
|
905 |
+
msgid "Include"
|
|
|
|
|
|
|
906 |
msgstr ""
|
907 |
|
908 |
+
#: includes/Settings.php:633
|
909 |
+
msgid "Filters"
|
|
|
|
|
|
|
910 |
msgstr ""
|
911 |
|
912 |
+
#: includes/Settings.php:635
|
913 |
+
msgid "Filters that specify the product group that will be affected by the above mode"
|
|
|
914 |
msgstr ""
|
915 |
|
916 |
+
#: includes/Settings.php:647
|
917 |
+
msgid "Pro features"
|
|
|
|
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: includes/Settings.php:653
|
921 |
+
msgid "Speed up search!"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: includes/Settings.php:659
|
925 |
+
msgid "Scheduling indexing"
|
|
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: includes/Settings.php:665
|
929 |
+
msgid "Enable Scheduler"
|
930 |
msgstr ""
|
931 |
|
932 |
+
#: includes/Settings.php:665
|
933 |
+
msgid "In most cases, you don't need to use the scheduler because the search index updates when you edit products. If you use import tools or custom code to refresh prices or bulk add/edit products, the indexing scheduler will be helpful."
|
934 |
msgstr ""
|
935 |
|
936 |
+
#: includes/Settings.php:673
|
937 |
+
msgid "Interval"
|
|
|
938 |
msgstr ""
|
939 |
|
940 |
+
#: includes/Settings.php:677
|
941 |
+
msgid "daily"
|
942 |
msgstr ""
|
943 |
|
944 |
+
#: includes/Settings.php:678
|
945 |
+
msgid "weekly"
|
|
|
|
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: includes/Settings.php:684
|
949 |
+
msgid "Schedule time"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: includes/Settings.php:692
|
953 |
+
msgid "Increases sales conversions"
|
|
|
|
|
|
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: includes/Settings.php:693
|
957 |
+
msgid "Returns suggestions based on likely relevance, even though a search keyword may not exactly match. E.g if you type “ipho<b>m</b>e” you get the same results as for “iphone”. <a target=\"_blank\" href=\"%s\">Read more</a> about the fuzzy search feature."
|
|
|
|
|
958 |
msgstr ""
|
959 |
|
960 |
+
#: includes/Settings.php:700
|
961 |
+
msgid "Fuzzy matching"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: includes/Settings.php:705
|
965 |
+
msgid "-- Disabled"
|
|
|
966 |
msgstr ""
|
967 |
|
968 |
+
#: includes/Settings.php:706
|
969 |
+
msgid "Soft"
|
|
|
|
|
|
|
970 |
msgstr ""
|
971 |
|
972 |
+
#: includes/Settings.php:707
|
973 |
+
msgid "Normal"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: includes/Settings.php:708
|
977 |
+
msgid "Hard"
|
978 |
msgstr ""
|
979 |
|
980 |
+
#: includes/Settings.php:715
|
981 |
+
msgid "Index status"
|
|
|
|
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: includes/Settings.php:932
|
985 |
+
msgid "You have selected the <b>Style -> Style -> Pirx (bean-shaped)</b> option. Pirx style forces a submit button to be enabled. You can find this option a few rows below. That's why this option is blocked."
|
|
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: partials/admin/debug/debug.php:21
|
989 |
+
msgid "Debug page"
|
|
|
|
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: partials/admin/embedding-in-theme.php:18
|
993 |
+
msgid "child theme of <b>%s</b>"
|
|
|
|
|
|
|
994 |
msgstr ""
|
995 |
|
996 |
+
#: partials/admin/embedding-in-theme.php:22
|
997 |
+
msgid "You are using the <b>%s</b> theme%s. Fantastic!"
|
|
|
|
|
998 |
msgstr ""
|
999 |
|
1000 |
+
#: partials/admin/embedding-in-theme.php:23
|
1001 |
+
msgid "We support this theme so you can easily replace all default search bars."
|
|
|
|
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: partials/admin/features.php:14
|
1005 |
+
msgid "If users can’t find the product they’re searching for, they can’t buy it. Help your customers to find the right products even <span>10× faster</span>."
|
|
|
|
|
|
|
|
|
1006 |
msgstr ""
|
1007 |
|
1008 |
+
#: partials/admin/features.php:16
|
1009 |
+
msgid "Update now and boost your sales. You will receive a <b>30-day satisfaction guarantee</b>. A return on investment will come very quickly."
|
|
|
|
|
1010 |
msgstr ""
|
1011 |
|
1012 |
+
#: partials/admin/features.php:19
|
1013 |
+
msgid "<b>New Ultra-Fast Search Engine</b> – works very fast even with 100,000+ products "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1014 |
msgstr ""
|
1015 |
|
1016 |
+
#: partials/admin/features.php:20
|
1017 |
+
msgid "Professional and fast <b>help to embed</b> or <b>replacing</b> the search bar in your theme"
|
|
|
1018 |
msgstr ""
|
1019 |
|
1020 |
+
#: partials/admin/features.php:26
|
1021 |
+
msgid "Search by variation product SKU"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: partials/admin/features.php:27
|
1025 |
+
msgid "Search in brands (WooCommerce Brands or YITH WooCommerce Brands)"
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: partials/admin/features.php:28
|
1029 |
+
msgid "Search for posts and pages"
|
|
|
|
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: partials/admin/features.php:30
|
1033 |
+
msgid "Individual customization of the search bar (simple CSS improvements)"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: partials/admin/features.php:31
|
1037 |
+
msgid "And more..."
|
1038 |
msgstr ""
|
1039 |
|
1040 |
+
#: partials/admin/features.php:33
|
1041 |
+
msgid "Upgrade Now!"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
+
#: partials/admin/how-to-use.php:13
|
1045 |
+
msgid "There are four easy ways to display the search bar in your theme"
|
|
|
|
|
|
|
1046 |
msgstr ""
|
1047 |
|
1048 |
+
#: partials/admin/how-to-use.php:15
|
1049 |
+
msgid "As a menu item - go to the %s and add the menu item “FiboSearch bar”. Done!"
|
|
|
|
|
|
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: partials/admin/how-to-use.php:15
|
1053 |
+
msgid "Menu Screen"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: partials/admin/how-to-use.php:16
|
1057 |
+
msgid "Using a shortcode - %s"
|
|
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: partials/admin/how-to-use.php:17
|
1061 |
+
msgid "As a widget - go to the %s and choose “FiboSearch bar”"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
+
#: partials/admin/how-to-use.php:17
|
1065 |
+
msgid "Widgets Screen"
|
|
|
|
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: partials/admin/how-to-use.php:18
|
1069 |
+
msgid "Using PHP - %s"
|
|
|
|
|
1070 |
msgstr ""
|
1071 |
|
1072 |
+
#: partials/admin/how-to-use.php:21
|
1073 |
+
msgid "Are there any difficulties? <b>We will do it for you!</b> We offer free of charge search bar implementation for Pro users. <a target=\"_blank\" href=\"%s\">Become one now!</a>"
|
|
|
|
|
1074 |
msgstr ""
|
1075 |
|
1076 |
+
#: partials/admin/indexer-header-demo.php:11
|
1077 |
+
msgid "The search index does not exist yet. Build it now."
|
1078 |
msgstr ""
|
1079 |
|
1080 |
+
#: partials/admin/indexer-header-demo.php:15
|
1081 |
+
msgid "Build index"
|
1082 |
msgstr ""
|
1083 |
|
1084 |
+
#: partials/admin/indexer-header-demo.php:16
|
1085 |
+
msgid "Show details"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
+
#: partials/admin/search-preview.php:21
|
1089 |
+
msgid "Preview"
|
|
|
1090 |
msgstr ""
|
1091 |
|
1092 |
+
#: partials/admin/search-preview.php:29
|
1093 |
+
#: partials/admin/search-preview.php:69
|
1094 |
+
msgid "On mobile"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
+
#: partials/admin/search-preview.php:30
|
1098 |
+
#: partials/admin/search-preview.php:70
|
1099 |
+
msgid "On desktop"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
+
#: partials/admin/search-preview.php:38
|
1103 |
+
#: partials/admin/search-preview.php:80
|
1104 |
+
#: partials/search-form.php:39
|
1105 |
+
msgid "Products search"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: partials/admin/search-preview.php:125
|
1109 |
+
msgid "Sample brand <strong>name</strong>"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: partials/admin/search-preview.php:141
|
1113 |
+
msgid "Sample category <strong>name</strong>"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: partials/admin/search-preview.php:154
|
1117 |
+
msgid "Sample tag <strong>name</strong>"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: partials/admin/search-preview.php:167
|
1121 |
+
msgid "Sample post <strong>name</strong>"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: partials/admin/search-preview.php:180
|
1125 |
+
msgid "Sample page <strong>name</strong>"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: partials/admin/search-preview.php:196
|
1129 |
+
msgid "Sample product <strong>name</strong>"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: partials/admin/search-preview.php:198
|
1133 |
+
#: partials/admin/search-preview.php:243
|
1134 |
+
msgid "Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin pharetra imperdiet neque, non varius."
|
|
|
|
|
1135 |
msgstr ""
|
1136 |
|
1137 |
+
#: partials/admin/search-preview.php:232
|
1138 |
+
msgid "Sample product name"
|
1139 |
msgstr ""
|
1140 |
|
1141 |
+
#: partials/admin/settings.php:27
|
1142 |
+
msgid "Settings"
|
|
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: partials/admin/settings.php:32
|
1146 |
+
#: partials/admin/settings.php:34
|
1147 |
+
msgid "Show advanced settings"
|
|
|
|
|
|
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: partials/admin/stats/critical-searches-row.php:12
|
1151 |
+
msgid "Check"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
+
#: partials/admin/stats/langs.php:10
|
1155 |
+
msgid "Language"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: partials/admin/stats/langs.php:11
|
1159 |
+
msgid "Shows stats only for the selected language."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: partials/admin/stats/stats.php:8
|
1163 |
+
msgid "Critical searches without result"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: partials/admin/stats/stats.php:10
|
1167 |
+
msgid "The FiboSearch analyzer found <b>%d critical search phrases</b> that have been typed by users over the last %d days. These phrases don`t return any search results. It's time to fix it."
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: partials/admin/stats/stats.php:18
|
1171 |
+
#: partials/admin/stats/stats.php:128
|
1172 |
+
#: partials/admin/stats/stats.php:177
|
1173 |
+
msgid "Phrase"
|
1174 |
msgstr ""
|
1175 |
|
1176 |
+
#: partials/admin/stats/stats.php:19
|
1177 |
+
#: partials/admin/stats/stats.php:129
|
1178 |
+
#: partials/admin/stats/stats.php:178
|
1179 |
+
msgid "Repetitions"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
+
#: partials/admin/stats/stats.php:20
|
1183 |
+
msgid "Check if it's been solved"
|
|
|
1184 |
msgstr ""
|
1185 |
|
1186 |
+
#: partials/admin/stats/stats.php:48
|
1187 |
+
msgid "How to fix it?"
|
1188 |
msgstr ""
|
1189 |
|
1190 |
+
#: partials/admin/stats/stats.php:50
|
1191 |
+
msgid "There are several ways to solve these problems. Every phrase may require a different approach. See what methods you could use:"
|
|
|
|
|
|
|
|
|
1192 |
msgstr ""
|
1193 |
|
1194 |
+
#: partials/admin/stats/stats.php:52
|
1195 |
+
msgid "<b>Adding the phrase to the product name</b> - just add the phrase to the product name, description, SKU, custom field, tag or anything else that's in your current search scope"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: partials/admin/stats/stats.php:53
|
1199 |
+
msgid "<b>Synonyms</b> - if the phrase is an alternate version of any other words, add it as a synonym. Learn more about <a href=\"%s\" target=\"_blank\">the synonyms feature."
|
|
|
|
|
|
|
1200 |
msgstr ""
|
1201 |
|
1202 |
+
#: partials/admin/stats/stats.php:55
|
1203 |
+
msgid "<b>Varied naming convention</b> - this issue occurs when users may type a phrase in several different way – eg. you have SKU \"CB-978-8-7290\", but users might type it in a different way: \"CB978 8 7290\", \"CB/978/8/7290\", \"CB97887290\" and so on. To solve such problems, contact our <a href=\"%s\" target=\"_blank\">technical support</a>, because the solution may be different for each case."
|
|
|
|
|
|
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: partials/admin/stats/stats.php:64
|
1207 |
+
msgid "Fantastic! The FiboSearch analyzer hasn't found any critical search phrases for the last %d days."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: partials/admin/stats/stats.php:71
|
1211 |
+
msgid "Searches stats (last %d days)"
|
|
|
|
|
|
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: partials/admin/stats/stats.php:76
|
1215 |
+
#: partials/admin/stats/stats.php:87
|
1216 |
+
msgid "Total searches"
|
1217 |
msgstr ""
|
1218 |
|
1219 |
+
#: partials/admin/stats/stats.php:77
|
1220 |
+
msgid "autocomplete"
|
|
|
|
|
|
|
1221 |
msgstr ""
|
1222 |
|
1223 |
+
#: partials/admin/stats/stats.php:88
|
1224 |
+
msgid "search results page"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: partials/admin/stats/stats.php:98
|
1228 |
+
msgid "Searches"
|
|
|
1229 |
msgstr ""
|
1230 |
|
1231 |
+
#: partials/admin/stats/stats.php:99
|
1232 |
+
msgid "returning results"
|
|
|
|
|
1233 |
msgstr ""
|
1234 |
|
1235 |
+
#: partials/admin/stats/stats.php:121
|
1236 |
+
msgid "Top searches - autocomplete"
|
|
|
|
|
1237 |
msgstr ""
|
1238 |
|
1239 |
+
#: partials/admin/stats/stats.php:122
|
1240 |
+
msgid "The list of phrases with results is displayed to users as a drop down list with auto suggestions."
|
|
|
1241 |
msgstr ""
|
1242 |
|
1243 |
+
#: partials/admin/stats/stats.php:148
|
1244 |
+
#: partials/admin/stats/stats.php:197
|
1245 |
+
msgid "show top 100 phrases"
|
|
|
|
|
|
|
1246 |
msgstr ""
|
1247 |
|
1248 |
+
#: partials/admin/stats/stats.php:159
|
1249 |
+
#: partials/admin/stats/stats.php:208
|
1250 |
+
msgid "0 searches with results"
|
|
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: partials/admin/stats/stats.php:169
|
1254 |
+
msgid "Top searches - WooCommerce search results page"
|
|
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: partials/admin/stats/stats.php:170
|
1258 |
+
msgid "Here is the list of phrases that were typed by users who followed the pattern: type the phrase into the bar → clicked “See all results” or just hit enter/return (for Mac users)"
|
|
|
|
|
|
|
|
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: partials/admin/troubleshooting.php:11
|
1262 |
+
msgid "Processing asynchronous tests..."
|
|
|
|
|
|
|
|
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: partials/admin/troubleshooting.php:18
|
1266 |
+
msgid "Great! We have not detected any problems that could affect the correct functioning of our plugin."
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: partials/admin/troubleshooting.php:22
|
1270 |
+
msgid "Recheck the status"
|
1271 |
msgstr ""
|
1272 |
|
1273 |
+
#: widget.php:24
|
1274 |
+
msgid "AJAX (live) search form for WooCommerce"
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: widget.php:31
|
1278 |
+
msgid "Title"
|
1279 |
msgstr ""
|
partials/admin/debug/body-analytics.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if (
|
8 |
+
! empty( $_REQUEST['dgwt-wcas-debug-analytics-delete-all-records'] ) &&
|
9 |
+
! empty( $_REQUEST['_wpnonce'] ) &&
|
10 |
+
wp_verify_nonce( $_REQUEST['_wpnonce'], 'dgwt_wcas_debug_analytics' )
|
11 |
+
) {
|
12 |
+
\DgoraWcas\Analytics\Database::wipeAllRecords();
|
13 |
+
?>
|
14 |
+
<div class="dgwt-wcas-notice notice notice-success">
|
15 |
+
<p>All analytics records have been deleted.</p>
|
16 |
+
</div>
|
17 |
+
<?php
|
18 |
+
}
|
19 |
+
|
20 |
+
if (
|
21 |
+
! empty( $_REQUEST['dgwt-wcas-debug-analytics-run-maintenance-task'] ) &&
|
22 |
+
! empty( $_REQUEST['_wpnonce'] ) &&
|
23 |
+
wp_verify_nonce( $_REQUEST['_wpnonce'], 'dgwt_wcas_debug_analytics' )
|
24 |
+
) {
|
25 |
+
do_action( \DgoraWcas\Analytics\Maintenance::HOOK );
|
26 |
+
?>
|
27 |
+
<div class="dgwt-wcas-notice notice notice-success">
|
28 |
+
<p>The task of maintaining the search analytics has been completed.</p>
|
29 |
+
</div>
|
30 |
+
<?php
|
31 |
+
}
|
32 |
+
|
33 |
+
?>
|
34 |
+
<h3>Analytics</h3>
|
35 |
+
<form action="<?php echo admin_url( 'admin.php' ); ?>" method="get">
|
36 |
+
<input type="hidden" name="page" value="dgwt_wcas_debug">
|
37 |
+
<?php wp_nonce_field( 'dgwt_wcas_debug_analytics', '_wpnonce', false ); ?>
|
38 |
+
<input type="submit" name="dgwt-wcas-debug-analytics-delete-all-records" class="button" value="Delete all records">
|
39 |
+
<input type="submit" name="dgwt-wcas-debug-analytics-run-maintenance-task" class="button" value="Run maintenance task">
|
40 |
+
</form>
|
41 |
+
|
42 |
+
<table class="wc_status_table widefat dgwt-wcas-table-debug-analytics">
|
43 |
+
<tr>
|
44 |
+
<td><b>Does the table exist?</b></td>
|
45 |
+
<td><?php echo \DgoraWcas\Analytics\Database::exist() ? 'yes' : 'no'; ?></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td><b>Total records</b></td>
|
49 |
+
<td><?php echo \DgoraWcas\Analytics\Database::getRecordsCount(); ?></td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td><b>Is the maintenance task scheduled?</b></td>
|
53 |
+
<td><?php echo wp_next_scheduled( \DgoraWcas\Analytics\Maintenance::HOOK ) ? 'yes' : 'no'; ?></td>
|
54 |
+
</tr>
|
55 |
+
<?php if ( defined( 'DGWT_WCAS_ANALYTICS_ONLY_CRITICAL' ) ) { ?>
|
56 |
+
<tr>
|
57 |
+
<td><b>Constant <code>DGWT_WCAS_ANALYTICS_ONLY_CRITICAL</code></b></td>
|
58 |
+
<td><?php echo DGWT_WCAS_ANALYTICS_ONLY_CRITICAL; ?></td>
|
59 |
+
</tr>
|
60 |
+
<?php } ?>
|
61 |
+
<?php if ( defined( 'DGWT_WCAS_ANALYTICS_EXPIRATION_IN_DAYS' ) ) { ?>
|
62 |
+
<tr>
|
63 |
+
<td><b>Constant <code>DGWT_WCAS_ANALYTICS_EXPIRATION_IN_DAYS</code></b></td>
|
64 |
+
<td><?php echo DGWT_WCAS_ANALYTICS_EXPIRATION_IN_DAYS; ?></td>
|
65 |
+
</tr>
|
66 |
+
<?php } ?>
|
67 |
+
</table>
|
68 |
+
<?php
|
partials/admin/debug/body-maintenance.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if (
|
8 |
+
! empty( $_REQUEST['dgwt-wcas-debug-setting-reset-to-default'] ) &&
|
9 |
+
! empty( $_REQUEST['_wpnonce'] ) &&
|
10 |
+
wp_verify_nonce( $_REQUEST['_wpnonce'], 'dgwt_wcas_debug_reset_settings' )
|
11 |
+
) {
|
12 |
+
global $dgwtWcasSettings;
|
13 |
+
|
14 |
+
$dgwtWcasSettings = array();
|
15 |
+
delete_option( DGWT_WCAS_SETTINGS_KEY );
|
16 |
+
DgoraWcas\Admin\Install::createOptions();
|
17 |
+
?>
|
18 |
+
<div class="dgwt-wcas-notice notice notice-success">
|
19 |
+
<p>The settings have been reset to the default values.</p>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
|
24 |
+
?>
|
25 |
+
<h3>Settings</h3>
|
26 |
+
<form action="<?php echo admin_url( 'admin.php' ); ?>" method="get"
|
27 |
+
onsubmit="return confirm('Are you sure you want to reset the settings?');">
|
28 |
+
<input type="hidden" name="page" value="dgwt_wcas_debug">
|
29 |
+
<?php wp_nonce_field( 'dgwt_wcas_debug_reset_settings', '_wpnonce', false ); ?>
|
30 |
+
<input type="submit" name="dgwt-wcas-debug-setting-reset-to-default" class="button"
|
31 |
+
value="Reset the plugin settings to default values">
|
32 |
+
</form>
|
33 |
+
<?php
|
partials/admin/debug/debug.php
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( !defined( 'DGWT_WCAS_FILE' ) ) {
|
5 |
+
exit;
|
6 |
+
}
|
7 |
+
$prefix = 'fibosearch-debug_page-';
|
8 |
+
?>
|
9 |
+
<div class="wrap dgwt-wcas-settings dgwt-wcas-debug">
|
10 |
+
|
11 |
+
<h2 class="dgwt-wcas-settings__head">
|
12 |
+
<div class="dgwt-wcas-settings__title">
|
13 |
+
<div class="dgwt-wcas-settings__title-top">
|
14 |
+
<div class="dgwt-wcas-settings-logo-wrapper">
|
15 |
+
<img class="dgwt-wcas-settings-logo" src="<?php
|
16 |
+
echo DGWT_WCAS_URL . 'assets/img/logo-30.png' ;
|
17 |
+
?>"/>
|
18 |
+
<span class="dgwt-wcas-settings-logo-pro">Pro</span>
|
19 |
+
</div>
|
20 |
+
<span class="dgwt-wcas-settings__title-core"><?php
|
21 |
+
_e( 'Debug page', 'ajax-search-for-woocommerce' );
|
22 |
+
?></span>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</h2>
|
26 |
+
|
27 |
+
<h2 class="nav-tab-wrapper fibosearch-debug_page-nav-tab-wrapper">
|
28 |
+
<?php
|
29 |
+
?>
|
30 |
+
<a href="#dgwt_wcas_deb_anatytics" class="nav-tab" id="dgwt_wcas_deb_anatytics-tab">Analytics</a>
|
31 |
+
<a href="#dgwt_wcas_deb_maintenance" class="nav-tab" id="dgwt_wcas_deb_maintenance-tab">Maintenance</a>
|
32 |
+
</h2>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
$active = 'analytics';
|
36 |
+
?>
|
37 |
+
|
38 |
+
<div class="dgwt-wcas-settings-body js-dgwt-wcas-settings-body" data-dgwt-wcas-active="<?php
|
39 |
+
echo esc_attr( $active ) ;
|
40 |
+
?>">
|
41 |
+
<?php
|
42 |
+
?>
|
43 |
+
|
44 |
+
<div id="dgwt_wcas_deb_anatytics" class="fibosearch-debug_page-group">
|
45 |
+
<?php
|
46 |
+
include_once DGWT_WCAS_DIR . 'partials/admin/debug/body-analytics.php';
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
<div id="dgwt_wcas_deb_maintenance" class="fibosearch-debug_page-group">
|
50 |
+
<?php
|
51 |
+
include_once DGWT_WCAS_DIR . 'partials/admin/debug/body-maintenance.php';
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<script>
|
58 |
+
jQuery(document).ready(function ($) {
|
59 |
+
|
60 |
+
function markActiveGroup($group) {
|
61 |
+
var name = $group.attr('id').replace('dgwt_wcas_', '');
|
62 |
+
|
63 |
+
$group.addClass('dgwt-wcas-group-active');
|
64 |
+
$group.closest('.js-dgwt-wcas-settings-body').attr('data-dgwt-wcas-active', name)
|
65 |
+
}
|
66 |
+
|
67 |
+
// Switches option sections
|
68 |
+
$('.<?php
|
69 |
+
echo $prefix ;
|
70 |
+
?>group').hide();
|
71 |
+
var activetab = '';
|
72 |
+
|
73 |
+
if (typeof (localStorage) != 'undefined') {
|
74 |
+
maybe_active = localStorage.getItem('<?php
|
75 |
+
echo $prefix ;
|
76 |
+
?>settings-active-tab');
|
77 |
+
|
78 |
+
if (maybe_active) {
|
79 |
+
// Check if tabs exists
|
80 |
+
$('.<?php
|
81 |
+
echo $prefix ;
|
82 |
+
?>nav-tab-wrapper a:not(.js-nav-tab-minor)').each(function () {
|
83 |
+
|
84 |
+
if ($(this).attr('href') === maybe_active) {
|
85 |
+
activetab = maybe_active;
|
86 |
+
}
|
87 |
+
});
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
if (activetab != '' && $(activetab).length) {
|
92 |
+
$(activetab).fadeIn();
|
93 |
+
markActiveGroup($(activetab));
|
94 |
+
} else {
|
95 |
+
$('.<?php
|
96 |
+
echo $prefix ;
|
97 |
+
?>group:first').fadeIn();
|
98 |
+
markActiveGroup($('.<?php
|
99 |
+
echo $prefix ;
|
100 |
+
?>group:first'));
|
101 |
+
}
|
102 |
+
|
103 |
+
$('.<?php
|
104 |
+
echo $prefix ;
|
105 |
+
?>group .collapsed').each(function () {
|
106 |
+
$(this).find('input:checked').parent().parent().parent().nextAll().each(
|
107 |
+
function () {
|
108 |
+
if ($(this).hasClass('last')) {
|
109 |
+
$(this).removeClass('hidden');
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
$(this).filter('.hidden').removeClass('hidden');
|
113 |
+
});
|
114 |
+
});
|
115 |
+
|
116 |
+
if (activetab != '' && $(activetab + '-tab').length) {
|
117 |
+
$(activetab + '-tab').addClass('nav-tab-active');
|
118 |
+
} else {
|
119 |
+
$('.<?php
|
120 |
+
echo $prefix ;
|
121 |
+
?>nav-tab-wrapper a:first').addClass('nav-tab-active');
|
122 |
+
}
|
123 |
+
|
124 |
+
$('.<?php
|
125 |
+
echo $prefix ;
|
126 |
+
?>nav-tab-wrapper a:not(.js-nav-tab-minor)').on('click', function (evt) {
|
127 |
+
|
128 |
+
if (typeof (localStorage) != 'undefined') {
|
129 |
+
localStorage.setItem('<?php
|
130 |
+
echo $prefix ;
|
131 |
+
?>settings-active-tab', $(this).attr('href'));
|
132 |
+
}
|
133 |
+
|
134 |
+
$('.<?php
|
135 |
+
echo $prefix ;
|
136 |
+
?>nav-tab-wrapper a').removeClass('nav-tab-active');
|
137 |
+
|
138 |
+
$(this).addClass('nav-tab-active').blur();
|
139 |
+
var clicked_group = $(this).attr('href');
|
140 |
+
|
141 |
+
$('.<?php
|
142 |
+
echo $prefix ;
|
143 |
+
?>group').hide();
|
144 |
+
$(clicked_group).fadeIn();
|
145 |
+
markActiveGroup($(clicked_group));
|
146 |
+
evt.preventDefault();
|
147 |
+
});
|
148 |
+
});
|
149 |
+
</script>
|
partials/admin/embedding-in-theme.php
CHANGED
@@ -9,13 +9,17 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
9 |
|
10 |
if ( DGWT_WCAS()->themeCompatibility->isCurrentThemeSupported() ):
|
11 |
|
12 |
-
|
13 |
-
$name = ! empty( $theme->name ) ? $theme->name : '';
|
14 |
-
$parentName = ! empty( $theme->parent_theme ) ? $theme->parent_theme : '';
|
15 |
|
16 |
-
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
21 |
<?php endif; ?>
|
9 |
|
10 |
if ( DGWT_WCAS()->themeCompatibility->isCurrentThemeSupported() ):
|
11 |
|
12 |
+
if ( ! DGWT_WCAS()->themeCompatibility->isWhiteLabel() ):
|
|
|
|
|
13 |
|
14 |
+
$name = DGWT_WCAS()->themeCompatibility->getThemeName();
|
15 |
+
$parentLabel = '';
|
16 |
|
17 |
+
if ( DGWT_WCAS()->themeCompatibility->isChildTheme() ) {
|
18 |
+
$parentLabel = ', ' . sprintf( __( 'child theme of <b>%s</b>', 'ajax-search-for-woocommerce' ), DGWT_WCAS()->themeCompatibility->getParentThemeName() );
|
19 |
+
}
|
20 |
+
|
21 |
+
?>
|
22 |
+
<h2><?php printf( __( 'You are using the <b>%s</b> theme%s. Fantastic!', 'ajax-search-for-woocommerce' ), $name, $parentLabel ); ?></h2>
|
23 |
+
<p><?php _e( 'We support this theme so you can easily replace all default search bars.', 'ajax-search-for-woocommerce' ); ?></p>
|
24 |
+
<?php endif; ?>
|
25 |
<?php endif; ?>
|
partials/admin/features.php
CHANGED
@@ -13,11 +13,11 @@ $utmLink = 'https://fibosearch.com/pro-vs-free/?utm_source=wp-admin&utm_medium=r
|
|
13 |
<div class="dgwt-wcas-upgrade-s">
|
14 |
<h2 class="dgwt-wcas-upgrade-s__title"><?php _e( 'If users can’t find the product they’re searching for, they can’t buy it. Help your customers to find the right products even <span>10× faster</span>.', 'ajax-search-for-woocommerce' ); ?></h2>
|
15 |
<p class="dgwt-wcas-upgrade-s__subtitle">
|
16 |
-
<?php _e( 'Update now and
|
17 |
</p>
|
18 |
<ul>
|
19 |
<li><strong>+ <?php _e( '<b>New Ultra-Fast Search Engine</b> – works very fast even with 100,000+ products ', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
20 |
-
<li><strong>+ <?php _e( 'Professional and fast <b>help
|
21 |
<li><strong>+ <?php _e( 'Fuzzy search', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
22 |
<li><strong>+ <?php _e( 'Search in custom fields', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
23 |
<li><strong>+ <?php _e( 'Search in attributes', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
13 |
<div class="dgwt-wcas-upgrade-s">
|
14 |
<h2 class="dgwt-wcas-upgrade-s__title"><?php _e( 'If users can’t find the product they’re searching for, they can’t buy it. Help your customers to find the right products even <span>10× faster</span>.', 'ajax-search-for-woocommerce' ); ?></h2>
|
15 |
<p class="dgwt-wcas-upgrade-s__subtitle">
|
16 |
+
<?php _e( 'Update now and boost your sales. You will receive a <b>30-day satisfaction guarantee</b>. A return on investment will come very quickly.', 'ajax-search-for-woocommerce' ); ?>
|
17 |
</p>
|
18 |
<ul>
|
19 |
<li><strong>+ <?php _e( '<b>New Ultra-Fast Search Engine</b> – works very fast even with 100,000+ products ', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
20 |
+
<li><strong>+ <?php _e( 'Professional and fast <b>help to embed</b> or <b>replacing</b> the search bar in your theme', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
21 |
<li><strong>+ <?php _e( 'Fuzzy search', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
22 |
<li><strong>+ <?php _e( 'Search in custom fields', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
23 |
<li><strong>+ <?php _e( 'Search in attributes', 'ajax-search-for-woocommerce' ); ?></strong></li>
|
partials/admin/search-preview.php
CHANGED
@@ -16,209 +16,264 @@ $labelSeeAll = Helpers::getLabel( 'show_more' );
|
|
16 |
?>
|
17 |
<div class="dgwt-wcas-preview js-dgwt-wcas-preview">
|
18 |
|
19 |
-
<div class="dgwt-wcas-preview-
|
20 |
-
<
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<div class="js-dgwt-wcas-preview-source dgwt-wcas-preview-source">
|
26 |
-
|
27 |
-
<div class="js-dgwt-wcas-search-wrapp dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses(); ?>" data-wcas-context="75c2">
|
28 |
-
<form class="dgwt-wcas-search-form" role="search" action="" method="get">
|
29 |
-
<div class="dgwt-wcas-sf-wrapp">
|
30 |
-
<?php echo Helpers::getMagnifierIco(); ?>
|
31 |
-
|
32 |
-
<label class="screen-reader-text"><?php _e( 'Products search', 'ajax-search-for-woocommerce' ); ?></label>
|
33 |
-
|
34 |
-
<input
|
35 |
-
type="search"
|
36 |
-
class="js-dgwt-wcas-search-input dgwt-wcas-search-input"
|
37 |
-
name="<?php echo Helpers::getSearchInputName(); ?>"
|
38 |
-
value="<?php echo get_search_query() ?>"
|
39 |
-
autocomplete="off"
|
40 |
-
placeholder="<?php echo Helpers::getLabel( 'search_placeholder' ); ?>"
|
41 |
-
/>
|
42 |
-
<div class="dgwt-wcas-preloader"></div>
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
|
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
-
|
60 |
|
61 |
-
|
62 |
|
63 |
-
|
64 |
<span class="dgwt-wcas-st">
|
65 |
<?php echo Helpers::getLabel( 'tax_' . DGWT_WCAS()->brands->getBrandTaxonomy() . '_plu' ); ?>
|
66 |
</span>
|
67 |
-
|
68 |
|
69 |
-
|
70 |
<span class="dgwt-wcas-si">
|
71 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
72 |
</span>
|
73 |
-
|
74 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_' . DGWT_WCAS()->brands->getBrandTaxonomy() ); ?></span>
|
75 |
<?php _e( 'Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
76 |
</span>
|
77 |
-
|
78 |
|
79 |
-
|
80 |
<span class="dgwt-wcas-st">
|
81 |
<?php echo Helpers::getLabel( 'tax_product_cat_plu' ); ?>
|
82 |
</span>
|
83 |
-
|
84 |
|
85 |
-
|
86 |
<span class="dgwt-wcas-si">
|
87 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
88 |
</span>
|
89 |
-
|
90 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_product_cat' ); ?></span>
|
91 |
<?php _e( 'Sample category <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
92 |
</span>
|
93 |
-
|
94 |
|
95 |
-
|
96 |
<span class="dgwt-wcas-st">
|
97 |
<?php echo Helpers::getLabel( 'tax_product_tag_plu' ); ?>
|
98 |
</span>
|
99 |
-
|
100 |
|
101 |
-
|
102 |
<span class="dgwt-wcas-st">
|
103 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_product_tag' ); ?></span>
|
104 |
<?php _e( 'Sample tag <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
105 |
</span>
|
106 |
-
|
107 |
|
108 |
-
|
109 |
<span class="dgwt-wcas-st">
|
110 |
<?php echo Helpers::getLabel( 'post_plu' ); ?>
|
111 |
</span>
|
112 |
-
|
113 |
|
114 |
-
|
115 |
<span class="dgwt-wcas-st">
|
116 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'post' ); ?></span>
|
117 |
<?php _e( 'Sample post <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
118 |
</span>
|
119 |
-
|
120 |
|
121 |
-
|
122 |
<span class="dgwt-wcas-st">
|
123 |
<?php echo Helpers::getLabel( 'page_plu' ); ?>
|
124 |
</span>
|
125 |
-
|
126 |
|
127 |
-
|
128 |
<span class="dgwt-wcas-st">
|
129 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'page' ); ?></span>
|
130 |
<?php _e( 'Sample page <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
131 |
</span>
|
132 |
-
|
133 |
|
134 |
-
|
135 |
<span class="dgwt-wcas-st">
|
136 |
<?php echo Helpers::getLabel( 'product_plu' ); ?>
|
137 |
</span>
|
138 |
-
|
139 |
|
140 |
-
|
141 |
<span class="js-dgwt-wcas-si dgwt-wcas-si">
|
142 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
143 |
</span>
|
144 |
-
|
145 |
<span class="dgwt-wcas-st">
|
146 |
<span class="dgwt-wcas-st-title"><?php _e( 'Sample product <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?></span>
|
147 |
<span class="dgwt-wcas-sku js-dgwt-wcas-sku">(<?php echo Helpers::getLabel( 'sku_label' ); ?> 0001)</span>
|
148 |
<span class="dgwt-wcas-sd js-dgwt-wcas-sd"><?php _e( 'Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin pharetra imperdiet neque, non varius.', 'ajax-search-for-woocommerce' ); ?></span>
|
149 |
</span>
|
150 |
-
|
151 |
<?php echo wc_price( 99 ); ?>
|
152 |
</span>
|
|
|
153 |
</div>
|
154 |
-
</div>
|
155 |
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
|
|
|
|
|
|
|
|
160 |
|
161 |
-
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-nores js-dgwt-wcas-suggestion-nores dgwt-wcas-hide">
|
162 |
-
<span class="dgwt-wcas-st"><?php echo $labelNoResults; ?></span>
|
163 |
</div>
|
164 |
|
165 |
-
|
166 |
|
167 |
-
|
168 |
|
169 |
-
|
170 |
|
171 |
-
|
|
|
|
|
|
|
|
|
172 |
|
173 |
-
|
174 |
-
<div class="dgwt-wcas-details-main-image">
|
175 |
-
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png"/>
|
176 |
-
</div>
|
177 |
-
</a>
|
178 |
|
179 |
-
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
<span class="dgwt-wcas-details-product-sku">0001</span>
|
185 |
|
186 |
-
|
187 |
-
<?php echo wc_price( 99 ); ?>
|
188 |
-
</div>
|
189 |
|
190 |
-
|
|
|
|
|
|
|
191 |
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
|
197 |
-
<div class="dgwt-wcas-details-hr"></div>
|
198 |
-
|
199 |
-
<div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
|
200 |
-
<form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
|
201 |
-
<div class="quantity buttons_added">
|
202 |
-
<input type="button" value="-" class="minus button is-form">
|
203 |
-
<input type="number" class="input-text qty text" step="1" min="0" max="9999" name="js-dgwt-wcas-quantity" value="1" title="Qty" size="4" inputmode="numeric">
|
204 |
-
<input type="button" value="+" class="plus button is-form">
|
205 |
-
</div>
|
206 |
-
<p class="product woocommerce add_to_cart_inline " style="">
|
207 |
-
<a href="#" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" rel="nofollow"><?php _e( 'Add to cart', 'woocommerce' ); ?></a>
|
208 |
-
</p>
|
209 |
-
</form>
|
210 |
</div>
|
211 |
|
212 |
-
</div>
|
213 |
|
|
|
214 |
|
215 |
</div>
|
216 |
|
217 |
</div>
|
218 |
|
219 |
</div>
|
220 |
-
|
221 |
</div>
|
222 |
|
223 |
</div>
|
|
|
|
|
|
|
|
|
224 |
</div>
|
16 |
?>
|
17 |
<div class="dgwt-wcas-preview js-dgwt-wcas-preview">
|
18 |
|
19 |
+
<div class="js-dgwt-wcas-preview-inner dgwt-wcas-preview-inner">
|
20 |
+
<div class="js-dgwt-wcas-preview-head dgwt-wcas-preview-head">
|
21 |
+
<span class="dgwt-wcas-preview-header"><?php _e( 'Preview', 'ajax-search-for-woocommerce' ); ?></span>
|
22 |
+
<span class="dgwt-wcas-preview-subheader dgwt-wcas-preview-subheader__sb"><?php _e( 'Search bar', 'ajax-search-for-woocommerce' ); ?></span>
|
23 |
+
<span class="dgwt-wcas-preview-subheader dgwt-wcas-preview-subheader__ac"><?php _e( 'Autocomplete', 'ajax-search-for-woocommerce' ); ?></span>
|
24 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
<div class="js-dgwt-wcas-preview-source dgwt-wcas-preview-source">
|
27 |
+
|
28 |
+
<span class="js-dgwt-wcas-preview-device-info dgwt-wcas-preview-device-info dgwt-wcas-hidden" data-device="desktop">
|
29 |
+
<span><?php _e( 'On mobile', 'ajax-search-for-woocommerce' ); ?></span>
|
30 |
+
<span><?php _e( 'On desktop', 'ajax-search-for-woocommerce' ); ?></span>
|
31 |
+
</span>
|
32 |
+
<div class="js-dgwt-wcas-search-wrapp js-dgwt-wcas-preview-bar-example dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses(); ?>" data-wcas-context="75c2">
|
33 |
+
<form class="dgwt-wcas-search-form" role="search" action="" method="get">
|
34 |
+
<div class="dgwt-wcas-sf-wrapp">
|
35 |
+
<?php echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-solaris' ); ?>
|
36 |
+
<?php echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-pirx', 'magnifier-pirx'); ?>
|
37 |
+
|
38 |
+
<label class="screen-reader-text"><?php _e( 'Products search', 'ajax-search-for-woocommerce' ); ?></label>
|
39 |
+
|
40 |
+
<input
|
41 |
+
type="search"
|
42 |
+
class="js-dgwt-wcas-search-input dgwt-wcas-search-input"
|
43 |
+
name="<?php echo Helpers::getSearchInputName(); ?>"
|
44 |
+
value="<?php echo get_search_query() ?>"
|
45 |
+
autocomplete="off"
|
46 |
+
placeholder="<?php echo Helpers::getLabel( 'search_placeholder' ); ?>"
|
47 |
+
/>
|
48 |
+
<div class="dgwt-wcas-preloader"></div>
|
49 |
+
|
50 |
+
<button type="submit" class="js-dgwt-wcas-search-submit dgwt-wcas-search-submit"><?php
|
51 |
+
echo '<span class="js-dgwt-wcas-search-submit-l">' . esc_html( $submitText ) . '</span>';
|
52 |
+
echo '<span class="js-dgwt-wcas-search-submit-m">';
|
53 |
+
echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-solaris');
|
54 |
+
echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-pirx', 'magnifier-pirx');
|
55 |
+
echo '</span>';
|
56 |
+
?>
|
57 |
+
</button>
|
58 |
+
|
59 |
+
<input type="hidden" name="post_type" value="product">
|
60 |
+
<input type="hidden" name="dgwt_wcas" value="1">
|
61 |
+
|
62 |
+
<input type="hidden" name="lang" value="en">
|
63 |
|
64 |
+
</div>
|
65 |
+
</form>
|
66 |
+
</div>
|
67 |
|
68 |
+
<span class="js-dgwt-wcas-preview-device-info dgwt-wcas-preview-device-info dgwt-wcas-hidden" data-device="mobile">
|
69 |
+
<span><?php _e( 'On mobile', 'ajax-search-for-woocommerce' ); ?></span>
|
70 |
+
<span><?php _e( 'On desktop', 'ajax-search-for-woocommerce' ); ?></span>
|
71 |
+
</span>
|
72 |
+
<div class="js-dgwt-wcas-search-wrapp dgwt-wcas-layout-icon-open js-dgwt-wcas-preview-icon-example dgwt-wcas-search-wrapp dgwt-wcas-hidden <?php echo Helpers::searchWrappClasses(); ?>" data-wcas-context="75c3">
|
73 |
+
<div class="dgwt-wcas-search-icon js-dgwt-wcas-search-icon-handler"><?php echo Helpers::getMagnifierIco( 'dgwt-wcas-ico-magnifier-handler' ); ?></div>
|
74 |
+
<div class="dgwt-wcas-search-icon-arrow"></div>
|
75 |
+
<form class="dgwt-wcas-search-form" role="search" action="" method="get">
|
76 |
+
<div class="dgwt-wcas-sf-wrapp">
|
77 |
+
<?php echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-solaris' ); ?>
|
78 |
+
<?php echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-pirx', 'magnifier-pirx'); ?>
|
79 |
+
|
80 |
+
<label class="screen-reader-text"><?php _e( 'Products search', 'ajax-search-for-woocommerce' ); ?></label>
|
81 |
+
<input
|
82 |
+
type="search"
|
83 |
+
class="js-dgwt-wcas-search-input dgwt-wcas-search-input"
|
84 |
+
name="<?php echo Helpers::getSearchInputName(); ?>"
|
85 |
+
value="<?php echo get_search_query() ?>"
|
86 |
+
autocomplete="off"
|
87 |
+
placeholder="<?php echo Helpers::getLabel( 'search_placeholder' ); ?>"
|
88 |
+
/>
|
89 |
+
<div class="dgwt-wcas-preloader"></div>
|
90 |
+
|
91 |
+
<button type="submit" class="js-dgwt-wcas-search-submit dgwt-wcas-search-submit"><?php
|
92 |
+
echo '<span class="js-dgwt-wcas-search-submit-l">' . esc_html( $submitText ) . '</span>';
|
93 |
+
echo '<span class="js-dgwt-wcas-search-submit-m">';
|
94 |
+
echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-solaris');
|
95 |
+
echo Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier js-dgwt-wcas-ico-magnifier-pirx', 'magnifier-pirx');
|
96 |
+
echo '</span>';
|
97 |
+
?>
|
98 |
+
</button>
|
99 |
+
|
100 |
+
<input type="hidden" name="post_type" value="product">
|
101 |
+
<input type="hidden" name="dgwt_wcas" value="1">
|
102 |
+
|
103 |
+
<input type="hidden" name="lang" value="en">
|
104 |
|
105 |
+
</div>
|
106 |
+
</form>
|
107 |
+
</div>
|
108 |
|
109 |
+
<div class="dgwt-wcas-autocomplete">
|
110 |
|
111 |
+
<div class="dgwt-wcas-suggestions-wrapp js-dgwt-wcas-suggestions-wrapp woocommerce dgwt-wcas-has-price dgwt-wcas-has-desc dgwt-wcas-has-sku" unselectable="on">
|
112 |
|
113 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-brand dgwt-wcas-suggestion-headline">
|
114 |
<span class="dgwt-wcas-st">
|
115 |
<?php echo Helpers::getLabel( 'tax_' . DGWT_WCAS()->brands->getBrandTaxonomy() . '_plu' ); ?>
|
116 |
</span>
|
117 |
+
</div>
|
118 |
|
119 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-brand js-dgwt-wcas-suggestion-brand">
|
120 |
<span class="dgwt-wcas-si">
|
121 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
122 |
</span>
|
123 |
+
<span class="dgwt-wcas-st">
|
124 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_' . DGWT_WCAS()->brands->getBrandTaxonomy() ); ?></span>
|
125 |
<?php _e( 'Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
126 |
</span>
|
127 |
+
</div>
|
128 |
|
129 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-cat dgwt-wcas-suggestion-headline">
|
130 |
<span class="dgwt-wcas-st">
|
131 |
<?php echo Helpers::getLabel( 'tax_product_cat_plu' ); ?>
|
132 |
</span>
|
133 |
+
</div>
|
134 |
|
135 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-cat js-dgwt-wcas-suggestion-cat">
|
136 |
<span class="dgwt-wcas-si">
|
137 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
138 |
</span>
|
139 |
+
<span class="dgwt-wcas-st">
|
140 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_product_cat' ); ?></span>
|
141 |
<?php _e( 'Sample category <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
142 |
</span>
|
143 |
+
</div>
|
144 |
|
145 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-tag dgwt-wcas-suggestion-headline">
|
146 |
<span class="dgwt-wcas-st">
|
147 |
<?php echo Helpers::getLabel( 'tax_product_tag_plu' ); ?>
|
148 |
</span>
|
149 |
+
</div>
|
150 |
|
151 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-tag">
|
152 |
<span class="dgwt-wcas-st">
|
153 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'tax_product_tag' ); ?></span>
|
154 |
<?php _e( 'Sample tag <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
155 |
</span>
|
156 |
+
</div>
|
157 |
|
158 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-post dgwt-wcas-suggestion-headline">
|
159 |
<span class="dgwt-wcas-st">
|
160 |
<?php echo Helpers::getLabel( 'post_plu' ); ?>
|
161 |
</span>
|
162 |
+
</div>
|
163 |
|
164 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-post">
|
165 |
<span class="dgwt-wcas-st">
|
166 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'post' ); ?></span>
|
167 |
<?php _e( 'Sample post <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
168 |
</span>
|
169 |
+
</div>
|
170 |
|
171 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-page dgwt-wcas-suggestion-headline">
|
172 |
<span class="dgwt-wcas-st">
|
173 |
<?php echo Helpers::getLabel( 'page_plu' ); ?>
|
174 |
</span>
|
175 |
+
</div>
|
176 |
|
177 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-page">
|
178 |
<span class="dgwt-wcas-st">
|
179 |
<span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel( 'page' ); ?></span>
|
180 |
<?php _e( 'Sample page <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?>
|
181 |
</span>
|
182 |
+
</div>
|
183 |
|
184 |
+
<div class="dgwt-wcas-suggestion js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline">
|
185 |
<span class="dgwt-wcas-st">
|
186 |
<?php echo Helpers::getLabel( 'product_plu' ); ?>
|
187 |
</span>
|
188 |
+
</div>
|
189 |
|
190 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-product">
|
191 |
<span class="js-dgwt-wcas-si dgwt-wcas-si">
|
192 |
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
|
193 |
</span>
|
194 |
+
<div class="js-dgwt-wcas-content-wrapp dgwt-wcas-content-wrapp">
|
195 |
<span class="dgwt-wcas-st">
|
196 |
<span class="dgwt-wcas-st-title"><?php _e( 'Sample product <strong>name</strong>', 'ajax-search-for-woocommerce' ); ?></span>
|
197 |
<span class="dgwt-wcas-sku js-dgwt-wcas-sku">(<?php echo Helpers::getLabel( 'sku_label' ); ?> 0001)</span>
|
198 |
<span class="dgwt-wcas-sd js-dgwt-wcas-sd"><?php _e( 'Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin pharetra imperdiet neque, non varius.', 'ajax-search-for-woocommerce' ); ?></span>
|
199 |
</span>
|
200 |
+
<span class="dgwt-wcas-sp js-dgwt-wcas-sp">
|
201 |
<?php echo wc_price( 99 ); ?>
|
202 |
</span>
|
203 |
+
</div>
|
204 |
</div>
|
|
|
205 |
|
206 |
|
207 |
+
<div class="dgwt-wcas-suggestion js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more dgwt-wcas-suggestion-no-border-bottom" data-index="7">
|
208 |
+
<span class="dgwt-wcas-st-more"><span class="js-dgwt-wcas-st-more-label"><?php echo $labelSeeAll; ?></span> (73)</span>
|
209 |
+
</div>
|
210 |
+
|
211 |
+
<div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-nores js-dgwt-wcas-suggestion-nores dgwt-wcas-hide">
|
212 |
+
<span class="dgwt-wcas-st"><?php echo $labelNoResults; ?></span>
|
213 |
+
</div>
|
214 |
|
|
|
|
|
215 |
</div>
|
216 |
|
217 |
+
<div class="dgwt-wcas-details-wrapp js-dgwt-wcas-details-wrapp woocommerce">
|
218 |
|
219 |
+
<div class="dgwt-wcas-details-inner">
|
220 |
|
221 |
+
<div class="dgwt-wcas-product-details">
|
222 |
|
223 |
+
<a href="#">
|
224 |
+
<div class="dgwt-wcas-details-main-image">
|
225 |
+
<img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png"/>
|
226 |
+
</div>
|
227 |
+
</a>
|
228 |
|
229 |
+
<div class="dgwt-wcas-details-space">
|
|
|
|
|
|
|
|
|
230 |
|
231 |
+
<a class="dgwt-wcas-details-product-title" href="#">
|
232 |
+
<?php _e( 'Sample product name', 'ajax-search-for-woocommerce' ); ?>
|
233 |
+
</a>
|
234 |
+
<span class="dgwt-wcas-details-product-sku">0001</span>
|
235 |
|
236 |
+
<div class="dgwt-wcas-pd-price">
|
237 |
+
<?php echo wc_price( 99 ); ?>
|
238 |
+
</div>
|
|
|
239 |
|
240 |
+
<div class="dgwt-wcas-details-hr"></div>
|
|
|
|
|
241 |
|
242 |
+
<div class="dgwt-wcas-pd-desc">
|
243 |
+
<?php _e( 'Lorem <strong>ipsum</strong> dolor sit amet, consectetur adipiscing elit. Quisque gravida lacus nec diam porttitor pharetra. Nulla facilisi. Proin pharetra imperdiet neque, non varius.',
|
244 |
+
'ajax-search-for-woocommerce' ); ?>
|
245 |
+
</div>
|
246 |
|
247 |
+
<div class="dgwt-wcas-details-hr"></div>
|
248 |
+
|
249 |
+
<div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
|
250 |
+
<form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
|
251 |
+
<div class="quantity buttons_added">
|
252 |
+
<input type="button" value="-" class="minus button is-form">
|
253 |
+
<input type="number" class="input-text qty text" step="1" min="0" max="9999" name="js-dgwt-wcas-quantity" value="1" title="Qty" size="4" inputmode="numeric">
|
254 |
+
<input type="button" value="+" class="plus button is-form">
|
255 |
+
</div>
|
256 |
+
<p class="product woocommerce add_to_cart_inline " style="">
|
257 |
+
<a href="#" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" rel="nofollow"><?php _e( 'Add to cart', 'woocommerce' ); ?></a>
|
258 |
+
</p>
|
259 |
+
</form>
|
260 |
+
</div>
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
</div>
|
263 |
|
|
|
264 |
|
265 |
+
</div>
|
266 |
|
267 |
</div>
|
268 |
|
269 |
</div>
|
270 |
|
271 |
</div>
|
|
|
272 |
</div>
|
273 |
|
274 |
</div>
|
275 |
+
|
276 |
+
<div class="dgwt-wcas-preview-elements dgwt-wcas-hidden">
|
277 |
+
<div class="js-dgwt-wcas-preview-elements-close"><?php echo Helpers::getIcon( 'close' ); ?></div>
|
278 |
+
</div>
|
279 |
</div>
|
partials/admin/stats/stats.php
CHANGED
@@ -118,8 +118,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
118 |
|
119 |
<div class="dgwt-wcas-analytics-module-tables">
|
120 |
<div class="dgwt-wcas-analytics-module-table">
|
121 |
-
<h3><?php _e( 'Top searches
|
122 |
-
<p class="dgwt-wcas-analytics-subtitle"><?php _e( '
|
123 |
|
124 |
<table class="widefat fixed dgwt-wcas-analytics-table">
|
125 |
<thead>
|
@@ -166,8 +166,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
166 |
</div>
|
167 |
<div class="dgwt-wcas-analytics-module-table">
|
168 |
|
169 |
-
<h3><?php _e( 'Top searches
|
170 |
-
<p class="dgwt-wcas-analytics-subtitle"><?php _e( '
|
171 |
|
172 |
|
173 |
<table class="widefat fixed dgwt-wcas-analytics-table">
|
118 |
|
119 |
<div class="dgwt-wcas-analytics-module-tables">
|
120 |
<div class="dgwt-wcas-analytics-module-table">
|
121 |
+
<h3><?php _e( 'Top searches - autocomplete', 'ajax-search-for-woocommerce' ); ?></h3>
|
122 |
+
<p class="dgwt-wcas-analytics-subtitle"><?php _e( 'The list of phrases with results is displayed to users as a drop down list with auto suggestions.', 'ajax-search-for-woocommerce' ); ?></p>
|
123 |
|
124 |
<table class="widefat fixed dgwt-wcas-analytics-table">
|
125 |
<thead>
|
166 |
</div>
|
167 |
<div class="dgwt-wcas-analytics-module-table">
|
168 |
|
169 |
+
<h3><?php _e( 'Top searches - WooCommerce search results page', 'ajax-search-for-woocommerce' ); ?></h3>
|
170 |
+
<p class="dgwt-wcas-analytics-subtitle"><?php _e( 'Here is the list of phrases that were typed by users who followed the pattern: type the phrase into the bar → clicked “See all results” or just hit enter/return (for Mac users)', 'ajax-search-for-woocommerce' ); ?></p>
|
171 |
|
172 |
|
173 |
<table class="widefat fixed dgwt-wcas-analytics-table">
|
partials/search-form.php
CHANGED
@@ -10,23 +10,31 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
10 |
|
11 |
$layout = Helpers::getLayoutSettings();
|
12 |
|
13 |
-
$
|
14 |
-
$
|
15 |
$uniqueID = ++ DGWT_WCAS()->searchInstances;
|
16 |
$layoutType = ! empty( $args['layout'] ) ? $args['layout'] : $layout->layout;
|
|
|
17 |
$isAMP = Helpers::isAMPEndpoint();
|
18 |
-
|
19 |
$customParams = apply_filters( 'dgwt/wcas/search_bar/custom_params', array(), DGWT_WCAS()->searchInstances );
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
?>
|
22 |
<div <?php echo $isAMP ? "id='dgwt-wcas-search-wrapp{$uniqueID}'" : ''; ?> class="dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses( $args ); ?>">
|
23 |
-
<?php if(in_array($layoutType, array('icon', 'icon-flexible'))): ?>
|
24 |
-
|
25 |
-
|
26 |
<?php endif; ?>
|
27 |
<form class="dgwt-wcas-search-form" role="search" action="<?php echo Helpers::searchFormAction(); ?>" method="get">
|
28 |
<div class="dgwt-wcas-sf-wrapp">
|
29 |
-
<?php echo $hasSubmit !== 'on' ? Helpers::getMagnifierIco() : ''; ?>
|
30 |
<label class="screen-reader-text"
|
31 |
for="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"><?php _e( 'Products search',
|
32 |
'ajax-search-for-woocommerce' ); ?></label>
|
@@ -42,10 +50,12 @@ $customParams = apply_filters( 'dgwt/wcas/search_bar/custom_params', array(), DG
|
|
42 |
/>
|
43 |
<div class="dgwt-wcas-preloader"></div>
|
44 |
|
|
|
|
|
45 |
<?php if ( $hasSubmit === 'on' ): ?>
|
46 |
<button type="submit"
|
47 |
aria-label="<?php echo empty( $submitText ) ? __( 'Search','ajax-search-for-woocommerce' ) : esc_html( $submitText ); ?>"
|
48 |
-
class="dgwt-wcas-search-submit"><?php echo empty( $submitText ) ? Helpers::getMagnifierIco() : esc_html( $submitText ); ?></button>
|
49 |
<?php endif; ?>
|
50 |
|
51 |
<input type="hidden" name="post_type" value="product"/>
|
10 |
|
11 |
$layout = Helpers::getLayoutSettings();
|
12 |
|
13 |
+
$hasSubmit = isset( $args['submit_btn'] ) ? $args['submit_btn'] : DGWT_WCAS()->settings->getOption( 'show_submit_button' );
|
14 |
+
$submitText = isset( $args['submit_text'] ) ? $args['submit_text'] : Helpers::getLabel( 'submit' );
|
15 |
$uniqueID = ++ DGWT_WCAS()->searchInstances;
|
16 |
$layoutType = ! empty( $args['layout'] ) ? $args['layout'] : $layout->layout;
|
17 |
+
$iconType = ! empty( $args['icon'] ) ? $args['icon'] : $layout->icon;
|
18 |
$isAMP = Helpers::isAMPEndpoint();
|
|
|
19 |
$customParams = apply_filters( 'dgwt/wcas/search_bar/custom_params', array(), DGWT_WCAS()->searchInstances );
|
20 |
|
21 |
+
if ( ! empty( $args['mobile_overlay'] ) && ! empty( $args['mobile_overlay_breakpoint'] ) ) {
|
22 |
+
$customParams['mobile_overlay_breakpoint'] = absint( $args['mobile_overlay_breakpoint'] );
|
23 |
+
}
|
24 |
+
|
25 |
+
if ( ! empty( $args['layout_breakpoint'] ) && ! empty( $args['layout_breakpoint'] ) ) {
|
26 |
+
$customParams['layout_breakpoint'] = absint( $args['layout_breakpoint'] );
|
27 |
+
}
|
28 |
+
|
29 |
?>
|
30 |
<div <?php echo $isAMP ? "id='dgwt-wcas-search-wrapp{$uniqueID}'" : ''; ?> class="dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses( $args ); ?>">
|
31 |
+
<?php if ( in_array( $layoutType, array( 'icon', 'icon-flexible', 'icon-flexible-inv' ) ) ): ?>
|
32 |
+
<div <?php echo $isAMP ? "on='tap:dgwt-wcas-search-wrapp{$uniqueID}.toggleClass(class=\"dgwt-wcas-layout-icon-open\")'" : ""; ?> class="dgwt-wcas-search-icon js-dgwt-wcas-search-icon-handler"><?php echo Helpers::getMagnifierIco( 'dgwt-wcas-ico-magnifier-handler', $iconType ); ?></div>
|
33 |
+
<div class="dgwt-wcas-search-icon-arrow"></div>
|
34 |
<?php endif; ?>
|
35 |
<form class="dgwt-wcas-search-form" role="search" action="<?php echo Helpers::searchFormAction(); ?>" method="get">
|
36 |
<div class="dgwt-wcas-sf-wrapp">
|
37 |
+
<?php echo $hasSubmit !== 'on' ? Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier', $iconType) : ''; ?>
|
38 |
<label class="screen-reader-text"
|
39 |
for="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"><?php _e( 'Products search',
|
40 |
'ajax-search-for-woocommerce' ); ?></label>
|
50 |
/>
|
51 |
<div class="dgwt-wcas-preloader"></div>
|
52 |
|
53 |
+
<div class="dgwt-wcas-voice-search"></div>
|
54 |
+
|
55 |
<?php if ( $hasSubmit === 'on' ): ?>
|
56 |
<button type="submit"
|
57 |
aria-label="<?php echo empty( $submitText ) ? __( 'Search','ajax-search-for-woocommerce' ) : esc_html( $submitText ); ?>"
|
58 |
+
class="dgwt-wcas-search-submit"><?php echo empty( $submitText ) ? Helpers::getMagnifierIco('dgwt-wcas-ico-magnifier', $iconType) : esc_html( $submitText ); ?></button>
|
59 |
<?php endif; ?>
|
60 |
|
61 |
<input type="hidden" name="post_type" value="product"/>
|
partials/themes/astra.php
CHANGED
@@ -4,170 +4,11 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
4 |
exit;
|
5 |
}
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
if ( function_exists( 'astra_header_break_point' ) ) {
|
10 |
-
$header_break_point = astra_header_break_point();
|
11 |
-
}
|
12 |
|
13 |
-
|
|
|
|
|
|
|
14 |
}
|
15 |
-
|
16 |
-
function dgwt_wcas_astra_search_box() {
|
17 |
-
$search_box = '';
|
18 |
-
if ( function_exists( 'astra_get_option' ) ) {
|
19 |
-
$search_box = astra_get_option( 'header-main-rt-section' );
|
20 |
-
}
|
21 |
-
|
22 |
-
return $search_box;
|
23 |
-
}
|
24 |
-
|
25 |
-
function dgwt_wcas_astra_search_box_style() {
|
26 |
-
$search_box_style = '';
|
27 |
-
if ( function_exists( 'astra_get_option' ) ) {
|
28 |
-
$search_box_style = astra_get_option( 'header-main-rt-section-search-box-type' );
|
29 |
-
}
|
30 |
-
|
31 |
-
return $search_box_style;
|
32 |
-
}
|
33 |
-
|
34 |
-
// Change mobile breakpoint
|
35 |
-
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
36 |
-
return dgwt_wcas_astra_header_break_point();
|
37 |
-
} );
|
38 |
-
|
39 |
-
// Overwrite search in Slide Search and Search Box mode
|
40 |
-
add_filter( 'astra_get_search_form', function ( $form ) {
|
41 |
-
$header_break_point = dgwt_wcas_astra_header_break_point();
|
42 |
-
$form = '<div class="search-form"><span class="search-field"></span>';
|
43 |
-
$form .= do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '"]' );
|
44 |
-
$form .= '</div>';
|
45 |
-
|
46 |
-
return $form;
|
47 |
-
} );
|
48 |
-
|
49 |
-
add_action( 'wp_footer', function () {
|
50 |
-
$header_break_point = dgwt_wcas_astra_header_break_point();
|
51 |
-
$search_box = dgwt_wcas_astra_search_box();
|
52 |
-
$search_box_style = dgwt_wcas_astra_search_box_style();
|
53 |
-
|
54 |
-
// Header Cover Search
|
55 |
-
if ( $search_box === 'search' && $search_box_style === 'header-cover' ) {
|
56 |
-
echo '<div id="wcas-search-instance" style="display: block;"><div class="search-form"><div class="search-text-wrap"><input class="search-field" type="text" style="display:none;">' . do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '</div><span id="close" class="close"></span></div></div>';
|
57 |
-
}
|
58 |
-
// Full Screen Search
|
59 |
-
if ( $search_box === 'search' && $search_box_style === 'full-screen' ) {
|
60 |
-
echo '<div id="wcas-search-instance" style="display: block;"><div class="search-form"><input class="search-field" type="text" style="display:none;">' . do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '</div>';
|
61 |
-
}
|
62 |
-
?>
|
63 |
-
<script>
|
64 |
-
(function ($) {
|
65 |
-
<?php if ( $search_box === 'search' && $search_box_style === 'header-cover' ) { ?>
|
66 |
-
// Replace search form (Header Cover Search)
|
67 |
-
$(window).on('load', function () {
|
68 |
-
var wcasSearch = $('#wcas-search-instance > div');
|
69 |
-
var themeSearch = $('.ast-search-box.header-cover .ast-container');
|
70 |
-
if (themeSearch.eq(0)) {
|
71 |
-
themeSearch.html(wcasSearch);
|
72 |
-
}
|
73 |
-
$('#wcas-search-instance').remove();
|
74 |
-
});
|
75 |
-
<?php } ?>
|
76 |
-
|
77 |
-
<?php if ( $search_box === 'search' && $search_box_style === 'full-screen' ) { ?>
|
78 |
-
// Replace search form (Full Screen Search)
|
79 |
-
$(window).on('load', function () {
|
80 |
-
var wcasSearch = $('#wcas-search-instance > div');
|
81 |
-
var themeSearchFull = $('.ast-search-box.full-screen .ast-container');
|
82 |
-
if (themeSearchFull.eq(0)) {
|
83 |
-
themeSearchFull.find('.search-form').remove();
|
84 |
-
themeSearchFull.append(wcasSearch)
|
85 |
-
}
|
86 |
-
$('#wcas-search-instance').remove();
|
87 |
-
});
|
88 |
-
<?php } ?>
|
89 |
-
|
90 |
-
// Autofocus
|
91 |
-
$('.astra-search-icon').on('click', function () {
|
92 |
-
setTimeout(function () {
|
93 |
-
// Slide Search, Search Box
|
94 |
-
var $input = $('.search-custom-menu-item .dgwt-wcas-search-input');
|
95 |
-
if ($input.length > 0) {
|
96 |
-
$input.focus();
|
97 |
-
}
|
98 |
-
|
99 |
-
// Header Cover Search
|
100 |
-
var $inputHeaderCover = $('.ast-search-box.header-cover .dgwt-wcas-search-input');
|
101 |
-
if ($inputHeaderCover.length > 0) {
|
102 |
-
$inputHeaderCover.focus();
|
103 |
-
}
|
104 |
-
|
105 |
-
// Full Screen Search
|
106 |
-
var $inputFullScreen = $('.ast-search-box.full-screen .dgwt-wcas-search-input');
|
107 |
-
if ($inputFullScreen.length > 0) {
|
108 |
-
$inputFullScreen.focus();
|
109 |
-
}
|
110 |
-
}, 100);
|
111 |
-
|
112 |
-
if ($(window).width() <= <?php echo $header_break_point ?>) {
|
113 |
-
// Slide Search, Search Box
|
114 |
-
var $mobile = $('.search-custom-menu-item .js-dgwt-wcas-enable-mobile-form');
|
115 |
-
if ($mobile.length > 0) {
|
116 |
-
$mobile.click();
|
117 |
-
}
|
118 |
-
|
119 |
-
// Header Cover Search / Full Screen Search
|
120 |
-
var $mobile2 = $('.ast-search-box.header-cover .js-dgwt-wcas-enable-mobile-form, .ast-search-box.full-screen .js-dgwt-wcas-enable-mobile-form');
|
121 |
-
if ($mobile2.length > 0) {
|
122 |
-
$mobile2.click();
|
123 |
-
}
|
124 |
-
}
|
125 |
-
});
|
126 |
-
|
127 |
-
// Header Cover / Full Screen Search - close cover when in mobile mode
|
128 |
-
$(document).on('click', '.js-dgwt-wcas-om-return', function (e) {
|
129 |
-
$('.ast-search-box.header-cover #close, .ast-search-box.full-screen #close').click();
|
130 |
-
});
|
131 |
-
}(jQuery));
|
132 |
-
</script>
|
133 |
-
<?php
|
134 |
-
} );
|
135 |
-
|
136 |
-
add_filter( 'wp_head', function () {
|
137 |
-
?>
|
138 |
-
<style>
|
139 |
-
/* Slide Search */
|
140 |
-
.ast-dropdown-active .search-form {
|
141 |
-
padding-left: 0 !important;
|
142 |
-
}
|
143 |
-
|
144 |
-
.ast-dropdown-active .ast-search-icon {
|
145 |
-
visibility: hidden;
|
146 |
-
}
|
147 |
-
|
148 |
-
.ast-search-menu-icon .search-form {
|
149 |
-
padding: 0;
|
150 |
-
}
|
151 |
-
|
152 |
-
.search-custom-menu-item .search-field {
|
153 |
-
display: none;
|
154 |
-
}
|
155 |
-
|
156 |
-
.search-custom-menu-item .search-form {
|
157 |
-
background-color: transparent !important;
|
158 |
-
border: 0;
|
159 |
-
}
|
160 |
-
|
161 |
-
/* Search Box */
|
162 |
-
.site-header .ast-inline-search.ast-search-menu-icon .search-form {
|
163 |
-
padding-right: 0;
|
164 |
-
}
|
165 |
-
|
166 |
-
/* Full Screen Search */
|
167 |
-
.ast-search-box.full-screen .ast-search-wrapper {
|
168 |
-
top: 25%;
|
169 |
-
transform: translate(-50%, -25%);
|
170 |
-
}
|
171 |
-
</style>
|
172 |
-
<?php
|
173 |
-
} );
|
4 |
exit;
|
5 |
}
|
6 |
|
7 |
+
$astra_settings = get_option( 'astra-settings' );
|
8 |
+
$is_header_footer_builder = isset( $astra_settings['is-header-footer-builder'] ) ? (bool) $astra_settings['is-header-footer-builder'] : true;
|
|
|
|
|
|
|
9 |
|
10 |
+
if ( $is_header_footer_builder ) {
|
11 |
+
require_once 'astra/builder.php';
|
12 |
+
} else {
|
13 |
+
require_once 'astra/legacy.php';
|
14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
partials/themes/astra/builder.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( defined( 'ASTRA_EXT_VER' ) ) {
|
8 |
+
add_filter( 'dgwt/wcas/suggestion_details/show_quantity', '__return_false' );
|
9 |
+
}
|
10 |
+
|
11 |
+
function dgwt_wcas_astra_header_break_point() {
|
12 |
+
$header_break_point = 921;
|
13 |
+
if ( function_exists( 'astra_header_break_point' ) ) {
|
14 |
+
$header_break_point = astra_header_break_point();
|
15 |
+
}
|
16 |
+
|
17 |
+
return $header_break_point;
|
18 |
+
}
|
19 |
+
|
20 |
+
function dgwt_wcas_astra_search_box_type() {
|
21 |
+
$search_box_type = '';
|
22 |
+
if ( function_exists( 'astra_get_option' ) ) {
|
23 |
+
$search_box_type = astra_get_option( 'header-search-box-type' );
|
24 |
+
}
|
25 |
+
|
26 |
+
return $search_box_type;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Change mobile breakpoint
|
30 |
+
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
31 |
+
return dgwt_wcas_astra_header_break_point();
|
32 |
+
} );
|
33 |
+
|
34 |
+
function dgwt_wcas_astra_search_form() {
|
35 |
+
$header_break_point = dgwt_wcas_astra_header_break_point();
|
36 |
+
$form = '<div class="search-form"><span class="search-field"></span>';
|
37 |
+
$form .= do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '"]' );
|
38 |
+
$form .= '</div>';
|
39 |
+
|
40 |
+
return $form;
|
41 |
+
}
|
42 |
+
|
43 |
+
// Overwrite search in Slide Search and Search Box mode
|
44 |
+
if ( ! function_exists( 'astra_get_search_form' ) ) {
|
45 |
+
function astra_get_search_form( $echo = true ) {
|
46 |
+
$form = dgwt_wcas_astra_search_form();
|
47 |
+
|
48 |
+
if ( $echo ) {
|
49 |
+
echo $form;
|
50 |
+
} else {
|
51 |
+
return $form;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
add_filter( 'astra_get_search_form', function ( $form ) {
|
57 |
+
return dgwt_wcas_astra_search_form();
|
58 |
+
} );
|
59 |
+
|
60 |
+
// Template for Header Cover
|
61 |
+
add_filter( 'astra_addon_get_template', function ( $located, $template_name, $args, $template_path, $default_path ) {
|
62 |
+
if ( $template_name === 'advanced-search/template/header-cover.php' ) {
|
63 |
+
$located = __DIR__ . '/template/header-cover.php';
|
64 |
+
}
|
65 |
+
|
66 |
+
return $located;
|
67 |
+
}, 100, 5 );
|
68 |
+
|
69 |
+
|
70 |
+
add_action( 'wp_footer', function () {
|
71 |
+
$header_break_point = dgwt_wcas_astra_header_break_point();
|
72 |
+
$search_box_type = dgwt_wcas_astra_search_box_type();
|
73 |
+
|
74 |
+
// Full Screen Search
|
75 |
+
if ( $search_box_type === 'full-screen' ) {
|
76 |
+
echo '<div id="wcas-search-instance" style="display: block;"><div class="search-form"><input class="search-field" type="text" style="display:none;">' . do_shortcode( '[fibosearch layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '</div>';
|
77 |
+
}
|
78 |
+
?>
|
79 |
+
<script>
|
80 |
+
(function ($) {
|
81 |
+
<?php if ( $search_box_type === 'full-screen' ) { ?>
|
82 |
+
// Replace search form (Full Screen Search)
|
83 |
+
$(window).on('load', function () {
|
84 |
+
var wcasSearch = $('#wcas-search-instance > div');
|
85 |
+
var themeSearchFull = $('.ast-search-box.full-screen .ast-container');
|
86 |
+
if (themeSearchFull.eq(0)) {
|
87 |
+
themeSearchFull.find('.search-form').remove();
|
88 |
+
themeSearchFull.append(wcasSearch)
|
89 |
+
}
|
90 |
+
$('#wcas-search-instance').remove();
|
91 |
+
});
|
92 |
+
<?php } ?>
|
93 |
+
|
94 |
+
// Autofocus
|
95 |
+
$('.astra-search-icon').on('click', function () {
|
96 |
+
setTimeout(function () {
|
97 |
+
// Slide Search, Search Box
|
98 |
+
$input = $('.ast-search-menu-icon .dgwt-wcas-search-input');
|
99 |
+
if ($input.length > 0) {
|
100 |
+
$input.focus();
|
101 |
+
}
|
102 |
+
|
103 |
+
// Header Cover Search
|
104 |
+
var $inputHeaderCover = $('.ast-search-box.header-cover .dgwt-wcas-search-input');
|
105 |
+
if ($inputHeaderCover.length > 0) {
|
106 |
+
$inputHeaderCover.focus();
|
107 |
+
}
|
108 |
+
|
109 |
+
// Full Screen Search
|
110 |
+
var $inputFullScreen = $('.ast-search-box.full-screen .dgwt-wcas-search-input');
|
111 |
+
if ($inputFullScreen.length > 0) {
|
112 |
+
$inputFullScreen.focus();
|
113 |
+
}
|
114 |
+
}, 100);
|
115 |
+
|
116 |
+
if ($(window).width() <= <?php echo $header_break_point ?>) {
|
117 |
+
// Slide Search, Search Box
|
118 |
+
var $mobile = $('.ast-search-menu-icon .js-dgwt-wcas-enable-mobile-form');
|
119 |
+
if ($mobile.length > 0) {
|
120 |
+
$mobile.click();
|
121 |
+
}
|
122 |
+
|
123 |
+
// Header Cover Search / Full Screen Search
|
124 |
+
var $mobile2 = $('.ast-search-box.header-cover .js-dgwt-wcas-enable-mobile-form, .ast-search-box.full-screen .js-dgwt-wcas-enable-mobile-form');
|
125 |
+
if ($mobile2.length > 0) {
|
126 |
+
$mobile2.click();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
});
|
130 |
+
|
131 |
+
// Header Cover / Full Screen Search - close cover when in mobile mode
|
132 |
+
$(document).on('click', '.js-dgwt-wcas-om-return', function (e) {
|
133 |
+
$('.ast-search-box.header-cover #close, .ast-search-box.full-screen #close').click();
|
134 |
+
});
|
135 |
+
}(jQuery));
|
136 |
+
</script>
|
137 |
+
<?php
|
138 |
+
} );
|
139 |
+
|
140 |
+
add_filter( 'wp_head', function () {
|
141 |
+
?>
|
142 |
+
<style>
|
143 |
+
/* Slide Search */
|
144 |
+
.ast-dropdown-active .search-form {
|
145 |
+
padding-left: 0 !important;
|
146 |
+
}
|
147 |
+
|
148 |
+
.ast-dropdown-active .ast-search-icon {
|
149 |
+
visibility: hidden;
|
150 |
+
}
|
151 |
+
|
152 |
+
.ast-search-menu-icon .search-form {
|
153 |
+
padding: 0;
|
154 |
+
}
|
155 |
+
|
156 |
+
.ast-search-menu-icon .search-field {
|
157 |
+
display: none;
|
158 |
+
}
|
159 |
+
|
160 |
+
.ast-search-menu-icon .search-form {
|
161 |
+
background-color: transparent !important;
|
162 |
+
border: 0;
|
163 |
+
}
|
164 |
+
|
165 |
+
/* Search Box */
|
166 |
+
.site-header .ast-inline-search.ast-search-menu-icon .search-form {
|
167 |
+
padding-right: 0;
|
168 |
+
}
|
169 |
+
|
170 |
+
/* Full Screen Search */
|
171 |
+
.ast-search-box.full-screen .ast-search-wrapper {
|
172 |
+
top: 25%;
|
173 |
+
transform: translate(-50%, -25%);
|
174 |
+
}
|
175 |
+
|
176 |
+
/* Header Cover */
|
177 |
+
.ast-search-box.header-cover .search-text-wrap {
|
178 |
+
width: 50%;
|
179 |
+
vertical-align: middle;
|
180 |
+
margin-left: calc(25% - 10px);
|
181 |
+
}
|
182 |
+
|
183 |
+
.ast-search-box.header-cover .close {
|
184 |
+
margin-top: -5px;
|
185 |
+
}
|
186 |
+
</style>
|
187 |
+
<?php
|
188 |
+
} );
|
partials/themes/astra/legacy.php
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( defined( 'ASTRA_EXT_VER' ) ) {
|
8 |
+
add_filter( 'dgwt/wcas/suggestion_details/show_quantity', '__return_false' );
|
9 |
+
}
|
10 |
+
|
11 |
+
function dgwt_wcas_astra_header_break_point() {
|
12 |
+
$header_break_point = 921;
|
13 |
+
if ( function_exists( 'astra_header_break_point' ) ) {
|
14 |
+
$header_break_point = astra_header_break_point();
|
15 |
+
}
|
16 |
+
|
17 |
+
return $header_break_point;
|
18 |
+
}
|
19 |
+
|
20 |
+
function dgwt_wcas_astra_search_box() {
|
21 |
+
$search_box = '';
|
22 |
+
if ( function_exists( 'astra_get_option' ) ) {
|
23 |
+
$search_box = astra_get_option( 'header-main-rt-section' );
|
24 |
+
}
|
25 |
+
|
26 |
+
return $search_box;
|
27 |
+
}
|
28 |
+
|
29 |
+
function dgwt_wcas_astra_search_box_style() {
|
30 |
+
$search_box_style = '';
|
31 |
+
if ( function_exists( 'astra_get_option' ) ) {
|
32 |
+
$search_box_style = astra_get_option( 'header-main-rt-section-search-box-type' );
|
33 |
+
}
|
34 |
+
|
35 |
+
return $search_box_style;
|
36 |
+
}
|
37 |
+
|
38 |
+
// Change mobile breakpoint
|
39 |
+
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
40 |
+
return dgwt_wcas_astra_header_break_point();
|
41 |
+
} );
|
42 |
+
|
43 |
+
// Overwrite search in Slide Search and Search Box mode
|
44 |
+
add_filter( 'astra_get_search_form', function ( $form ) {
|
45 |
+
$header_break_point = dgwt_wcas_astra_header_break_point();
|
46 |
+
$form = '<div class="search-form"><span class="search-field"></span>';
|
47 |
+
$form .= do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '"]' );
|
48 |
+
$form .= '</div>';
|
49 |
+
|
50 |
+
return $form;
|
51 |
+
} );
|
52 |
+
|
53 |
+
add_action( 'wp_footer', function () {
|
54 |
+
$header_break_point = dgwt_wcas_astra_header_break_point();
|
55 |
+
$search_box = dgwt_wcas_astra_search_box();
|
56 |
+
$search_box_style = dgwt_wcas_astra_search_box_style();
|
57 |
+
|
58 |
+
// Header Cover Search
|
59 |
+
if ( $search_box === 'search' && $search_box_style === 'header-cover' ) {
|
60 |
+
echo '<div id="wcas-search-instance" style="display: block;"><div class="search-form"><div class="search-text-wrap"><input class="search-field" type="text" style="display:none;">' . do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '</div><span id="close" class="close"></span></div></div>';
|
61 |
+
}
|
62 |
+
// Full Screen Search
|
63 |
+
if ( $search_box === 'search' && $search_box_style === 'full-screen' ) {
|
64 |
+
echo '<div id="wcas-search-instance" style="display: block;"><div class="search-form"><input class="search-field" type="text" style="display:none;">' . do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ) . '</div>';
|
65 |
+
}
|
66 |
+
?>
|
67 |
+
<script>
|
68 |
+
(function ($) {
|
69 |
+
<?php if ( $search_box === 'search' && $search_box_style === 'header-cover' ) { ?>
|
70 |
+
// Replace search form (Header Cover Search)
|
71 |
+
$(window).on('load', function () {
|
72 |
+
var wcasSearch = $('#wcas-search-instance > div');
|
73 |
+
var themeSearch = $('.ast-search-box.header-cover .ast-container');
|
74 |
+
if (themeSearch.eq(0)) {
|
75 |
+
themeSearch.html(wcasSearch);
|
76 |
+
}
|
77 |
+
$('#wcas-search-instance').remove();
|
78 |
+
});
|
79 |
+
<?php } ?>
|
80 |
+
|
81 |
+
<?php if ( $search_box === 'search' && $search_box_style === 'full-screen' ) { ?>
|
82 |
+
// Replace search form (Full Screen Search)
|
83 |
+
$(window).on('load', function () {
|
84 |
+
var wcasSearch = $('#wcas-search-instance > div');
|
85 |
+
var themeSearchFull = $('.ast-search-box.full-screen .ast-container');
|
86 |
+
if (themeSearchFull.eq(0)) {
|
87 |
+
themeSearchFull.find('.search-form').remove();
|
88 |
+
themeSearchFull.append(wcasSearch)
|
89 |
+
}
|
90 |
+
$('#wcas-search-instance').remove();
|
91 |
+
});
|
92 |
+
<?php } ?>
|
93 |
+
|
94 |
+
// Autofocus
|
95 |
+
$('.astra-search-icon').on('click', function () {
|
96 |
+
setTimeout(function () {
|
97 |
+
// Slide Search, Search Box
|
98 |
+
var $input = $('.search-custom-menu-item .dgwt-wcas-search-input');
|
99 |
+
if ($input.length > 0) {
|
100 |
+
$input.focus();
|
101 |
+
}
|
102 |
+
|
103 |
+
// Header Cover Search
|
104 |
+
var $inputHeaderCover = $('.ast-search-box.header-cover .dgwt-wcas-search-input');
|
105 |
+
if ($inputHeaderCover.length > 0) {
|
106 |
+
$inputHeaderCover.focus();
|
107 |
+
}
|
108 |
+
|
109 |
+
// Full Screen Search
|
110 |
+
var $inputFullScreen = $('.ast-search-box.full-screen .dgwt-wcas-search-input');
|
111 |
+
if ($inputFullScreen.length > 0) {
|
112 |
+
$inputFullScreen.focus();
|
113 |
+
}
|
114 |
+
}, 100);
|
115 |
+
|
116 |
+
if ($(window).width() <= <?php echo $header_break_point ?>) {
|
117 |
+
// Slide Search, Search Box
|
118 |
+
var $mobile = $('.search-custom-menu-item .js-dgwt-wcas-enable-mobile-form');
|
119 |
+
if ($mobile.length > 0) {
|
120 |
+
$mobile.click();
|
121 |
+
}
|
122 |
+
|
123 |
+
// Header Cover Search / Full Screen Search
|
124 |
+
var $mobile2 = $('.ast-search-box.header-cover .js-dgwt-wcas-enable-mobile-form, .ast-search-box.full-screen .js-dgwt-wcas-enable-mobile-form');
|
125 |
+
if ($mobile2.length > 0) {
|
126 |
+
$mobile2.click();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
});
|
130 |
+
|
131 |
+
// Header Cover / Full Screen Search - close cover when in mobile mode
|
132 |
+
$(document).on('click', '.js-dgwt-wcas-om-return', function (e) {
|
133 |
+
$('.ast-search-box.header-cover #close, .ast-search-box.full-screen #close').click();
|
134 |
+
});
|
135 |
+
}(jQuery));
|
136 |
+
</script>
|
137 |
+
<?php
|
138 |
+
} );
|
139 |
+
|
140 |
+
add_filter( 'wp_head', function () {
|
141 |
+
?>
|
142 |
+
<style>
|
143 |
+
/* Slide Search */
|
144 |
+
.ast-dropdown-active .search-form {
|
145 |
+
padding-left: 0 !important;
|
146 |
+
}
|
147 |
+
|
148 |
+
.ast-dropdown-active .ast-search-icon {
|
149 |
+
visibility: hidden;
|
150 |
+
}
|
151 |
+
|
152 |
+
.ast-search-menu-icon .search-form {
|
153 |
+
padding: 0;
|
154 |
+
}
|
155 |
+
|
156 |
+
.search-custom-menu-item .search-field {
|
157 |
+
display: none;
|
158 |
+
}
|
159 |
+
|
160 |
+
.search-custom-menu-item .search-form {
|
161 |
+
background-color: transparent !important;
|
162 |
+
border: 0;
|
163 |
+
}
|
164 |
+
|
165 |
+
/* Search Box */
|
166 |
+
.site-header .ast-inline-search.ast-search-menu-icon .search-form {
|
167 |
+
padding-right: 0;
|
168 |
+
}
|
169 |
+
|
170 |
+
/* Full Screen Search */
|
171 |
+
.ast-search-box.full-screen .ast-search-wrapper {
|
172 |
+
top: 25%;
|
173 |
+
transform: translate(-50%, -25%);
|
174 |
+
}
|
175 |
+
</style>
|
176 |
+
<?php
|
177 |
+
} );
|
partials/themes/astra/template/header-cover.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
5 |
+
exit;
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Advanced Search - Header Cover Template
|
10 |
+
*/
|
11 |
+
$header_break_point = dgwt_wcas_astra_header_break_point();
|
12 |
+
?>
|
13 |
+
<div class="ast-search-box header-cover" id="ast-search-form">
|
14 |
+
<div class="ast-search-wrapper">
|
15 |
+
<div class="ast-container">
|
16 |
+
<div class="search-form">
|
17 |
+
<div class="search-text-wrap">
|
18 |
+
<input class="search-field" type="text" style="display:none;">
|
19 |
+
<?php echo do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="' . $header_break_point . '" ]' ); ?>
|
20 |
+
</div>
|
21 |
+
<span id="close" class="close"><?php Astra_Icons::get_icons( 'close', true ); ?></span>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
partials/themes/avada.php
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
add_filter( 'get_search_form', function ( $form ) {
|
8 |
+
return do_shortcode( '[wcas-search-form]' );
|
9 |
+
}, 100 );
|
10 |
+
|
11 |
+
add_action( 'init', function () {
|
12 |
+
remove_filter( 'wp_nav_menu_items', 'avada_add_search_to_main_nav', 20, 2 );
|
13 |
+
|
14 |
+
// Add search to the main navigation.
|
15 |
+
add_filter( 'wp_nav_menu_items', function ( $items, $args ) {
|
16 |
+
// Disable woo cart on ubermenu navigations.
|
17 |
+
$ubermenu = ( function_exists( 'ubermenu_get_menu_instance_by_theme_location' ) && ubermenu_get_menu_instance_by_theme_location( $args->theme_location ) );
|
18 |
+
|
19 |
+
if ( 'v6' !== Avada()->settings->get( 'header_layout' ) && false === $ubermenu ) {
|
20 |
+
if ( 'main_navigation' === $args->theme_location || 'sticky_navigation' === $args->theme_location ) {
|
21 |
+
if ( Avada()->settings->get( 'main_nav_search_icon' ) ) {
|
22 |
+
$items .= '<li class="fusion-custom-menu-item fusion-main-menu-search">';
|
23 |
+
$items .= do_shortcode( '[wcas-search-form layout="icon"]' );
|
24 |
+
$items .= '</li>';
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
return $items;
|
30 |
+
}, 20, 2 );
|
31 |
+
} );
|
32 |
+
|
33 |
+
// Fusion search
|
34 |
+
add_filter( 'search_form_after_fields', function ( $args ) {
|
35 |
+
add_action( 'wp_footer', function () {
|
36 |
+
echo '<div class="dgwt-wcas-avada-fus-search-replace-wrapper">';
|
37 |
+
echo do_shortcode( '[wcas-search-form]' );
|
38 |
+
echo '</div>';
|
39 |
+
} );
|
40 |
+
|
41 |
+
$args['after_fields'] = '<div class="dgwt-wcas-avada-fus-search-replace"></div>';
|
42 |
+
|
43 |
+
return $args;
|
44 |
+
} );
|
45 |
+
|
46 |
+
add_filter( 'dgwt/wcas/icon', function ( $svg, $name, $class, $color ) {
|
47 |
+
if ( $name === 'magnifier-thin' ) {
|
48 |
+
ob_start();
|
49 |
+
?>
|
50 |
+
<svg version="1.1" class="<?php echo $class; ?>" xmlns="http://www.w3.org/2000/svg"
|
51 |
+
viewBox="0 0 30 32">
|
52 |
+
<path
|
53 |
+
d="M20.571 15.143q0-3.304-2.348-5.652t-5.652-2.348-5.652 2.348-2.348 5.652 2.348 5.652 5.652 2.348 5.652-2.348 2.348-5.652zM29.714 30q0 0.929-0.679 1.607t-1.607 0.679q-0.964 0-1.607-0.679l-6.125-6.107q-3.196 2.214-7.125 2.214-2.554 0-4.884-0.991t-4.018-2.679-2.679-4.018-0.991-4.884 0.991-4.884 2.679-4.018 4.018-2.679 4.884-0.991 4.884 0.991 4.018 2.679 2.679 4.018 0.991 4.884q0 3.929-2.214 7.125l6.125 6.125q0.661 0.661 0.661 1.607z"></path>
|
54 |
+
</svg>
|
55 |
+
<?php
|
56 |
+
$svg = ob_get_clean();
|
57 |
+
}
|
58 |
+
|
59 |
+
return $svg;
|
60 |
+
}, 10, 4 );
|
61 |
+
|
62 |
+
add_action( 'wp_head', function () {
|
63 |
+
?>
|
64 |
+
<style>
|
65 |
+
.fusion-secondary-menu-search {
|
66 |
+
width: 500px;
|
67 |
+
}
|
68 |
+
|
69 |
+
.fusion-flyout-search .dgwt-wcas-search-wrapp {
|
70 |
+
margin-top: 21px;
|
71 |
+
}
|
72 |
+
|
73 |
+
.dgwt-wcas-details-wrapp .quantity {
|
74 |
+
width: auto;
|
75 |
+
}
|
76 |
+
|
77 |
+
.fusion-main-menu-search .dgwt-wcas-search-wrapp {
|
78 |
+
margin-top: calc((var(--nav_height) / 2) - (var(--nav_typography-font-size) / 2));
|
79 |
+
}
|
80 |
+
|
81 |
+
.fusion-header-v7 .fusion-main-menu-search .dgwt-wcas-search-wrapp {
|
82 |
+
margin-top: 0;
|
83 |
+
}
|
84 |
+
|
85 |
+
.dgwt-wcas-ico-magnifier, .dgwt-wcas-ico-magnifier-handler {
|
86 |
+
max-width: none;
|
87 |
+
fill: var(--nav_typography-color);
|
88 |
+
max-height: var(--nav_typography-font-size);
|
89 |
+
}
|
90 |
+
|
91 |
+
.dgwt-wcas-ico-magnifier:hover, .dgwt-wcas-ico-magnifier-handler:hover {
|
92 |
+
fill: var(--menu_hover_first_color);
|
93 |
+
}
|
94 |
+
|
95 |
+
.dgwt-wcas-sf-wrapp .dgwt-wcas-ico-magnifier:hover {
|
96 |
+
fill: currentColor;
|
97 |
+
opacity: 0.7;
|
98 |
+
}
|
99 |
+
|
100 |
+
.fusion-is-sticky .dgwt-wcas-ico-magnifier, .fusion-is-sticky .dgwt-wcas-ico-magnifier-handler {
|
101 |
+
fill: var(--header_sticky_menu_color);
|
102 |
+
}
|
103 |
+
|
104 |
+
.fusion-is-sticky .dgwt-wcas-ico-magnifier:hover, .fusion-is-sticky .dgwt-wcas-ico-magnifier-handler:hover {
|
105 |
+
fill: var(--menu_hover_first_color);
|
106 |
+
}
|
107 |
+
|
108 |
+
.fusion-header-v4 .fusion-main-menu {
|
109 |
+
overflow: visible;
|
110 |
+
}
|
111 |
+
|
112 |
+
.fusion-search-form {
|
113 |
+
display: none;
|
114 |
+
}
|
115 |
+
|
116 |
+
html:not(.dgwt-wcas-overlay-mobile-on) .fusion-header-v4 .fusion-main-menu .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form {
|
117 |
+
top: 100%;
|
118 |
+
}
|
119 |
+
|
120 |
+
.fusion-header-v4 .fusion-main-menu .dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
|
121 |
+
top: calc(100% + -4px);
|
122 |
+
}
|
123 |
+
|
124 |
+
@media (max-width: 1100px) {
|
125 |
+
.fusion-flyout-search .dgwt-wcas-search-wrapp {
|
126 |
+
margin-top: 73px;
|
127 |
+
max-width: 100%;
|
128 |
+
padding: 0 30px 0 30px;
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
@media (max-width: 800px) {
|
134 |
+
.fusion-logo .dgwt-wcas-search-wrapp {
|
135 |
+
display: none;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
</style>
|
139 |
+
<?php
|
140 |
+
} );
|
141 |
+
|
142 |
+
add_action( 'wp_footer', function () {
|
143 |
+
?>
|
144 |
+
<script>
|
145 |
+
(function ($) {
|
146 |
+
|
147 |
+
function dgwtWcasAvadaGetActiveInstance() {
|
148 |
+
var $el = $('.dgwt-wcas-search-wrapp.dgwt-wcas-active'),
|
149 |
+
instance;
|
150 |
+
if ($el.length > 0) {
|
151 |
+
$el.each(function () {
|
152 |
+
var $input = $(this).find('.dgwt-wcas-search-input');
|
153 |
+
if (typeof $input.data('autocomplete') == 'object') {
|
154 |
+
instance = $input.data('autocomplete');
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
});
|
158 |
+
}
|
159 |
+
|
160 |
+
return instance;
|
161 |
+
}
|
162 |
+
|
163 |
+
$(document).ready(function () {
|
164 |
+
// Header 6
|
165 |
+
if ($('.fusion-header-v6').length) {
|
166 |
+
$('.fusion-header-v6 .fusion-icon-search').on('click', function () {
|
167 |
+
var $input = $('.fusion-flyout-search .dgwt-wcas-search-input');
|
168 |
+
if ($input.length > 0) {
|
169 |
+
$input.focus();
|
170 |
+
}
|
171 |
+
});
|
172 |
+
|
173 |
+
$('.fusion-header-v6 .fusion-icon-search').on('click', function () {
|
174 |
+
var $input = $('.fusion-flyout-search .dgwt-wcas-search-input');
|
175 |
+
if ($input.length > 0) {
|
176 |
+
$input.focus();
|
177 |
+
}
|
178 |
+
});
|
179 |
+
|
180 |
+
$('.fusion-icon-search').on('click', function () {
|
181 |
+
|
182 |
+
if ($('.fusion-header-v6').hasClass('fusion-flyout-search-active')) {
|
183 |
+
|
184 |
+
var instance = dgwtWcasAvadaGetActiveInstance();
|
185 |
+
|
186 |
+
if (typeof instance == 'object') {
|
187 |
+
instance.suggestions = [];
|
188 |
+
instance.hide();
|
189 |
+
instance.el.val('');
|
190 |
+
}
|
191 |
+
}
|
192 |
+
});
|
193 |
+
}
|
194 |
+
|
195 |
+
// Fusion search
|
196 |
+
var $fusionSearchForm = $('.fusion-search-form');
|
197 |
+
if ($fusionSearchForm.length) {
|
198 |
+
$(this).remove();
|
199 |
+
}
|
200 |
+
|
201 |
+
var $placeholders = $('.dgwt-wcas-avada-fus-search-replace')
|
202 |
+
var $barsToReplace = $('.dgwt-wcas-avada-fus-search-replace-wrapper .dgwt-wcas-search-wrapp')
|
203 |
+
if ($placeholders.length && $barsToReplace.length) {
|
204 |
+
$placeholders.each(function (i) {
|
205 |
+
var $parentForm = $(this).closest('form');
|
206 |
+
$parentForm.after($(this));
|
207 |
+
$parentForm.remove();
|
208 |
+
});
|
209 |
+
|
210 |
+
$placeholders.each(function (i) {
|
211 |
+
$(this).append($($barsToReplace[i]));
|
212 |
+
});
|
213 |
+
}
|
214 |
+
|
215 |
+
// Remove unused search forms
|
216 |
+
$('.dgwt-wcas-avada-fus-search-replace-wrapper').remove();
|
217 |
+
|
218 |
+
$(document).on('click', '.fusion-icon-search', function () {
|
219 |
+
var $handler = $('.fusion-mobile-menu-search .js-dgwt-wcas-enable-mobile-form');
|
220 |
+
var $handler2 = $('.fusion-flyout-search .js-dgwt-wcas-enable-mobile-form');
|
221 |
+
|
222 |
+
if ($handler.length) {
|
223 |
+
|
224 |
+
setTimeout(function () {
|
225 |
+
$('.fusion-mobile-menu-search').hide();
|
226 |
+
}, 100);
|
227 |
+
|
228 |
+
$handler[0].click();
|
229 |
+
}
|
230 |
+
|
231 |
+
if ($handler2.length) {
|
232 |
+
$handler2[0].click();
|
233 |
+
}
|
234 |
+
|
235 |
+
});
|
236 |
+
|
237 |
+
$(document).on('click', '.js-dgwt-wcas-om-return', function () {
|
238 |
+
var $activeFlyout = $('.fusion-flyout-active');
|
239 |
+
if ($activeFlyout) {
|
240 |
+
$activeFlyout.removeClass('fusion-flyout-search-active');
|
241 |
+
$activeFlyout.removeClass('fusion-flyout-active');
|
242 |
+
}
|
243 |
+
});
|
244 |
+
});
|
245 |
+
}(jQuery));
|
246 |
+
</script>
|
247 |
+
<?php
|
248 |
+
}, 1000 );
|
partials/themes/divi.php
CHANGED
@@ -5,6 +5,15 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
5 |
exit;
|
6 |
}
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
9 |
return 980;
|
10 |
} );
|
5 |
exit;
|
6 |
}
|
7 |
|
8 |
+
add_filter( 'et_builder_load_requests', function ( $requests ) {
|
9 |
+
if ( ! isset( $requests['wc-ajax'] ) ) {
|
10 |
+
$requests['wc-ajax'] = array();
|
11 |
+
}
|
12 |
+
$requests['wc-ajax'][] = 'dgwt_wcas_result_details';
|
13 |
+
|
14 |
+
return $requests;
|
15 |
+
} );
|
16 |
+
|
17 |
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
18 |
return 980;
|
19 |
} );
|
partials/themes/ekommart.php
CHANGED
@@ -5,6 +5,19 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
5 |
exit;
|
6 |
}
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if ( ! function_exists( 'ekommart_product_search' ) ) {
|
9 |
function ekommart_product_search() {
|
10 |
?>
|
5 |
exit;
|
6 |
}
|
7 |
|
8 |
+
add_action( 'wp_head', function () {
|
9 |
+
?>
|
10 |
+
<style>
|
11 |
+
.dgwt-wcas-search-wrapp {
|
12 |
+
max-width: none;
|
13 |
+
}
|
14 |
+
.ekommart-handheld-footer-bar ul li.search.active .site-search{
|
15 |
+
bottom: -100%;
|
16 |
+
}
|
17 |
+
</style>
|
18 |
+
<?php
|
19 |
+
} );
|
20 |
+
|
21 |
if ( ! function_exists( 'ekommart_product_search' ) ) {
|
22 |
function ekommart_product_search() {
|
23 |
?>
|
partials/themes/enfold.php
CHANGED
@@ -39,12 +39,73 @@ add_action( 'wp_footer', function () {
|
|
39 |
});
|
40 |
}(jQuery));
|
41 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<?php
|
43 |
} );
|
44 |
|
45 |
add_action( 'wp_head', function () {
|
46 |
?>
|
47 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
.dgwt-wcas-search-enfold-wrapper {
|
49 |
cursor: default;
|
50 |
}
|
39 |
});
|
40 |
}(jQuery));
|
41 |
</script>
|
42 |
+
<script>
|
43 |
+
(function ($) {
|
44 |
+
function avia_apply_quant_btn() {
|
45 |
+
jQuery(".quantity input[type=number]").each(function () {
|
46 |
+
var number = $(this),
|
47 |
+
max = parseFloat(number.attr('max')),
|
48 |
+
min = parseFloat(number.attr('min')),
|
49 |
+
step = parseInt(number.attr('step'), 10),
|
50 |
+
newNum = jQuery(jQuery('<div />').append(number.clone(true)).html().replace('number', 'text')).insertAfter(number);
|
51 |
+
number.remove();
|
52 |
+
|
53 |
+
setTimeout(function () {
|
54 |
+
if (newNum.next('.plus').length === 0) {
|
55 |
+
var minus = jQuery('<input type="button" value="-" class="minus">').insertBefore(newNum),
|
56 |
+
plus = jQuery('<input type="button" value="+" class="plus">').insertAfter(newNum);
|
57 |
+
|
58 |
+
minus.on('click', function () {
|
59 |
+
var the_val = parseInt(newNum.val(), 10) - step;
|
60 |
+
the_val = the_val < 0 ? 0 : the_val;
|
61 |
+
the_val = the_val < min ? min : the_val;
|
62 |
+
newNum.val(the_val).trigger("change");
|
63 |
+
});
|
64 |
+
plus.on('click', function () {
|
65 |
+
var the_val = parseInt(newNum.val(), 10) + step;
|
66 |
+
the_val = the_val > max ? max : the_val;
|
67 |
+
newNum.val(the_val).trigger("change");
|
68 |
+
|
69 |
+
});
|
70 |
+
}
|
71 |
+
}, 10);
|
72 |
+
|
73 |
+
});
|
74 |
+
}
|
75 |
+
|
76 |
+
$(document).ready(function () {
|
77 |
+
|
78 |
+
$(document).on('dgwtWcasDetailsPanelLoaded', function () {
|
79 |
+
avia_apply_quant_btn();
|
80 |
+
});
|
81 |
+
});
|
82 |
+
|
83 |
+
}(jQuery));
|
84 |
+
</script>
|
85 |
<?php
|
86 |
} );
|
87 |
|
88 |
add_action( 'wp_head', function () {
|
89 |
?>
|
90 |
<style>
|
91 |
+
#top .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
92 |
+
padding: 10px 15px 10px 40px;
|
93 |
+
margin: 0;
|
94 |
+
}
|
95 |
+
|
96 |
+
#top.rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
97 |
+
padding: 10px 40px 10px 15px
|
98 |
+
}
|
99 |
+
|
100 |
+
#top .av-main-nav .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
101 |
+
padding: 10px 15px 10px 15px;
|
102 |
+
margin: 0;
|
103 |
+
}
|
104 |
+
|
105 |
+
#top.rtl .av-main-nav .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
|
106 |
+
padding: 10px 15px 10px 15px
|
107 |
+
}
|
108 |
+
|
109 |
.dgwt-wcas-search-enfold-wrapper {
|
110 |
cursor: default;
|
111 |
}
|
partials/themes/flatsome.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
add_filter( 'body_class', function ( $classes ) {
|
8 |
+
$classes[] = 'dgwt-wcas-theme-flatsome';
|
9 |
+
|
10 |
+
return $classes;
|
11 |
+
} );
|
12 |
+
|
13 |
+
add_action( 'wp_loaded', function () {
|
14 |
+
remove_shortcode( 'search' );
|
15 |
+
add_shortcode( 'search', array( 'DgoraWcas\\Shortcode', 'addBody' ) );
|
16 |
+
} );
|
17 |
+
|
18 |
+
// Change mobile breakpoint from 992 to 850
|
19 |
+
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
20 |
+
return 850;
|
21 |
+
} );
|
22 |
+
|
23 |
+
add_action( 'wp_head', function () { ?>
|
24 |
+
<style>
|
25 |
+
.dgwt-wcas-flatsome-up {
|
26 |
+
margin-top: -40vh;
|
27 |
+
}
|
28 |
+
|
29 |
+
#search-lightbox .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
|
30 |
+
height: 60px;
|
31 |
+
font-size: 20px;
|
32 |
+
}
|
33 |
+
|
34 |
+
#search-lightbox .dgwt-wcas-search-wrapp {
|
35 |
+
-webkit-transition: all 100ms ease-in-out;
|
36 |
+
-moz-transition: all 100ms ease-in-out;
|
37 |
+
-ms-transition: all 100ms ease-in-out;
|
38 |
+
-o-transition: all 100ms ease-in-out;
|
39 |
+
transition: all 100ms ease-in-out;
|
40 |
+
}
|
41 |
+
|
42 |
+
.dgwt-wcas-overlay-mobile-on .mfp-wrap .mfp-content {
|
43 |
+
width: 100vw;
|
44 |
+
}
|
45 |
+
|
46 |
+
.dgwt-wcas-overlay-mobile-on .mfp-close,
|
47 |
+
.dgwt-wcas-overlay-mobile-on .nav-sidebar {
|
48 |
+
display: none;
|
49 |
+
}
|
50 |
+
|
51 |
+
.dgwt-wcas-overlay-mobile-on .main-menu-overlay {
|
52 |
+
display: none;
|
53 |
+
}
|
54 |
+
|
55 |
+
.dgwt-wcas-open .header-search-dropdown .nav-dropdown {
|
56 |
+
opacity: 1;
|
57 |
+
max-height: inherit;
|
58 |
+
left: -15px !important;
|
59 |
+
}
|
60 |
+
|
61 |
+
.dgwt-wcas-open:not(.dgwt-wcas-theme-flatsome-dd-sc) .nav-right .header-search-dropdown .nav-dropdown {
|
62 |
+
left: auto;
|
63 |
+
/*right: -15px;*/
|
64 |
+
}
|
65 |
+
|
66 |
+
.dgwt-wcas-theme-flatsome .nav-dropdown .dgwt-wcas-search-wrapp {
|
67 |
+
min-width: 450px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.header-search-form {
|
71 |
+
min-width: 250px;
|
72 |
+
}
|
73 |
+
</style>
|
74 |
+
<?php
|
75 |
+
} );
|
76 |
+
|
77 |
+
add_action( 'wp_footer', function () {
|
78 |
+
|
79 |
+
$minChars = DGWT_WCAS()->settings->getOption( 'min_chars' );
|
80 |
+
if ( empty( $minChars ) || ! is_numeric( $minChars ) ) {
|
81 |
+
$minChars = 3;
|
82 |
+
}
|
83 |
+
|
84 |
+
// @TODO Dropdown on search hover
|
85 |
+
?>
|
86 |
+
<script>
|
87 |
+
(function ($) {
|
88 |
+
$(document).ready(function () {
|
89 |
+
$(document).on('keyup', '#search-lightbox .dgwt-wcas-search-wrapp .dgwt-wcas-search-input', function () {
|
90 |
+
if (this.value.length >= <?php echo $minChars; ?>) {
|
91 |
+
$(this).closest('.dgwt-wcas-search-wrapp').addClass('dgwt-wcas-flatsome-up')
|
92 |
+
}
|
93 |
+
});
|
94 |
+
|
95 |
+
var refreshDropdownPosition;
|
96 |
+
var style = '';
|
97 |
+
var positioning = false;
|
98 |
+
$(document).on('mouseenter', '.header-search-dropdown a', function (e) {
|
99 |
+
if (positioning) {
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
|
103 |
+
setTimeout(function () {
|
104 |
+
var pos = $(e.target).closest('.header-search').find('.nav-dropdown').attr('style');
|
105 |
+
|
106 |
+
if (typeof pos == 'string' && pos.length > 0) {
|
107 |
+
style = pos;
|
108 |
+
}
|
109 |
+
|
110 |
+
refreshDropdownPosition = setInterval(function () {
|
111 |
+
|
112 |
+
if ($('body').hasClass('dgwt-wcas-open') && style.length > 0) {
|
113 |
+
$('.nav-dropdown').attr('style', style);
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
+
if (!$('body').hasClass('dgwt-wcas-open') && !$('.header-search').hasClass('current-dropdown')) {
|
118 |
+
clearInterval(refreshDropdownPosition);
|
119 |
+
$('.nav-dropdown').removeAttr('style');
|
120 |
+
style = '';
|
121 |
+
positioning = false;
|
122 |
+
}
|
123 |
+
|
124 |
+
}, 10)
|
125 |
+
|
126 |
+
}, 400);
|
127 |
+
|
128 |
+
positioning = true;
|
129 |
+
});
|
130 |
+
|
131 |
+
$(document).on('click', '.header-search-lightbox .header-button a', function () {
|
132 |
+
var formWrapper = $('#search-lightbox').find('.dgwt-wcas-search-wrapp');
|
133 |
+
setTimeout(function () {
|
134 |
+
if (formWrapper.find('.dgwt-wcas-close')[0]) {
|
135 |
+
formWrapper.find('.dgwt-wcas-close')[0].click();
|
136 |
+
}
|
137 |
+
|
138 |
+
formWrapper.removeClass('dgwt-wcas-flatsome-up');
|
139 |
+
formWrapper.find('.dgwt-wcas-search-input').focus();
|
140 |
+
}, 1);
|
141 |
+
});
|
142 |
+
|
143 |
+
// Mobile
|
144 |
+
$(document).on('click', '.mobile-nav .header-search .icon-search', function () {
|
145 |
+
|
146 |
+
var $handler = $('.mobile-nav .header-search').find('.js-dgwt-wcas-enable-mobile-form');
|
147 |
+
if ($handler.length) {
|
148 |
+
$handler[0].click();
|
149 |
+
}
|
150 |
+
});
|
151 |
+
});
|
152 |
+
})(jQuery);
|
153 |
+
</script>
|
154 |
+
<?php
|
155 |
+
}, 1000 );
|
156 |
+
|
157 |
+
add_action( 'wp_footer', function () { ?>
|
158 |
+
<script>
|
159 |
+
(function ($) {
|
160 |
+
// Fix Quantity buttons
|
161 |
+
$(document).on('dgwtWcasDetailsPanelLoaded', function () {
|
162 |
+
var $quantityFields = $('.dgwt-wcas-details-wrapp .quantity');
|
163 |
+
|
164 |
+
if ($quantityFields.length) {
|
165 |
+
$quantityFields.addQty();
|
166 |
+
}
|
167 |
+
});
|
168 |
+
})(jQuery);
|
169 |
+
</script>
|
170 |
+
<?php
|
171 |
+
}, 1001 );
|
partials/themes/impreza.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
5 |
+
exit;
|
6 |
+
}
|
7 |
+
|
8 |
+
add_action( 'wp_head', function () { ?>
|
9 |
+
<style>
|
10 |
+
.w-search.layout_modern .w-search-close {
|
11 |
+
|
12 |
+
}
|
13 |
+
|
14 |
+
.w-search.layout_modern .w-search-close {
|
15 |
+
color: rgba(0, 0, 0, 0.5) !important;
|
16 |
+
}
|
17 |
+
|
18 |
+
.w-search.layout_modern .dgwt-wcas-close {
|
19 |
+
display: none;
|
20 |
+
}
|
21 |
+
|
22 |
+
.w-search.layout_modern .dgwt-wcas-preloader {
|
23 |
+
right: 20px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.w-search.layout_fullscreen .w-form-row-field {
|
27 |
+
top: 48px;
|
28 |
+
}
|
29 |
+
</style>
|
30 |
+
<?php
|
31 |
+
} );
|
32 |
+
|
33 |
+
add_action( 'wp_footer', function () { ?>
|
34 |
+
<script>
|
35 |
+
(function ($) {
|
36 |
+
function dgwtWcasImprezaGetActiveInstance() {
|
37 |
+
var $el = $('.dgwt-wcas-search-wrapp.dgwt-wcas-active'),
|
38 |
+
instance;
|
39 |
+
if ($el.length > 0) {
|
40 |
+
$el.each(function () {
|
41 |
+
var $input = $(this).find('.dgwt-wcas-search-input');
|
42 |
+
if (typeof $input.data('autocomplete') == 'object') {
|
43 |
+
instance = $input.data('autocomplete');
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
});
|
47 |
+
}
|
48 |
+
|
49 |
+
return instance;
|
50 |
+
}
|
51 |
+
|
52 |
+
$(document).ready(function () {
|
53 |
+
$('.w-search.layout_modern .w-search-close').on('click', function () {
|
54 |
+
var instance = dgwtWcasImprezaGetActiveInstance();
|
55 |
+
|
56 |
+
if (typeof instance == 'object') {
|
57 |
+
instance.suggestions = [];
|
58 |
+
instance.hide();
|
59 |
+
instance.el.val('');
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
$('.w-search-open').on('click', function (e) {
|
64 |
+
if ($(window).width() < 900) {
|
65 |
+
e.preventDefault();
|
66 |
+
|
67 |
+
var $mobileHandler = $(e.target).closest('.w-search').find('.js-dgwt-wcas-enable-mobile-form');
|
68 |
+
|
69 |
+
if ($mobileHandler.length) {
|
70 |
+
$mobileHandler[0].click();
|
71 |
+
}
|
72 |
+
|
73 |
+
setTimeout(function () {
|
74 |
+
$('.w-search').removeClass('active');
|
75 |
+
}, 500);
|
76 |
+
}
|
77 |
+
});
|
78 |
+
});
|
79 |
+
})(jQuery);
|
80 |
+
</script>
|
81 |
+
<?php
|
82 |
+
}, 1000 );
|
partials/themes/{restoration.php → restoration-searchform.php}
RENAMED
File without changes
|
partials/themes/savoy.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
add_action( 'wp_head', function () {
|
8 |
+
global $nm_theme_options;
|
9 |
+
?>
|
10 |
+
<style>
|
11 |
+
.nm-shop-search-input-wrap .dgwt-wcas-search-wrapp {
|
12 |
+
max-width: 100%;
|
13 |
+
}
|
14 |
+
|
15 |
+
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon {
|
16 |
+
padding: 16px 12px 16px 0;
|
17 |
+
margin-left: 12px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
21 |
+
max-width: 16px;
|
22 |
+
}
|
23 |
+
|
24 |
+
<?php if (isset($nm_theme_options['header_navigation_highlight_color'])) { ?>
|
25 |
+
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
26 |
+
fill: <?php echo esc_attr( $nm_theme_options['header_navigation_color'] ); ?>
|
27 |
+
}
|
28 |
+
|
29 |
+
<?php }
|
30 |
+
if (isset($nm_theme_options['header_navigation_highlight_color'])) { ?>
|
31 |
+
.nm-menu-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler:hover {
|
32 |
+
fill: <?php echo esc_attr( $nm_theme_options['header_navigation_highlight_color'] ); ?>
|
33 |
+
}
|
34 |
+
|
35 |
+
<?php } ?>
|
36 |
+
</style>
|
37 |
+
<?php
|
38 |
+
} );
|
partials/themes/shopkeeper.php
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
5 |
+
exit;
|
6 |
+
}
|
7 |
+
|
8 |
+
// Remove native form
|
9 |
+
add_action( 'init', function () {
|
10 |
+
remove_action( 'wp_loaded', 'shopkeeper_predictive_search', 100 );
|
11 |
+
} );
|
12 |
+
|
13 |
+
// Embed search bar
|
14 |
+
add_action( 'getbowtied_product_search', function () {
|
15 |
+
echo do_shortcode( '[wcas-search-form layout="classic" mobile_overlay="1" mobile_breakpoint="767"]' );
|
16 |
+
} );
|
17 |
+
|
18 |
+
// Change mobile breakpoint from 992 to 767
|
19 |
+
add_filter( 'dgwt/wcas/scripts/mobile_breakpoint', function () {
|
20 |
+
return 767;
|
21 |
+
} );
|
22 |
+
|
23 |
+
add_action( 'wp_head', function () {
|
24 |
+
?>
|
25 |
+
<style>
|
26 |
+
.site-search.off-canvas {
|
27 |
+
min-height: 100px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.admin-bar .site-search.off-canvas {
|
31 |
+
min-height: 130px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.site-search.off-canvas > .row {
|
35 |
+
margin-top: 30px;
|
36 |
+
}
|
37 |
+
|
38 |
+
.site-search.off-canvas p.search-text {
|
39 |
+
position: absolute;
|
40 |
+
top: 14px;
|
41 |
+
left: 20px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.site-search-close {
|
45 |
+
position: absolute;
|
46 |
+
top: 5px;
|
47 |
+
right: 20px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.site-search .dgwt-wcas-search-wrapp {
|
51 |
+
max-width: 800px;
|
52 |
+
}
|
53 |
+
|
54 |
+
.site-search .dgwt-wcas-search-input {
|
55 |
+
font-size: 20px;
|
56 |
+
border: none;
|
57 |
+
border-bottom: 1px solid #ccc;
|
58 |
+
}
|
59 |
+
|
60 |
+
@media (max-width: 1400px) {
|
61 |
+
.site-search .dgwt-wcas-search-wrapp {
|
62 |
+
max-width: 700px;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
@media (max-width: 1250px) {
|
67 |
+
.site-search .dgwt-wcas-search-wrapp {
|
68 |
+
max-width: 500px;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
@media (max-width: 1000px) {
|
73 |
+
.site-search.off-canvas p.search-text {
|
74 |
+
display: none;
|
75 |
+
}
|
76 |
+
|
77 |
+
.site-search .dgwt-wcas-search-wrapp {
|
78 |
+
max-width: calc(100% - 30px);
|
79 |
+
margin-left: 0;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
@media (max-width: 768px) {
|
84 |
+
/*.site-search.off-canvas {*/
|
85 |
+
/* display: none;*/
|
86 |
+
/*}*/
|
87 |
+
}
|
88 |
+
|
89 |
+
</style>
|
90 |
+
<?php
|
91 |
+
} );
|
92 |
+
|
93 |
+
add_action( 'wp_footer', function () {
|
94 |
+
?>
|
95 |
+
<script>
|
96 |
+
(function ($) {
|
97 |
+
if ($(window).width() > 767) {
|
98 |
+
$('.search-button').on('click', function () {
|
99 |
+
var $input = $('.site-search .dgwt-wcas-search-input');
|
100 |
+
|
101 |
+
if ($input.length) {
|
102 |
+
setTimeout(function () {
|
103 |
+
$input.focus();
|
104 |
+
}, 500);
|
105 |
+
}
|
106 |
+
});
|
107 |
+
} else {
|
108 |
+
$('.search-button').on('click', function () {
|
109 |
+
var $mobileHandler = $('.site-search .js-dgwt-wcas-enable-mobile-form');
|
110 |
+
|
111 |
+
if ($mobileHandler.length) {
|
112 |
+
$mobileHandler[0].click();
|
113 |
+
|
114 |
+
setTimeout(function () {
|
115 |
+
if ($('.site-search-close button').length) {
|
116 |
+
$('.site-search-close button').click();
|
117 |
+
}
|
118 |
+
}, 500);
|
119 |
+
}
|
120 |
+
});
|
121 |
+
}
|
122 |
+
})(jQuery);
|
123 |
+
</script>
|
124 |
+
<?php
|
125 |
+
} );
|
partials/themes/sober.php
CHANGED
@@ -5,9 +5,15 @@ if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
|
5 |
exit;
|
6 |
}
|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
function
|
11 |
echo '<div id="wcas-sober-mobile-search" style="display: none;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
|
12 |
echo '<div id="wcas-sober-search" style="display: block;">' . do_shortcode( '[wcas-search-form layout="icon"]' ) . '</div>';
|
13 |
?>
|
@@ -26,9 +32,23 @@ function dgwt_wcas_sober_search() {
|
|
26 |
}(jQuery));
|
27 |
</script>
|
28 |
<?php
|
29 |
-
}
|
30 |
|
31 |
if ( ! function_exists( 'sober_search_modal' ) ) {
|
32 |
function sober_search_modal() {
|
33 |
}
|
34 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
exit;
|
6 |
}
|
7 |
|
8 |
+
add_filter( 'dgwt/wcas/form/magnifier_ico', function ( $html, $class ) {
|
9 |
+
if ( $class === 'dgwt-wcas-ico-magnifier-handler' ) {
|
10 |
+
$html = '<svg class="dgwt-wcas-ico-magnifier-handler" viewBox="0 0 20 20" id="search"><circle fill="none" stroke-width="2" stroke-miterlimit="10" cx="8.35" cy="8.35" r="6.5"></circle><path fill="none" stroke-width="2" stroke-miterlimit="10" d="M12.945 12.945l5.205 5.205"></path></svg>';
|
11 |
+
}
|
12 |
+
|
13 |
+
return $html;
|
14 |
+
}, 10, 2 );
|
15 |
|
16 |
+
add_action( 'wp_footer', function () {
|
17 |
echo '<div id="wcas-sober-mobile-search" style="display: none;">' . do_shortcode( '[wcas-search-form]' ) . '</div>';
|
18 |
echo '<div id="wcas-sober-search" style="display: block;">' . do_shortcode( '[wcas-search-form layout="icon"]' ) . '</div>';
|
19 |
?>
|
32 |
}(jQuery));
|
33 |
</script>
|
34 |
<?php
|
35 |
+
} );
|
36 |
|
37 |
if ( ! function_exists( 'sober_search_modal' ) ) {
|
38 |
function sober_search_modal() {
|
39 |
}
|
40 |
}
|
41 |
+
|
42 |
+
add_action( 'wp_head', function () {
|
43 |
+
?>
|
44 |
+
<style>
|
45 |
+
#mobile-menu .dgwt-wcas-search-wrapp {
|
46 |
+
margin-bottom: 15px;
|
47 |
+
}
|
48 |
+
|
49 |
+
.menu-item-search .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-ico-magnifier-handler {
|
50 |
+
max-width: 18px;
|
51 |
+
}
|
52 |
+
</style>
|
53 |
+
<?php
|
54 |
+
} );
|
partials/themes/thegem.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'DGWT_WCAS_FILE' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
add_action( 'wp_head', function () { ?>
|
8 |
+
<style>
|
9 |
+
.dgwt-wcas-thegem-menu-search .minisearch {
|
10 |
+
width: 500px;
|
11 |
+
}
|
12 |
+
|
13 |
+
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
14 |
+
top: 30px;
|
15 |
+
position: absolute;
|
16 |
+
max-width: 600px;
|
17 |
+
left: 270px;
|
18 |
+
right: auto;
|
19 |
+
margin: 0 auto;
|
20 |
+
z-index: 10;
|
21 |
+
}
|
22 |
+
|
23 |
+
@media (max-width: 979px) {
|
24 |
+
.dgwt-wcas-thegem-menu-search .minisearch {
|
25 |
+
width: 100%;
|
26 |
+
}
|
27 |
+
|
28 |
+
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
29 |
+
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
30 |
+
max-width: 350px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.header-style-vertical #site-header-wrapper .dgwt-wcas-thegem-vertical-search {
|
34 |
+
display: none;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
@media (max-width: 769px) {
|
39 |
+
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
40 |
+
.header-layout-perspective > .dgwt-wcas-search-wrapp {
|
41 |
+
display: none;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
#page.vertical-header .dgwt-wcas-thegem-vertical-search {
|
47 |
+
margin-right: auto;
|
48 |
+
margin-left: auto;
|
49 |
+
padding-left: 21px;
|
50 |
+
padding-right: 21px;
|
51 |
+
}
|
52 |
+
|
53 |
+
.header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp {
|
54 |
+
top: 30px;
|
55 |
+
position: absolute;
|
56 |
+
left: 50px;
|
57 |
+
max-width: 600px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.site-header.fixed .header-layout-fullwidth_hamburger #primary-navigation > .dgwt-wcas-search-wrapp,
|
61 |
+
.site-header.fixed .header-layout-perspective > .dgwt-wcas-search-wrapp {
|
62 |
+
top: 8px;
|
63 |
+
}
|
64 |
+
|
65 |
+
body .header-layout-overlay #primary-menu.no-responsive.overlay-search-form-show.animated-minisearch > li.menu-item-search > .minisearch {
|
66 |
+
top: 0;
|
67 |
+
bottom: auto;
|
68 |
+
}
|
69 |
+
</style>
|
70 |
+
<?php
|
71 |
+
} );
|
72 |
+
|
73 |
+
add_action( 'wp_footer', function () { ?>
|
74 |
+
<script>
|
75 |
+
(function ($) {
|
76 |
+
$('.header-layout-overlay .dgwt-wcas-thegem-menu-search').on('click', function () {
|
77 |
+
var $searchHandler = $(this).find('.js-dgwt-wcas-enable-mobile-form');
|
78 |
+
|
79 |
+
if ($searchHandler.length) {
|
80 |
+
$searchHandler[0].click();
|
81 |
+
}
|
82 |
+
});
|
83 |
+
|
84 |
+
$('.dgwt-wcas-thegem-menu-search').on('click', function () {
|
85 |
+
var $input = $(this).find('.dgwt-wcas-search-input');
|
86 |
+
|
87 |
+
if ($input.length) {
|
88 |
+
setTimeout(function () {
|
89 |
+
$input.focus();
|
90 |
+
}, 300);
|
91 |
+
}
|
92 |
+
});
|
93 |
+
})(jQuery);
|
94 |
+
</script>
|
95 |
+
<?php
|
96 |
+
} );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce search, ajax search, search by sku, product search, woocommerc
|
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -142,6 +142,39 @@ You can read more and compare Pro and Free features here: [Full comparison - Pro
|
|
142 |
|
143 |
== Changelog ==
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
= 1.18.1, May 23, 2022 =
|
146 |
* FIX: Exceeding the memory limit on the search results page
|
147 |
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 1.19.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
142 |
|
143 |
== Changelog ==
|
144 |
|
145 |
+
= 1.19.0, July 27, 2022 =
|
146 |
+
* ADD: New feature - New search layout called “Pirx”
|
147 |
+
* ADD: New feature - FiboSearch Analytics
|
148 |
+
* ADD: New feature - Layout type: Icon on desktop, search bar on mobile
|
149 |
+
* ADD: New feature - Voice search
|
150 |
+
* ADD: New feature - FiboSearch blocks in the block editor
|
151 |
+
* ADD: Separated option “mobile_overlay_breakpoint” to handle overlay on mobile breakpoint
|
152 |
+
* ADD: Add "mobile_overlay_breakpoint" as a shortcode param to add the opportunity to set this value independently from global settings
|
153 |
+
* ADD: New search bars fixer: try to regenerate search bars when they were added by AJAX callbacks
|
154 |
+
* ADD: Support for header builder in integration with Astra theme
|
155 |
+
* ADD: Another question marks for FiboSearch settings that cover our documentation
|
156 |
+
* ADD: Settings preview - smooth scrolling
|
157 |
+
* ADD: Settings preview - animate typing on a search preview for “Search bar” tab
|
158 |
+
* ADD: Support all types of layout in widget and embedding via Menu
|
159 |
+
* ADD: Ability to reset plugin settings to default values
|
160 |
+
* ADD: New shortcode params: “submit_btn” and “submit_text”
|
161 |
+
|
162 |
+
* FIX: WOOF – Products Filter for WooCommerce integration: broken counters on the search results page
|
163 |
+
* FIX: Interdependent settings in Settings -> Search bar -> Style -> Design
|
164 |
+
* FIX: Improved darkened background positioning (support for sticky elements as well)
|
165 |
+
* FIX: Improved search suggestions and the details panel positioning (support for sticky elements as well)
|
166 |
+
* FIX: Settings page - wrong position of a questions mark (Safari)
|
167 |
+
* FIX: JavaScript errors in the settings page when the GeoTargetingWP plugin is active
|
168 |
+
* FIX: Try to add “dgwt-wcas-active” class again if it has not been added by other events
|
169 |
+
* FIX: Incorrect elements position after load “iconMode”
|
170 |
+
* FIX: Incorrect adding CSS class as shortcode parameter
|
171 |
+
* FIX: English grammar typos
|
172 |
+
|
173 |
+
* CHANGE: Updated Freemius SDK to v2.4.4
|
174 |
+
* REFACTOR: Indexer - Replacing “PDO” with WPDB”
|
175 |
+
* REFACTOR: Settings page - rebuild the settings section Search Bar -> Appearance to improve UX
|
176 |
+
* REFACTOR: Search bars fixer
|
177 |
+
|
178 |
= 1.18.1, May 23, 2022 =
|
179 |
* FIX: Exceeding the memory limit on the search results page
|
180 |
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit9aeb1bdd6a316a877f765f7ad7070604::getLoader();
|
vendor/composer/ClassLoader.php
CHANGED
@@ -42,21 +42,75 @@ namespace Composer\Autoload;
|
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
|
|
|
|
|
|
45 |
// PSR-4
|
|
|
|
|
|
|
|
|
46 |
private $prefixLengthsPsr4 = array();
|
|
|
|
|
|
|
|
|
47 |
private $prefixDirsPsr4 = array();
|
|
|
|
|
|
|
|
|
48 |
private $fallbackDirsPsr4 = array();
|
49 |
|
50 |
// PSR-0
|
|
|
|
|
|
|
|
|
51 |
private $prefixesPsr0 = array();
|
|
|
|
|
|
|
|
|
52 |
private $fallbackDirsPsr0 = array();
|
53 |
|
|
|
54 |
private $useIncludePath = false;
|
|
|
|
|
|
|
|
|
|
|
55 |
private $classMap = array();
|
|
|
|
|
56 |
private $classMapAuthoritative = false;
|
|
|
|
|
|
|
|
|
|
|
57 |
private $missingClasses = array();
|
|
|
|
|
58 |
private $apcuPrefix;
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
@@ -66,28 +120,47 @@ class ClassLoader
|
|
66 |
return array();
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
69 |
public function getPrefixesPsr4()
|
70 |
{
|
71 |
return $this->prefixDirsPsr4;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
public function getFallbackDirs()
|
75 |
{
|
76 |
return $this->fallbackDirsPsr0;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
public function getFallbackDirsPsr4()
|
80 |
{
|
81 |
return $this->fallbackDirsPsr4;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
84 |
public function getClassMap()
|
85 |
{
|
86 |
return $this->classMap;
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* @param
|
|
|
|
|
|
|
91 |
*/
|
92 |
public function addClassMap(array $classMap)
|
93 |
{
|
@@ -102,9 +175,11 @@ class ClassLoader
|
|
102 |
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
* appending or prepending to the ones previously set for this prefix.
|
104 |
*
|
105 |
-
* @param string
|
106 |
-
* @param
|
107 |
-
* @param bool
|
|
|
|
|
108 |
*/
|
109 |
public function add($prefix, $paths, $prepend = false)
|
110 |
{
|
@@ -147,11 +222,13 @@ class ClassLoader
|
|
147 |
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
* appending or prepending to the ones previously set for this namespace.
|
149 |
*
|
150 |
-
* @param string
|
151 |
-
* @param
|
152 |
-
* @param bool
|
153 |
*
|
154 |
* @throws \InvalidArgumentException
|
|
|
|
|
155 |
*/
|
156 |
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
{
|
@@ -195,8 +272,10 @@ class ClassLoader
|
|
195 |
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
* replacing any others previously set for this prefix.
|
197 |
*
|
198 |
-
* @param string
|
199 |
-
* @param
|
|
|
|
|
200 |
*/
|
201 |
public function set($prefix, $paths)
|
202 |
{
|
@@ -211,10 +290,12 @@ class ClassLoader
|
|
211 |
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
* replacing any others previously set for this namespace.
|
213 |
*
|
214 |
-
* @param string
|
215 |
-
* @param
|
216 |
*
|
217 |
* @throws \InvalidArgumentException
|
|
|
|
|
218 |
*/
|
219 |
public function setPsr4($prefix, $paths)
|
220 |
{
|
@@ -234,6 +315,8 @@ class ClassLoader
|
|
234 |
* Turns on searching the include path for class files.
|
235 |
*
|
236 |
* @param bool $useIncludePath
|
|
|
|
|
237 |
*/
|
238 |
public function setUseIncludePath($useIncludePath)
|
239 |
{
|
@@ -256,6 +339,8 @@ class ClassLoader
|
|
256 |
* that have not been registered with the class map.
|
257 |
*
|
258 |
* @param bool $classMapAuthoritative
|
|
|
|
|
259 |
*/
|
260 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
{
|
@@ -276,6 +361,8 @@ class ClassLoader
|
|
276 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
*
|
278 |
* @param string|null $apcuPrefix
|
|
|
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
@@ -296,25 +383,44 @@ class ClassLoader
|
|
296 |
* Registers this instance as an autoloader.
|
297 |
*
|
298 |
* @param bool $prepend Whether to prepend the autoloader or not
|
|
|
|
|
299 |
*/
|
300 |
public function register($prepend = false)
|
301 |
{
|
302 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
* Unregisters this instance as an autoloader.
|
|
|
|
|
307 |
*/
|
308 |
public function unregister()
|
309 |
{
|
310 |
spl_autoload_unregister(array($this, 'loadClass'));
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
* Loads the given class or interface.
|
315 |
*
|
316 |
* @param string $class The name of the class
|
317 |
-
* @return
|
318 |
*/
|
319 |
public function loadClass($class)
|
320 |
{
|
@@ -323,6 +429,8 @@ class ClassLoader
|
|
323 |
|
324 |
return true;
|
325 |
}
|
|
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
@@ -367,6 +475,21 @@ class ClassLoader
|
|
367 |
return $file;
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
private function findFileWithExtension($class, $ext)
|
371 |
{
|
372 |
// PSR-4 lookup
|
@@ -438,6 +561,10 @@ class ClassLoader
|
|
438 |
* Scope isolated include.
|
439 |
*
|
440 |
* Prevents access to $this/self from included files.
|
|
|
|
|
|
|
|
|
441 |
*/
|
442 |
function includeFile($file)
|
443 |
{
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
45 |
+
/** @var ?string */
|
46 |
+
private $vendorDir;
|
47 |
+
|
48 |
// PSR-4
|
49 |
+
/**
|
50 |
+
* @var array[]
|
51 |
+
* @psalm-var array<string, array<string, int>>
|
52 |
+
*/
|
53 |
private $prefixLengthsPsr4 = array();
|
54 |
+
/**
|
55 |
+
* @var array[]
|
56 |
+
* @psalm-var array<string, array<int, string>>
|
57 |
+
*/
|
58 |
private $prefixDirsPsr4 = array();
|
59 |
+
/**
|
60 |
+
* @var array[]
|
61 |
+
* @psalm-var array<string, string>
|
62 |
+
*/
|
63 |
private $fallbackDirsPsr4 = array();
|
64 |
|
65 |
// PSR-0
|
66 |
+
/**
|
67 |
+
* @var array[]
|
68 |
+
* @psalm-var array<string, array<string, string[]>>
|
69 |
+
*/
|
70 |
private $prefixesPsr0 = array();
|
71 |
+
/**
|
72 |
+
* @var array[]
|
73 |
+
* @psalm-var array<string, string>
|
74 |
+
*/
|
75 |
private $fallbackDirsPsr0 = array();
|
76 |
|
77 |
+
/** @var bool */
|
78 |
private $useIncludePath = false;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @var string[]
|
82 |
+
* @psalm-var array<string, string>
|
83 |
+
*/
|
84 |
private $classMap = array();
|
85 |
+
|
86 |
+
/** @var bool */
|
87 |
private $classMapAuthoritative = false;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @var bool[]
|
91 |
+
* @psalm-var array<string, bool>
|
92 |
+
*/
|
93 |
private $missingClasses = array();
|
94 |
+
|
95 |
+
/** @var ?string */
|
96 |
private $apcuPrefix;
|
97 |
|
98 |
+
/**
|
99 |
+
* @var self[]
|
100 |
+
*/
|
101 |
+
private static $registeredLoaders = array();
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param ?string $vendorDir
|
105 |
+
*/
|
106 |
+
public function __construct($vendorDir = null)
|
107 |
+
{
|
108 |
+
$this->vendorDir = $vendorDir;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return string[]
|
113 |
+
*/
|
114 |
public function getPrefixes()
|
115 |
{
|
116 |
if (!empty($this->prefixesPsr0)) {
|
120 |
return array();
|
121 |
}
|
122 |
|
123 |
+
/**
|
124 |
+
* @return array[]
|
125 |
+
* @psalm-return array<string, array<int, string>>
|
126 |
+
*/
|
127 |
public function getPrefixesPsr4()
|
128 |
{
|
129 |
return $this->prefixDirsPsr4;
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @return array[]
|
134 |
+
* @psalm-return array<string, string>
|
135 |
+
*/
|
136 |
public function getFallbackDirs()
|
137 |
{
|
138 |
return $this->fallbackDirsPsr0;
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* @return array[]
|
143 |
+
* @psalm-return array<string, string>
|
144 |
+
*/
|
145 |
public function getFallbackDirsPsr4()
|
146 |
{
|
147 |
return $this->fallbackDirsPsr4;
|
148 |
}
|
149 |
|
150 |
+
/**
|
151 |
+
* @return string[] Array of classname => path
|
152 |
+
* @psalm-var array<string, string>
|
153 |
+
*/
|
154 |
public function getClassMap()
|
155 |
{
|
156 |
return $this->classMap;
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
+
* @param string[] $classMap Class to filename map
|
161 |
+
* @psalm-param array<string, string> $classMap
|
162 |
+
*
|
163 |
+
* @return void
|
164 |
*/
|
165 |
public function addClassMap(array $classMap)
|
166 |
{
|
175 |
* Registers a set of PSR-0 directories for a given prefix, either
|
176 |
* appending or prepending to the ones previously set for this prefix.
|
177 |
*
|
178 |
+
* @param string $prefix The prefix
|
179 |
+
* @param string[]|string $paths The PSR-0 root directories
|
180 |
+
* @param bool $prepend Whether to prepend the directories
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
*/
|
184 |
public function add($prefix, $paths, $prepend = false)
|
185 |
{
|
222 |
* Registers a set of PSR-4 directories for a given namespace, either
|
223 |
* appending or prepending to the ones previously set for this namespace.
|
224 |
*
|
225 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
226 |
+
* @param string[]|string $paths The PSR-4 base directories
|
227 |
+
* @param bool $prepend Whether to prepend the directories
|
228 |
*
|
229 |
* @throws \InvalidArgumentException
|
230 |
+
*
|
231 |
+
* @return void
|
232 |
*/
|
233 |
public function addPsr4($prefix, $paths, $prepend = false)
|
234 |
{
|
272 |
* Registers a set of PSR-0 directories for a given prefix,
|
273 |
* replacing any others previously set for this prefix.
|
274 |
*
|
275 |
+
* @param string $prefix The prefix
|
276 |
+
* @param string[]|string $paths The PSR-0 base directories
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
*/
|
280 |
public function set($prefix, $paths)
|
281 |
{
|
290 |
* Registers a set of PSR-4 directories for a given namespace,
|
291 |
* replacing any others previously set for this namespace.
|
292 |
*
|
293 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
294 |
+
* @param string[]|string $paths The PSR-4 base directories
|
295 |
*
|
296 |
* @throws \InvalidArgumentException
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
*/
|
300 |
public function setPsr4($prefix, $paths)
|
301 |
{
|
315 |
* Turns on searching the include path for class files.
|
316 |
*
|
317 |
* @param bool $useIncludePath
|
318 |
+
*
|
319 |
+
* @return void
|
320 |
*/
|
321 |
public function setUseIncludePath($useIncludePath)
|
322 |
{
|
339 |
* that have not been registered with the class map.
|
340 |
*
|
341 |
* @param bool $classMapAuthoritative
|
342 |
+
*
|
343 |
+
* @return void
|
344 |
*/
|
345 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
346 |
{
|
361 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
362 |
*
|
363 |
* @param string|null $apcuPrefix
|
364 |
+
*
|
365 |
+
* @return void
|
366 |
*/
|
367 |
public function setApcuPrefix($apcuPrefix)
|
368 |
{
|
383 |
* Registers this instance as an autoloader.
|
384 |
*
|
385 |
* @param bool $prepend Whether to prepend the autoloader or not
|
386 |
+
*
|
387 |
+
* @return void
|
388 |
*/
|
389 |
public function register($prepend = false)
|
390 |
{
|
391 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
392 |
+
|
393 |
+
if (null === $this->vendorDir) {
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
if ($prepend) {
|
398 |
+
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
399 |
+
} else {
|
400 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
401 |
+
self::$registeredLoaders[$this->vendorDir] = $this;
|
402 |
+
}
|
403 |
}
|
404 |
|
405 |
/**
|
406 |
* Unregisters this instance as an autoloader.
|
407 |
+
*
|
408 |
+
* @return void
|
409 |
*/
|
410 |
public function unregister()
|
411 |
{
|
412 |
spl_autoload_unregister(array($this, 'loadClass'));
|
413 |
+
|
414 |
+
if (null !== $this->vendorDir) {
|
415 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
416 |
+
}
|
417 |
}
|
418 |
|
419 |
/**
|
420 |
* Loads the given class or interface.
|
421 |
*
|
422 |
* @param string $class The name of the class
|
423 |
+
* @return true|null True if loaded, null otherwise
|
424 |
*/
|
425 |
public function loadClass($class)
|
426 |
{
|
429 |
|
430 |
return true;
|
431 |
}
|
432 |
+
|
433 |
+
return null;
|
434 |
}
|
435 |
|
436 |
/**
|
475 |
return $file;
|
476 |
}
|
477 |
|
478 |
+
/**
|
479 |
+
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
480 |
+
*
|
481 |
+
* @return self[]
|
482 |
+
*/
|
483 |
+
public static function getRegisteredLoaders()
|
484 |
+
{
|
485 |
+
return self::$registeredLoaders;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* @param string $class
|
490 |
+
* @param string $ext
|
491 |
+
* @return string|false
|
492 |
+
*/
|
493 |
private function findFileWithExtension($class, $ext)
|
494 |
{
|
495 |
// PSR-4 lookup
|
561 |
* Scope isolated include.
|
562 |
*
|
563 |
* Prevents access to $this/self from included files.
|
564 |
+
*
|
565 |
+
* @param string $file
|
566 |
+
* @return void
|
567 |
+
* @private
|
568 |
*/
|
569 |
function includeFile($file)
|
570 |
{
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -1,209 +1,337 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
namespace Composer;
|
4 |
|
|
|
5 |
use Composer\Semver\VersionParser;
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
12 |
class InstalledVersions
|
13 |
{
|
14 |
-
private static $installed
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
public static function
|
46 |
-
{
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
if (
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
return
|
131 |
-
}
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
if (!isset(
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
public static function
|
183 |
-
{
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
{
|
207 |
-
|
208 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
namespace Composer;
|
14 |
|
15 |
+
use Composer\Autoload\ClassLoader;
|
16 |
use Composer\Semver\VersionParser;
|
17 |
|
18 |
+
/**
|
19 |
+
* This class is copied in every Composer installed project and available to all
|
20 |
+
*
|
21 |
+
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
+
*
|
23 |
+
* To require its presence, you can require `composer-runtime-api ^2.0`
|
24 |
+
*/
|
25 |
class InstalledVersions
|
26 |
{
|
27 |
+
private static $installed;
|
28 |
+
private static $canGetVendors;
|
29 |
+
private static $installedByVendor = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
33 |
+
*
|
34 |
+
* @return string[]
|
35 |
+
* @psalm-return list<string>
|
36 |
+
*/
|
37 |
+
public static function getInstalledPackages()
|
38 |
+
{
|
39 |
+
$packages = array();
|
40 |
+
foreach (self::getInstalled() as $installed) {
|
41 |
+
$packages[] = array_keys($installed['versions']);
|
42 |
+
}
|
43 |
+
|
44 |
+
if (1 === \count($packages)) {
|
45 |
+
return $packages[0];
|
46 |
+
}
|
47 |
+
|
48 |
+
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Returns a list of all package names with a specific type e.g. 'library'
|
53 |
+
*
|
54 |
+
* @param string $type
|
55 |
+
* @return string[]
|
56 |
+
* @psalm-return list<string>
|
57 |
+
*/
|
58 |
+
public static function getInstalledPackagesByType($type)
|
59 |
+
{
|
60 |
+
$packagesByType = array();
|
61 |
+
|
62 |
+
foreach (self::getInstalled() as $installed) {
|
63 |
+
foreach ($installed['versions'] as $name => $package) {
|
64 |
+
if (isset($package['type']) && $package['type'] === $type) {
|
65 |
+
$packagesByType[] = $name;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
return $packagesByType;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Checks whether the given package is installed
|
75 |
+
*
|
76 |
+
* This also returns true if the package name is provided or replaced by another package
|
77 |
+
*
|
78 |
+
* @param string $packageName
|
79 |
+
* @param bool $includeDevRequirements
|
80 |
+
* @return bool
|
81 |
+
*/
|
82 |
+
public static function isInstalled($packageName, $includeDevRequirements = true)
|
83 |
+
{
|
84 |
+
foreach (self::getInstalled() as $installed) {
|
85 |
+
if (isset($installed['versions'][$packageName])) {
|
86 |
+
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
return false;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Checks whether the given package satisfies a version constraint
|
95 |
+
*
|
96 |
+
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
97 |
+
*
|
98 |
+
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
99 |
+
*
|
100 |
+
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
101 |
+
* @param string $packageName
|
102 |
+
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
103 |
+
* @return bool
|
104 |
+
*/
|
105 |
+
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
106 |
+
{
|
107 |
+
$constraint = $parser->parseConstraints($constraint);
|
108 |
+
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
109 |
+
|
110 |
+
return $provided->matches($constraint);
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Returns a version constraint representing all the range(s) which are installed for a given package
|
115 |
+
*
|
116 |
+
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
117 |
+
* whether a given version of a package is installed, and not just whether it exists
|
118 |
+
*
|
119 |
+
* @param string $packageName
|
120 |
+
* @return string Version constraint usable with composer/semver
|
121 |
+
*/
|
122 |
+
public static function getVersionRanges($packageName)
|
123 |
+
{
|
124 |
+
foreach (self::getInstalled() as $installed) {
|
125 |
+
if (!isset($installed['versions'][$packageName])) {
|
126 |
+
continue;
|
127 |
+
}
|
128 |
+
|
129 |
+
$ranges = array();
|
130 |
+
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
131 |
+
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
132 |
+
}
|
133 |
+
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
134 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
135 |
+
}
|
136 |
+
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
137 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
138 |
+
}
|
139 |
+
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
140 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
141 |
+
}
|
142 |
+
|
143 |
+
return implode(' || ', $ranges);
|
144 |
+
}
|
145 |
+
|
146 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* @param string $packageName
|
151 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
152 |
+
*/
|
153 |
+
public static function getVersion($packageName)
|
154 |
+
{
|
155 |
+
foreach (self::getInstalled() as $installed) {
|
156 |
+
if (!isset($installed['versions'][$packageName])) {
|
157 |
+
continue;
|
158 |
+
}
|
159 |
+
|
160 |
+
if (!isset($installed['versions'][$packageName]['version'])) {
|
161 |
+
return null;
|
162 |
+
}
|
163 |
+
|
164 |
+
return $installed['versions'][$packageName]['version'];
|
165 |
+
}
|
166 |
+
|
167 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* @param string $packageName
|
172 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
173 |
+
*/
|
174 |
+
public static function getPrettyVersion($packageName)
|
175 |
+
{
|
176 |
+
foreach (self::getInstalled() as $installed) {
|
177 |
+
if (!isset($installed['versions'][$packageName])) {
|
178 |
+
continue;
|
179 |
+
}
|
180 |
+
|
181 |
+
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
182 |
+
return null;
|
183 |
+
}
|
184 |
+
|
185 |
+
return $installed['versions'][$packageName]['pretty_version'];
|
186 |
+
}
|
187 |
+
|
188 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* @param string $packageName
|
193 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
194 |
+
*/
|
195 |
+
public static function getReference($packageName)
|
196 |
+
{
|
197 |
+
foreach (self::getInstalled() as $installed) {
|
198 |
+
if (!isset($installed['versions'][$packageName])) {
|
199 |
+
continue;
|
200 |
+
}
|
201 |
+
|
202 |
+
if (!isset($installed['versions'][$packageName]['reference'])) {
|
203 |
+
return null;
|
204 |
+
}
|
205 |
+
|
206 |
+
return $installed['versions'][$packageName]['reference'];
|
207 |
+
}
|
208 |
+
|
209 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* @param string $packageName
|
214 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
215 |
+
*/
|
216 |
+
public static function getInstallPath($packageName)
|
217 |
+
{
|
218 |
+
foreach (self::getInstalled() as $installed) {
|
219 |
+
if (!isset($installed['versions'][$packageName])) {
|
220 |
+
continue;
|
221 |
+
}
|
222 |
+
|
223 |
+
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
224 |
+
}
|
225 |
+
|
226 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* @return array
|
231 |
+
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
232 |
+
*/
|
233 |
+
public static function getRootPackage()
|
234 |
+
{
|
235 |
+
$installed = self::getInstalled();
|
236 |
+
|
237 |
+
return $installed[0]['root'];
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Returns the raw installed.php data for custom implementations
|
242 |
+
*
|
243 |
+
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
244 |
+
* @return array[]
|
245 |
+
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
246 |
+
*/
|
247 |
+
public static function getRawData()
|
248 |
+
{
|
249 |
+
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
250 |
+
|
251 |
+
if (null === self::$installed) {
|
252 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
253 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
254 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
255 |
+
self::$installed = include __DIR__ . '/installed.php';
|
256 |
+
} else {
|
257 |
+
self::$installed = array();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
return self::$installed;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
266 |
+
*
|
267 |
+
* @return array[]
|
268 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
269 |
+
*/
|
270 |
+
public static function getAllRawData()
|
271 |
+
{
|
272 |
+
return self::getInstalled();
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Lets you reload the static array from another file
|
277 |
+
*
|
278 |
+
* This is only useful for complex integrations in which a project needs to use
|
279 |
+
* this class but then also needs to execute another project's autoloader in process,
|
280 |
+
* and wants to ensure both projects have access to their version of installed.php.
|
281 |
+
*
|
282 |
+
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
283 |
+
* the data it needs from this class, then call reload() with
|
284 |
+
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
285 |
+
* the project in which it runs can then also use this class safely, without
|
286 |
+
* interference between PHPUnit's dependencies and the project's dependencies.
|
287 |
+
*
|
288 |
+
* @param array[] $data A vendor/composer/installed.php data set
|
289 |
+
* @return void
|
290 |
+
*
|
291 |
+
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
292 |
+
*/
|
293 |
+
public static function reload($data)
|
294 |
+
{
|
295 |
+
self::$installed = $data;
|
296 |
+
self::$installedByVendor = array();
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* @return array[]
|
301 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
302 |
+
*/
|
303 |
+
private static function getInstalled()
|
304 |
+
{
|
305 |
+
if (null === self::$canGetVendors) {
|
306 |
+
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
307 |
+
}
|
308 |
+
|
309 |
+
$installed = array();
|
310 |
+
|
311 |
+
if (self::$canGetVendors) {
|
312 |
+
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
313 |
+
if (isset(self::$installedByVendor[$vendorDir])) {
|
314 |
+
$installed[] = self::$installedByVendor[$vendorDir];
|
315 |
+
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
316 |
+
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
317 |
+
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
318 |
+
self::$installed = $installed[count($installed) - 1];
|
319 |
+
}
|
320 |
+
}
|
321 |
+
}
|
322 |
+
}
|
323 |
+
|
324 |
+
if (null === self::$installed) {
|
325 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
326 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
327 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
328 |
+
self::$installed = require __DIR__ . '/installed.php';
|
329 |
+
} else {
|
330 |
+
self::$installed = array();
|
331 |
+
}
|
332 |
+
}
|
333 |
+
$installed[] = self::$installed;
|
334 |
+
|
335 |
+
return $installed;
|
336 |
+
}
|
337 |
}
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit765647f7aee7e9065fbac560f20a7f60
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
-
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit9aeb1bdd6a316a877f765f7ad7070604
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit9aeb1bdd6a316a877f765f7ad7070604', 'loadClassLoader'), true, true);
|
26 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit9aeb1bdd6a316a877f765f7ad7070604', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit9aeb1bdd6a316a877f765f7ad7070604::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'D' =>
|
@@ -27,9 +27,9 @@ class ComposerStaticInit765647f7aee7e9065fbac560f20a7f60
|
|
27 |
public static function getInitializer(ClassLoader $loader)
|
28 |
{
|
29 |
return \Closure::bind(function () use ($loader) {
|
30 |
-
$loader->prefixLengthsPsr4 =
|
31 |
-
$loader->prefixDirsPsr4 =
|
32 |
-
$loader->classMap =
|
33 |
|
34 |
}, null, ClassLoader::class);
|
35 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit9aeb1bdd6a316a877f765f7ad7070604
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'D' =>
|
27 |
public static function getInitializer(ClassLoader $loader)
|
28 |
{
|
29 |
return \Closure::bind(function () use ($loader) {
|
30 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit9aeb1bdd6a316a877f765f7ad7070604::$prefixLengthsPsr4;
|
31 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit9aeb1bdd6a316a877f765f7ad7070604::$prefixDirsPsr4;
|
32 |
+
$loader->classMap = ComposerStaticInit9aeb1bdd6a316a877f765f7ad7070604::$classMap;
|
33 |
|
34 |
}, null, ClassLoader::class);
|
35 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,24 +1,23 @@
|
|
1 |
-
<?php return array
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
8 |
),
|
9 |
-
'
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
array (
|
20 |
-
),
|
21 |
-
'reference' => '788a635bbcc44531640bd5c2fbff4002a09e0282',
|
22 |
),
|
23 |
-
),
|
24 |
);
|
1 |
+
<?php return array(
|
2 |
+
'root' => array(
|
3 |
+
'pretty_version' => '1.0.0+no-version-set',
|
4 |
+
'version' => '1.0.0.0',
|
5 |
+
'type' => 'library',
|
6 |
+
'install_path' => __DIR__ . '/../../',
|
7 |
+
'aliases' => array(),
|
8 |
+
'reference' => NULL,
|
9 |
+
'name' => 'dgora/ajax-search-for-woocommerce',
|
10 |
+
'dev' => false,
|
11 |
),
|
12 |
+
'versions' => array(
|
13 |
+
'dgora/ajax-search-for-woocommerce' => array(
|
14 |
+
'pretty_version' => '1.0.0+no-version-set',
|
15 |
+
'version' => '1.0.0.0',
|
16 |
+
'type' => 'library',
|
17 |
+
'install_path' => __DIR__ . '/../../',
|
18 |
+
'aliases' => array(),
|
19 |
+
'reference' => NULL,
|
20 |
+
'dev_requirement' => false,
|
21 |
+
),
|
|
|
|
|
|
|
22 |
),
|
|
|
23 |
);
|
widget.php
CHANGED
@@ -34,12 +34,18 @@ if ( class_exists( 'WC_Widget' ) ) {
|
|
34 |
'type' => 'select',
|
35 |
'std' => 'default',
|
36 |
'options' => array(
|
37 |
-
'default'
|
38 |
-
'classic'
|
39 |
-
'icon'
|
40 |
-
'icon-flexible'
|
|
|
41 |
),
|
42 |
'label' => __( 'Layout', 'ajax-search-for-woocommerce' )
|
|
|
|
|
|
|
|
|
|
|
43 |
)
|
44 |
);
|
45 |
|
@@ -56,13 +62,20 @@ if ( class_exists( 'WC_Widget' ) ) {
|
|
56 |
public function widget( $args, $instance ) {
|
57 |
|
58 |
$this->widget_start( $args, $instance );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
|
61 |
-
if ( ! empty( $instance['
|
62 |
-
$
|
63 |
}
|
64 |
|
65 |
-
echo do_shortcode( '[
|
66 |
|
67 |
$this->widget_end( $args );
|
68 |
}
|
34 |
'type' => 'select',
|
35 |
'std' => 'default',
|
36 |
'options' => array(
|
37 |
+
'default' => __( 'Default', 'ajax-search-for-woocommerce' ),
|
38 |
+
'classic' => __( 'Search bar', 'ajax-search-for-woocommerce' ),
|
39 |
+
'icon' => __( 'Search icon', 'ajax-search-for-woocommerce' ),
|
40 |
+
'icon-flexible' => __( 'Icon on mobile, search bar on desktop', 'ajax-search-for-woocommerce' ),
|
41 |
+
'icon-flexible-inv' => __( 'Icon on desktop, search bar on mobile', 'ajax-search-for-woocommerce' ),
|
42 |
),
|
43 |
'label' => __( 'Layout', 'ajax-search-for-woocommerce' )
|
44 |
+
),
|
45 |
+
'mobile_overlay' => array(
|
46 |
+
'type' => 'checkbox',
|
47 |
+
'std' => '',
|
48 |
+
'label' => __( 'Overlay on mobile', 'ajax-search-for-woocommerce' )
|
49 |
)
|
50 |
);
|
51 |
|
62 |
public function widget( $args, $instance ) {
|
63 |
|
64 |
$this->widget_start( $args, $instance );
|
65 |
+
$params = '';
|
66 |
+
|
67 |
+
// Layout
|
68 |
+
|
69 |
+
if ( ! empty( $instance['layout'] ) && in_array( $instance['layout'], array( 'classic', 'icon', 'icon-flexible', 'icon-flexible-inv' ) ) ) {
|
70 |
+
$params .= ' layout="' . $instance['layout'] . '"';
|
71 |
+
}
|
72 |
|
73 |
+
// Overlay on mobile
|
74 |
+
if ( ! empty( $instance['mobile_overlay'] ) && $instance['mobile_overlay'] === 'on') {
|
75 |
+
$params .= ' mobile_overlay="1"';
|
76 |
}
|
77 |
|
78 |
+
echo do_shortcode( '[fibosearch' . $params . ']' );
|
79 |
|
80 |
$this->widget_end( $args );
|
81 |
}
|