Ajax Search for WooCommerce - Version 1.6.2

Version Description

Download this release

Release Info

Developer damian-gora
Plugin Icon 128x128 Ajax Search for WooCommerce
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

.gitignore DELETED
@@ -1,25 +0,0 @@
1
- .idea/*
2
- vendor-pro/teamtnt/tntsearch/tests/
3
- vendor-pro/teamtnt/tntsearch/.travis.yml
4
- vendor-pro/teamtnt/tntsearch/CHANGELOG.md
5
- vendor-pro/teamtnt/tntsearch/.gitignore
6
- vendor-pro/teamtnt/tntsearch/composer.json
7
- vendor-pro/teamtnt/tntsearch/CONDUCT.md
8
- vendor-pro/teamtnt/tntsearch/CONTRIBUTING.md
9
- vendor-pro/teamtnt/tntsearch/LICENSE.md
10
- vendor-pro/teamtnt/tntsearch/phpunit.php
11
- vendor-pro/teamtnt/tntsearch/README.md
12
- vendor-pro/teamtnt/tntsearch/phpunit.xml
13
- vendor-pro/teamtnt/tntsearch/CODE_OF_CONDUCT.md
14
- vendor-pro/damian-gora/tntsearch/tests/
15
- vendor-pro/damian-gora/tntsearch/.travis.yml
16
- vendor-pro/damian-gora/tntsearch/CHANGELOG.md
17
- vendor-pro/damian-gora/tntsearch/.gitignore
18
- vendor-pro/damian-gora/tntsearch/composer.json
19
- vendor-pro/damian-gora/tntsearch/CONDUCT.md
20
- vendor-pro/damian-gora/tntsearch/CONTRIBUTING.md
21
- vendor-pro/damian-gora/tntsearch/LICENSE.md
22
- vendor-pro/damian-gora/tntsearch/phpunit.php
23
- vendor-pro/damian-gora/tntsearch/README.md
24
- vendor-pro/damian-gora/tntsearch/phpunit.xml
25
- vendor-pro/damian-gora/tntsearch/CODE_OF_CONDUCT.md
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ajax-search-for-woocommerce.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: AJAX Search for WooCommerce
5
  * Plugin URI: https://ajaxsearch.pro?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.6.1
8
  * Author: Damian Góra
9
  * Author URI: https://ajaxsearch.pro?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
@@ -70,6 +70,7 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
70
  self::$instance->themeCompatibility = new \DgoraWcas\Integrations\Themes\ThemesCompatibility();
71
  new \DgoraWcas\Integrations\Plugins\PluginsCompatibility();
72
  self::$instance->brands = new \DgoraWcas\Integrations\Brands();
 
73
  \DgoraWcas\Shortcode::register();
74
 
75
  if ( is_admin() ) {
@@ -78,6 +79,8 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
78
  new \DgoraWcas\Admin\Promo\FeedbackNotice();
79
  new \DgoraWcas\Admin\Promo\Upgrade();
80
  new \DgoraWcas\Admin\Requirements();
 
 
81
  }
82
 
83
  new \DgoraWcas\Conflicts\Solver();
@@ -296,6 +299,11 @@ if ( !class_exists( 'DGWT_WC_Ajax_Search' ) && !function_exists( 'dgoraAsfwFs' )
296
  );
297
 
298
  if ( \DgoraWcas\Helpers::isSettingsPage() ) {
 
 
 
 
 
299
  // Enqueue CSS
300
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
301
  wp_enqueue_style( 'wp-color-picker' );
4
  * Plugin Name: AJAX Search for WooCommerce
5
  * Plugin URI: https://ajaxsearch.pro?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.6.2
8
  * Author: Damian Góra
9
  * Author URI: https://ajaxsearch.pro?utm_source=wp-admin&utm_medium=referral&utm_campaign=author_uri&utm_gen=utmdc
10
  * Text Domain: ajax-search-for-woocommerce
70
  self::$instance->themeCompatibility = new \DgoraWcas\Integrations\Themes\ThemesCompatibility();
71
  new \DgoraWcas\Integrations\Plugins\PluginsCompatibility();
72
  self::$instance->brands = new \DgoraWcas\Integrations\Brands();
73
+ self::$instance->brands->init();
74
  \DgoraWcas\Shortcode::register();
75
 
76
  if ( is_admin() ) {
79
  new \DgoraWcas\Admin\Promo\FeedbackNotice();
80
  new \DgoraWcas\Admin\Promo\Upgrade();
81
  new \DgoraWcas\Admin\Requirements();
82
+ $regenerateImages = new \DgoraWcas\Admin\RegenerateImages();
83
+ $regenerateImages->init();
84
  }
85
 
86
  new \DgoraWcas\Conflicts\Solver();
299
  );
300
 
301
  if ( \DgoraWcas\Helpers::isSettingsPage() ) {
302
+ $localize = array(
303
+ 'labels' => \DgoraWcas\Helpers::getLabels(),
304
+ );
305
+ $localize = apply_filters( 'dgwt/wcas/scripts/admin/localize', $localize );
306
+ wp_localize_script( 'dgwt-wcas-admin-js', 'dgwt_wcas', $localize );
307
  // Enqueue CSS
308
  wp_enqueue_style( 'dgwt-wcas-admin-style' );
309
  wp_enqueue_style( 'wp-color-picker' );
assets/css/admin-style.css CHANGED
@@ -12,8 +12,9 @@
12
  }
13
 
14
  .dgwt-wcas-only-desc > td {
15
- min-width: 600px
16
  }
 
17
  @media only screen and (max-width: 700px) {
18
  .dgwt-wcas-only-desc > td {
19
  min-width: 320px;
@@ -29,6 +30,7 @@
29
  .dgwt-wcas-settings table {
30
  border-collapse: collapse;
31
  }
 
32
  .dgwt-wcas-settings > .notice:not(.dgwt-wcas-notice),
33
  .dgwt-wcas-settings > .error:not(.dgwt-wcas-notice),
34
  .dgwt-wcas-settings > .info:not(.dgwt-wcas-notice),
@@ -106,7 +108,7 @@
106
  display: none;
107
  }
108
 
109
- #dgwt_wcas_basic .dgwt-wcas-settings-info li{
110
  margin-bottom: 10px;
111
  }
112
 
@@ -158,11 +160,13 @@
158
  cursor: pointer;
159
  transition: 0.2s;
160
  }
 
161
  .dgwt-wcas-settings__logo {
162
  margin-right: 5px;
163
  padding-top: 11px;
164
  height: 34px;
165
  }
 
166
  .dgwt-wcas-settings__title {
167
  line-height: 50px;
168
  }
@@ -238,6 +242,11 @@
238
  color: #bbb;
239
  }
240
 
 
 
 
 
 
241
  .dgwt-wcas-admin-head h1 {
242
  display: inline-block;
243
  margin: 0 20px 0 0;
@@ -297,6 +306,24 @@
297
  align-items: center;
298
  }
299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  .dgwt-wcas-bc-notice .dgwt-wcas-container {
301
  justify-content: left;
302
  }
@@ -1099,7 +1126,7 @@ td.dgwt-wcas-indexing-details-row a {
1099
 
1100
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-suggestions-wrapp,
1101
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-details-wrapp {
1102
- display: none!important;
1103
  }
1104
 
1105
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-preview-subheader__ac {
@@ -1116,12 +1143,12 @@ td.dgwt-wcas-indexing-details-row a {
1116
  }
1117
 
1118
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-search-wrapp,
1119
- .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-suggestions-wrapp{
1120
  margin: 0;
1121
  }
1122
 
1123
  .dgwt-wcas-hide {
1124
- display: none!important;
1125
  }
1126
 
1127
  .dgwt-wcas-autocomplete {
@@ -1133,10 +1160,12 @@ td.dgwt-wcas-indexing-details-row a {
1133
  margin: 0 auto;
1134
  padding: 20px 40px;
1135
  }
 
1136
  .dgwt-wcas-search-wrapp,
1137
  .dgwt-wcas-autocomplete {
1138
  pointer-events: none;
1139
  }
 
1140
  .dgwt-wcas-click-alert {
1141
  position: absolute;
1142
  z-index: 9999;
@@ -1148,6 +1177,7 @@ td.dgwt-wcas-indexing-details-row a {
1148
  padding: 4px 12px;
1149
  border-radius: 6px;
1150
  }
 
1151
  .dgwt-wcas-preview-source-no-click {
1152
  opacity: 0.5;
1153
  }
@@ -1176,9 +1206,9 @@ td.dgwt-wcas-indexing-details-row a {
1176
  }
1177
 
1178
  .dgwt-wcas-preview-nores {
1179
- width: 100%!important;;
1180
- max-height: 41px!important;
1181
- min-height: 0!important;;
1182
  }
1183
 
1184
  .dgwt-wcas-pd-addtc .input-text.qty {
@@ -1191,12 +1221,14 @@ td.dgwt-wcas-indexing-details-row a {
1191
  min-width: 320px;
1192
  max-width: none;
1193
  }
 
1194
  [data-dgwt-wcas-active="form_body"] .dgwt-wcas-sgs-header label,
1195
  [data-dgwt-wcas-active="autocomplete"] .dgwt-wcas-sgs-header label {
1196
  width: 100%;
1197
  }
 
1198
  .dgwt-wcas-preview {
1199
- display: none!important;
1200
  }
1201
  }
1202
 
@@ -1353,14 +1385,17 @@ td.dgwt-wcas-indexing-details-row a {
1353
  .dgwt-wcas-sgs-themes-label label {
1354
  cursor: default;
1355
  }
1356
- .dgwt-wcas-sgs-themes-label label img{
 
1357
  display: block;
1358
  max-width: 130px;
1359
  height: auto;;
1360
  }
 
1361
  .dgwt-wcas-sgs-themes-label h2 {
1362
  color: #777;
1363
  }
 
1364
  .dgwt-wcas-sgs-themes-label h2 b {
1365
  color: #000;
1366
  }
12
  }
13
 
14
  .dgwt-wcas-only-desc > td {
15
+ min-width: 600px
16
  }
17
+
18
  @media only screen and (max-width: 700px) {
19
  .dgwt-wcas-only-desc > td {
20
  min-width: 320px;
30
  .dgwt-wcas-settings table {
31
  border-collapse: collapse;
32
  }
33
+
34
  .dgwt-wcas-settings > .notice:not(.dgwt-wcas-notice),
35
  .dgwt-wcas-settings > .error:not(.dgwt-wcas-notice),
36
  .dgwt-wcas-settings > .info:not(.dgwt-wcas-notice),
108
  display: none;
109
  }
110
 
111
+ #dgwt_wcas_basic .dgwt-wcas-settings-info li {
112
  margin-bottom: 10px;
113
  }
114
 
160
  cursor: pointer;
161
  transition: 0.2s;
162
  }
163
+
164
  .dgwt-wcas-settings__logo {
165
  margin-right: 5px;
166
  padding-top: 11px;
167
  height: 34px;
168
  }
169
+
170
  .dgwt-wcas-settings__title {
171
  line-height: 50px;
172
  }
242
  color: #bbb;
243
  }
244
 
245
+ .dgwt-wcas-settings-synonyms textarea.regular-text {
246
+ min-height: 200px;
247
+ width: 35em;
248
+ }
249
+
250
  .dgwt-wcas-admin-head h1 {
251
  display: inline-block;
252
  margin: 0 20px 0 0;
306
  align-items: center;
307
  }
308
 
309
+ .dgwt_wcas_settings-group > table > tbody > tr.dgwt-wcas-settings-synonyms > td {
310
+ display: block;
311
+ }
312
+
313
+ .dgwt_wcas_settings-group > table > tbody > tr.dgwt-wcas-settings-synonyms > td p.dgwt_wcas_settings-description-field {
314
+ margin: 10px 0 0 0;
315
+ display: block;
316
+ }
317
+ .dgwt-wcas-synonyms-sample {
318
+ font-family: monospace;
319
+ background: #fff;
320
+ border: 1px solid #ddd;
321
+ padding: 10px;
322
+ font-size: 13px;
323
+ display: inline-block;
324
+ line-height: 157%;
325
+ }
326
+
327
  .dgwt-wcas-bc-notice .dgwt-wcas-container {
328
  justify-content: left;
329
  }
1126
 
1127
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-suggestions-wrapp,
1128
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-details-wrapp {
1129
+ display: none !important;
1130
  }
1131
 
1132
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="form_body"] .dgwt-wcas-preview-subheader__ac {
1143
  }
1144
 
1145
  .dgwt-wcas-settings-body[data-dgwt-wcas-active="autocomplete"] .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-search-wrapp,
1146
+ .dgwt-wcas-is-details .dgwt-wcas-preview-source .dgwt-wcas-suggestions-wrapp {
1147
  margin: 0;
1148
  }
1149
 
1150
  .dgwt-wcas-hide {
1151
+ display: none !important;
1152
  }
1153
 
1154
  .dgwt-wcas-autocomplete {
1160
  margin: 0 auto;
1161
  padding: 20px 40px;
1162
  }
1163
+
1164
  .dgwt-wcas-search-wrapp,
1165
  .dgwt-wcas-autocomplete {
1166
  pointer-events: none;
1167
  }
1168
+
1169
  .dgwt-wcas-click-alert {
1170
  position: absolute;
1171
  z-index: 9999;
1177
  padding: 4px 12px;
1178
  border-radius: 6px;
1179
  }
1180
+
1181
  .dgwt-wcas-preview-source-no-click {
1182
  opacity: 0.5;
1183
  }
1206
  }
1207
 
1208
  .dgwt-wcas-preview-nores {
1209
+ width: 100% !important;;
1210
+ max-height: 41px !important;
1211
+ min-height: 0 !important;;
1212
  }
1213
 
1214
  .dgwt-wcas-pd-addtc .input-text.qty {
1221
  min-width: 320px;
1222
  max-width: none;
1223
  }
1224
+
1225
  [data-dgwt-wcas-active="form_body"] .dgwt-wcas-sgs-header label,
1226
  [data-dgwt-wcas-active="autocomplete"] .dgwt-wcas-sgs-header label {
1227
  width: 100%;
1228
  }
1229
+
1230
  .dgwt-wcas-preview {
1231
+ display: none !important;
1232
  }
1233
  }
1234
 
1385
  .dgwt-wcas-sgs-themes-label label {
1386
  cursor: default;
1387
  }
1388
+
1389
+ .dgwt-wcas-sgs-themes-label label img {
1390
  display: block;
1391
  max-width: 130px;
1392
  height: auto;;
1393
  }
1394
+
1395
  .dgwt-wcas-sgs-themes-label h2 {
1396
  color: #777;
1397
  }
1398
+
1399
  .dgwt-wcas-sgs-themes-label h2 b {
1400
  color: #000;
1401
  }
assets/css/style.css CHANGED
@@ -1,1172 +1,1276 @@
1
- .dgwt-wcas-block-scroll {
2
- overflow: hidden;
3
- }
4
-
5
- .dgwt-wcas-search-wrapp {
6
- position: relative;
7
- display: block;
8
- color: #444;
9
- min-width: 230px;
10
- width: 100%;
11
- text-align: left;
12
- margin: 0 auto;
13
- -webkit-box-sizing: border-box;
14
- -moz-box-sizing: border-box;
15
- box-sizing: border-box;
16
- }
17
-
18
- .dgwt-wcas-search-wrapp .product-title {
19
- color: #333;
20
- display: block;
21
- line-height: 110%;
22
- margin: 0;
23
- }
24
-
25
- .dgwt-wcas-tpd-image img {
26
- margin: 0 15px 0 0 !important;
27
- display: block;
28
- }
29
-
30
- .rtl .dgwt-wcas-tpd-image img {
31
- margin: 0 0 0 15px !important;
32
- }
33
-
34
- .dgwt-wcas-preloader-wrapp img {
35
- margin: 10px auto 0 auto;
36
- display: block;
37
- max-width: 200px;
38
- }
39
-
40
- .dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader {
41
- display: block;
42
- width: 100%;
43
- height: auto;
44
- max-width: 300px;
45
- margin: 0;
46
- }
47
-
48
- .dgwt-wcas-suggestions-wrapp {
49
- background: #fff none repeat scroll 0 0;
50
- border: 1px solid #ddd;
51
- border-top: none;
52
- padding: 0;
53
- -webkit-box-sizing: border-box;
54
- -moz-box-sizing: border-box;
55
- box-sizing: border-box;
56
- overflow-y: auto;
57
- }
58
-
59
- .dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top {
60
- border: 1px solid #ddd;
61
- border-bottom: none;
62
- }
63
-
64
- .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
65
- max-width: 550px;
66
- }
67
-
68
- .dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion {
69
- padding: 8px 15px;
70
- }
71
-
72
- .dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp {
73
- border-radius: 0 0 5px 0;
74
- border-left-color: #eee;
75
- }
76
-
77
- .dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp {
78
- border-radius: 0 0 0 5px;
79
- border-right-color: #eee;
80
- }
81
-
82
- .dgwt-wcas-suggestion {
83
- cursor: pointer;
84
- font-size: 12px;
85
- line-height: 110%;
86
- text-align: left;
87
- padding: 7px 10px;
88
- position: relative;
89
- border-bottom: 1px solid #dfdfdf;
90
- display: flex;
91
- flex-direction: row;
92
- justify-content: space-between;
93
- align-items: center;
94
- resize: vertical;
95
- }
96
-
97
- .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
98
- justify-content: center;
99
- }
100
-
101
- .dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom {
102
- border-bottom: none;
103
- }
104
-
105
- .dgwt-wcas-suggestion:after {
106
- clear: both;
107
- display: block;
108
- content: '';
109
- }
110
-
111
- .dgwt-wcas-suggestion.dgwt-wcas-nores {
112
- cursor: default;
113
- opacity: 0.5;
114
- }
115
-
116
- .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
117
- padding-top: 8px;
118
- padding-bottom: 8px;
119
- min-height: 60px;
120
- }
121
-
122
- .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,
123
- .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
124
- min-height: 30px;
125
- text-transform: uppercase;
126
- }
127
-
128
- .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
129
- padding: 0 10px;
130
- text-align: center;
131
- }
132
-
133
- .dgwt-wcas-st {
134
- display: block;
135
- color: #444;
136
- font-size: 15px;
137
- width: 100%;
138
- line-height: 110%;
139
- }
140
-
141
- .dgwt-wcas-st > span {
142
- display: inline-block;
143
- vertical-align: middle;
144
- }
145
-
146
- .dgwt-wcas-has-sku .dgwt-wcas-st-title {
147
- margin-right: 6px;
148
- }
149
-
150
- .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
151
- display: block;
152
- font-style: italic;
153
- font-size: 10px;
154
- text-transform: uppercase;
155
- opacity: 0.4;
156
- line-height: 10px;
157
- margin-bottom: 1px;
158
- letter-spacing: 2px;
159
- }
160
-
161
- .dgwt-wcas-st-breadcrumbs {
162
- overflow: hidden;
163
- text-overflow: ellipsis;
164
- white-space: nowrap;
165
- font-size: 80%;
166
- text-align: left;
167
- opacity: 0.6;
168
- width: 100%;
169
- padding-right: 10px;
170
- }
171
-
172
- .rtl .dgwt-wcas-st-breadcrumbs {
173
- padding-right: 0;
174
- padding-left: 10px;
175
- text-align: right;
176
- }
177
-
178
- .dgwt-wcas-sku {
179
- font-size: 80%;
180
- }
181
-
182
- .dgwt-wcas-si {
183
- width: 50px;
184
- display: block;
185
- height: 100%;
186
- }
187
-
188
- .dgwt-wcas-si img {
189
- background: #fff none repeat scroll 0 0;
190
- border: 1px solid #e8e8e8;
191
- border-radius: 3px;
192
- display: block;
193
- margin: auto;
194
- padding: 2px;
195
- height: auto;
196
- width: auto;
197
- max-height: 90%;
198
- max-width: 100%;
199
- }
200
-
201
- .dgwt-wcas-content-wrapp {
202
- display: flex;
203
- height: 100%;
204
- width: 100%;
205
- justify-content: space-between;
206
- align-items: center;
207
- resize: vertical;
208
- padding-left: 10px;
209
- }
210
-
211
- .rtl .dgwt-wcas-content-wrapp {
212
- padding-left: 0;
213
- padding-right: 10px;
214
- }
215
-
216
- .dgwt-wcas-sp {
217
- color: #555;
218
- font-size: 14px;
219
- line-height: 120%;
220
- text-align: right;
221
- line-height: 4px;
222
- padding-left: 10px;
223
- }
224
-
225
- .dgwt-wcas-sp * {
226
- line-height: 130%;
227
- }
228
-
229
- .dgwt-wcas-search-form {
230
- margin: 0;
231
- padding: 0;
232
- }
233
-
234
- .dgwt-wcas-sp del {
235
- opacity: 0.5;
236
- font-size: 12px;
237
- }
238
-
239
- .dgwt-wcas-sd {
240
- color: #777;
241
- display: block;
242
- line-height: 14px;
243
- width: 100%;
244
- margin-top: 5px;
245
- font-size: 0.8em;
246
- }
247
-
248
- .dgwt-wcas-suggestion-selected {
249
- background-color: #eeeeee;
250
- }
251
-
252
- .dgwt-wcas-suggestion-selected:first-child {
253
- border-top: none;
254
- }
255
-
256
- .rtl .dgwt-wcas-suggestion {
257
- padding-left: 0;
258
- padding-right: 15px;
259
- text-align: right;
260
- }
261
-
262
- .dgwt-wcas-details-wrapp {
263
- background: #fff none repeat scroll 0 0;
264
- border: 1px solid #ddd;
265
- border-top: none;
266
- border-left: none;
267
- padding: 0;
268
- width: 300px;
269
- -webkit-box-sizing: border-box;
270
- -moz-box-sizing: border-box;
271
- box-sizing: border-box;
272
- z-index: 100;
273
- min-height: 340px;
274
- }
275
-
276
- .rtl .dgwt-wcas-details-wrapp {
277
- border-left: 1px solid #ddd;
278
- border-right: none;
279
- }
280
-
281
- .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
282
- margin-top: -1px;
283
- border-top: 1px solid #ddd;
284
- }
285
-
286
- .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
287
- margin-top: -1px;
288
- border-top: 1px solid #ddd;
289
- }
290
-
291
- .dgwt-wcas-details-right .dgwt-wcas-details-wrapp {
292
- border-left: none;
293
- border-right: 1px solid #ddd;
294
- border-radius: 0 5px 5px 0;
295
- }
296
-
297
- .dgwt-wcas-details-left .dgwt-wcas-details-wrapp {
298
- border-right: none;
299
- border-left: 1px solid #ddd;
300
- border-radius: 5px 0 0 5px;
301
- }
302
-
303
- .dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp {
304
- display: none;
305
- }
306
-
307
- .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
308
- border-radius: 0 0 0 5px;
309
- }
310
-
311
- .dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
312
- border-radius: 0 0 5px 0;
313
- }
314
-
315
- .rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
316
- border-radius: 0 0 5px 0;
317
- }
318
-
319
- .rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
320
- border-radius: 0 0 0 5px;
321
- }
322
-
323
- .dgwt-wcas-details-inner {
324
- padding: 15px 10px;
325
- height: 100%;
326
- }
327
-
328
- .woocommerce .dgwt-wcas-pd-rating .star-rating {
329
- float: left;
330
- margin-right: 5px;
331
- font-size: 12px;
332
- color: #CCAE72;
333
- }
334
-
335
- .rtl .dgwt-wcas-pd-rating .star-rating {
336
- float: right;
337
- margin-left: 5px;
338
- margin-right: 0;
339
- }
340
-
341
- .dgwt-wcas-datails-title {
342
- border-bottom: 1px dashed #eee;
343
- display: block;
344
- margin-bottom: 15px;
345
- padding-bottom: 5px;
346
- font-size: 14px;
347
- }
348
-
349
- .dgwt-wcas-pd-title {
350
- border-bottom: 1px dashed #eee;
351
- margin-bottom: 15px;
352
- padding-bottom: 5px;
353
- display: block;
354
- color: #202020;
355
- text-decoration: none;
356
- }
357
-
358
- .dgwt-wcas-pd-title .product-title {
359
- font-weight: 900;
360
- color: #202020;
361
- text-transform: uppercase;
362
- letter-spacing: -1px;
363
- margin: 0;
364
- }
365
-
366
- .dgwt-wcas-details-title-tax {
367
- text-transform: uppercase;
368
- font-weight: 900;
369
- letter-spacing: -1px;
370
- margin-right: 3px;
371
- }
372
-
373
- .dgwt-wcas-tax-product-details {
374
- margin-bottom: 15px;
375
- text-decoration: none;
376
- display: flex;
377
- align-items: center;
378
- justify-content: left;
379
- }
380
-
381
- .dgwt-wcas-tax-product-details:after {
382
- content: '';
383
- clear: both;
384
- display: block;
385
- }
386
-
387
- .dgwt-wcas-details-wrapp .dgwt-wcas-pd-title {
388
- margin-bottom: 8px;
389
- }
390
-
391
- .dgwt-wcas-tpd-image {
392
- width: 60px;
393
- margin-right: 15px;
394
- }
395
-
396
- .dgwt-wcas-pd-rest {
397
- justify-content: center;
398
- display: flex;
399
- flex-direction: column;
400
- width: 100%;
401
- padding-left: 10px;
402
- }
403
-
404
- .dgwt-wcas-pd-rest .product-title {
405
- display: block;
406
- line-height: 100%;
407
- font-weight: 500;
408
- margin-bottom: 5px;
409
- }
410
-
411
- .dgwt-wcas-tpd-rest {
412
- max-width: 200px;
413
- }
414
-
415
- .dgwt-wcas-tpd-rest .product-title {
416
- display: block;
417
- line-height: 100%;
418
- font-size: 13px;
419
- font-weight: 500;
420
- letter-spacing: 0;
421
- margin: 0 0 8px;
422
- overflow: hidden;
423
- text-overflow: ellipsis;
424
- text-transform: uppercase;
425
- white-space: nowrap;
426
- width: 145px;
427
- }
428
-
429
- .dgwt-wcas-suggestion-nores {
430
- pointer-events: none;
431
- opacity: 0.45;
432
- }
433
-
434
- .dgwt-wcas-pd-price {
435
- font-size: 14px;
436
- line-height: 13px;
437
- overflow: hidden;
438
- text-overflow: ellipsis;
439
- white-space: nowrap;
440
- width: 145px;
441
- color: #777;
442
- margin-top: 3px;
443
- font-weight: lighter;
444
- }
445
-
446
- .dgwt-wcas-pd-price del .amount {
447
- font-weight: lighter;
448
- background: transparent;
449
- font-size: 90%;
450
- opacity: 0.6;
451
- }
452
-
453
- .dgwt-wcas-pd-price ins {
454
- background: transparent;
455
- text-decoration: none;
456
- }
457
-
458
- .dgwt-wcas-pd-rating {
459
- font-size: 13px;
460
- line-height: 13px;
461
- }
462
-
463
- .dgwt-wcas-pd-rating:after {
464
- content: '';
465
- clear: both;
466
- display: block;
467
- }
468
-
469
- .dgwt-wcas-pd-review {
470
- color: #777;
471
- font-size: 11px;
472
- line-height: 11px;
473
- }
474
-
475
- .dgwt-wcas-datails-title {
476
- border-bottom: 1px dashed #eee;
477
- display: block;
478
- margin: 5px 0 15px 0;
479
- padding-bottom: 5px;
480
- }
481
-
482
- .dgwt-wcas-pd-title {
483
- border-bottom: 1px dashed #eee;
484
- margin-bottom: 15px;
485
- padding-bottom: 5px;
486
- display: block;
487
-
488
- text-decoration: none;
489
- }
490
-
491
- .dgwt-wcas-pd-title .product-title {
492
- font-weight: 900;
493
-
494
- text-transform: uppercase;
495
- letter-spacing: -1px;
496
- }
497
-
498
- .dgwt-wcas-details-title-tax {
499
- text-transform: uppercase;
500
- font-weight: 900;
501
- letter-spacing: -1px;
502
- margin-right: 3px;
503
-
504
- }
505
-
506
- .rtl .dgwt-wcas-details-title-tax {
507
- margin: 0 0 0 3px;
508
- float: right;
509
- }
510
-
511
- .dgwt-wcas-pd-details {
512
- display: flex;
513
- justify-content: left;
514
- }
515
-
516
- .dgwt-wcas-tpd-image, .dgwt-wcas-pd-image {
517
- width: 70px;
518
- padding: 4px;
519
- background-color: #fff;
520
- border: 1px solid #e8e8e8;
521
- border-radius: 4px;
522
- display: flex;
523
- flex-direction: column;
524
- justify-content: center;
525
- }
526
-
527
- .dgwt-wcas-tpd-image img, .dgwt-wcas-pd-image img {
528
- display: block;
529
- max-width: 100%;
530
- width: 100%;
531
- height: auto;
532
- }
533
-
534
- .rtl .dgwt-wcas-tpd-image, .rtl .dgwt-wcas-pd-image {
535
- float: right;
536
- margin-right: 0;
537
- margin-left: 15px;
538
- }
539
-
540
- .rtl .dgwt-wcas-tpd-rest, .rtl .dgwt-wcas-pd-rest {
541
- float: right;
542
- max-width: 190px;
543
- }
544
-
545
- .rtl input[type="search"].dgwt-wcas-search-input {
546
- text-align: right;
547
- }
548
-
549
- input[type="search"].dgwt-wcas-search-input,
550
- input[type="text"].dgwt-cas-search-input {
551
- -webkit-transition: none;
552
- -moz-transition: none;
553
- -ms-transition: none;
554
- -o-transition: none;
555
- transition: none;
556
- -webkit-box-shadow: none;
557
- box-shadow: none;
558
- margin: 0;
559
- -webkit-appearance: textfield;
560
- text-align: left;
561
- }
562
-
563
- [type="search"].dgwt-wcas-search-input::-ms-clear {
564
- display: none;
565
- }
566
-
567
- [type="search"].dgwt-wcas-search-input::-webkit-search-decoration {
568
- -webkit-appearance: none;
569
- }
570
-
571
- [type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
572
- display: none;
573
- }
574
-
575
- .dgwt-wcas-pd-desc {
576
- font-size: 13px;
577
- line-height: 157%;
578
- margin: 12px 0;
579
- }
580
-
581
- .dgwt-wcas-pd-addtc-form {
582
- margin: 10px 0;
583
- display: flex;
584
- align-items: center;
585
- justify-content: flex-end;
586
- }
587
-
588
- .dgwt-wcas-pd-addtc-form > .quantity {
589
- margin-right: 10px;
590
- }
591
-
592
- .dgwt-wcas-pd-addtc-form .quantity input.qty,
593
- .dgwt-wcas-pd-addtc-form .add_to_cart_inline {
594
- margin-bottom: 0;
595
- margin-top: 0;
596
- }
597
-
598
-
599
- .dgwt-wcas-pd-addtc .add_to_cart_inline,
600
- .dgwt-wcas-pd-addtc .add_to_cart_button {
601
- margin: 0;
602
- }
603
-
604
- input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
605
- position: relative;
606
- }
607
-
608
- .dgwt-wcas-ico-magnifier {
609
- bottom: 0;
610
- left: 0;
611
- margin: auto;
612
- position: absolute;
613
- right: 0;
614
- top: 0;
615
- height: 65%;
616
- display: block;
617
- }
618
-
619
- .dgwt-wcas-preloader {
620
- height: 100%;
621
- position: absolute;
622
- right: 0;
623
- top: 0;
624
- width: 40px;
625
- z-index: 1;
626
- background-repeat: no-repeat;
627
- background-position: right 15px center;
628
- background-size: auto 44%;
629
- }
630
-
631
- .rtl .dgwt-wcas-preloader {
632
- right: auto;
633
- left: 5px;
634
- }
635
-
636
- .dgwt-wcas-inner-preloader {
637
- background-image: url('../img/preloader.png');
638
- background-repeat: no-repeat;
639
- background-position: right 13px center;
640
- background-size: auto 22px;
641
- }
642
-
643
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
644
- .dgwt-wcas-inner-preloader {
645
- background-image: url('../img/preloader.gif');
646
- }
647
- }
648
-
649
- .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) {
650
- cursor: pointer;
651
- background-image: url('../img/close.png');
652
- background-repeat: no-repeat;
653
- background-position: right 15px center;
654
- background-size: auto 18px;
655
- opacity: 0.6;
656
- -webkit-transition: all 160ms ease-in-out;
657
- -moz-transition: all 160ms ease-in-out;
658
- -ms-transition: all 160ms ease-in-out;
659
- -o-transition: all 160ms ease-in-out;
660
- transition: all 160ms ease-in-out;
661
- }
662
-
663
- .dgwt-wcas-close:hover {
664
- opacity: 0.3;
665
- }
666
-
667
- @media screen and (max-width: 992px) {
668
- .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
669
- max-width: none;
670
- }
671
- }
672
-
673
- .dgwt-wcas-suggestion strong {
674
- font-weight: bold;
675
- }
676
-
677
- .screen-reader-text {
678
- clip: rect(1px, 1px, 1px, 1px);
679
- height: 1px;
680
- overflow: hidden;
681
- position: absolute !important;
682
- width: 1px;
683
- }
684
-
685
- .dgwt-wcas-sf-wrapp:before, .dgwt-wcas-sf-wrapp:after {
686
- content: "";
687
- display: table;
688
- }
689
-
690
- .dgwt-wcas-sf-wrapp:after {
691
- clear: both;
692
- }
693
-
694
- .dgwt-wcas-sf-wrapp {
695
- zoom: 1;
696
- width: 100%;
697
- margin: 0;
698
- position: relative;
699
- background: none;
700
- }
701
-
702
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
703
- width: 100%;
704
- height: 40px;
705
- font-size: 14px;
706
- line-height: 100%;
707
- padding: 10px 15px;
708
- margin: 0;
709
- background: #fff;
710
- border: 1px solid #ddd;
711
- border-radius: 3px;
712
- -webkit-border-radius: 3px;
713
- -webkit-appearance: none;
714
- box-sizing: border-box;
715
- }
716
-
717
- .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
718
- border-radius: 3px 3px 0 0;
719
- }
720
-
721
- .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
722
- display: none !important;
723
- }
724
-
725
- .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp {
726
- min-height: 0 !important;
727
- border-radius: 0 0 5px 5px;
728
- border-right-color: #ddd;
729
- }
730
-
731
- .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,
732
- .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
733
- min-height: 41px !important;
734
- }
735
-
736
- .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl) .dgwt-wcas-suggestions-wrapp {
737
- border-right-color: transparent;
738
- }
739
-
740
- .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp {
741
- display: none!important;
742
- }
743
-
744
- .rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
745
- border-left-color: transparent;
746
- }
747
-
748
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
749
- outline: 0;
750
- background: #fff;
751
- box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.06);
752
- }
753
-
754
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
755
- color: #999;
756
- font-weight: normal;
757
- font-style: italic;
758
- line-height: normal;
759
- }
760
-
761
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-input-placeholder {
762
- color: #999;
763
- font-weight: normal;
764
- font-style: italic;
765
- line-height: normal;
766
- }
767
-
768
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-moz-placeholder {
769
- color: #999;
770
- font-weight: normal;
771
- font-style: italic;
772
- line-height: normal;
773
- }
774
-
775
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-moz-placeholder {
776
- color: #999;
777
- font-weight: normal;
778
- font-style: italic;
779
- line-height: normal;
780
- }
781
-
782
- .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-ms-input-placeholder {
783
- color: #999;
784
- font-weight: normal;
785
- font-style: italic;
786
- line-height: normal;
787
- }
788
-
789
- /* Form submit button */
790
- .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
791
- overflow: visible;
792
- position: absolute;
793
- border: 0;
794
- padding: 0;
795
- margin: 0;
796
- cursor: pointer;
797
- height: 40px;
798
- min-width: 50px;
799
- right: 0;
800
- left: auto;
801
- top: 0;
802
- bottom: auto;
803
- padding: 0 15px;
804
- color: #fff;
805
- -webkit-transition: all 250ms ease-in-out;
806
- -moz-transition: all 250ms ease-in-out;
807
- -ms-transition: all 250ms ease-in-out;
808
- -o-transition: all 250ms ease-in-out;
809
- transition: all 250ms ease-in-out;
810
- text-transform: uppercase;
811
- background-color: #333;
812
- border-radius: 0 2px 2px 0;
813
- -webkit-border-radius: 0 2px 2px 0;
814
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
815
- -webkit-box-shadow: none;
816
- box-shadow: none;
817
- -webkit-appearance: none;
818
- }
819
-
820
- .rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
821
- left: 0;
822
- right: auto;
823
- }
824
-
825
- .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
826
- border-radius: 0 2px 0 0;
827
- }
828
-
829
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover {
830
- opacity: 0.7;
831
- }
832
-
833
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,
834
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus {
835
- opacity: 0.7;
836
- outline: 0;
837
- }
838
-
839
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
840
- content: '';
841
- position: absolute;
842
- border-width: 8px 8px 8px 0;
843
- border-style: solid solid solid none;
844
- border-color: transparent #333 transparent;
845
- top: 12px;
846
- left: -6px;
847
- -webkit-transition: all 250ms ease-in-out;
848
- -moz-transition: all 250ms ease-in-out;
849
- -ms-transition: all 250ms ease-in-out;
850
- -o-transition: all 250ms ease-in-out;
851
- transition: all 250ms ease-in-out;
852
- }
853
-
854
- .rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
855
- left: auto;
856
- right: -6px;
857
- border-width: 8px 0 8px 8px;
858
- border-style: solid none solid solid;
859
- }
860
-
861
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before {
862
- border-right-color: #333;
863
- }
864
-
865
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before,
866
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before {
867
- border-right-color: #333;
868
- }
869
-
870
- .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */
871
- border: 0;
872
- padding: 0;
873
- }
874
-
875
- .dgwt-wcas-ico-magnifier {
876
- fill: #fff;
877
- }
878
-
879
- .dgwt-wcas-details-inner .added_to_cart {
880
- display: block;
881
- }
882
-
883
- /*------------------------------------------------------
884
- Has image
885
- ---------------------------------------------------------*/
886
- .dgwt-wcas-has-img .dgwt-wcas-sp > *,
887
- .dgwt-wcas-has-desc .dgwt-wcas-sp > * {
888
- display: block;
889
- }
890
-
891
- /*------------------------------------------------------
892
- Specific styles for Details panel
893
- ---------------------------------------------------------*/
894
-
895
- .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
896
- min-height: 340px;
897
- }
898
-
899
- body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child {
900
- border-bottom: none;
901
- }
902
-
903
- .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
904
- min-height: 40px;
905
- }
906
-
907
- .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
908
- overflow: visible;
909
- }
910
-
911
- .dgwt-wcas-is-details .dgwt-wcas-si {
912
- width: 30px;
913
- max-width: 100%;
914
- box-sizing: border-box;
915
- }
916
-
917
- .dgwt-wcas-is-details .dgwt-wcas-sp {
918
- display: flex;
919
- top: 0;
920
- flex-direction: column;
921
- height: 100%;
922
- justify-content: center;
923
- resize: vertical;
924
- }
925
-
926
- .dgwt-wcas-is-details .dgwt-wcas-sd {
927
- font-size: 11px;
928
- line-height: 100%;
929
- }
930
- .dgwt-wcas-details-more-products {
931
- padding: 15px 0 10px 0;
932
- display: block;
933
- border-top: 1px solid #eee;
934
- text-align: center;
935
- font-size: 14px;
936
- text-transform: uppercase;
937
- }
938
-
939
- .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'],
940
- .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] {
941
- padding-left: 15px;
942
- min-height: 0;
943
- }
944
-
945
- .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'] .dgwt-wcas-st,
946
- .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] .dgwt-wcas-st {
947
- padding-left: 0;
948
- }
949
-
950
- .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
951
- height: 50%;
952
- max-height: 20px;
953
- width: 100%;
954
- max-width: 20px;
955
- left: 12px;
956
- right: auto;
957
- opacity: 0.5;
958
- fill: #000;
959
- }
960
-
961
- .rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
962
- left: auto;
963
- right: 12px;
964
- }
965
-
966
- .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
967
- padding: 10px 15px 10px 40px;
968
- }
969
- .rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
970
- padding: 10px 40px 10px 15px;
971
- }
972
-
973
- .dgwt-wcas-overlay-mobile-on, .dgwt-wcas-overlay-mobile-on body {
974
- overflow: hidden;
975
- }
976
-
977
- .dgwt-wcas-om-bar {
978
- display: flex;
979
- height: 45px;
980
- width: 100%;
981
- }
982
-
983
- .dgwt-wcas-om-bar .dgwt-wcas-om-return {
984
- width: 45px;
985
- height: 100%;
986
- display: block;
987
- background: #ccc;
988
- cursor: pointer;
989
- position: relative;
990
- }
991
-
992
- .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
993
- width: 23px;
994
- height: 23px;
995
- position: absolute;
996
- left: 12px;
997
- top: 12px;
998
- }
999
-
1000
- .rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1001
- left: 11px;
1002
- top: 9px;
1003
- -moz-transform: rotate(180deg);
1004
- -webkit-transform: rotate(180deg);
1005
- -o-transform: rotate(180deg);
1006
- -ms-transform: rotate(180deg);
1007
- transform: rotate(180deg);
1008
- }
1009
-
1010
- .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1011
- right: 0 !important;
1012
- }
1013
-
1014
- .rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1015
- left: 4px !important;
1016
- right: auto !important;
1017
- }
1018
-
1019
- .dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1020
- display: none;
1021
- }
1022
-
1023
- .dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile {
1024
- width: calc(100% - 45px);
1025
- max-width: none;
1026
- }
1027
-
1028
- .dgwt-wcas-overlay-mobile {
1029
- position: absolute;
1030
- left: 0;
1031
- right: 0;
1032
- top: 0;
1033
- bottom: 0;
1034
- width: 100%;
1035
- background: #fff;
1036
- }
1037
-
1038
- .dgwt-wcas-overlay-mobile * {
1039
- box-sizing: border-box;
1040
- }
1041
-
1042
- .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input {
1043
- height: 45px !important;
1044
- border-top: none;
1045
- border-right: none;
1046
- border-left: none;
1047
- border-radius: 0;
1048
- font-size: 16px !important;
1049
- }
1050
-
1051
- .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input:focus {
1052
- font-size: 16px !important;
1053
- }
1054
-
1055
- .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
1056
- left: 0 !important;
1057
- top: 45px !important;
1058
- width: 100% !important;
1059
- height: calc(100% - 45px) !important;
1060
- position: absolute;
1061
- overflow-y: auto;
1062
- border: none;
1063
- }
1064
-
1065
- .dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form {
1066
- display: none;
1067
- }
1068
-
1069
- .dgwt-wcas-enable-mobile-form {
1070
- position: absolute;
1071
- z-index: 100;
1072
- left: 0;
1073
- top: 0;
1074
- width: 100%;
1075
- height: 100%;
1076
- cursor: pointer;
1077
- }
1078
-
1079
- html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form {
1080
- display: none;
1081
- position: relative;
1082
- }
1083
- html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile {
1084
- min-width:0;
1085
- display: inline-block;
1086
- width: 28px;
1087
- height: 28px;
1088
- }
1089
- html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler {
1090
- height: 100%;
1091
- width: 100%;
1092
- }
1093
-
1094
- html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{
1095
- opacity: 1;
1096
- position: static;
1097
- max-width: none;
1098
- max-height:none;
1099
- }
1100
-
1101
- .dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler {
1102
- display: none;
1103
- }
1104
-
1105
- .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1106
- height: calc(100% - 45px) !important;
1107
- }
1108
-
1109
- .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios {
1110
- overflow: visible;
1111
- overflow-x: hidden;
1112
- }
1113
-
1114
- .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1115
- max-height: none !important;
1116
- height: auto !important;
1117
- }
1118
-
1119
- .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios:not(.dgwt-wcas-theme-flatsome) > *:not(.dgwt-wcas-overlay-mobile) {
1120
- display: none;
1121
- }
1122
-
1123
- /* compatibility with external plugins and themes */
1124
- body .dgwt-wcas-content-wrapp .zwave,
1125
- body .dgwt-wcas-content-wrapp .rood {
1126
- display: none;
1127
- }
1128
-
1129
- /*------------------------------------------------------
1130
- Style with headings
1131
- ---------------------------------------------------------*/
1132
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion {
1133
- border-bottom: none;
1134
- }
1135
-
1136
- .dgwt-wcas-has-headings .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
1137
- display: none;
1138
- }
1139
-
1140
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline {
1141
- pointer-events: none;
1142
- display: block;
1143
- font-weight: 500;
1144
- white-space: nowrap;
1145
- }
1146
-
1147
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
1148
- border-bottom: 1px solid #ddd;
1149
- padding-bottom: 3px;
1150
- text-transform: uppercase;
1151
- margin-top: 16px;
1152
- font-size: 12px;
1153
- }
1154
-
1155
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,
1156
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1157
- border-bottom: none;
1158
- }
1159
-
1160
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
1161
- padding: 0;
1162
- }
1163
-
1164
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover,
1165
- .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected {
1166
- background: transparent;
1167
- text-decoration: underline;
1168
- }
1169
-
1170
- .dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1171
- min-height: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1172
  }
1
+ .dgwt-wcas-block-scroll {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .dgwt-wcas-search-wrapp {
6
+ position: relative;
7
+ display: block;
8
+ color: #444;
9
+ min-width: 230px;
10
+ width: 100%;
11
+ text-align: left;
12
+ margin: 0 auto;
13
+ -webkit-box-sizing: border-box;
14
+ -moz-box-sizing: border-box;
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ .dgwt-wcas-tpd-image img {
19
+ margin: 0 15px 0 0 !important;
20
+ display: block;
21
+ }
22
+
23
+ .rtl .dgwt-wcas-tpd-image img {
24
+ margin: 0 0 0 15px !important;
25
+ }
26
+
27
+ .dgwt-wcas-preloader-wrapp img {
28
+ margin: 10px auto 0 auto;
29
+ display: block;
30
+ max-width: 200px;
31
+ }
32
+
33
+ .dgwt-wcas-preloader-wrapp img.dgwt-wcas-placeholder-preloader {
34
+ display: block;
35
+ width: 100%;
36
+ height: auto;
37
+ max-width: 300px;
38
+ margin: 0;
39
+ }
40
+
41
+ .dgwt-wcas-suggestions-wrapp {
42
+ background: #fff none repeat scroll 0 0;
43
+ border: 1px solid #ddd;
44
+ border-top: none;
45
+ padding: 0;
46
+ -webkit-box-sizing: border-box;
47
+ -moz-box-sizing: border-box;
48
+ box-sizing: border-box;
49
+ overflow-y: auto;
50
+ }
51
+ .dgwt-wcas-details-wrapp a:focus,
52
+ .dgwt-wcas-suggestions-wrapp a:focus {
53
+ outline:none;
54
+ }
55
+
56
+ .dgwt-wcas-suggestions-wrapp.dgwt-wcas-suggestions-wrapp--top {
57
+ border: 1px solid #ddd;
58
+ border-bottom: none;
59
+ }
60
+
61
+ .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
62
+ max-width: 550px;
63
+ }
64
+
65
+ .dgwt-wcas-full-width.dgwt-wcas-is-detail-box .dgwt-wcas-suggestion {
66
+ padding: 8px 15px;
67
+ }
68
+
69
+ .dgwt-wcas-details-left .dgwt-wcas-suggestions-wrapp {
70
+ border-radius: 0 0 5px 0;
71
+ border-left-color: #eee;
72
+ }
73
+
74
+ .dgwt-wcas-details-right .dgwt-wcas-suggestions-wrapp {
75
+ border-radius: 0 0 0 5px;
76
+ border-right-color: #eee;
77
+ }
78
+
79
+ .dgwt-wcas-suggestion {
80
+ cursor: pointer;
81
+ font-size: 12px;
82
+ line-height: 110%;
83
+ text-align: left;
84
+ padding: 7px 10px;
85
+ position: relative;
86
+ border-bottom: 1px solid #dfdfdf;
87
+ display: flex;
88
+ flex-direction: row;
89
+ justify-content: space-between;
90
+ align-items: center;
91
+ resize: vertical;
92
+ }
93
+
94
+ .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
95
+ justify-content: center;
96
+ color: #6d6d6d;
97
+ }
98
+ a.dgwt-wcas-details-more-products {
99
+ padding: 15px 0 10px 0;
100
+ display: block;
101
+ border-top: 1px solid #eee;
102
+ text-align: center;
103
+ font-size: 12px;
104
+ text-transform: uppercase;
105
+ color: #6d6d6d;
106
+ transition: all 200ms ease-in-out;
107
+ }
108
+ a.dgwt-wcas-details-more-products:hover {
109
+ text-decoration: underline;
110
+ }
111
+
112
+ a.dgwt-wcas-product-details-readmore {
113
+ display: block;
114
+ text-align: right;
115
+ margin-top: 15px;
116
+ color: #6d6d6d;
117
+ text-transform: uppercase;
118
+ letter-spacing: 1px;
119
+ font-weight: normal;
120
+ font-size: 12px;
121
+ }
122
+ a.dgwt-wcas-product-details-readmore:hover {
123
+ text-decoration: underline;
124
+ }
125
+
126
+ .dgwt-wcas-suggestion.dgwt-wcas-suggestion-no-border-bottom {
127
+ border-bottom: none;
128
+ }
129
+
130
+ .dgwt-wcas-suggestion:after {
131
+ clear: both;
132
+ display: block;
133
+ content: '';
134
+ }
135
+
136
+ .dgwt-wcas-suggestion.dgwt-wcas-nores {
137
+ cursor: default;
138
+ opacity: 0.5;
139
+ }
140
+
141
+ .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
142
+ padding-top: 8px;
143
+ padding-bottom: 8px;
144
+ min-height: 60px;
145
+ }
146
+
147
+ .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more,
148
+ .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
149
+ min-height: 30px;
150
+ text-transform: uppercase;
151
+ }
152
+
153
+ .dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
154
+ padding: 0 10px;
155
+ text-align: center;
156
+ }
157
+
158
+ .dgwt-wcas-st {
159
+ display: block;
160
+ color: #444;
161
+ font-size: 15px;
162
+ width: 100%;
163
+ line-height: 110%;
164
+ }
165
+
166
+ .dgwt-wcas-st > span {
167
+ display: inline-block;
168
+ vertical-align: middle;
169
+ }
170
+
171
+ .dgwt-wcas-has-sku .dgwt-wcas-st-title {
172
+ margin-right: 6px;
173
+ }
174
+
175
+ .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
176
+ display: block;
177
+ font-style: italic;
178
+ font-size: 10px;
179
+ text-transform: uppercase;
180
+ opacity: 0.4;
181
+ line-height: 10px;
182
+ margin-bottom: 1px;
183
+ letter-spacing: 2px;
184
+ }
185
+
186
+ .dgwt-wcas-st-breadcrumbs {
187
+ overflow: hidden;
188
+ text-overflow: ellipsis;
189
+ white-space: nowrap;
190
+ font-size: 80%;
191
+ text-align: left;
192
+ opacity: 0.6;
193
+ width: 100%;
194
+ padding-right: 10px;
195
+ }
196
+
197
+ .rtl .dgwt-wcas-st-breadcrumbs {
198
+ padding-right: 0;
199
+ padding-left: 10px;
200
+ text-align: right;
201
+ }
202
+
203
+ .dgwt-wcas-sku {
204
+ font-size: 80%;
205
+ }
206
+
207
+ .dgwt-wcas-si {
208
+ width: 50px;
209
+ display: block;
210
+ height: 100%;
211
+ }
212
+
213
+ .dgwt-wcas-si img {
214
+ background: #fff none repeat scroll 0 0;
215
+ border: 1px solid #e8e8e8;
216
+ border-radius: 3px;
217
+ display: block;
218
+ margin: auto;
219
+ padding: 2px;
220
+ height: auto;
221
+ width: auto;
222
+ max-height: 90%;
223
+ max-width: 100%;
224
+ }
225
+
226
+ .dgwt-wcas-content-wrapp {
227
+ display: flex;
228
+ height: 100%;
229
+ width: 100%;
230
+ justify-content: space-between;
231
+ align-items: center;
232
+ resize: vertical;
233
+ padding-left: 10px;
234
+ }
235
+
236
+ .rtl .dgwt-wcas-content-wrapp {
237
+ padding-left: 0;
238
+ padding-right: 10px;
239
+ }
240
+
241
+ .dgwt-wcas-sp {
242
+ color: #555;
243
+ font-size: 14px;
244
+ line-height: 120%;
245
+ text-align: right;
246
+ line-height: 4px;
247
+ padding-left: 10px;
248
+ }
249
+
250
+ .dgwt-wcas-sp * {
251
+ line-height: 130%;
252
+ }
253
+
254
+ .dgwt-wcas-search-form {
255
+ margin: 0;
256
+ padding: 0;
257
+ }
258
+
259
+ .dgwt-wcas-sp del {
260
+ opacity: 0.5;
261
+ font-size: 12px;
262
+ }
263
+
264
+ .dgwt-wcas-sd {
265
+ color: #777;
266
+ display: block;
267
+ line-height: 14px;
268
+ width: 100%;
269
+ margin-top: 5px;
270
+ font-size: 0.8em;
271
+ }
272
+
273
+ .dgwt-wcas-suggestion-selected {
274
+ background-color: #eeeeee;
275
+ }
276
+
277
+ .dgwt-wcas-suggestion-selected:first-child {
278
+ border-top: none;
279
+ }
280
+
281
+ .rtl .dgwt-wcas-suggestion {
282
+ padding-left: 0;
283
+ padding-right: 15px;
284
+ text-align: right;
285
+ }
286
+
287
+ .dgwt-wcas-details-wrapp {
288
+ background: #fff none repeat scroll 0 0;
289
+ border: 1px solid #ddd;
290
+ border-top: none;
291
+ border-left: none;
292
+ padding: 0;
293
+ width: 300px;
294
+ -webkit-box-sizing: border-box;
295
+ -moz-box-sizing: border-box;
296
+ box-sizing: border-box;
297
+ z-index: 100;
298
+ min-height: 340px;
299
+ }
300
+
301
+ .rtl .dgwt-wcas-details-wrapp {
302
+ border-left: 1px solid #ddd;
303
+ border-right: none;
304
+ }
305
+
306
+ .dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
307
+ margin-top: -1px;
308
+ border-top: 1px solid #ddd;
309
+ }
310
+
311
+ .dgwt-wcas-details-outside.dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
312
+ margin-top: -1px;
313
+ border-top: 1px solid #ddd;
314
+ }
315
+
316
+ .dgwt-wcas-details-right .dgwt-wcas-details-wrapp {
317
+ border-left: none;
318
+ border-right: 1px solid #ddd;
319
+ border-radius: 0 5px 5px 0;
320
+ }
321
+
322
+ .dgwt-wcas-details-left .dgwt-wcas-details-wrapp {
323
+ border-right: none;
324
+ border-left: 1px solid #ddd;
325
+ border-radius: 5px 0 0 5px;
326
+ }
327
+
328
+ .dgwt-wcas-details-notfit .dgwt-wcas-details-wrapp {
329
+ display: none;
330
+ }
331
+
332
+ .dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
333
+ border-radius: 0 0 0 5px;
334
+ }
335
+
336
+ .dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
337
+ border-radius: 0 0 5px 0;
338
+ }
339
+
340
+ .rtl.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp {
341
+ border-radius: 0 0 5px 0;
342
+ }
343
+
344
+ .rtl.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
345
+ border-radius: 0 0 0 5px;
346
+ }
347
+
348
+ .dgwt-wcas-details-inner-taxonomy{
349
+ margin-top: 11px;
350
+ }
351
+
352
+ .woocommerce .dgwt-wcas-pd-rating .star-rating {
353
+ float: left;
354
+ margin-right: 5px;
355
+ font-size: 12px;
356
+ color: #CCAE72;
357
+ }
358
+
359
+ .rtl .dgwt-wcas-pd-rating .star-rating {
360
+ float: right;
361
+ margin-left: 5px;
362
+ margin-right: 0;
363
+ }
364
+
365
+ .dgwt-wcas-datails-title {
366
+ border-bottom: 1px dashed #eee;
367
+ display: block;
368
+ margin-bottom: 15px;
369
+ padding-bottom: 5px;
370
+ font-size: 14px;
371
+ }
372
+
373
+ .dgwt-wcas-pd-title {
374
+ border-bottom: 1px dashed #eee;
375
+ margin-bottom: 15px;
376
+ padding-bottom: 5px;
377
+ display: block;
378
+ color: #202020;
379
+ text-decoration: none;
380
+ }
381
+
382
+ .dgwt-wcas-pd-title .product-title {
383
+ font-weight: 900;
384
+ color: #202020;
385
+ text-transform: uppercase;
386
+ letter-spacing: -1px;
387
+ margin: 0;
388
+ }
389
+
390
+ .dgwt-wcas-details-title-tax {
391
+ text-transform: uppercase;
392
+ font-weight: 900;
393
+ letter-spacing: -1px;
394
+ margin-right: 3px;
395
+ }
396
+
397
+ .dgwt-wcas-tax-product-details {
398
+ text-decoration: none;
399
+ display: flex;
400
+ align-items: center;
401
+ justify-content: left;
402
+ transition: all 200ms ease-in-out;
403
+ padding: 5px;
404
+ margin: 0 -5px 15px -5px;
405
+ }
406
+
407
+ .dgwt-wcas-tax-product-details:after {
408
+ content: '';
409
+ clear: both;
410
+ display: block;
411
+ }
412
+
413
+ .dgwt-wcas-tax-product-details:hover {
414
+ box-shadow: 0 0 11px 2px rgba(0,0,0,0.05);
415
+ }
416
+
417
+
418
+ .dgwt-wcas-details-wrapp .dgwt-wcas-pd-title {
419
+ margin-bottom: 8px;
420
+ }
421
+
422
+ .dgwt-wcas-tpd-image {
423
+ width: 60px;
424
+ margin-right: 15px;
425
+ }
426
+
427
+ .dgwt-wcas-pd-rest {
428
+
429
+ }
430
+
431
+ .dgwt-wcas-pd-rest .product-title {
432
+ display: block;
433
+ line-height: 100%;
434
+ font-weight: 500;
435
+ margin-bottom: 5px;
436
+ }
437
+
438
+ .dgwt-wcas-tpd-rest {
439
+ max-width: 200px;
440
+ }
441
+
442
+ .dgwt-wcas-tpd-rest-title {
443
+ display: block;
444
+ line-height: 125%;
445
+ font-size: 14px;
446
+ font-weight: 500;
447
+ letter-spacing: 0;
448
+ margin: 0 0 8px;
449
+ overflow: hidden;
450
+ color: #000;
451
+ }
452
+
453
+ .dgwt-wcas-suggestion-nores {
454
+ pointer-events: none;
455
+ opacity: 0.45;
456
+ }
457
+ .dgwt-wcas-tpd-price {
458
+
459
+ }
460
+ .dgwt-wcas-pd-price,
461
+ .dgwt-wcas-tpd-price {
462
+ font-size: 14px;
463
+ line-height: 120%;
464
+ overflow: hidden;
465
+ color: #000;
466
+ margin-top: 15px;
467
+ font-weight: bold;
468
+ font-size: 18px;
469
+ }
470
+ .dgwt-wcas-tpd-price {
471
+ font-size: 12px;
472
+ color: #777;
473
+ }
474
+ .dgwt-wcas-tpd-price .woocommerce-price-suffix,
475
+ .dgwt-wcas-pd-price .woocommerce-price-suffix {
476
+ font-size: 12px;
477
+ font-weight: lighter;
478
+ color: #999;
479
+ margin-left: 4px;
480
+ display: inline-block;
481
+ }
482
+
483
+ .dgwt-wcas-tpd-price del .amount,
484
+ .dgwt-wcas-pd-price del .amount {
485
+ font-weight: lighter;
486
+ background: transparent;
487
+ font-size: 90%;
488
+ opacity: 0.6;
489
+ }
490
+
491
+ .dgwt-wcas-tpd-price ins,
492
+ .dgwt-wcas-pd-price ins {
493
+ background: transparent;
494
+ text-decoration: none;
495
+ }
496
+
497
+ .dgwt-wcas-pd-rating {
498
+ font-size: 13px;
499
+ line-height: 13px;
500
+ }
501
+
502
+ .dgwt-wcas-pd-rating:after {
503
+ content: '';
504
+ clear: both;
505
+ display: block;
506
+ }
507
+
508
+ .dgwt-wcas-pd-review {
509
+ color: #777;
510
+ font-size: 11px;
511
+ line-height: 11px;
512
+ }
513
+
514
+ .dgwt-wcas-datails-title {
515
+ border-bottom: 1px dashed #eee;
516
+ display: block;
517
+ margin: 5px 0 15px 0;
518
+ padding-bottom: 5px;
519
+ }
520
+
521
+ .dgwt-wcas-pd-title {
522
+ border-bottom: 1px dashed #eee;
523
+ margin-bottom: 15px;
524
+ padding-bottom: 5px;
525
+ display: block;
526
+
527
+ text-decoration: none;
528
+ }
529
+
530
+ .dgwt-wcas-pd-title .product-title {
531
+ font-weight: 900;
532
+
533
+ text-transform: uppercase;
534
+ letter-spacing: -1px;
535
+ }
536
+
537
+ .dgwt-wcas-details-title-tax {
538
+ text-transform: uppercase;
539
+ font-weight: 900;
540
+ letter-spacing: -1px;
541
+ margin-right: 3px;
542
+
543
+ }
544
+
545
+ .rtl .dgwt-wcas-details-title-tax {
546
+ margin: 0 0 0 3px;
547
+ float: right;
548
+ }
549
+
550
+
551
+ .dgwt-wcas-tpd-image {
552
+ width: 70px;
553
+ padding: 4px;
554
+ background-color: #fff;
555
+ border: 1px solid #e8e8e8;
556
+ border-radius: 4px;
557
+ display: flex;
558
+ flex-direction: column;
559
+ justify-content: center;
560
+ }
561
+
562
+
563
+ .dgwt-wcas-details-space {
564
+ padding: 0 15px 15px 15px;
565
+ }
566
+
567
+ .dgwt-wcas-details-main-image {
568
+ border-bottom: 1px solid #eee;
569
+ min-height: 200px;
570
+ display: flex;
571
+ }
572
+
573
+ .dgwt-wcas-details-main-image img {
574
+ width: auto;
575
+ height: auto;
576
+ display: block;
577
+ max-height: 250px;
578
+ max-width: 100%;
579
+ margin: 0 auto;
580
+ padding: 0;
581
+ border: none;
582
+ align-self: center;
583
+ }
584
+ .dgwt-wcas-details-right .dgwt-wcas-details-main-image img{
585
+ border-radius: 0 3px 0 0;
586
+ }
587
+ .dgwt-wcas-details-left .dgwt-wcas-details-main-image img{
588
+ border-radius: 3px 0 0 0;
589
+ }
590
+
591
+
592
+ a.dgwt-wcas-details-post-title,
593
+ a.dgwt-wcas-details-product-title {
594
+ color: #333;
595
+ display: block;
596
+ line-height: 120%;
597
+ margin: 10px 0 0 0;
598
+ font-size: 21px;
599
+ font-weight: normal;
600
+ text-decoration: none;
601
+ text-transform: none;
602
+ }
603
+ a.dgwt-wcas-details-post-title:hover,
604
+ a.dgwt-wcas-details-product-title:hover {
605
+ text-decoration: underline;
606
+ }
607
+ a.dgwt-wcas-details-post-title {
608
+ margin-bottom: 15px;
609
+ }
610
+
611
+ .dgwt-wcas-details-product-sku {
612
+ display: block;
613
+ font-size: 12px;
614
+ line-height: 110%;
615
+ color: #999;
616
+ }
617
+
618
+ .dgwt-wcas-tpd-image img {
619
+ display: block;
620
+ max-width: 100%;
621
+ width: 100%;
622
+ height: auto;
623
+ }
624
+
625
+ .dgwt-wcas-details-hr {
626
+ height: 1px;
627
+ width: 100%;
628
+ border-bottom: 1px solid #eee;
629
+ margin: 15px 0;
630
+ }
631
+
632
+ .rtl .dgwt-wcas-tpd-image {
633
+ float: right;
634
+ margin-right: 0;
635
+ margin-left: 15px;
636
+ }
637
+
638
+ .rtl .dgwt-wcas-tpd-rest {
639
+ float: right;
640
+ max-width: 190px;
641
+ }
642
+
643
+ .rtl input[type="search"].dgwt-wcas-search-input {
644
+ text-align: right;
645
+ }
646
+
647
+ input[type="search"].dgwt-wcas-search-input,
648
+ input[type="text"].dgwt-cas-search-input {
649
+ -webkit-transition: none;
650
+ -moz-transition: none;
651
+ -ms-transition: none;
652
+ -o-transition: none;
653
+ transition: none;
654
+ -webkit-box-shadow: none;
655
+ box-shadow: none;
656
+ margin: 0;
657
+ -webkit-appearance: textfield;
658
+ text-align: left;
659
+ }
660
+
661
+ [type="search"].dgwt-wcas-search-input::-ms-clear {
662
+ display: none;
663
+ }
664
+
665
+ [type="search"].dgwt-wcas-search-input::-webkit-search-decoration {
666
+ -webkit-appearance: none;
667
+ }
668
+
669
+ [type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
670
+ display: none;
671
+ }
672
+
673
+ .dgwt-wcas-details-desc {
674
+ font-size: 13px;
675
+ line-height: 157%;
676
+ }
677
+
678
+ .dgwt-wcas-details-desc strong,
679
+ .dgwt-wcas-details-desc b {
680
+ font-weight: normal;
681
+ color: #000;
682
+ margin: 0;
683
+ padding: 0;
684
+ }
685
+
686
+
687
+ .dgwt-wcas-pd-addtc-form {
688
+ margin: 10px 0;
689
+ display: flex;
690
+ align-items: center;
691
+ justify-content: flex-end;
692
+ }
693
+
694
+ .dgwt-wcas-pd-addtc-form > .quantity {
695
+ margin-right: 10px;
696
+ }
697
+
698
+ .dgwt-wcas-pd-addtc-form .quantity input.qty,
699
+ .dgwt-wcas-pd-addtc-form .add_to_cart_inline {
700
+ margin-bottom: 0;
701
+ margin-top: 0;
702
+ }
703
+
704
+
705
+ .dgwt-wcas-pd-addtc .add_to_cart_inline,
706
+ .dgwt-wcas-pd-addtc .add_to_cart_button {
707
+ margin: 0;
708
+ }
709
+ .dgwt-wcas-pd-addtc .add_to_cart_button.added {
710
+ display: none;
711
+ }
712
+
713
+ input[type="submit"].dgwt-wcas-search-submit, button.dgwt-wcas-search-submit {
714
+ position: relative;
715
+ }
716
+
717
+ .dgwt-wcas-ico-magnifier {
718
+ bottom: 0;
719
+ left: 0;
720
+ margin: auto;
721
+ position: absolute;
722
+ right: 0;
723
+ top: 0;
724
+ height: 65%;
725
+ display: block;
726
+ }
727
+
728
+ .dgwt-wcas-preloader {
729
+ height: 100%;
730
+ position: absolute;
731
+ right: 0;
732
+ top: 0;
733
+ width: 40px;
734
+ z-index: 1;
735
+ background-repeat: no-repeat;
736
+ background-position: right 15px center;
737
+ background-size: auto 44%;
738
+ }
739
+
740
+ .rtl .dgwt-wcas-preloader {
741
+ right: auto;
742
+ left: 5px;
743
+ }
744
+
745
+ .dgwt-wcas-inner-preloader {
746
+ background-image: url('../img/preloader.png');
747
+ background-repeat: no-repeat;
748
+ background-position: right 13px center;
749
+ background-size: auto 22px;
750
+ }
751
+
752
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
753
+ .dgwt-wcas-inner-preloader {
754
+ background-image: url('../img/preloader.gif');
755
+ }
756
+ }
757
+
758
+ .dgwt-wcas-close:not(.dgwt-wcas-inner-preloader) {
759
+ cursor: pointer;
760
+ background-image: url('../img/close.png');
761
+ background-repeat: no-repeat;
762
+ background-position: right 15px center;
763
+ background-size: auto 18px;
764
+ opacity: 0.6;
765
+ -webkit-transition: all 160ms ease-in-out;
766
+ -moz-transition: all 160ms ease-in-out;
767
+ -ms-transition: all 160ms ease-in-out;
768
+ -o-transition: all 160ms ease-in-out;
769
+ transition: all 160ms ease-in-out;
770
+ }
771
+
772
+ .dgwt-wcas-close:hover {
773
+ opacity: 0.3;
774
+ }
775
+
776
+ @media screen and (max-width: 992px) {
777
+ .dgwt-wcas-is-detail-box .dgwt-wcas-suggestions-wrapp {
778
+ max-width: none;
779
+ }
780
+ }
781
+
782
+ .dgwt-wcas-suggestion strong {
783
+ font-weight: bold;
784
+ }
785
+
786
+ .screen-reader-text {
787
+ clip: rect(1px, 1px, 1px, 1px);
788
+ height: 1px;
789
+ overflow: hidden;
790
+ position: absolute !important;
791
+ width: 1px;
792
+ }
793
+
794
+ .dgwt-wcas-sf-wrapp:before, .dgwt-wcas-sf-wrapp:after {
795
+ content: "";
796
+ display: table;
797
+ }
798
+
799
+ .dgwt-wcas-sf-wrapp:after {
800
+ clear: both;
801
+ }
802
+
803
+ .dgwt-wcas-sf-wrapp {
804
+ zoom: 1;
805
+ width: 100%;
806
+ margin: 0;
807
+ position: relative;
808
+ background: none;
809
+ }
810
+
811
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
812
+ width: 100%;
813
+ height: 40px;
814
+ font-size: 14px;
815
+ line-height: 100%;
816
+ padding: 10px 15px;
817
+ margin: 0;
818
+ background: #fff;
819
+ border: 1px solid #ddd;
820
+ border-radius: 3px;
821
+ -webkit-border-radius: 3px;
822
+ -webkit-appearance: none;
823
+ box-sizing: border-box;
824
+ }
825
+
826
+ .dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
827
+ border-radius: 3px 3px 0 0;
828
+ }
829
+
830
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-details-wrapp {
831
+ display: none !important;
832
+ }
833
+
834
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-details-outside .dgwt-wcas-suggestions-wrapp {
835
+ min-height: 0 !important;
836
+ border-radius: 0 0 5px 5px;
837
+ border-right-color: #ddd;
838
+ }
839
+
840
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-suggestions-wrapp,
841
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .dgwt-wcas-details-wrapp {
842
+ min-height: 41px !important;
843
+ }
844
+
845
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.rtl):not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
846
+ border-right-color: transparent;
847
+ }
848
+
849
+ .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-details-wrapp .dgwt-wcas-preloader-wrapp {
850
+ display: none!important;
851
+ }
852
+ .dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-is-details:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestion-nores {
853
+ margin-top: 5px;
854
+ }
855
+
856
+ .rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width:not(.dgwt-wcas-details-outside) .dgwt-wcas-suggestions-wrapp {
857
+ border-left-color: transparent;
858
+ }
859
+
860
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
861
+ outline: 0;
862
+ background: #fff;
863
+ box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.06);
864
+ }
865
+
866
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
867
+ color: #999;
868
+ font-weight: normal;
869
+ font-style: italic;
870
+ line-height: normal;
871
+ }
872
+
873
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-input-placeholder {
874
+ color: #999;
875
+ font-weight: normal;
876
+ font-style: italic;
877
+ line-height: normal;
878
+ }
879
+
880
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-moz-placeholder {
881
+ color: #999;
882
+ font-weight: normal;
883
+ font-style: italic;
884
+ line-height: normal;
885
+ }
886
+
887
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::-moz-placeholder {
888
+ color: #999;
889
+ font-weight: normal;
890
+ font-style: italic;
891
+ line-height: normal;
892
+ }
893
+
894
+ .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:-ms-input-placeholder {
895
+ color: #999;
896
+ font-weight: normal;
897
+ font-style: italic;
898
+ line-height: normal;
899
+ }
900
+
901
+ /* Form submit button */
902
+ .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
903
+ overflow: visible;
904
+ position: absolute;
905
+ border: 0;
906
+ padding: 0;
907
+ margin: 0;
908
+ cursor: pointer;
909
+ height: 40px;
910
+ min-width: 50px;
911
+ right: 0;
912
+ left: auto;
913
+ top: 0;
914
+ bottom: auto;
915
+ padding: 0 15px;
916
+ color: #fff;
917
+ -webkit-transition: all 250ms ease-in-out;
918
+ -moz-transition: all 250ms ease-in-out;
919
+ -ms-transition: all 250ms ease-in-out;
920
+ -o-transition: all 250ms ease-in-out;
921
+ transition: all 250ms ease-in-out;
922
+ text-transform: uppercase;
923
+ background-color: #333;
924
+ border-radius: 0 2px 2px 0;
925
+ -webkit-border-radius: 0 2px 2px 0;
926
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
927
+ -webkit-box-shadow: none;
928
+ box-shadow: none;
929
+ -webkit-appearance: none;
930
+ }
931
+
932
+ .rtl .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
933
+ left: 0;
934
+ right: auto;
935
+ }
936
+
937
+ .dgwt-wcas-open .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit {
938
+ border-radius: 0 2px 0 0;
939
+ }
940
+
941
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover {
942
+ opacity: 0.7;
943
+ }
944
+
945
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,
946
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus {
947
+ opacity: 0.7;
948
+ outline: 0;
949
+ }
950
+
951
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
952
+ content: '';
953
+ position: absolute;
954
+ border-width: 8px 8px 8px 0;
955
+ border-style: solid solid solid none;
956
+ border-color: transparent #333 transparent;
957
+ top: 12px;
958
+ left: -6px;
959
+ -webkit-transition: all 250ms ease-in-out;
960
+ -moz-transition: all 250ms ease-in-out;
961
+ -ms-transition: all 250ms ease-in-out;
962
+ -o-transition: all 250ms ease-in-out;
963
+ transition: all 250ms ease-in-out;
964
+ }
965
+
966
+ .rtl .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:before {
967
+ left: auto;
968
+ right: -6px;
969
+ border-width: 8px 0 8px 8px;
970
+ border-style: solid none solid solid;
971
+ }
972
+
973
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover:before {
974
+ border-right-color: #333;
975
+ }
976
+
977
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus:before,
978
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active:before {
979
+ border-right-color: #333;
980
+ }
981
+
982
+ .dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */
983
+ border: 0;
984
+ padding: 0;
985
+ }
986
+
987
+ .dgwt-wcas-ico-magnifier {
988
+ fill: #fff;
989
+ }
990
+
991
+ .dgwt-wcas-details-wrapp .added_to_cart {
992
+ display: block;
993
+ }
994
+
995
+ /*------------------------------------------------------
996
+ Has image
997
+ ---------------------------------------------------------*/
998
+ .dgwt-wcas-has-img .dgwt-wcas-sp > *,
999
+ .dgwt-wcas-has-desc .dgwt-wcas-sp > * {
1000
+ display: block;
1001
+ }
1002
+
1003
+ /*------------------------------------------------------
1004
+ Specific styles for Details panel
1005
+ ---------------------------------------------------------*/
1006
+
1007
+ .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1008
+ min-height: 340px;
1009
+ }
1010
+
1011
+ body:not(.dgwt-wcas-is-details) .dgwt-wcas-suggestion:last-child {
1012
+ border-bottom: none;
1013
+ }
1014
+
1015
+ .dgwt-wcas-is-details .dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
1016
+ min-height: 40px;
1017
+ }
1018
+
1019
+ .dgwt-wcas-is-details .dgwt-wcas-suggestions-wrapp {
1020
+ overflow: visible;
1021
+ }
1022
+
1023
+ .dgwt-wcas-is-details .dgwt-wcas-si {
1024
+ width: 30px;
1025
+ max-width: 100%;
1026
+ box-sizing: border-box;
1027
+ }
1028
+
1029
+ .dgwt-wcas-is-details .dgwt-wcas-sp {
1030
+ display: flex;
1031
+ top: 0;
1032
+ flex-direction: column;
1033
+ height: 100%;
1034
+ justify-content: center;
1035
+ resize: vertical;
1036
+ }
1037
+
1038
+ .dgwt-wcas-is-details .dgwt-wcas-sd {
1039
+ font-size: 11px;
1040
+ line-height: 100%;
1041
+ }
1042
+
1043
+ .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'],
1044
+ .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] {
1045
+ padding-left: 15px;
1046
+ min-height: 0;
1047
+ }
1048
+
1049
+ .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_cat'] .dgwt-wcas-st,
1050
+ .dgwt-wcas-has-img .dgwt-wcas-suggestion[data-taxonomy='product_tag'] .dgwt-wcas-st {
1051
+ padding-left: 0;
1052
+ }
1053
+
1054
+ .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1055
+ height: 50%;
1056
+ max-height: 20px;
1057
+ width: 100%;
1058
+ max-width: 20px;
1059
+ left: 12px;
1060
+ right: auto;
1061
+ opacity: 0.5;
1062
+ fill: #000;
1063
+ }
1064
+
1065
+ .rtl .dgwt-wcas-no-submit .dgwt-wcas-ico-magnifier {
1066
+ left: auto;
1067
+ right: 12px;
1068
+ }
1069
+
1070
+ .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1071
+ padding: 10px 15px 10px 40px;
1072
+ }
1073
+ .rtl .dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
1074
+ padding: 10px 40px 10px 15px;
1075
+ }
1076
+
1077
+ .dgwt-wcas-overlay-mobile-on, .dgwt-wcas-overlay-mobile-on body {
1078
+ overflow: hidden;
1079
+ }
1080
+
1081
+ .dgwt-wcas-om-bar {
1082
+ display: flex;
1083
+ height: 45px;
1084
+ width: 100%;
1085
+ }
1086
+
1087
+ .dgwt-wcas-om-bar .dgwt-wcas-om-return {
1088
+ width: 45px;
1089
+ height: 100%;
1090
+ display: block;
1091
+ background: #ccc;
1092
+ cursor: pointer;
1093
+ position: relative;
1094
+ }
1095
+
1096
+ .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1097
+ width: 23px;
1098
+ height: 23px;
1099
+ position: absolute;
1100
+ left: 12px;
1101
+ top: 12px;
1102
+ }
1103
+
1104
+ .rtl .dgwt-wcas-om-bar .dgwt-wcas-om-return svg {
1105
+ left: 11px;
1106
+ top: 9px;
1107
+ -moz-transform: rotate(180deg);
1108
+ -webkit-transform: rotate(180deg);
1109
+ -o-transform: rotate(180deg);
1110
+ -ms-transform: rotate(180deg);
1111
+ transform: rotate(180deg);
1112
+ }
1113
+
1114
+ .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1115
+ right: 0 !important;
1116
+ }
1117
+
1118
+ .rtl .dgwt-wcas-om-bar .dgwt-wcas-has-submit-off .dgwt-wcas-preloader {
1119
+ left: 4px !important;
1120
+ right: auto !important;
1121
+ }
1122
+
1123
+ .dgwt-wcas-om-bar .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
1124
+ display: none;
1125
+ }
1126
+
1127
+ .dgwt-wcas-om-bar .dgwt-wcas-search-wrapp-mobile {
1128
+ width: calc(100% - 45px);
1129
+ max-width: none;
1130
+ }
1131
+
1132
+ .dgwt-wcas-overlay-mobile {
1133
+ position: absolute;
1134
+ left: 0;
1135
+ right: 0;
1136
+ top: 0;
1137
+ bottom: 0;
1138
+ width: 100%;
1139
+ background: #fff;
1140
+ }
1141
+
1142
+ .dgwt-wcas-overlay-mobile * {
1143
+ box-sizing: border-box;
1144
+ }
1145
+
1146
+ .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input {
1147
+ height: 45px !important;
1148
+ border-top: none;
1149
+ border-right: none;
1150
+ border-left: none;
1151
+ border-radius: 0;
1152
+ font-size: 16px !important;
1153
+ }
1154
+
1155
+ .dgwt-wcas-search-wrapp-mobile input[type="search"].dgwt-wcas-search-input:focus {
1156
+ font-size: 16px !important;
1157
+ }
1158
+
1159
+ .dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
1160
+ left: 0 !important;
1161
+ top: 45px !important;
1162
+ width: 100% !important;
1163
+ height: calc(100% - 45px) !important;
1164
+ position: absolute;
1165
+ overflow-y: auto;
1166
+ border: none;
1167
+ }
1168
+
1169
+ .dgwt-wcas-overlay-mobile-on .dgwt-wcas-enable-mobile-form {
1170
+ display: none;
1171
+ }
1172
+
1173
+ .dgwt-wcas-enable-mobile-form {
1174
+ position: absolute;
1175
+ z-index: 100;
1176
+ left: 0;
1177
+ top: 0;
1178
+ width: 100%;
1179
+ height: 100%;
1180
+ cursor: pointer;
1181
+ }
1182
+
1183
+ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-mobile .dgwt-wcas-search-form {
1184
+ display: none;
1185
+ position: relative;
1186
+ }
1187
+ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-icon-mobile {
1188
+ min-width:0;
1189
+ display: inline-block;
1190
+ width: 28px;
1191
+ height: 28px;
1192
+ }
1193
+ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler {
1194
+ height: 100%;
1195
+ width: 100%;
1196
+ }
1197
+
1198
+ html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-icon-handler .dgwt-wcas-ico-magnifier{
1199
+ opacity: 1;
1200
+ position: static;
1201
+ max-width: none;
1202
+ max-height:none;
1203
+ }
1204
+
1205
+ .dgwt-wcas-overlay-mobile-on .dgwt-wcas-icon-handler {
1206
+ display: none;
1207
+ }
1208
+
1209
+ .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1210
+ height: calc(100% - 45px) !important;
1211
+ }
1212
+
1213
+ .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios {
1214
+ overflow: visible;
1215
+ overflow-x: hidden;
1216
+ }
1217
+
1218
+ .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp {
1219
+ max-height: none !important;
1220
+ height: auto !important;
1221
+ }
1222
+
1223
+ .dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios:not(.dgwt-wcas-theme-flatsome) > *:not(.dgwt-wcas-overlay-mobile) {
1224
+ display: none;
1225
+ }
1226
+
1227
+ /* compatibility with external plugins and themes */
1228
+ body .dgwt-wcas-content-wrapp .zwave,
1229
+ body .dgwt-wcas-content-wrapp .rood {
1230
+ display: none;
1231
+ }
1232
+
1233
+ /*------------------------------------------------------
1234
+ Style with headings
1235
+ ---------------------------------------------------------*/
1236
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion {
1237
+ border-bottom: none;
1238
+ }
1239
+
1240
+ .dgwt-wcas-has-headings .dgwt-wcas-st > span.dgwt-wcas-st--direct-headline {
1241
+ display: none;
1242
+ }
1243
+
1244
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline {
1245
+ pointer-events: none;
1246
+ display: block;
1247
+ font-weight: 500;
1248
+ white-space: nowrap;
1249
+ }
1250
+
1251
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
1252
+ border-bottom: 1px solid #ddd;
1253
+ padding-bottom: 3px;
1254
+ text-transform: uppercase;
1255
+ margin-top: 16px;
1256
+ font-size: 12px;
1257
+ }
1258
+
1259
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,
1260
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1261
+ border-bottom: none;
1262
+ }
1263
+
1264
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
1265
+ padding: 0;
1266
+ }
1267
+
1268
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover,
1269
+ .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected {
1270
+ background: transparent;
1271
+ text-decoration: underline;
1272
+ }
1273
+
1274
+ .dgwt-wcas-is-details .dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
1275
+ min-height: 30px;
1276
  }
assets/css/style.min.css CHANGED
@@ -1 +1 @@
1
- .dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;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-search-wrapp .product-title{color:#333;display:block;line-height:110%;margin:0}.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;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.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}.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more{justify-content:center}.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}.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-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{padding:15px 10px;height:100%}.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{margin-bottom:15px;text-decoration:none;display:flex;align-items:center;justify-content:left}.dgwt-wcas-tax-product-details:after{content:'';clear:both;display:block}.dgwt-wcas-details-wrapp .dgwt-wcas-pd-title{margin-bottom:8px}.dgwt-wcas-tpd-image{width:60px;margin-right:15px}.dgwt-wcas-pd-rest{justify-content:center;display:flex;flex-direction:column;width:100%;padding-left:10px}.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 .product-title{display:block;line-height:100%;font-size:13px;font-weight:500;letter-spacing:0;margin:0 0 8px;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;width:145px}.dgwt-wcas-suggestion-nores{pointer-events:none;opacity:.45}.dgwt-wcas-pd-price{font-size:14px;line-height:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:145px;color:#777;margin-top:3px;font-weight:lighter}.dgwt-wcas-pd-price del .amount{font-weight:lighter;background:0 0;font-size:90%;opacity:.6}.dgwt-wcas-pd-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-pd-details{display:flex;justify-content:left}.dgwt-wcas-pd-image,.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-pd-image img,.dgwt-wcas-tpd-image img{display:block;max-width:100%;width:100%;height:auto}.rtl .dgwt-wcas-pd-image,.rtl .dgwt-wcas-tpd-image{float:right;margin-right:0;margin-left:15px}.rtl .dgwt-wcas-pd-rest,.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-pd-desc{font-size:13px;line-height:157%;margin:12px 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-pd-addtc .add_to_cart_button,.dgwt-wcas-pd-addtc .add_to_cart_inline{margin:0}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-image:url(../img/preloader.png);background-repeat:no-repeat;background-position:right 13px center;background-size:auto 22px}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url(../img/preloader.gif)}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;background-image:url(../img/close.png);background-repeat:no-repeat;background-position:right 15px center;background-size:auto 18px;opacity:.6;-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}.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%;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) .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}.rtl.dgwt-wcas-open.dgwt-wcas-nores.dgwt-wcas-full-width .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)}.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;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-ico-magnifier{fill:#fff}.dgwt-wcas-details-inner .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-details-more-products{padding:15px 0 10px 0;display:block;border-top:1px solid #eee;text-align:center;font-size:14px;text-transform:uppercase}.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-no-submit .dgwt-wcas-ico-magnifier{height:50%;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}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar .dgwt-wcas-om-return{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative}.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-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}.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}.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}.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 body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{height:calc(100% - 45px)!important}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios{overflow:visible;overflow-x:hidden}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios: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-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}
1
+ .dgwt-wcas-block-scroll{overflow:hidden}.dgwt-wcas-search-wrapp{position:relative;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;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow-y:auto}.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}.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}.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-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-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)}.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-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-image:url(../img/preloader.png);background-repeat:no-repeat;background-position:right 13px center;background-size:auto 22px}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.dgwt-wcas-inner-preloader{background-image:url(../img/preloader.gif)}}.dgwt-wcas-close:not(.dgwt-wcas-inner-preloader){cursor:pointer;background-image:url(../img/close.png);background-repeat:no-repeat;background-position:right 15px center;background-size:auto 18px;opacity:.6;-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}.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%;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)}.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;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-ico-magnifier{fill:#fff}.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-no-submit .dgwt-wcas-ico-magnifier{height:50%;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}.dgwt-wcas-om-bar{display:flex;height:45px;width:100%}.dgwt-wcas-om-bar .dgwt-wcas-om-return{width:45px;height:100%;display:block;background:#ccc;cursor:pointer;position:relative}.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-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}.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}.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}.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 body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{height:calc(100% - 45px)!important}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios{overflow:visible;overflow-x:hidden}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios .dgwt-wcas-suggestions-wrapp{max-height:none!important;height:auto!important}.dgwt-wcas-overlay-mobile-on body.dgwt-wcas-is-ios: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-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}
assets/img/details-box.png DELETED
Binary file
assets/img/logo-128.png CHANGED
Binary file
assets/img/placeholder.png CHANGED
Binary file
assets/img/product-preview.png ADDED
Binary file
assets/img/sample-product.png DELETED
Binary file
assets/js/admin.js CHANGED
@@ -1374,12 +1374,21 @@
1374
  },
1375
  onTypeSearchPlaceholder: function ($el, value) {
1376
  var _this = this;
 
 
 
1377
  _this.searchInput.attr('placeholder', value);
1378
  },
1379
  onTypeSearchNoResultsText: function ($el, value) {
 
 
 
1380
  $('.js-dgwt-wcas-suggestion-nores span').text(value);
1381
  },
1382
  onTypeSearchSeeAllResultsText: function ($el, value) {
 
 
 
1383
  $('.js-dgwt-wcas-st-more-label').text(value);
1384
  },
1385
  fixSizesInit: function(){
1374
  },
1375
  onTypeSearchPlaceholder: function ($el, value) {
1376
  var _this = this;
1377
+ if(value.length == 0){
1378
+ value = dgwt_wcas.labels.search_placeholder;
1379
+ }
1380
  _this.searchInput.attr('placeholder', value);
1381
  },
1382
  onTypeSearchNoResultsText: function ($el, value) {
1383
+ if(value.length == 0){
1384
+ value = dgwt_wcas.labels.no_results;
1385
+ }
1386
  $('.js-dgwt-wcas-suggestion-nores span').text(value);
1387
  },
1388
  onTypeSearchSeeAllResultsText: function ($el, value) {
1389
+ if(value.length == 0){
1390
+ value = dgwt_wcas.labels.show_more;
1391
+ }
1392
  $('.js-dgwt-wcas-st-more-label').text(value);
1393
  },
1394
  fixSizesInit: function(){
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),s.data.loop&&t.heartbeat())}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},i={actionTriggerClass:"js-dgwt-wcas-bc-wipe-all",switchLeftLabelClass:"js-dgwt-wcas-switch-left",switchRightLabelClass:"js-dgwt-wcas-switch-right",switcherClass:"js-dgwt-wcas-switcher",remindMeLaterClass:"js-dgwt-wcas-bc-remind-me",applyChanges:function(){jQuery(document).on("click","."+this.actionTriggerClass,function(t){t.preventDefault();var e=s(this);e.attr("disabled","disabled"),jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_keep_latest"},success:function(t){void 0!==t.success&&t.success&&(s(".dgwt_wcas_basic-tab").click(),s(".js-dgwt-wcas-bc-notice").fadeOut(400,function(){s(this).remove()}))},complete:function(){e.removeAttr("disabled")}})})},switchAjaxRequest:function(t,e){var a=this,i=s(".dgwt-wcas-bc-switcher"),o=s(".dgwt-wcas-bc-error"),n=s(".dgwt-wcas-bc-success"),c=s(".js-dgwt-wcas-bc-spinner");i.addClass("dgwt-wcas-non-events"),c.removeClass("dgwt-wcas-hidden"),o.addClass("dgwt-wcas-hidden"),n.addClass("dgwt-wcas-hidden"),t="enable"===t?"enable":"disable",jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_toggle",state:t},success:function(s){void 0!==s.success&&s.success?(e(),"disable"===t&&a.flashStepsContainer(),setTimeout(function(){n.removeClass("dgwt-wcas-hidden")},500),setTimeout(function(){n.addClass("dgwt-wcas-hidden")},2e3)):(i.removeClass("dgwt-wcas-non-events"),c.addClass("dgwt-wcas-hidden"),o.removeClass("dgwt-wcas-hidden"))},error:function(){o.removeClass("dgwt-wcas-hidden")},complete:function(){i.removeClass("dgwt-wcas-non-events"),c.addClass("dgwt-wcas-hidden")}})},enableBC:function(){var t=this;t.switchAjaxRequest("enable",function(){s("."+t.switcherClass).attr("checked",!0),s("."+t.switchLeftLabelClass).addClass("dgwt-wcas-toggler--is-active"),s("."+t.switchRightLabelClass).removeClass("dgwt-wcas-toggler--is-active"),s(".dgwt-wcas-toggle").addClass("dgwt-wcas-toggle--mute"),s(".js-dgwt-wcas-todo-old").removeClass("dgwt-wcas-hidden"),s(".js-dgwt-wcas-todo-latest").addClass("dgwt-wcas-hidden")})},disableBC:function(){var t=this;t.switchAjaxRequest("disable",function(){s("."+t.switcherClass).attr("checked",!1),s("."+t.switchRightLabelClass).addClass("dgwt-wcas-toggler--is-active"),s("."+t.switchLeftLabelClass).removeClass("dgwt-wcas-toggler--is-active"),s(".dgwt-wcas-toggle").removeClass("dgwt-wcas-toggle--mute"),s(".js-dgwt-wcas-todo-old").addClass("dgwt-wcas-hidden"),s(".js-dgwt-wcas-todo-latest").removeClass("dgwt-wcas-hidden")})},remindMeLater:function(){jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_remind_me_later"},success:function(t){void 0!==t.success&&t.success&&s(".js-dgwt-wcas-bc-notice").fadeOut(400,function(){s(this).remove()})}})},flashStepsContainer:function(){var t=s(".dgwt-wcas-bc-todo-wrapp");t.addClass("dgwt-wcas-anim-shake"),setTimeout(function(){t.removeClass("dgwt-wcas-anim-shake")},2e3)},switchListeners:function(){var t=this;s("."+t.switchLeftLabelClass).on("click",function(){t.enableBC()}),s("."+t.switchRightLabelClass).on("click",function(){t.disableBC()}),s("."+t.switcherClass).on("click",function(e){e.preventDefault(),s("."+t.switcherClass).is(":checked")?t.enableBC():t.disableBC()}),s("."+t.remindMeLaterClass).on("click",function(s){s.preventDefault(),t.remindMeLater()})},init:function(){this.applyChanges(),this.switchListeners()}},o={init:function(){var t=s(".dgwt-wcas-selectize");t.length>0&&t.each(function(){var t=s(this).data("options"),e=[];if(t.length>0){t=JSON.parse('["'+decodeURI(t.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var a="";t.forEach(function(s,t){if((t+1)%2==0){var i={value:s,label:a};e.push(i),a=""}a=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"value",labelField:"label",searchField:["value","label"],create:function(s){return{value:s,label:s}},options:e})})}},n={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:"top",trigger:"hover",html:!0})}})}},c={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 t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var a=this,i=s("."+a.advClass);i.length>0&&(i.addClass(a.highlightClass),i.addClass(a.transClass),"show"===t&&i.fadeIn(500,function(){setTimeout(function(){i.removeClass(a.highlightClass),setTimeout(function(){i.removeClass(a.transClass),e.refresh()},500)},500)}),"hide"===t&&setTimeout(function(){i.removeClass(a.transClass),i.fadeOut(500,function(){i.removeClass(a.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_matching_tags","show_matching_brands","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["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 i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,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(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var c=[];for(a=0;a<n.length;a++){var d=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");d.length>0&&c.push(d)}var r=c.length;if(c.length>0)for(var g=i-c.length,l=c.length-1;g>0;){var w=c[l].clone();w.addClass("dgwt-wcas-suggestion-duplicated"),w.removeClass("dgwt-wcas-suggestion-selected"),c[l].after(w),r++,--l<0&&(l=c.length-1),g--}r>i&&t.val(r)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(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(s(".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 t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/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"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("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>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-ico-magnifier").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-ico-magnifier").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}},s(document).ready(function(){var d,r;(d=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&d.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),(r=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&r.find("td").attr("colspan",2),i.init(),a.init(),o.init(),n.init(),c.init(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
1
+ !function(s){var t={inputSel:"dgwt-wcas-options-toggle input[type=radio]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=s('[name="'+t+'"]').closest("."+this.groupSel),a=s('[name="'+t+'"]:checked').val(),i="";this.hideAll(e),(a=a.replace("_","-")).length>0&&(i="wcas-opt-"+a),s("."+i).length>0&&s("."+i).fadeIn()},hideAll:function(s){s.find('tr[class*="wcas-opt-"]').hide()},registerListeners:function(){var t=this;s("."+t.inputSel).on("change",function(){t.reloadChoices(s(this).attr("name"))})},init:function(){var t=this,e=s("."+t.inputSel+":checked");e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this).attr("name"))}))}},e={inputSel:"dgwt-wcas-options-cb-toggle input[type=checkbox]",groupSel:"dgwt_wcas_settings-group",reloadChoices:function(t){var e=t.is(":checked"),a=this.getGroupSelector(t);s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide(),e&&s("."+a).each(function(){s(this).hasClass("js-dgwt-wcas-adv-settings")&&s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")||s(this).fadeIn()})},getGroupSelector(t){var e=t.closest(".dgwt-wcas-options-cb-toggle"),a="",i=e.attr("class").split(/\s+/);return s.each(i,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(a=t)}),a},registerListeners:function(){var t=this;s(document).on("change","."+t.inputSel,function(){t.reloadChoices(s(this))})},refresh:function(){var t=this,e=s("."+t.inputSel);e.length>0&&e.each(function(){var e=s(this).is(":checked"),a=t.getGroupSelector(s(this));e?s("."+a).fadeIn():s("."+a+":not(.dgwt-wcas-options-cb-toggle)").hide()})},init:function(){var t=this,e=s("."+t.inputSel);e.length>0&&(t.registerListeners(),e.each(function(){t.reloadChoices(s(this))}))}},a={actionTriggerClass:"js-ajax-build-index",actionStopTriggerClass:"js-ajax-stop-build-index",indexingWrappoerClass:"js-dgwt-wcas-indexing-wrapper",getWrapper:function(){return s("."+this.indexingWrappoerClass).closest(".dgwt-wcas-settings-info")},registerListeners:function(){var t=this;s(document).on("click","."+t.actionTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s(".dgwt-wcas-settings-info").addClass("wcas-ajax-build-index-wait");var i=!!a.hasClass("js-ajax-build-index-emergency");i&&(s(".dgwt-wcas-indexing-header__title").text("[Emergency mode] Wait... Indexing in progress"),s(".dgwt-wcas-indexing-header__troubleshooting, .dgwt-wcas-indexing-header__actions, .js-dgwt-wcas-indexer-details").hide()),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index",emergency:i},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled"),s(".dgwt-wcas-settings-info").removeClass("wcas-ajax-build-index-wait"),i&&window.location.reload()}})}),s(document).on("click","."+t.actionStopTriggerClass,function(e){e.preventDefault();var a=s(this);a.attr("disabled","disabled"),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_stop_build_index"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),t.heartbeat())},complete:function(){a.removeAttr("disabled")}})})},heartbeat:function(){var t=this;setTimeout(function(){s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_build_index_heartbeat"},success:function(s){void 0!==s&&s.success&&(t.getWrapper().html(s.data.html),s.data.loop&&t.heartbeat())}})},1e3)},detailsToggle:function(){var t;s(document).on("click",".js-dgwt-wcas-indexing-details-trigger",function(e){e.preventDefault();var a=s(".js-dgwt-wcas-indexer-details");a.hasClass("show")?(a.removeClass("show"),a.addClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("show").removeClass("hide"),s(".js-dgwt-wcas-indexing__hided").addClass("hide").removeClass("show"),t=!1):(a.addClass("show"),a.removeClass("hide"),s(".js-dgwt-wcas-indexing__showd").addClass("hide").removeClass("show"),s(".js-dgwt-wcas-indexing__hided").addClass("show").removeClass("hide"),t=!0),s.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_index_details_toggle",display:t}})})},init:function(){this.registerListeners(),s("."+this.indexingWrappoerClass).length>0&&this.heartbeat(),this.detailsToggle()}},i={actionTriggerClass:"js-dgwt-wcas-bc-wipe-all",switchLeftLabelClass:"js-dgwt-wcas-switch-left",switchRightLabelClass:"js-dgwt-wcas-switch-right",switcherClass:"js-dgwt-wcas-switcher",remindMeLaterClass:"js-dgwt-wcas-bc-remind-me",applyChanges:function(){jQuery(document).on("click","."+this.actionTriggerClass,function(t){t.preventDefault();var e=s(this);e.attr("disabled","disabled"),jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_keep_latest"},success:function(t){void 0!==t.success&&t.success&&(s(".dgwt_wcas_basic-tab").click(),s(".js-dgwt-wcas-bc-notice").fadeOut(400,function(){s(this).remove()}))},complete:function(){e.removeAttr("disabled")}})})},switchAjaxRequest:function(t,e){var a=this,i=s(".dgwt-wcas-bc-switcher"),o=s(".dgwt-wcas-bc-error"),n=s(".dgwt-wcas-bc-success"),c=s(".js-dgwt-wcas-bc-spinner");i.addClass("dgwt-wcas-non-events"),c.removeClass("dgwt-wcas-hidden"),o.addClass("dgwt-wcas-hidden"),n.addClass("dgwt-wcas-hidden"),t="enable"===t?"enable":"disable",jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_toggle",state:t},success:function(s){void 0!==s.success&&s.success?(e(),"disable"===t&&a.flashStepsContainer(),setTimeout(function(){n.removeClass("dgwt-wcas-hidden")},500),setTimeout(function(){n.addClass("dgwt-wcas-hidden")},2e3)):(i.removeClass("dgwt-wcas-non-events"),c.addClass("dgwt-wcas-hidden"),o.removeClass("dgwt-wcas-hidden"))},error:function(){o.removeClass("dgwt-wcas-hidden")},complete:function(){i.removeClass("dgwt-wcas-non-events"),c.addClass("dgwt-wcas-hidden")}})},enableBC:function(){var t=this;t.switchAjaxRequest("enable",function(){s("."+t.switcherClass).attr("checked",!0),s("."+t.switchLeftLabelClass).addClass("dgwt-wcas-toggler--is-active"),s("."+t.switchRightLabelClass).removeClass("dgwt-wcas-toggler--is-active"),s(".dgwt-wcas-toggle").addClass("dgwt-wcas-toggle--mute"),s(".js-dgwt-wcas-todo-old").removeClass("dgwt-wcas-hidden"),s(".js-dgwt-wcas-todo-latest").addClass("dgwt-wcas-hidden")})},disableBC:function(){var t=this;t.switchAjaxRequest("disable",function(){s("."+t.switcherClass).attr("checked",!1),s("."+t.switchRightLabelClass).addClass("dgwt-wcas-toggler--is-active"),s("."+t.switchLeftLabelClass).removeClass("dgwt-wcas-toggler--is-active"),s(".dgwt-wcas-toggle").removeClass("dgwt-wcas-toggle--mute"),s(".js-dgwt-wcas-todo-old").addClass("dgwt-wcas-hidden"),s(".js-dgwt-wcas-todo-latest").removeClass("dgwt-wcas-hidden")})},remindMeLater:function(){jQuery.ajax({url:ajaxurl,type:"post",data:{action:"dgwt_wcas_bc_remind_me_later"},success:function(t){void 0!==t.success&&t.success&&s(".js-dgwt-wcas-bc-notice").fadeOut(400,function(){s(this).remove()})}})},flashStepsContainer:function(){var t=s(".dgwt-wcas-bc-todo-wrapp");t.addClass("dgwt-wcas-anim-shake"),setTimeout(function(){t.removeClass("dgwt-wcas-anim-shake")},2e3)},switchListeners:function(){var t=this;s("."+t.switchLeftLabelClass).on("click",function(){t.enableBC()}),s("."+t.switchRightLabelClass).on("click",function(){t.disableBC()}),s("."+t.switcherClass).on("click",function(e){e.preventDefault(),s("."+t.switcherClass).is(":checked")?t.enableBC():t.disableBC()}),s("."+t.remindMeLaterClass).on("click",function(s){s.preventDefault(),t.remindMeLater()})},init:function(){this.applyChanges(),this.switchListeners()}},o={init:function(){var t=s(".dgwt-wcas-selectize");t.length>0&&t.each(function(){var t=s(this).data("options"),e=[];if(t.length>0){t=JSON.parse('["'+decodeURI(t.replace(/&/g,'","').replace(/=/g,'","'))+'"]');var a="";t.forEach(function(s,t){if((t+1)%2==0){var i={value:s,label:a};e.push(i),a=""}a=s})}s(this).selectize({persist:!1,maxItems:null,valueField:"value",labelField:"label",searchField:["value","label"],create:function(s){return{value:s,label:s}},options:e})})}},n={init:function(){var t=s(".js-dgwt-wcas-tooltip");t.length>0&&t.each(function(){var t=s(this)[0],e=s(this).data("tooltip-html-el");if(e){new DgwtWcasTooltip(t,{title:s("."+e+" > .dgwt-wcas-tooltip-wrapper")[0],placement:"top",trigger:"hover",html:!0})}})}},c={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 t=this;s(document).on("click",".js-dgwt-wcas-settings__advanced",function(){var e;e=s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--disabled")?"show":"hide",t.saveChoice(e)})},setStartingState:function(){var t=s("."+this.advClass);t.length>0&&(s(".js-dgwt-wcas-adv-settings-toggle").hasClass("woocommerce-input-toggle--enabled")?(t.show(),e.refresh()):t.hide())},saveChoice:function(t){s(".js-dgwt-wcas-settings__advanced").append('<span class="dgwt-wcas-adv-settings-saving">saving...</span>'),s.ajax({url:ajaxurl,data:{action:"dgwt_wcas_adv_settings",adv_settings_value:t}}).done(function(t){s(".dgwt-wcas-adv-settings-saving").remove()});var e=s(".js-dgwt-wcas-adv-settings-toggle");"show"===t&&(e.removeClass("woocommerce-input-toggle--disabled"),e.addClass("woocommerce-input-toggle--enabled")),"hide"===t&&(e.removeClass("woocommerce-input-toggle--enabled"),e.addClass("woocommerce-input-toggle--disabled")),this.toggleAdvancedOpt(t)},toggleAdvancedOpt:function(t){var a=this,i=s("."+a.advClass);i.length>0&&(i.addClass(a.highlightClass),i.addClass(a.transClass),"show"===t&&i.fadeIn(500,function(){setTimeout(function(){i.removeClass(a.highlightClass),setTimeout(function(){i.removeClass(a.transClass),e.refresh()},500)},500)}),"hide"===t&&setTimeout(function(){i.removeClass(a.transClass),i.fadeOut(500,function(){i.removeClass(a.highlightClass)})},500))}};window.DGWT_WCAS_SEARCH_PREVIEW={previewWrapper:{},searchWrapp:{},suggestionWrapp:{},searchInput:{},init:function(){this.previewWrapper=s(".js-dgwt-wcas-preview"),this.searchWrapp=s(".js-dgwt-wcas-search-wrapp"),this.suggestionWrapp=s(".js-dgwt-wcas-suggestions-wrapp"),this.detailsWrapp=s(".js-dgwt-wcas-details-wrapp"),this.searchInput=s(".js-dgwt-wcas-search-input"),this.onChangeHandler(),this.onColorHandler(),this.onTypeHandler(),this.disableSubmit(),this.noResultsHandler(),this.fixSizesInit()},isChecked:function(s){return!!(s.length>0&&s.is(":checked"))},isColor:function(s){return"string"==typeof s&&7===s.length&&"#"===s.charAt(0)},camelCase:function(s){for(var t=s.split("_"),e="",a=0;a<t.length;a++)e+=t[a].charAt(0).toUpperCase()+t[a].slice(1);return e},disableSubmit:function(){var t,e;s(".js-dgwt-wcas-preview-source").on("click",function(a){a.preventDefault();var i=a.pageX-100,o=a.pageY+10;void 0!==t&&(clearTimeout(t),e&&e.remove()),s("body").append('<div class="dgwt-wcas-click-alert">No interaction! This is only a preview.</div>'),(e=s(".dgwt-wcas-click-alert")).css({left:i,top:o}),s(".dgwt-wcas-preview-source").addClass("dgwt-wcas-preview-source-no-click"),t=setTimeout(function(){e.fadeOut(500,function(){s(this).remove(),s(".dgwt-wcas-preview-source").removeClass("dgwt-wcas-preview-source-no-click")})},2e3)})},noResultsHandler:function(){var t=this,e=".js-dgwt-wcas-preview .dgwt-wcas-suggestion:not(.js-dgwt-wcas-suggestion-nores)",a="input[id*='search_no_results_text']";s(document).on("focus",a,function(){s(e).addClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").removeClass("dgwt-wcas-hide"),t.detailsWrapp.addClass("dgwt-wcas-hide"),t.suggestionWrapp.addClass("dgwt-wcas-preview-nores")}),s(document).on("blur",a,function(){s(e).removeClass("dgwt-wcas-hide"),s(".js-dgwt-wcas-suggestion-nores").addClass("dgwt-wcas-hide"),t.detailsWrapp.removeClass("dgwt-wcas-hide"),t.suggestionWrapp.removeClass("dgwt-wcas-preview-nores")})},onChangeHandler:function(){for(var t=this,e=["show_submit_button","max_form_width","show_product_image","show_product_sku","show_product_desc","show_product_price","show_matching_categories","show_matching_tags","show_matching_brands","show_matching_posts","show_matching_pages","show_grouped_results","suggestions_limit","show_details_box"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onChange"+t.camelCase(e[a]);"function"==typeof t[n]&&t[n](o,o.val()),s(document).on("change",i,function(){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onChange"+t.camelCase(n),t[n](s(this),this.value)})}},onColorHandler:function(){for(var t=this,e=["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 i="input[id*='"+e[a]+"']",o=s(i),n="onColor"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("change",i,function(e){n=s(this).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onColor"+t.camelCase(n),t[n](s(this),this.value)})}},onColorChangeHandler:function(s,t){var e=s.attr("id").replace("]","").replace("dgwt_wcas_settings[","");this[e="onColor"+this.camelCase(e)](s,t)},onTypeHandler:function(){for(var t=this,e=["search_submit_text","search_placeholder","search_no_results_text","search_see_all_results_text"],a=0;a<e.length;a++){var i="input[id*='"+e[a]+"']",o=s(i),n="onType"+t.camelCase(e[a]);t[n](o,o.val()),s(document).on("input",i,function(e){n=s(e.target).attr("id").replace("]","").replace("dgwt_wcas_settings[",""),n="onType"+t.camelCase(n),t[n](s(e.target),this.value)})}},onChangeMaxFormWidth:function(t,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(s("input[id*='show_details_box']"))},onChangeShowSubmitButton:function(t,e){var a=s(".js-dgwt-wcas-search-submit");if(this.isChecked(t)){this.searchWrapp.addClass("dgwt-wcas-has-submit"),this.searchWrapp.removeClass("dgwt-wcas-no-submit"),a.show(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").hide();var i=s("input[id*='bg_submit_color']"),o=s("input[id*='text_submit_color']");this.onColorBgSubmitColor(i,i.val()),this.onColorTextSubmitColor(o,o.val())}else this.searchWrapp.addClass("dgwt-wcas-no-submit"),this.searchWrapp.removeClass("dgwt-wcas-has-submit"),a.hide(),s(".dgwt-wcas-sf-wrapp > .dgwt-wcas-ico-magnifier").show()},onChangeShowProductImage:function(t,e){var a=s(".js-dgwt-wcas-si"),i=s(".js-dgwt-wcas-content-wrapp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-img"),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-st").remove(),s(".dgwt-wcas-suggestion-product > .dgwt-wcas-sp").remove(),i.show(),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-img"),i.each(function(){s(this).closest(".dgwt-wcas-suggestion-product").append(s(this).html())}),i.hide(),a.hide())},onChangeShowProductSku:function(t,e){var a=s(".js-dgwt-wcas-sku");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-sku"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-sku"),a.hide())},onChangeShowProductDesc:function(t,e){var a=s(".js-dgwt-wcas-sd");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-desc"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-desc"),a.hide())},onChangeShowProductPrice:function(t,e){var a=s(".js-dgwt-wcas-sp");this.isChecked(t)?(this.suggestionWrapp.addClass("dgwt-wcas-has-price"),a.show()):(this.suggestionWrapp.removeClass("dgwt-wcas-has-price"),a.hide())},onChangeShowMatchingCategories:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-cat"),i=s(".dgwt-wcas-suggestion-cat");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingTags:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-tag"),i=s(".dgwt-wcas-suggestion-tag");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingBrands:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-brand"),i=s(".dgwt-wcas-suggestion-brand");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPosts:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-post"),i=s(".dgwt-wcas-suggestion-post");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowMatchingPages:function(t,e){var a=s(".dgwt-wcas-suggestion-headline-page"),i=s(".dgwt-wcas-suggestion-page");this.isChecked(t)?(a.show(),i.show(),i.removeClass("js-dgwt-wcas-suggestion-hidden"),this.onChangeShowGroupedResults(s("input[id*='show_grouped_results']"))):(a.hide(),i.hide(),i.addClass("js-dgwt-wcas-suggestion-hidden"));var o=s("input[id*='suggestions_limit']");this.onChangeSuggestionsLimit(o,o.val())},onChangeShowGroupedResults:function(t,e){var a=s(".dgwt-wcas-st--direct-headline"),i=s(".dgwt-wcas-suggestion-headline");this.isChecked(t)?(a.addClass("dgwt-wcas-hidden"),this.suggestionWrapp.addClass("dgwt-wcas-has-headings"),s(".dgwt-wcas-suggestion-headline").show(),this.isChecked(s("input[id*='show_matching_categories']"))||s(".dgwt-wcas-suggestion-headline-cat").hide(),this.isChecked(s("input[id*='show_matching_tags']"))||s(".dgwt-wcas-suggestion-headline-tag").hide(),this.isChecked(s("input[id*='show_matching_brands']"))||s(".dgwt-wcas-suggestion-headline-brand").hide(),this.isChecked(s("input[id*='show_matching_posts']"))||s(".dgwt-wcas-suggestion-headline-post").hide(),this.isChecked(s("input[id*='show_matching_pages']"))||s(".dgwt-wcas-suggestion-headline-page").hide()):(a.removeClass("dgwt-wcas-hidden"),i.hide(),this.suggestionWrapp.removeClass("dgwt-wcas-has-headings"))},onChangeSuggestionsLimit:function(t,e){setTimeout(function(){var a=0,i=7,o=s(".dgwt-wcas-suggestion-duplicated"),n=["brand","cat","tag","post","page","product"];e.length>0&&"0"!=e&&(i=Math.abs(e)),o.length>0&&o.remove();var c=[];for(a=0;a<n.length;a++){var d=s(".dgwt-wcas-suggestion-"+n[a]+":not(.js-dgwt-wcas-suggestion-hidden)");d.length>0&&c.push(d)}var r=c.length;if(c.length>0)for(var g=i-c.length,l=c.length-1;g>0;){var w=c[l].clone();w.addClass("dgwt-wcas-suggestion-duplicated"),w.removeClass("dgwt-wcas-suggestion-selected"),c[l].after(w),r++,--l<0&&(l=c.length-1),g--}r>i&&t.val(r)},10)},onChangeShowDetailsBox:function(t,e){var a=this;a.isChecked(t)?(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(s(".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 t=getComputedStyle(a.searchWrapp[0]).width;(t=Math.round(parseFloat(t.replace("px",""))))%2==0?(a.suggestionWrapp.css("width",Math.round(t/2)),a.detailsWrapp.css("width",Math.round(t/2))):(a.suggestionWrapp.css("width",Math.floor(t/2)),a.detailsWrapp.css("width",Math.ceil(t/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"),s(".dgwt-wcas-suggestion-product").removeClass("dgwt-wcas-suggestion-selected"),a.suggestionWrapp.css("width",""),a.detailsWrapp.css("width",""))},onColorBgInputColor:function(s,t){this.isColor(t)?this.searchInput.css("background-color",t):this.searchInput.css("background-color","")},onColorTextInputColor:function(t,e){var a="dgwt-wcas-preview-placeholder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-search-input::placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-webkit-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input::-moz-placeholder{opacity: 0.3; color:"+e+"!important;}",i+=".dgwt-wcas-search-input:-ms-input-placeholder{opacity: 0.3; color:"+e+"!important;}",i+="</style>",s("head").append(i),this.searchInput.css("color",e)}else{this.searchInput.css("color","");var o=s("."+a);o.length>0&&o.remove()}},onColorBorderInputColor:function(s,t){this.isColor(t)?this.searchInput.css("border-color",t):this.searchInput.css("border-color","")},onColorBgSubmitColor:function(t,e){if(this.isChecked(s("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>",s("head").append(a)}else{var i=s(".dgwt-wcas-preview-submit-style");i.length>0&&i.remove()}},onColorTextSubmitColor:function(t,e){this.isChecked(s("input[id*='show_submit_button']"))&&this.isColor(e)?(s(".js-dgwt-wcas-search-submit").css("color",e),s(".dgwt-wcas-ico-magnifier").css("fill",e)):(this.searchInput.css("background-color",""),s(".js-dgwt-wcas-search-submit").css("color",""),s(".dgwt-wcas-ico-magnifier").css("fill",""))},onColorSugBgColor:function(t,e){var a="dgwt-wcas-preview-sugbgcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp",i+="{background-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHoverColor:function(t,e){this.isColor(e)?setTimeout(function(){s(".dgwt-wcas-suggestion-selected").css("background-color",e)},50):s(".dgwt-wcas-suggestion-selected").css("background-color","")},onColorSugTextColor:function(t,e){var a="dgwt-wcas-preview-sugtextcol-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp *,",i+=".dgwt-wcas-details-wrapp *,",i+=".dgwt-wcas-sd,",i+=".dgwt-wcas-suggestion *",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugHighlightColor:function(t,e){var a="dgwt-wcas-preview-sughighlight-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-st strong,",i+=".dgwt-wcas-sd strong",i+="{color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onColorSugBorderColor:function(t,e){var a="dgwt-wcas-preview-sugborder-style";if(this.isColor(e)){var i='<style class="'+a+'">';i+=".dgwt-wcas-suggestions-wrapp,",i+=".dgwt-wcas-details-wrapp,",i+=".dgwt-wcas-suggestion,",i+=".dgwt-wcas-datails-title,",i+=".dgwt-wcas-details-more-products",i+="{border-color: "+e+"!important;}",i+="</style>",s("head").append(i)}else{var o=s("."+a);o.length>0&&o.remove()}},onTypeSearchSubmitText:function(t,e){var a=s(".js-dgwt-wcas-search-submit-l"),i=s(".js-dgwt-wcas-search-submit-m");e.length>0?(a.text(e),a.show(),i.hide()):(a.text(""),a.hide(),i.show())},onTypeSearchPlaceholder:function(s,t){0==t.length&&(t=dgwt_wcas.labels.search_placeholder),this.searchInput.attr("placeholder",t)},onTypeSearchNoResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.no_results),s(".js-dgwt-wcas-suggestion-nores span").text(e)},onTypeSearchSeeAllResultsText:function(t,e){0==e.length&&(e=dgwt_wcas.labels.show_more),s(".js-dgwt-wcas-st-more-label").text(e)},fixSizesInit:function(){var t=this;s(document).on("click","#dgwt_wcas_autocomplete-tab",function(){t.onChangeShowDetailsBox(s("input[id*='show_details_box']"))})}},s(document).ready(function(){var d,r;(d=s(".js-dgwt-wcas-settings-margin-nob")).length>0&&d.each(function(){var t=s(this).find("td .dgwt-wcas-fieldset");if(t.length>0){var e=s(this).prev(".js-dgwt-wcas-settings-margin");if(e.length>0){var a=s(this).attr("class").split(/\s+/),i="";s.each(a,function(s,t){-1!==t.indexOf("js-dgwt-wcas-cbtgroup-")&&(i=t)});var o=t.clone(!0,!0);o.addClass("dgwt-wcas-settings-margin-nob"),i&&o.addClass(i),o.appendTo(e.find("td")),s(this).remove()}}}),t.init(),e.init(),(r=s(".js-dgwt-wcas-sgs-autocolspan")).length>0&&r.find("td").attr("colspan",2),i.init(),a.init(),o.init(),n.init(),c.init(),window.DGWT_WCAS_SEARCH_PREVIEW.init()})}(jQuery);
assets/js/search.js CHANGED
@@ -143,6 +143,7 @@
143
  that.isLocal = false;
144
  that.suggestionsContainer = null;
145
  that.detailsContainer = null;
 
146
  that.noSuggestionsContainer = null;
147
  that.options = $.extend(true, {}, Autocomplete.defaults, options);
148
  that.classes = {
@@ -213,7 +214,6 @@
213
  lookupFilter: _lookupFilter,
214
  paramName: 'query',
215
  transformResult: _transformResult,
216
- showNoSuggestionNotice: false,
217
  noSuggestionNotice: 'No results',
218
  orientation: 'bottom',
219
  forceFixPosition: false,
@@ -500,7 +500,6 @@
500
  $detailsContainer.css({
501
  'z-index': (options.zIndex - 1)
502
  });
503
- $('body').addClass('dgwt-wcas-is-details');
504
  }
505
 
506
  options.onSearchComplete = function () {
@@ -665,6 +664,53 @@
665
 
666
  return false;
667
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
668
  getFormOffset: function () {
669
  var that = this,
670
  $form = that.getFormWrapper(),
@@ -1029,7 +1075,7 @@
1029
  }
1030
 
1031
  // Brake if there are no suggestions
1032
- if (suggestion == null || suggestion.type == 'undefined') {
1033
  return;
1034
  }
1035
 
@@ -1100,6 +1146,13 @@
1100
  for(var i = 0 ; i < result.items.length ; i++){
1101
  var cacheKey = result.items[i]['objectID'];
1102
  that.cachedDetails[cacheKey] = {html: result.items[i]['html']};
 
 
 
 
 
 
 
1103
  }
1104
  }
1105
 
@@ -1129,20 +1182,27 @@
1129
 
1130
  $(document).trigger('dgwtWcasDetailsPanelLoaded', that);
1131
  },
1132
- prepareSuggestionObjectID(suggestion) {
1133
  var objectID = '';
1134
 
1135
  if (typeof suggestion != 'undefined' && typeof suggestion.type != 'undefined') {
1136
 
 
1137
  if (suggestion.post_id != null) {
1138
  objectID = suggestion.type + '__' + suggestion.post_id;
1139
 
1140
- if(suggestion.type === 'product_variation'){
1141
  objectID += '__' + suggestion.variation_id;
1142
  }
1143
- }
1144
 
 
 
 
 
 
 
1145
 
 
1146
  if (suggestion.term_id != null && suggestion.taxonomy != null) {
1147
  objectID = suggestion.type + '__' + suggestion.term_id + '__' + suggestion.taxonomy;
1148
  }
@@ -1150,7 +1210,7 @@
1150
 
1151
  return objectID;
1152
  },
1153
- selectFirstSuggestion(suggestions) {
1154
  var that = this,
1155
  index = 0,
1156
  noResults = false;
@@ -1220,6 +1280,17 @@
1220
 
1221
  $('body').removeClass('dgwt-wcas-open');
1222
  $('body').removeClass('dgwt-wcas-block-scroll');
 
 
 
 
 
 
 
 
 
 
 
1223
 
1224
  that.signalHint(null);
1225
  },
@@ -1260,11 +1331,7 @@
1260
  },
1261
  suggest: function () {
1262
  if (!this.suggestions.length) {
1263
- if (this.options.showNoSuggestionNotice) {
1264
- this.noSuggestions();
1265
- } else {
1266
  this.hide();
1267
- }
1268
  return;
1269
  }
1270
 
@@ -1324,49 +1391,52 @@
1324
  if (suggestion.taxonomy === 'product_cat') {
1325
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat';
1326
  if (!options.showHeadings) {
1327
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.t.category + '</span>';
1328
  }
1329
  if (typeof suggestion.breadcrumbs != 'undefined' && suggestion.breadcrumbs) {
1330
  title = suggestion.breadcrumbs + ' &gt; ' + suggestion.value;
1331
- append += '<span class="dgwt-wcas-st-breadcrumbs">' + dgwt_wcas.copy_in_category + ' ' + suggestion.breadcrumbs + '</span>';
1332
  //@TODO RTL support
1333
  }
1334
 
1335
  } else if (suggestion.taxonomy === 'product_tag') {
1336
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag';
1337
  if (!options.showHeadings) {
1338
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.t.tag + '</span>';
1339
  }
1340
  } else if (options.isPremium && suggestion.taxonomy === options.taxonomyBrands) {
1341
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand';
1342
  if (!options.showHeadings) {
1343
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.t.brand + '</span>';
1344
  }
1345
  } else if (options.isPremium && suggestion.type === 'post') {
1346
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post';
1347
  if (!options.showHeadings) {
1348
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.t.post + '</span>';
1349
  }
1350
  } else if (options.isPremium && suggestion.type === 'page') {
1351
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page';
1352
  if (!options.showHeadings) {
1353
- prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.t.page + '</span>';
1354
  }
1355
  } else if (suggestion.type === 'more_products') {
1356
  classes += ' js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more';
1357
  innerClass = 'dgwt-wcas-st-more';
1358
- suggestion.value = dgwt_wcas.copy_show_more + ' (' + suggestion.total + ')';
1359
  highlight = false;
1360
  } else if (options.showHeadings && suggestion.type === 'headline') {
1361
  classes += ' js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline';
1362
- if (typeof dgwt_wcas.t[suggestion.value + '_plu'] != 'undefined') {
1363
- suggestion.value = dgwt_wcas.t[suggestion.value + '_plu'];
1364
  }
1365
  highlight = false;
1366
  } else {
1367
  classes += ' dgwt-wcas-suggestion-nores';
1368
- suggestion.value = dgwt_wcas.copy_no_result;
1369
  highlight = false;
 
 
 
1370
  $('body').addClass('dgwt-wcas-nores');
1371
  }
1372
 
@@ -1403,7 +1473,7 @@
1403
 
1404
  // SKU
1405
  if (options.showSKU === true && typeof suggestion.sku != 'undefined' && suggestion.sku.length > 0) {
1406
- html += '<span class="dgwt-wcas-sku">(' + dgwt_wcas.t.sku_label + ' ' + formatResult(suggestion.sku, value, true) + ')</span>';
1407
  }
1408
 
1409
  // Description
@@ -1444,13 +1514,14 @@
1444
  beforeRender.call(that.element, container, that.suggestions);
1445
  }
1446
 
1447
- that.fixPositionCapture();
1448
  container.show();
1449
 
1450
  // Add class on show
1451
  $('body').addClass('dgwt-wcas-open');
 
1452
 
1453
  if (options.showDetailsPanel === true) {
 
1454
  containerDetails.show();
1455
  that.fixHeight();
1456
  }
@@ -1463,6 +1534,7 @@
1463
  }
1464
 
1465
  that.visible = true;
 
1466
 
1467
  if (that.options.orientation === 'top') {
1468
  that.getSuggestionsContainer().addClass(that.classes.suggestionsContainerOrientTop);
@@ -1474,29 +1546,6 @@
1474
 
1475
  that.findBestHint();
1476
  },
1477
- noSuggestions: function () {
1478
- var that = this,
1479
- beforeRender = that.options.beforeRender,
1480
- container = that.getSuggestionsContainer(),
1481
- noSuggestionsContainer = $(that.noSuggestionsContainer);
1482
-
1483
- // Some explicit steps. Be careful here as it easy to get
1484
- // noSuggestionsContainer removed from DOM if not detached properly.
1485
- noSuggestionsContainer.detach();
1486
-
1487
- // clean suggestions if any
1488
- container.empty();
1489
- container.append(noSuggestionsContainer);
1490
-
1491
- if ($.isFunction(beforeRender)) {
1492
- beforeRender.call(that.element, container, that.suggestions);
1493
- }
1494
-
1495
- that.fixPositionCapture();
1496
-
1497
- container.show();
1498
- that.visible = true;
1499
- },
1500
  adjustContainerWidth: function () {
1501
  var that = this,
1502
  options = that.options,
@@ -2036,8 +2085,8 @@
2036
  showSKU: dgwt_wcas.show_sku == 1 ? true : false,
2037
  showSaleBadge: dgwt_wcas.show_sale_badge == 1 ? true : false,
2038
  showFeaturedBadge: dgwt_wcas.show_featured_badge == 1 ? true : false,
2039
- saleBadgeText: dgwt_wcas.t.sale_badge,
2040
- featuredBadgeText: dgwt_wcas.t.featured_badge,
2041
  isRtl: dgwt_wcas.is_rtl == 1 ? true : false,
2042
  showHeadings: dgwt_wcas.show_headings == 1 ? true : false,
2043
  isPremium: dgwt_wcas.is_premium == 1 ? true : false,
143
  that.isLocal = false;
144
  that.suggestionsContainer = null;
145
  that.detailsContainer = null;
146
+ that.autoAligmentprocess = null;
147
  that.noSuggestionsContainer = null;
148
  that.options = $.extend(true, {}, Autocomplete.defaults, options);
149
  that.classes = {
214
  lookupFilter: _lookupFilter,
215
  paramName: 'query',
216
  transformResult: _transformResult,
 
217
  noSuggestionNotice: 'No results',
218
  orientation: 'bottom',
219
  forceFixPosition: false,
500
  $detailsContainer.css({
501
  'z-index': (options.zIndex - 1)
502
  });
 
503
  }
504
 
505
  options.onSearchComplete = function () {
664
 
665
  return false;
666
  },
667
+ automaticAlignment: function(){
668
+ var that = this,
669
+ $input = that.getFormWrapper().find('.dgwt-wcas-search-input'),
670
+ $suggestionsContainer = that.getSuggestionsContainer(),
671
+ $detailsWrapp = that.getDetailsContainer();
672
+
673
+ if(that.autoAligmentprocess != null) {
674
+ return;
675
+ }
676
+
677
+ var markers = [$input.width(), $suggestionsContainer.height()];
678
+ if(that.options.showDetailsPanel) {
679
+ markers[2] = $detailsWrapp.height();
680
+ }
681
+
682
+ that.autoAligmentprocess = setInterval(function(){
683
+
684
+ var newMarkers = [$input.width(), $suggestionsContainer.height()];
685
+ if(that.options.showDetailsPanel) {
686
+ newMarkers[2] = $detailsWrapp.height();
687
+ }
688
+
689
+ for(var i = 0 ; i < markers.length ; i++){
690
+
691
+ if(markers[i] != newMarkers[i]){
692
+
693
+ that.fixHeight();
694
+ that.fixPositionCapture();
695
+ markers = newMarkers;
696
+ break;
697
+ }
698
+ }
699
+
700
+
701
+ if(that.options.showDetailsPanel) {
702
+
703
+ var innerDetailsHeight = $detailsWrapp.find('.dgwt-wcas-details-inner').height();
704
+
705
+
706
+ if ((innerDetailsHeight - $detailsWrapp.height()) > 2) {
707
+ that.fixHeight();
708
+ }
709
+ }
710
+
711
+ }, 10);
712
+
713
+ },
714
  getFormOffset: function () {
715
  var that = this,
716
  $form = that.getFormWrapper(),
1075
  }
1076
 
1077
  // Brake if there are no suggestions
1078
+ if (suggestion == null || typeof suggestion.type == 'undefined') {
1079
  return;
1080
  }
1081
 
1146
  for(var i = 0 ; i < result.items.length ; i++){
1147
  var cacheKey = result.items[i]['objectID'];
1148
  that.cachedDetails[cacheKey] = {html: result.items[i]['html']};
1149
+
1150
+ // Preload images
1151
+ if(typeof result.items[i]['imageSrc'] != 'undefined' && result.items[i]['imageSrc'].length > 0){
1152
+ var tempImg = new Image();
1153
+ tempImg.src = result.items[i]['imageSrc'];
1154
+ }
1155
+
1156
  }
1157
  }
1158
 
1182
 
1183
  $(document).trigger('dgwtWcasDetailsPanelLoaded', that);
1184
  },
1185
+ prepareSuggestionObjectID: function(suggestion) {
1186
  var objectID = '';
1187
 
1188
  if (typeof suggestion != 'undefined' && typeof suggestion.type != 'undefined') {
1189
 
1190
+ //Products and post types
1191
  if (suggestion.post_id != null) {
1192
  objectID = suggestion.type + '__' + suggestion.post_id;
1193
 
1194
+ if (suggestion.type === 'product_variation') {
1195
  objectID += '__' + suggestion.variation_id;
1196
  }
 
1197
 
1198
+ // Post types
1199
+ if (typeof suggestion.post_type != 'undefined') {
1200
+ objectID = suggestion.type + '__' + suggestion.post_id + '__' + suggestion.post_type;
1201
+ }
1202
+
1203
+ }
1204
 
1205
+ //Terms
1206
  if (suggestion.term_id != null && suggestion.taxonomy != null) {
1207
  objectID = suggestion.type + '__' + suggestion.term_id + '__' + suggestion.taxonomy;
1208
  }
1210
 
1211
  return objectID;
1212
  },
1213
+ selectFirstSuggestion: function(suggestions) {
1214
  var that = this,
1215
  index = 0,
1216
  noResults = false;
1280
 
1281
  $('body').removeClass('dgwt-wcas-open');
1282
  $('body').removeClass('dgwt-wcas-block-scroll');
1283
+ $('body').removeClass('dgwt-wcas-is-details');
1284
+ $('body').removeClass('dgwt-wcas-full-width');
1285
+ $('body').removeClass('dgwt-wcas-nores');
1286
+ $('body').removeClass('dgwt-wcas-details-outside');
1287
+ $('body').removeClass('dgwt-wcas-details-right');
1288
+ $('body').removeClass('dgwt-wcas-details-left');
1289
+
1290
+ if(that.autoAligmentprocess != null){
1291
+ clearInterval(that.autoAligmentprocess);
1292
+ that.autoAligmentprocess = null;
1293
+ }
1294
 
1295
  that.signalHint(null);
1296
  },
1331
  },
1332
  suggest: function () {
1333
  if (!this.suggestions.length) {
 
 
 
1334
  this.hide();
 
1335
  return;
1336
  }
1337
 
1391
  if (suggestion.taxonomy === 'product_cat') {
1392
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat';
1393
  if (!options.showHeadings) {
1394
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.category + '</span>';
1395
  }
1396
  if (typeof suggestion.breadcrumbs != 'undefined' && suggestion.breadcrumbs) {
1397
  title = suggestion.breadcrumbs + ' &gt; ' + suggestion.value;
1398
+ append += '<span class="dgwt-wcas-st-breadcrumbs">' + dgwt_wcas.labels.in + ' ' + suggestion.breadcrumbs + '</span>';
1399
  //@TODO RTL support
1400
  }
1401
 
1402
  } else if (suggestion.taxonomy === 'product_tag') {
1403
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag';
1404
  if (!options.showHeadings) {
1405
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.tag + '</span>';
1406
  }
1407
  } else if (options.isPremium && suggestion.taxonomy === options.taxonomyBrands) {
1408
  classes += ' dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand';
1409
  if (!options.showHeadings) {
1410
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.brand + '</span>';
1411
  }
1412
  } else if (options.isPremium && suggestion.type === 'post') {
1413
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post';
1414
  if (!options.showHeadings) {
1415
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.post + '</span>';
1416
  }
1417
  } else if (options.isPremium && suggestion.type === 'page') {
1418
  classes += ' dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page';
1419
  if (!options.showHeadings) {
1420
+ prepend += '<span class="dgwt-wcas-st--direct-headline">' + dgwt_wcas.labels.page + '</span>';
1421
  }
1422
  } else if (suggestion.type === 'more_products') {
1423
  classes += ' js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more';
1424
  innerClass = 'dgwt-wcas-st-more';
1425
+ suggestion.value = dgwt_wcas.labels.show_more + ' (' + suggestion.total + ')';
1426
  highlight = false;
1427
  } else if (options.showHeadings && suggestion.type === 'headline') {
1428
  classes += ' js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline';
1429
+ if (typeof dgwt_wcas.labels[suggestion.value + '_plu'] != 'undefined') {
1430
+ suggestion.value = dgwt_wcas.labels[suggestion.value + '_plu'];
1431
  }
1432
  highlight = false;
1433
  } else {
1434
  classes += ' dgwt-wcas-suggestion-nores';
1435
+ suggestion.value = dgwt_wcas.labels.no_results;
1436
  highlight = false;
1437
+ if (options.showDetailsPanel === true) {
1438
+ containerDetails.html('');
1439
+ }
1440
  $('body').addClass('dgwt-wcas-nores');
1441
  }
1442
 
1473
 
1474
  // SKU
1475
  if (options.showSKU === true && typeof suggestion.sku != 'undefined' && suggestion.sku.length > 0) {
1476
+ html += '<span class="dgwt-wcas-sku">(' + dgwt_wcas.labels.sku_label + ' ' + formatResult(suggestion.sku, value, true) + ')</span>';
1477
  }
1478
 
1479
  // Description
1514
  beforeRender.call(that.element, container, that.suggestions);
1515
  }
1516
 
 
1517
  container.show();
1518
 
1519
  // Add class on show
1520
  $('body').addClass('dgwt-wcas-open');
1521
+ that.automaticAlignment();
1522
 
1523
  if (options.showDetailsPanel === true) {
1524
+ $('body').addClass('dgwt-wcas-is-details');
1525
  containerDetails.show();
1526
  that.fixHeight();
1527
  }
1534
  }
1535
 
1536
  that.visible = true;
1537
+ that.fixPositionCapture();
1538
 
1539
  if (that.options.orientation === 'top') {
1540
  that.getSuggestionsContainer().addClass(that.classes.suggestionsContainerOrientTop);
1546
 
1547
  that.findBestHint();
1548
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1549
  adjustContainerWidth: function () {
1550
  var that = this,
1551
  options = that.options,
2085
  showSKU: dgwt_wcas.show_sku == 1 ? true : false,
2086
  showSaleBadge: dgwt_wcas.show_sale_badge == 1 ? true : false,
2087
  showFeaturedBadge: dgwt_wcas.show_featured_badge == 1 ? true : false,
2088
+ saleBadgeText: dgwt_wcas.labels.sale_badge,
2089
+ featuredBadgeText: dgwt_wcas.labels.featured_badge,
2090
  isRtl: dgwt_wcas.is_rtl == 1 ? true : false,
2091
  showHeadings: dgwt_wcas.show_headings == 1 ? true : false,
2092
  isPremium: dgwt_wcas.is_premium == 1 ? true : false,
assets/js/search.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,o=s.split(/ /);if(o)for(o=o.sort(function(t,e){return e.length-t.length}),i=0;i<o.length;i++)if(o[i]&&o[i].length>1){var a="("+e.escapeRegExChars(o[i].trim())+")";t=t.replace(new RegExp(a,"gi"),"<strong>$1</strong>")}}else a="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(a,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,o=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=o,void t();s.id=o,i=setTimeout(function(){o===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var o;o=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(o)},i)}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,o=9,a=13,n=38,r=39,l=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.noSuggestionsContainer=null,this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.Autocomplete=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i){if(!s)return t;i&&(t=e.highlight(t,s));return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?strong)&gt;/g,"<$1>")},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",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0},d.prototype={initialize:function(){var s,i,o=this,a="."+o.classes.suggestion,n=(o.classes.selected,o.options),r="."+n.closeTrigger,l=o.getFormWrapper();o.element.setAttribute("autocomplete","off");var c=o.el.closest("."+n.searchFormClass).data("wcas-context");(o.noSuggestionsContainer=t('<div class="dgwt-wcas-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),o.suggestionsContainer=d.utils.createNode(n.containerClass),(s=t(o.suggestionsContainer)).attr("data-wcas-context",c),s.addClass("woocommerce"),s.appendTo(n.appendTo||"body"),!0===n.showImage&&s.addClass("dgwt-wcas-has-img"),!0===n.showPrice&&s.addClass("dgwt-wcas-has-price"),!0===n.showDescription&&s.addClass("dgwt-wcas-has-desc"),!0===n.showSKU&&s.addClass("dgwt-wcas-has-sku"),!0===n.showHeadings&&s.addClass("dgwt-wcas-has-headings"),"auto"!==n.width&&s.width(n.width),!0===n.showDetailsPanel&&(o.detailsContainer=d.utils.createNode(n.containerDetailsClass),(i=t(o.detailsContainer)).attr("data-wcas-context",c),i.addClass("woocommerce"),i.appendTo("body")),s.on("mouseenter.autocomplete",a,function(){var s=t(this).data("index"),i='.dgwt-wcas-suggestions-wrapp[data-wcas-context="'+o.getContext()+'"] .dgwt-wcas-suggestion[data-index="'+s+'"]';o.selectedIndex!=s&&e.mouseHoverDebounce(function(){o.selectedIndex!==s&&(o.getDetails(o.suggestions[s]),o.activate(s))},i,100)}),s.on("mouseout.autocomplete",function(){}),t(document).on("click.autocomplete",r,function(e){o.hide(),o.clear(!1),t(this).removeClass(n.closeTrigger),t(this).closest("."+n.searchFormClass).find("."+n.searchInputClass).val("").focus()}),o.options.overlayMobile&&o.isMobileMode())&&(l.hasClass("js-dgwt-wcas-icon-mobile")&&l.prepend('<div class="dgwt-wcas-icon-handler">'+dgwt_wcas.magnifier_icon+"</div>"),l.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),l.find(".js-dgwt-wcas-enable-mobile-form").on("click",function(t){o.enableOverlayMobile()}));s.on("click.autocomplete",a,function(){o.select(t(this).data("index"))}),s.on("click.autocomplete",function(){clearTimeout(o.blurTimeoutId)}),o.canShowDetailsBox()&&i.on("click.autocomplete",function(){clearTimeout(o.blurTimeoutId)}),o.hideAfterClickOutsideListener(),t(document).on("change",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}),o.fixPositionCapture=function(){o.adjustContainerWidth(),o.visible&&o.fixPosition()},t(window).on("resize.autocomplete",o.fixPositionCapture),t(window).on("scroll",function(){if(o.suggestions.length>0&&o.elementOrParentIsFixed(o.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){o.fixHeight(),o.fixPositionCapture()},t)})}else o.fixHeight(),o.fixPositionCapture()}),o.el.on("keydown.autocomplete",function(t){o.onKeyPress(t)}),o.el.on("keyup.autocomplete",function(t){o.onKeyUp(t)}),o.el.on("blur.autocomplete",function(){o.onBlur()}),o.el.on("focus.autocomplete",function(){o.onFocus()}),o.el.on("change.autocomplete",function(t){o.onKeyUp(t)}),o.el.on("input.autocomplete",function(t){o.onKeyUp(t)})},onFocus:function(){this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),o=e.getQuery(i);e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==o&&(s.onInvalidateSelection||t.noop).call(e.element)},200)},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),o=t.extend({},s.options,e);(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",width:o.width+"px","z-index":o.zIndex}),!0===o.showDetailsPanel)&&(s.getDetailsContainer().css({"z-index":o.zIndex-1}),t("body").addClass("dgwt-wcas-is-details"));o.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.preloader("show","form",o.closeTrigger)},this.options=o},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e=t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]'),s=this.getFormOffset();e.css(s),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.el.closest("[data-wcas-context]"),s=t("."+this.options.containerDetailsClass+'[data-wcas-context="'+this.getContext()+'"]'),i=t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]'),o=this.getFormOffset(),a=o.left;if(0==s.length)return!1;var n=!0===this.options.isRtl?1:2,r=Math.round(o.left);if(o.left=r+Math.round(i.width()+n),s.css(o),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(i.css("left",r+Math.round(s.width()+n)+"px"),s.css("left",a+"px")));var l=t(window).width(),c=s.width(),d=s.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(o.left=o.left+1);var g=!1,u=!1;l<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),s.css("left",Math.round(parseFloat(i.css("left").replace("px","")))-s.outerWidth()+"px")),(d=s.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,o=e.outerHeight(),a=this.el.outerHeight(),n=this.el.offset(),r={top:n.top,left:n.left};if("auto"===i){var l=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-o,g=c+l-(n.top+a+o);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),r.top+=-s.outerHeight()}else r.top+=a;return r},getContext:function(){var t=this.el.closest("[data-wcas-context]"),e="";return t.length>0&&(e=t.data("wcas-context")),e},getFormWrapper:function(){return this.el.closest("[data-wcas-context]")},getSuggestionsContainer:function(){return t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]')},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass+'[data-wcas-context="'+this.getContext()+'"]')},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==l||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case r:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case o:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case a:return void this.hide();case n:this.moveUp();break;case l:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case l:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(t("."+this.options.closeTrigger).removeClass(this.options.closeTrigger),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e},getSuggestionsLocal:function(e){var s,i=this.options,o=e.toLowerCase(),a=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return a(t,e,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();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),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,t.isFunction(c.lookup)?c.lookup(i,function(t){l.suggestions=t.suggestions,l.suggest(),l.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(l.element,i,t.suggestions)}):(l.isLocal?o=l.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(l.element,i)),n=d+"?"+t.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},t.extend(r,c.ajaxSettings),s.object=l,s.ajaxSettings=r,e.debounce(function(){var e=s.object,o=s.ajaxSettings;e.currentRequest=t.ajax(o).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions)}).fail(function(t,s,o){e.options.onSearchError.call(e.element,i,t,s,o)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;s.options;if(!s.canShowDetailsBox())return!1;if(null!=e&&"undefined"!=e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();var i,o=s.getDetailsContainer(),a=s.prepareSuggestionObjectID(e);if(null!=(i=s.cachedDetails[a]))o.html(i.html),s.fixHeight(),s.fixPositionCapture();else{var n={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};n.items.push(i)}}),o.html(""),s.preloader("show","details","",!0),-1!=t.inArray(a,s.detailsRequestsSent))return;s.detailsRequestsSent.push(a),t.ajax({data:n,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var a=e.items[i].objectID;s.cachedDetails[a]={html:e.items[i].html}}s.preloader("hide","details","",!0);var n=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[n]?o.html(s.cachedDetails[n].html):o.html(""),s.fixPositionCapture(),s.fixHeight()},error:function(t,e){s.preloader("hide","details","",!0),o.html(t),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},prepareSuggestionObjectID(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},selectFirstSuggestion(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(){var e=this.getSuggestionsContainer(),s=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),e.hide(),e.removeClass(this.classes.suggestionsContainerOrientTop),s.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),this.signalHint(null)},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),o=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var a=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&o&&a&&e.hide()}else i&&o&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,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=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(s,l){var c="",d=!1;if(o&&(h+=function(t,s){var i=t.data[o];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(l,0)),void 0===l.type||"product"!=l.type&&"product_variation"!=l.type){var g=r,u="dgwt-wcas-st",w="",p="",m="",f=!0;"product_cat"===l.taxonomy?(g+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(w+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.t.category+"</span>"),void 0!==l.breadcrumbs&&l.breadcrumbs&&(m=l.breadcrumbs+" &gt; "+l.value,p+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.copy_in_category+" "+l.breadcrumbs+"</span>")):"product_tag"===l.taxonomy?(g+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(w+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.t.tag+"</span>")):i.isPremium&&l.taxonomy===i.taxonomyBrands?(g+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(w+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.t.brand+"</span>")):i.isPremium&&"post"===l.type?(g+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(w+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.t.post+"</span>")):i.isPremium&&"page"===l.type?(g+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(w+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.t.page+"</span>")):"more_products"===l.type?(g+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",u="dgwt-wcas-st-more",l.value=dgwt_wcas.copy_show_more+" ("+l.total+")",f=!1):i.showHeadings&&"headline"===l.type?(g+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.t[l.value+"_plu"]&&(l.value=dgwt_wcas.t[l.value+"_plu"]),f=!1):(g+=" dgwt-wcas-suggestion-nores",l.value=dgwt_wcas.copy_no_result,f=!1,t("body").addClass("dgwt-wcas-nores")),m=m.length>0?' title="'+m+'"':"",h+='<div class="'+g+'" data-index="'+s+'">',h+="<span"+m+' class="'+u+'">'+w+a(l.value,n,f)+p+"</span>",h+="</div>"}else!0===i.showImage&&void 0!==l.thumb_html&&(d=!0),c+=void 0!==l.post_id?'data-post-id="'+l.post_id+'" ':"",c+=void 0!==l.taxonomy?'data-taxonomy="'+l.taxonomy+'" ':"",c+=void 0!==l.term_id?'data-term-id="'+l.term_id+'" ':"",h+='<div class="'+r+' dgwt-wcas-suggestion-product" data-index="'+s+'" '+c+">",d&&(h+='<span class="dgwt-wcas-si">'+l.thumb_html+"</span>"),h+=d?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+a(l.value,n,!0)+"</span>",!0===i.showSKU&&void 0!==l.sku&&l.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.t.sku_label+" "+a(l.sku,n,!0)+")</span>"),!0===i.showDescription&&void 0!==l.desc&&l.desc&&(h+='<span class="dgwt-wcas-sd">'+a(l.desc,n,!0)+"</span>"),h+="</span>",!0===i.showPrice&&void 0!==l.price&&(h+='<span class="dgwt-wcas-sp">'+l.price+"</span>"),!0===i.showFeaturedBadge&&!0===l.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===l.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=d?"</div>":"",h+="</div>"}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),s.fixPositionCapture(),c.show(),t("body").addClass("dgwt-wcas-open"),!0===i.showDetailsPanel&&(d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+r).first().addClass(l)),s.visible=!0,"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var e=this.options.beforeRender,s=this.getSuggestionsContainer(),i=t(this.noSuggestionsContainer);i.detach(),s.empty(),s.append(i),t.isFunction(e)&&e.call(this.element,s,this.suggestions),this.fixPositionCapture(),s.show(),this.visible=!0},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),o=this.getFormWrapper(),a=this.getSuggestionsContainer(),n=this.getDetailsContainer(),r=this.getFormOffset(),l=getComputedStyle(o[0]).width;if(l=Math.round(parseFloat(l.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),a.css("width",e+"px")),!0===s.showDetailsPanel){if(o.width()>=550)return i.addClass("dgwt-wcas-full-width"),l%2==0?(a.css("width",Math.round(l/2)),n.css("width",Math.round(l/2))):(a.css("width",Math.floor(l/2)),n.css("width",Math.ceil(l/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):a.css("left",l/2+r.left+"px"));i.addClass("dgwt-wcas-details-right")}},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var o=0===i.value.toLowerCase().indexOf(e);return o&&(s=i),!o}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(e,s,i,o){var a,n,r="dgwt-wcas-preloader-wrapp",l=null==i?r:r+" "+i;if("form"===s?n=this.getFormWrapper().find(".dgwt-wcas-preloader"):"details"===s&&(n=t(this.detailsContainer)),1==dgwt_wcas.show_preloader&&0!=n.length)if(!0===o)if("hide"!==e){if("show"===e){var c=this.options.isRtl?"-rtl":"";a='<div class="'+l+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+c+'.png" /></div>',n.html(a)}}else t(r).remove();else"hide"===e?n.removeClass(i):n.addClass(i)},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,o=this.getSuggestionsContainer(),a=o.find("."+this.classes.suggestion);return o.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&a.length>this.selectedIndex?(s=a.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.hide(),this.onSelect(t)},moveUp:function(){if(-1!==this.selectedIndex)return 0===this.selectedIndex?(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()):void this.adjustScroll(this.selectedIndex-1)},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(e){var s=this.activate(e);if(this.getDetails(this.suggestions[e]),s&&!this.canShowDetailsBox()){var i,o,a,n=this.getSuggestionsContainer(),r=t(s).outerHeight();i=s.offsetTop,a=(o=n.scrollTop())+this.options.maxHeight-r,i<o?n.scrollTop(i):i>a&&n.scrollTop(i-this.options.maxHeight+r),this.options.preserveInput||(this.ignoreValueChange=!0,this.el.val(this.getValue(this.suggestions[e].value))),this.signalHint(null)}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),t("."+this.options.containerClass).remove(),t("."+this.options.containerDetailsClass).remove()},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),o=e.getSuggestionsContainer();t("html").addClass("dgwt-wcas-overlay-mobile-on"),'<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">','<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">','<span class="dgwt-wcas-om-return js-dgwt-wcas-om-return">','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">','<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>',"</svg>","</span>","</div>","</div>",t(e.options.mobileOverlayWrapper).append('<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile"><div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar"><span class="dgwt-wcas-om-return js-dgwt-wcas-om-return"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF"><path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path></svg></span></div></div>'),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",999999),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("."+e.options.searchInputClass).focus(),t(document).on("click",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),o=t(".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"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(o),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){o.find("."+s.options.searchInputClass).val("");var t=o.find(".dgwt-wcas-close");o.length>0&&t.removeClass("dgwt-wcas-close")},150),s.overlayMobileState="off"},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)return void gtag("event","autocomplete_search",{event_label:t,event_category:e});"undefined"!=typeof ga&&ga("send",{hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),o=i.data("autocomplete");"string"==typeof e?o&&"function"==typeof o[e]&&o[e](s):(o&&o.dispose&&o.dispose(),o=new d(this,e),i.data("autocomplete",o))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(e){var s=t(".dgwt-wcas-search-wrapp[data-wcas-context]"),i=[];s.length>0&&s.each(function(){var s=t(this).attr("data-wcas-context");if(-1==t.inArray(s,i))i.push(s);else{var o=Math.random().toString(36).substring(2,6);if(t(this).attr("data-wcas-context",o),!e){var a=t('.dgwt-wcas-suggestions-wrapp[data-wcas-context="'+s+'"]'),n=t('.dgwt-wcas-details-wrapp[data-wcas-context="'+s+'"]');a.length>0&&t(a[a.length-1]).attr("data-wcas-context",o),n.length>0&&t(n[n.length-1]).attr("data-wcas-context",o)}}})}t(window).on("load",function(){t(".dgwt-wcas-search-submit").length>0&&t(".dgwt-wcas-search-submit").each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})}),t(document).ready(function(){e(!0);var s=1==dgwt_wcas.show_details_box,i=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<i||"ontouchend"in document)&&(s=!1),t(".dgwt-wcas-search-input").dgwtWcasAutocomplete({minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:s,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,saleBadgeText:dgwt_wcas.t.sale_badge,featuredBadgeText:dgwt_wcas.t.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,overlayMobile:1==dgwt_wcas.overlay_mobile,mobileBreakpoint:i,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events})}),t(window).on("load",function(){e(!1)})}()});
1
+ !function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports&&"function"==typeof require?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e={escapeRegExChars:function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(t){var e=document.createElement("div");return e.className=t,e.style.position="absolute",e.style.display="none",e.setAttribute("unselectable","on"),e},highlight:function(t,s){if(dgwt_wcas.is_premium){var i,a=s.split(/ /);if(a)for(a=a.sort(function(t,e){return e.length-t.length}),i=0;i<a.length;i++)if(a[i]&&a[i].length>1){var o="("+e.escapeRegExChars(a[i].trim())+")";t=t.replace(new RegExp(o,"gi"),"<strong>$1</strong>")}}else o="("+e.escapeRegExChars(s)+")",t=t.replace(new RegExp(o,"gi"),"<strong>$1</strong>");return t},debounce:function(t,e){var i,a=(new Date).getUTCMilliseconds();if(0===s.id.length)return s.id=a,void t();s.id=a,i=setTimeout(function(){a===s.id?(t(),s.id=""):clearTimeout(i)},e)},mouseHoverDebounce:function(e,s,i){var a;a=setTimeout(function(){t(s+":hover").length>0?e():clearTimeout(a)},i)}},s={id:"",callback:null,ajaxSettings:null,object:null},i=27,a=9,o=13,n=38,l=39,r=40,c=t.noop;function d(e,s){this.element=e,this.el=t(e),this.suggestions=[],this.badQueries=[],this.selectedIndex=-1,this.currentValue=this.element.value,this.timeoutId=null,this.cachedResponse={},this.cachedDetails={},this.detailsRequestsSent=[],this.onChangeTimeout=null,this.onChange=null,this.isLocal=!1,this.suggestionsContainer=null,this.detailsContainer=null,this.autoAligmentprocess=null,this.noSuggestionsContainer=null,this.options=t.extend(!0,{},d.defaults,s),this.classes={selected:"dgwt-wcas-suggestion-selected",suggestion:"dgwt-wcas-suggestion",suggestionsContainerOrientTop:"dgwt-wcas-suggestions-wrapp--top"},this.hint=null,this.hintValue="",this.selection=null,this.overlayMobileState="off",this.initialize(),this.setOptions(s)}d.utils=e,t.Autocomplete=d,d.defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",containerDetailsWidth:"auto",showDetailsPanel:!1,showImage:!1,showPrice:!1,showSKU:!1,showDescription:!1,showSaleBadge:!1,showFeaturedBadge:!1,saleBadgeText:"sale",featuredBadgeText:"featured",minChars:3,maxHeight:600,deferRequestBy:0,params:{},formatResult:function(t,s,i){if(!s)return t;i&&(t=e.highlight(t,s));return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;sup/g,"<sup").replace(/&lt;\/sup/g,"</sup").replace(/sup&gt;/g,"sup>").replace(/&lt;(\/?strong)&gt;/g,"<$1>")},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",searchInputClass:"dgwt-wcas-search-input",preloaderClass:"dgwt-wcas-preloader",closeTrigger:"dgwt-wcas-close",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,isPremium:!1,overlayMobile:!1,preventBadQueries:!0,lookupFilter:function(t,e,s){return-1!==t.value.toLowerCase().indexOf(s)},paramName:"query",transformResult:function(e){return"string"==typeof e?t.parseJSON(e):e},noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1,positionFixed:!1,debounceWaitMs:400,sendGAEvents:!0},d.prototype={initialize:function(){var s,i,a=this,o="."+a.classes.suggestion,n=(a.classes.selected,a.options),l="."+n.closeTrigger,r=a.getFormWrapper();a.element.setAttribute("autocomplete","off");var c=a.el.closest("."+n.searchFormClass).data("wcas-context");(a.noSuggestionsContainer=t('<div class="dgwt-wcas-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),a.suggestionsContainer=d.utils.createNode(n.containerClass),(s=t(a.suggestionsContainer)).attr("data-wcas-context",c),s.addClass("woocommerce"),s.appendTo(n.appendTo||"body"),!0===n.showImage&&s.addClass("dgwt-wcas-has-img"),!0===n.showPrice&&s.addClass("dgwt-wcas-has-price"),!0===n.showDescription&&s.addClass("dgwt-wcas-has-desc"),!0===n.showSKU&&s.addClass("dgwt-wcas-has-sku"),!0===n.showHeadings&&s.addClass("dgwt-wcas-has-headings"),"auto"!==n.width&&s.width(n.width),!0===n.showDetailsPanel&&(a.detailsContainer=d.utils.createNode(n.containerDetailsClass),(i=t(a.detailsContainer)).attr("data-wcas-context",c),i.addClass("woocommerce"),i.appendTo("body")),s.on("mouseenter.autocomplete",o,function(){var s=t(this).data("index"),i='.dgwt-wcas-suggestions-wrapp[data-wcas-context="'+a.getContext()+'"] .dgwt-wcas-suggestion[data-index="'+s+'"]';a.selectedIndex!=s&&e.mouseHoverDebounce(function(){a.selectedIndex!==s&&(a.getDetails(a.suggestions[s]),a.activate(s))},i,100)}),s.on("mouseout.autocomplete",function(){}),t(document).on("click.autocomplete",l,function(e){a.hide(),a.clear(!1),t(this).removeClass(n.closeTrigger),t(this).closest("."+n.searchFormClass).find("."+n.searchInputClass).val("").focus()}),a.options.overlayMobile&&a.isMobileMode())&&(r.hasClass("js-dgwt-wcas-icon-mobile")&&r.prepend('<div class="dgwt-wcas-icon-handler">'+dgwt_wcas.magnifier_icon+"</div>"),r.prepend('<div class="js-dgwt-wcas-enable-mobile-form dgwt-wcas-enable-mobile-form"></div>'),r.find(".js-dgwt-wcas-enable-mobile-form").on("click",function(t){a.enableOverlayMobile()}));s.on("click.autocomplete",o,function(){a.select(t(this).data("index"))}),s.on("click.autocomplete",function(){clearTimeout(a.blurTimeoutId)}),a.canShowDetailsBox()&&i.on("click.autocomplete",function(){clearTimeout(a.blurTimeoutId)}),a.hideAfterClickOutsideListener(),t(document).on("change",'[name="js-dgwt-wcas-quantity"]',function(e){t(this).closest(".js-dgwt-wcas-pd-addtc").find("[data-quantity]").attr("data-quantity",t(this).val())}),a.fixPositionCapture=function(){a.adjustContainerWidth(),a.visible&&a.fixPosition()},t(window).on("resize.autocomplete",a.fixPositionCapture),t(window).on("scroll",function(){if(a.suggestions.length>0&&a.elementOrParentIsFixed(a.getFormWrapper()))if(0===t(window).scrollTop()){[1,10,20,30,40,50,60,70,80,90,120,140,170,200,250,400,700,1e3,2e3].forEach(function(t){setTimeout(function(){a.fixHeight(),a.fixPositionCapture()},t)})}else a.fixHeight(),a.fixPositionCapture()}),a.el.on("keydown.autocomplete",function(t){a.onKeyPress(t)}),a.el.on("keyup.autocomplete",function(t){a.onKeyUp(t)}),a.el.on("blur.autocomplete",function(){a.onBlur()}),a.el.on("focus.autocomplete",function(){a.onFocus()}),a.el.on("change.autocomplete",function(t){a.onKeyUp(t)}),a.el.on("input.autocomplete",function(t){a.onKeyUp(t)})},onFocus:function(){this.fixPositionCapture(),this.el.val().length>=this.options.minChars&&this.onValueChange()},onBlur:function(){var e=this,s=e.options,i=e.el.val(),a=e.getQuery(i);e.blurTimeoutId=setTimeout(function(){e.hide(),e.selection&&e.currentValue!==a&&(s.onInvalidateSelection||t.noop).call(e.element)},200)},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,i=s.getSuggestionsContainer(),a=t.extend({},s.options,e);(s.isLocal=Array.isArray(a.lookup),s.isLocal&&(a.lookup=s.verifySuggestionsFormat(a.lookup)),a.orientation=s.validateOrientation(a.orientation,"bottom"),i.css({"max-height":s.canShowDetailsBox()?"none":a.maxHeight+"px",width:a.width+"px","z-index":a.zIndex}),!0===a.showDetailsPanel)&&s.getDetailsContainer().css({"z-index":a.zIndex-1});a.onSearchComplete=function(){s.getFormWrapper().removeClass("dgwt-wcas-processing"),s.preloader("hide","form","dgwt-wcas-inner-preloader"),s.preloader("show","form",a.closeTrigger)},this.options=a},clearCache:function(){this.cachedResponse={},this.cachedDetails={},this.badQueries=[]},clear:function(t){t&&this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearTimeout(this.onChangeTimeout),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e=t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]'),s=this.getFormOffset();e.css(s),this.canShowDetailsBox()&&this.fixPositionDetailsBox()},fixPositionDetailsBox:function(){var e=this.el.closest("[data-wcas-context]"),s=t("."+this.options.containerDetailsClass+'[data-wcas-context="'+this.getContext()+'"]'),i=t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]'),a=this.getFormOffset(),o=a.left;if(0==s.length)return!1;var n=!0===this.options.isRtl?1:2,l=Math.round(a.left);if(a.left=l+Math.round(i.width()+n),s.css(a),e.width()>=550)return t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),void(!0===this.options.isRtl&&(i.css("left",l+Math.round(s.width()+n)+"px"),s.css("left",o+"px")));var r=t(window).width(),c=s.width(),d=s.offset();t("body").addClass("dgwt-wcas-details-outside"),!0===this.options.isRtl&&(a.left=a.left+1);var g=!1,u=!1;r<d.left+c&&(g=!0,t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-left"),s.css("left",Math.round(parseFloat(i.css("left").replace("px","")))-s.outerWidth()+"px")),(d=s.offset()).left<1&&(u=!0,t("body").removeClass("dgwt-wcas-details-left"),t("body").addClass("dgwt-wcas-details-right")),u&&g?(t("body").removeClass("dgwt-wcas-details-left"),t("body").removeClass("dgwt-wcas-details-right"),t("body").addClass("dgwt-wcas-details-notfit")):t("body").removeClass("dgwt-wcas-details-notfit")},fixHeight:function(){if(1!=this.options.showDetailsPanel)return!1;var t=this.getSuggestionsContainer(),e=this.getDetailsContainer();t.css("height","auto"),e.css("height","auto");var s=t.outerHeight(),i=e.outerHeight();return t.find(".dgwt-wcas-suggestion:last-child").removeClass("dgwt-wcas-suggestion-no-border-bottom"),!(s<=340&&i<=340)&&(t.find(".dgwt-wcas-suggestion:last-child").addClass("dgwt-wcas-suggestion-no-border-bottom"),i<s&&e.css("height",s+"px"),s<i&&t.css("height",i+"px"),!1)},automaticAlignment:function(){var t=this,e=t.getFormWrapper().find(".dgwt-wcas-search-input"),s=t.getSuggestionsContainer(),i=t.getDetailsContainer();if(null==t.autoAligmentprocess){var a=[e.width(),s.height()];t.options.showDetailsPanel&&(a[2]=i.height()),t.autoAligmentprocess=setInterval(function(){var o=[e.width(),s.height()];t.options.showDetailsPanel&&(o[2]=i.height());for(var n=0;n<a.length;n++)if(a[n]!=o[n]){t.fixHeight(),t.fixPositionCapture(),a=o;break}t.options.showDetailsPanel&&(i.find(".dgwt-wcas-details-inner").height()-i.height()>2&&t.fixHeight())},10)}},getFormOffset:function(){var e=this.getFormWrapper(),s=this.getSuggestionsContainer(),i=this.options.orientation,a=e.outerHeight(),o=this.el.outerHeight(),n=this.el.offset(),l={top:n.top,left:n.left};if("auto"===i){var r=t(window).height(),c=t(window).scrollTop(),d=-c+n.top-a,g=c+r-(n.top+o+a);i=Math.max(d,g)===d?"top":"bottom"}if("top"===i){s[0].getBoundingClientRect().top;var u=e[0].getBoundingClientRect().top;s.css("height","auto"),u<s.height()&&s.height(u-10),l.top+=-s.outerHeight()}else l.top+=o;return l},getContext:function(){var t=this.el.closest("[data-wcas-context]"),e="";return t.length>0&&(e=t.data("wcas-context")),e},getFormWrapper:function(){return this.el.closest("[data-wcas-context]")},getSuggestionsContainer:function(){return t("."+this.options.containerClass+'[data-wcas-context="'+this.getContext()+'"]')},getDetailsContainer:function(){return t("."+this.options.containerDetailsClass+'[data-wcas-context="'+this.getContext()+'"]')},scrollDownSuggestions:function(){var t=this.getSuggestionsContainer();t[0].scrollTop=t[0].scrollHeight},isCursorAtEnd:function(){var t,e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(t){if(this.disabled||this.visible||t.which!==r||!this.currentValue){if(!this.disabled&&this.visible){switch(t.which){case i:this.el.val(this.currentValue),this.hide();break;case l:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case a:if(this.hint&&this.options.onHint)return void this.selectHint();if(-1===this.selectedIndex)return void this.hide();if(this.select(this.selectedIndex),!1===this.options.tabDisabled)return;break;case o:return void this.hide();case n:this.moveUp();break;case r:this.moveDown();break;default:return}t.stopImmediatePropagation(),t.preventDefault()}}else this.suggest()},onKeyUp:function(t){var e=this;if(!e.disabled){switch(t.which){case n:case r:return}clearTimeout(e.onChangeTimeout),e.currentValue!==e.el.val()&&(e.findBestHint(),e.options.deferRequestBy>0?e.onChangeTimeout=setTimeout(function(){e.onValueChange()},e.options.deferRequestBy):e.onValueChange())}},onValueChange:function(){if(this.ignoreValueChange)this.ignoreValueChange=!1;else{var e=this.options,s=this.el.val(),i=this.getQuery(s);this.selection&&this.currentValue!==i&&(this.selection=null,(e.onInvalidateSelection||t.noop).call(this.element)),clearTimeout(this.onChangeTimeout),this.currentValue=s,this.selectedIndex=-1,e.triggerSelectOnValidInput&&this.isExactMatch(i)?this.select(0):i.length<e.minChars?(t("."+this.options.closeTrigger).removeClass(this.options.closeTrigger),this.hide()):this.getSuggestions(i)}},isExactMatch:function(t){var e=this.suggestions;return 1===e.length&&e[0].value.toLowerCase()===t.toLowerCase()},canShowDetailsBox:function(){return 1==this.options.showDetailsPanel&&!this.isMobileMode()},isMobileMode:function(){return t(window).width()<this.options.mobileBreakpoint},getQuery:function(e){var s,i=this.options.delimiter;return i?(s=e.split(i),t.trim(s[s.length-1])):e},getSuggestionsLocal:function(e){var s,i=this.options,a=e.toLowerCase(),o=i.lookupFilter,n=parseInt(i.lookupLimit,10);return s={suggestions:t.grep(i.lookup,function(t){return o(t,e,a)})},n&&s.suggestions.length>n&&(s.suggestions=s.suggestions.slice(0,n)),s},getSuggestions:function(i){var a,o,n,l,r=this,c=r.options,d=c.serviceUrl,g=r.getFormWrapper();c.params[c.paramName]=i,void 0!==dgwt_wcas.current_lang&&(c.params.l=dgwt_wcas.current_lang),r.preloader("show","form","dgwt-wcas-inner-preloader"),g.addClass("dgwt-wcas-processing"),!1!==c.onSearchStart.call(r.element,c.params)&&(o=c.ignoreParams?null:c.params,t.isFunction(c.lookup)?c.lookup(i,function(t){r.suggestions=t.suggestions,r.suggest(),r.selectFirstSuggestion(t.suggestions),c.onSearchComplete.call(r.element,i,t.suggestions)}):(r.isLocal?a=r.getSuggestionsLocal(i):(t.isFunction(d)&&(d=d.call(r.element,i)),n=d+"?"+t.param(o||{}),a=r.cachedResponse[n]),a&&Array.isArray(a.suggestions)?(r.suggestions=a.suggestions,r.suggest(),r.selectFirstSuggestion(a.suggestions),c.onSearchComplete.call(r.element,i,a.suggestions)):r.isBadQuery(i)?c.onSearchComplete.call(r.element,i,[]):(r.abortAjax(),l={url:d,data:o,type:c.type,dataType:c.dataType},t.extend(l,c.ajaxSettings),s.object=r,s.ajaxSettings=l,e.debounce(function(){var e=s.object,a=s.ajaxSettings;e.currentRequest=t.ajax(a).done(function(t){var s;e.currentRequest=null,void 0!==(s=e.options.transformResult(t,i)).suggestions&&(e.processResponse(s,i,n),e.selectFirstSuggestion(s.suggestions),1===s.suggestions.length&&void 0!==s.suggestions[0].type&&"no-results"===s.suggestions[0].type?e.gaEvent(i,"Autocomplete Search without results"):e.gaEvent(i,"Autocomplete Search with results")),e.fixPositionCapture(),e.options.onSearchComplete.call(e.element,i,s.suggestions)}).fail(function(t,s,a){e.options.onSearchError.call(e.element,i,t,s,a)})},c.debounceWaitMs))))},getDetails:function(e){var s=this;s.options;if(!s.canShowDetailsBox())return!1;if(null!=e&&void 0!==e.type&&("string"!=typeof e.more_products||"more_products"!==e.more_products)){s.fixHeight();var i,a=s.getDetailsContainer(),o=s.prepareSuggestionObjectID(e);if(null!=(i=s.cachedDetails[o]))a.html(i.html),s.fixHeight(),s.fixPositionCapture();else{var n={action:dgwt_wcas.action_result_details,items:[]};if(t.each(s.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type){var i={objectID:s.prepareSuggestionObjectID(e),value:null!=e.value?e.value:""};n.items.push(i)}}),a.html(""),s.preloader("show","details","",!0),-1!=t.inArray(o,s.detailsRequestsSent))return;s.detailsRequestsSent.push(o),t.ajax({data:n,type:"post",url:dgwt_wcas.ajax_details_endpoint,success:function(t){var e="string"==typeof t?jQuery.parseJSON(t):t;if(void 0!==e.items)for(var i=0;i<e.items.length;i++){var o=e.items[i].objectID;if(s.cachedDetails[o]={html:e.items[i].html},void 0!==e.items[i].imageSrc&&e.items[i].imageSrc.length>0)(new Image).src=e.items[i].imageSrc}s.preloader("hide","details","",!0);var n=s.prepareSuggestionObjectID(s.suggestions[s.selectedIndex]);null!=s.cachedDetails[n]?a.html(s.cachedDetails[n].html):a.html(""),s.fixPositionCapture(),s.fixHeight()},error:function(t,e){s.preloader("hide","details","",!0),a.html(t),s.fixPositionCapture(),s.fixHeight()}})}t(document).trigger("dgwtWcasDetailsPanelLoaded",s)}},prepareSuggestionObjectID:function(t){var e="";return void 0!==t&&void 0!==t.type&&(null!=t.post_id&&(e=t.type+"__"+t.post_id,"product_variation"===t.type&&(e+="__"+t.variation_id),void 0!==t.post_type&&(e=t.type+"__"+t.post_id+"__"+t.post_type)),null!=t.term_id&&null!=t.taxonomy&&(e=t.type+"__"+t.term_id+"__"+t.taxonomy)),e},selectFirstSuggestion:function(e){var s=0,i=!1;this.canShowDetailsBox()&&("undefined"!=e&&e.length>0&&t.each(this.suggestions,function(t,e){if(void 0!==e.type&&"more_products"!=e.type&&"headline"!=e.type&&"no-results"!=e.type)return s=t,!1;void 0!==e.type&&"no-results"!==e.type||(i=!0)}),i||(this.getDetails(e[s]),this.activate(s)))},isBadQuery:function(t){if(!this.options.preventBadQueries)return!1;for(var e=this.badQueries,s=e.length;s--;)if(0===t.indexOf(e[s]))return!0;return!1},hide:function(){var e=this.getSuggestionsContainer(),s=this.getDetailsContainer();t.isFunction(this.options.onHide)&&this.visible&&this.options.onHide.call(this.element,container),this.visible=!1,this.selectedIndex=-1,clearTimeout(this.onChangeTimeout),e.hide(),e.removeClass(this.classes.suggestionsContainerOrientTop),s.hide(),t("body").removeClass("dgwt-wcas-open"),t("body").removeClass("dgwt-wcas-block-scroll"),t("body").removeClass("dgwt-wcas-is-details"),t("body").removeClass("dgwt-wcas-full-width"),t("body").removeClass("dgwt-wcas-nores"),t("body").removeClass("dgwt-wcas-details-outside"),t("body").removeClass("dgwt-wcas-details-right"),t("body").removeClass("dgwt-wcas-details-left"),null!=this.autoAligmentprocess&&(clearInterval(this.autoAligmentprocess),this.autoAligmentprocess=null),this.signalHint(null)},hideAfterClickOutsideListener:function(){var e=this;e.isMobileMode()||t(document).mouseup(function(s){if(e.visible){e.getSuggestionsContainer(),e.getDetailsContainer();var i=!(t(s.target).closest("."+e.options.searchFormClass).length>0||t(s.target).hasClass(e.options.searchFormClass)),a=!(t(s.target).closest("."+e.options.containerClass).length>0||t(s.target).hasClass(e.options.containerClass));if(e.canShowDetailsBox()){var o=!(t(s.target).closest("."+e.options.containerDetailsClass).length>0||t(s.target).hasClass(e.options.containerDetailsClass));i&&a&&o&&e.hide()}else i&&a&&e.hide()}})},suggest:function(){if(this.suggestions.length){var e,s=this,i=s.options,a=i.groupBy,o=i.formatResult,n=s.getQuery(s.currentValue),l=s.classes.suggestion,r=s.classes.selected,c=s.getSuggestionsContainer(),d=s.getDetailsContainer(),g=t(s.noSuggestionsContainer),u=i.beforeRender,h="";i.triggerSelectOnValidInput&&s.isExactMatch(n)?s.select(0):(t("body").removeClass("dgwt-wcas-nores"),t.each(s.suggestions,function(s,r){var c="",g=!1;if(a&&(h+=function(t,s){var i=t.data[a];return e===i?"":'<div class="autocomplete-group"><strong>'+(e=i)+"</strong></div>"}(r,0)),void 0===r.type||"product"!=r.type&&"product_variation"!=r.type){var u=l,w="dgwt-wcas-st",p="",m="",f="",v=!0;"product_cat"===r.taxonomy?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-cat",i.showHeadings||(p+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.category+"</span>"),void 0!==r.breadcrumbs&&r.breadcrumbs&&(f=r.breadcrumbs+" &gt; "+r.value,m+='<span class="dgwt-wcas-st-breadcrumbs">'+dgwt_wcas.labels.in+" "+r.breadcrumbs+"</span>")):"product_tag"===r.taxonomy?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-tag",i.showHeadings||(p+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.tag+"</span>")):i.isPremium&&r.taxonomy===i.taxonomyBrands?(u+=" dgwt-wcas-suggestion-tax dgwt-wcas-suggestion-brand",i.showHeadings||(p+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.brand+"</span>")):i.isPremium&&"post"===r.type?(u+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-tp-post",i.showHeadings||(p+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.post+"</span>")):i.isPremium&&"page"===r.type?(u+=" dgwt-wcas-suggestion-pt dgwt-wcas-suggestion-pt-page",i.showHeadings||(p+='<span class="dgwt-wcas-st--direct-headline">'+dgwt_wcas.labels.page+"</span>")):"more_products"===r.type?(u+=" js-dgwt-wcas-suggestion-more dgwt-wcas-suggestion-more",w="dgwt-wcas-st-more",r.value=dgwt_wcas.labels.show_more+" ("+r.total+")",v=!1):i.showHeadings&&"headline"===r.type?(u+=" js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline",void 0!==dgwt_wcas.labels[r.value+"_plu"]&&(r.value=dgwt_wcas.labels[r.value+"_plu"]),v=!1):(u+=" dgwt-wcas-suggestion-nores",r.value=dgwt_wcas.labels.no_results,v=!1,!0===i.showDetailsPanel&&d.html(""),t("body").addClass("dgwt-wcas-nores")),f=f.length>0?' title="'+f+'"':"",h+='<div class="'+u+'" data-index="'+s+'">',h+="<span"+f+' class="'+w+'">'+p+o(r.value,n,v)+m+"</span>",h+="</div>"}else!0===i.showImage&&void 0!==r.thumb_html&&(g=!0),c+=void 0!==r.post_id?'data-post-id="'+r.post_id+'" ':"",c+=void 0!==r.taxonomy?'data-taxonomy="'+r.taxonomy+'" ':"",c+=void 0!==r.term_id?'data-term-id="'+r.term_id+'" ':"",h+='<div class="'+l+' dgwt-wcas-suggestion-product" data-index="'+s+'" '+c+">",g&&(h+='<span class="dgwt-wcas-si">'+r.thumb_html+"</span>"),h+=g?'<div class="dgwt-wcas-content-wrapp">':"",h+='<span class="dgwt-wcas-st">',h+='<span class="dgwt-wcas-st-title">'+o(r.value,n,!0)+"</span>",!0===i.showSKU&&void 0!==r.sku&&r.sku.length>0&&(h+='<span class="dgwt-wcas-sku">('+dgwt_wcas.labels.sku_label+" "+o(r.sku,n,!0)+")</span>"),!0===i.showDescription&&void 0!==r.desc&&r.desc&&(h+='<span class="dgwt-wcas-sd">'+o(r.desc,n,!0)+"</span>"),h+="</span>",!0===i.showPrice&&void 0!==r.price&&(h+='<span class="dgwt-wcas-sp">'+r.price+"</span>"),!0===i.showFeaturedBadge&&!0===r.on_sale&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-os">'+i.saleBadgeText+"</span>"),!0===i.showFeaturedBadge&&!0===r.featured&&(h+='<span class="dgwt-wcas-badge dgwt-wcas-badge-f">'+i.featuredBadgeText+"</span>"),h+=g?"</div>":"",h+="</div>"}),this.adjustContainerWidth(),g.detach(),c.html(h),t.isFunction(u)&&u.call(s.element,c,s.suggestions),c.show(),t("body").addClass("dgwt-wcas-open"),s.automaticAlignment(),!0===i.showDetailsPanel&&(t("body").addClass("dgwt-wcas-is-details"),d.show(),s.fixHeight()),i.autoSelectFirst&&(s.selectedIndex=0,c.scrollTop(0),c.children("."+l).first().addClass(r)),s.visible=!0,s.fixPositionCapture(),"top"===s.options.orientation&&(s.getSuggestionsContainer().addClass(s.classes.suggestionsContainerOrientTop),t("body").addClass("dgwt-wcas-block-scroll"),setTimeout(function(){s.scrollDownSuggestions()},300)),s.findBestHint())}else this.hide()},adjustContainerWidth:function(){var e,s=this.options,i=t("body"),a=this.getFormWrapper(),o=this.getSuggestionsContainer(),n=this.getDetailsContainer(),l=this.getFormOffset(),r=getComputedStyle(a[0]).width;if(r=Math.round(parseFloat(r.replace("px",""))),"auto"===s.width&&(e=this.el.outerWidth(),o.css("width",e+"px")),!0===s.showDetailsPanel){if(a.width()>=550)return i.addClass("dgwt-wcas-full-width"),r%2==0?(o.css("width",Math.round(r/2)),n.css("width",Math.round(r/2))):(o.css("width",Math.floor(r/2)),n.css("width",Math.ceil(r/2))),i.removeClass("dgwt-wcas-details-left"),i.removeClass("dgwt-wcas-details-right"),void(!0===s.isRtl?n.css("left","0"):o.css("left",r/2+l.left+"px"));i.addClass("dgwt-wcas-details-right")}},findBestHint:function(){var e=this.el.val().toLowerCase(),s=null;e&&(t.each(this.suggestions,function(t,i){var a=0===i.value.toLowerCase().indexOf(e);return a&&(s=i),!a}),this.signalHint(s))},signalHint:function(e){var s="";e&&(s=this.currentValue+e.value.substr(this.currentValue.length)),this.hintValue!==s&&(this.hintValue=s,this.hint=e,(this.options.onHint||t.noop)(s))},preloader:function(e,s,i,a){var o,n,l="dgwt-wcas-preloader-wrapp",r=null==i?l:l+" "+i;if("form"===s?n=this.getFormWrapper().find(".dgwt-wcas-preloader"):"details"===s&&(n=t(this.detailsContainer)),1==dgwt_wcas.show_preloader&&0!=n.length)if(!0===a)if("hide"!==e){if("show"===e){var c=this.options.isRtl?"-rtl":"";o='<div class="'+r+'"><img class="dgwt-wcas-placeholder-preloader" src="'+dgwt_wcas.img_url+"placeholder"+c+'.png" /></div>',n.html(o)}}else t(l).remove();else"hide"===e?n.removeClass(i):n.addClass(i)},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?t.map(e,function(t){return{value:t,data:null}}):e},validateOrientation:function(e,s){return e=t.trim(e||"").toLowerCase(),-1===t.inArray(e,["auto","bottom","top"])&&(e=s),e},processResponse:function(t,e,s){var i=this.options;t.suggestions=this.verifySuggestionsFormat(t.suggestions),i.noCache||(this.cachedResponse[s]=t,i.preventBadQueries&&!t.suggestions.length&&this.badQueries.push(e)),e===this.getQuery(this.currentValue)&&("top"===this.options.orientation&&t.suggestions.reverse(),this.suggestions=t.suggestions,this.suggest())},activate:function(e){var s,i=this.classes.selected,a=this.getSuggestionsContainer(),o=a.find("."+this.classes.suggestion);return a.find("."+i).removeClass(i),this.selectedIndex=e,-1!==this.selectedIndex&&o.length>this.selectedIndex?(s=o.get(this.selectedIndex),t(s).addClass(i),s):null},selectHint:function(){var e=t.inArray(this.hint,this.suggestions);this.select(e)},select:function(t){this.hide(),this.onSelect(t)},moveUp:function(){if(-1!==this.selectedIndex)return 0===this.selectedIndex?(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()):void this.adjustScroll(this.selectedIndex-1)},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(e){var s=this.activate(e);if(this.getDetails(this.suggestions[e]),s&&!this.canShowDetailsBox()){var i,a,o,n=this.getSuggestionsContainer(),l=t(s).outerHeight();i=s.offsetTop,o=(a=n.scrollTop())+this.options.maxHeight-l,i<a?n.scrollTop(i):i>o&&n.scrollTop(i-this.options.maxHeight+l),this.options.preserveInput||(this.ignoreValueChange=!0,this.el.val(this.getValue(this.suggestions[e].value))),this.signalHint(null)}},onSelect:function(e){var s=this.options.onSelect,i=this.suggestions[e];void 0===i.type||"more_products"!==i.type?(this.currentValue=this.getValue(i.value),this.currentValue===this.el.val()||this.options.preserveInput||this.el.val(this.currentValue),i.url.length>0&&(window.location.href=i.url),this.signalHint(null),this.suggestions=[],this.selection=i,t.isFunction(s)&&s.call(this.element,i)):this.el.closest("form").trigger("submit")},getValue:function(t){var e,s,i=this.options.delimiter;return i?1===(s=(e=this.currentValue).split(i)).length?t:e.substr(0,e.length-s[s.length-1].length)+t:t},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),t(window).off("resize.autocomplete",this.fixPositionCapture),t("."+this.options.containerClass).remove(),t("."+this.options.containerDetailsClass).remove()},enableOverlayMobile:function(){var e=this;if("on"!==e.overlayMobileState){e.overlayMobileState="on";var s,i=e.getFormWrapper(),a=e.getSuggestionsContainer();t("html").addClass("dgwt-wcas-overlay-mobile-on"),'<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile">','<div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar">','<span class="dgwt-wcas-om-return js-dgwt-wcas-om-return">','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF">','<path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path>',"</svg>","</span>","</div>","</div>",t(e.options.mobileOverlayWrapper).append('<div class="js-dgwt-wcas-overlay-mobile dgwt-wcas-overlay-mobile"><div class="dgwt-wcas-om-bar js-dgwt-wcas-om-bar"><span class="dgwt-wcas-om-return js-dgwt-wcas-om-return"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#FFF"><path fill="#FFF" d="M14 6.125H3.351l4.891-4.891L7 0 0 7l7 7 1.234-1.234L3.35 7.875H14z" fill-rule="evenodd"></path></svg></span></div></div>'),(s=t(".js-dgwt-wcas-overlay-mobile")).css("zIndex",999999),i.after('<span class="js-dgwt-wcas-om-hook"></span>'),i.appendTo(".js-dgwt-wcas-om-bar"),a.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("."+e.options.searchInputClass).focus(),t(document).on("click",".js-dgwt-wcas-om-return",function(t){e.disableOverlayMobile(s)})}},disableOverlayMobile:function(e){var s=this,i=s.getSuggestionsContainer(),a=t(".js-dgwt-wcas-om-bar").find("."+s.options.searchFormClass);a.hasClass("dgwt-wcas-has-submit-off")&&(a.removeClass("dgwt-wcas-has-submit-off"),a.addClass("dgwt-wcas-has-submit")),a.removeClass("dgwt-wcas-search-wrapp-mobile"),t("html").removeClass("dgwt-wcas-overlay-mobile-on"),i.appendTo("body"),i.removeAttr("body-scroll-lock-ignore"),t(".js-dgwt-wcas-om-hook").after(a),t(".js-dgwt-wcas-overlay-mobile").remove(),t(".js-dgwt-wcas-om-hook").remove(),setTimeout(function(){a.find("."+s.options.searchInputClass).val("");var t=a.find(".dgwt-wcas-close");a.length>0&&t.removeClass("dgwt-wcas-close")},150),s.overlayMobileState="off"},elementOrParentIsFixed:function(e){var s=e.add(e.parents()),i=!1;return s.each(function(){if("fixed"===t(this).css("position"))return i=!0,!1}),i},gaEvent:function(t,e){if(this.options.sendGAEvents)try{if("undefined"!=typeof gtag)return void gtag("event","autocomplete_search",{event_label:t,event_category:e});"undefined"!=typeof ga&&ga("send",{hitType:"event",eventCategory:e,eventAction:"autocomplete_search",eventLabel:t})}catch(t){}}},t.fn.dgwtWcasAutocomplete=function(e,s){return arguments.length?this.each(function(){var i=t(this),a=i.data("autocomplete");"string"==typeof e?a&&"function"==typeof a[e]&&a[e](s):(a&&a.dispose&&a.dispose(),a=new d(this,e),i.data("autocomplete",a))}):this.first().data("autocomplete")},t.fn.autocomplete||(t.fn.autocomplete=t.fn.dgwtWcasAutocomplete),function(){function e(e){var s=t(".dgwt-wcas-search-wrapp[data-wcas-context]"),i=[];s.length>0&&s.each(function(){var s=t(this).attr("data-wcas-context");if(-1==t.inArray(s,i))i.push(s);else{var a=Math.random().toString(36).substring(2,6);if(t(this).attr("data-wcas-context",a),!e){var o=t('.dgwt-wcas-suggestions-wrapp[data-wcas-context="'+s+'"]'),n=t('.dgwt-wcas-details-wrapp[data-wcas-context="'+s+'"]');o.length>0&&t(o[o.length-1]).attr("data-wcas-context",a),n.length>0&&t(n[n.length-1]).attr("data-wcas-context",a)}}})}t(window).on("load",function(){t(".dgwt-wcas-search-submit").length>0&&t(".dgwt-wcas-search-submit").each(function(){var e=t(this).closest(".dgwt-wcas-search-wrapp").find(".dgwt-wcas-preloader");1==dgwt_wcas.is_rtl?e.css("left",6+t(this).outerWidth()+"px"):e.css("right",t(this).outerWidth()+"px")})}),t(document).ready(function(){e(!0);var s=1==dgwt_wcas.show_details_box,i=dgwt_wcas.mobile_breakpoint;(jQuery(window).width()<i||"ontouchend"in document)&&(s=!1),t(".dgwt-wcas-search-input").dgwtWcasAutocomplete({minChars:dgwt_wcas.min_chars,width:dgwt_wcas.sug_width,autoSelectFirst:!1,triggerSelectOnValidInput:!1,serviceUrl:dgwt_wcas.ajax_search_endpoint,paramName:"s",showDetailsPanel:s,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,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,overlayMobile:1==dgwt_wcas.overlay_mobile,mobileBreakpoint:i,mobileOverlayWrapper:dgwt_wcas.mobile_overlay_wrapper,debounceWaitMs:dgwt_wcas.debounce_wait_ms,sendGAEvents:dgwt_wcas.send_ga_events})}),t(window).on("load",function(){e(!1)})}()});
backward-compatibility/1-1-7/search-form.php CHANGED
@@ -1,4 +1,7 @@
1
  <?php
 
 
 
2
  // Exit if accessed directly
3
  if ( !defined( 'DGWT_WCAS_FILE' ) ) {
4
  exit;
@@ -51,7 +54,7 @@ if(!function_exists('dgwt_wcas_print_ico_loupe_1_1_7')) {
51
  }
52
  }
53
 
54
- $submit_text = DGWT_WCAS()->settings->getOption( 'search_submit_text' );
55
  $has_submit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
56
 
57
  ?>
@@ -71,7 +74,7 @@ $has_submit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
71
  class="dgwt-wcas-search-input"
72
  name="s"
73
  value="<?php echo get_search_query() ?>"
74
- placeholder="<?php echo DGWT_WCAS()->settings->getOption( 'search_placeholder', __( 'Search for products...', 'ajax-search-for-woocommerce' ) ) ?>"
75
  />
76
  <div class="dgwt-wcas-preloader"></div>
77
 
@@ -83,7 +86,7 @@ $has_submit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
83
  <input type="hidden" name="dgwt_wcas" value="1" />
84
 
85
  <?php
86
- // WPML compatible
87
  if ( defined( 'ICL_LANGUAGE_CODE' ) ):
88
  ?>
89
  <input type="hidden" name="lang" value="<?php echo( ICL_LANGUAGE_CODE ); ?>" />
1
  <?php
2
+
3
+ use DgoraWcas\Helpers;
4
+
5
  // Exit if accessed directly
6
  if ( !defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
54
  }
55
  }
56
 
57
+ $submit_text = Helpers::getLabel('submit');
58
  $has_submit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
59
 
60
  ?>
74
  class="dgwt-wcas-search-input"
75
  name="s"
76
  value="<?php echo get_search_query() ?>"
77
+ placeholder="<?php echo Helpers::getLabel('search_placeholder'); ?>"
78
  />
79
  <div class="dgwt-wcas-preloader"></div>
80
 
86
  <input type="hidden" name="dgwt_wcas" value="1" />
87
 
88
  <?php
89
+ // WPML compatible
90
  if ( defined( 'ICL_LANGUAGE_CODE' ) ):
91
  ?>
92
  <input type="hidden" name="lang" value="<?php echo( ICL_LANGUAGE_CODE ); ?>" />
includes/Admin/RegenerateImages.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ namespace DgoraWcas\Admin;
5
+
6
+
7
+ use DgoraWcas\Helpers;
8
+
9
+ class RegenerateImages
10
+ {
11
+
12
+ const ALREADY_REGENERATED_OPT_KEY = 'dgwt_wcas_images_regenerated';
13
+
14
+ public function __construct()
15
+ {
16
+ }
17
+
18
+ public function init()
19
+ {
20
+
21
+ // Temporary disable this feature
22
+ return;
23
+
24
+ $regenerated = get_option(self::ALREADY_REGENERATED_OPT_KEY);
25
+
26
+
27
+ // Add image sizes to regenerate
28
+ add_filter('woocommerce_regenerate_images_intermediate_image_sizes', array($this, 'getImageSizes'), 10, 1);
29
+
30
+
31
+ if (Helpers::isSettingsPage() && empty($regenerated)) {
32
+ // regenerate Images
33
+ add_action('admin_init', array($this, 'regenerateImages'));
34
+ }
35
+
36
+ }
37
+
38
+ /**
39
+ * Regenerate images
40
+ *
41
+ * @return void
42
+ */
43
+ public function regenerateImages()
44
+ {
45
+ if (class_exists('WC_Regenerate_Images')) {
46
+
47
+ if ( method_exists( 'Jetpack', 'is_module_active' ) && \Jetpack::is_module_active( 'photon' ) ) {
48
+ return;
49
+ }
50
+
51
+ if ( apply_filters( 'woocommerce_background_image_regeneration', true ) ) {
52
+ \WC_Regenerate_Images::queue_image_regeneration();
53
+ update_option(self::ALREADY_REGENERATED_OPT_KEY, true);
54
+ }
55
+ }
56
+
57
+ }
58
+
59
+ /**
60
+ * Images sizes to regenerate
61
+ *
62
+ * @param array $sizes
63
+ *
64
+ * @return array
65
+ */
66
+ public function getImageSizes($sizes)
67
+ {
68
+ array_push($sizes, 'dgwt-wcas-product-suggestion');
69
+
70
+ return $sizes;
71
+
72
+ }
73
+
74
+ }
includes/Engines/WordPressNative/DetailsBox.php CHANGED
@@ -2,214 +2,228 @@
2
 
3
  namespace DgoraWcas\Engines\WordPressNative;
4
 
5
- use DgoraWcas\Product;
6
- use DgoraWcas\Helpers;
7
-
8
  // Exit if accessed directly
9
- if ( ! defined('ABSPATH')) {
10
  exit;
11
  }
12
-
13
  class DetailsBox
14
  {
15
-
16
  public function __construct()
17
  {
18
-
19
- if (defined('DGWT_WCAS_WC_AJAX_ENDPOINT')) {
20
-
21
  // Searched result details ajax action
22
- if (DGWT_WCAS_WC_AJAX_ENDPOINT) {
23
- add_action('wc_ajax_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array($this, 'getResultDetails'));
 
24
  } else {
25
- add_action('wp_ajax_nopriv_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array($this, 'getResultDetails'));
26
- add_action('wp_ajax_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array($this, 'getResultDetails'));
27
  }
 
28
  }
29
  }
30
-
31
  /**
32
  * Get searched result details
33
  */
34
-
35
  public function getResultDetails()
36
  {
37
- if (!defined('DGWT_WCAS_AJAX_DETAILS_PANEL')) {
38
- define('DGWT_WCAS_AJAX_DETAILS_PANEL', true);
39
  }
40
-
41
  $output = array();
42
- $items = array();
43
-
44
- if ( ! empty($_POST['items']) && is_array($_POST['items'])) {
45
-
46
- foreach ($_POST['items'] as $item) {
47
-
48
- if (empty($item['objectID'])) {
49
  continue;
50
  }
51
-
52
  $suggestionValue = '';
53
- $postType = '';
54
- $postID = 0;
55
- $variationID = 0;
56
- $termID = 0;
57
- $taxonomy = '';
58
-
59
  // Suggestion value
60
- if ( ! empty($item['value'])) {
61
- $suggestionValue = sanitize_text_field($item['value']);
62
  }
63
-
64
- $parts = explode('__', $item['objectID']);
65
- $type = ! empty($parts[0]) ? sanitize_key($parts[0]) : '';
66
-
67
- if ($type === 'taxonomy') {
68
- $termID = ! empty($parts[1]) ? absint($parts[1]) : 0;
69
- $taxonomy = ! empty($parts[2]) ? sanitize_key($parts[2]) : '';
70
  } else {
71
- $postType = $type;
72
- $postID = ! empty($parts[1]) ? absint($parts[1]) : 0;
73
- $variationID = ! empty($parts[2]) ? absint($parts[2]) : 0;
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
-
76
-
77
  // Get product details
78
- if ('product' === get_post_type($postID)) {
 
 
79
  $items[] = array(
80
  'objectID' => $item['objectID'],
81
- 'html' => $this->getProductDetails($postID)
 
82
  );
83
  }
84
-
85
  // Get taxonomy details
86
- if ( ! empty($termID) && ! empty($taxonomy)) {
87
  $items[] = array(
88
  'objectID' => $item['objectID'],
89
- 'html' => $this->getTaxonomyDetails($termID, $taxonomy, $suggestionValue)
90
  );
91
-
92
  }
93
  }
94
  $output['items'] = $items;
95
-
96
- echo json_encode(apply_filters('dgwt/wcas/suggestion_details/output', $output));
97
- die();
98
  }
 
99
  }
100
-
101
  /**
102
  * Prepare products details to the ajax output
103
  *
104
- * @param int $productID
105
- * @param string $value Suggestion value
106
  *
107
- * @return string HTML
108
  */
109
-
110
- private function getProductDetails($productID)
111
  {
112
-
113
- $html = '';
114
-
115
- $product = new Product($productID);
116
-
117
- if (empty($product)) {
118
  return;
119
  }
120
-
121
  $details = array(
122
- 'id' => $product->getID(),
123
- 'desc' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  );
125
-
126
-
127
- // Get product desc
128
- $details['desc'] = Helpers::getProductDesc($product->getWooObject(), 500);
129
-
130
-
131
  ob_start();
132
- include DGWT_WCAS_DIR . 'partials/single-product.php';
133
- $html = ob_get_clean();
134
-
135
-
136
- return $html;
 
 
 
 
137
  }
138
-
139
  /**
140
  * Prepare category details to the ajax output
141
  *
142
  * @param int $termID
143
  * @param string taxonomy
144
- * @param string $suggestion Suggestion value
145
  *
146
  * @return string HTML
147
  */
148
-
149
- private function getTaxonomyDetails($termID, $taxonomy, $suggestion)
150
  {
151
-
152
- $html = '';
153
  $title = '';
154
-
155
  ob_start();
156
-
157
- $queryArgs = $this->getProductsQueryArgs($termID, $taxonomy);
158
-
159
- $products = new \WP_Query($queryArgs);
160
-
161
- if ($products->have_posts()) {
162
-
163
- $limit = $queryArgs['posts_per_page'];
164
- $totalProducts = absint($products->found_posts);
165
- $showMore = $limit > 0 && $totalProducts > 0 && $totalProducts - $limit > 0 ? true : false;
166
-
167
-
168
  // Details panel title
169
  $title .= '<span class="dgwt-wcas-datails-title">';
170
  $title .= '<span class="dgwt-wcas-details-title-tax">';
171
- if ('product_cat' === $taxonomy) {
172
- $title .= __('Category', 'woocommerce') . ': ';
 
173
  } else {
174
- $title .= __('Tag') . ': ';
175
  }
 
176
  $title .= '</span>';
177
- $title .= $suggestion;
178
  $title .= '</span>';
179
-
180
-
181
- echo '<div class="dgwt-wcas-details-inner">';
182
- echo '<div class="dgwt-wcas-products-in-cat">';
183
-
184
- echo ! empty($title) ? $title : '';
185
-
186
- while ($products->have_posts()) {
 
 
 
187
  $products->the_post();
188
-
189
- $product = new Product(get_the_ID());
190
-
191
- include DGWT_WCAS_DIR . 'partials/single-product-tax.php';
192
  }
193
-
194
- echo '</div>';
195
-
196
- if ($showMore) {
197
- $showMoreUrl = get_term_link($termID, $taxonomy);
198
- echo '<a class="dgwt-wcas-details-more-products" href="' . esc_url($showMoreUrl) . '">' . __('See all products...', 'ajax-search-for-woocommerce') . ' (' . $totalProducts . ')</a>';
199
  }
200
-
201
- echo '</div>';
202
  }
203
-
204
  wp_reset_postdata();
205
-
206
-
207
  $html = ob_get_clean();
208
-
209
-
210
- return $html;
 
 
 
211
  }
212
-
213
  /**
214
  * Get query vars for products that should be displayed in the daxonomy details box
215
  *
@@ -218,23 +232,19 @@ class DetailsBox
218
  *
219
  * @return array
220
  */
221
-
222
- private function getProductsQueryArgs($termID, $taxonomy)
223
  {
224
-
225
  $productVisibilityTermIds = wc_get_product_visibility_term_ids();
226
-
227
  $queryArgs = array(
228
- 'posts_per_page' => apply_filters('dgwt/wcas/suggestion_details/taxonomy/limit', 4),
229
  'post_status' => 'publish',
230
  'post_type' => 'product',
231
  'no_found_rows' => false,
232
  'order' => 'desc',
233
  'orderby' => 'meta_value_num',
234
  'meta_key' => 'total_sales',
235
- 'tax_query' => array()
236
  );
237
-
238
  // Visibility
239
  $queryArgs['tax_query'][] = array(
240
  'taxonomy' => 'product_visibility',
@@ -242,17 +252,15 @@ class DetailsBox
242
  'terms' => $productVisibilityTermIds['exclude-from-search'],
243
  'operator' => 'NOT IN',
244
  );
245
-
246
  // Out of stock
247
- if ('yes' === get_option('woocommerce_manage_stock') && DGWT_WCAS()->settings->getOption('exclude_out_of_stock') === 'on') {
248
  $queryArgs['tax_query'][] = array(
249
  'taxonomy' => 'product_visibility',
250
  'field' => 'term_taxonomy_id',
251
  'terms' => $productVisibilityTermIds['outofstock'],
252
  'operator' => 'NOT IN',
253
  );
254
- };
255
-
256
  // Search with specific category
257
  $queryArgs['tax_query'][] = array(
258
  'taxonomy' => $taxonomy,
@@ -260,8 +268,12 @@ class DetailsBox
260
  'terms' => $termID,
261
  'include_children' => true,
262
  );
263
-
264
- return apply_filters('dgwt/wcas/suggestion_details/taxonomy/products_query_args', $queryArgs, $termID, $taxonomy);
 
 
 
 
265
  }
266
 
267
  }
2
 
3
  namespace DgoraWcas\Engines\WordPressNative;
4
 
5
+ use DgoraWcas\Post ;
6
+ use DgoraWcas\Product ;
7
+ use DgoraWcas\Helpers ;
8
  // Exit if accessed directly
9
+ if ( !defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
 
12
  class DetailsBox
13
  {
 
14
  public function __construct()
15
  {
16
+ if ( defined( 'DGWT_WCAS_WC_AJAX_ENDPOINT' ) ) {
 
 
17
  // Searched result details ajax action
18
+
19
+ if ( DGWT_WCAS_WC_AJAX_ENDPOINT ) {
20
+ add_action( 'wc_ajax_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array( $this, 'getResultDetails' ) );
21
  } else {
22
+ add_action( 'wp_ajax_nopriv_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array( $this, 'getResultDetails' ) );
23
+ add_action( 'wp_ajax_' . DGWT_WCAS_RESULT_DETAILS_ACTION, array( $this, 'getResultDetails' ) );
24
  }
25
+
26
  }
27
  }
28
+
29
  /**
30
  * Get searched result details
31
  */
 
32
  public function getResultDetails()
33
  {
34
+ if ( !defined( 'DGWT_WCAS_AJAX_DETAILS_PANEL' ) ) {
35
+ define( 'DGWT_WCAS_AJAX_DETAILS_PANEL', true );
36
  }
 
37
  $output = array();
38
+ $items = array();
39
+
40
+ if ( !empty($_POST['items']) && is_array( $_POST['items'] ) ) {
41
+ foreach ( $_POST['items'] as $item ) {
42
+ if ( empty($item['objectID']) ) {
 
 
43
  continue;
44
  }
 
45
  $suggestionValue = '';
46
+ $postType = '';
47
+ $postID = 0;
48
+ $variationID = 0;
49
+ $termID = 0;
50
+ $taxonomy = '';
 
51
  // Suggestion value
52
+ if ( !empty($item['value']) ) {
53
+ $suggestionValue = sanitize_text_field( $item['value'] );
54
  }
55
+ $parts = explode( '__', $item['objectID'] );
56
+ $type = ( !empty($parts[0]) ? sanitize_key( $parts[0] ) : '' );
57
+
58
+ if ( $type === 'taxonomy' ) {
59
+ $termID = ( !empty($parts[1]) ? absint( $parts[1] ) : 0 );
60
+ $taxonomy = ( !empty($parts[2]) ? sanitize_key( $parts[2] ) : '' );
 
61
  } else {
62
+
63
+ if ( $type === 'product' ) {
64
+ $postType = 'product';
65
+ $postID = ( !empty($parts[1]) ? absint( $parts[1] ) : 0 );
66
+ $variationID = ( !empty($parts[2]) ? absint( $parts[2] ) : 0 );
67
+ } else {
68
+
69
+ if ( $type === 'post' ) {
70
+ $postType = ( !empty($parts[2]) ? $parts[2] : 0 );
71
+ $postID = ( !empty($parts[1]) ? absint( $parts[1] ) : 0 );
72
+ }
73
+
74
+ }
75
+
76
  }
77
+
 
78
  // Get product details
79
+
80
+ if ( 'product' === get_post_type( $postID ) ) {
81
+ $productDetails = $this->getProductDetails( $postID );
82
  $items[] = array(
83
  'objectID' => $item['objectID'],
84
+ 'html' => $productDetails['html'],
85
+ 'imageSrc' => $productDetails['imageSrc'],
86
  );
87
  }
88
+
89
  // Get taxonomy details
90
+ if ( !empty($termID) && !empty($taxonomy) ) {
91
  $items[] = array(
92
  'objectID' => $item['objectID'],
93
+ 'html' => $this->getTaxonomyDetails( $termID, $taxonomy, $suggestionValue ),
94
  );
 
95
  }
96
  }
97
  $output['items'] = $items;
98
+ echo json_encode( apply_filters( 'dgwt/wcas/suggestion_details/output', $output ) ) ;
99
+ die;
 
100
  }
101
+
102
  }
103
+
104
  /**
105
  * Prepare products details to the ajax output
106
  *
107
+ * @param object $product
 
108
  *
109
+ * @return array
110
  */
111
+ private function getProductDetails( $productID )
 
112
  {
113
+ $product = new Product( $productID );
114
+ if ( empty($product) ) {
 
 
 
 
115
  return;
116
  }
 
117
  $details = array(
118
+ 'html' => '',
119
+ 'imageSrc' => '',
120
+ );
121
+ $thumbSize = apply_filters( 'dgwt/wcas/suggestion_details/product/thumb_size', 'woocommerce_thumbnail' );
122
+ $wooProduct = $product->getWooObject();
123
+ $vars = array(
124
+ 'ID' => $product->getID(),
125
+ 'name' => $product->getName(),
126
+ 'desc' => $product->getDescription( 'details-panel' ),
127
+ 'link' => $product->getPermalink(),
128
+ 'imageSrc' => $product->getThumbnailSrc( $thumbSize ),
129
+ 'sku' => $product->getSKU(),
130
+ 'reviewCount' => $product->getReviewCount(),
131
+ 'ratingHtml' => $product->getRatingHtml(),
132
+ 'priceHtml' => $product->getPriceHTML(),
133
+ 'showQuantity' => false,
134
+ 'wooObject' => $product->getWooObject(),
135
+ );
136
+ $details['imageSrc'] = $product->getThumbnailSrc( $thumbSize );
137
+ if ( $product->isType( 'simple' ) && $wooProduct->is_purchasable() && $wooProduct->is_in_stock() && !$wooProduct->is_sold_individually() && apply_filters( 'dgwt/wcas/suggestion_details/show_quantity', true ) ) {
138
+ $vars['showQuantity'] = true;
139
+ }
140
+ $vars = (object) apply_filters(
141
+ 'dgwt/wcas/suggestion_details/product/vars',
142
+ $vars,
143
+ $productID,
144
+ $product
145
  );
 
 
 
 
 
 
146
  ob_start();
147
+ include DGWT_WCAS_DIR . 'partials/details-panel/product.php';
148
+ $details['html'] = ob_get_clean();
149
+ $details['html'] = apply_filters(
150
+ 'dgwt/wcas/suggestion_details/product/html',
151
+ $details['html'],
152
+ $productID,
153
+ $product
154
+ );
155
+ return $details;
156
  }
157
+
158
  /**
159
  * Prepare category details to the ajax output
160
  *
161
  * @param int $termID
162
  * @param string taxonomy
163
+ * @param string $termName Suggestion value
164
  *
165
  * @return string HTML
166
  */
167
+ private function getTaxonomyDetails( $termID, $taxonomy, $termName )
 
168
  {
169
+ $html = '';
 
170
  $title = '';
 
171
  ob_start();
172
+ $queryArgs = $this->getProductsQueryArgs( $termID, $taxonomy );
173
+ $products = new \WP_Query( $queryArgs );
174
+
175
+ if ( $products->have_posts() ) {
176
+ $limit = $queryArgs['posts_per_page'];
177
+ $totalProducts = absint( $products->found_posts );
178
+ $showMore = ( $limit > 0 && $totalProducts > 0 && $totalProducts - $limit > 0 ? true : false );
 
 
 
 
 
179
  // Details panel title
180
  $title .= '<span class="dgwt-wcas-datails-title">';
181
  $title .= '<span class="dgwt-wcas-details-title-tax">';
182
+
183
+ if ( 'product_cat' === $taxonomy ) {
184
+ $title .= Helpers::getLabel( 'category' ) . ': ';
185
  } else {
186
+ $title .= Helpers::getLabel( 'tag' ) . ': ';
187
  }
188
+
189
  $title .= '</span>';
190
+ $title .= $termName;
191
  $title .= '</span>';
192
+ $title = apply_filters(
193
+ 'dgwt/wcas/suggestion_details/taxonomy/headline',
194
+ $title,
195
+ $termID,
196
+ $taxonomy,
197
+ $termName
198
+ );
199
+ echo '<div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-taxonomy dgwt-wcas-details-space">' ;
200
+ echo '<div class="dgwt-wcas-products-in-cat">' ;
201
+ echo ( !empty($title) ? $title : '' ) ;
202
+ while ( $products->have_posts() ) {
203
  $products->the_post();
204
+ $product = new Product( get_the_ID() );
205
+ include DGWT_WCAS_DIR . 'partials/details-panel/term-product.php';
 
 
206
  }
207
+ echo '</div>' ;
208
+
209
+ if ( $showMore ) {
210
+ $showMoreUrl = get_term_link( $termID, $taxonomy );
211
+ echo '<a class="dgwt-wcas-details-more-products" href="' . esc_url( $showMoreUrl ) . '">' . Helpers::getLabel( 'show_more_details' ) . ' (' . $totalProducts . ')</a>' ;
 
212
  }
213
+
214
+ echo '</div>' ;
215
  }
216
+
217
  wp_reset_postdata();
 
 
218
  $html = ob_get_clean();
219
+ return apply_filters(
220
+ 'dgwt/wcas/suggestion_details/term/html',
221
+ $html,
222
+ $termID,
223
+ $taxonomy
224
+ );
225
  }
226
+
227
  /**
228
  * Get query vars for products that should be displayed in the daxonomy details box
229
  *
232
  *
233
  * @return array
234
  */
235
+ private function getProductsQueryArgs( $termID, $taxonomy )
 
236
  {
 
237
  $productVisibilityTermIds = wc_get_product_visibility_term_ids();
 
238
  $queryArgs = array(
239
+ 'posts_per_page' => apply_filters( 'dgwt/wcas/suggestion_details/taxonomy/limit', 4 ),
240
  'post_status' => 'publish',
241
  'post_type' => 'product',
242
  'no_found_rows' => false,
243
  'order' => 'desc',
244
  'orderby' => 'meta_value_num',
245
  'meta_key' => 'total_sales',
246
+ 'tax_query' => array(),
247
  );
 
248
  // Visibility
249
  $queryArgs['tax_query'][] = array(
250
  'taxonomy' => 'product_visibility',
252
  'terms' => $productVisibilityTermIds['exclude-from-search'],
253
  'operator' => 'NOT IN',
254
  );
 
255
  // Out of stock
256
+ if ( 'yes' === get_option( 'woocommerce_manage_stock' ) && DGWT_WCAS()->settings->getOption( 'exclude_out_of_stock' ) === 'on' ) {
257
  $queryArgs['tax_query'][] = array(
258
  'taxonomy' => 'product_visibility',
259
  'field' => 'term_taxonomy_id',
260
  'terms' => $productVisibilityTermIds['outofstock'],
261
  'operator' => 'NOT IN',
262
  );
263
+ }
 
264
  // Search with specific category
265
  $queryArgs['tax_query'][] = array(
266
  'taxonomy' => $taxonomy,
268
  'terms' => $termID,
269
  'include_children' => true,
270
  );
271
+ return apply_filters(
272
+ 'dgwt/wcas/suggestion_details/taxonomy/products_query_args',
273
+ $queryArgs,
274
+ $termID,
275
+ $taxonomy
276
+ );
277
  }
278
 
279
  }
includes/Engines/WordPressNative/Search.php CHANGED
@@ -24,11 +24,6 @@ class Search
24
  * bool
25
  */
26
  private $showHeadings = false ;
27
- /**
28
- * Description limit
29
- * int
30
- */
31
- private $descLimit = 130 ;
32
  /**
33
  * Autocomplete groups
34
  * array
@@ -145,7 +140,6 @@ class Search
145
  'post_type' => 'product',
146
  'post_status' => 'publish',
147
  'ignore_sticky_posts' => 1,
148
- 'orderby' => 'relevance',
149
  'order' => 'DESC',
150
  'suppress_filters' => false,
151
  );
@@ -216,10 +210,11 @@ class Search
216
  // Get description
217
 
218
  if ( DGWT_WCAS()->settings->getOption( 'show_product_desc' ) === 'on' ) {
 
219
  if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
220
- $this->descLimit = 60;
221
  }
222
- $r['desc'] = Helpers::getProductDesc( $product->getID(), $this->descLimit );
223
  }
224
 
225
  // Get SKU
24
  * bool
25
  */
26
  private $showHeadings = false ;
 
 
 
 
 
27
  /**
28
  * Autocomplete groups
29
  * array
140
  'post_type' => 'product',
141
  'post_status' => 'publish',
142
  'ignore_sticky_posts' => 1,
 
143
  'order' => 'DESC',
144
  'suppress_filters' => false,
145
  );
210
  // Get description
211
 
212
  if ( DGWT_WCAS()->settings->getOption( 'show_product_desc' ) === 'on' ) {
213
+ $wordsLimit = 0;
214
  if ( DGWT_WCAS()->settings->getOption( 'show_details_box' ) === 'on' ) {
215
+ $wordsLimit = 15;
216
  }
217
+ $r['desc'] = $product->getDescription( 'suggestions', $wordsLimit );
218
  }
219
 
220
  // Get SKU
includes/Helpers.php CHANGED
@@ -15,29 +15,42 @@ class Helpers
15
  */
16
  public static $log = false ;
17
  /**
18
- * Cut string
19
  *
20
  * @param string $string
21
- * @param int $length
 
 
22
  *
23
  * @return string
24
  */
25
- public static function strCut( $string, $length = 40 )
 
 
 
 
 
26
  {
27
- $string = strip_tags( $string );
 
 
 
 
 
 
 
 
28
 
29
- if ( strlen( $string ) > $length ) {
30
- $title = mb_substr(
31
- $string,
32
- 0,
33
- $length,
34
- 'utf-8'
35
- ) . '...';
36
  } else {
37
- $title = $string;
38
  }
39
 
40
- return $title;
41
  }
42
 
43
  /**
@@ -119,51 +132,6 @@ class Helpers
119
  return apply_filters( 'dgwt/wcas/form/search_input/name', 's' );
120
  }
121
 
122
- /**
123
- * Get product desc
124
- *
125
- * @param int $product product object or The post ID
126
- * @param int $length description length
127
- *
128
- * @return string
129
- */
130
- public static function getProductDesc( $product, $length = 130 )
131
- {
132
- if ( is_numeric( $product ) ) {
133
- $product = wc_get_product( $product );
134
- }
135
- $output = '';
136
-
137
- if ( !empty($product) ) {
138
-
139
- if ( self::compareWcVersion( '3.0', '>=' ) ) {
140
- $short_desc = $product->get_short_description();
141
- } else {
142
- $short_desc = $product->post->post_excerpt;
143
- }
144
-
145
-
146
- if ( !empty($short_desc) ) {
147
- $output = self::strCut( wp_strip_all_tags( $short_desc ), $length );
148
- } else {
149
-
150
- if ( self::compareWcVersion( '3.0', '>=' ) ) {
151
- $desc = $product->get_description();
152
- } else {
153
- $short_desc = $product->post->post_content;
154
- }
155
-
156
- if ( !empty($desc) ) {
157
- $output = self::strCut( wp_strip_all_tags( $desc ), $length );
158
- }
159
- }
160
-
161
- }
162
-
163
- $output = html_entity_decode( $output );
164
- return $output;
165
- }
166
-
167
  /**
168
  * Return HTML for the setting section "How to use?"
169
  *
@@ -863,5 +831,104 @@ class Helpers
863
  $date->setTimezone( new \DateTimeZone( wc_timezone_string() ) );
864
  return $date->date_i18n( $format );
865
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
866
 
867
  }
15
  */
16
  public static $log = false ;
17
  /**
18
+ * Prepare short description based on raw string including HTML
19
  *
20
  * @param string $string
21
+ * @param int $numWords
22
+ * @param string $allowableTags
23
+ * @param bool $removeBreaks
24
  *
25
  * @return string
26
  */
27
+ public static function makeShortDescription(
28
+ $string,
29
+ $numWords = 20,
30
+ $allowableTags = '',
31
+ $removeBreaks = true
32
+ )
33
  {
34
+ if ( empty($string) ) {
35
+ return '';
36
+ }
37
+ //Remove headings
38
+ $string = str_replace( array( '<h1><h2><h3><h4><h5><h6>' ), '<h3>', $string );
39
+ $string = str_replace( array( '</h1></h2></h3></h4></h5></h6>' ), '</h3>', $string );
40
+ $string = preg_replace( '/(<h3*?>).*?(<\\/h3>)/', '$1$2', $string );
41
+ $string = self::stripAllTags( $string, $allowableTags, $removeBreaks );
42
+ $hasHtml = strpos( $string, '<' ) !== false;
43
 
44
+ if ( $hasHtml ) {
45
+ // Remove attributes
46
+ $string = preg_replace( "/<([a-z][a-z0-9]*)[^>]*?(\\/?)>/i", '<$1$2>', $string );
47
+ $string = ( strpos( $allowableTags, '<p>' ) !== false ? wpautop( $string ) : $string );
48
+ $string = force_balance_tags( html_entity_decode( wp_trim_words( htmlentities( $string ), $numWords ) ) );
 
 
49
  } else {
50
+ $string = html_entity_decode( wp_trim_words( htmlentities( $string ), $numWords ) );
51
  }
52
 
53
+ return $string;
54
  }
55
 
56
  /**
132
  return apply_filters( 'dgwt/wcas/form/search_input/name', 's' );
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  /**
136
  * Return HTML for the setting section "How to use?"
137
  *
831
  $date->setTimezone( new \DateTimeZone( wc_timezone_string() ) );
832
  return $date->date_i18n( $format );
833
  }
834
+
835
+ /**
836
+ * Get labels
837
+ *
838
+ * @return array
839
+ */
840
+ public static function getLabels()
841
+ {
842
+ $labels = apply_filters( 'dgwt/wcas/labels', array(
843
+ 'category' => __( 'Category', 'woocommerce' ),
844
+ 'tag' => __( 'Tag' ),
845
+ 'brand' => __( 'Brand', 'ajax-search-for-woocommerce' ),
846
+ 'post' => __( 'Post' ),
847
+ 'page' => __( 'Page' ),
848
+ 'product_cat_plu' => __( 'Categories', 'woocommerce' ),
849
+ 'product_tag_plu' => __( 'Tags' ),
850
+ 'product_plu' => __( 'Products', 'woocommerce' ),
851
+ 'brand_plu' => __( 'Brands', 'ajax-search-for-woocommerce' ),
852
+ 'post_plu' => __( 'Posts' ),
853
+ 'page_plu' => __( 'Pages' ),
854
+ 'sku_label' => __( 'SKU', 'woocommerce' ) . ':',
855
+ 'sale_badge' => __( 'Sale', 'woocommerce' ),
856
+ 'featured_badge' => __( 'Featured', 'woocommerce' ),
857
+ 'in' => _x( 'in', 'in categories fe. in Books > Crime stories', 'ajax-search-for-woocommerce' ),
858
+ 'read_more' => __( 'continue reading', 'ajax-search-for-woocommerce' ),
859
+ 'no_results' => DGWT_WCAS()->settings->getOption( 'search_no_results_text', __( 'No results', 'ajax-search-for-woocommerce' ) ),
860
+ 'show_more' => DGWT_WCAS()->settings->getOption( 'search_see_all_results_text', __( 'See all products...', 'ajax-search-for-woocommerce' ) ),
861
+ 'show_more_details' => DGWT_WCAS()->settings->getOption( 'search_see_all_results_text', __( 'See all products...', 'ajax-search-for-woocommerce' ) ),
862
+ 'search_placeholder' => DGWT_WCAS()->settings->getOption( 'search_placeholder', __( 'Search for products...', 'ajax-search-for-woocommerce' ) ),
863
+ 'submit' => DGWT_WCAS()->settings->getOption( 'search_submit_text', '')
864
+ ) );
865
+ return $labels;
866
+ }
867
+
868
+ /**
869
+ * Get labels
870
+ *
871
+ * @param string $key
872
+ *
873
+ * @return string
874
+ */
875
+ public static function getLabel( $key )
876
+ {
877
+ $label = '';
878
+ $labels = self::getLabels();
879
+ if ( array_key_exists( $key, $labels ) ) {
880
+ $label = $labels[$key];
881
+ }
882
+ return $label;
883
+ }
884
+
885
+ /**
886
+ * Remove all HTML tags including <script> and <style> and shortcodes
887
+ *
888
+ * @param string $string
889
+ * @param string $allowed
890
+ * @param bool $removeBreaks
891
+ *
892
+ * @return string
893
+ */
894
+ public static function stripAllTags( $string, $allowableTags = '', $removeBreaks = false )
895
+ {
896
+ $string = strip_shortcodes( $string );
897
+ $string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
898
+ $string = strip_tags( $string, $allowableTags );
899
+ if ( $removeBreaks ) {
900
+ $string = preg_replace( '/[\\r\\n\\t ]+/', ' ', $string );
901
+ }
902
+ return trim( $string );
903
+ }
904
+
905
+ /**
906
+ * Repair HTML. Close unclosed tags.
907
+ *
908
+ * @param $html
909
+ * @return string
910
+ */
911
+ public static function closeTags( $html )
912
+ {
913
+ preg_match_all( '#<(?!meta|img|br|hr|input\\b)\\b([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result );
914
+ $openedTags = $result[1];
915
+ preg_match_all( '#</([a-z]+)>#iU', $html, $result );
916
+ $closedtags = $result[1];
917
+ $lenOpened = count( $openedTags );
918
+ if ( count( $closedtags ) == $lenOpened ) {
919
+ return $html;
920
+ }
921
+ $openedTags = array_reverse( $openedTags );
922
+ for ( $i = 0 ; $i < $lenOpened ; $i++ ) {
923
+
924
+ if ( !in_array( $openedTags[$i], $closedtags ) ) {
925
+ $html .= '</' . $openedTags[$i] . '>';
926
+ } else {
927
+ unset( $closedtags[array_search( $openedTags[$i], $closedtags )] );
928
+ }
929
+
930
+ }
931
+ return $html;
932
+ }
933
 
934
  }
includes/Integrations/Brands.php CHANGED
@@ -3,6 +3,8 @@
3
 
4
  namespace DgoraWcas\Integrations;
5
 
 
 
6
  /**
7
  * Class Brands
8
  * @package DgoraWcas\Integrations
@@ -35,10 +37,16 @@ class Brands
35
  private $brandTaxonomy = '';
36
 
37
  public function __construct()
 
 
 
 
38
  {
39
  $this->setPluginInfo();
40
  $this->setBrandTaxonomy();
41
  $this->addSettings();
 
 
42
  }
43
 
44
  /**
@@ -183,4 +191,30 @@ class Brands
183
  }
184
  }
185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
3
 
4
  namespace DgoraWcas\Integrations;
5
 
6
+ use DgoraWcas\Helpers;
7
+
8
  /**
9
  * Class Brands
10
  * @package DgoraWcas\Integrations
37
  private $brandTaxonomy = '';
38
 
39
  public function __construct()
40
+ {
41
+ }
42
+
43
+ public function init()
44
  {
45
  $this->setPluginInfo();
46
  $this->setBrandTaxonomy();
47
  $this->addSettings();
48
+
49
+ add_filter('dgwt/wcas/suggestion_details/taxonomy/headline', array($this, 'rebuildDetailsHeader'), 10, 4);
50
  }
51
 
52
  /**
191
  }
192
  }
193
 
194
+ /**
195
+ * Rebuild details panel header for brands
196
+ *
197
+ * @param $title
198
+ * @param $termID
199
+ * @param $taxonomy
200
+ * @param $termName
201
+ * @return string
202
+ */
203
+ public function rebuildDetailsHeader($title, $termID, $taxonomy, $termName)
204
+ {
205
+
206
+ if (!empty($taxonomy) && $taxonomy === $this->getBrandTaxonomy()) {
207
+
208
+ $title = '<span class="dgwt-wcas-datails-title">';
209
+ $title .= '<span class="dgwt-wcas-details-title-tax">';
210
+ $title .= Helpers::getLabel('brand') . ': ';
211
+ $title .= '</span>';
212
+ $title .= $termName;
213
+ $title .= '</span>';
214
+ }
215
+
216
+ return $title;
217
+
218
+ }
219
+
220
  }
includes/Post.php DELETED
@@ -1,131 +0,0 @@
1
- <?php
2
-
3
- namespace DgoraWcas;
4
-
5
- use DgoraWcas\Engines\TNTSearchMySQL\Indexer\Utils;
6
-
7
- class Post
8
- {
9
- private $postID = 0;
10
- private $post;
11
- private $postType = 'post';
12
- private $langCode = 'en';
13
-
14
- public function __construct($post)
15
- {
16
- if ( ! empty($post) && is_object($post) && is_a($post, 'WP_Post')) {
17
- $this->postID = absint($post->ID);
18
- $this->postType = $post->post_type;
19
- }
20
-
21
- if (is_numeric($post)) {
22
- $this->postID = absint($post);
23
- $this->postType = get_post_type($post);
24
- }
25
-
26
- $this->post = get_post($this->postID);
27
-
28
- $this->setLanguage();
29
- }
30
-
31
- /**
32
- * Set info about product language
33
- *
34
- * @return void
35
- */
36
- public function setLanguage()
37
- {
38
- $this->langCode = Multilingual::getPostLang($this->getID(), $this->postType);
39
- }
40
-
41
- /**
42
- * Get product ID (post_id)
43
- * @return INT
44
- */
45
- public function getID()
46
- {
47
- return $this->postID;
48
- }
49
-
50
-
51
- /**
52
- * Get post title
53
- *
54
- * @return string
55
- */
56
- public function getTitle()
57
- {
58
- return apply_filters('dgwt/wcas/post/title', $this->post->post_title, $this->postType);
59
- }
60
-
61
- /**
62
- * Get prepared product description
63
- *
64
- * @param string $type full|short|suggestions
65
- *
66
- * @return string
67
- */
68
- public function getDescription()
69
- {
70
-
71
- $output = '';
72
-
73
- $desc = $this->post->post_excerpt;
74
-
75
- if (empty($desc)) {
76
- $desc = $this->post->post_content;
77
- }
78
-
79
- if ( ! empty($desc)) {
80
- $output = Utils::clearContent($desc);
81
- $output = Helpers::strCut($output, 120);
82
- $output = html_entity_decode($output);
83
- }
84
-
85
-
86
- return apply_filters('dgwt/wcas/post/description', $output, $this->postType);
87
- }
88
-
89
- /**
90
- * Get product permalink
91
- *
92
- * @return string
93
- */
94
- public function getPermalink()
95
- {
96
- $permalink = get_permalink($this->getID());
97
-
98
- if (Multilingual::isMultilingual()) {
99
- $permalink = Multilingual::getPermalink($this->getID(), $permalink, $this->langCode);
100
- }
101
-
102
- return apply_filters('dgwt/wcas/post/permalink', $permalink, $this->postType);
103
- }
104
-
105
- /**
106
- * Get product language
107
- *
108
- * @return string
109
- */
110
- public function getLanguage()
111
- {
112
- return $this->langCode;
113
- }
114
-
115
- /**
116
- * Check, if class is initialized correctly
117
- *
118
- * @return bool
119
- */
120
- public function isValid()
121
- {
122
- $isValid = false;
123
-
124
- if (is_a($this->post, 'WP_Post')) {
125
- $isValid = true;
126
- }
127
-
128
- return $isValid;
129
- }
130
-
131
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Product.php CHANGED
@@ -78,11 +78,12 @@ class Product
78
  /**
79
  * Get prepared product description
80
  *
81
- * @param string $type full|short|suggestions
 
82
  *
83
  * @return string
84
  */
85
- public function getDescription($type = 'full')
86
  {
87
 
88
  $output = '';
@@ -95,7 +96,7 @@ class Product
95
  $output = $this->wcProduct->get_short_description();
96
  }
97
 
98
- if ($type === 'suggestons') {
99
 
100
  $desc = $this->wcProduct->get_short_description();
101
 
@@ -104,13 +105,18 @@ class Product
104
  }
105
 
106
  if ( ! empty($desc)) {
107
- $output = Utils::clearContent($desc);
108
- $output = html_entity_decode($output);
109
- $output = Helpers::strCut($output, 120);
 
 
 
 
 
110
  }
111
  }
112
 
113
- return apply_filters('dgwt/wcas/product/description', $output);
114
  }
115
 
116
  /**
@@ -126,22 +132,25 @@ class Product
126
  $permalink = Multilingual::getPermalink($this->getID(), $permalink, $this->langCode);
127
  }
128
 
129
- return apply_filters('dgwt/wcas/product/permalink', $permalink);
130
  }
131
 
132
  /**
133
  * Get product thumbnail url
134
  *
 
 
135
  * @return string
136
  */
137
- public function getThumbnailSrc()
138
  {
139
  $src = '';
 
140
 
141
  $imageID = $this->wcProduct->get_image_id();
142
 
143
  if ( ! empty($imageID)) {
144
- $imageSrc = wp_get_attachment_image_src($imageID, 'dgwt-wcas-product-suggestion');
145
 
146
  if (is_array($imageSrc) && ! empty($imageSrc[0])) {
147
  $src = $imageSrc[0];
@@ -152,17 +161,19 @@ class Product
152
  $src = wc_placeholder_img_src();
153
  }
154
 
155
- return apply_filters('dgwt/wcas/product/thumbnail_src', $src, $this->productID, $this->wcProduct);
156
  }
157
 
158
  /**
159
  * Get product thumbnail
160
  *
 
 
161
  * @return string
162
  */
163
- public function getThumbnail()
164
  {
165
- return '<img src="' . $this->getThumbnailSrc() . '" alt="' . $this->getName() . '" />';
166
  }
167
 
168
 
@@ -173,7 +184,7 @@ class Product
173
  */
174
  public function getPriceHTML()
175
  {
176
- return (string) apply_filters('dgwt/wcas/product/html_price', $this->wcProduct->get_price_html(), $this->productID, $this->wcProduct);
177
  }
178
 
179
  /**
@@ -233,7 +244,7 @@ class Product
233
  */
234
  public function getSKU()
235
  {
236
- return (string) apply_filters('dgwt/wcas/product/sku', $this->wcProduct->get_sku());
237
  }
238
 
239
  /**
@@ -268,7 +279,7 @@ class Product
268
  }
269
  }
270
 
271
- return apply_filters('dgwt/wcas/product/variations_skus', $skus);
272
  }
273
 
274
  /**
@@ -304,7 +315,7 @@ class Product
304
  public function getAttributes($onlyNames = false)
305
  {
306
  $terms = array();
307
- $attributes = apply_filters('dgwt/wcas/product/attributes', $this->wcProduct->get_attributes());
308
 
309
  foreach ($attributes as $attribute) {
310
 
@@ -326,7 +337,12 @@ class Product
326
  // Custom attributes
327
  $attrOptions = $attribute->get_options();
328
  if ( ! empty($attrOptions) && is_array($attrOptions)) {
329
- $terms = array_merge($terms, $attrOptions);
 
 
 
 
 
330
  }
331
  }
332
 
@@ -336,7 +352,7 @@ class Product
336
 
337
  }
338
 
339
- return apply_filters('dgwt/wcas/product/attribute_terms', $terms);
340
  }
341
 
342
  /**
@@ -443,6 +459,8 @@ class Product
443
  /**
444
  * Get custom attributes
445
  *
 
 
446
  * @param int productID
447
  *
448
  * @return array
@@ -467,7 +485,7 @@ class Product
467
 
468
  if (is_array($rawAttributes) && ! empty($rawAttributes)) {
469
 
470
- $rawAttributes = apply_filters('dgwt/wcas/product/custom_attributes', $rawAttributes);
471
 
472
  foreach ($rawAttributes as $rawAttribute) {
473
  if ($rawAttribute['is_taxonomy'] == 0 && ! empty($rawAttribute['value'])) {
78
  /**
79
  * Get prepared product description
80
  *
81
+ * @param string $type full|short|suggestions|details-panel
82
+ * @param int $forceWordsLimit
83
  *
84
  * @return string
85
  */
86
+ public function getDescription($type = 'full', $forceWordsLimit = 0)
87
  {
88
 
89
  $output = '';
96
  $output = $this->wcProduct->get_short_description();
97
  }
98
 
99
+ if ($type === 'suggestions' || $type === 'details-panel') {
100
 
101
  $desc = $this->wcProduct->get_short_description();
102
 
105
  }
106
 
107
  if ( ! empty($desc)) {
108
+
109
+ if($type === 'details-panel') {
110
+ $wordsLimit = !empty($forceWordsLimit) ? $forceWordsLimit : 20;
111
+ $output = Helpers::makeShortDescription($desc, $wordsLimit, '</br><b><strong>', false);
112
+ }elseif ($type === 'suggestions'){
113
+ $wordsLimit = !empty($forceWordsLimit) ? $forceWordsLimit : 30;
114
+ $output = Helpers::makeShortDescription($desc, $wordsLimit, '');
115
+ }
116
  }
117
  }
118
 
119
+ return apply_filters('dgwt/wcas/product/description', $output, $type, $this->productID, $this);
120
  }
121
 
122
  /**
132
  $permalink = Multilingual::getPermalink($this->getID(), $permalink, $this->langCode);
133
  }
134
 
135
+ return apply_filters('dgwt/wcas/product/permalink', $permalink, $this->productID, $this);
136
  }
137
 
138
  /**
139
  * Get product thumbnail url
140
  *
141
+ * @param string $size
142
+ *
143
  * @return string
144
  */
145
+ public function getThumbnailSrc($size = '')
146
  {
147
  $src = '';
148
+ $size = empty($size) ? 'dgwt-wcas-product-suggestion' : $size;
149
 
150
  $imageID = $this->wcProduct->get_image_id();
151
 
152
  if ( ! empty($imageID)) {
153
+ $imageSrc = wp_get_attachment_image_src($imageID, $size);
154
 
155
  if (is_array($imageSrc) && ! empty($imageSrc[0])) {
156
  $src = $imageSrc[0];
161
  $src = wc_placeholder_img_src();
162
  }
163
 
164
+ return apply_filters('dgwt/wcas/product/thumbnail_src', $src, $this->productID, $this);
165
  }
166
 
167
  /**
168
  * Get product thumbnail
169
  *
170
+ * @param string $size
171
+ *
172
  * @return string
173
  */
174
+ public function getThumbnail($size = '')
175
  {
176
+ return '<img src="' . $this->getThumbnailSrc($size) . '" alt="' . $this->getName() . '" />';
177
  }
178
 
179
 
184
  */
185
  public function getPriceHTML()
186
  {
187
+ return (string) apply_filters('dgwt/wcas/product/html_price', $this->wcProduct->get_price_html(), $this->productID, $this);
188
  }
189
 
190
  /**
244
  */
245
  public function getSKU()
246
  {
247
+ return (string) apply_filters('dgwt/wcas/product/sku', $this->wcProduct->get_sku(), $this->productID, $this);
248
  }
249
 
250
  /**
279
  }
280
  }
281
 
282
+ return apply_filters('dgwt/wcas/product/variations_skus', $skus, $this->productID, $this);
283
  }
284
 
285
  /**
315
  public function getAttributes($onlyNames = false)
316
  {
317
  $terms = array();
318
+ $attributes = apply_filters('dgwt/wcas/product/attributes', $this->wcProduct->get_attributes(), $this->productID, $this);
319
 
320
  foreach ($attributes as $attribute) {
321
 
337
  // Custom attributes
338
  $attrOptions = $attribute->get_options();
339
  if ( ! empty($attrOptions) && is_array($attrOptions)) {
340
+ // Use external static method for keeping always the same filters = self::getCustomAttributes($productID);
341
+ $customAttributesValues = self::getCustomAttributes($this->productID);
342
+ if(!empty($customAttributesValues)){
343
+ $terms = array_merge($terms, $customAttributesValues);
344
+ }
345
+
346
  }
347
  }
348
 
352
 
353
  }
354
 
355
+ return apply_filters('dgwt/wcas/product/attribute_terms', $terms, $this->productID, $this);
356
  }
357
 
358
  /**
459
  /**
460
  * Get custom attributes
461
  *
462
+ * for external use
463
+ *
464
  * @param int productID
465
  *
466
  * @return array
485
 
486
  if (is_array($rawAttributes) && ! empty($rawAttributes)) {
487
 
488
+ $rawAttributes = apply_filters('dgwt/wcas/product/custom_attributes', $rawAttributes, $productID);
489
 
490
  foreach ($rawAttributes as $rawAttribute) {
491
  if ($rawAttribute['is_taxonomy'] == 0 && ! empty($rawAttribute['value'])) {
includes/Scripts.php CHANGED
@@ -24,28 +24,9 @@ class Scripts
24
  {
25
 
26
  if ( !is_admin() ) {
27
- // Labels
28
- $t = array(
29
- 'sale_badge' => __( 'Sale', 'woocommerce' ),
30
- 'featured_badge' => __( 'Featured', 'woocommerce' ),
31
- 'category' => __( 'Category', 'woocommerce' ),
32
- 'tag' => __( 'Tag' ),
33
- 'brand' => __( 'Brand', 'ajax-search-for-woocommerce' ),
34
- 'post' => __( 'Post' ),
35
- 'page' => __( 'Page' ),
36
- 'product_cat_plu' => __( 'Categories', 'woocommerce' ),
37
- 'product_tag_plu' => __( 'Tags' ),
38
- 'product_plu' => __( 'Products', 'woocommerce' ),
39
- 'brand_plu' => __( 'Brands', 'ajax-search-for-woocommerce' ),
40
- 'post_plu' => __( 'Posts' ),
41
- 'page_plu' => __( 'Pages' ),
42
- 'sku_label' => __( 'SKU', 'woocommerce' ) . ':',
43
- );
44
- $label_seeall = __( 'See all products...', 'ajax-search-for-woocommerce' );
45
- $label_nores = __( 'No results', 'ajax-search-for-woocommerce' );
46
  // Main JS
47
  $localize = array(
48
- 't' => $t,
49
  'ajax_search_endpoint' => \WC_AJAX::get_endpoint( DGWT_WCAS_SEARCH_ACTION ),
50
  'ajax_details_endpoint' => \WC_AJAX::get_endpoint( DGWT_WCAS_RESULT_DETAILS_ACTION ),
51
  'action_search' => DGWT_WCAS_SEARCH_ACTION,
@@ -63,9 +44,6 @@ class Scripts
63
  'show_headings' => false,
64
  'preloader_url' => '',
65
  'taxonomy_brands' => '',
66
- 'copy_no_result' => DGWT_WCAS()->settings->getOption( 'search_no_results_text', $label_nores ),
67
- 'copy_show_more' => DGWT_WCAS()->settings->getOption( 'search_see_all_results_text', $label_seeall ),
68
- 'copy_in_category' => _x( 'in', 'in categories fe. in Books > Crime stories', 'ajax-search-for-woocommerce' ),
69
  'img_url' => DGWT_WCAS_URL . 'assets/img/',
70
  'is_premium' => ( dgoraAsfwFs()->is_premium() ? true : false ),
71
  'overlay_mobile' => ( DGWT_WCAS()->settings->getOption( 'enable_mobile_overlay' ) === 'on' ? true : false ),
24
  {
25
 
26
  if ( !is_admin() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  // Main JS
28
  $localize = array(
29
+ 'labels' => Helpers::getLabels(),
30
  'ajax_search_endpoint' => \WC_AJAX::get_endpoint( DGWT_WCAS_SEARCH_ACTION ),
31
  'ajax_details_endpoint' => \WC_AJAX::get_endpoint( DGWT_WCAS_RESULT_DETAILS_ACTION ),
32
  'action_search' => DGWT_WCAS_SEARCH_ACTION,
44
  'show_headings' => false,
45
  'preloader_url' => '',
46
  'taxonomy_brands' => '',
 
 
 
47
  'img_url' => DGWT_WCAS_URL . 'assets/img/',
48
  'is_premium' => ( dgoraAsfwFs()->is_premium() ? true : false ),
49
  'overlay_mobile' => ( DGWT_WCAS()->settings->getOption( 'enable_mobile_overlay' ) === 'on' ? true : false ),
includes/Settings.php CHANGED
@@ -387,14 +387,14 @@ class Settings
387
  'name' => 'show_matching_posts',
388
  'label' => __('Show posts', 'ajax-search-for-woocommerce'),
389
  'type' => 'checkbox',
390
- 'class' => 'js-dgwt-wcas-adv-settings',
391
  'default' => 'off',
392
  ),
393
  1800 => array(
394
  'name' => 'show_matching_pages',
395
  'label' => __('Show pages', 'ajax-search-for-woocommerce'),
396
  'type' => 'checkbox',
397
- 'class' => 'js-dgwt-wcas-adv-settings',
398
  'default' => 'off',
399
  ),
400
  2000 => array(
@@ -530,7 +530,14 @@ class Settings
530
  250 => array(
531
  'name' => 'search_in_product_categories',
532
  'label' => __('Search in categories', 'ajax-search-for-woocommerce'),
533
- 'class' => 'dgwt-wcas-premium-only',
 
 
 
 
 
 
 
534
  'type' => 'checkbox',
535
  'default' => 'off',
536
  ),
@@ -553,6 +560,19 @@ class Settings
553
  'type' => 'head',
554
  'class' => 'dgwt-wcas-sgs-header'
555
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  )),
557
  'dgwt_wcas_performance' => apply_filters('dgwt/wcas/settings/section=performance', array(
558
  0 => array(
@@ -567,6 +587,7 @@ class Settings
567
  'type' => 'head',
568
  'class' => 'dgwt-wcas-sgs-header'
569
  ),
 
570
  100 => array(
571
  'name' => 'indexer_schedule_head',
572
  'label' => __('Scheduling Indexing', 'ajax-search-for-woocommerce'),
387
  'name' => 'show_matching_posts',
388
  'label' => __('Show posts', 'ajax-search-for-woocommerce'),
389
  'type' => 'checkbox',
390
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
391
  'default' => 'off',
392
  ),
393
  1800 => array(
394
  'name' => 'show_matching_pages',
395
  'label' => __('Show pages', 'ajax-search-for-woocommerce'),
396
  'type' => 'checkbox',
397
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
398
  'default' => 'off',
399
  ),
400
  2000 => array(
530
  250 => array(
531
  'name' => 'search_in_product_categories',
532
  'label' => __('Search in categories', 'ajax-search-for-woocommerce'),
533
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
534
+ 'type' => 'checkbox',
535
+ 'default' => 'off',
536
+ ),
537
+ 275 => array(
538
+ 'name' => 'search_in_product_tags',
539
+ 'label' => __('Search in tags', 'ajax-search-for-woocommerce'),
540
+ 'class' => 'js-dgwt-wcas-adv-settings dgwt-wcas-premium-only',
541
  'type' => 'checkbox',
542
  'default' => 'off',
543
  ),
560
  'type' => 'head',
561
  'class' => 'dgwt-wcas-sgs-header'
562
  ),
563
+ 500 => array(
564
+ 'name' => 'search_synonyms_head',
565
+ 'label' => __('Synonyms', 'ajax-search-for-woocommerce'),
566
+ 'type' => 'head',
567
+ 'class' => 'dgwt-wcas-sgs-header js-dgwt-wcas-adv-settings'
568
+ ),
569
+ 520 => array(
570
+ 'name' => 'search_synonyms',
571
+ 'label' => __('Synonyms', 'ajax-search-for-woocommerce') . ' ' . Helpers::createQuestionMark('synonyms', __("Synonyms feature allows your users to find more relevant results. If your products have alternative names and users often misspelling them, consider adding synonyms.", 'ajax-search-for-woocommerce')),
572
+ 'type' => 'textarea',
573
+ 'desc' => __('Synonyms should be separated by a comma. Each new synonyms group in the 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'),
574
+ 'class' => 'dgwt-wcas-settings-synonyms js-dgwt-wcas-adv-settings dgwt-wcas-premium-only'
575
+ ),
576
  )),
577
  'dgwt_wcas_performance' => apply_filters('dgwt/wcas/settings/section=performance', array(
578
  0 => array(
587
  'type' => 'head',
588
  'class' => 'dgwt-wcas-sgs-header'
589
  ),
590
+
591
  100 => array(
592
  'name' => 'indexer_schedule_head',
593
  'label' => __('Scheduling Indexing', 'ajax-search-for-woocommerce'),
partials/admin/embedding-in-theme.php CHANGED
@@ -3,7 +3,7 @@
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
  // Exit if accessed directly
6
- if ( ! defined('ABSPATH')) {
7
  exit;
8
  }
9
 
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
  // Exit if accessed directly
6
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
8
  }
9
 
partials/admin/features.php CHANGED
@@ -2,25 +2,32 @@
2
 
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
- $utmLink = 'https://ajaxsearch.pro/?utm_source=wp-admin&utm_medium=referral&utm_campaign=settings&utm_content=features&utm_gen=utmdc#features-comparsion';
 
 
 
 
 
6
  ?>
7
 
8
  <div class="dgwt-wcas-upgrade-s">
9
- <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 <span>faster and simpler</span>.', 'ajax-search-for-woocommerce'); ?></h2>
10
  <p class="dgwt-wcas-upgrade-s__subtitle">
11
- <?php _e('Update now and increase your sales. You will receive 14-day satisfaction guarantee. A return on investment will come very quickly.', 'ajax-search-for-woocommerce'); ?>
12
  </p>
13
  <ul>
14
- <li><strong>+ <?php _e('Speed up search! (even <b>10x faster</b>) - users love it!', 'ajax-search-for-woocommerce'); ?></strong></li>
15
- <li><strong>+ <?php _e('Help in embedding the search form in your theme. <b>Our developers will do it for you</b>.', 'ajax-search-for-woocommerce'); ?></strong></li>
16
- <li><strong>+ <?php _e('Efficient with a large number of products. Tested on <b>60 000 products</b>', 'ajax-search-for-woocommerce'); ?></strong></li>
17
- <li><strong>+ <?php _e('New modern search engine based on bm25 ranking algorithm', 'ajax-search-for-woocommerce'); ?></strong></li>
18
  <li><strong>+ <?php _e('Fuzzy search', 'ajax-search-for-woocommerce'); ?></strong></li>
19
- <li><strong>+ <?php _e('Search in variation products SKUs (option)', 'ajax-search-for-woocommerce'); ?></strong></li>
20
- <li><strong>+ <?php _e('Search in product attributes (option)', 'ajax-search-for-woocommerce'); ?></strong></li>
21
- <li><strong>+ <?php _e('Search in product custom fields (option)', 'ajax-search-for-woocommerce'); ?></strong></li>
22
- <li><strong>+ <?php _e('Individual customization of the search form (simple CSS improvements)', 'ajax-search-for-woocommerce'); ?></strong></li>
23
- <li><strong>+ <?php _e('Individual tips and support', 'ajax-search-for-woocommerce'); ?></strong></li>
 
 
 
 
24
  <li><strong>+ <?php _e('And more...', 'ajax-search-for-woocommerce'); ?> <a target="_blank" href="<?php echo $utmLink; ?>"><?php _e('See a comparison of all free and premium features!', 'ajax-search-for-woocommerce'); ?></a></strong></li>
25
  </ul>
26
  <a href="<?php echo Upgrade::getUpgradeUrl(); ?>" class="button ajax-build-index-primary"><?php _e('Upgrade Now!', 'ajax-search-for-woocommerce'); ?></a>
2
 
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
+ // Exit if accessed directly
6
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
7
+ exit;
8
+ }
9
+
10
+ $utmLink = 'https://ajaxsearch.pro/?utm_source=wp-admin&utm_medium=referral&utm_campaign=settings&utm_content=features&utm_gen=utmdc#features-comparison';
11
  ?>
12
 
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>10x faster</span>.', 'ajax-search-for-woocommerce'); ?></h2>
15
  <p class="dgwt-wcas-upgrade-s__subtitle">
16
+ <?php _e('Update now and boosts your sales. You will receive <b>14-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 with embedding</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>
24
+ <li><strong>+ <?php _e('Search in categories', 'ajax-search-for-woocommerce'); ?></strong></li>
25
+ <li><strong>+ <?php _e('Search in tags', 'ajax-search-for-woocommerce'); ?></strong></li>
26
+ <li><strong>+ <?php _e('Search by variation product SKU', 'ajax-search-for-woocommerce'); ?></strong></li>
27
+ <li><strong>+ <?php _e('Search in brands (WooCommerce Brands or YITH WooCommerce Brands)', 'ajax-search-for-woocommerce'); ?></strong></li>
28
+ <li><strong>+ <?php _e('Search for posts and pages', 'ajax-search-for-woocommerce'); ?></strong></li>
29
+ <li><strong>+ <?php _e('Synonyms', 'ajax-search-for-woocommerce'); ?></strong></li>
30
+ <li><strong>+ <?php _e('Individual customization of the search bar (simple CSS improvements)', 'ajax-search-for-woocommerce'); ?></strong></li>
31
  <li><strong>+ <?php _e('And more...', 'ajax-search-for-woocommerce'); ?> <a target="_blank" href="<?php echo $utmLink; ?>"><?php _e('See a comparison of all free and premium features!', 'ajax-search-for-woocommerce'); ?></a></strong></li>
32
  </ul>
33
  <a href="<?php echo Upgrade::getUpgradeUrl(); ?>" class="button ajax-build-index-primary"><?php _e('Upgrade Now!', 'ajax-search-for-woocommerce'); ?></a>
partials/admin/how-to-use.php CHANGED
@@ -3,18 +3,21 @@
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
  // Exit if accessed directly
6
- if ( ! defined('ABSPATH')) {
7
  exit;
8
  }
9
 
 
 
 
10
  ?>
11
  <h4><?php _e('There are four easy ways to display the search bar in your theme', 'ajax-search-for-woocommerce'); ?>: </h4>
12
  <ol>
13
- <li><?php printf(__('As a menu item - go to the %s and add menu item "AJAX Search box"', 'ajax-search-for-woocommerce'), '<a href="' . admin_url('nav-menus.php') . '" target="_blank">' . __('Menu Screen', 'ajax-search-for-woocommerce') . '</a>') ?>
14
- <li><?php printf(__('By shortcode - %s', 'ajax-search-for-woocommerce'), '<code>[wcas-search-form]</code>'); ?></li>
15
- <li><?php printf(__('As a widget - go to the %s and choose "AJAX Search box"', 'ajax-search-for-woocommerce'), '<a href="' . admin_url('widgets.php') . '" target="_blank">' . __('Widgets Screen', 'ajax-search-for-woocommerce') . '</a>') ?>
16
  <li><?php printf(__('By PHP - %s', 'ajax-search-for-woocommerce'), '<code>&lt;?php echo do_shortcode(\'[wcas-search-form]\'); ?&gt;</code>'); ?></li>
17
  </ol>
18
  <?php if ( ! dgoraAsfwFs()->is_premium()): ?>
19
- <span class="dgwt-wcas-our-devs"><?php printf(__('Are there any difficulties? <a href="%s">Upgrade now</a> and our developers will help you <b>embed</b>, <b>adjust</b> and <b>configure</b> the search box in your theme.', 'ajax-search-for-woocommerce'), Upgrade::getUpgradeUrl()); ?></span>
20
  <?php endif; ?>
3
  use DgoraWcas\Admin\Promo\Upgrade;
4
 
5
  // Exit if accessed directly
6
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
8
  }
9
 
10
+
11
+ $utmLink = 'https://ajaxsearch.pro/pricing/?utm_source=wp-admin&utm_medium=referral&utm_campaign=upgrade-link&utm_content=how-to-use';
12
+
13
  ?>
14
  <h4><?php _e('There are four easy ways to display the search bar in your theme', 'ajax-search-for-woocommerce'); ?>: </h4>
15
  <ol>
16
+ <li><?php printf(__('As a menu item - go to %s and add menu item "AJAX Search box". Done!', 'ajax-search-for-woocommerce'), '<a href="' . admin_url('nav-menus.php') . '" target="_blank">' . __('Menu Screen', 'ajax-search-for-woocommerce') . '</a>') ?>
17
+ <li><?php printf(__('Using a shortcode - %s', 'ajax-search-for-woocommerce'), '<code>[wcas-search-form]</code>'); ?></li>
18
+ <li><?php printf(__('As a widget - go to %s and choose "AJAX Search bar"', 'ajax-search-for-woocommerce'), '<a href="' . admin_url('widgets.php') . '" target="_blank">' . __('Widgets Screen', 'ajax-search-for-woocommerce') . '</a>') ?>
19
  <li><?php printf(__('By PHP - %s', 'ajax-search-for-woocommerce'), '<code>&lt;?php echo do_shortcode(\'[wcas-search-form]\'); ?&gt;</code>'); ?></li>
20
  </ol>
21
  <?php if ( ! dgoraAsfwFs()->is_premium()): ?>
22
+ <span class="dgwt-wcas-our-devs"><?php printf(__('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>', 'ajax-search-for-woocommerce'), $utmLink); ?></span>
23
  <?php endif; ?>
partials/admin/indexer-header-demo.php CHANGED
@@ -1,3 +1,11 @@
 
 
 
 
 
 
 
 
1
  <div class="js-dgwt-wcas-indexing-wrapper">
2
  <div class="dgwt-wcas-indexing-header">
3
  <span class="dgwt-wcas-indexing-header__title" style="color:#aaaaaa"><?php _e('The search index does not exist yet. Build it now.', 'ajax-search-for-woocommerce'); ?></span>
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
5
+ exit;
6
+ }
7
+
8
+ ?>
9
  <div class="js-dgwt-wcas-indexing-wrapper">
10
  <div class="dgwt-wcas-indexing-header">
11
  <span class="dgwt-wcas-indexing-header__title" style="color:#aaaaaa"><?php _e('The search index does not exist yet. Build it now.', 'ajax-search-for-woocommerce'); ?></span>
partials/admin/search-preview.php CHANGED
@@ -1,10 +1,19 @@
1
  <?php
2
 
3
- $submitText = DGWT_WCAS()->settings->getOption('search_submit_text');
 
 
 
 
 
 
 
 
 
4
  $hasSubmit = DGWT_WCAS()->settings->getOption('show_submit_button');
5
 
6
- $labelNoResults = DGWT_WCAS()->settings->getOption('search_no_results_text', __('No results', 'ajax-search-for-woocommerce'));
7
- $labelSeeAll = DGWT_WCAS()->settings->getOption('search_see_all_results_text', __('See all products...', 'ajax-search-for-woocommerce'));
8
 
9
  ?>
10
  <div class="dgwt-wcas-preview js-dgwt-wcas-preview">
@@ -17,26 +26,26 @@ $labelSeeAll = DGWT_WCAS()->settings->getOption('search_see_all_results_text'
17
 
18
  <div class="js-dgwt-wcas-preview-source dgwt-wcas-preview-source">
19
 
20
- <div class="js-dgwt-wcas-search-wrapp dgwt-wcas-search-wrapp <?php echo \DgoraWcas\Helpers::searchWrappClasses(); ?>" data-wcas-context="75c2">
21
  <form class="dgwt-wcas-search-form" role="search" action="http://dev.damiangora.com/" method="get">
22
  <div class="dgwt-wcas-sf-wrapp">
23
- <?php echo \DgoraWcas\Helpers::getMagnifierIco(); ?>
24
 
25
  <label class="screen-reader-text"><?php _e('Products search', 'ajax-search-for-woocommerce'); ?></label>
26
 
27
  <input
28
  type="search"
29
  class="js-dgwt-wcas-search-input dgwt-wcas-search-input"
30
- name="<?php echo \DgoraWcas\Helpers::getSearchInputName(); ?>"
31
  value="<?php echo get_search_query() ?>"
32
  autocomplete="off"
33
- placeholder="<?php echo DGWT_WCAS()->settings->getOption('search_placeholder', __('Search for products...', 'ajax-search-for-woocommerce')) ?>"
34
  />
35
  <div class="dgwt-wcas-preloader"></div>
36
 
37
  <button type="submit" name="dgwt-wcas-search-submit" class="js-dgwt-wcas-search-submit dgwt-wcas-search-submit"><?php
38
  echo '<span class="js-dgwt-wcas-search-submit-l">' . esc_html($submitText) . '</span>';
39
- echo '<span class="js-dgwt-wcas-search-submit-m">' . \DgoraWcas\Helpers::getMagnifierIco() . '</span>';
40
  ?>
41
  </button>
42
 
@@ -55,83 +64,83 @@ $labelSeeAll = DGWT_WCAS()->settings->getOption('search_see_all_results_text'
55
 
56
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-brand dgwt-wcas-suggestion-headline">
57
  <span class="dgwt-wcas-st">
58
- <?php _e('Brands', 'ajax-search-for-woocommerce'); ?>
59
  </span>
60
  </div>
61
 
62
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-brand">
63
  <span class="dgwt-wcas-st">
64
- <span class="dgwt-wcas-st--direct-headline"><?php _e('Brand', 'ajax-search-for-woocommerce'); ?></span>
65
  <?php _e('Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
66
  </span>
67
  </div>
68
 
69
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-cat dgwt-wcas-suggestion-headline">
70
  <span class="dgwt-wcas-st">
71
- <?php _e('Categories', 'woocommerce'); ?>
72
  </span>
73
  </div>
74
 
75
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-cat">
76
  <span class="dgwt-wcas-st">
77
- <span class="dgwt-wcas-st--direct-headline"><?php _e('Category', 'woocommerce'); ?></span>
78
  <?php _e('Sample category <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
79
  </span>
80
  </div>
81
 
82
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-tag dgwt-wcas-suggestion-headline">
83
  <span class="dgwt-wcas-st">
84
- <?php _e('Tags', 'woocommerce'); ?>
85
  </span>
86
  </div>
87
 
88
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-tag">
89
  <span class="dgwt-wcas-st">
90
- <span class="dgwt-wcas-st--direct-headline"><?php _e('Tag', 'woocommerce'); ?></span>
91
  <?php _e('Sample tag <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
92
  </span>
93
  </div>
94
 
95
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-post dgwt-wcas-suggestion-headline">
96
  <span class="dgwt-wcas-st">
97
- <?php _e('Posts'); ?>
98
  </span>
99
  </div>
100
 
101
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-post">
102
  <span class="dgwt-wcas-st">
103
- <span class="dgwt-wcas-st--direct-headline"><?php _e('Post'); ?></span>
104
  <?php _e('Sample post <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
105
  </span>
106
  </div>
107
 
108
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-page dgwt-wcas-suggestion-headline">
109
  <span class="dgwt-wcas-st">
110
- <?php _e('Pages'); ?>
111
  </span>
112
  </div>
113
 
114
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-page">
115
  <span class="dgwt-wcas-st">
116
- <span class="dgwt-wcas-st--direct-headline"><?php _e('Page'); ?></span>
117
  <?php _e('Sample page <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
118
  </span>
119
  </div>
120
 
121
  <div class="dgwt-wcas-suggestion js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline">
122
  <span class="dgwt-wcas-st">
123
- <?php _e('Products', 'woocommerce'); ?>
124
  </span>
125
  </div>
126
 
127
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-product">
128
  <span class="js-dgwt-wcas-si dgwt-wcas-si">
129
- <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/sample-product.png">
130
  </span>
131
  <div class="js-dgwt-wcas-content-wrapp dgwt-wcas-content-wrapp">
132
  <span class="dgwt-wcas-st">
133
  <span class="dgwt-wcas-st-title"><?php _e('Sample product <strong>name</strong>', 'ajax-search-for-woocommerce'); ?></span>
134
- <span class="dgwt-wcas-sku js-dgwt-wcas-sku">(<?php _e('SKU', 'woocommerce'); ?>: 0001)</span>
135
  <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>
136
  </span>
137
  <span class="dgwt-wcas-sp js-dgwt-wcas-sp">
@@ -152,44 +161,55 @@ $labelSeeAll = DGWT_WCAS()->settings->getOption('search_see_all_results_text'
152
  </div>
153
 
154
  <div class="dgwt-wcas-details-wrapp js-dgwt-wcas-details-wrapp woocommerce">
 
155
  <div class="dgwt-wcas-details-inner">
156
- <div class="dgwt-wcas-product-details">
157
 
158
- <span class="dgwt-wcas-pd-details">
159
 
160
- <div class="dgwt-wcas-pd-image">
161
- <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/sample-product.png">
 
162
  </div>
 
163
 
164
- <div class="dgwt-wcas-pd-rest">
165
 
166
- <span class="product-title"><?php _e('Sample product name', 'ajax-search-for-woocommerce'); ?></span>
 
 
 
167
 
168
- <div class="dgwt-wcas-pd-price">
169
- <?php echo wc_price(99); ?>
170
- </div>
171
  </div>
172
 
173
- </span>
174
 
175
- <div class="dgwt-wcas-pd-desc">
176
- <?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'); ?>
177
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
 
179
- <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
180
- <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
181
- <div class="quantity buttons_added">
182
- <input type="button" value="-" class="minus button is-form"> <label class="screen-reader-text" for="quantity_5dd6fc1fd5f44">White Air Meter Gauge for Flat Mount Meter quantity</label>
183
- <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">
184
- <input type="button" value="+" class="plus button is-form"></div>
185
- <p class="product woocommerce add_to_cart_inline " style="">
186
- <a href="?add-to-cart=17436" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart" rel="nofollow">Add to cart</a>
187
- </p>
188
- </form>
189
  </div>
190
 
191
 
192
  </div>
 
193
  </div>
194
 
195
  </div>
1
  <?php
2
 
3
+ use DgoraWcas\Helpers;
4
+
5
+
6
+ // Exit if accessed directly
7
+ if (!defined('DGWT_WCAS_FILE')) {
8
+ exit;
9
+ }
10
+
11
+
12
+ $submitText = Helpers::getLabel('submit');
13
  $hasSubmit = DGWT_WCAS()->settings->getOption('show_submit_button');
14
 
15
+ $labelNoResults = Helpers::getLabel('no_results');
16
+ $labelSeeAll = Helpers::getLabel('show_more');
17
 
18
  ?>
19
  <div class="dgwt-wcas-preview js-dgwt-wcas-preview">
26
 
27
  <div class="js-dgwt-wcas-preview-source dgwt-wcas-preview-source">
28
 
29
+ <div class="js-dgwt-wcas-search-wrapp dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses(); ?>" data-wcas-context="75c2">
30
  <form class="dgwt-wcas-search-form" role="search" action="http://dev.damiangora.com/" method="get">
31
  <div class="dgwt-wcas-sf-wrapp">
32
+ <?php echo Helpers::getMagnifierIco(); ?>
33
 
34
  <label class="screen-reader-text"><?php _e('Products search', 'ajax-search-for-woocommerce'); ?></label>
35
 
36
  <input
37
  type="search"
38
  class="js-dgwt-wcas-search-input dgwt-wcas-search-input"
39
+ name="<?php echo Helpers::getSearchInputName(); ?>"
40
  value="<?php echo get_search_query() ?>"
41
  autocomplete="off"
42
+ placeholder="<?php echo Helpers::getLabel('search_placeholder'); ?>"
43
  />
44
  <div class="dgwt-wcas-preloader"></div>
45
 
46
  <button type="submit" name="dgwt-wcas-search-submit" class="js-dgwt-wcas-search-submit dgwt-wcas-search-submit"><?php
47
  echo '<span class="js-dgwt-wcas-search-submit-l">' . esc_html($submitText) . '</span>';
48
+ echo '<span class="js-dgwt-wcas-search-submit-m">' . Helpers::getMagnifierIco() . '</span>';
49
  ?>
50
  </button>
51
 
64
 
65
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-brand dgwt-wcas-suggestion-headline">
66
  <span class="dgwt-wcas-st">
67
+ <?php echo Helpers::getLabel('brand_plu'); ?>
68
  </span>
69
  </div>
70
 
71
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-brand">
72
  <span class="dgwt-wcas-st">
73
+ <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel('brand'); ?></span>
74
  <?php _e('Sample brand <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
75
  </span>
76
  </div>
77
 
78
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-cat dgwt-wcas-suggestion-headline">
79
  <span class="dgwt-wcas-st">
80
+ <?php echo Helpers::getLabel('product_cat_plu'); ?>
81
  </span>
82
  </div>
83
 
84
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-cat">
85
  <span class="dgwt-wcas-st">
86
+ <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel('category'); ?></span>
87
  <?php _e('Sample category <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
88
  </span>
89
  </div>
90
 
91
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-tag dgwt-wcas-suggestion-headline">
92
  <span class="dgwt-wcas-st">
93
+ <?php echo Helpers::getLabel('product_tag_plu'); ?>
94
  </span>
95
  </div>
96
 
97
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-tag">
98
  <span class="dgwt-wcas-st">
99
+ <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel('tag'); ?></span>
100
  <?php _e('Sample tag <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
101
  </span>
102
  </div>
103
 
104
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-post dgwt-wcas-suggestion-headline">
105
  <span class="dgwt-wcas-st">
106
+ <?php echo Helpers::getLabel('post_plu'); ?>
107
  </span>
108
  </div>
109
 
110
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-post">
111
  <span class="dgwt-wcas-st">
112
+ <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel('post'); ?></span>
113
  <?php _e('Sample post <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
114
  </span>
115
  </div>
116
 
117
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-headline-page dgwt-wcas-suggestion-headline">
118
  <span class="dgwt-wcas-st">
119
+ <?php echo Helpers::getLabel('page_plu'); ?>
120
  </span>
121
  </div>
122
 
123
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-page">
124
  <span class="dgwt-wcas-st">
125
+ <span class="dgwt-wcas-st--direct-headline"><?php echo Helpers::getLabel('page'); ?></span>
126
  <?php _e('Sample page <strong>name</strong>', 'ajax-search-for-woocommerce'); ?>
127
  </span>
128
  </div>
129
 
130
  <div class="dgwt-wcas-suggestion js-dgwt-wcas-suggestion-headline dgwt-wcas-suggestion-headline">
131
  <span class="dgwt-wcas-st">
132
+ <?php echo Helpers::getLabel('product_plu'); ?>
133
  </span>
134
  </div>
135
 
136
  <div class="dgwt-wcas-suggestion dgwt-wcas-suggestion-product">
137
  <span class="js-dgwt-wcas-si dgwt-wcas-si">
138
+ <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png">
139
  </span>
140
  <div class="js-dgwt-wcas-content-wrapp dgwt-wcas-content-wrapp">
141
  <span class="dgwt-wcas-st">
142
  <span class="dgwt-wcas-st-title"><?php _e('Sample product <strong>name</strong>', 'ajax-search-for-woocommerce'); ?></span>
143
+ <span class="dgwt-wcas-sku js-dgwt-wcas-sku">(<?php echo Helpers::getLabel('sku_label'); ?> 0001)</span>
144
  <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>
145
  </span>
146
  <span class="dgwt-wcas-sp js-dgwt-wcas-sp">
161
  </div>
162
 
163
  <div class="dgwt-wcas-details-wrapp js-dgwt-wcas-details-wrapp woocommerce">
164
+
165
  <div class="dgwt-wcas-details-inner">
 
166
 
167
+ <div class="dgwt-wcas-product-details">
168
 
169
+ <a href="#">
170
+ <div class="dgwt-wcas-details-main-image">
171
+ <img src="<?php echo DGWT_WCAS_URL; ?>assets/img/product-preview.png"/>
172
  </div>
173
+ </a>
174
 
175
+ <div class="dgwt-wcas-details-space">
176
 
177
+ <a class="dgwt-wcas-details-product-title" href="#">
178
+ <?php _e('Sample product name', 'ajax-search-for-woocommerce'); ?>
179
+ </a>
180
+ <span class="dgwt-wcas-details-product-sku">0001</span>
181
 
182
+ <div class="dgwt-wcas-pd-price">
183
+ <?php echo wc_price(99); ?>
 
184
  </div>
185
 
186
+ <div class="dgwt-wcas-details-hr"></div>
187
 
188
+ <div class="dgwt-wcas-pd-desc">
189
+ <?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.',
190
+ 'ajax-search-for-woocommerce'); ?>
191
+ </div>
192
+
193
+ <div class="dgwt-wcas-details-hr"></div>
194
+
195
+ <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
196
+ <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
197
+ <div class="quantity buttons_added">
198
+ <input type="button" value="-" class="minus button is-form">
199
+ <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">
200
+ <input type="button" value="+" class="plus button is-form">
201
+ </div>
202
+ <p class="product woocommerce add_to_cart_inline " style="">
203
+ <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>
204
+ </p>
205
+ </form>
206
+ </div>
207
 
 
 
 
 
 
 
 
 
 
 
208
  </div>
209
 
210
 
211
  </div>
212
+
213
  </div>
214
 
215
  </div>
partials/admin/tooltips/products-head.php DELETED
@@ -1 +0,0 @@
1
- @TODO
 
partials/details-panel/product.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined('DGWT_WCAS_FILE')) {
5
+ exit;
6
+ }
7
+
8
+ ?>
9
+ <div class="dgwt-wcas-details-inner dgwt-wcas-details-inner-product">
10
+ <div class="dgwt-wcas-product-details">
11
+
12
+ <a href="<?php echo esc_url($vars->link); ?>" title="<?php echo $vars->name; ?>">
13
+ <div class="dgwt-wcas-details-main-image">
14
+ <img src="<?php echo esc_url($vars->imageSrc); ?>" alt="<?php echo esc_attr($vars->name); ?>">
15
+ </div>
16
+ </a>
17
+
18
+ <div class="dgwt-wcas-details-space">
19
+ <a class="dgwt-wcas-details-product-title" href="<?php echo esc_url($vars->link); ?>" title="<?php echo $vars->name; ?>">
20
+ <?php echo $vars->name; ?>
21
+ </a>
22
+ <?php if ( ! empty($vars->sku)): ?>
23
+ <span class="dgwt-wcas-details-product-sku"><?php echo $vars->sku; ?></span>
24
+ <?php endif; ?>
25
+
26
+ <?php if ($vars->reviewCount > 0): ?>
27
+
28
+ <div class="dgwt-wcas-pd-rating">
29
+ <?php echo $vars->ratingHtml . ' <span class="dgwt-wcas-pd-review">(' . $vars->reviewCount . ')</span>'; ?>
30
+ </div>
31
+
32
+ <?php endif; ?>
33
+
34
+ <div class="dgwt-wcas-pd-price">
35
+ <?php echo $vars->priceHtml; ?>
36
+ </div>
37
+
38
+ <div class="dgwt-wcas-details-hr"></div>
39
+
40
+ <?php if ( ! empty($vars->desc)): ?>
41
+ <div class="dgwt-wcas-details-desc">
42
+ <?php echo wp_kses_post($vars->desc); ?>
43
+ </div>
44
+ <?php endif; ?>
45
+
46
+ <div class="dgwt-wcas-details-hr"></div>
47
+
48
+ <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
49
+ <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
50
+ <?php
51
+
52
+ if ($vars->showQuantity) {
53
+ woocommerce_quantity_input(array(
54
+ 'input_name' => 'js-dgwt-wcas-quantity',
55
+ ), $vars->wooObject, true);
56
+ }
57
+
58
+ echo WC_Shortcodes::product_add_to_cart(array(
59
+ 'id' => $vars->ID,
60
+ 'show_price' => false,
61
+ 'style' => '',
62
+ ));
63
+ ?>
64
+ </form>
65
+ </div>
66
+
67
+ </div>
68
+
69
+ </div>
70
+ </div>
71
+
partials/{single-product-tax.php → details-panel/term-product.php} RENAMED
@@ -1,4 +1,10 @@
1
  <?php
 
 
 
 
 
 
2
  $rewCount = $product->getReviewCount();
3
  ?>
4
 
@@ -10,7 +16,7 @@ $rewCount = $product->getReviewCount();
10
 
11
  <div class="dgwt-wcas-tpd-rest">
12
 
13
- <span class="product-title"><?php echo esc_attr($product->getName()); ?></span>
14
 
15
  <?php if ($rewCount > 0): ?>
16
 
@@ -20,7 +26,7 @@ $rewCount = $product->getReviewCount();
20
 
21
  <?php endif; ?>
22
 
23
- <div class="dgwt-wcas-pd-price">
24
  <?php echo $product->getPriceHTML(); ?>
25
  </div>
26
 
1
  <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
5
+ exit;
6
+ }
7
+
8
  $rewCount = $product->getReviewCount();
9
  ?>
10
 
16
 
17
  <div class="dgwt-wcas-tpd-rest">
18
 
19
+ <span class="dgwt-wcas-tpd-rest-title"><?php echo esc_attr($product->getName()); ?></span>
20
 
21
  <?php if ($rewCount > 0): ?>
22
 
26
 
27
  <?php endif; ?>
28
 
29
+ <div class="dgwt-wcas-tpd-price">
30
  <?php echo $product->getPriceHTML(); ?>
31
  </div>
32
 
partials/search-form.php CHANGED
@@ -1,31 +1,34 @@
1
  <?php
 
 
 
2
  // Exit if accessed directly
3
  if ( !defined( 'DGWT_WCAS_FILE' ) ) {
4
  exit;
5
  }
6
 
7
- $submitText = DGWT_WCAS()->settings->getOption( 'search_submit_text' );
8
  $hasSubmit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
9
  $uniqueID = ++DGWT_WCAS()->searchInstances . substr(uniqid(), 10, 3);
10
  ?>
11
 
12
- <div class="dgwt-wcas-search-wrapp <?php echo \DgoraWcas\Helpers::searchWrappClasses( $args ); ?>" data-wcas-context="<?php echo $uniqueID; ?>">
13
- <form class="dgwt-wcas-search-form" role="search" action="<?php echo \DgoraWcas\Helpers::searchFormAction(); ?>" method="get">
14
  <div class="dgwt-wcas-sf-wrapp">
15
- <?php echo $hasSubmit !== 'on' ? \DgoraWcas\Helpers::getMagnifierIco() : ''; ?>
16
  <label class="screen-reader-text" for="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"><?php _e( 'Products search', 'ajax-search-for-woocommerce' ) ?></label>
17
 
18
  <input id="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"
19
  type="search"
20
  class="dgwt-wcas-search-input"
21
- name="<?php echo \DgoraWcas\Helpers::getSearchInputName(); ?>"
22
  value="<?php echo get_search_query() ?>"
23
- placeholder="<?php echo DGWT_WCAS()->settings->getOption( 'search_placeholder', __( 'Search for products...', 'ajax-search-for-woocommerce' ) ) ?>"
24
  />
25
  <div class="dgwt-wcas-preloader"></div>
26
 
27
  <?php if($hasSubmit === 'on'): ?>
28
- <button type="submit" name="dgwt-wcas-search-submit" class="dgwt-wcas-search-submit"><?php echo empty( $submitText ) ? \DgoraWcas\Helpers::getMagnifierIco() : esc_html( $submitText ); ?></button>
29
  <?php endif; ?>
30
 
31
  <input type="hidden" name="post_type" value="product" />
1
  <?php
2
+
3
+ use DgoraWcas\Helpers;
4
+
5
  // Exit if accessed directly
6
  if ( !defined( 'DGWT_WCAS_FILE' ) ) {
7
  exit;
8
  }
9
 
10
+ $submitText = Helpers::getLabel('submit');
11
  $hasSubmit = DGWT_WCAS()->settings->getOption( 'show_submit_button' );
12
  $uniqueID = ++DGWT_WCAS()->searchInstances . substr(uniqid(), 10, 3);
13
  ?>
14
 
15
+ <div class="dgwt-wcas-search-wrapp <?php echo Helpers::searchWrappClasses( $args ); ?>" data-wcas-context="<?php echo $uniqueID; ?>">
16
+ <form class="dgwt-wcas-search-form" role="search" action="<?php echo Helpers::searchFormAction(); ?>" method="get">
17
  <div class="dgwt-wcas-sf-wrapp">
18
+ <?php echo $hasSubmit !== 'on' ? Helpers::getMagnifierIco() : ''; ?>
19
  <label class="screen-reader-text" for="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"><?php _e( 'Products search', 'ajax-search-for-woocommerce' ) ?></label>
20
 
21
  <input id="dgwt-wcas-search-input-<?php echo $uniqueID; ?>"
22
  type="search"
23
  class="dgwt-wcas-search-input"
24
+ name="<?php echo Helpers::getSearchInputName(); ?>"
25
  value="<?php echo get_search_query() ?>"
26
+ placeholder="<?php echo Helpers::getLabel('search_placeholder'); ?>"
27
  />
28
  <div class="dgwt-wcas-preloader"></div>
29
 
30
  <?php if($hasSubmit === 'on'): ?>
31
+ <button type="submit" name="dgwt-wcas-search-submit" class="dgwt-wcas-search-submit"><?php echo empty( $submitText ) ? Helpers::getMagnifierIco() : esc_html( $submitText ); ?></button>
32
  <?php endif; ?>
33
 
34
  <input type="hidden" name="post_type" value="product" />
partials/single-product.php DELETED
@@ -1,67 +0,0 @@
1
- <?php
2
- $rewCount = $product->getReviewCount();
3
- ?>
4
- <div class="dgwt-wcas-details-inner">
5
- <div class="dgwt-wcas-product-details">
6
-
7
- <a class="dgwt-wcas-pd-details" href="<?php echo $product->getPermalink(); ?>" title="<?php echo esc_attr( $product->getName() ); ?>">
8
-
9
- <div class="dgwt-wcas-pd-image">
10
- <?php echo $product->getThumbnail(); ?>
11
- </div>
12
-
13
- <div class="dgwt-wcas-pd-rest">
14
-
15
- <span class="product-title"><?php echo $product->getName(); ?></span>
16
-
17
- <?php if ( $rewCount > 0 ): ?>
18
-
19
- <div class="dgwt-wcas-pd-rating">
20
- <?php echo $product->getRatingHtml() . ' <span class="dgwt-wcas-pd-review">(' . $rewCount . ')</span>'; ?>
21
- </div>
22
-
23
- <?php endif; ?>
24
-
25
- <div class="dgwt-wcas-pd-price">
26
- <?php echo $product->getPriceHTML(); ?>
27
- </div>
28
- </div>
29
-
30
- </a>
31
-
32
- <?php if ( !empty( $details[ 'desc' ] ) ): ?>
33
- <div class="dgwt-wcas-pd-desc">
34
- <?php echo wp_kses_post( $details[ 'desc' ] ); ?>
35
- </div>
36
- <?php endif; ?>
37
-
38
- <div class="dgwt-wcas-pd-addtc js-dgwt-wcas-pd-addtc">
39
- <form class="dgwt-wcas-pd-addtc-form" action="" method="post" enctype="multipart/form-data">
40
- <?php
41
- $wooRaw = $product->getWooObject();
42
- $uid = uniqid();
43
- if (
44
- $wooRaw && $wooRaw->is_type( 'simple' )
45
- && $wooRaw->is_purchasable()
46
- && $wooRaw->is_in_stock()
47
- && ! $wooRaw->is_sold_individually()
48
- && apply_filters('dgwt/wcas/suggestion_details/show_quantity', true)
49
- ) {
50
- woocommerce_quantity_input( array(
51
- 'input_name' => 'js-dgwt-wcas-quantity',
52
- ), $wooRaw, true );
53
- }
54
-
55
- echo WC_Shortcodes::product_add_to_cart( array(
56
- 'id' => $product->getID(),
57
- 'show_price' => false,
58
- 'style' => '',
59
- ) );
60
- ?>
61
- </form>
62
- </div>
63
-
64
-
65
- </div>
66
- </div>
67
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
partials/themes/storefront.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  // Exit if accessed directly
4
- if (!defined('ABSPATH')) {
5
  exit;
6
  }
7
 
1
  <?php
2
 
3
  // Exit if accessed directly
4
+ if ( !defined( 'DGWT_WCAS_FILE' ) ) {
5
  exit;
6
  }
7
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce search, ajax search, search by sku, product search, woocommerc
5
  Requires at least: 5.0
6
  Tested up to: 5.3
7
  Requires PHP: 5.5
8
- Stable tag: 1.6.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -51,10 +51,12 @@ Ajax search comes also in the Pro version, with a modern, inverted index based s
51
  &#9989; **Search in custom fields**
52
  &#9989; **Search in attributes**
53
  &#9989; **Search in categories**
 
54
  &#9989; **Search in brands** (WooCommerce Brands or YITH WooCommerce Brands)
55
  &#9989; **Search by variation product SKU** – also shows variable products in live search after typing in the exact matching SKU
56
  &#9989; **Search for posts** – shows also matching posts in live search
57
  &#9989; **Search for pages** – shows also matching posts in live search
 
58
  &#9989; Professional and fast **help with embedding** or replacing the search bar in your theme
59
  &#9989; and more...
60
  &#9989; SEE ALL PRO [FEATURES](https://ajaxsearch.pro?utm_source=readme&utm_medium=referral&utm_content=features&utm_campaign=asfw#features-comparison)!
@@ -133,6 +135,13 @@ You can read more and compare Pro and Free features here: [feature comparison](h
133
 
134
  == Changelog ==
135
 
 
 
 
 
 
 
 
136
  = 1.6.1, January 26, 2020 =
137
 
138
  * ADD: Details Panel - grouped load, faster load
5
  Requires at least: 5.0
6
  Tested up to: 5.3
7
  Requires PHP: 5.5
8
+ Stable tag: 1.6.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
51
  &#9989; **Search in custom fields**
52
  &#9989; **Search in attributes**
53
  &#9989; **Search in categories**
54
+ &#9989; **Search in tags**
55
  &#9989; **Search in brands** (WooCommerce Brands or YITH WooCommerce Brands)
56
  &#9989; **Search by variation product SKU** – also shows variable products in live search after typing in the exact matching SKU
57
  &#9989; **Search for posts** – shows also matching posts in live search
58
  &#9989; **Search for pages** – shows also matching posts in live search
59
+ &#9989; **Synonyms**
60
  &#9989; Professional and fast **help with embedding** or replacing the search bar in your theme
61
  &#9989; and more...
62
  &#9989; SEE ALL PRO [FEATURES](https://ajaxsearch.pro?utm_source=readme&utm_medium=referral&utm_content=features&utm_campaign=asfw#features-comparison)!
135
 
136
  == Changelog ==
137
 
138
+ = 1.6.2, February 18, 2020 =
139
+
140
+ * ADD: Details Panel - new layout for product overview and other UX improvements
141
+ * ADD: Automatically regenerates images after first plugin activation
142
+ * FIX: Highlighted no results suggestion
143
+ * FIX: Better security
144
+
145
  = 1.6.1, January 26, 2020 =
146
 
147
  * ADD: Details Panel - grouped load, faster load