Ecwid Ecommerce Shopping Cart - Version 4.7.5

Version Description

  • A few enhancements for the Wordpress brand new "Twenty Seventeen" theme. Ecwid store page in that theme will look better with this update we made the page layout a bit wider to make sure it's convenient for your buyers to navigate the catalog.
  • Another improvement for the new Ecwid single product widget. Now it's possible to use the "center_align=1" parameter in the shortcode to make the widget center aligned on the page. You may want to use that if you place one product widget per page in this case, it will look better when center-aligned. An example shortcode: [ecwid_product id="12345" version=2 center_align=1]. Do not forget to replace 12345 in this example with the actual product ID.
  • Minor fixes for the "Trend" Wordpress theme.
Download this release

Release Info

Developer Ecwid
Plugin Icon 128x128 Ecwid Ecommerce Shopping Cart
Version 4.7.5
Comparing to
See all releases

Code changes from version 4.7.4 to 4.7.5

Files changed (107) hide show
  1. css/admin.3.8.css +11 -11
  2. css/admin.css +570 -570
  3. css/divibuilder.css +5 -5
  4. css/floating-shopping-cart.css +172 -172
  5. css/fonts.css +37 -37
  6. css/frontend.css +62 -62
  7. css/help.css +1004 -1004
  8. css/landing.css +1331 -1331
  9. css/landing_old.css +495 -495
  10. css/nav-menu.css +56 -56
  11. css/page-editor.css +57 -57
  12. css/products-list.css +196 -196
  13. css/recently-viewed.css +114 -114
  14. css/settings.3.8.css +234 -234
  15. css/settings.css +768 -768
  16. css/store-popup.css +449 -449
  17. css/themes/2015.css +11 -11
  18. css/themes/2016.css +4 -4
  19. css/themes/2017.css +4 -0
  20. css/themes/accesspress-mag.css +10 -10
  21. css/themes/attitude.css +7 -7
  22. css/themes/customizr.css +58 -58
  23. css/themes/evolve.css +19 -19
  24. css/themes/mantra.css +2 -2
  25. css/themes/responsive-adjustments.css +385 -385
  26. css/themes/responsive.css +21 -21
  27. css/themes/responsiveboat.css +6 -6
  28. css/themes/salient.css +2 -2
  29. css/themes/sliding-door.css +6 -6
  30. css/themes/storefront.css +6 -6
  31. css/themes/twentyfourteen.css +7 -7
  32. css/themes/zerif-lite.css +4 -4
  33. ecwid-shopping-cart.php +2592 -2796
  34. fonts/ecwid-icons.svg +16 -16
  35. images/add-store.svg +39 -39
  36. images/black-app-store.svg +3 -3
  37. images/black-google.svg +1 -1
  38. images/categories.svg +11 -11
  39. images/ecwid_logo_symbol_RGB.svg +37 -37
  40. images/grid.svg +23 -23
  41. images/landing/global.svg +4 -4
  42. images/landing/responsive-grow.svg +5 -5
  43. images/list.svg +15 -15
  44. images/minicart.svg +13 -13
  45. images/product_browser.svg +24 -24
  46. images/search.svg +12 -12
  47. images/star.svg +10 -10
  48. images/store.svg +20 -20
  49. images/table.svg +32 -32
  50. includes/class-ecwid-help-page.php +102 -102
  51. includes/class-ecwid-integration-aiosp.php +60 -60
  52. includes/class-ecwid-integration-autoptimize.php +30 -30
  53. includes/class-ecwid-integration-divibuilder.php +94 -94
  54. includes/class-ecwid-integration-wpseo.php +129 -129
  55. includes/class-ecwid-message-manager.php +359 -359
  56. includes/class-ecwid-nav-menus.php +300 -300
  57. includes/class-ecwid-oauth.php +350 -350
  58. includes/class-ecwid-sitemap-builder.php +88 -88
  59. includes/class-ecwid-store-editor.php +89 -89
  60. includes/faq_entries.php +70 -70
  61. includes/oembed.php +119 -119
  62. includes/shortcodes.php +30 -28
  63. includes/shortcodes/class-ecwid-shortcode-base.php +114 -114
  64. includes/shortcodes/class-ecwid-shortcode-categories.php +29 -29
  65. includes/shortcodes/class-ecwid-shortcode-minicart.php +58 -58
  66. includes/shortcodes/class-ecwid-shortcode-product.php +156 -0
  67. includes/shortcodes/class-ecwid-shortcode-productbrowser.php +164 -164
  68. includes/shortcodes/class-ecwid-shortcode-search.php +21 -21
  69. includes/themes.php +99 -99
  70. includes/themes/class-ecwid-theme-base.php +80 -80
  71. includes/themes/class-ecwid-theme-boundless.php +36 -36
  72. includes/themes/class-ecwid-theme-bretheon.php +35 -35
  73. includes/themes/class-ecwid-theme-central.php +28 -28
  74. includes/themes/class-ecwid-theme-envision.php +33 -33
  75. includes/themes/class-ecwid-theme-genesis.php +18 -18
  76. includes/themes/class-ecwid-theme-mfupdate.php +31 -31
  77. includes/themes/class-ecwid-theme-responsive.php +81 -81
  78. includes/themes/class-ecwid-theme-trend.php +95 -95
  79. includes/themes/class-ecwid-theme-twentyfifteen.php +46 -46
  80. includes/themes/class-ecwid-theme-twentysixteen.php +49 -49
  81. includes/widgets.php +39 -39
  82. includes/widgets/class-ecwid-widget-badge.php +132 -132
  83. includes/widgets/class-ecwid-widget-floating-shopping-cart.php +89 -89
  84. includes/widgets/class-ecwid-widget-minicart-miniview.php +47 -47
  85. includes/widgets/class-ecwid-widget-minicart.php +47 -47
  86. includes/widgets/class-ecwid-widget-recently-viewed.php +163 -163
  87. includes/widgets/class-ecwid-widget-search.php +52 -52
  88. includes/widgets/class-ecwid-widget-store-link.php +35 -35
  89. includes/widgets/class-ecwid-widget-vcategories.php +46 -46
  90. includes/widgets/class-ecwid-widget-vertical-categories-list.php +75 -75
  91. js/admin.js +205 -205
  92. js/appearance.js +6 -6
  93. js/cf7designer.js +4 -4
  94. js/create_scroller.js +11 -11
  95. js/dashboard.js +55 -55
  96. js/floating-shopping-cart.js +25 -25
  97. js/frontend.js +3 -3
  98. js/landing.js +50 -50
  99. js/modernizr.js +1406 -1406
  100. js/nav-menu-frontend.js +86 -86
  101. js/nav-menu.js +100 -100
  102. js/products-list.js +292 -292
  103. js/recently-viewed-common.js +67 -67
  104. js/recently-viewed.js +81 -81
  105. js/store-editor-common.js +26 -26
  106. js/store-editor-mce.js +595 -595
  107. js/store-editor-page.js +0 -344
css/admin.3.8.css CHANGED
@@ -1,12 +1,12 @@
1
- #adminmenu #toplevel_page_ecwid div.wp-menu-image:before {
2
- font-family: 'ecwid-plugin-icons' !important;
3
- content: "\e603";
4
- -webkit-font-smoothing: antialiased;
5
- -moz-osx-font-smoothing: grayscale;
6
- }
7
-
8
- #adminmenu #toplevel_page_ecwid div.wp-menu-image {
9
- margin: 0px;
10
- width: 34px;
11
- height: 30px;
12
  }
1
+ #adminmenu #toplevel_page_ecwid div.wp-menu-image:before {
2
+ font-family: 'ecwid-plugin-icons' !important;
3
+ content: "\e603";
4
+ -webkit-font-smoothing: antialiased;
5
+ -moz-osx-font-smoothing: grayscale;
6
+ }
7
+
8
+ #adminmenu #toplevel_page_ecwid div.wp-menu-image {
9
+ margin: 0px;
10
+ width: 34px;
11
+ height: 30px;
12
  }
css/admin.css CHANGED
@@ -1,571 +1,571 @@
1
- #wpadminbar .ecwid-top-menu-item {
2
- margin-top: 0px;
3
- width: 23px;
4
- height: 28px;
5
- background: url(../images/icon-head-default.png) no-repeat 0% 2px;
6
- }
7
-
8
- #wpadminbar .ecwid-top-menu-item:hover,
9
- #wpadminbar .hover .ecwid-top-menu-item{
10
- background-image: url(../images/icon-head-active.png);
11
- }
12
-
13
- #adminmenu #toplevel_page_ecwid div.wp-menu-image {
14
- background: url(../images/icon-sidebar-default.png) no-repeat 5px 2px;
15
- margin: 2px 3px 2px 2px;
16
- width: 23px;
17
- height: 23px;
18
- }
19
-
20
- #adminmenu #toplevel_page_ecwid:hover div.wp-menu-image,
21
- #adminmenu #toplevel_page_ecwid.wp-has-current-submenu div.wp-menu-image
22
- {
23
- background-image: url(../images/icon-sidebar-active.png);
24
- }
25
-
26
- .ecwid-settings h2 {
27
- background:url(../images/icon-title.png) no-repeat 0% 50%;
28
- padding-left: 43px;
29
- line-height: 32px;
30
- margin-bottom: 30px;
31
- }
32
-
33
- #hide-vote-message {
34
- text-decoration: underline;
35
- cursor: pointer;
36
- }
37
-
38
- #hide-vote-message.hiding {
39
- cursor: wait;
40
- }
41
-
42
- #wp-toolbar > ul > li#wp-admin-bar-ecwid-main {
43
- display: block;
44
- }
45
-
46
- .ecwid-badge {
47
- display: table;
48
- width: 70%;
49
- min-width: 200px;
50
- padding: 3px;
51
- }
52
-
53
- .ecwid-badge > div {
54
- display: table-cell;
55
- vertical-align: middle;
56
- height: 55px;
57
- }
58
-
59
- .ecwid-badge .checkbox {
60
- width: 15px;
61
- }
62
- .ecwid-badge .image {
63
- text-align: center;
64
- }
65
-
66
- div.ecwid-message {
67
- padding: 27px 29px 20px 30px;
68
- display: block;
69
- }
70
-
71
- .ecwid-message a {
72
- color: #0074A2;
73
- }
74
-
75
- .ecwid-message a:hover {
76
- color: #2EA2CC;
77
- }
78
-
79
- .ecwid-message .ecwid-message-title {
80
- font-size: 18px;
81
- margin-bottom: 12px;
82
- font-weight: bold;
83
- }
84
-
85
- .ecwid-message .ecwid-message-content {
86
- line-height: 20px;
87
- }
88
-
89
- .ecwid-message .ecwid-message-buttons {
90
- margin-top: 19px;
91
- position: relative;
92
- display: table;
93
- width: 100%;
94
- }
95
-
96
- .ecwid-message .ecwid-message-buttons > div {
97
- display: inline-block;
98
- vertical-align: middle;
99
- }
100
-
101
- .ecwid-message .ecwid-message-buttons > div:not(:first-child) {
102
- padding-left: 9px;
103
- }
104
-
105
- .ecwid-message .ecwid-message-buttons > div:last-child {
106
- position: absolute;
107
-
108
- padding-left: 0px;
109
-
110
- top: 0px;
111
- right: 0px;
112
- }
113
-
114
- .ecwid-message .ecwid-message-buttons > div a{
115
- text-decoration: none;
116
- }
117
-
118
- .ecwid-message .ecwid-message-hide:not(:hover) {
119
- color: #bbb;
120
- }
121
-
122
- .ecwid-message .ecwid-message-hide {
123
- font-size: 12px;
124
- font-weight: 100;
125
- cursor: pointer;
126
- text-decoration: none;
127
- }
128
-
129
- .ecwid-message .ecwid-message-hide:before {
130
- content: "\e606";
131
- font-family: ecwid-plugin-icons;
132
- font-size: 16px;
133
- position: relative;
134
- left: 1px;
135
- top: 3px;
136
- }
137
-
138
- @media screen and (max-width: 768px) {
139
- .ecwid-message .ecwid-message-buttons > div:last-child {
140
- position: inherit;
141
- }
142
-
143
- div.ecwid-message,
144
- div.ecwid-message.updated{
145
- padding: 27px 29px 20px 30px;
146
- }
147
-
148
- .ecwid-message .ecwid-message-buttons > div:not(:first-child) {
149
- padding-left: 0px;
150
- }
151
-
152
- .ecwid-message .ecwid-message-buttons > div {
153
- display: block;
154
- }
155
-
156
- .ecwid-message .ecwid-message-buttons > div a {
157
- text-align: center;
158
- white-space: normal;
159
- width: 100%;
160
- }
161
-
162
- .ecwid-message .ecwid-message-hide:before {
163
- font-size: 21px;
164
- top: 5px;
165
- }
166
-
167
- .ecwid-message-buttons .hide-wrapper {
168
- margin-top: 10px;
169
- }
170
- }
171
-
172
- body[class*="_page_ecwid"] .ecwid-message {
173
- margin: 20px;
174
- }
175
-
176
- .ecwid-message.dev {
177
- outline: 2px solid red;
178
- width: 434px;
179
- }
180
-
181
- .ecwid-message.dev .ecwid-message-title {
182
- letter-spacing: -0.4px;
183
- }
184
-
185
- .ecwid-message.dev .ecwid-message-content {
186
- letter-spacing: -0.62px;
187
- }
188
-
189
- .ecwid-message.dev .ecwid-message-hide {
190
- letter-spacing: -0.22px;
191
- }
192
-
193
- #available-widgets .widget-top.ecwid-widget-highlighted {
194
- background: #1d7ac4;
195
- font-weight: normal;
196
- }
197
-
198
-
199
- #available-widgets .widget-top.ecwid-widget-highlighted,
200
- #available-widgets .widget-top.ecwid-widget-highlighted h3 {
201
- color: white;
202
- }
203
-
204
- .widgets-php #available-widgets .ecwid-widget .widget-top .widget-title h4,
205
- .widgets-php #available-widgets .ecwid-widget .widget-top .widget-title h3
206
- {
207
- padding-left: 42px;
208
- }
209
-
210
- .wp-customizer #available-widgets .ecwid-widget .widget-top .widget-title {
211
- padding-left: 0px;
212
- }
213
-
214
-
215
- #available-widgets .ecwid-widget .widget-top .widget-title:before {
216
- font-size: 20px;
217
- position: absolute;
218
- top: 12px;
219
- left: 16px;
220
- margin-right: -4px;
221
- line-height: 10px;
222
- font-family: 'ecwid-plugin-icons';
223
- speak: none;
224
- font-style: normal;
225
- font-weight: normal;
226
- font-variant: normal;
227
- text-transform: none;
228
- line-height: 1;
229
-
230
- /* Better Font Rendering =========== */
231
- -webkit-font-smoothing: antialiased;
232
- -moz-osx-font-smoothing: grayscale;
233
-
234
- color: #1d7ac4;
235
- opacity: .5;
236
- }
237
-
238
- .wp-customizer #available-widgets .ecwid-widget .widget-top .widget-title:before {
239
- left: -40px;
240
- top: -1px;
241
- font-size: 18px;
242
- opacity: 1;
243
- color: #32373c;
244
- }
245
-
246
- #available-widgets .ecwid-widget .widget-top:hover .widget-title:before {
247
- opacity: 1;
248
- }
249
-
250
- #available-widgets .ecwid-widget .widget-top.ecwid-widget-highlighted .widget-title:before {
251
- color: white;
252
- opacity: 1;
253
- }
254
-
255
- #available-widgets .ecwid-widget-badge .widget-title:before {
256
- content: "\e603";
257
- }
258
-
259
- #available-widgets .widget-top.ecwid-widget-minicart .widget-title:before,
260
- #available-widgets .widget-top.ecwid-widget-minicart_miniview .widget-title:before,
261
- #available-widgets .widget-top.ecwid-widget-floatingshoppingcart .widget-title:before
262
- {
263
- content: "\e601";
264
- }
265
-
266
- #available-widgets .widget-top.ecwid-widget-vcategories .widget-title:before,
267
- #available-widgets .widget-top.ecwid-widget-categories .widget-title:before,
268
- #available-widgets .widget-top.ecwid-widget-vcategorieslist .widget-title:before
269
- {
270
- content: "\e602";
271
- }
272
-
273
- #available-widgets .widget-top.ecwid-widget-search .widget-title:before {
274
- content: "\e604";
275
- }
276
-
277
- #available-widgets .widget-top.ecwid-widget-storelink .widget-title:before {
278
- content: "\e605";
279
- }
280
-
281
- #available-widgets .widget-top.ecwid-widget-recentlyviewed .widget-title:before {
282
- content: "\e600";
283
- }
284
-
285
- .ecwid-debug .section {
286
- display: table-row;
287
- }
288
-
289
- .ecwid-debug .section > * {
290
- display: table-cell;
291
- padding: 2px 5px;
292
- }
293
-
294
- .ecwid-debug h2.hide+div {
295
- display: none;
296
- }
297
-
298
- .ecwid-debug h2 {
299
- cursor: pointer;
300
- }
301
-
302
- .ecwid-debug h2:hover {
303
- color: #00a0d2;
304
- }
305
- .ecwid-debug h2:before {
306
- content: "[-]";
307
- font-family: monospace;
308
- position: relative;
309
- top: -0.2em;
310
- }
311
-
312
- .ecwid-debug h2.hide:before {
313
- content: "[+]";
314
- }
315
-
316
- .ecwid-reconnect-allow-sso .main-wrap {
317
- display: table;
318
- width:100%;
319
- max-width: 1000px;
320
- }
321
-
322
- .ecwid-reconnect-allow-sso .main-wrap .column {
323
- display: table-cell;
324
- width: 50%;
325
- vertical-align: top;
326
- padding-left: 5%;
327
- text-align: left;
328
- }
329
-
330
- .ecwid-reconnect-allow-sso .main-wrap .column img {
331
- width:100%;
332
- max-width: 413px;
333
- }
334
-
335
-
336
- .ecwid-reconnect-allow-sso .main-wrap .column h4 {
337
- font-size: 32px;
338
- font-family: 'Open Sans';
339
- line-height: normal;
340
- margin-top: 1em;
341
- font-weight: normal;
342
- margin-bottom: 28px;
343
- }
344
-
345
- .ecwid-reconnect-allow-sso.ecwid-connect .box .connect-button a {
346
- text-align: center;
347
- white-space: nowrap;
348
- width:auto;
349
- }
350
-
351
- .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
352
- font-size: 16px;
353
- line-height: 1.50em;
354
- color: #444;
355
- margin-bottom: 40px;
356
- }
357
-
358
- .ecwid-admin-superwrap.has-wp-message {
359
- margin-top: 25px;
360
- }
361
-
362
- #ecwid-frame {
363
- border: 1px solid #e5e5e5;
364
- max-width: 1440px;
365
- }
366
-
367
- /* Remove left padding for integrated admin */
368
- .ecwid-admin-superwrap {
369
- position:relative;
370
- height: 600px;
371
- }
372
-
373
- .toplevel_page_ecwid #wpcontent {
374
- padding-left: 0px;
375
- }
376
-
377
- .ecwid-admin-superwrap #wrap {
378
- right: 0px;
379
- height: 600px;
380
- background: white;
381
-
382
- width:100%;
383
- max-width:1440px;
384
- }
385
-
386
- .ecwid-no-padding #wpcontent {
387
- padding-left: 0px;
388
- }
389
-
390
- .ecwid-no-padding .ecwid-message, .ecwid-no-padding .update-nag {
391
- margin-left: 20px;
392
- }
393
-
394
- /* ---------------------- */
395
-
396
- @media screen and (max-width:1023px) {
397
- .ecwid-reconnect-allow-sso .main-wrap .column h4 {
398
- font-size: 28px;
399
- }
400
-
401
- .ecwid-reconnect-allow-sso .main-wrap .note {
402
- font-size: 14px;
403
- }
404
-
405
- .ecwid-connect.ecwid-reconnect-allow-sso .main-wrap .connect-button a {
406
- font-size: 16px;
407
- }
408
- }
409
-
410
- @media screen and (max-width:767px) {
411
- .ecwid-reconnect-allow-sso .main-wrap .column {
412
- display: block;
413
- width: 100%;
414
- text-align: center;
415
- padding-left: inherit;
416
- }
417
-
418
- .ecwid-reconnect-allow-sso .main-wrap .column p {
419
- display: inline-block;
420
- }
421
-
422
- .ecwid-reconnect-allow-sso .main-wrap .column h4 {
423
- margin-bottom: 14px;
424
- }
425
-
426
- .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
427
- margin-bottom: 20px;
428
- }
429
- }
430
-
431
- .ecwid-admin-footer {
432
- display: table;
433
- width:100%;
434
- }
435
-
436
- .ecwid-connect .ecwid-admin-footer .ecwid-app-badges-block {
437
- display: none;
438
- }
439
-
440
- .ecwid-admin-footer-block {
441
- display: table-cell;
442
- padding-top: 5px;
443
- padding-right: 10px;
444
- font-size: 13px;
445
- }
446
-
447
-
448
- .ecwid-admin-footer-block:first-child {
449
- padding-left: 20px;
450
- }
451
-
452
-
453
- .ecwid-admin-footer-block .ecwid-admin-footer-title {
454
- margin: 1em 0;
455
- font-weight: 600;
456
- }
457
-
458
- .ecwid-admin-footer-block .ecwid-admin-footer-text {
459
- margin: 0.7em 0;
460
- }
461
- .ecwid-admin-footer-block .ecwid-app-badges {
462
- margin-top: -1em;
463
- min-width:230px;
464
- padding-top: 1px;
465
- }
466
-
467
- .ecwid-admin-footer-block .ecwid-app-badges a,
468
- .ecwid-admin-footer-block .ecwid-app-badges svg {
469
- display: inline-block;
470
- }
471
- .ecwid-admin-footer-block .ecwid-app-badges svg {
472
- width: 105px;
473
- margin-right: 7px;
474
- opacity: .8;
475
- }
476
-
477
- .ecwid-admin-footer-block .ecwid-app-badges svg:hover {
478
- opacity: 1;
479
- }
480
-
481
- @media screen and (max-width:767px) {
482
- .ecwid-admin-footer-block {
483
- display: block;
484
- }
485
- }
486
-
487
- .ecwid-admin-timeout .box {
488
- margin: 20px auto;
489
- border: 2px solid #ed917d;
490
- min-width: 290px;
491
- max-width: 600px;
492
- padding: 45px 85px 30px 85px;
493
- box-sizing: border-box;
494
- background: #f5ffef;
495
- font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
496
- }
497
-
498
- .ecwid-admin-timeout .box .logo {
499
- width: auto;
500
- height: 65px;
501
- }
502
- .ecwid-admin-timeout .box .logo svg {
503
- max-height: 65px;
504
- }
505
-
506
- .ecwid-admin-timeout .box .logo svg path {
507
- fill: #ed917d;
508
- }
509
-
510
- .ecwid-admin-timeout .box .title {
511
- text-align: center;
512
- font-size: 18px;
513
- padding: 15px 0 5px;
514
- }
515
-
516
- .ecwid-admin-timeout .box .text {
517
- text-align: center;
518
- font-size: 14px;
519
- line-height: 24px;
520
- padding: 5px 0;
521
- }
522
-
523
- .ecwid-admin-timeout a {
524
- color: #04a2ca;
525
- text-decoration: none;
526
- -webkit-transition: color 0.1s linear;
527
- transition: color 0.1s linear;
528
- }
529
-
530
- .ecwid-admin-timeout a:hover {
531
- color: #006995;
532
- }
533
-
534
-
535
- .ecwid-reset-categories-cache {
536
- padding: 1px 2px;
537
- margin: 6px 0;
538
- line-height: 15px;
539
- text-decoration: none;
540
- border-bottom: 1px solid #0073aa;
541
- }
542
-
543
- .ecwid-reset-categories-cache-updated {
544
- display: none;
545
- padding: 1px 2px;
546
- margin: 6px 0;
547
- line-height: 15px;
548
- text-decoration: none;
549
- cursor: default;
550
- color: #62ae29;
551
- position: relative;
552
- left: 20px;
553
- }
554
- .ecwid-reset-categories-cache-updated:before {
555
- content: "\f147";
556
- font: 20px 'dashicons';
557
- position: absolute;
558
- top: 6px;
559
- left: -20px;
560
- line-height: 10px;
561
- }
562
-
563
- .ecwid-reset-categories-cache.cache-cleared:not(:hover) {
564
- color: #999;
565
- border-bottom-color:#999;
566
- }
567
-
568
- .ecwid-reset-categories-cache.cache-cleared:hover {
569
- color:#666;
570
- border-bottom-color:#666;
571
  }
1
+ #wpadminbar .ecwid-top-menu-item {
2
+ margin-top: 0px;
3
+ width: 23px;
4
+ height: 28px;
5
+ background: url(../images/icon-head-default.png) no-repeat 0% 2px;
6
+ }
7
+
8
+ #wpadminbar .ecwid-top-menu-item:hover,
9
+ #wpadminbar .hover .ecwid-top-menu-item{
10
+ background-image: url(../images/icon-head-active.png);
11
+ }
12
+
13
+ #adminmenu #toplevel_page_ecwid div.wp-menu-image {
14
+ background: url(../images/icon-sidebar-default.png) no-repeat 5px 2px;
15
+ margin: 2px 3px 2px 2px;
16
+ width: 23px;
17
+ height: 23px;
18
+ }
19
+
20
+ #adminmenu #toplevel_page_ecwid:hover div.wp-menu-image,
21
+ #adminmenu #toplevel_page_ecwid.wp-has-current-submenu div.wp-menu-image
22
+ {
23
+ background-image: url(../images/icon-sidebar-active.png);
24
+ }
25
+
26
+ .ecwid-settings h2 {
27
+ background:url(../images/icon-title.png) no-repeat 0% 50%;
28
+ padding-left: 43px;
29
+ line-height: 32px;
30
+ margin-bottom: 30px;
31
+ }
32
+
33
+ #hide-vote-message {
34
+ text-decoration: underline;
35
+ cursor: pointer;
36
+ }
37
+
38
+ #hide-vote-message.hiding {
39
+ cursor: wait;
40
+ }
41
+
42
+ #wp-toolbar > ul > li#wp-admin-bar-ecwid-main {
43
+ display: block;
44
+ }
45
+
46
+ .ecwid-badge {
47
+ display: table;
48
+ width: 70%;
49
+ min-width: 200px;
50
+ padding: 3px;
51
+ }
52
+
53
+ .ecwid-badge > div {
54
+ display: table-cell;
55
+ vertical-align: middle;
56
+ height: 55px;
57
+ }
58
+
59
+ .ecwid-badge .checkbox {
60
+ width: 15px;
61
+ }
62
+ .ecwid-badge .image {
63
+ text-align: center;
64
+ }
65
+
66
+ div.ecwid-message {
67
+ padding: 27px 29px 20px 30px;
68
+ display: block;
69
+ }
70
+
71
+ .ecwid-message a {
72
+ color: #0074A2;
73
+ }
74
+
75
+ .ecwid-message a:hover {
76
+ color: #2EA2CC;
77
+ }
78
+
79
+ .ecwid-message .ecwid-message-title {
80
+ font-size: 18px;
81
+ margin-bottom: 12px;
82
+ font-weight: bold;
83
+ }
84
+
85
+ .ecwid-message .ecwid-message-content {
86
+ line-height: 20px;
87
+ }
88
+
89
+ .ecwid-message .ecwid-message-buttons {
90
+ margin-top: 19px;
91
+ position: relative;
92
+ display: table;
93
+ width: 100%;
94
+ }
95
+
96
+ .ecwid-message .ecwid-message-buttons > div {
97
+ display: inline-block;
98
+ vertical-align: middle;
99
+ }
100
+
101
+ .ecwid-message .ecwid-message-buttons > div:not(:first-child) {
102
+ padding-left: 9px;
103
+ }
104
+
105
+ .ecwid-message .ecwid-message-buttons > div:last-child {
106
+ position: absolute;
107
+
108
+ padding-left: 0px;
109
+
110
+ top: 0px;
111
+ right: 0px;
112
+ }
113
+
114
+ .ecwid-message .ecwid-message-buttons > div a{
115
+ text-decoration: none;
116
+ }
117
+
118
+ .ecwid-message .ecwid-message-hide:not(:hover) {
119
+ color: #bbb;
120
+ }
121
+
122
+ .ecwid-message .ecwid-message-hide {
123
+ font-size: 12px;
124
+ font-weight: 100;
125
+ cursor: pointer;
126
+ text-decoration: none;
127
+ }
128
+
129
+ .ecwid-message .ecwid-message-hide:before {
130
+ content: "\e606";
131
+ font-family: ecwid-plugin-icons;
132
+ font-size: 16px;
133
+ position: relative;
134
+ left: 1px;
135
+ top: 3px;
136
+ }
137
+
138
+ @media screen and (max-width: 768px) {
139
+ .ecwid-message .ecwid-message-buttons > div:last-child {
140
+ position: inherit;
141
+ }
142
+
143
+ div.ecwid-message,
144
+ div.ecwid-message.updated{
145
+ padding: 27px 29px 20px 30px;
146
+ }
147
+
148
+ .ecwid-message .ecwid-message-buttons > div:not(:first-child) {
149
+ padding-left: 0px;
150
+ }
151
+
152
+ .ecwid-message .ecwid-message-buttons > div {
153
+ display: block;
154
+ }
155
+
156
+ .ecwid-message .ecwid-message-buttons > div a {
157
+ text-align: center;
158
+ white-space: normal;
159
+ width: 100%;
160
+ }
161
+
162
+ .ecwid-message .ecwid-message-hide:before {
163
+ font-size: 21px;
164
+ top: 5px;
165
+ }
166
+
167
+ .ecwid-message-buttons .hide-wrapper {
168
+ margin-top: 10px;
169
+ }
170
+ }
171
+
172
+ body[class*="_page_ecwid"] .ecwid-message {
173
+ margin: 20px;
174
+ }
175
+
176
+ .ecwid-message.dev {
177
+ outline: 2px solid red;
178
+ width: 434px;
179
+ }
180
+
181
+ .ecwid-message.dev .ecwid-message-title {
182
+ letter-spacing: -0.4px;
183
+ }
184
+
185
+ .ecwid-message.dev .ecwid-message-content {
186
+ letter-spacing: -0.62px;
187
+ }
188
+
189
+ .ecwid-message.dev .ecwid-message-hide {
190
+ letter-spacing: -0.22px;
191
+ }
192
+
193
+ #available-widgets .widget-top.ecwid-widget-highlighted {
194
+ background: #1d7ac4;
195
+ font-weight: normal;
196
+ }
197
+
198
+
199
+ #available-widgets .widget-top.ecwid-widget-highlighted,
200
+ #available-widgets .widget-top.ecwid-widget-highlighted h3 {
201
+ color: white;
202
+ }
203
+
204
+ .widgets-php #available-widgets .ecwid-widget .widget-top .widget-title h4,
205
+ .widgets-php #available-widgets .ecwid-widget .widget-top .widget-title h3
206
+ {
207
+ padding-left: 42px;
208
+ }
209
+
210
+ .wp-customizer #available-widgets .ecwid-widget .widget-top .widget-title {
211
+ padding-left: 0px;
212
+ }
213
+
214
+
215
+ #available-widgets .ecwid-widget .widget-top .widget-title:before {
216
+ font-size: 20px;
217
+ position: absolute;
218
+ top: 12px;
219
+ left: 16px;
220
+ margin-right: -4px;
221
+ line-height: 10px;
222
+ font-family: 'ecwid-plugin-icons';
223
+ speak: none;
224
+ font-style: normal;
225
+ font-weight: normal;
226
+ font-variant: normal;
227
+ text-transform: none;
228
+ line-height: 1;
229
+
230
+ /* Better Font Rendering =========== */
231
+ -webkit-font-smoothing: antialiased;
232
+ -moz-osx-font-smoothing: grayscale;
233
+
234
+ color: #1d7ac4;
235
+ opacity: .5;
236
+ }
237
+
238
+ .wp-customizer #available-widgets .ecwid-widget .widget-top .widget-title:before {
239
+ left: -40px;
240
+ top: -1px;
241
+ font-size: 18px;
242
+ opacity: 1;
243
+ color: #32373c;
244
+ }
245
+
246
+ #available-widgets .ecwid-widget .widget-top:hover .widget-title:before {
247
+ opacity: 1;
248
+ }
249
+
250
+ #available-widgets .ecwid-widget .widget-top.ecwid-widget-highlighted .widget-title:before {
251
+ color: white;
252
+ opacity: 1;
253
+ }
254
+
255
+ #available-widgets .ecwid-widget-badge .widget-title:before {
256
+ content: "\e603";
257
+ }
258
+
259
+ #available-widgets .widget-top.ecwid-widget-minicart .widget-title:before,
260
+ #available-widgets .widget-top.ecwid-widget-minicart_miniview .widget-title:before,
261
+ #available-widgets .widget-top.ecwid-widget-floatingshoppingcart .widget-title:before
262
+ {
263
+ content: "\e601";
264
+ }
265
+
266
+ #available-widgets .widget-top.ecwid-widget-vcategories .widget-title:before,
267
+ #available-widgets .widget-top.ecwid-widget-categories .widget-title:before,
268
+ #available-widgets .widget-top.ecwid-widget-vcategorieslist .widget-title:before
269
+ {
270
+ content: "\e602";
271
+ }
272
+
273
+ #available-widgets .widget-top.ecwid-widget-search .widget-title:before {
274
+ content: "\e604";
275
+ }
276
+
277
+ #available-widgets .widget-top.ecwid-widget-storelink .widget-title:before {
278
+ content: "\e605";
279
+ }
280
+
281
+ #available-widgets .widget-top.ecwid-widget-recentlyviewed .widget-title:before {
282
+ content: "\e600";
283
+ }
284
+
285
+ .ecwid-debug .section {
286
+ display: table-row;
287
+ }
288
+
289
+ .ecwid-debug .section > * {
290
+ display: table-cell;
291
+ padding: 2px 5px;
292
+ }
293
+
294
+ .ecwid-debug h2.hide+div {
295
+ display: none;
296
+ }
297
+
298
+ .ecwid-debug h2 {
299
+ cursor: pointer;
300
+ }
301
+
302
+ .ecwid-debug h2:hover {
303
+ color: #00a0d2;
304
+ }
305
+ .ecwid-debug h2:before {
306
+ content: "[-]";
307
+ font-family: monospace;
308
+ position: relative;
309
+ top: -0.2em;
310
+ }
311
+
312
+ .ecwid-debug h2.hide:before {
313
+ content: "[+]";
314
+ }
315
+
316
+ .ecwid-reconnect-allow-sso .main-wrap {
317
+ display: table;
318
+ width:100%;
319
+ max-width: 1000px;
320
+ }
321
+
322
+ .ecwid-reconnect-allow-sso .main-wrap .column {
323
+ display: table-cell;
324
+ width: 50%;
325
+ vertical-align: top;
326
+ padding-left: 5%;
327
+ text-align: left;
328
+ }
329
+
330
+ .ecwid-reconnect-allow-sso .main-wrap .column img {
331
+ width:100%;
332
+ max-width: 413px;
333
+ }
334
+
335
+
336
+ .ecwid-reconnect-allow-sso .main-wrap .column h4 {
337
+ font-size: 32px;
338
+ font-family: 'Open Sans';
339
+ line-height: normal;
340
+ margin-top: 1em;
341
+ font-weight: normal;
342
+ margin-bottom: 28px;
343
+ }
344
+
345
+ .ecwid-reconnect-allow-sso.ecwid-connect .box .connect-button a {
346
+ text-align: center;
347
+ white-space: nowrap;
348
+ width:auto;
349
+ }
350
+
351
+ .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
352
+ font-size: 16px;
353
+ line-height: 1.50em;
354
+ color: #444;
355
+ margin-bottom: 40px;
356
+ }
357
+
358
+ .ecwid-admin-superwrap.has-wp-message {
359
+ margin-top: 25px;
360
+ }
361
+
362
+ #ecwid-frame {
363
+ border: 1px solid #e5e5e5;
364
+ max-width: 1440px;
365
+ }
366
+
367
+ /* Remove left padding for integrated admin */
368
+ .ecwid-admin-superwrap {
369
+ position:relative;
370
+ height: 600px;
371
+ }
372
+
373
+ .toplevel_page_ecwid #wpcontent {
374
+ padding-left: 0px;
375
+ }
376
+
377
+ .ecwid-admin-superwrap #wrap {
378
+ right: 0px;
379
+ height: 600px;
380
+ background: white;
381
+
382
+ width:100%;
383
+ max-width:1440px;
384
+ }
385
+
386
+ .ecwid-no-padding #wpcontent {
387
+ padding-left: 0px;
388
+ }
389
+
390
+ .ecwid-no-padding .ecwid-message, .ecwid-no-padding .update-nag {
391
+ margin-left: 20px;
392
+ }
393
+
394
+ /* ---------------------- */
395
+
396
+ @media screen and (max-width:1023px) {
397
+ .ecwid-reconnect-allow-sso .main-wrap .column h4 {
398
+ font-size: 28px;
399
+ }
400
+
401
+ .ecwid-reconnect-allow-sso .main-wrap .note {
402
+ font-size: 14px;
403
+ }
404
+
405
+ .ecwid-connect.ecwid-reconnect-allow-sso .main-wrap .connect-button a {
406
+ font-size: 16px;
407
+ }
408
+ }
409
+
410
+ @media screen and (max-width:767px) {
411
+ .ecwid-reconnect-allow-sso .main-wrap .column {
412
+ display: block;
413
+ width: 100%;
414
+ text-align: center;
415
+ padding-left: inherit;
416
+ }
417
+
418
+ .ecwid-reconnect-allow-sso .main-wrap .column p {
419
+ display: inline-block;
420
+ }
421
+
422
+ .ecwid-reconnect-allow-sso .main-wrap .column h4 {
423
+ margin-bottom: 14px;
424
+ }
425
+
426
+ .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
427
+ margin-bottom: 20px;
428
+ }
429
+ }
430
+
431
+ .ecwid-admin-footer {
432
+ display: table;
433
+ width:100%;
434
+ }
435
+
436
+ .ecwid-connect .ecwid-admin-footer .ecwid-app-badges-block {
437
+ display: none;
438
+ }
439
+
440
+ .ecwid-admin-footer-block {
441
+ display: table-cell;
442
+ padding-top: 5px;
443
+ padding-right: 10px;
444
+ font-size: 13px;
445
+ }
446
+
447
+
448
+ .ecwid-admin-footer-block:first-child {
449
+ padding-left: 20px;
450
+ }
451
+
452
+
453
+ .ecwid-admin-footer-block .ecwid-admin-footer-title {
454
+ margin: 1em 0;
455
+ font-weight: 600;
456
+ }
457
+
458
+ .ecwid-admin-footer-block .ecwid-admin-footer-text {
459
+ margin: 0.7em 0;
460
+ }
461
+ .ecwid-admin-footer-block .ecwid-app-badges {
462
+ margin-top: -1em;
463
+ min-width:230px;
464
+ padding-top: 1px;
465
+ }
466
+
467
+ .ecwid-admin-footer-block .ecwid-app-badges a,
468
+ .ecwid-admin-footer-block .ecwid-app-badges svg {
469
+ display: inline-block;
470
+ }
471
+ .ecwid-admin-footer-block .ecwid-app-badges svg {
472
+ width: 105px;
473
+ margin-right: 7px;
474
+ opacity: .8;
475
+ }
476
+
477
+ .ecwid-admin-footer-block .ecwid-app-badges svg:hover {
478
+ opacity: 1;
479
+ }
480
+
481
+ @media screen and (max-width:767px) {
482
+ .ecwid-admin-footer-block {
483
+ display: block;
484
+ }
485
+ }
486
+
487
+ .ecwid-admin-timeout .box {
488
+ margin: 20px auto;
489
+ border: 2px solid #ed917d;
490
+ min-width: 290px;
491
+ max-width: 600px;
492
+ padding: 45px 85px 30px 85px;
493
+ box-sizing: border-box;
494
+ background: #f5ffef;
495
+ font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
496
+ }
497
+
498
+ .ecwid-admin-timeout .box .logo {
499
+ width: auto;
500
+ height: 65px;
501
+ }
502
+ .ecwid-admin-timeout .box .logo svg {
503
+ max-height: 65px;
504
+ }
505
+
506
+ .ecwid-admin-timeout .box .logo svg path {
507
+ fill: #ed917d;
508
+ }
509
+
510
+ .ecwid-admin-timeout .box .title {
511
+ text-align: center;
512
+ font-size: 18px;
513
+ padding: 15px 0 5px;
514
+ }
515
+
516
+ .ecwid-admin-timeout .box .text {
517
+ text-align: center;
518
+ font-size: 14px;
519
+ line-height: 24px;
520
+ padding: 5px 0;
521
+ }
522
+
523
+ .ecwid-admin-timeout a {
524
+ color: #04a2ca;
525
+ text-decoration: none;
526
+ -webkit-transition: color 0.1s linear;
527
+ transition: color 0.1s linear;
528
+ }
529
+
530
+ .ecwid-admin-timeout a:hover {
531
+ color: #006995;
532
+ }
533
+
534
+
535
+ .ecwid-reset-categories-cache {
536
+ padding: 1px 2px;
537
+ margin: 6px 0;
538
+ line-height: 15px;
539
+ text-decoration: none;
540
+ border-bottom: 1px solid #0073aa;
541
+ }
542
+
543
+ .ecwid-reset-categories-cache-updated {
544
+ display: none;
545
+ padding: 1px 2px;
546
+ margin: 6px 0;
547
+ line-height: 15px;
548
+ text-decoration: none;
549
+ cursor: default;
550
+ color: #62ae29;
551
+ position: relative;
552
+ left: 20px;
553
+ }
554
+ .ecwid-reset-categories-cache-updated:before {
555
+ content: "\f147";
556
+ font: 20px 'dashicons';
557
+ position: absolute;
558
+ top: 6px;
559
+ left: -20px;
560
+ line-height: 10px;
561
+ }
562
+
563
+ .ecwid-reset-categories-cache.cache-cleared:not(:hover) {
564
+ color: #999;
565
+ border-bottom-color:#999;
566
+ }
567
+
568
+ .ecwid-reset-categories-cache.cache-cleared:hover {
569
+ color:#666;
570
+ border-bottom-color:#666;
571
  }
css/divibuilder.css CHANGED
@@ -1,6 +1,6 @@
1
-
2
- .et-pb-all-modules .et_pb_ecwid:before,
3
- .et_pb_saved_layouts_list .et_pb_ecwid:before{
4
- font-family: ecwid-plugin-icons;
5
- content: "\e603";
6
  }
1
+
2
+ .et-pb-all-modules .et_pb_ecwid:before,
3
+ .et_pb_saved_layouts_list .et_pb_ecwid:before{
4
+ font-family: ecwid-plugin-icons;
5
+ content: "\e603";
6
  }
css/floating-shopping-cart.css CHANGED
@@ -1,173 +1,173 @@
1
- body.ecwid-floating-shopping-cart .ecwid-float-icons {
2
- position: fixed;
3
- bottom: 50px;
4
- right: -8px;
5
- z-index: 3;
6
- padding-top: 0;
7
- box-sizing: content-box;
8
- }
9
-
10
- body.ecwid-floating-shopping-cart .ecwid-float-icons {
11
- left: auto;
12
- right: 0px;
13
- padding-right: 25px;
14
- }
15
-
16
- body.ecwid-floating-shopping-cart .ecwid-float-icons.position-topright {
17
- bottom: auto;
18
- top: 25px;
19
- }
20
-
21
- body.ecwid-floating-shopping-cart .ecwid-float-icons.position-bottomright {
22
- top: auto;
23
- bottom: 25px;
24
- }
25
-
26
- @media (max-width: 600px) {
27
- body.ecwid-floating-shopping-cart .ecwid-float-icons.position-topright {
28
- right: -8px;
29
- }
30
-
31
- body.ecwid-floating-shopping-cart .ecwid-float-icons {
32
- padding-left: 25px;
33
- }
34
-
35
- }
36
-
37
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div {
38
- height: 48px;
39
- margin-left: 5px;
40
- margin-bottom: 5px;
41
- padding-top: 20px;
42
- -webkit-transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
43
- transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
44
- box-sizing: content-box;
45
- }
46
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off {
47
- height: 0;
48
- padding-top: 0;
49
- -webkit-transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
50
- transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
51
- }
52
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off a {
53
- -webkit-transform: translate3D(80px, 0, 0);
54
- transform: translate3D(80px, 0, 0);
55
- -webkit-transition: -webkit-transform .3s ease-in-out .1s;
56
- transition: transform .3s ease-in-out .1s;
57
- }
58
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off a svg {
59
- -webkit-transform: rotate(270deg);
60
- transform: rotate(270deg);
61
- -webkit-transition: -webkit-transform .3s ease-in-out .1s;
62
- transition: transform .3s ease-in-out .1s;
63
- }
64
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.search-icon a svg {
65
- width: 24px;
66
- height: 24px;
67
- margin: 11px 0 0 11px;
68
- }
69
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon.off a::after {
70
- opacity: 0;
71
- -webkit-transition: opacity .2s ease-in-out 0s;
72
- transition: opacity .2s ease-in-out 0s;
73
- }
74
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon a::after {
75
- display: block;
76
- min-width: 24px;
77
- height: 24px;
78
- padding: 0 5px;
79
- background-color: #EA836E;
80
- content: attr(data-count);
81
- font-size: 12px;
82
- line-height: 24px;
83
- font-weight: 600;
84
- color: #fff;
85
- text-align: center;
86
- position: absolute;
87
- top: -8px;
88
- right: 28px;
89
- border-radius: 12px;
90
- opacity: 1;
91
- box-sizing: border-box;
92
- -webkit-transition: opacity .15s ease-in-out .2s;
93
- transition: opacity .15s ease-in-out .2s;
94
- }
95
- @media (min-width: 600px) {
96
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon a::after {
97
- right: -8px;
98
- }
99
- }
100
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid {
101
- position: relative;
102
- top: -100%;
103
- left: 0;
104
- width: 100%;
105
- height: 100%;
106
- }
107
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart {
108
- background-color: transparent !important;
109
- width: 100% !important;
110
- height: 100% !important;
111
- border: 0 none !important;
112
- opacity: 0 !important;
113
- }
114
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart * {
115
- display: none;
116
- }
117
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a {
118
- display: block;
119
- width: 46px;
120
- height: 46px;
121
- background-color: #fff;
122
- border: 1px solid #439CA0;
123
- border-radius: 50%;
124
- box-sizing: border-box;
125
- position: relative;
126
- -webkit-transform: translate3D(0, 0, 0);
127
- transform: translate3D(0, 0, 0);
128
- -webkit-transition: -webkit-transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
129
- transition: transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
130
- box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
131
- }
132
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover {
133
- border-color: #34797c;
134
- }
135
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover svg path[stroke] {
136
- stroke: #34797c;
137
- }
138
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover svg path[fill] {
139
- fill: #34797c;
140
- }
141
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active {
142
- border-color: #6dbec2;
143
- }
144
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active svg path[stroke] {
145
- stroke: #6dbec2;
146
- }
147
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active svg path[fill] {
148
- fill: #6dbec2;
149
- }
150
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg {
151
- width: 20px;
152
- height: 26px;
153
- margin: 9px 12px;
154
- display: block;
155
- -webkit-transform: rotate(0deg);
156
- transform: rotate(0deg);
157
- -webkit-transition: -webkit-transform .3s ease-in-out 0s;
158
- transition: transform .3s ease-in-out 0s;
159
- }
160
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path {
161
- -webkit-transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
162
- transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
163
- }
164
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path[stroke] {
165
- stroke: #439CA0;
166
- }
167
- body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path[fill] {
168
- fill: #439CA0;
169
- }
170
-
171
- .ecwid-float-icons {
172
- overflow: hidden;
173
  }
1
+ body.ecwid-floating-shopping-cart .ecwid-float-icons {
2
+ position: fixed;
3
+ bottom: 50px;
4
+ right: -8px;
5
+ z-index: 3;
6
+ padding-top: 0;
7
+ box-sizing: content-box;
8
+ }
9
+
10
+ body.ecwid-floating-shopping-cart .ecwid-float-icons {
11
+ left: auto;
12
+ right: 0px;
13
+ padding-right: 25px;
14
+ }
15
+
16
+ body.ecwid-floating-shopping-cart .ecwid-float-icons.position-topright {
17
+ bottom: auto;
18
+ top: 25px;
19
+ }
20
+
21
+ body.ecwid-floating-shopping-cart .ecwid-float-icons.position-bottomright {
22
+ top: auto;
23
+ bottom: 25px;
24
+ }
25
+
26
+ @media (max-width: 600px) {
27
+ body.ecwid-floating-shopping-cart .ecwid-float-icons.position-topright {
28
+ right: -8px;
29
+ }
30
+
31
+ body.ecwid-floating-shopping-cart .ecwid-float-icons {
32
+ padding-left: 25px;
33
+ }
34
+
35
+ }
36
+
37
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div {
38
+ height: 48px;
39
+ margin-left: 5px;
40
+ margin-bottom: 5px;
41
+ padding-top: 20px;
42
+ -webkit-transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
43
+ transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
44
+ box-sizing: content-box;
45
+ }
46
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off {
47
+ height: 0;
48
+ padding-top: 0;
49
+ -webkit-transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
50
+ transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
51
+ }
52
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off a {
53
+ -webkit-transform: translate3D(80px, 0, 0);
54
+ transform: translate3D(80px, 0, 0);
55
+ -webkit-transition: -webkit-transform .3s ease-in-out .1s;
56
+ transition: transform .3s ease-in-out .1s;
57
+ }
58
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.off a svg {
59
+ -webkit-transform: rotate(270deg);
60
+ transform: rotate(270deg);
61
+ -webkit-transition: -webkit-transform .3s ease-in-out .1s;
62
+ transition: transform .3s ease-in-out .1s;
63
+ }
64
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.search-icon a svg {
65
+ width: 24px;
66
+ height: 24px;
67
+ margin: 11px 0 0 11px;
68
+ }
69
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon.off a::after {
70
+ opacity: 0;
71
+ -webkit-transition: opacity .2s ease-in-out 0s;
72
+ transition: opacity .2s ease-in-out 0s;
73
+ }
74
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon a::after {
75
+ display: block;
76
+ min-width: 24px;
77
+ height: 24px;
78
+ padding: 0 5px;
79
+ background-color: #EA836E;
80
+ content: attr(data-count);
81
+ font-size: 12px;
82
+ line-height: 24px;
83
+ font-weight: 600;
84
+ color: #fff;
85
+ text-align: center;
86
+ position: absolute;
87
+ top: -8px;
88
+ right: 28px;
89
+ border-radius: 12px;
90
+ opacity: 1;
91
+ box-sizing: border-box;
92
+ -webkit-transition: opacity .15s ease-in-out .2s;
93
+ transition: opacity .15s ease-in-out .2s;
94
+ }
95
+ @media (min-width: 600px) {
96
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon a::after {
97
+ right: -8px;
98
+ }
99
+ }
100
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid {
101
+ position: relative;
102
+ top: -100%;
103
+ left: 0;
104
+ width: 100%;
105
+ height: 100%;
106
+ }
107
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart {
108
+ background-color: transparent !important;
109
+ width: 100% !important;
110
+ height: 100% !important;
111
+ border: 0 none !important;
112
+ opacity: 0 !important;
113
+ }
114
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart * {
115
+ display: none;
116
+ }
117
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a {
118
+ display: block;
119
+ width: 46px;
120
+ height: 46px;
121
+ background-color: #fff;
122
+ border: 1px solid #439CA0;
123
+ border-radius: 50%;
124
+ box-sizing: border-box;
125
+ position: relative;
126
+ -webkit-transform: translate3D(0, 0, 0);
127
+ transform: translate3D(0, 0, 0);
128
+ -webkit-transition: -webkit-transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
129
+ transition: transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
130
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
131
+ }
132
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover {
133
+ border-color: #34797c;
134
+ }
135
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover svg path[stroke] {
136
+ stroke: #34797c;
137
+ }
138
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:hover svg path[fill] {
139
+ fill: #34797c;
140
+ }
141
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active {
142
+ border-color: #6dbec2;
143
+ }
144
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active svg path[stroke] {
145
+ stroke: #6dbec2;
146
+ }
147
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a:active svg path[fill] {
148
+ fill: #6dbec2;
149
+ }
150
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg {
151
+ width: 20px;
152
+ height: 26px;
153
+ margin: 9px 12px;
154
+ display: block;
155
+ -webkit-transform: rotate(0deg);
156
+ transform: rotate(0deg);
157
+ -webkit-transition: -webkit-transform .3s ease-in-out 0s;
158
+ transition: transform .3s ease-in-out 0s;
159
+ }
160
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path {
161
+ -webkit-transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
162
+ transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
163
+ }
164
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path[stroke] {
165
+ stroke: #439CA0;
166
+ }
167
+ body.ecwid-floating-shopping-cart .ecwid-float-icons > div a svg path[fill] {
168
+ fill: #439CA0;
169
+ }
170
+
171
+ .ecwid-float-icons {
172
+ overflow: hidden;
173
  }
css/fonts.css CHANGED
@@ -1,37 +1,37 @@
1
- @font-face {
2
- font-family: 'ecwid-plugin-icons';
3
- src:url('../fonts/ecwid-icons.eot?ecwid-b8sbws');
4
- src:url('../fonts/ecwid-icons.eot?#iefixecwid-b8sbws') format('embedded-opentype'),
5
- url('../fonts/ecwid-icons.woff?ecwid-b8sbws') format('woff'),
6
- url('../fonts/ecwid-icons.ttf?ecwid-b8sbws') format('truetype'),
7
- url('../fonts/ecwid-icons.svg?ecwid-b8sbws#ecwid-icons') format('svg');
8
- font-weight: normal;
9
- font-style: normal;
10
- }
11
-
12
- #wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon.ecwid-top-menu-item {
13
- font: 400 20px/1 'ecwid-plugin-icons' !important;
14
- -webkit-font-smoothing: antialiased;
15
- -moz-osx-font-smoothing: grayscale;
16
- background-image: none;
17
- color: white;
18
- width: auto;
19
- margin-right: 0px;
20
- margin-top: 2px;
21
- }
22
-
23
- #wpadminbar #wp-admin-bar-ecwid-main .ab-icon.ecwid-top-menu-item:before {
24
- content: "\e603";
25
- width: auto;
26
- margin-right: 0px;
27
- }
28
-
29
- @media screen and (max-width: 782px) {
30
- #wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon.ecwid-top-menu-item {
31
- font: 400 32px/46px 'ecwid-plugin-icons' !important;
32
- width: 46px;
33
- padding: 0px 2px;
34
- text-align: center;
35
- margin-top: 0px;
36
- }
37
- }
1
+ @font-face {
2
+ font-family: 'ecwid-plugin-icons';
3
+ src:url('../fonts/ecwid-icons.eot?ecwid-b8sbws');
4
+ src:url('../fonts/ecwid-icons.eot?#iefixecwid-b8sbws') format('embedded-opentype'),
5
+ url('../fonts/ecwid-icons.woff?ecwid-b8sbws') format('woff'),
6
+ url('../fonts/ecwid-icons.ttf?ecwid-b8sbws') format('truetype'),
7
+ url('../fonts/ecwid-icons.svg?ecwid-b8sbws#ecwid-icons') format('svg');
8
+ font-weight: normal;
9
+ font-style: normal;
10
+ }
11
+
12
+ #wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon.ecwid-top-menu-item {
13
+ font: 400 20px/1 'ecwid-plugin-icons' !important;
14
+ -webkit-font-smoothing: antialiased;
15
+ -moz-osx-font-smoothing: grayscale;
16
+ background-image: none;
17
+ color: white;
18
+ width: auto;
19
+ margin-right: 0px;
20
+ margin-top: 2px;
21
+ }
22
+
23
+ #wpadminbar #wp-admin-bar-ecwid-main .ab-icon.ecwid-top-menu-item:before {
24
+ content: "\e603";
25
+ width: auto;
26
+ margin-right: 0px;
27
+ }
28
+
29
+ @media screen and (max-width: 782px) {
30
+ #wpadminbar>#wp-toolbar>#wp-admin-bar-root-default .ab-icon.ecwid-top-menu-item {
31
+ font: 400 32px/46px 'ecwid-plugin-icons' !important;
32
+ width: 46px;
33
+ padding: 0px 2px;
34
+ text-align: center;
35
+ margin-top: 0px;
36
+ }
37
+ }
css/frontend.css CHANGED
@@ -1,62 +1,62 @@
1
- html#ecwid_html body#ecwid_body .ecwid.ecwid-SingleProduct a,
2
- .ecwid-SingleProduct a div.ecwid-title {
3
- color: #000;
4
- text-decoration: none;
5
- }
6
-
7
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel input {
8
- max-width: 300px;
9
- }
10
-
11
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories #horizontal-menu,
12
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories .horizontal-menu {
13
- margin-bottom: 10px;
14
- margin-top: 10px;
15
- }
16
-
17
- .ecwid-shopping-cart-categories .horizontal-menu-item {
18
- background-image: none;
19
- }
20
-
21
- html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-name {
22
- color: inherit;
23
- font-size: inherit;
24
- }
25
-
26
- html#ecwid_html body#ecwid_body .ecwid tr:hover td {
27
- color: inherit;
28
- }
29
-
30
- html#ecwid_html body#ecwid_body .ecwid table {
31
- line-height: inherit;
32
- }
33
-
34
- .ecwid-SingleProduct-v2 {
35
- box-sizing: content-box;
36
- }
37
-
38
- .ecwid .ecwid-productBrowser input {
39
- display: inline-block;
40
- }
41
-
42
- .ecwid .ecwid-productBrowser label {
43
- vertical-align: middle;
44
- }
45
-
46
- .ecwid .ecwid-productBrowser select,
47
- .ecwid .ecwid-productBrowser input {
48
- background-color: #fff;
49
- color: #333;
50
- }
51
-
52
- /* fix old search widget */
53
- .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-field {
54
- display: inline-block;
55
- }
56
- .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-field {
57
- font-size: 14px;
58
- }
59
- .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-button {
60
- font-size: 14px;
61
- font-weight: 400;
62
- }
1
+ html#ecwid_html body#ecwid_body .ecwid.ecwid-SingleProduct a,
2
+ .ecwid-SingleProduct a div.ecwid-title {
3
+ color: #000;
4
+ text-decoration: none;
5
+ }
6
+
7
+ html#ecwid_html body#ecwid_body .ecwid-SearchPanel input {
8
+ max-width: 300px;
9
+ }
10
+
11
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories #horizontal-menu,
12
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories .horizontal-menu {
13
+ margin-bottom: 10px;
14
+ margin-top: 10px;
15
+ }
16
+
17
+ .ecwid-shopping-cart-categories .horizontal-menu-item {
18
+ background-image: none;
19
+ }
20
+
21
+ html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-name {
22
+ color: inherit;
23
+ font-size: inherit;
24
+ }
25
+
26
+ html#ecwid_html body#ecwid_body .ecwid tr:hover td {
27
+ color: inherit;
28
+ }
29
+
30
+ html#ecwid_html body#ecwid_body .ecwid table {
31
+ line-height: inherit;
32
+ }
33
+
34
+ .ecwid-SingleProduct-v2 {
35
+ box-sizing: content-box;
36
+ }
37
+
38
+ .ecwid .ecwid-productBrowser input {
39
+ display: inline-block;
40
+ }
41
+
42
+ .ecwid .ecwid-productBrowser label {
43
+ vertical-align: middle;
44
+ }
45
+
46
+ .ecwid .ecwid-productBrowser select,
47
+ .ecwid .ecwid-productBrowser input {
48
+ background-color: #fff;
49
+ color: #333;
50
+ }
51
+
52
+ /* fix old search widget */
53
+ .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-field {
54
+ display: inline-block;
55
+ }
56
+ .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-field {
57
+ font-size: 14px;
58
+ }
59
+ .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-button {
60
+ font-size: 14px;
61
+ font-weight: 400;
62
+ }
css/help.css CHANGED
@@ -1,1005 +1,1005 @@
1
- @charset "UTF-8";
2
- /*
3
- Theme Name: Ecwid Help Portal
4
- Theme URI: http: //help.ecwid.com
5
- Description: Ecwid theme.
6
- Version: 2.1
7
- Author: ecwid.com
8
- Author URI: http: //www.ecwid.com
9
- */
10
- /*------framework---------------------------------------------------------------------------------*/
11
- html,
12
- body {
13
- font-family: 'Open Sans', sans-serif;
14
- font-size: 16px;
15
- line-height: 20px;
16
- font-weight: 400;
17
- text-rendering: optimizeLegibility;
18
- margin: 0;
19
- padding: 0;
20
- background-color: #fff;
21
- min-height: 100%;
22
- min-width: 320px;
23
- height: auto;
24
- border: 0 none; }
25
-
26
- body > audio,
27
- body > audio * {
28
- display: none !important;
29
- position: absolute;
30
- z-index: -100;
31
- height: 0;
32
- overflow: hidden; }
33
-
34
- * {
35
- outline: none !important;
36
- -webkit-text-size-adjust: none; }
37
-
38
- ul, ol, li {
39
- margin: 0;
40
- padding: 0; }
41
-
42
- ul, ol {
43
- list-style-position: inside; }
44
-
45
- label {
46
- cursor: pointer; }
47
-
48
- .cf:before,
49
- .cf:after {
50
- content: " ";
51
- display: table; }
52
-
53
- .cf:after {
54
- clear: both; }
55
-
56
- wbr {
57
- display: inline-block; }
58
-
59
- .fr {
60
- float: right; }
61
-
62
- .fl {
63
- float: left; }
64
-
65
- .hidden {
66
- display: none !important; }
67
-
68
- form {
69
- margin: 0; }
70
-
71
- img,
72
- svg {
73
- border: 0 none; }
74
-
75
- table {
76
- border-collapse: collapse;
77
- border-spacing: 0; }
78
-
79
- table td {
80
- padding: 0; }
81
-
82
- /*------fonts.css-----------------------------------------------------------------------------*/
83
- @font-face {
84
- font-family: 'font_icons';
85
- src: url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.eot?onn615");
86
- src: url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.eot?#iefixonn615") format("embedded-opentype"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.woff?onn615") format("woff"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.ttf?onn615") format("truetype"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.svg?onn615#fontIcons") format("svg");
87
- font-weight: normal;
88
- font-style: normal; }
89
-
90
- /* Help icon font */
91
- @font-face {
92
- font-family: 'iconhelp_font';
93
- src: url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.eot?-s2892t");
94
- src: url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.eot?#iefix-s2892t") format("embedded-opentype"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.woff?-s2892t") format("woff"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.ttf?-s2892t") format("truetype"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.svg?-s2892t#iconhelp_font") format("svg");
95
- font-weight: normal;
96
- font-style: normal; }
97
-
98
- /*------typo.css------------------------------------------------------------------------------*/
99
- h1,
100
- h2,
101
- h3,
102
- h4,
103
- h5,
104
- h6 {
105
- font-family: 'Open Sans', sans-serif;
106
- font-weight: 400; }
107
-
108
- h1 {
109
- font-size: 36px; }
110
-
111
- h2 {
112
- font-size: 24px;
113
- /*28px to 16px*/ }
114
-
115
- h3 {
116
- font-size: 18px;
117
- /*22px to 16px*/ }
118
-
119
- .muted {
120
- color: #999; }
121
-
122
- a {
123
- color: #0064b8;
124
- cursor: pointer;
125
- text-decoration: none;
126
- -webkit-transition: color .1s linear;
127
- transition: color .1s linear; }
128
-
129
- a:hover {
130
- color: #369fe0; }
131
-
132
- a:active {
133
- color: #71c7f3; }
134
-
135
- .ecwid-help a:focus {
136
- outline: 0 none;
137
- box-shadow: none; }
138
-
139
- a.underlined {
140
- text-decoration: underline; }
141
-
142
- /*------icons.css-----------------------------------------------------------------------------*/
143
- .ecwid-help [data-icon]:before {
144
- content: attr(data-icon);
145
- text-transform: none;
146
- font-weight: normal;
147
- font-variant: normal;
148
- font-family: 'font_icons';
149
- line-height: 1;
150
- speak: none;
151
- -webkit-font-smoothing: antialiased;
152
- -moz-osx-font-smoothing: grayscale; }
153
-
154
- .ecwid-help [class*="icon-"] {
155
- display: inline-block;
156
- text-transform: none;
157
- font-weight: normal;
158
- font-style: normal;
159
- font-variant: normal;
160
- font-family: 'font_icons';
161
- line-height: 1;
162
- speak: none;
163
- cursor: pointer;
164
- -webkit-font-smoothing: antialiased;
165
- -moz-osx-font-smoothing: grayscale;
166
- -webkit-transition: color .1s linear;
167
- transition: color .1s linear; }
168
-
169
- .ecwid-help [class^="iconhelp-"], [class*=" iconhelp-"] {
170
- font-family: 'iconhelp_font';
171
- speak: none;
172
- font-style: normal;
173
- font-weight: normal;
174
- font-variant: normal;
175
- text-transform: none;
176
- line-height: 1;
177
- -webkit-font-smoothing: antialiased;
178
- -moz-osx-font-smoothing: grayscale; }
179
-
180
- .icon-down:before {
181
- content: "\e009"; }
182
-
183
- .icon-arr-right:before {
184
- content: "\e005"; }
185
-
186
- .icon-search:before {
187
- content: "\e001"; }
188
-
189
- .iconhelp-users:before {
190
- content: "\e60e"; }
191
-
192
- .iconhelp-envelope:before {
193
- content: "\e60f"; }
194
-
195
- .iconhelp-arrow-down:before {
196
- content: "\e610"; }
197
-
198
- .iconhelp-book:before {
199
- content: "\e611"; }
200
-
201
- .iconhelp-search:before {
202
- content: "\e60d"; }
203
-
204
- .iconhelp-thumbs_down:before {
205
- content: "\e60b"; }
206
-
207
- .iconhelp-thumbs_up:before {
208
- content: "\e60c"; }
209
-
210
- .iconhelp-contents:before {
211
- content: "\e60a"; }
212
-
213
- .iconhelp-101:before {
214
- content: "\e600"; }
215
-
216
- .iconhelp-setup:before {
217
- content: "\e601"; }
218
-
219
- .iconhelp-manage:before {
220
- content: "\e602"; }
221
-
222
- .iconhelp-custom:before {
223
- content: "\e603"; }
224
-
225
- .iconhelp-api:before {
226
- content: "\e604"; }
227
-
228
- .iconhelp-billing:before {
229
- content: "\e605"; }
230
-
231
- .iconhelp-twitter:before {
232
- content: "\e606"; }
233
-
234
- .iconhelp-fb:before {
235
- content: "\e607"; }
236
-
237
- .iconhelp-bullet-on:before {
238
- content: "\e608"; }
239
-
240
- .iconhelp-bullet-off:before {
241
- content: "\e609"; }
242
-
243
- /*------buttons.css---------------------------------------------------------------------------*/
244
- .btn {
245
- font-size: 13px;
246
- display: inline-block;
247
- min-width: 30px;
248
- margin: 0;
249
- padding: 4px 10px;
250
- border: 1px solid transparent;
251
- border-radius: 4px;
252
- background-color: #f1f1f1;
253
- color: #666;
254
- vertical-align: middle;
255
- text-align: center;
256
- line-height: 1.57em;
257
- cursor: pointer;
258
- outline: 0;
259
- text-decoration: none;
260
- font-family: 'Open Sans', sans-serif;
261
- white-space: nowrap;
262
- -moz-box-sizing: border-box;
263
- box-sizing: border-box;
264
- -webkit-transition: color .1s linear, background-color .1s linear, border-color .1s linear;
265
- transition: color .1s linear, background-color .1s linear, border-color .1s linear; }
266
- .btn:hover {
267
- background-color: #e3e3e3;
268
- color: #666; }
269
- .btn:active {
270
- background-color: #d4d4d4;
271
- color: #666; }
272
- .btn:focus {
273
- border: 2px solid #aaa;
274
- padding: 3px 9px; }
275
-
276
- .btn-medium {
277
- font-size: 18px;
278
- /* 24px to 16px*/
279
- padding: 4px 25px;
280
- border-radius: 6px;
281
- height: 40px;
282
- line-height: 30px;
283
- min-width: 100px; }
284
-
285
- .btn-medium:focus {
286
- padding: 3px 24px; }
287
-
288
- .btn-large {
289
- font-size: 24px;
290
- padding: 0.167em 1.542em;
291
- border-radius: 0.250em;
292
- height: 2.500em;
293
- line-height: 2.083em;
294
- min-width: 120px; }
295
-
296
- .btn-large:focus {
297
- padding: 0.125em 1.500em; }
298
-
299
- .btn-small {
300
- font-size: .875em;
301
- height: 2.143em;
302
- padding: 0.286em 1.357em;
303
- border-radius: .286em;
304
- line-height: 1.570em;
305
- min-width: 60px; }
306
-
307
- .btn-small:focus {
308
- padding: 0.214em 1.286em; }
309
-
310
- .btn-tiny {
311
- font-size: 0.750em;
312
- height: 2.167em;
313
- padding: 0.333em 1.333em;
314
- border-radius: .333em;
315
- line-height: 1.490em;
316
- min-width: 52px; }
317
-
318
- .btn-tiny:focus {
319
- padding: .250em 1.250em; }
320
-
321
- /* buttons' types */
322
- .btn-default {
323
- background-color: #fff;
324
- color: #2283c6;
325
- border-color: #81c1df; }
326
-
327
- .btn-default:hover {
328
- background-color: #81c1df;
329
- color: #fff; }
330
-
331
- .btn-default:active {
332
- background-color: #9acde5;
333
- color: #fff; }
334
-
335
- .btn-default:focus {
336
- border-color: #679ab2; }
337
-
338
- .btn-orange {
339
- background-color: #f49466;
340
- color: #fff; }
341
-
342
- .btn-orange:hover {
343
- background-color: #f7ab84;
344
- color: #fff; }
345
-
346
- .btn-orange:active {
347
- background-color: #da7a4c;
348
- color: #fff; }
349
-
350
- .btn-orange:focus {
351
- border-color: #a0481f; }
352
-
353
- .btn-aqua {
354
- background-color: #4eaccb;
355
- color: #fff; }
356
- .btn-aqua svg {
357
- fill: #4eaccb; }
358
-
359
- .btn-aqua:hover {
360
- background-color: #6ebfd8;
361
- color: #fff; }
362
-
363
- .btn-aqua:active {
364
- background-color: #3492b1;
365
- color: #fff; }
366
-
367
- .btn-aqua:focus {
368
- border-color: #4eaccb; }
369
-
370
- .btn-blue {
371
- background-color: #5196c7;
372
- color: #fff; }
373
-
374
- .btn-blue:hover {
375
- background-color: #74abd2;
376
- color: #fff; }
377
-
378
- .btn-blue:active {
379
- background-color: #41789f;
380
- color: #fff; }
381
-
382
- .btn-blue:focus {
383
- border: 2px solid #39698b; }
384
-
385
- .btn-upgrade,
386
- a.btn-upgrade,
387
- .article-content a.btn-upgrade {
388
- margin: 0 5px;
389
- vertical-align: bottom;
390
- text-decoration: none; }
391
-
392
- .form-control {
393
- font-size: 13px;
394
- display: inline-block;
395
- height: 40px;
396
- width: 100%;
397
- padding: 4px 8px;
398
- border: 1px solid #ddd;
399
- border-radius: 3px;
400
- background-color: #fff;
401
- color: #333;
402
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
403
- vertical-align: middle;
404
- outline: 0;
405
- -moz-box-sizing: border-box;
406
- box-sizing: border-box;
407
- -webkit-transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
408
- transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
409
- line-height: 28px;
410
- font-family: 'Open Sans', sans-serif; }
411
- .form-control::-moz-placeholder {
412
- color: #606060;
413
- opacity: .6; }
414
- .form-control::-webkit-input-placeholder {
415
- color: #606060;
416
- opacity: .6; }
417
- .form-control::-ms-input-placeholder {
418
- color: #606060;
419
- opacity: .6; }
420
- .form-control:active, .form-control:focus {
421
- border: 2px solid #0c92e3;
422
- background-color: #fff;
423
- box-shadow: 0 0 4px #d1eafa;
424
- padding: 3px 7px;
425
- outline: 0; }
426
- .form-control.invalid {
427
- border: 2px solid #fa5111;
428
- padding: 3px 7px;
429
- color: #cf3e07;
430
- background-color: #ffeaea;
431
- box-shadow: none;
432
- -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
433
- transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
434
- .form-control.invalid:hover {
435
- background-color: #fff; }
436
- .form-control.invalid:focus {
437
- background-color: #fff;
438
- box-shadow: 0 0 4px #F5C0C0; }
439
-
440
- .form-control.submitted {
441
- opacity: .3;
442
- -webkit-transition: opacity .3s linear;
443
- transition: opacity .3s linear;
444
- }
445
-
446
- /* Input appends*/
447
- .input-append,
448
- .input-prepend {
449
- position: relative; }
450
- .input-append .btn,
451
- .input-prepend .btn {
452
- background-color: transparent;
453
- border-color: transparent;
454
- position: absolute;
455
- top: 0;
456
- height: 100%; }
457
- .input-append .btn [class*="icon-"],
458
- .input-prepend .btn [class*="icon-"] {
459
- color: #aaa; }
460
-
461
- .input-append .btn {
462
- right: 0; }
463
-
464
- .input-append .form-control {
465
- padding-right: 36px; }
466
- .input-append .form-control:focus {
467
- padding-right: 35px; }
468
-
469
- .input-prepend .btn {
470
- left: 0; }
471
-
472
- .input-prepend .form-control {
473
- padding-left: 36px; }
474
- .input-prepend .form-control:focus {
475
- padding-left: 35px; }
476
-
477
- textarea {
478
- font-family: "Open Sans"; }
479
-
480
- /*-------hds-search-----------------------------------------------------------------------------------*/
481
- /* that fixes the right border being overla*/
482
- .ecwid-help input {
483
- margin: 0px;
484
- }
485
-
486
- .input-wrapper .hds-dropdown {
487
- width: 100%;
488
- position: absolute;
489
- margin-top: 6px;
490
- padding: 7px 0;
491
- background-color: #fff;
492
- border-radius: 6px;
493
- border: 1px solid #dbdbdb;
494
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
495
- z-index: 2;
496
- display: none;
497
- overflow: hidden;
498
- -moz-box-sizing: border-box;
499
- box-sizing: border-box; }
500
- .input-wrapper .hds-dropdown .hds-suggest-link {
501
- display: block;
502
- font-size: 16px;
503
- line-height: 20px;
504
- padding: 15px 30px; }
505
- .input-wrapper .hds-dropdown .hds-suggest-link.hovered {
506
- color: white;
507
- background-color: #82cdcf; }
508
-
509
- .input-wrapper.opened .hds-dropdown {
510
- display: block; }
511
-
512
- .hds-loader {
513
- position: absolute;
514
- top: 10px;
515
- right: 10px;
516
- background: #fff url(//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/images/ajax-loader.gif) center center no-repeat;
517
- width: 20px;
518
- height: 20px;
519
- z-index: 2;
520
- display: none;
521
- box-shadow: -5px 0 6px #fff; }
522
- @media (min-width: 768px) {
523
- .hds-loader {
524
- top: 20px;
525
- right: 87px; } }
526
-
527
- .hds-suggest-loading .hds-loader,
528
- .hds-suggest-loaded.hds-suggest-loading .hds-loader,
529
- .hds-loading .hds-loader {
530
- display: block; }
531
-
532
- .hds-suggest-loaded .hds-loader {
533
- display: none; }
534
-
535
- .hds-suggest-loaded .block-faq {
536
- opacity: 0.3;
537
- -webkit-transition: opacity .1s linear;
538
- transition: opacity .1s linear; }
539
-
540
- .main-container h2 {
541
- font-size: 24px;
542
- font-weight: 600;
543
- line-height: 1.4;
544
- text-align: center;
545
- margin: 25px auto 35px; }
546
- @media screen and (min-width: 768px) {
547
- .main-container h2 {
548
- font-size: 30px;
549
- margin: 20px auto 20px; } }
550
-
551
- /*------block-search-index----------------------------------------------------------------------------*/
552
- .block-search-index {
553
- background: #f4f4f4;
554
- padding: 20px 0; }
555
- .block-search-index .shortcuts {
556
- padding: 25px 0 0;
557
- text-align: center;
558
- letter-spacing: -0.31em;
559
- word-spacing: -0.43em;
560
- max-width: 82%;
561
- margin: 0 auto; }
562
- .block-search-index .shortcuts > li {
563
- letter-spacing: normal;
564
- word-spacing: normal;
565
- display: inline-block;
566
- vertical-align: top;
567
- padding: 0% 1% 40px;
568
- width: 50%;
569
- font-size: 16px;
570
- -moz-box-sizing: border-box;
571
- box-sizing: border-box; }
572
- .block-search-index .shortcuts > li .shortcut-item {
573
- color: #0058B0; }
574
- .block-search-index .shortcuts > li .shortcut-item span {
575
- display: block;
576
- padding: 0 0 14px 0; }
577
- .block-search-index .shortcuts > li .shortcut-item [class*='iconhelp-'] {
578
- font-size: 44px;
579
- color: #6FB1E3;
580
- -webkit-transition: color .1s linear;
581
- transition: color .1s linear; }
582
- .block-search-index .shortcuts > li .shortcut-item:hover [class*='iconhelp-'] {
583
- color: #0058B0; }
584
- .block-search-index .shortcuts > li .shortcut-item span.shortcut-item-text {
585
- margin: 0 auto;
586
- max-width: 100px; }
587
- @media (min-width: 550px) {
588
- .block-search-index .shortcuts > li {
589
- width: 33.3333%;
590
- *width: 33.3023%; } }
591
- @media (min-width: 768px) {
592
- .block-search-index .shortcuts > li {
593
- font-size: 14px;
594
- padding: 1% 1% 0;
595
- width: 16.6667%;
596
- *width: 16.6357%;
597
- letter-spacing: normal;
598
- word-spacing: normal; } }
599
- @media (min-width: 960px) {
600
- .block-search-index .shortcuts > li {
601
- font-size: 16px; } }
602
- @media (min-width: 768px) {
603
- .block-search-index .shortcuts {
604
- max-width: 1000px; } }
605
- @media (min-width: 1280px) {
606
- .block-search-index .shortcuts {
607
- padding: 30px 0 0; } }
608
- @media (min-width: 768px) {
609
- .block-search-index {
610
- padding: 30px 0; } }
611
-
612
- /*-------------block-search-------------------------------------------------*/
613
- .block-search {
614
- /* testing */ }
615
- .block-search .hds-container .hds-wrapper {
616
- max-width: 740px;
617
- margin: 0 auto;
618
- width: 87%; }
619
- .block-search .hds-container .input-wrapper .btn [class*="icon-"] {
620
- color: #aaa;
621
- font-size: 16px;
622
- vertical-align: top;
623
- margin-top: 3px; }
624
- .block-search .hds-container .form-control {
625
- border-radius: 6px;
626
- box-shadow: none;
627
- border-color: #d2d2d2; }
628
- .block-search .hds-container .form-control:focus {
629
- border: 2px solid #005694;
630
- background-color: #fff;
631
- outline: 0; }
632
- @media (min-width: 768px) {
633
- .block-search .hds-container .form-control {
634
- height: 55px;
635
- padding: 3px 237px 3px 20px;
636
- font-size: 20px; }
637
- .block-search .hds-container .form-control:focus {
638
- padding: 2px 236px 2px 19px; } }
639
-
640
- @media (min-width: 768px) {
641
- .block-search .hds-container .btn {
642
- height: 45px;
643
- margin: 0 !important;
644
- min-width: 70px;
645
- background: #4eaccb;
646
- border-radius: 4px;
647
- top: 5px;
648
- right: 7px;
649
- left: auto; }
650
- .block-search .hds-container .btn:hover, .block-search .hds-container .btn:focus:hover {
651
- background: #6ebfd8; }
652
- .block-search .hds-container .input-wrapper .btn:focus {
653
- border: 2px solid #0c5c77; }
654
- .block-search .hds-container .input-wrapper .btn [class*="icon-"] {
655
- display: none; }
656
- .block-search .hds-container .input-wrapper .btn .btn-text {
657
- font-size: 16px;
658
- display: inline-block; } }
659
- @media screen and (min-width: 1024px) {
660
- .block-search .hds-container .hds-wrapper {
661
- width: 50%; } }
662
- .block-search .link-container {
663
- font-size: 18px;
664
- color: #9cc5e4;
665
- text-align: center;
666
- margin: 25px 0; }
667
- .block-search .link-container a {
668
- color: #fff;
669
- display: inline-block;
670
- margin-top: 20px; }
671
- .block-search .link-container a > span {
672
- font-size: 12px; }
673
- .block-search .hds-wrapper .btn .btn-text {
674
- color: #fff;
675
- display: none; }
676
-
677
- /*------block-faq----------------------------------------------------------------------------*/
678
- .block-faq {
679
- background-color: #fff;
680
- padding: 20px 0; }
681
- .block-faq .index-article {
682
- list-style-type: none;
683
- padding: 13px 11px 23px;
684
- position: relative; }
685
- .block-faq .index-article a {
686
- font-size: 16px;
687
- color: #333;
688
- padding: 0 0 0 25px;
689
- line-height: 1.36;
690
- position: relative;
691
- display: block; }
692
- .block-faq .index-article a:hover {
693
- color: #0e5c9e; }
694
- .block-faq .index-article a i {
695
- position: absolute;
696
- font-size: 5px;
697
- top: 8px;
698
- left: 4px;
699
- color: #1a8bdc; }
700
- @media (min-width: 768px) {
701
- .block-faq .index-article a i {
702
- top: 12px; } }
703
- @media (min-width: 768px) {
704
- .block-faq .index-article a {
705
- font-size: 18px; } }
706
- .block-faq .index-article.active {
707
- background: #F3F3F3; }
708
- .block-faq .index-article-body {
709
- display: none;
710
- font-size: 14px;
711
- line-height: 22px;
712
- margin: 10px 26px 0;
713
- color: #333;
714
- font-weight: 300; }
715
- .block-faq .index-article-body h2 {
716
- font-size: 16px;
717
- margin: 20px 0 10px; }
718
- @media screen and (min-width: 768px) {
719
- .block-faq .index-article-body h2 {
720
- font-size: 20px; } }
721
- .block-faq .index-article-body ul li:before {
722
- color: #999;
723
- content: "•";
724
- left: -10px;
725
- position: relative; }
726
- .block-faq .index-article-body a:hover {
727
- color: #369fe0; }
728
- .block-faq .index-article-body ul {
729
- list-style-type: none;
730
- margin-left: 18px; }
731
- .block-faq .index-article-body li {
732
- margin-left: 6px;
733
- text-indent: -6px; }
734
- .block-faq .index-article-body span {
735
- font-size: 14px !important; }
736
- .block-faq .index-article-body img {
737
- display: block;
738
- margin: 10px auto; }
739
- @media screen and (min-width: 768px) {
740
- .block-faq .index-article-body img {
741
- float: left;
742
- margin: 0 20px 20px 0;
743
- max-width: 50%; } }
744
- .block-faq .index-article.active .index-article-body {
745
- display: block; }
746
- .block-faq .index-article .index-article-body a {
747
- font-size: 14px;
748
- font-weight: 300;
749
- line-height: 22px;
750
- display: inline;
751
- color: #035AA0;
752
- margin: 0;
753
- padding: 0;
754
- text-indent: 0;
755
- text-decoration: underline;
756
- word-break: normal; }
757
- @media (min-width: 768px) {
758
- .block-faq {
759
- padding: 30px 0; } }
760
-
761
- .block-faq-wrap {
762
- margin: 0 auto;
763
- width: 80%; }
764
- @media screen and (min-width: 768px) {
765
- .block-faq-wrap {
766
- max-width: 1150px;
767
- width: 100%; } }
768
-
769
- .block-faq-list {
770
- box-sizing: border-box;
771
- display: inline-block;
772
- padding-left: 0;
773
- vertical-align: top; }
774
- .block-faq-list .index-article {
775
- box-sizing: border-box;
776
- display: block;
777
- width: 100%; }
778
- .block-faq-list .index-article--hidden {
779
- display: none; }
780
- @media screen and (min-width: 768px) {
781
- .block-faq-list {
782
- padding-left: 60px;
783
- width: 49%; } }
784
-
785
- /*------block-all-topics----------------------------------------------------------------------*/
786
- .block-topics-link {
787
- margin-top: 35px;
788
- padding: 3px 0 40px;
789
- text-align: center; }
790
- .block-topics-link a {
791
- font-size: 18px; }
792
- .block-topics-link a [class*="icon-"] {
793
- font-size: 16px;
794
- vertical-align: top;
795
- margin-top: 3px; }
796
- @media (min-width: 1024px) {
797
- .block-topics-link {
798
- padding: 0 0 50px; } }
799
-
800
- /*------block-help----------------------------------------------------------------------------*/
801
- .block-help {
802
- background-color: #f4f4f4;
803
- padding: 45px 0 25px; }
804
- .block-help ul {
805
- list-style: none;
806
- overflow: hidden;
807
- max-width: 1150px;
808
- margin: 0 auto;
809
- width: 80%; }
810
- .block-help ul > li {
811
- box-sizing: border-box;
812
- -moz-box-sizing: border-box;
813
- display: inline-block;
814
- letter-spacing: normal;
815
- list-style: none;
816
- padding: 0 11px 20px;
817
- text-align: left;
818
- vertical-align: top;
819
- width: 100%;
820
- word-spacing: normal; }
821
- @media (min-width: 768px) {
822
- .block-help ul > li {
823
- width: 49%;
824
- padding-left: 85px; } }
825
- @media (min-width: 768px) {
826
- .block-help ul {
827
- width: 100%; } }
828
- .block-help .block-help-item a {
829
- text-transform: uppercase;
830
- font-size: 18px;
831
- line-height: 1.333em;
832
- color: #2283c6;
833
- padding: 0;
834
- position: relative; }
835
- .block-help .block-help-item a:hover {
836
- color: #0e5c9e; }
837
- .block-help .block-help-item a::after {
838
- font-family: 'font_icons';
839
- content: "\e60e";
840
- font-size: .7em;
841
- bottom: .05em;
842
- padding-left: 10px;
843
- position: relative; }
844
- .block-help .block-help-item a i {
845
- margin: 3px 10px 11px 0;
846
- float: left; }
847
- .block-help .block-help-item a i.iconhelp-status {
848
- background-color: #2283c6;
849
- border-radius: 50%;
850
- display: inline-block;
851
- height: 12px;
852
- margin-top: -1px;
853
- padding: 6px;
854
- width: 12px;
855
- -webkit-transition: background-color .1s linear 0s;
856
- transition: background-color .1s linear 0s; }
857
- @media (min-width: 768px) {
858
- .block-help .block-help-item a i {
859
- margin-top: 4px; } }
860
- .block-help .block-help-item a:hover i.iconhelp-status {
861
- background-color: #0e5c9e; }
862
- .block-help .block-help-item a .iconhelp-status svg {
863
- display: block;
864
- height: 100%;
865
- width: 100%; }
866
- @media (min-width: 768px) {
867
- .block-help .block-help-item a {
868
- font-size: 22px; } }
869
- .block-help .block-help-item p {
870
- font-size: 14px;
871
- line-height: 25px;
872
- margin: 7px 0 14px;
873
- color: #333; }
874
- @media (min-width: 768px) {
875
- .block-help {
876
- padding: 85px 0 65px; } }
877
-
878
- /* block contact */
879
- .block-contact {
880
- color: #333;
881
- padding: 20px 0;
882
- margin: 0 auto;
883
- max-width: 600px;
884
- width: 80%; }
885
- @media screen and (min-width: 768px) {
886
- .block-contact {
887
- padding: 30px 0; } }
888
-
889
- .block-contact .send-error {
890
- color: red;
891
- text-align: center;
892
- margin-top: 5px;
893
- font-size: 14px;
894
- display: none;
895
- }
896
-
897
- .block-contact, .block-sent {
898
- height: 480px;
899
- }
900
-
901
- .block-sent {
902
- display: none;
903
- padding: 20px 0 40px;
904
- text-align: center; }
905
- .block-sent h2 {
906
- margin-bottom: 20px; }
907
- .block-sent p {
908
- font-size: 14px;
909
- }
910
- @media screen and (min-width: 768px) {
911
- .block-sent {
912
- padding: 30px 0 60px; } }
913
-
914
- .contact-form .form-control {
915
- font-size: 14px;
916
- height: 45px;
917
- margin-bottom: 10px; }
918
- @media screen and (min-width: 768px) {
919
- .contact-form .form-control {
920
- font-size: 16px;
921
- height: 50px; } }
922
-
923
- .contact-form textarea {
924
- resize: vertical;
925
- min-height: 160px; }
926
-
927
- .contact-form .btn-container {
928
- margin: 25px auto;
929
- text-align: center; }
930
- @media screen and (min-width: 768px) {
931
- .contact-form .btn-container {
932
- margin-top: 35px; } }
933
-
934
- /* LOADING */
935
- .btn.btn-loading {
936
- position: relative; }
937
- .btn.btn-loading .loader {
938
- display: block; }
939
- .btn.btn-loading .loader .spin-right {
940
- -webkit-animation: spinright 0.5s infinite linear;
941
- animation: spinright 0.5s infinite linear; }
942
- .btn.btn-loading .btn-text {
943
- opacity: 0; }
944
-
945
- .btn .loader {
946
- position: absolute;
947
- width: 100%;
948
- top: -30%;
949
- left: 0;
950
- display: none;
951
- z-index: 1;
952
- -webkit-animation: fadein 0.1s 1 linear;
953
- animation: fadein 0.1s 1 linear; }
954
-
955
- .btn .loader .ecwid-spinner {
956
- margin: 0 auto;
957
- height: 46px;
958
- width: 46px; }
959
- .btn .loader .ecwid-spinner svg {
960
- width: 100%;
961
- height: 100%;
962
- -webkit-transform: scale(1); }
963
-
964
- .btn.btn-large .loader .ecwid-spinner {
965
- height: 70px;
966
- width: 70px; }
967
-
968
- .btn.btn-medium .loader .ecwid-spinner {
969
- height: 56px;
970
- width: 56px; }
971
-
972
- .btn.btn-small .loader .ecwid-spinner {
973
- height: 40px;
974
- width: 40px; }
975
-
976
- @keyframes spinright {
977
- 0% {
978
- transform: rotate(0deg); }
979
- 100% {
980
- transform: rotate(360deg); } }
981
-
982
- @-webkit-keyframes spinright {
983
- 0% {
984
- -webkit-transform: rotate(0deg); }
985
- 100% {
986
- -webkit-transform: rotate(360deg); } }
987
-
988
- @keyframes fadein {
989
- 0% {
990
- opacity: 0; }
991
- 100% {
992
- opacity: 1; } }
993
-
994
- @-webkit-keyframes fadein {
995
- 0% {
996
- opacity: 0; }
997
- 100% {
998
- opacity: 1; } }
999
- /* form errors */
1000
-
1001
- .form-control.form-error {
1002
- border-color: #dc3232;
1003
- -webkit-box-shadow: 0 0 2px rgba( 204, 0, 0, 0.8 );
1004
- box-shadow: 0 0 2px rgba( 204, 0, 0, 0.8 );
1005
  }
1
+ @charset "UTF-8";
2
+ /*
3
+ Theme Name: Ecwid Help Portal
4
+ Theme URI: http: //help.ecwid.com
5
+ Description: Ecwid theme.
6
+ Version: 2.1
7
+ Author: ecwid.com
8
+ Author URI: http: //www.ecwid.com
9
+ */
10
+ /*------framework---------------------------------------------------------------------------------*/
11
+ html,
12
+ body {
13
+ font-family: 'Open Sans', sans-serif;
14
+ font-size: 16px;
15
+ line-height: 20px;
16
+ font-weight: 400;
17
+ text-rendering: optimizeLegibility;
18
+ margin: 0;
19
+ padding: 0;
20
+ background-color: #fff;
21
+ min-height: 100%;
22
+ min-width: 320px;
23
+ height: auto;
24
+ border: 0 none; }
25
+
26
+ body > audio,
27
+ body > audio * {
28
+ display: none !important;
29
+ position: absolute;
30
+ z-index: -100;
31
+ height: 0;
32
+ overflow: hidden; }
33
+
34
+ * {
35
+ outline: none !important;
36
+ -webkit-text-size-adjust: none; }
37
+
38
+ ul, ol, li {
39
+ margin: 0;
40
+ padding: 0; }
41
+
42
+ ul, ol {
43
+ list-style-position: inside; }
44
+
45
+ label {
46
+ cursor: pointer; }
47
+
48
+ .cf:before,
49
+ .cf:after {
50
+ content: " ";
51
+ display: table; }
52
+
53
+ .cf:after {
54
+ clear: both; }
55
+
56
+ wbr {
57
+ display: inline-block; }
58
+
59
+ .fr {
60
+ float: right; }
61
+
62
+ .fl {
63
+ float: left; }
64
+
65
+ .hidden {
66
+ display: none !important; }
67
+
68
+ form {
69
+ margin: 0; }
70
+
71
+ img,
72
+ svg {
73
+ border: 0 none; }
74
+
75
+ table {
76
+ border-collapse: collapse;
77
+ border-spacing: 0; }
78
+
79
+ table td {
80
+ padding: 0; }
81
+
82
+ /*------fonts.css-----------------------------------------------------------------------------*/
83
+ @font-face {
84
+ font-family: 'font_icons';
85
+ src: url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.eot?onn615");
86
+ src: url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.eot?#iefixonn615") format("embedded-opentype"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.woff?onn615") format("woff"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.ttf?onn615") format("truetype"), url("//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/css/fonts/fontIcons.svg?onn615#fontIcons") format("svg");
87
+ font-weight: normal;
88
+ font-style: normal; }
89
+
90
+ /* Help icon font */
91
+ @font-face {
92
+ font-family: 'iconhelp_font';
93
+ src: url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.eot?-s2892t");
94
+ src: url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.eot?#iefix-s2892t") format("embedded-opentype"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.woff?-s2892t") format("woff"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.ttf?-s2892t") format("truetype"), url("//dj925myfyz5v.cloudfront.net/widgets/help/fonts2_0/iconfont.svg?-s2892t#iconhelp_font") format("svg");
95
+ font-weight: normal;
96
+ font-style: normal; }
97
+
98
+ /*------typo.css------------------------------------------------------------------------------*/
99
+ h1,
100
+ h2,
101
+ h3,
102
+ h4,
103
+ h5,
104
+ h6 {
105
+ font-family: 'Open Sans', sans-serif;
106
+ font-weight: 400; }
107
+
108
+ h1 {
109
+ font-size: 36px; }
110
+
111
+ h2 {
112
+ font-size: 24px;
113
+ /*28px to 16px*/ }
114
+
115
+ h3 {
116
+ font-size: 18px;
117
+ /*22px to 16px*/ }
118
+
119
+ .muted {
120
+ color: #999; }
121
+
122
+ a {
123
+ color: #0064b8;
124
+ cursor: pointer;
125
+ text-decoration: none;
126
+ -webkit-transition: color .1s linear;
127
+ transition: color .1s linear; }
128
+
129
+ a:hover {
130
+ color: #369fe0; }
131
+
132
+ a:active {
133
+ color: #71c7f3; }
134
+
135
+ .ecwid-help a:focus {
136
+ outline: 0 none;
137
+ box-shadow: none; }
138
+
139
+ a.underlined {
140
+ text-decoration: underline; }
141
+
142
+ /*------icons.css-----------------------------------------------------------------------------*/
143
+ .ecwid-help [data-icon]:before {
144
+ content: attr(data-icon);
145
+ text-transform: none;
146
+ font-weight: normal;
147
+ font-variant: normal;
148
+ font-family: 'font_icons';
149
+ line-height: 1;
150
+ speak: none;
151
+ -webkit-font-smoothing: antialiased;
152
+ -moz-osx-font-smoothing: grayscale; }
153
+
154
+ .ecwid-help [class*="icon-"] {
155
+ display: inline-block;
156
+ text-transform: none;
157
+ font-weight: normal;
158
+ font-style: normal;
159
+ font-variant: normal;
160
+ font-family: 'font_icons';
161
+ line-height: 1;
162
+ speak: none;
163
+ cursor: pointer;
164
+ -webkit-font-smoothing: antialiased;
165
+ -moz-osx-font-smoothing: grayscale;
166
+ -webkit-transition: color .1s linear;
167
+ transition: color .1s linear; }
168
+
169
+ .ecwid-help [class^="iconhelp-"], [class*=" iconhelp-"] {
170
+ font-family: 'iconhelp_font';
171
+ speak: none;
172
+ font-style: normal;
173
+ font-weight: normal;
174
+ font-variant: normal;
175
+ text-transform: none;
176
+ line-height: 1;
177
+ -webkit-font-smoothing: antialiased;
178
+ -moz-osx-font-smoothing: grayscale; }
179
+
180
+ .icon-down:before {
181
+ content: "\e009"; }
182
+
183
+ .icon-arr-right:before {
184
+ content: "\e005"; }
185
+
186
+ .icon-search:before {
187
+ content: "\e001"; }
188
+
189
+ .iconhelp-users:before {
190
+ content: "\e60e"; }
191
+
192
+ .iconhelp-envelope:before {
193
+ content: "\e60f"; }
194
+
195
+ .iconhelp-arrow-down:before {
196
+ content: "\e610"; }
197
+
198
+ .iconhelp-book:before {
199
+ content: "\e611"; }
200
+
201
+ .iconhelp-search:before {
202
+ content: "\e60d"; }
203
+
204
+ .iconhelp-thumbs_down:before {
205
+ content: "\e60b"; }
206
+
207
+ .iconhelp-thumbs_up:before {
208
+ content: "\e60c"; }
209
+
210
+ .iconhelp-contents:before {
211
+ content: "\e60a"; }
212
+
213
+ .iconhelp-101:before {
214
+ content: "\e600"; }
215
+
216
+ .iconhelp-setup:before {
217
+ content: "\e601"; }
218
+
219
+ .iconhelp-manage:before {
220
+ content: "\e602"; }
221
+
222
+ .iconhelp-custom:before {
223
+ content: "\e603"; }
224
+
225
+ .iconhelp-api:before {
226
+ content: "\e604"; }
227
+
228
+ .iconhelp-billing:before {
229
+ content: "\e605"; }
230
+
231
+ .iconhelp-twitter:before {
232
+ content: "\e606"; }
233
+
234
+ .iconhelp-fb:before {
235
+ content: "\e607"; }
236
+
237
+ .iconhelp-bullet-on:before {
238
+ content: "\e608"; }
239
+
240
+ .iconhelp-bullet-off:before {
241
+ content: "\e609"; }
242
+
243
+ /*------buttons.css---------------------------------------------------------------------------*/
244
+ .btn {
245
+ font-size: 13px;
246
+ display: inline-block;
247
+ min-width: 30px;
248
+ margin: 0;
249
+ padding: 4px 10px;
250
+ border: 1px solid transparent;
251
+ border-radius: 4px;
252
+ background-color: #f1f1f1;
253
+ color: #666;
254
+ vertical-align: middle;
255
+ text-align: center;
256
+ line-height: 1.57em;
257
+ cursor: pointer;
258
+ outline: 0;
259
+ text-decoration: none;
260
+ font-family: 'Open Sans', sans-serif;
261
+ white-space: nowrap;
262
+ -moz-box-sizing: border-box;
263
+ box-sizing: border-box;
264
+ -webkit-transition: color .1s linear, background-color .1s linear, border-color .1s linear;
265
+ transition: color .1s linear, background-color .1s linear, border-color .1s linear; }
266
+ .btn:hover {
267
+ background-color: #e3e3e3;
268
+ color: #666; }
269
+ .btn:active {
270
+ background-color: #d4d4d4;
271
+ color: #666; }
272
+ .btn:focus {
273
+ border: 2px solid #aaa;
274
+ padding: 3px 9px; }
275
+
276
+ .btn-medium {
277
+ font-size: 18px;
278
+ /* 24px to 16px*/
279
+ padding: 4px 25px;
280
+ border-radius: 6px;
281
+ height: 40px;
282
+ line-height: 30px;
283
+ min-width: 100px; }
284
+
285
+ .btn-medium:focus {
286
+ padding: 3px 24px; }
287
+
288
+ .btn-large {
289
+ font-size: 24px;
290
+ padding: 0.167em 1.542em;
291
+ border-radius: 0.250em;
292
+ height: 2.500em;
293
+ line-height: 2.083em;
294
+ min-width: 120px; }
295
+
296
+ .btn-large:focus {
297
+ padding: 0.125em 1.500em; }
298
+
299
+ .btn-small {
300
+ font-size: .875em;
301
+ height: 2.143em;
302
+ padding: 0.286em 1.357em;
303
+ border-radius: .286em;
304
+ line-height: 1.570em;
305
+ min-width: 60px; }
306
+
307
+ .btn-small:focus {
308
+ padding: 0.214em 1.286em; }
309
+
310
+ .btn-tiny {
311
+ font-size: 0.750em;
312
+ height: 2.167em;
313
+ padding: 0.333em 1.333em;
314
+ border-radius: .333em;
315
+ line-height: 1.490em;
316
+ min-width: 52px; }
317
+
318
+ .btn-tiny:focus {
319
+ padding: .250em 1.250em; }
320
+
321
+ /* buttons' types */
322
+ .btn-default {
323
+ background-color: #fff;
324
+ color: #2283c6;
325
+ border-color: #81c1df; }
326
+
327
+ .btn-default:hover {
328
+ background-color: #81c1df;
329
+ color: #fff; }
330
+
331
+ .btn-default:active {
332
+ background-color: #9acde5;
333
+ color: #fff; }
334
+
335
+ .btn-default:focus {
336
+ border-color: #679ab2; }
337
+
338
+ .btn-orange {
339
+ background-color: #f49466;
340
+ color: #fff; }
341
+
342
+ .btn-orange:hover {
343
+ background-color: #f7ab84;
344
+ color: #fff; }
345
+
346
+ .btn-orange:active {
347
+ background-color: #da7a4c;
348
+ color: #fff; }
349
+
350
+ .btn-orange:focus {
351
+ border-color: #a0481f; }
352
+
353
+ .btn-aqua {
354
+ background-color: #4eaccb;
355
+ color: #fff; }
356
+ .btn-aqua svg {
357
+ fill: #4eaccb; }
358
+
359
+ .btn-aqua:hover {
360
+ background-color: #6ebfd8;
361
+ color: #fff; }
362
+
363
+ .btn-aqua:active {
364
+ background-color: #3492b1;
365
+ color: #fff; }
366
+
367
+ .btn-aqua:focus {
368
+ border-color: #4eaccb; }
369
+
370
+ .btn-blue {
371
+ background-color: #5196c7;
372
+ color: #fff; }
373
+
374
+ .btn-blue:hover {
375
+ background-color: #74abd2;
376
+ color: #fff; }
377
+
378
+ .btn-blue:active {
379
+ background-color: #41789f;
380
+ color: #fff; }
381
+
382
+ .btn-blue:focus {
383
+ border: 2px solid #39698b; }
384
+
385
+ .btn-upgrade,
386
+ a.btn-upgrade,
387
+ .article-content a.btn-upgrade {
388
+ margin: 0 5px;
389
+ vertical-align: bottom;
390
+ text-decoration: none; }
391
+
392
+ .form-control {
393
+ font-size: 13px;
394
+ display: inline-block;
395
+ height: 40px;
396
+ width: 100%;
397
+ padding: 4px 8px;
398
+ border: 1px solid #ddd;
399
+ border-radius: 3px;
400
+ background-color: #fff;
401
+ color: #333;
402
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
403
+ vertical-align: middle;
404
+ outline: 0;
405
+ -moz-box-sizing: border-box;
406
+ box-sizing: border-box;
407
+ -webkit-transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
408
+ transition: background-color 0.1s linear, color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
409
+ line-height: 28px;
410
+ font-family: 'Open Sans', sans-serif; }
411
+ .form-control::-moz-placeholder {
412
+ color: #606060;
413
+ opacity: .6; }
414
+ .form-control::-webkit-input-placeholder {
415
+ color: #606060;
416
+ opacity: .6; }
417
+ .form-control::-ms-input-placeholder {
418
+ color: #606060;
419
+ opacity: .6; }
420
+ .form-control:active, .form-control:focus {
421
+ border: 2px solid #0c92e3;
422
+ background-color: #fff;
423
+ box-shadow: 0 0 4px #d1eafa;
424
+ padding: 3px 7px;
425
+ outline: 0; }
426
+ .form-control.invalid {
427
+ border: 2px solid #fa5111;
428
+ padding: 3px 7px;
429
+ color: #cf3e07;
430
+ background-color: #ffeaea;
431
+ box-shadow: none;
432
+ -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
433
+ transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
434
+ .form-control.invalid:hover {
435
+ background-color: #fff; }
436
+ .form-control.invalid:focus {
437
+ background-color: #fff;
438
+ box-shadow: 0 0 4px #F5C0C0; }
439
+
440
+ .form-control.submitted {
441
+ opacity: .3;
442
+ -webkit-transition: opacity .3s linear;
443
+ transition: opacity .3s linear;
444
+ }
445
+
446
+ /* Input appends*/
447
+ .input-append,
448
+ .input-prepend {
449
+ position: relative; }
450
+ .input-append .btn,
451
+ .input-prepend .btn {
452
+ background-color: transparent;
453
+ border-color: transparent;
454
+ position: absolute;
455
+ top: 0;
456
+ height: 100%; }
457
+ .input-append .btn [class*="icon-"],
458
+ .input-prepend .btn [class*="icon-"] {
459
+ color: #aaa; }
460
+
461
+ .input-append .btn {
462
+ right: 0; }
463
+
464
+ .input-append .form-control {
465
+ padding-right: 36px; }
466
+ .input-append .form-control:focus {
467
+ padding-right: 35px; }
468
+
469
+ .input-prepend .btn {
470
+ left: 0; }
471
+
472
+ .input-prepend .form-control {
473
+ padding-left: 36px; }
474
+ .input-prepend .form-control:focus {
475
+ padding-left: 35px; }
476
+
477
+ textarea {
478
+ font-family: "Open Sans"; }
479
+
480
+ /*-------hds-search-----------------------------------------------------------------------------------*/
481
+ /* that fixes the right border being overla*/
482
+ .ecwid-help input {
483
+ margin: 0px;
484
+ }
485
+
486
+ .input-wrapper .hds-dropdown {
487
+ width: 100%;
488
+ position: absolute;
489
+ margin-top: 6px;
490
+ padding: 7px 0;
491
+ background-color: #fff;
492
+ border-radius: 6px;
493
+ border: 1px solid #dbdbdb;
494
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
495
+ z-index: 2;
496
+ display: none;
497
+ overflow: hidden;
498
+ -moz-box-sizing: border-box;
499
+ box-sizing: border-box; }
500
+ .input-wrapper .hds-dropdown .hds-suggest-link {
501
+ display: block;
502
+ font-size: 16px;
503
+ line-height: 20px;
504
+ padding: 15px 30px; }
505
+ .input-wrapper .hds-dropdown .hds-suggest-link.hovered {
506
+ color: white;
507
+ background-color: #82cdcf; }
508
+
509
+ .input-wrapper.opened .hds-dropdown {
510
+ display: block; }
511
+
512
+ .hds-loader {
513
+ position: absolute;
514
+ top: 10px;
515
+ right: 10px;
516
+ background: #fff url(//dj925myfyz5v.cloudfront.net/wp-content/themes/ecwid/images/ajax-loader.gif) center center no-repeat;
517
+ width: 20px;
518
+ height: 20px;
519
+ z-index: 2;
520
+ display: none;
521
+ box-shadow: -5px 0 6px #fff; }
522
+ @media (min-width: 768px) {
523
+ .hds-loader {
524
+ top: 20px;
525
+ right: 87px; } }
526
+
527
+ .hds-suggest-loading .hds-loader,
528
+ .hds-suggest-loaded.hds-suggest-loading .hds-loader,
529
+ .hds-loading .hds-loader {
530
+ display: block; }
531
+
532
+ .hds-suggest-loaded .hds-loader {
533
+ display: none; }
534
+
535
+ .hds-suggest-loaded .block-faq {
536
+ opacity: 0.3;
537
+ -webkit-transition: opacity .1s linear;
538
+ transition: opacity .1s linear; }
539
+
540
+ .main-container h2 {
541
+ font-size: 24px;
542
+ font-weight: 600;
543
+ line-height: 1.4;
544
+ text-align: center;
545
+ margin: 25px auto 35px; }
546
+ @media screen and (min-width: 768px) {
547
+ .main-container h2 {
548
+ font-size: 30px;
549
+ margin: 20px auto 20px; } }
550
+
551
+ /*------block-search-index----------------------------------------------------------------------------*/
552
+ .block-search-index {
553
+ background: #f4f4f4;
554
+ padding: 20px 0; }
555
+ .block-search-index .shortcuts {
556
+ padding: 25px 0 0;
557
+ text-align: center;
558
+ letter-spacing: -0.31em;
559
+ word-spacing: -0.43em;
560
+ max-width: 82%;
561
+ margin: 0 auto; }
562
+ .block-search-index .shortcuts > li {
563
+ letter-spacing: normal;
564
+ word-spacing: normal;
565
+ display: inline-block;
566
+ vertical-align: top;
567
+ padding: 0% 1% 40px;
568
+ width: 50%;
569
+ font-size: 16px;
570
+ -moz-box-sizing: border-box;
571
+ box-sizing: border-box; }
572
+ .block-search-index .shortcuts > li .shortcut-item {
573
+ color: #0058B0; }
574
+ .block-search-index .shortcuts > li .shortcut-item span {
575
+ display: block;
576
+ padding: 0 0 14px 0; }
577
+ .block-search-index .shortcuts > li .shortcut-item [class*='iconhelp-'] {
578
+ font-size: 44px;
579
+ color: #6FB1E3;
580
+ -webkit-transition: color .1s linear;
581
+ transition: color .1s linear; }
582
+ .block-search-index .shortcuts > li .shortcut-item:hover [class*='iconhelp-'] {
583
+ color: #0058B0; }
584
+ .block-search-index .shortcuts > li .shortcut-item span.shortcut-item-text {
585
+ margin: 0 auto;
586
+ max-width: 100px; }
587
+ @media (min-width: 550px) {
588
+ .block-search-index .shortcuts > li {
589
+ width: 33.3333%;
590
+ *width: 33.3023%; } }
591
+ @media (min-width: 768px) {
592
+ .block-search-index .shortcuts > li {
593
+ font-size: 14px;
594
+ padding: 1% 1% 0;
595
+ width: 16.6667%;
596
+ *width: 16.6357%;
597
+ letter-spacing: normal;
598
+ word-spacing: normal; } }
599
+ @media (min-width: 960px) {
600
+ .block-search-index .shortcuts > li {
601
+ font-size: 16px; } }
602
+ @media (min-width: 768px) {
603
+ .block-search-index .shortcuts {
604
+ max-width: 1000px; } }
605
+ @media (min-width: 1280px) {
606
+ .block-search-index .shortcuts {
607
+ padding: 30px 0 0; } }
608
+ @media (min-width: 768px) {
609
+ .block-search-index {
610
+ padding: 30px 0; } }
611
+
612
+ /*-------------block-search-------------------------------------------------*/
613
+ .block-search {
614
+ /* testing */ }
615
+ .block-search .hds-container .hds-wrapper {
616
+ max-width: 740px;
617
+ margin: 0 auto;
618
+ width: 87%; }
619
+ .block-search .hds-container .input-wrapper .btn [class*="icon-"] {
620
+ color: #aaa;
621
+ font-size: 16px;
622
+ vertical-align: top;
623
+ margin-top: 3px; }
624
+ .block-search .hds-container .form-control {
625
+ border-radius: 6px;
626
+ box-shadow: none;
627
+ border-color: #d2d2d2; }
628
+ .block-search .hds-container .form-control:focus {
629
+ border: 2px solid #005694;
630
+ background-color: #fff;
631
+ outline: 0; }
632
+ @media (min-width: 768px) {
633
+ .block-search .hds-container .form-control {
634
+ height: 55px;
635
+ padding: 3px 237px 3px 20px;
636
+ font-size: 20px; }
637
+ .block-search .hds-container .form-control:focus {
638
+ padding: 2px 236px 2px 19px; } }
639
+
640
+ @media (min-width: 768px) {
641
+ .block-search .hds-container .btn {
642
+ height: 45px;
643
+ margin: 0 !important;
644
+ min-width: 70px;
645
+ background: #4eaccb;
646
+ border-radius: 4px;
647
+ top: 5px;
648
+ right: 7px;
649
+ left: auto; }
650
+ .block-search .hds-container .btn:hover, .block-search .hds-container .btn:focus:hover {
651
+ background: #6ebfd8; }
652
+ .block-search .hds-container .input-wrapper .btn:focus {
653
+ border: 2px solid #0c5c77; }
654
+ .block-search .hds-container .input-wrapper .btn [class*="icon-"] {
655
+ display: none; }
656
+ .block-search .hds-container .input-wrapper .btn .btn-text {
657
+ font-size: 16px;
658
+ display: inline-block; } }
659
+ @media screen and (min-width: 1024px) {
660
+ .block-search .hds-container .hds-wrapper {
661
+ width: 50%; } }
662
+ .block-search .link-container {
663
+ font-size: 18px;
664
+ color: #9cc5e4;
665
+ text-align: center;
666
+ margin: 25px 0; }
667
+ .block-search .link-container a {
668
+ color: #fff;
669
+ display: inline-block;
670
+ margin-top: 20px; }
671
+ .block-search .link-container a > span {
672
+ font-size: 12px; }
673
+ .block-search .hds-wrapper .btn .btn-text {
674
+ color: #fff;
675
+ display: none; }
676
+
677
+ /*------block-faq----------------------------------------------------------------------------*/
678
+ .block-faq {
679
+ background-color: #fff;
680
+ padding: 20px 0; }
681
+ .block-faq .index-article {
682
+ list-style-type: none;
683
+ padding: 13px 11px 23px;
684
+ position: relative; }
685
+ .block-faq .index-article a {
686
+ font-size: 16px;
687
+ color: #333;
688
+ padding: 0 0 0 25px;
689
+ line-height: 1.36;
690
+ position: relative;
691
+ display: block; }
692
+ .block-faq .index-article a:hover {
693
+ color: #0e5c9e; }
694
+ .block-faq .index-article a i {
695
+ position: absolute;
696
+ font-size: 5px;
697
+ top: 8px;
698
+ left: 4px;
699
+ color: #1a8bdc; }
700
+ @media (min-width: 768px) {
701
+ .block-faq .index-article a i {
702
+ top: 12px; } }
703
+ @media (min-width: 768px) {
704
+ .block-faq .index-article a {
705
+ font-size: 18px; } }
706
+ .block-faq .index-article.active {
707
+ background: #F3F3F3; }
708
+ .block-faq .index-article-body {
709
+ display: none;
710
+ font-size: 14px;
711
+ line-height: 22px;
712
+ margin: 10px 26px 0;
713
+ color: #333;
714
+ font-weight: 300; }
715
+ .block-faq .index-article-body h2 {
716
+ font-size: 16px;
717
+ margin: 20px 0 10px; }
718
+ @media screen and (min-width: 768px) {
719
+ .block-faq .index-article-body h2 {
720
+ font-size: 20px; } }
721
+ .block-faq .index-article-body ul li:before {
722
+ color: #999;
723
+ content: "•";
724
+ left: -10px;
725
+ position: relative; }
726
+ .block-faq .index-article-body a:hover {
727
+ color: #369fe0; }
728
+ .block-faq .index-article-body ul {
729
+ list-style-type: none;
730
+ margin-left: 18px; }
731
+ .block-faq .index-article-body li {
732
+ margin-left: 6px;
733
+ text-indent: -6px; }
734
+ .block-faq .index-article-body span {
735
+ font-size: 14px !important; }
736
+ .block-faq .index-article-body img {
737
+ display: block;
738
+ margin: 10px auto; }
739
+ @media screen and (min-width: 768px) {
740
+ .block-faq .index-article-body img {
741
+ float: left;
742
+ margin: 0 20px 20px 0;
743
+ max-width: 50%; } }
744
+ .block-faq .index-article.active .index-article-body {
745
+ display: block; }
746
+ .block-faq .index-article .index-article-body a {
747
+ font-size: 14px;
748
+ font-weight: 300;
749
+ line-height: 22px;
750
+ display: inline;
751
+ color: #035AA0;
752
+ margin: 0;
753
+ padding: 0;
754
+ text-indent: 0;
755
+ text-decoration: underline;
756
+ word-break: normal; }
757
+ @media (min-width: 768px) {
758
+ .block-faq {
759
+ padding: 30px 0; } }
760
+
761
+ .block-faq-wrap {
762
+ margin: 0 auto;
763
+ width: 80%; }
764
+ @media screen and (min-width: 768px) {
765
+ .block-faq-wrap {
766
+ max-width: 1150px;
767
+ width: 100%; } }
768
+
769
+ .block-faq-list {
770
+ box-sizing: border-box;
771
+ display: inline-block;
772
+ padding-left: 0;
773
+ vertical-align: top; }
774
+ .block-faq-list .index-article {
775
+ box-sizing: border-box;
776
+ display: block;
777
+ width: 100%; }
778
+ .block-faq-list .index-article--hidden {
779
+ display: none; }
780
+ @media screen and (min-width: 768px) {
781
+ .block-faq-list {
782
+ padding-left: 60px;
783
+ width: 49%; } }
784
+
785
+ /*------block-all-topics----------------------------------------------------------------------*/
786
+ .block-topics-link {
787
+ margin-top: 35px;
788
+ padding: 3px 0 40px;
789
+ text-align: center; }
790
+ .block-topics-link a {
791
+ font-size: 18px; }
792
+ .block-topics-link a [class*="icon-"] {
793
+ font-size: 16px;
794
+ vertical-align: top;
795
+ margin-top: 3px; }
796
+ @media (min-width: 1024px) {
797
+ .block-topics-link {
798
+ padding: 0 0 50px; } }
799
+
800
+ /*------block-help----------------------------------------------------------------------------*/
801
+ .block-help {
802
+ background-color: #f4f4f4;
803
+ padding: 45px 0 25px; }
804
+ .block-help ul {
805
+ list-style: none;
806
+ overflow: hidden;
807
+ max-width: 1150px;
808
+ margin: 0 auto;
809
+ width: 80%; }
810
+ .block-help ul > li {
811
+ box-sizing: border-box;
812
+ -moz-box-sizing: border-box;
813
+ display: inline-block;
814
+ letter-spacing: normal;
815
+ list-style: none;
816
+ padding: 0 11px 20px;
817
+ text-align: left;
818
+ vertical-align: top;
819
+ width: 100%;
820
+ word-spacing: normal; }
821
+ @media (min-width: 768px) {
822
+ .block-help ul > li {
823
+ width: 49%;
824
+ padding-left: 85px; } }
825
+ @media (min-width: 768px) {
826
+ .block-help ul {
827
+ width: 100%; } }
828
+ .block-help .block-help-item a {
829
+ text-transform: uppercase;
830
+ font-size: 18px;
831
+ line-height: 1.333em;
832
+ color: #2283c6;
833
+ padding: 0;
834
+ position: relative; }
835
+ .block-help .block-help-item a:hover {
836
+ color: #0e5c9e; }
837
+ .block-help .block-help-item a::after {
838
+ font-family: 'font_icons';
839
+ content: "\e60e";
840
+ font-size: .7em;
841
+ bottom: .05em;
842
+ padding-left: 10px;
843
+ position: relative; }
844
+ .block-help .block-help-item a i {
845
+ margin: 3px 10px 11px 0;
846
+ float: left; }
847
+ .block-help .block-help-item a i.iconhelp-status {
848
+ background-color: #2283c6;
849
+ border-radius: 50%;
850
+ display: inline-block;
851
+ height: 12px;
852
+ margin-top: -1px;
853
+ padding: 6px;
854
+ width: 12px;
855
+ -webkit-transition: background-color .1s linear 0s;
856
+ transition: background-color .1s linear 0s; }
857
+ @media (min-width: 768px) {
858
+ .block-help .block-help-item a i {
859
+ margin-top: 4px; } }
860
+ .block-help .block-help-item a:hover i.iconhelp-status {
861
+ background-color: #0e5c9e; }
862
+ .block-help .block-help-item a .iconhelp-status svg {
863
+ display: block;
864
+ height: 100%;
865
+ width: 100%; }
866
+ @media (min-width: 768px) {
867
+ .block-help .block-help-item a {
868
+ font-size: 22px; } }
869
+ .block-help .block-help-item p {
870
+ font-size: 14px;
871
+ line-height: 25px;
872
+ margin: 7px 0 14px;
873
+ color: #333; }
874
+ @media (min-width: 768px) {
875
+ .block-help {
876
+ padding: 85px 0 65px; } }
877
+
878
+ /* block contact */
879
+ .block-contact {
880
+ color: #333;
881
+ padding: 20px 0;
882
+ margin: 0 auto;
883
+ max-width: 600px;
884
+ width: 80%; }
885
+ @media screen and (min-width: 768px) {
886
+ .block-contact {
887
+ padding: 30px 0; } }
888
+
889
+ .block-contact .send-error {
890
+ color: red;
891
+ text-align: center;
892
+ margin-top: 5px;
893
+ font-size: 14px;
894
+ display: none;
895
+ }
896
+
897
+ .block-contact, .block-sent {
898
+ height: 480px;
899
+ }
900
+
901
+ .block-sent {
902
+ display: none;
903
+ padding: 20px 0 40px;
904
+ text-align: center; }
905
+ .block-sent h2 {
906
+ margin-bottom: 20px; }
907
+ .block-sent p {
908
+ font-size: 14px;
909
+ }
910
+ @media screen and (min-width: 768px) {
911
+ .block-sent {
912
+ padding: 30px 0 60px; } }
913
+
914
+ .contact-form .form-control {
915
+ font-size: 14px;
916
+ height: 45px;
917
+ margin-bottom: 10px; }
918
+ @media screen and (min-width: 768px) {
919
+ .contact-form .form-control {
920
+ font-size: 16px;
921
+ height: 50px; } }
922
+
923
+ .contact-form textarea {
924
+ resize: vertical;
925
+ min-height: 160px; }
926
+
927
+ .contact-form .btn-container {
928
+ margin: 25px auto;
929
+ text-align: center; }
930
+ @media screen and (min-width: 768px) {
931
+ .contact-form .btn-container {
932
+ margin-top: 35px; } }
933
+
934
+ /* LOADING */
935
+ .btn.btn-loading {
936
+ position: relative; }
937
+ .btn.btn-loading .loader {
938
+ display: block; }
939
+ .btn.btn-loading .loader .spin-right {
940
+ -webkit-animation: spinright 0.5s infinite linear;
941
+ animation: spinright 0.5s infinite linear; }
942
+ .btn.btn-loading .btn-text {
943
+ opacity: 0; }
944
+
945
+ .btn .loader {
946
+ position: absolute;
947
+ width: 100%;
948
+ top: -30%;
949
+ left: 0;
950
+ display: none;
951
+ z-index: 1;
952
+ -webkit-animation: fadein 0.1s 1 linear;
953
+ animation: fadein 0.1s 1 linear; }
954
+
955
+ .btn .loader .ecwid-spinner {
956
+ margin: 0 auto;
957
+ height: 46px;
958
+ width: 46px; }
959
+ .btn .loader .ecwid-spinner svg {
960
+ width: 100%;
961
+ height: 100%;
962
+ -webkit-transform: scale(1); }
963
+
964
+ .btn.btn-large .loader .ecwid-spinner {
965
+ height: 70px;
966
+ width: 70px; }
967
+
968
+ .btn.btn-medium .loader .ecwid-spinner {
969
+ height: 56px;
970
+ width: 56px; }
971
+
972
+ .btn.btn-small .loader .ecwid-spinner {
973
+ height: 40px;
974
+ width: 40px; }
975
+
976
+ @keyframes spinright {
977
+ 0% {
978
+ transform: rotate(0deg); }
979
+ 100% {
980
+ transform: rotate(360deg); } }
981
+
982
+ @-webkit-keyframes spinright {
983
+ 0% {
984
+ -webkit-transform: rotate(0deg); }
985
+ 100% {
986
+ -webkit-transform: rotate(360deg); } }
987
+
988
+ @keyframes fadein {
989
+ 0% {
990
+ opacity: 0; }
991
+ 100% {
992
+ opacity: 1; } }
993
+
994
+ @-webkit-keyframes fadein {
995
+ 0% {
996
+ opacity: 0; }
997
+ 100% {
998
+ opacity: 1; } }
999
+ /* form errors */
1000
+
1001
+ .form-control.form-error {
1002
+ border-color: #dc3232;
1003
+ -webkit-box-shadow: 0 0 2px rgba( 204, 0, 0, 0.8 );
1004
+ box-shadow: 0 0 2px rgba( 204, 0, 0, 0.8 );
1005
  }
css/landing.css CHANGED
@@ -1,1331 +1,1331 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- * v2.0 | 20110126
3
- * License: none (public domain) */
4
- html, body, div, span, applet, object, iframe,
5
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
- a, abbr, acronym, address, big, cite, code,
7
- del, dfn, em, img, ins, kbd, q, s, samp,
8
- small, strike, strong, sub, sup, tt, var,
9
- b, u, i, center,
10
- dl, dt, dd, ol, ul, li,
11
- fieldset, form, label, legend,
12
- table, caption, tbody, tfoot, thead, tr, th, td,
13
- article, aside, canvas, details, embed,
14
- figure, figcaption, footer, header, hgroup,
15
- menu, nav, output, ruby, section, summary,
16
- time, mark, audio, video, button {
17
- margin: 0;
18
- padding: 0;
19
- border: 0;
20
- font-size: 100%;
21
- font: inherit;
22
- box-sizing: border-box;
23
- vertical-align: baseline; }
24
-
25
- /* HTML5 display-role reset for older browsers */
26
- article, aside, details, figcaption, figure,
27
- footer, header, hgroup, menu, nav, section {
28
- display: block; }
29
-
30
- body {
31
- line-height: 1; }
32
-
33
- ol, ul {
34
- list-style: none; }
35
-
36
- blockquote, q {
37
- quotes: none; }
38
-
39
- blockquote:before, blockquote:after,
40
- q:before, q:after {
41
- content: "";
42
- content: none; }
43
-
44
- table {
45
- border-collapse: collapse;
46
- border-spacing: 0; }
47
-
48
- body {
49
- font-family: "Open sans", sans-serif;
50
- font-weight: 400;
51
- color: #363636;
52
- min-width: 320px; }
53
-
54
- .ecwid-thank {
55
- padding-top: 36px; }
56
- .ecwid-thank h1 {
57
- text-align: center;
58
- font-size: 34px;
59
- color: #000000;
60
- line-height: 1.4;
61
- margin-bottom: 30px; }
62
- @media (max-width: 767px) {
63
- .ecwid-thank h1 {
64
- font-size: 22px;
65
- max-width: 490px;
66
- padding: 0 2%;
67
- margin: 0 auto 15px; }
68
- .ecwid-thank h1 br {
69
- display: none; } }
70
- @media (max-width: 500px) {
71
- .ecwid-thank h1 {
72
- max-width: 320px; } }
73
- .ecwid-thank h1 span {
74
- display: block;
75
- font-size: 14px;
76
- text-align: left;
77
- max-width: 500px;
78
- margin: 14px auto; }
79
-
80
- .ecwid-thank-steps {
81
- margin: 0 auto 51px;
82
- max-width: 1000px; }
83
- @media (max-width: 767px) {
84
- .ecwid-thank-steps {
85
- max-width: 450px;
86
- margin-bottom: 0;
87
- padding: 0 2%; } }
88
- .ecwid-thank-steps:after {
89
- content: "";
90
- display: table;
91
- clear: both; }
92
-
93
- .ecwid-thank-step {
94
- text-align: center;
95
- width: 33.33333%;
96
- float: left;
97
- position: relative;
98
- padding: 0 2%; }
99
- .ecwid-thank-step.active .ecwid-thank-step-image:before {
100
- position: absolute;
101
- content: url("../images/landing/correct.svg");
102
- width: 17px;
103
- left: 61%; }
104
- .ecwid-thank-step.active .ecwid-thank-step-image img.none-active {
105
- display: none; }
106
- .ecwid-thank-step.active .ecwid-thank-step-image img.active {
107
- display: inline-block; }
108
- @media (max-width: 767px) {
109
- .ecwid-thank-step {
110
- display: none; } }
111
- .ecwid-thank-step .ecwid-thank-step-image {
112
- height: 92px;
113
- position: relative; }
114
- .ecwid-thank-step .ecwid-thank-step-image:after {
115
- content: "";
116
- position: absolute;
117
- overflow: hidden; }
118
- @media (min-width: 768px) {
119
- .ecwid-thank-step .ecwid-thank-step-image:after {
120
- top: 40px;
121
- left: 77%;
122
- width: 64%;
123
- height: 7px;
124
- background: url("../images/landing/arrow.png") center right; } }
125
- .ecwid-thank-step img {
126
- margin: 3px 0 10px; }
127
- .ecwid-thank-step img.active {
128
- display: none; }
129
- .ecwid-thank-step h2 {
130
- font-size: 18px;
131
- line-height: 1.5;
132
- margin-bottom: 6px; }
133
- .ecwid-thank-step p {
134
- font-size: 14px;
135
- line-height: 1.5; }
136
- .ecwid-thank-step.ecwid-thank-step-one img {
137
- height: 77px; }
138
- .ecwid-thank-step.ecwid-thank-step-two img {
139
- height: 60px;
140
- margin-top: 13px; }
141
- .ecwid-thank-step.ecwid-thank-step-three .ecwid-thank-step-image:after {
142
- display: none; }
143
- .ecwid-thank-step.ecwid-thank-step-three h2 {
144
- font-weight: 600; }
145
- .ecwid-thank-step.ecwid-thank-step-three img {
146
- height: 82px; }
147
-
148
- .ecwid-thank-background {
149
- background: url("../images/landing/background-think.jpg");
150
- background-size: cover; }
151
- @media (min-width: 768px) {
152
- .ecwid-thank-background {
153
- background-position: center bottom; } }
154
- @media (min-width: 1440px) {
155
- .ecwid-thank-background {
156
- background-position: left bottom; } }
157
- .ecwid-thank-background .ecwid-thank-background-tablet {
158
- padding: 52px 5% 0; }
159
- .ecwid-thank-background .ecwid-thank-background-tablet img {
160
- display: block;
161
- margin: 0 auto;
162
- max-width: 100%; }
163
-
164
- .ecwid-description {
165
- padding: 0 2%; }
166
- .ecwid-description:after {
167
- content: "";
168
- display: table;
169
- clear: both; }
170
-
171
- .ecwid-description-inner {
172
- max-width: 930px;
173
- margin: 0 auto;
174
- table-layout: fixed;
175
- width: 100%; }
176
- @media (min-width: 768px) {
177
- .ecwid-description-inner {
178
- display: table;
179
- padding-top: 35px; } }
180
- @media (min-width: 992px) {
181
- .ecwid-description-inner {
182
- padding-top: 95px; } }
183
- @media (max-width: 767px) {
184
- .ecwid-description-inner {
185
- display: -webkit-flex;
186
- display: -ms-flexbox;
187
- display: flex;
188
- -webkit-flex-direction: column-reverse;
189
- -ms-flex-direction: column-reverse;
190
- flex-direction: column-reverse; } }
191
-
192
- .ecwid-description-image {
193
- padding-right: 5%;
194
- vertical-align: bottom; }
195
- @media (min-width: 768px) {
196
- .ecwid-description-image {
197
- display: table-cell;
198
- width: 60%; } }
199
- @media (min-width: 992px) {
200
- .ecwid-description-image {
201
- width: 65%; } }
202
- @media (max-width: 767px) {
203
- .ecwid-description-image {
204
- width: 100%;
205
- padding: 0 4%; } }
206
- .ecwid-description-image img {
207
- display: block;
208
- max-width: 100%; }
209
- @media (max-width: 767px) {
210
- .ecwid-description-image img {
211
- margin: 0 auto; } }
212
-
213
- .ecwid-description-text {
214
- padding-top: 35px;
215
- padding-bottom: 35px; }
216
- @media (min-width: 768px) {
217
- .ecwid-description-text {
218
- width: 40%;
219
- display: table-cell;
220
- vertical-align: middle; } }
221
- @media (min-width: 992px) {
222
- .ecwid-description-text {
223
- width: 35%;
224
- vertical-align: baseline; } }
225
- @media (max-width: 767px) {
226
- .ecwid-description-text {
227
- padding: 44px 4% 0;
228
- max-width: 500px;
229
- margin: 0 auto 50px;
230
- width: 100%; } }
231
- .ecwid-description-text h2 {
232
- line-height: 1.2;
233
- margin-bottom: 18px; }
234
- @media (min-width: 768px) {
235
- .ecwid-description-text h2 {
236
- font-size: 24px; } }
237
- @media (min-width: 992px) {
238
- .ecwid-description-text h2 {
239
- font-size: 28px; } }
240
- @media (max-width: 767px) {
241
- .ecwid-description-text h2 {
242
- font-size: 22px;
243
- text-align: center; } }
244
- .ecwid-description-text p {
245
- font-size: 14px;
246
- line-height: 1.5;
247
- padding: 0.8em 0; }
248
-
249
- .ecwid-features {
250
- background-color: #F4F4F4;
251
- padding: 44px 0 60px; }
252
- @media (max-width: 767px) {
253
- .ecwid-features {
254
- padding-bottom: 9px; } }
255
- .ecwid-features h2 {
256
- font-size: 28px;
257
- color: #1F1F1F;
258
- font-weight: 400;
259
- text-align: center;
260
- margin-bottom: 62px; }
261
- @media (max-width: 767px) {
262
- .ecwid-features h2 {
263
- font-size: 22px;
264
- margin-bottom: 40px; } }
265
-
266
- .ecwid-features-inner {
267
- margin: 0 auto;
268
- max-width: 930px;
269
- padding: 0 3%; }
270
-
271
- .ecwid-features-top {
272
- margin-bottom: 70px; }
273
- @media (max-width: 767px) {
274
- .ecwid-features-top {
275
- margin-bottom: 0; } }
276
- .ecwid-features-top:after {
277
- content: "";
278
- display: table;
279
- clear: both; }
280
- .ecwid-features-top .ecwid-features-top-item {
281
- width: 50%;
282
- float: left;
283
- text-align: center; }
284
- @media (max-width: 767px) {
285
- .ecwid-features-top .ecwid-features-top-item {
286
- padding: 0 2%;
287
- width: 100%;
288
- max-width: 320px;
289
- margin: 0 auto 35px;
290
- float: none; } }
291
- .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
292
- height: 82px; }
293
- @media (max-width: 767px) {
294
- .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
295
- height: 75px; } }
296
- .ecwid-features-top .ecwid-features-top-item img {
297
- height: 61px;
298
- margin-bottom: 36px; }
299
- @media (max-width: 767px) {
300
- .ecwid-features-top .ecwid-features-top-item img {
301
- margin-bottom: 20px; } }
302
- .ecwid-features-top .ecwid-features-top-item img.gift {
303
- height: 80px;
304
- margin-top: -10px; }
305
- .ecwid-features-top .ecwid-features-top-item h3 {
306
- font-size: 21px;
307
- font-weight: 600;
308
- margin-bottom: 15px; }
309
- @media (max-width: 767px) {
310
- .ecwid-features-top .ecwid-features-top-item h3 {
311
- font-size: 18px;
312
- margin-bottom: 6px; } }
313
- .ecwid-features-top .ecwid-features-top-item p {
314
- font-size: 14px;
315
- line-height: 1.45; }
316
- @media (max-width: 767px) {
317
- .ecwid-features-top .ecwid-features-top-item p {
318
- font-size: 13px; } }
319
-
320
- .ecwid-features-bottom:after {
321
- content: "";
322
- display: table;
323
- clear: both; }
324
- .ecwid-features-bottom .ecwid-features-bottom-item {
325
- width: 33.33333%;
326
- float: left;
327
- text-align: center; }
328
- @media (max-width: 767px) {
329
- .ecwid-features-bottom .ecwid-features-bottom-item {
330
- float: none;
331
- width: 100%;
332
- max-width: 270px;
333
- margin: 0 auto 35px; } }
334
- .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
335
- height: 82px; }
336
- @media (max-width: 767px) {
337
- .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
338
- height: 75px; } }
339
- .ecwid-features-bottom .ecwid-features-bottom-item img {
340
- height: 63px;
341
- margin-bottom: 17px; }
342
- .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
343
- height: 67px; }
344
- @media (min-width: 768px) {
345
- .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
346
- margin-top: -8px; } }
347
- .ecwid-features-bottom .ecwid-features-bottom-item h3 {
348
- font-size: 18px;
349
- font-weight: 600;
350
- margin-bottom: 6px; }
351
- .ecwid-features-bottom .ecwid-features-bottom-item p {
352
- font-size: 14px;
353
- line-height: 1.45; }
354
- @media (max-width: 767px) {
355
- .ecwid-features-bottom .ecwid-features-bottom-item p {
356
- font-size: 13px; }
357
- .ecwid-features-bottom .ecwid-features-bottom-item p br {
358
- display: none; } }
359
-
360
- .ecwid-start {
361
- text-align: center;
362
- padding: 64px 0 194px; }
363
- @media (max-width: 767px) {
364
- .ecwid-start {
365
- padding: 44px 0 64px; }
366
- .ecwid-start .ecwid-button .button {
367
- margin-bottom: 29px; } }
368
- .ecwid-start:after {
369
- content: "";
370
- display: table;
371
- clear: both; }
372
- .ecwid-start h2 {
373
- font-size: 28px;
374
- line-height: 1.4;
375
- margin-bottom: 32px; }
376
- @media (max-width: 767px) {
377
- .ecwid-start h2 {
378
- font-size: 22px;
379
- padding: 0 2%;
380
- margin-bottom: 1px; } }
381
-
382
- .ecwid-button {
383
- text-align: center; }
384
- .ecwid-button a,
385
- .ecwid-button button {
386
- background-image: none; }
387
- .ecwid-button .button {
388
- border-radius: 4px;
389
- border: 0;
390
- font-size: 20px;
391
- color: #ffffff;
392
- line-height: 2.6;
393
- letter-spacing: 0.01em;
394
- padding: 0.12em 1.5em;
395
- margin-bottom: 46px;
396
- outline: none;
397
- cursor: pointer; }
398
- @media (max-width: 767px) {
399
- .ecwid-button .button {
400
- font-size: 18px;
401
- margin-top: 25px;
402
- margin-bottom: 14px;
403
- padding: 0.12em 1em; } }
404
- @media (max-width: 500px) {
405
- .ecwid-button .button {
406
- font-size: 16px; } }
407
- .ecwid-button .button:hover {
408
- opacity: 0.8; }
409
- .ecwid-button .button.button--blue {
410
- background-color: #189DEE; }
411
- .ecwid-button .button.button--green {
412
- background-color: #59BB00; }
413
- .ecwid-button .button-description-mobile {
414
- font-size: 12px;
415
- line-height: 1.5;
416
- margin-bottom: 38px;
417
- color: #999; }
418
- .ecwid-button .button-description-mobile h3 {
419
- font-size: 18px;
420
- color: #363636;
421
- font-weight: 600;
422
- margin-bottom: -70px; }
423
- @media (min-width: 768px) {
424
- .ecwid-button .button-description-mobile {
425
- display: none; } }
426
- .ecwid-button .ecwid-button-description {
427
- font-size: 14px; }
428
- .ecwid-button .ecwid-button-description a {
429
- display: block;
430
- font-size: 20px;
431
- color: #288FB5;
432
- margin-top: 12px;
433
- text-decoration: none; }
434
- .ecwid-button .ecwid-button-description a:hover {
435
- opacity: 0.8; }
436
- @media (max-width: 767px) {
437
- .ecwid-button .ecwid-button-description a {
438
- margin-bottom: 10px;
439
- font-size: 18px; } }
440
-
441
-
442
- /*
443
- * Adapt landing to wordpress actual environment
444
- */
445
- .ecwid-button .button {
446
- height: auto;
447
- }
448
-
449
- #wpcontent {
450
- padding-left: 0px;
451
- }
452
- .ecwid-landing {
453
- background: white;
454
- }
455
- ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu>li.current>a.current:after
456
- {
457
- border-right-color:white;
458
- }
459
-
460
- .ecwid-landing .on-error {
461
- display: none;
462
- }
463
-
464
- .ecwid-landing.conn-error .on-error {
465
- display: inherit;
466
- }
467
-
468
- .ecwid-landing.conn-error .on-no-error {
469
- display: none;
470
- }
471
-
472
- .ecwid-button .ecwid-connection-error {
473
- color: red;
474
- }
475
-
476
- @media (min-width: 768px) {
477
- .ecwid-button .ecwid-connection-error {
478
- position: relative;
479
- margin-bottom: 8px;
480
- }
481
- }
482
-
483
- .ecwid-landing a:focus {
484
- outline: 0px none;
485
- box-shadow: none;
486
- }
487
-
488
- .ecwid-landing .button:hover {
489
- color: white;
490
- }
491
-
492
- .ecwid-landing .ecwid-button .btn {
493
- width: 300px;
494
- margin-bottom: 40px;
495
- height: 59px;
496
- font-size: 20px;
497
- }
498
-
499
- .ecwid-button .create-store-loading,
500
- .ecwid-button .create-store-loading-note,
501
- .ecwid-button .create-store-success-note,
502
- .ecwid-button .create-store-success {
503
- display: none;
504
- }
505
-
506
- .ecwid-button .create-store-loading-note,
507
- .ecwid-button .create-store-success-note
508
- {
509
- margin-top: -20px;
510
- margin-bottom: 32px;
511
- }
512
-
513
-
514
- /* loose copy of ecwid css framework */
515
-
516
- @import url('//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300&subset=latin,latin-ext,cyrillic');
517
-
518
- .btn {
519
- font-family: 'Open Sans';
520
- }
521
-
522
- @keyframes spinleft {
523
- 0% {
524
- transform: rotate(360deg); }
525
-
526
- 100% {
527
- transform: rotate(0deg); } }
528
-
529
- @-webkit-keyframes spinleft {
530
- 0% {
531
- -webkit-transform: rotate(360deg); }
532
-
533
- 100% {
534
- -webkit-transform: rotate(0deg); } }
535
-
536
- @keyframes spinright {
537
- 0% {
538
- transform: rotate(0deg); }
539
-
540
- 100% {
541
- transform: rotate(360deg); } }
542
-
543
- @-webkit-keyframes spinright {
544
- 0% {
545
- -webkit-transform: rotate(0deg); }
546
-
547
- 100% {
548
- -webkit-transform: rotate(360deg); } }
549
-
550
- /* Iconic font */
551
- @font-face {
552
- font-family: 'font_icons';
553
- src: url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.eot');
554
- src: url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.eot?#iefix') format('embedded-opentype'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.ttf') format('truetype'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.woff') format('woff'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.svg#icomoon') format('svg');
555
- font-weight: normal;
556
- font-style: normal; }
557
-
558
- .ecwid-button [class*="icon-"] {
559
- display: inline-block;
560
- text-transform: none;
561
- font-weight: normal;
562
- font-style: normal;
563
- font-variant: normal;
564
- font-family: 'font_icons';
565
- line-height: 1;
566
- speak: none;
567
- -webkit-font-smoothing: antialiased;
568
- -moz-osx-font-smoothing: grayscale;
569
- -webkit-transition: color .1s linear;
570
- transition: color .1s linear; }
571
-
572
- .icon-odn:before {
573
- content: "\e639"; }
574
-
575
- .icon-vk:before {
576
- content: "\e63a"; }
577
-
578
- .icon-customer_groups:before {
579
- content: "\e62e"; }
580
-
581
- .icon-unfinished:before {
582
- content: "\e62d"; }
583
-
584
- .icon-table_cake:before {
585
- content: "\e62c"; }
586
-
587
- .icon-coupons:before {
588
- content: "\e63b"; }
589
-
590
- .icon-discounts:before {
591
- content: "\e63c"; }
592
-
593
- .icon-marketplaces:before {
594
- content: "\e63d"; }
595
-
596
- .icon-odn:before {
597
- content: "\e639"; }
598
-
599
- .icon-vk:before {
600
- content: "\e63a"; }
601
-
602
- .icon-appointment:before {
603
- content: "\e62b"; }
604
-
605
- .icon-trash:before {
606
- content: "\e62a"; }
607
-
608
- .icon-lock:before {
609
- content: "\e621"; }
610
-
611
- .icon-letter:before {
612
- content: "\e629"; }
613
-
614
- .icon-vend:before {
615
- content: "\e628"; }
616
-
617
- .icon-apple:before {
618
- content: "\e624"; }
619
-
620
- .icon-discount:before {
621
- content: "\e625"; }
622
-
623
- .icon-bag:before {
624
- content: "\e626"; }
625
-
626
- .icon-phone:before {
627
- content: "\e627"; }
628
-
629
- .icon-speaker:before {
630
- content: "\e622"; }
631
-
632
- .icon-warning:before {
633
- content: "\e623"; }
634
-
635
- .icon-lock:before {
636
- content: "\e621"; }
637
-
638
- .icon-radiobutton-checked:before {
639
- content: "\e61e"; }
640
-
641
- .icon-radiobutton-unchecked:before {
642
- content: "\e61f"; }
643
-
644
- .icon-update:before {
645
- content: "\e620"; }
646
-
647
- .icon-settings:before {
648
- content: "\e619"; }
649
-
650
- .icon-main-menu:before {
651
- content: "\e61a"; }
652
-
653
- .icon-sales:before {
654
- content: "\e61b"; }
655
-
656
- .icon-chart:before {
657
- content: "\e61c"; }
658
-
659
- .icon-home:before {
660
- content: "\e61d"; }
661
-
662
- .icon-print:before {
663
- content: "\e618"; }
664
-
665
- .icon-search:before {
666
- content: "\e617"; }
667
-
668
- .icon-calendar:before {
669
- content: "\e616"; }
670
-
671
- .icon-show:before {
672
- content: "\e010"; }
673
-
674
- .icon-hide:before {
675
- content: "\e011"; }
676
-
677
- .icon-star:before {
678
- content: "\e615"; }
679
-
680
- .icon-edit:before {
681
- content: "\e614"; }
682
-
683
- .icon-categories:before {
684
- content: "\e613"; }
685
-
686
- .icon-arrange:before {
687
- content: "\e612"; }
688
-
689
- .icon-menu:before {
690
- content: "\e611"; }
691
-
692
- .icon-import:before {
693
- content: "\e610"; }
694
-
695
- .icon-gallery:before {
696
- content: "\e60f"; }
697
-
698
- .icon-enable-all:before {
699
- content: "\e60e"; }
700
-
701
- .icon-disable-all:before {
702
- content: "\e60d"; }
703
-
704
- .icon-next:before {
705
- content: "\e000"; }
706
-
707
- .icon-previous:before {
708
- content: "\e00a"; }
709
-
710
- .icon-store:before {
711
- content: "\e001"; }
712
-
713
- .icon-megaphone:before {
714
- content: "\e002"; }
715
-
716
- .icon-product:before {
717
- content: "\e003"; }
718
-
719
- .icon-geo:before {
720
- content: "\e004"; }
721
-
722
- .icon-shipping:before {
723
- content: "\e005"; }
724
-
725
- .icon-payments:before {
726
- content: "\e006"; }
727
-
728
- .icon-launch:before {
729
- content: "\e007"; }
730
-
731
- .icon-share:before {
732
- content: "\e008"; }
733
-
734
- .icon-facebook:before {
735
- content: "\e009"; }
736
-
737
- .icon-fb:before {
738
- content: "\e00b"; }
739
-
740
- .icon-twitter:before {
741
- content: "\e00c"; }
742
-
743
- .icon-chain:before {
744
- content: "\e00d"; }
745
-
746
- .icon-checkmark:before {
747
- content: "\e00f"; }
748
-
749
- .icon-close:before {
750
- content: "\e014"; }
751
-
752
- .icon-sort:before {
753
- content: "\f0dc"; }
754
-
755
- .icon-box:before {
756
- content: "\e00e"; }
757
-
758
- .icon-cloud:before {
759
- content: "\e012"; }
760
-
761
- .icon-rates:before {
762
- content: "\e015"; }
763
-
764
- .icon-upload:before {
765
- content: "\e013"; }
766
-
767
- .icon-arr-down:before {
768
- content: "\e018"; }
769
-
770
- .icon-dropdown:before {
771
- content: "\e016"; }
772
-
773
- .icon-cash:before {
774
- content: "\e019"; }
775
-
776
- .icon-check:before {
777
- content: "\e01a"; }
778
-
779
- .icon-google:before {
780
- content: "\e600"; }
781
-
782
- .icon-paypal:before {
783
- content: "\e601"; }
784
-
785
- .icon-envelope:before {
786
- content: "\e603"; }
787
-
788
- .icon-help:before {
789
- content: "\e602"; }
790
-
791
- .icon-chat:before {
792
- content: "\e604"; }
793
-
794
- .icon-arr-left:before {
795
- content: "\e605"; }
796
-
797
- .icon-arr-right:before {
798
- content: "\e606"; }
799
-
800
- .icon-arr-up:before {
801
- content: "\e609"; }
802
-
803
- .icon-open:before {
804
- content: "\e608"; }
805
-
806
- .icon-user:before {
807
- content: "\e607"; }
808
-
809
- .icon-tumbler:before {
810
- content: "\e60a"; }
811
-
812
- .icon-taxes:before {
813
- content: "\e60b"; }
814
-
815
- .icon-ecwid:before {
816
- content: "\e60c"; }
817
-
818
- .btn {
819
- display: inline-block;
820
- margin: 0;
821
- border: 1px solid transparent;
822
- vertical-align: middle;
823
- text-align: center;
824
- cursor: pointer;
825
- outline: 0;
826
- text-decoration: none;
827
- white-space: nowrap;
828
- *display: inline;
829
- *margin-left: .3em;
830
- *zoom: 1;
831
- -moz-box-sizing: border-box;
832
- box-sizing: border-box;
833
- font-size: 0.813em;
834
- padding: 4px 10px;
835
- border-radius: 3px;
836
- line-height: 1.7em;
837
- height: 2.462em;
838
- min-width: 7.385em;
839
- color: #333;
840
- background-color: #f6f6f6;
841
- border-color: transparent;
842
- -webkit-transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
843
- transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear; }
844
- .btn:focus, .btn.focus, .btn.btn-loading, .btn.btn-loading:hover, .btn.btn-loading:focus, .btn.btn-loading:focus:hover, .btn.btn-loading:active, .btn.btn-loading:focus:active, .btn-group.opened .btn.btn-dropdown {
845
- border-width: 2px;
846
- padding: 3px 9px; }
847
- .btn:hover {
848
- background-color: #c4c4c4; }
849
- .btn:focus {
850
- border-color: #acacac; }
851
- .btn:focus:hover {
852
- background-color: #c4c4c4; }
853
- .btn:active {
854
- background-color: #f7f7f7; }
855
- .btn:focus:active {
856
- background-color: #f7f7f7; }
857
- .btn.btn-loading, .btn.btn-loading:hover, .btn.btn-loading:focus, .btn.btn-loading:focus:hover, .btn.btn-loading:active, .btn.btn-loading:focus:active {
858
- position: relative;
859
- background-color: #f7f7f7;
860
- border-color: transparent;
861
- overflow: visible; }
862
- .btn-group.opened .btn.btn-dropdown {
863
- border-color: #acacac; }
864
- .btn.btn-loading .loader-inner, .btn.btn-loading .loader-outer, .btn.btn-loading:hover .loader-inner, .btn.btn-loading:hover .loader-outer, .btn.btn-loading:focus .loader-inner, .btn.btn-loading:focus .loader-outer, .btn.btn-loading:focus:hover .loader-inner, .btn.btn-loading:focus:hover .loader-outer, .btn.btn-loading:active .loader-inner, .btn.btn-loading:active .loader-outer, .btn.btn-loading:focus:active .loader-inner, .btn.btn-loading:focus:active .loader-outer {
865
- fill: #f7f7f7; }
866
- .btn:first-child {
867
- *margin-left: 0; }
868
- .btn[disabled], .btn[disabled]:hover, .btn[disabled]:focus, .btn[disabled]:focus:hover, .btn[disabled]:active, .btn[disabled]:focus:active {
869
- cursor: default;
870
- opacity: .3;
871
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
872
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; }
873
- .btn.btn-loading:before, .btn.btn-loading:hover:before, .btn.btn-loading:focus:before, .btn.btn-loading:focus:hover:before, .btn.btn-loading:active:before, .btn.btn-loading:focus:active:before {
874
- position: absolute;
875
- content: "";
876
- top: 0;
877
- left: 0;
878
- width: 100%;
879
- height: 100%;
880
- border-radius: inherit;
881
- background-color: inherit;
882
- opacity: 1;
883
- -webkit-transition: opacity .3s ease-out;
884
- transition: opacity .3s ease-out; }
885
-
886
- /* buttons' sizes */
887
- .btn-large {
888
- font-size: 1.063em;
889
- padding: 4px 16px;
890
- border-radius: 5px;
891
- line-height: 2.118em;
892
- height: 2.824em;
893
- min-width: 8.471em; }
894
- .btn-large:focus, .btn-large.focus, .btn-large.btn.btn-loading, .btn-large.btn.btn-loading:focus:hover, .btn-large.btn.btn-loading:focus:active, .btn-large.btn-default.btn-loading, .btn-large.btn-loading.btn-icon, .btn-large.btn-default.btn-loading:focus:hover, .btn-large.btn-loading.btn-icon:focus:hover, .btn-large.btn-default.btn-loading:focus:active, .btn-large.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-large.btn-dropdown {
895
- border-width: 2px;
896
- padding: 3px 15px; }
897
-
898
- .btn-medium {
899
- font-size: 0.875em;
900
- padding: 4px 12px;
901
- border-radius: 3px;
902
- line-height: 1.7em;
903
- height: 2.857em;
904
- min-width: 8.571em; }
905
- .btn-medium:focus, .btn-medium.focus, .btn-medium.btn.btn-loading, .btn-medium.btn.btn-loading:focus:hover, .btn-medium.btn.btn-loading:focus:active, .btn-medium.btn-default.btn-loading, .btn-medium.btn-loading.btn-icon, .btn-medium.btn-default.btn-loading:focus:hover, .btn-medium.btn-loading.btn-icon:focus:hover, .btn-medium.btn-default.btn-loading:focus:active, .btn-medium.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-medium.btn-dropdown {
906
- border-width: 2px;
907
- padding: 3px 11px; }
908
-
909
- .btn-small {
910
- font-size: 0.755em;
911
- padding: 3px 8px;
912
- border-radius: 3px;
913
- line-height: 1.4em;
914
- height: 2.333em;
915
- min-width: 7em; }
916
- .btn-small:focus, .btn-small.focus, .btn-small.btn.btn-loading, .btn-small.btn.btn-loading:focus:hover, .btn-small.btn.btn-loading:focus:active, .btn-small.btn-default.btn-loading, .btn-small.btn-loading.btn-icon, .btn-small.btn-default.btn-loading:focus:hover, .btn-small.btn-loading.btn-icon:focus:hover, .btn-small.btn-default.btn-loading:focus:active, .btn-small.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-small.btn-dropdown {
917
- border-width: 2px;
918
- padding: 2px 7px; }
919
-
920
- /* buttons' types */
921
- .btn-default, .btn-icon {
922
- background-color: #f6f6f6;
923
- color: #333;
924
- border-color: #cccccc; }
925
- .btn-default:hover, .btn-icon:hover {
926
- background-color: #fff;
927
- color: #137ebe;
928
- border-color: #89bede; }
929
- .btn-default:focus, .btn-icon:focus, .btn-default.focus, .focus.btn-icon, .btn-group.opened .btn-icon.btn-dropdown, .btn-group.opened .btn-default.btn-dropdown {
930
- background-color: #eaf2f7;
931
- border-color: #b3cad5; }
932
- .btn-default:focus:hover, .btn-icon:focus:hover {
933
- background-color: #fff;
934
- border-color: #137ebe; }
935
- .btn-default:active, .btn-icon:active {
936
- background-color: #fff;
937
- color: #5ebbf3;
938
- border-color: #aeddf9; }
939
- .btn-default:focus:active, .btn-icon:focus:active {
940
- background-color: #fff;
941
- border-color: #5ebbf3; }
942
- .btn-default.btn-loading, .btn-loading.btn-icon, .btn-default.btn-loading:hover, .btn-loading.btn-icon:hover, .btn-default.btn-loading:focus, .btn-loading.btn-icon:focus, .btn-default.btn-loading:focus:hover, .btn-loading.btn-icon:focus:hover, .btn-default.btn-loading:active, .btn-loading.btn-icon:active, .btn-default.btn-loading:focus:active, .btn-loading.btn-icon:focus:active {
943
- position: relative;
944
- background-color: #aeddf9;
945
- border-color: #aeddf9;
946
- overflow: visible; }
947
- .btn-default.btn-loading .loader-inner, .btn-loading.btn-icon .loader-inner, .btn-default.btn-loading .loader-outer, .btn-loading.btn-icon .loader-outer, .btn-default.btn-loading:hover .loader-inner, .btn-loading.btn-icon:hover .loader-inner, .btn-default.btn-loading:hover .loader-outer, .btn-loading.btn-icon:hover .loader-outer, .btn-default.btn-loading:focus .loader-inner, .btn-loading.btn-icon:focus .loader-inner, .btn-default.btn-loading:focus .loader-outer, .btn-loading.btn-icon:focus .loader-outer, .btn-default.btn-loading:focus:hover .loader-inner, .btn-loading.btn-icon:focus:hover .loader-inner, .btn-default.btn-loading:focus:hover .loader-outer, .btn-loading.btn-icon:focus:hover .loader-outer, .btn-default.btn-loading:active .loader-inner, .btn-loading.btn-icon:active .loader-inner, .btn-default.btn-loading:active .loader-outer, .btn-loading.btn-icon:active .loader-outer, .btn-default.btn-loading:focus:active .loader-inner, .btn-loading.btn-icon:focus:active .loader-inner, .btn-default.btn-loading:focus:active .loader-outer, .btn-loading.btn-icon:focus:active .loader-outer {
948
- fill: #aeddf9; }
949
-
950
- .btn-default[disabled], [disabled].btn-icon, .btn-default[disabled]:hover, [disabled].btn-icon:hover, .btn-default[disabled]:focus, [disabled].btn-icon:focus, .btn-default[disabled]:focus:hover, [disabled].btn-icon:focus:hover, .btn-default[disabled]:active, [disabled].btn-icon:active, .btn-default[disabled]:focus:active, [disabled].btn-icon:focus:active {
951
- background-color: #f6f6f6;
952
- color: #333;
953
- border-color: transparent;
954
- border-color: #cccccc; }
955
-
956
- .btn-alt {
957
- background-color: #fff;
958
- color: #333; }
959
- .btn-alt:hover {
960
- background-color: #edf8ff;
961
- color: #137ebe; }
962
- .btn-alt:active {
963
- background-color: #fff;
964
- color: #54bfd6; }
965
- .btn-alt:focus {
966
- border-color: #fff;
967
- background-color: #d3e6f1; }
968
- .btn-alt:focus:hover {
969
- background-color: #dce6ed; }
970
- .btn-alt:focus:active {
971
- background-color: #fff; }
972
-
973
- .btn-alt[disabled], .btn-alt[disabled]:hover, .btn-alt[disabled]:focus, .btn-alt[disabled]:focus:hover, .btn-alt[disabled]:active, .btn-alt[disabled]:focus:active {
974
- background-color: #fff;
975
- color: #333;
976
- border-color: transparent; }
977
-
978
- /* btn-primary */
979
- .btn-primary,
980
- .ecwid-button .btn-primary {
981
- color: #fff;
982
- background-color: #189dee;
983
- border-color: transparent; }
984
- .btn-primary:hover {
985
- background-color: #137dbe; }
986
- .btn-primary:focus {
987
- border-color: #106da6; }
988
- .btn-primary:focus:hover {
989
- background-color: #137dbe; }
990
- .btn-primary:active {
991
- background-color: #46b0f1; }
992
- .btn-primary:focus:active {
993
- background-color: #46b0f1; }
994
- .btn-primary.btn.btn-loading, .btn-primary.btn.btn-loading:focus:hover, .btn-primary.btn.btn-loading:focus:active, .btn-primary.btn-default.btn-loading, .btn-primary.btn-loading.btn-icon, .btn-primary.btn-default.btn-loading:focus:hover, .btn-primary.btn-loading.btn-icon:focus:hover, .btn-primary.btn-default.btn-loading:focus:active, .btn-primary.btn-loading.btn-icon:focus:active {
995
- position: relative;
996
- background-color: #46b0f1;
997
- border-color: transparent;
998
- overflow: visible; }
999
- .btn-group.opened .btn-primary.btn-dropdown {
1000
- border-color: #106da6; }
1001
- .btn-primary.btn-loading .loader-inner, .btn-primary.btn-loading .loader-outer, .btn-primary.btn-loading:hover .loader-inner, .btn-primary.btn-loading:hover .loader-outer, .btn-primary.btn-loading:focus .loader-inner, .btn-primary.btn-loading:focus .loader-outer, .btn-primary.btn-loading:focus:hover .loader-inner, .btn-primary.btn-loading:focus:hover .loader-outer, .btn-primary.btn-loading:active .loader-inner, .btn-primary.btn-loading:active .loader-outer, .btn-primary.btn-loading:focus:active .loader-inner, .btn-primary.btn-loading:focus:active .loader-outer {
1002
- fill: #46b0f1; }
1003
-
1004
- .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled]:focus:hover, .btn-primary[disabled]:active, .btn-primary[disabled]:focus:active {
1005
- background-color: #189dee;
1006
- color: #fff;
1007
- border-color: transparent; }
1008
-
1009
- /* btn-success */
1010
- .btn-success,
1011
- .ecwid-button .btn-success {
1012
- color: #fff;
1013
- background-color: #64a52f;
1014
- border-color: transparent; }
1015
- .btn-success:hover {
1016
- background-color: #508425; }
1017
- .btn-success:focus {
1018
- border-color: #467320; }
1019
- .btn-success:focus:hover {
1020
- background-color: #508425; }
1021
- .btn-success:active {
1022
- background-color: #83b758; }
1023
- .btn-success:focus:active {
1024
- background-color: #83b758; }
1025
- .btn-success.btn.btn-loading, .btn-success.btn.btn-loading:focus:hover, .btn-success.btn.btn-loading:focus:active, .btn-success.btn-default.btn-loading, .btn-success.btn-loading.btn-icon, .btn-success.btn-default.btn-loading:focus:hover, .btn-success.btn-loading.btn-icon:focus:hover, .btn-success.btn-default.btn-loading:focus:active, .btn-success.btn-loading.btn-icon:focus:active {
1026
- position: relative;
1027
- background-color: #83b758;
1028
- border-color: transparent;
1029
- overflow: visible; }
1030
- .btn-group.opened .btn-success.btn-dropdown {
1031
- border-color: #467320; }
1032
- .btn-success.btn-loading .loader-inner, .btn-success.btn-loading .loader-outer, .btn-success.btn-loading:hover .loader-inner, .btn-success.btn-loading:hover .loader-outer, .btn-success.btn-loading:focus .loader-inner, .btn-success.btn-loading:focus .loader-outer, .btn-success.btn-loading:focus:hover .loader-inner, .btn-success.btn-loading:focus:hover .loader-outer, .btn-success.btn-loading:active .loader-inner, .btn-success.btn-loading:active .loader-outer, .btn-success.btn-loading:focus:active .loader-inner, .btn-success.btn-loading:focus:active .loader-outer {
1033
- fill: #83b758; }
1034
-
1035
- .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled]:focus:hover, .btn-success[disabled]:active, .btn-success[disabled]:focus:active {
1036
- background-color: #64a52f;
1037
- color: #fff;
1038
- border-color: transparent; }
1039
-
1040
- /* btn-info */
1041
- .btn-info {
1042
- color: #fff;
1043
- background-color: #1baecd;
1044
- border-color: transparent; }
1045
- .btn-info:hover {
1046
- background-color: #158ba4; }
1047
- .btn-info:focus {
1048
- border-color: #12798f; }
1049
- .btn-info:focus:hover {
1050
- background-color: #158ba4; }
1051
- .btn-info:active {
1052
- background-color: #48bed7; }
1053
- .btn-info:focus:active {
1054
- background-color: #48bed7; }
1055
- .btn-info.btn.btn-loading, .btn-info.btn.btn-loading:focus:hover, .btn-info.btn.btn-loading:focus:active, .btn-info.btn-default.btn-loading, .btn-info.btn-loading.btn-icon, .btn-info.btn-default.btn-loading:focus:hover, .btn-info.btn-loading.btn-icon:focus:hover, .btn-info.btn-default.btn-loading:focus:active, .btn-info.btn-loading.btn-icon:focus:active {
1056
- position: relative;
1057
- background-color: #48bed7;
1058
- border-color: transparent;
1059
- overflow: visible; }
1060
- .btn-group.opened .btn-info.btn-dropdown {
1061
- border-color: #12798f; }
1062
- .btn-info.btn-loading .loader-inner, .btn-info.btn-loading .loader-outer, .btn-info.btn-loading:hover .loader-inner, .btn-info.btn-loading:hover .loader-outer, .btn-info.btn-loading:focus .loader-inner, .btn-info.btn-loading:focus .loader-outer, .btn-info.btn-loading:focus:hover .loader-inner, .btn-info.btn-loading:focus:hover .loader-outer, .btn-info.btn-loading:active .loader-inner, .btn-info.btn-loading:active .loader-outer, .btn-info.btn-loading:focus:active .loader-inner, .btn-info.btn-loading:focus:active .loader-outer {
1063
- fill: #48bed7; }
1064
-
1065
- .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled]:focus:hover, .btn-info[disabled]:active, .btn-info[disabled]:focus:active {
1066
- background-color: #1baecd;
1067
- color: #fff;
1068
- border-color: transparent; }
1069
-
1070
- /* btn-info-light */
1071
- .btn-info-light {
1072
- color: #fff;
1073
- background-color: #99d5e1;
1074
- border-color: transparent; }
1075
- .btn-info-light:hover {
1076
- background-color: #7aaab4; }
1077
- .btn-info-light:focus {
1078
- border-color: #6b959d; }
1079
- .btn-info-light:focus:hover {
1080
- background-color: #7aaab4; }
1081
- .btn-info-light:active {
1082
- background-color: #addde7; }
1083
- .btn-info-light:focus:active {
1084
- background-color: #addde7; }
1085
- .btn-info-light.btn.btn-loading, .btn-info-light.btn.btn-loading:focus:hover, .btn-info-light.btn.btn-loading:focus:active, .btn-info-light.btn-default.btn-loading, .btn-info-light.btn-loading.btn-icon, .btn-info-light.btn-default.btn-loading:focus:hover, .btn-info-light.btn-loading.btn-icon:focus:hover, .btn-info-light.btn-default.btn-loading:focus:active, .btn-info-light.btn-loading.btn-icon:focus:active {
1086
- position: relative;
1087
- background-color: #addde7;
1088
- border-color: transparent;
1089
- overflow: visible; }
1090
- .btn-group.opened .btn-info-light.btn-dropdown {
1091
- border-color: #6b959d; }
1092
- .btn-info-light.btn-loading .loader-inner, .btn-info-light.btn-loading .loader-outer, .btn-info-light.btn-loading:hover .loader-inner, .btn-info-light.btn-loading:hover .loader-outer, .btn-info-light.btn-loading:focus .loader-inner, .btn-info-light.btn-loading:focus .loader-outer, .btn-info-light.btn-loading:focus:hover .loader-inner, .btn-info-light.btn-loading:focus:hover .loader-outer, .btn-info-light.btn-loading:active .loader-inner, .btn-info-light.btn-loading:active .loader-outer, .btn-info-light.btn-loading:focus:active .loader-inner, .btn-info-light.btn-loading:focus:active .loader-outer {
1093
- fill: #addde7; }
1094
-
1095
- .btn-info-light[disabled], .btn-info-light[disabled]:hover, .btn-info-light[disabled]:focus, .btn-info-light[disabled]:focus:hover, .btn-info-light[disabled]:active, .btn-info-light[disabled]:focus:active {
1096
- background-color: #99d5e1;
1097
- color: #fff;
1098
- border-color: transparent; }
1099
-
1100
- /* btn-warning */
1101
- .btn-warning {
1102
- color: #fff;
1103
- background-color: #bfa454;
1104
- border-color: transparent; }
1105
- .btn-warning:hover {
1106
- background-color: #988343; }
1107
- .btn-warning:focus {
1108
- border-color: #85723a; }
1109
- .btn-warning:focus:hover {
1110
- background-color: #988343; }
1111
- .btn-warning:active {
1112
- background-color: #cbb676; }
1113
- .btn-warning:focus:active {
1114
- background-color: #cbb676; }
1115
- .btn-warning.btn.btn-loading, .btn-warning.btn.btn-loading:focus:hover, .btn-warning.btn.btn-loading:focus:active, .btn-warning.btn-default.btn-loading, .btn-warning.btn-loading.btn-icon, .btn-warning.btn-default.btn-loading:focus:hover, .btn-warning.btn-loading.btn-icon:focus:hover, .btn-warning.btn-default.btn-loading:focus:active, .btn-warning.btn-loading.btn-icon:focus:active {
1116
- position: relative;
1117
- background-color: #cbb676;
1118
- border-color: transparent;
1119
- overflow: visible; }
1120
- .btn-group.opened .btn-warning.btn-dropdown {
1121
- border-color: #85723a; }
1122
- .btn-warning.btn-loading .loader-inner, .btn-warning.btn-loading .loader-outer, .btn-warning.btn-loading:hover .loader-inner, .btn-warning.btn-loading:hover .loader-outer, .btn-warning.btn-loading:focus .loader-inner, .btn-warning.btn-loading:focus .loader-outer, .btn-warning.btn-loading:focus:hover .loader-inner, .btn-warning.btn-loading:focus:hover .loader-outer, .btn-warning.btn-loading:active .loader-inner, .btn-warning.btn-loading:active .loader-outer, .btn-warning.btn-loading:focus:active .loader-inner, .btn-warning.btn-loading:focus:active .loader-outer {
1123
- fill: #cbb676; }
1124
-
1125
- .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled]:focus:hover, .btn-warning[disabled]:active, .btn-warning[disabled]:focus:active {
1126
- background-color: #bfa454;
1127
- color: #fff;
1128
- border-color: transparent; }
1129
-
1130
- /* btn-inverse */
1131
- .btn-inverse, .btn-inverse:hover, .btn-inverse:focus, .btn-inverse:active {
1132
- color: #333; }
1133
-
1134
- /* icons on btn */
1135
- .btn [class*="icon-"] {
1136
- color: inherit;
1137
- padding-right: 0.688em;
1138
- vertical-align: text-top;
1139
- font-size: 1.143em;
1140
- margin-top: 1px;
1141
- opacity: .8; }
1142
-
1143
- .btn-left-caret [class*="icon-"] {
1144
- float: left;
1145
- margin-top: 4px;
1146
- padding-right: 8px; }
1147
-
1148
- .btn-small.btn-left-caret [class*="icon-"] {
1149
- float: left;
1150
- margin-top: 1px;
1151
- padding-right: 7px; }
1152
-
1153
- .btn-medium.btn-left-caret [class*="icon-"] {
1154
- float: left;
1155
- margin-top: 4px; }
1156
-
1157
- .btn-large.btn-left-caret [class*="icon-"] {
1158
- float: left;
1159
- margin-top: 8px;
1160
- padding-right: 10px; }
1161
-
1162
- /* btn-icon */
1163
- .btn-icon {
1164
- min-width: 40px; }
1165
- .btn-icon.btn-large {
1166
- min-width: 60px; }
1167
- .btn-icon.btn-medium {
1168
- min-width: 45px; }
1169
- .btn-icon.btn-small {
1170
- min-width: 30px; }
1171
- .btn-icon [class*='icon-'] {
1172
- padding: 0; }
1173
-
1174
- /* button group */
1175
- .btn-group {
1176
- position: relative;
1177
- display: inline-block;
1178
- vertical-align: middle; }
1179
- .btn-group > .btn {
1180
- position: relative;
1181
- float: left; }
1182
- .btn-group > .btn:focus {
1183
- outline: 0;
1184
- z-index: 1; }
1185
-
1186
- .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group {
1187
- margin-left: -1px; }
1188
-
1189
- .btn-group > .btn:not(:first-child):not(:last-child):not(.btn-dropdown) {
1190
- border-radius: 0; }
1191
-
1192
- .btn-group > .btn:first-child {
1193
- margin-left: 0; }
1194
- .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
1195
- border-top-right-radius: 0;
1196
- border-bottom-right-radius: 0; }
1197
-
1198
- .btn-group > .btn:last-child:not(:first-child), .btn-group > .btn-dropdown:not(:first-child) {
1199
- border-top-left-radius: 0;
1200
- border-bottom-left-radius: 0; }
1201
-
1202
- .btn-group .btn-dropdown {
1203
- min-width: 30px;
1204
- vertical-align: middle; }
1205
- .btn-group .btn-dropdown [class*='icon-'] {
1206
- font-size: .3em;
1207
- vertical-align: middle;
1208
- margin-top: -2px;
1209
- padding: 0; }
1210
-
1211
- .btn-group .list-dropdown {
1212
- top: 100%;
1213
- right: 0;
1214
- margin: 2px 0 0 0;
1215
- box-shadow: 0 1px 4px #b5b5b5;
1216
- display: none; }
1217
-
1218
- .opened > .list-dropdown {
1219
- display: block; }
1220
-
1221
- .btn-group .btn-dropdown {
1222
- border-left-color: rgba(255, 255, 255, 0.6); }
1223
- .btn-group .btn-dropdown.btn-default, .btn-group .btn-dropdown.btn-icon {
1224
- border-color: #cccccc; }
1225
-
1226
- .normalized .form-control, .normalized .input-prefix-suffix {
1227
- display: inline-block;
1228
- width: 100%;
1229
- vertical-align: middle;
1230
- outline: 0;
1231
- border: 1px solid #c7c7c7;
1232
- background-color: #fafbfc;
1233
- color: #606060;
1234
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
1235
- -moz-box-sizing: border-box;
1236
- box-sizing: border-box;
1237
- font-size: 0.813em;
1238
- padding: 4px 8px;
1239
- border-radius: 3px;
1240
- line-height: 1.75em;
1241
- height: 2.462em;
1242
- -webkit-transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
1243
- transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear; }
1244
- .normalized .form-control:focus, .normalized .input-prefix-suffix:focus, .normalized .form-control.focus, .normalized .focus.input-prefix-suffix {
1245
- border-width: 2px;
1246
- padding: 3px 7px; }
1247
- .normalized .form-control:hover, .normalized .input-prefix-suffix:hover {
1248
- background-color: #fff; }
1249
- .normalized .form-control:focus, .normalized .input-prefix-suffix:focus, .normalized .form-control.focus, .normalized .focus.input-prefix-suffix, .normalized .form-control:active, .normalized .input-prefix-suffix:active, .normalized .form-control.active, .normalized .active.input-prefix-suffix {
1250
- background-color: #fff;
1251
- border-color: #0c92e3;
1252
- color: #606060;
1253
- box-shadow: 0 0 4px #d1eafa; }
1254
- .normalized .form-control[disabled], .normalized [disabled].input-prefix-suffix, .normalized .form-control[readonly], .normalized [readonly].input-prefix-suffix, .normalized .form-control[disabled]:hover, .normalized [disabled].input-prefix-suffix:hover, .normalized .form-control[disabled]:focus, .normalized [disabled].input-prefix-suffix:focus, .normalized .form-control[disabled]:focus:hover, .normalized [disabled].input-prefix-suffix:focus:hover, .normalized .form-control[disabled]:active, .normalized [disabled].input-prefix-suffix:active, .normalized .form-control[disabled]:focus:active, .normalized [disabled].input-prefix-suffix:focus:active {
1255
- background-color: #eeeeee;
1256
- border-color: #c7c7c7;
1257
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
1258
- cursor: not-allowed; }
1259
-
1260
- .normalized .form-control::-moz-placeholder, .normalized .input-prefix-suffix::-moz-placeholder {
1261
- color: #606060;
1262
- opacity: .6; }
1263
-
1264
- .normalized .form-control::-webkit-input-placeholder, .normalized .input-prefix-suffix::-webkit-input-placeholder {
1265
- color: #606060;
1266
- opacity: .6; }
1267
-
1268
- .normalized .form-control::-ms-input-placeholder, .normalized .input-prefix-suffix::-ms-input-placeholder {
1269
- color: #606060;
1270
- opacity: .6; }
1271
-
1272
- .normalized .has-error .form-control, .normalized .has-error .input-prefix-suffix {
1273
- border: 2px solid #fa5111;
1274
- padding: 4px 7px;
1275
- color: #cf3e07;
1276
- background-color: #ffeaea;
1277
- box-shadow: none;
1278
- -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
1279
- transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
1280
-
1281
- .normalized .has-error .form-control:hover, .normalized .has-error .input-prefix-suffix:hover {
1282
- background-color: #fff; }
1283
-
1284
- .normalized .has-error .form-control:focus, .normalized .has-error .input-prefix-suffix:focus {
1285
- background-color: #fff;
1286
- box-shadow: 0 0 4px #F5C0C0; }
1287
-
1288
- .normalized .has-success .form-control, .normalized .has-success .input-prefix-suffix {
1289
- border: 2px solid #468847;
1290
- padding: 4px 7px;
1291
- background-color: #eaffea;
1292
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1293
- color: #468847;
1294
- transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
1295
- -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
1296
-
1297
- .normalized .has-success .form-control:focus, .normalized .has-success .input-prefix-suffix:focus {
1298
- background-color: #fff;
1299
- box-shadow: 0 0 4px #88c889; }
1300
-
1301
- .loader svg {
1302
- height: 100%;
1303
- width: 100%; }
1304
-
1305
- [class*="loading"] .loader .spin-left {
1306
- -webkit-animation: spinleft 1s infinite linear;
1307
- animation: spinleft 1s infinite linear; }
1308
-
1309
- [class*="loading"] .loader .spin-right {
1310
- -webkit-animation: spinright 0.5s infinite linear;
1311
- animation: spinright 0.5s infinite linear; }
1312
-
1313
- .btn .loader {
1314
- position: absolute;
1315
- width: 100%;
1316
- height: 160%;
1317
- top: -30%;
1318
- left: 0;
1319
- display: none;
1320
- z-index: 1;
1321
- overflow: hidden;
1322
- -webkit-animation: fadein .1s 1 linear;
1323
- animation: fadein .1s 1 linear; }
1324
- .btn .loader .ecwid-spinner {
1325
- margin: 0 auto;
1326
- height: 100%;
1327
- height: -webkit-calc(100% + 0px);
1328
- width: -webkit-calc(100% + 0px); }
1329
-
1330
- .btn-loading .loader {
1331
- display: block; }
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ * v2.0 | 20110126
3
+ * License: none (public domain) */
4
+ html, body, div, span, applet, object, iframe,
5
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
+ a, abbr, acronym, address, big, cite, code,
7
+ del, dfn, em, img, ins, kbd, q, s, samp,
8
+ small, strike, strong, sub, sup, tt, var,
9
+ b, u, i, center,
10
+ dl, dt, dd, ol, ul, li,
11
+ fieldset, form, label, legend,
12
+ table, caption, tbody, tfoot, thead, tr, th, td,
13
+ article, aside, canvas, details, embed,
14
+ figure, figcaption, footer, header, hgroup,
15
+ menu, nav, output, ruby, section, summary,
16
+ time, mark, audio, video, button {
17
+ margin: 0;
18
+ padding: 0;
19
+ border: 0;
20
+ font-size: 100%;
21
+ font: inherit;
22
+ box-sizing: border-box;
23
+ vertical-align: baseline; }
24
+
25
+ /* HTML5 display-role reset for older browsers */
26
+ article, aside, details, figcaption, figure,
27
+ footer, header, hgroup, menu, nav, section {
28
+ display: block; }
29
+
30
+ body {
31
+ line-height: 1; }
32
+
33
+ ol, ul {
34
+ list-style: none; }
35
+
36
+ blockquote, q {
37
+ quotes: none; }
38
+
39
+ blockquote:before, blockquote:after,
40
+ q:before, q:after {
41
+ content: "";
42
+ content: none; }
43
+
44
+ table {
45
+ border-collapse: collapse;
46
+ border-spacing: 0; }
47
+
48
+ body {
49
+ font-family: "Open sans", sans-serif;
50
+ font-weight: 400;
51
+ color: #363636;
52
+ min-width: 320px; }
53
+
54
+ .ecwid-thank {
55
+ padding-top: 36px; }
56
+ .ecwid-thank h1 {
57
+ text-align: center;
58
+ font-size: 34px;
59
+ color: #000000;
60
+ line-height: 1.4;
61
+ margin-bottom: 30px; }
62
+ @media (max-width: 767px) {
63
+ .ecwid-thank h1 {
64
+ font-size: 22px;
65
+ max-width: 490px;
66
+ padding: 0 2%;
67
+ margin: 0 auto 15px; }
68
+ .ecwid-thank h1 br {
69
+ display: none; } }
70
+ @media (max-width: 500px) {
71
+ .ecwid-thank h1 {
72
+ max-width: 320px; } }
73
+ .ecwid-thank h1 span {
74
+ display: block;
75
+ font-size: 14px;
76
+ text-align: left;
77
+ max-width: 500px;
78
+ margin: 14px auto; }
79
+
80
+ .ecwid-thank-steps {
81
+ margin: 0 auto 51px;
82
+ max-width: 1000px; }
83
+ @media (max-width: 767px) {
84
+ .ecwid-thank-steps {
85
+ max-width: 450px;
86
+ margin-bottom: 0;
87
+ padding: 0 2%; } }
88
+ .ecwid-thank-steps:after {
89
+ content: "";
90
+ display: table;
91
+ clear: both; }
92
+
93
+ .ecwid-thank-step {
94
+ text-align: center;
95
+ width: 33.33333%;
96
+ float: left;
97
+ position: relative;
98
+ padding: 0 2%; }
99
+ .ecwid-thank-step.active .ecwid-thank-step-image:before {
100
+ position: absolute;
101
+ content: url("../images/landing/correct.svg");
102
+ width: 17px;
103
+ left: 61%; }
104
+ .ecwid-thank-step.active .ecwid-thank-step-image img.none-active {
105
+ display: none; }
106
+ .ecwid-thank-step.active .ecwid-thank-step-image img.active {
107
+ display: inline-block; }
108
+ @media (max-width: 767px) {
109
+ .ecwid-thank-step {
110
+ display: none; } }
111
+ .ecwid-thank-step .ecwid-thank-step-image {
112
+ height: 92px;
113
+ position: relative; }
114
+ .ecwid-thank-step .ecwid-thank-step-image:after {
115
+ content: "";
116
+ position: absolute;
117
+ overflow: hidden; }
118
+ @media (min-width: 768px) {
119
+ .ecwid-thank-step .ecwid-thank-step-image:after {
120
+ top: 40px;
121
+ left: 77%;
122
+ width: 64%;
123
+ height: 7px;
124
+ background: url("../images/landing/arrow.png") center right; } }
125
+ .ecwid-thank-step img {
126
+ margin: 3px 0 10px; }
127
+ .ecwid-thank-step img.active {
128
+ display: none; }
129
+ .ecwid-thank-step h2 {
130
+ font-size: 18px;
131
+ line-height: 1.5;
132
+ margin-bottom: 6px; }
133
+ .ecwid-thank-step p {
134
+ font-size: 14px;
135
+ line-height: 1.5; }
136
+ .ecwid-thank-step.ecwid-thank-step-one img {
137
+ height: 77px; }
138
+ .ecwid-thank-step.ecwid-thank-step-two img {
139
+ height: 60px;
140
+ margin-top: 13px; }
141
+ .ecwid-thank-step.ecwid-thank-step-three .ecwid-thank-step-image:after {
142
+ display: none; }
143
+ .ecwid-thank-step.ecwid-thank-step-three h2 {
144
+ font-weight: 600; }
145
+ .ecwid-thank-step.ecwid-thank-step-three img {
146
+ height: 82px; }
147
+
148
+ .ecwid-thank-background {
149
+ background: url("../images/landing/background-think.jpg");
150
+ background-size: cover; }
151
+ @media (min-width: 768px) {
152
+ .ecwid-thank-background {
153
+ background-position: center bottom; } }
154
+ @media (min-width: 1440px) {
155
+ .ecwid-thank-background {
156
+ background-position: left bottom; } }
157
+ .ecwid-thank-background .ecwid-thank-background-tablet {
158
+ padding: 52px 5% 0; }
159
+ .ecwid-thank-background .ecwid-thank-background-tablet img {
160
+ display: block;
161
+ margin: 0 auto;
162
+ max-width: 100%; }
163
+
164
+ .ecwid-description {
165
+ padding: 0 2%; }
166
+ .ecwid-description:after {
167
+ content: "";
168
+ display: table;
169
+ clear: both; }
170
+
171
+ .ecwid-description-inner {
172
+ max-width: 930px;
173
+ margin: 0 auto;
174
+ table-layout: fixed;
175
+ width: 100%; }
176
+ @media (min-width: 768px) {
177
+ .ecwid-description-inner {
178
+ display: table;
179
+ padding-top: 35px; } }
180
+ @media (min-width: 992px) {
181
+ .ecwid-description-inner {
182
+ padding-top: 95px; } }
183
+ @media (max-width: 767px) {
184
+ .ecwid-description-inner {
185
+ display: -webkit-flex;
186
+ display: -ms-flexbox;
187
+ display: flex;
188
+ -webkit-flex-direction: column-reverse;
189
+ -ms-flex-direction: column-reverse;
190
+ flex-direction: column-reverse; } }
191
+
192
+ .ecwid-description-image {
193
+ padding-right: 5%;
194
+ vertical-align: bottom; }
195
+ @media (min-width: 768px) {
196
+ .ecwid-description-image {
197
+ display: table-cell;
198
+ width: 60%; } }
199
+ @media (min-width: 992px) {
200
+ .ecwid-description-image {
201
+ width: 65%; } }
202
+ @media (max-width: 767px) {
203
+ .ecwid-description-image {
204
+ width: 100%;
205
+ padding: 0 4%; } }
206
+ .ecwid-description-image img {
207
+ display: block;
208
+ max-width: 100%; }
209
+ @media (max-width: 767px) {
210
+ .ecwid-description-image img {
211
+ margin: 0 auto; } }
212
+
213
+ .ecwid-description-text {
214
+ padding-top: 35px;
215
+ padding-bottom: 35px; }
216
+ @media (min-width: 768px) {
217
+ .ecwid-description-text {
218
+ width: 40%;
219
+ display: table-cell;
220
+ vertical-align: middle; } }
221
+ @media (min-width: 992px) {
222
+ .ecwid-description-text {
223
+ width: 35%;
224
+ vertical-align: baseline; } }
225
+ @media (max-width: 767px) {
226
+ .ecwid-description-text {
227
+ padding: 44px 4% 0;
228
+ max-width: 500px;
229
+ margin: 0 auto 50px;
230
+ width: 100%; } }
231
+ .ecwid-description-text h2 {
232
+ line-height: 1.2;
233
+ margin-bottom: 18px; }
234
+ @media (min-width: 768px) {
235
+ .ecwid-description-text h2 {
236
+ font-size: 24px; } }
237
+ @media (min-width: 992px) {
238
+ .ecwid-description-text h2 {
239
+ font-size: 28px; } }
240
+ @media (max-width: 767px) {
241
+ .ecwid-description-text h2 {
242
+ font-size: 22px;
243
+ text-align: center; } }
244
+ .ecwid-description-text p {
245
+ font-size: 14px;
246
+ line-height: 1.5;
247
+ padding: 0.8em 0; }
248
+
249
+ .ecwid-features {
250
+ background-color: #F4F4F4;
251
+ padding: 44px 0 60px; }
252
+ @media (max-width: 767px) {
253
+ .ecwid-features {
254
+ padding-bottom: 9px; } }
255
+ .ecwid-features h2 {
256
+ font-size: 28px;
257
+ color: #1F1F1F;
258
+ font-weight: 400;
259
+ text-align: center;
260
+ margin-bottom: 62px; }
261
+ @media (max-width: 767px) {
262
+ .ecwid-features h2 {
263
+ font-size: 22px;
264
+ margin-bottom: 40px; } }
265
+
266
+ .ecwid-features-inner {
267
+ margin: 0 auto;
268
+ max-width: 930px;
269
+ padding: 0 3%; }
270
+
271
+ .ecwid-features-top {
272
+ margin-bottom: 70px; }
273
+ @media (max-width: 767px) {
274
+ .ecwid-features-top {
275
+ margin-bottom: 0; } }
276
+ .ecwid-features-top:after {
277
+ content: "";
278
+ display: table;
279
+ clear: both; }
280
+ .ecwid-features-top .ecwid-features-top-item {
281
+ width: 50%;
282
+ float: left;
283
+ text-align: center; }
284
+ @media (max-width: 767px) {
285
+ .ecwid-features-top .ecwid-features-top-item {
286
+ padding: 0 2%;
287
+ width: 100%;
288
+ max-width: 320px;
289
+ margin: 0 auto 35px;
290
+ float: none; } }
291
+ .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
292
+ height: 82px; }
293
+ @media (max-width: 767px) {
294
+ .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
295
+ height: 75px; } }
296
+ .ecwid-features-top .ecwid-features-top-item img {
297
+ height: 61px;
298
+ margin-bottom: 36px; }
299
+ @media (max-width: 767px) {
300
+ .ecwid-features-top .ecwid-features-top-item img {
301
+ margin-bottom: 20px; } }
302
+ .ecwid-features-top .ecwid-features-top-item img.gift {
303
+ height: 80px;
304
+ margin-top: -10px; }
305
+ .ecwid-features-top .ecwid-features-top-item h3 {
306
+ font-size: 21px;
307
+ font-weight: 600;
308
+ margin-bottom: 15px; }
309
+ @media (max-width: 767px) {
310
+ .ecwid-features-top .ecwid-features-top-item h3 {
311
+ font-size: 18px;
312
+ margin-bottom: 6px; } }
313
+ .ecwid-features-top .ecwid-features-top-item p {
314
+ font-size: 14px;
315
+ line-height: 1.45; }
316
+ @media (max-width: 767px) {
317
+ .ecwid-features-top .ecwid-features-top-item p {
318
+ font-size: 13px; } }
319
+
320
+ .ecwid-features-bottom:after {
321
+ content: "";
322
+ display: table;
323
+ clear: both; }
324
+ .ecwid-features-bottom .ecwid-features-bottom-item {
325
+ width: 33.33333%;
326
+ float: left;
327
+ text-align: center; }
328
+ @media (max-width: 767px) {
329
+ .ecwid-features-bottom .ecwid-features-bottom-item {
330
+ float: none;
331
+ width: 100%;
332
+ max-width: 270px;
333
+ margin: 0 auto 35px; } }
334
+ .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
335
+ height: 82px; }
336
+ @media (max-width: 767px) {
337
+ .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
338
+ height: 75px; } }
339
+ .ecwid-features-bottom .ecwid-features-bottom-item img {
340
+ height: 63px;
341
+ margin-bottom: 17px; }
342
+ .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
343
+ height: 67px; }
344
+ @media (min-width: 768px) {
345
+ .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
346
+ margin-top: -8px; } }
347
+ .ecwid-features-bottom .ecwid-features-bottom-item h3 {
348
+ font-size: 18px;
349
+ font-weight: 600;
350
+ margin-bottom: 6px; }
351
+ .ecwid-features-bottom .ecwid-features-bottom-item p {
352
+ font-size: 14px;
353
+ line-height: 1.45; }
354
+ @media (max-width: 767px) {
355
+ .ecwid-features-bottom .ecwid-features-bottom-item p {
356
+ font-size: 13px; }
357
+ .ecwid-features-bottom .ecwid-features-bottom-item p br {
358
+ display: none; } }
359
+
360
+ .ecwid-start {
361
+ text-align: center;
362
+ padding: 64px 0 194px; }
363
+ @media (max-width: 767px) {
364
+ .ecwid-start {
365
+ padding: 44px 0 64px; }
366
+ .ecwid-start .ecwid-button .button {
367
+ margin-bottom: 29px; } }
368
+ .ecwid-start:after {
369
+ content: "";
370
+ display: table;
371
+ clear: both; }
372
+ .ecwid-start h2 {
373
+ font-size: 28px;
374
+ line-height: 1.4;
375
+ margin-bottom: 32px; }
376
+ @media (max-width: 767px) {
377
+ .ecwid-start h2 {
378
+ font-size: 22px;
379
+ padding: 0 2%;
380
+ margin-bottom: 1px; } }
381
+
382
+ .ecwid-button {
383
+ text-align: center; }
384
+ .ecwid-button a,
385
+ .ecwid-button button {
386
+ background-image: none; }
387
+ .ecwid-button .button {
388
+ border-radius: 4px;
389
+ border: 0;
390
+ font-size: 20px;
391
+ color: #ffffff;
392
+ line-height: 2.6;
393
+ letter-spacing: 0.01em;
394
+ padding: 0.12em 1.5em;
395
+ margin-bottom: 46px;
396
+ outline: none;
397
+ cursor: pointer; }
398
+ @media (max-width: 767px) {
399
+ .ecwid-button .button {
400
+ font-size: 18px;
401
+ margin-top: 25px;
402
+ margin-bottom: 14px;
403
+ padding: 0.12em 1em; } }
404
+ @media (max-width: 500px) {
405
+ .ecwid-button .button {
406
+ font-size: 16px; } }
407
+ .ecwid-button .button:hover {
408
+ opacity: 0.8; }
409
+ .ecwid-button .button.button--blue {
410
+ background-color: #189DEE; }
411
+ .ecwid-button .button.button--green {
412
+ background-color: #59BB00; }
413
+ .ecwid-button .button-description-mobile {
414
+ font-size: 12px;
415
+ line-height: 1.5;
416
+ margin-bottom: 38px;
417
+ color: #999; }
418
+ .ecwid-button .button-description-mobile h3 {
419
+ font-size: 18px;
420
+ color: #363636;
421
+ font-weight: 600;
422
+ margin-bottom: -70px; }
423
+ @media (min-width: 768px) {
424
+ .ecwid-button .button-description-mobile {
425
+ display: none; } }
426
+ .ecwid-button .ecwid-button-description {
427
+ font-size: 14px; }
428
+ .ecwid-button .ecwid-button-description a {
429
+ display: block;
430
+ font-size: 20px;
431
+ color: #288FB5;
432
+ margin-top: 12px;
433
+ text-decoration: none; }
434
+ .ecwid-button .ecwid-button-description a:hover {
435
+ opacity: 0.8; }
436
+ @media (max-width: 767px) {
437
+ .ecwid-button .ecwid-button-description a {
438
+ margin-bottom: 10px;
439
+ font-size: 18px; } }
440
+
441
+
442
+ /*
443
+ * Adapt landing to wordpress actual environment
444
+ */
445
+ .ecwid-button .button {
446
+ height: auto;
447
+ }
448
+
449
+ #wpcontent {
450
+ padding-left: 0px;
451
+ }
452
+ .ecwid-landing {
453
+ background: white;
454
+ }
455
+ ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu>li.current>a.current:after
456
+ {
457
+ border-right-color:white;
458
+ }
459
+
460
+ .ecwid-landing .on-error {
461
+ display: none;
462
+ }
463
+
464
+ .ecwid-landing.conn-error .on-error {
465
+ display: inherit;
466
+ }
467
+
468
+ .ecwid-landing.conn-error .on-no-error {
469
+ display: none;
470
+ }
471
+
472
+ .ecwid-button .ecwid-connection-error {
473
+ color: red;
474
+ }
475
+
476
+ @media (min-width: 768px) {
477
+ .ecwid-button .ecwid-connection-error {
478
+ position: relative;
479
+ margin-bottom: 8px;
480
+ }
481
+ }
482
+
483
+ .ecwid-landing a:focus {
484
+ outline: 0px none;
485
+ box-shadow: none;
486
+ }
487
+
488
+ .ecwid-landing .button:hover {
489
+ color: white;
490
+ }
491
+
492
+ .ecwid-landing .ecwid-button .btn {
493
+ width: 300px;
494
+ margin-bottom: 40px;
495
+ height: 59px;
496
+ font-size: 20px;
497
+ }
498
+
499
+ .ecwid-button .create-store-loading,
500
+ .ecwid-button .create-store-loading-note,
501
+ .ecwid-button .create-store-success-note,
502
+ .ecwid-button .create-store-success {
503
+ display: none;
504
+ }
505
+
506
+ .ecwid-button .create-store-loading-note,
507
+ .ecwid-button .create-store-success-note
508
+ {
509
+ margin-top: -20px;
510
+ margin-bottom: 32px;
511
+ }
512
+
513
+
514
+ /* loose copy of ecwid css framework */
515
+
516
+ @import url('//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300&subset=latin,latin-ext,cyrillic');
517
+
518
+ .btn {
519
+ font-family: 'Open Sans';
520
+ }
521
+
522
+ @keyframes spinleft {
523
+ 0% {
524
+ transform: rotate(360deg); }
525
+
526
+ 100% {
527
+ transform: rotate(0deg); } }
528
+
529
+ @-webkit-keyframes spinleft {
530
+ 0% {
531
+ -webkit-transform: rotate(360deg); }
532
+
533
+ 100% {
534
+ -webkit-transform: rotate(0deg); } }
535
+
536
+ @keyframes spinright {
537
+ 0% {
538
+ transform: rotate(0deg); }
539
+
540
+ 100% {
541
+ transform: rotate(360deg); } }
542
+
543
+ @-webkit-keyframes spinright {
544
+ 0% {
545
+ -webkit-transform: rotate(0deg); }
546
+
547
+ 100% {
548
+ -webkit-transform: rotate(360deg); } }
549
+
550
+ /* Iconic font */
551
+ @font-face {
552
+ font-family: 'font_icons';
553
+ src: url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.eot');
554
+ src: url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.eot?#iefix') format('embedded-opentype'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.ttf') format('truetype'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.woff') format('woff'), url('//s3.amazonaws.com/myecwidcom-static/static/fonts/icons/v13/fontIcons.svg#icomoon') format('svg');
555
+ font-weight: normal;
556
+ font-style: normal; }
557
+
558
+ .ecwid-button [class*="icon-"] {
559
+ display: inline-block;
560
+ text-transform: none;
561
+ font-weight: normal;
562
+ font-style: normal;
563
+ font-variant: normal;
564
+ font-family: 'font_icons';
565
+ line-height: 1;
566
+ speak: none;
567
+ -webkit-font-smoothing: antialiased;
568
+ -moz-osx-font-smoothing: grayscale;
569
+ -webkit-transition: color .1s linear;
570
+ transition: color .1s linear; }
571
+
572
+ .icon-odn:before {
573
+ content: "\e639"; }
574
+
575
+ .icon-vk:before {
576
+ content: "\e63a"; }
577
+
578
+ .icon-customer_groups:before {
579
+ content: "\e62e"; }
580
+
581
+ .icon-unfinished:before {
582
+ content: "\e62d"; }
583
+
584
+ .icon-table_cake:before {
585
+ content: "\e62c"; }
586
+
587
+ .icon-coupons:before {
588
+ content: "\e63b"; }
589
+
590
+ .icon-discounts:before {
591
+ content: "\e63c"; }
592
+
593
+ .icon-marketplaces:before {
594
+ content: "\e63d"; }
595
+
596
+ .icon-odn:before {
597
+ content: "\e639"; }
598
+
599
+ .icon-vk:before {
600
+ content: "\e63a"; }
601
+
602
+ .icon-appointment:before {
603
+ content: "\e62b"; }
604
+
605
+ .icon-trash:before {
606
+ content: "\e62a"; }
607
+
608
+ .icon-lock:before {
609
+ content: "\e621"; }
610
+
611
+ .icon-letter:before {
612
+ content: "\e629"; }
613
+
614
+ .icon-vend:before {
615
+ content: "\e628"; }
616
+
617
+ .icon-apple:before {
618
+ content: "\e624"; }
619
+
620
+ .icon-discount:before {
621
+ content: "\e625"; }
622
+
623
+ .icon-bag:before {
624
+ content: "\e626"; }
625
+
626
+ .icon-phone:before {
627
+ content: "\e627"; }
628
+
629
+ .icon-speaker:before {
630
+ content: "\e622"; }
631
+
632
+ .icon-warning:before {
633
+ content: "\e623"; }
634
+
635
+ .icon-lock:before {
636
+ content: "\e621"; }
637
+
638
+ .icon-radiobutton-checked:before {
639
+ content: "\e61e"; }
640
+
641
+ .icon-radiobutton-unchecked:before {
642
+ content: "\e61f"; }
643
+
644
+ .icon-update:before {
645
+ content: "\e620"; }
646
+
647
+ .icon-settings:before {
648
+ content: "\e619"; }
649
+
650
+ .icon-main-menu:before {
651
+ content: "\e61a"; }
652
+
653
+ .icon-sales:before {
654
+ content: "\e61b"; }
655
+
656
+ .icon-chart:before {
657
+ content: "\e61c"; }
658
+
659
+ .icon-home:before {
660
+ content: "\e61d"; }
661
+
662
+ .icon-print:before {
663
+ content: "\e618"; }
664
+
665
+ .icon-search:before {
666
+ content: "\e617"; }
667
+
668
+ .icon-calendar:before {
669
+ content: "\e616"; }
670
+
671
+ .icon-show:before {
672
+ content: "\e010"; }
673
+
674
+ .icon-hide:before {
675
+ content: "\e011"; }
676
+
677
+ .icon-star:before {
678
+ content: "\e615"; }
679
+
680
+ .icon-edit:before {
681
+ content: "\e614"; }
682
+
683
+ .icon-categories:before {
684
+ content: "\e613"; }
685
+
686
+ .icon-arrange:before {
687
+ content: "\e612"; }
688
+
689
+ .icon-menu:before {
690
+ content: "\e611"; }
691
+
692
+ .icon-import:before {
693
+ content: "\e610"; }
694
+
695
+ .icon-gallery:before {
696
+ content: "\e60f"; }
697
+
698
+ .icon-enable-all:before {
699
+ content: "\e60e"; }
700
+
701
+ .icon-disable-all:before {
702
+ content: "\e60d"; }
703
+
704
+ .icon-next:before {
705
+ content: "\e000"; }
706
+
707
+ .icon-previous:before {
708
+ content: "\e00a"; }
709
+
710
+ .icon-store:before {
711
+ content: "\e001"; }
712
+
713
+ .icon-megaphone:before {
714
+ content: "\e002"; }
715
+
716
+ .icon-product:before {
717
+ content: "\e003"; }
718
+
719
+ .icon-geo:before {
720
+ content: "\e004"; }
721
+
722
+ .icon-shipping:before {
723
+ content: "\e005"; }
724
+
725
+ .icon-payments:before {
726
+ content: "\e006"; }
727
+
728
+ .icon-launch:before {
729
+ content: "\e007"; }
730
+
731
+ .icon-share:before {
732
+ content: "\e008"; }
733
+
734
+ .icon-facebook:before {
735
+ content: "\e009"; }
736
+
737
+ .icon-fb:before {
738
+ content: "\e00b"; }
739
+
740
+ .icon-twitter:before {
741
+ content: "\e00c"; }
742
+
743
+ .icon-chain:before {
744
+ content: "\e00d"; }
745
+
746
+ .icon-checkmark:before {
747
+ content: "\e00f"; }
748
+
749
+ .icon-close:before {
750
+ content: "\e014"; }
751
+
752
+ .icon-sort:before {
753
+ content: "\f0dc"; }
754
+
755
+ .icon-box:before {
756
+ content: "\e00e"; }
757
+
758
+ .icon-cloud:before {
759
+ content: "\e012"; }
760
+
761
+ .icon-rates:before {
762
+ content: "\e015"; }
763
+
764
+ .icon-upload:before {
765
+ content: "\e013"; }
766
+
767
+ .icon-arr-down:before {
768
+ content: "\e018"; }
769
+
770
+ .icon-dropdown:before {
771
+ content: "\e016"; }
772
+
773
+ .icon-cash:before {
774
+ content: "\e019"; }
775
+
776
+ .icon-check:before {
777
+ content: "\e01a"; }
778
+
779
+ .icon-google:before {
780
+ content: "\e600"; }
781
+
782
+ .icon-paypal:before {
783
+ content: "\e601"; }
784
+
785
+ .icon-envelope:before {
786
+ content: "\e603"; }
787
+
788
+ .icon-help:before {
789
+ content: "\e602"; }
790
+
791
+ .icon-chat:before {
792
+ content: "\e604"; }
793
+
794
+ .icon-arr-left:before {
795
+ content: "\e605"; }
796
+
797
+ .icon-arr-right:before {
798
+ content: "\e606"; }
799
+
800
+ .icon-arr-up:before {
801
+ content: "\e609"; }
802
+
803
+ .icon-open:before {
804
+ content: "\e608"; }
805
+
806
+ .icon-user:before {
807
+ content: "\e607"; }
808
+
809
+ .icon-tumbler:before {
810
+ content: "\e60a"; }
811
+
812
+ .icon-taxes:before {
813
+ content: "\e60b"; }
814
+
815
+ .icon-ecwid:before {
816
+ content: "\e60c"; }
817
+
818
+ .btn {
819
+ display: inline-block;
820
+ margin: 0;
821
+ border: 1px solid transparent;
822
+ vertical-align: middle;
823
+ text-align: center;
824
+ cursor: pointer;
825
+ outline: 0;
826
+ text-decoration: none;
827
+ white-space: nowrap;
828
+ *display: inline;
829
+ *margin-left: .3em;
830
+ *zoom: 1;
831
+ -moz-box-sizing: border-box;
832
+ box-sizing: border-box;
833
+ font-size: 0.813em;
834
+ padding: 4px 10px;
835
+ border-radius: 3px;
836
+ line-height: 1.7em;
837
+ height: 2.462em;
838
+ min-width: 7.385em;
839
+ color: #333;
840
+ background-color: #f6f6f6;
841
+ border-color: transparent;
842
+ -webkit-transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
843
+ transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear; }
844
+ .btn:focus, .btn.focus, .btn.btn-loading, .btn.btn-loading:hover, .btn.btn-loading:focus, .btn.btn-loading:focus:hover, .btn.btn-loading:active, .btn.btn-loading:focus:active, .btn-group.opened .btn.btn-dropdown {
845
+ border-width: 2px;
846
+ padding: 3px 9px; }
847
+ .btn:hover {
848
+ background-color: #c4c4c4; }
849
+ .btn:focus {
850
+ border-color: #acacac; }
851
+ .btn:focus:hover {
852
+ background-color: #c4c4c4; }
853
+ .btn:active {
854
+ background-color: #f7f7f7; }
855
+ .btn:focus:active {
856
+ background-color: #f7f7f7; }
857
+ .btn.btn-loading, .btn.btn-loading:hover, .btn.btn-loading:focus, .btn.btn-loading:focus:hover, .btn.btn-loading:active, .btn.btn-loading:focus:active {
858
+ position: relative;
859
+ background-color: #f7f7f7;
860
+ border-color: transparent;
861
+ overflow: visible; }
862
+ .btn-group.opened .btn.btn-dropdown {
863
+ border-color: #acacac; }
864
+ .btn.btn-loading .loader-inner, .btn.btn-loading .loader-outer, .btn.btn-loading:hover .loader-inner, .btn.btn-loading:hover .loader-outer, .btn.btn-loading:focus .loader-inner, .btn.btn-loading:focus .loader-outer, .btn.btn-loading:focus:hover .loader-inner, .btn.btn-loading:focus:hover .loader-outer, .btn.btn-loading:active .loader-inner, .btn.btn-loading:active .loader-outer, .btn.btn-loading:focus:active .loader-inner, .btn.btn-loading:focus:active .loader-outer {
865
+ fill: #f7f7f7; }
866
+ .btn:first-child {
867
+ *margin-left: 0; }
868
+ .btn[disabled], .btn[disabled]:hover, .btn[disabled]:focus, .btn[disabled]:focus:hover, .btn[disabled]:active, .btn[disabled]:focus:active {
869
+ cursor: default;
870
+ opacity: .3;
871
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=30);
872
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; }
873
+ .btn.btn-loading:before, .btn.btn-loading:hover:before, .btn.btn-loading:focus:before, .btn.btn-loading:focus:hover:before, .btn.btn-loading:active:before, .btn.btn-loading:focus:active:before {
874
+ position: absolute;
875
+ content: "";
876
+ top: 0;
877
+ left: 0;
878
+ width: 100%;
879
+ height: 100%;
880
+ border-radius: inherit;
881
+ background-color: inherit;
882
+ opacity: 1;
883
+ -webkit-transition: opacity .3s ease-out;
884
+ transition: opacity .3s ease-out; }
885
+
886
+ /* buttons' sizes */
887
+ .btn-large {
888
+ font-size: 1.063em;
889
+ padding: 4px 16px;
890
+ border-radius: 5px;
891
+ line-height: 2.118em;
892
+ height: 2.824em;
893
+ min-width: 8.471em; }
894
+ .btn-large:focus, .btn-large.focus, .btn-large.btn.btn-loading, .btn-large.btn.btn-loading:focus:hover, .btn-large.btn.btn-loading:focus:active, .btn-large.btn-default.btn-loading, .btn-large.btn-loading.btn-icon, .btn-large.btn-default.btn-loading:focus:hover, .btn-large.btn-loading.btn-icon:focus:hover, .btn-large.btn-default.btn-loading:focus:active, .btn-large.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-large.btn-dropdown {
895
+ border-width: 2px;
896
+ padding: 3px 15px; }
897
+
898
+ .btn-medium {
899
+ font-size: 0.875em;
900
+ padding: 4px 12px;
901
+ border-radius: 3px;
902
+ line-height: 1.7em;
903
+ height: 2.857em;
904
+ min-width: 8.571em; }
905
+ .btn-medium:focus, .btn-medium.focus, .btn-medium.btn.btn-loading, .btn-medium.btn.btn-loading:focus:hover, .btn-medium.btn.btn-loading:focus:active, .btn-medium.btn-default.btn-loading, .btn-medium.btn-loading.btn-icon, .btn-medium.btn-default.btn-loading:focus:hover, .btn-medium.btn-loading.btn-icon:focus:hover, .btn-medium.btn-default.btn-loading:focus:active, .btn-medium.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-medium.btn-dropdown {
906
+ border-width: 2px;
907
+ padding: 3px 11px; }
908
+
909
+ .btn-small {
910
+ font-size: 0.755em;
911
+ padding: 3px 8px;
912
+ border-radius: 3px;
913
+ line-height: 1.4em;
914
+ height: 2.333em;
915
+ min-width: 7em; }
916
+ .btn-small:focus, .btn-small.focus, .btn-small.btn.btn-loading, .btn-small.btn.btn-loading:focus:hover, .btn-small.btn.btn-loading:focus:active, .btn-small.btn-default.btn-loading, .btn-small.btn-loading.btn-icon, .btn-small.btn-default.btn-loading:focus:hover, .btn-small.btn-loading.btn-icon:focus:hover, .btn-small.btn-default.btn-loading:focus:active, .btn-small.btn-loading.btn-icon:focus:active, .btn-group.opened .btn-small.btn-dropdown {
917
+ border-width: 2px;
918
+ padding: 2px 7px; }
919
+
920
+ /* buttons' types */
921
+ .btn-default, .btn-icon {
922
+ background-color: #f6f6f6;
923
+ color: #333;
924
+ border-color: #cccccc; }
925
+ .btn-default:hover, .btn-icon:hover {
926
+ background-color: #fff;
927
+ color: #137ebe;
928
+ border-color: #89bede; }
929
+ .btn-default:focus, .btn-icon:focus, .btn-default.focus, .focus.btn-icon, .btn-group.opened .btn-icon.btn-dropdown, .btn-group.opened .btn-default.btn-dropdown {
930
+ background-color: #eaf2f7;
931
+ border-color: #b3cad5; }
932
+ .btn-default:focus:hover, .btn-icon:focus:hover {
933
+ background-color: #fff;
934
+ border-color: #137ebe; }
935
+ .btn-default:active, .btn-icon:active {
936
+ background-color: #fff;
937
+ color: #5ebbf3;
938
+ border-color: #aeddf9; }
939
+ .btn-default:focus:active, .btn-icon:focus:active {
940
+ background-color: #fff;
941
+ border-color: #5ebbf3; }
942
+ .btn-default.btn-loading, .btn-loading.btn-icon, .btn-default.btn-loading:hover, .btn-loading.btn-icon:hover, .btn-default.btn-loading:focus, .btn-loading.btn-icon:focus, .btn-default.btn-loading:focus:hover, .btn-loading.btn-icon:focus:hover, .btn-default.btn-loading:active, .btn-loading.btn-icon:active, .btn-default.btn-loading:focus:active, .btn-loading.btn-icon:focus:active {
943
+ position: relative;
944
+ background-color: #aeddf9;
945
+ border-color: #aeddf9;
946
+ overflow: visible; }
947
+ .btn-default.btn-loading .loader-inner, .btn-loading.btn-icon .loader-inner, .btn-default.btn-loading .loader-outer, .btn-loading.btn-icon .loader-outer, .btn-default.btn-loading:hover .loader-inner, .btn-loading.btn-icon:hover .loader-inner, .btn-default.btn-loading:hover .loader-outer, .btn-loading.btn-icon:hover .loader-outer, .btn-default.btn-loading:focus .loader-inner, .btn-loading.btn-icon:focus .loader-inner, .btn-default.btn-loading:focus .loader-outer, .btn-loading.btn-icon:focus .loader-outer, .btn-default.btn-loading:focus:hover .loader-inner, .btn-loading.btn-icon:focus:hover .loader-inner, .btn-default.btn-loading:focus:hover .loader-outer, .btn-loading.btn-icon:focus:hover .loader-outer, .btn-default.btn-loading:active .loader-inner, .btn-loading.btn-icon:active .loader-inner, .btn-default.btn-loading:active .loader-outer, .btn-loading.btn-icon:active .loader-outer, .btn-default.btn-loading:focus:active .loader-inner, .btn-loading.btn-icon:focus:active .loader-inner, .btn-default.btn-loading:focus:active .loader-outer, .btn-loading.btn-icon:focus:active .loader-outer {
948
+ fill: #aeddf9; }
949
+
950
+ .btn-default[disabled], [disabled].btn-icon, .btn-default[disabled]:hover, [disabled].btn-icon:hover, .btn-default[disabled]:focus, [disabled].btn-icon:focus, .btn-default[disabled]:focus:hover, [disabled].btn-icon:focus:hover, .btn-default[disabled]:active, [disabled].btn-icon:active, .btn-default[disabled]:focus:active, [disabled].btn-icon:focus:active {
951
+ background-color: #f6f6f6;
952
+ color: #333;
953
+ border-color: transparent;
954
+ border-color: #cccccc; }
955
+
956
+ .btn-alt {
957
+ background-color: #fff;
958
+ color: #333; }
959
+ .btn-alt:hover {
960
+ background-color: #edf8ff;
961
+ color: #137ebe; }
962
+ .btn-alt:active {
963
+ background-color: #fff;
964
+ color: #54bfd6; }
965
+ .btn-alt:focus {
966
+ border-color: #fff;
967
+ background-color: #d3e6f1; }
968
+ .btn-alt:focus:hover {
969
+ background-color: #dce6ed; }
970
+ .btn-alt:focus:active {
971
+ background-color: #fff; }
972
+
973
+ .btn-alt[disabled], .btn-alt[disabled]:hover, .btn-alt[disabled]:focus, .btn-alt[disabled]:focus:hover, .btn-alt[disabled]:active, .btn-alt[disabled]:focus:active {
974
+ background-color: #fff;
975
+ color: #333;
976
+ border-color: transparent; }
977
+
978
+ /* btn-primary */
979
+ .btn-primary,
980
+ .ecwid-button .btn-primary {
981
+ color: #fff;
982
+ background-color: #189dee;
983
+ border-color: transparent; }
984
+ .btn-primary:hover {
985
+ background-color: #137dbe; }
986
+ .btn-primary:focus {
987
+ border-color: #106da6; }
988
+ .btn-primary:focus:hover {
989
+ background-color: #137dbe; }
990
+ .btn-primary:active {
991
+ background-color: #46b0f1; }
992
+ .btn-primary:focus:active {
993
+ background-color: #46b0f1; }
994
+ .btn-primary.btn.btn-loading, .btn-primary.btn.btn-loading:focus:hover, .btn-primary.btn.btn-loading:focus:active, .btn-primary.btn-default.btn-loading, .btn-primary.btn-loading.btn-icon, .btn-primary.btn-default.btn-loading:focus:hover, .btn-primary.btn-loading.btn-icon:focus:hover, .btn-primary.btn-default.btn-loading:focus:active, .btn-primary.btn-loading.btn-icon:focus:active {
995
+ position: relative;
996
+ background-color: #46b0f1;
997
+ border-color: transparent;
998
+ overflow: visible; }
999
+ .btn-group.opened .btn-primary.btn-dropdown {
1000
+ border-color: #106da6; }
1001
+ .btn-primary.btn-loading .loader-inner, .btn-primary.btn-loading .loader-outer, .btn-primary.btn-loading:hover .loader-inner, .btn-primary.btn-loading:hover .loader-outer, .btn-primary.btn-loading:focus .loader-inner, .btn-primary.btn-loading:focus .loader-outer, .btn-primary.btn-loading:focus:hover .loader-inner, .btn-primary.btn-loading:focus:hover .loader-outer, .btn-primary.btn-loading:active .loader-inner, .btn-primary.btn-loading:active .loader-outer, .btn-primary.btn-loading:focus:active .loader-inner, .btn-primary.btn-loading:focus:active .loader-outer {
1002
+ fill: #46b0f1; }
1003
+
1004
+ .btn-primary[disabled], .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled]:focus:hover, .btn-primary[disabled]:active, .btn-primary[disabled]:focus:active {
1005
+ background-color: #189dee;
1006
+ color: #fff;
1007
+ border-color: transparent; }
1008
+
1009
+ /* btn-success */
1010
+ .btn-success,
1011
+ .ecwid-button .btn-success {
1012
+ color: #fff;
1013
+ background-color: #64a52f;
1014
+ border-color: transparent; }
1015
+ .btn-success:hover {
1016
+ background-color: #508425; }
1017
+ .btn-success:focus {
1018
+ border-color: #467320; }
1019
+ .btn-success:focus:hover {
1020
+ background-color: #508425; }
1021
+ .btn-success:active {
1022
+ background-color: #83b758; }
1023
+ .btn-success:focus:active {
1024
+ background-color: #83b758; }
1025
+ .btn-success.btn.btn-loading, .btn-success.btn.btn-loading:focus:hover, .btn-success.btn.btn-loading:focus:active, .btn-success.btn-default.btn-loading, .btn-success.btn-loading.btn-icon, .btn-success.btn-default.btn-loading:focus:hover, .btn-success.btn-loading.btn-icon:focus:hover, .btn-success.btn-default.btn-loading:focus:active, .btn-success.btn-loading.btn-icon:focus:active {
1026
+ position: relative;
1027
+ background-color: #83b758;
1028
+ border-color: transparent;
1029
+ overflow: visible; }
1030
+ .btn-group.opened .btn-success.btn-dropdown {
1031
+ border-color: #467320; }
1032
+ .btn-success.btn-loading .loader-inner, .btn-success.btn-loading .loader-outer, .btn-success.btn-loading:hover .loader-inner, .btn-success.btn-loading:hover .loader-outer, .btn-success.btn-loading:focus .loader-inner, .btn-success.btn-loading:focus .loader-outer, .btn-success.btn-loading:focus:hover .loader-inner, .btn-success.btn-loading:focus:hover .loader-outer, .btn-success.btn-loading:active .loader-inner, .btn-success.btn-loading:active .loader-outer, .btn-success.btn-loading:focus:active .loader-inner, .btn-success.btn-loading:focus:active .loader-outer {
1033
+ fill: #83b758; }
1034
+
1035
+ .btn-success[disabled], .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled]:focus:hover, .btn-success[disabled]:active, .btn-success[disabled]:focus:active {
1036
+ background-color: #64a52f;
1037
+ color: #fff;
1038
+ border-color: transparent; }
1039
+
1040
+ /* btn-info */
1041
+ .btn-info {
1042
+ color: #fff;
1043
+ background-color: #1baecd;
1044
+ border-color: transparent; }
1045
+ .btn-info:hover {
1046
+ background-color: #158ba4; }
1047
+ .btn-info:focus {
1048
+ border-color: #12798f; }
1049
+ .btn-info:focus:hover {
1050
+ background-color: #158ba4; }
1051
+ .btn-info:active {
1052
+ background-color: #48bed7; }
1053
+ .btn-info:focus:active {
1054
+ background-color: #48bed7; }
1055
+ .btn-info.btn.btn-loading, .btn-info.btn.btn-loading:focus:hover, .btn-info.btn.btn-loading:focus:active, .btn-info.btn-default.btn-loading, .btn-info.btn-loading.btn-icon, .btn-info.btn-default.btn-loading:focus:hover, .btn-info.btn-loading.btn-icon:focus:hover, .btn-info.btn-default.btn-loading:focus:active, .btn-info.btn-loading.btn-icon:focus:active {
1056
+ position: relative;
1057
+ background-color: #48bed7;
1058
+ border-color: transparent;
1059
+ overflow: visible; }
1060
+ .btn-group.opened .btn-info.btn-dropdown {
1061
+ border-color: #12798f; }
1062
+ .btn-info.btn-loading .loader-inner, .btn-info.btn-loading .loader-outer, .btn-info.btn-loading:hover .loader-inner, .btn-info.btn-loading:hover .loader-outer, .btn-info.btn-loading:focus .loader-inner, .btn-info.btn-loading:focus .loader-outer, .btn-info.btn-loading:focus:hover .loader-inner, .btn-info.btn-loading:focus:hover .loader-outer, .btn-info.btn-loading:active .loader-inner, .btn-info.btn-loading:active .loader-outer, .btn-info.btn-loading:focus:active .loader-inner, .btn-info.btn-loading:focus:active .loader-outer {
1063
+ fill: #48bed7; }
1064
+
1065
+ .btn-info[disabled], .btn-info[disabled]:hover, .btn-info[disabled]:focus, .btn-info[disabled]:focus:hover, .btn-info[disabled]:active, .btn-info[disabled]:focus:active {
1066
+ background-color: #1baecd;
1067
+ color: #fff;
1068
+ border-color: transparent; }
1069
+
1070
+ /* btn-info-light */
1071
+ .btn-info-light {
1072
+ color: #fff;
1073
+ background-color: #99d5e1;
1074
+ border-color: transparent; }
1075
+ .btn-info-light:hover {
1076
+ background-color: #7aaab4; }
1077
+ .btn-info-light:focus {
1078
+ border-color: #6b959d; }
1079
+ .btn-info-light:focus:hover {
1080
+ background-color: #7aaab4; }
1081
+ .btn-info-light:active {
1082
+ background-color: #addde7; }
1083
+ .btn-info-light:focus:active {
1084
+ background-color: #addde7; }
1085
+ .btn-info-light.btn.btn-loading, .btn-info-light.btn.btn-loading:focus:hover, .btn-info-light.btn.btn-loading:focus:active, .btn-info-light.btn-default.btn-loading, .btn-info-light.btn-loading.btn-icon, .btn-info-light.btn-default.btn-loading:focus:hover, .btn-info-light.btn-loading.btn-icon:focus:hover, .btn-info-light.btn-default.btn-loading:focus:active, .btn-info-light.btn-loading.btn-icon:focus:active {
1086
+ position: relative;
1087
+ background-color: #addde7;
1088
+ border-color: transparent;
1089
+ overflow: visible; }
1090
+ .btn-group.opened .btn-info-light.btn-dropdown {
1091
+ border-color: #6b959d; }
1092
+ .btn-info-light.btn-loading .loader-inner, .btn-info-light.btn-loading .loader-outer, .btn-info-light.btn-loading:hover .loader-inner, .btn-info-light.btn-loading:hover .loader-outer, .btn-info-light.btn-loading:focus .loader-inner, .btn-info-light.btn-loading:focus .loader-outer, .btn-info-light.btn-loading:focus:hover .loader-inner, .btn-info-light.btn-loading:focus:hover .loader-outer, .btn-info-light.btn-loading:active .loader-inner, .btn-info-light.btn-loading:active .loader-outer, .btn-info-light.btn-loading:focus:active .loader-inner, .btn-info-light.btn-loading:focus:active .loader-outer {
1093
+ fill: #addde7; }
1094
+
1095
+ .btn-info-light[disabled], .btn-info-light[disabled]:hover, .btn-info-light[disabled]:focus, .btn-info-light[disabled]:focus:hover, .btn-info-light[disabled]:active, .btn-info-light[disabled]:focus:active {
1096
+ background-color: #99d5e1;
1097
+ color: #fff;
1098
+ border-color: transparent; }
1099
+
1100
+ /* btn-warning */
1101
+ .btn-warning {
1102
+ color: #fff;
1103
+ background-color: #bfa454;
1104
+ border-color: transparent; }
1105
+ .btn-warning:hover {
1106
+ background-color: #988343; }
1107
+ .btn-warning:focus {
1108
+ border-color: #85723a; }
1109
+ .btn-warning:focus:hover {
1110
+ background-color: #988343; }
1111
+ .btn-warning:active {
1112
+ background-color: #cbb676; }
1113
+ .btn-warning:focus:active {
1114
+ background-color: #cbb676; }
1115
+ .btn-warning.btn.btn-loading, .btn-warning.btn.btn-loading:focus:hover, .btn-warning.btn.btn-loading:focus:active, .btn-warning.btn-default.btn-loading, .btn-warning.btn-loading.btn-icon, .btn-warning.btn-default.btn-loading:focus:hover, .btn-warning.btn-loading.btn-icon:focus:hover, .btn-warning.btn-default.btn-loading:focus:active, .btn-warning.btn-loading.btn-icon:focus:active {
1116
+ position: relative;
1117
+ background-color: #cbb676;
1118
+ border-color: transparent;
1119
+ overflow: visible; }
1120
+ .btn-group.opened .btn-warning.btn-dropdown {
1121
+ border-color: #85723a; }
1122
+ .btn-warning.btn-loading .loader-inner, .btn-warning.btn-loading .loader-outer, .btn-warning.btn-loading:hover .loader-inner, .btn-warning.btn-loading:hover .loader-outer, .btn-warning.btn-loading:focus .loader-inner, .btn-warning.btn-loading:focus .loader-outer, .btn-warning.btn-loading:focus:hover .loader-inner, .btn-warning.btn-loading:focus:hover .loader-outer, .btn-warning.btn-loading:active .loader-inner, .btn-warning.btn-loading:active .loader-outer, .btn-warning.btn-loading:focus:active .loader-inner, .btn-warning.btn-loading:focus:active .loader-outer {
1123
+ fill: #cbb676; }
1124
+
1125
+ .btn-warning[disabled], .btn-warning[disabled]:hover, .btn-warning[disabled]:focus, .btn-warning[disabled]:focus:hover, .btn-warning[disabled]:active, .btn-warning[disabled]:focus:active {
1126
+ background-color: #bfa454;
1127
+ color: #fff;
1128
+ border-color: transparent; }
1129
+
1130
+ /* btn-inverse */
1131
+ .btn-inverse, .btn-inverse:hover, .btn-inverse:focus, .btn-inverse:active {
1132
+ color: #333; }
1133
+
1134
+ /* icons on btn */
1135
+ .btn [class*="icon-"] {
1136
+ color: inherit;
1137
+ padding-right: 0.688em;
1138
+ vertical-align: text-top;
1139
+ font-size: 1.143em;
1140
+ margin-top: 1px;
1141
+ opacity: .8; }
1142
+
1143
+ .btn-left-caret [class*="icon-"] {
1144
+ float: left;
1145
+ margin-top: 4px;
1146
+ padding-right: 8px; }
1147
+
1148
+ .btn-small.btn-left-caret [class*="icon-"] {
1149
+ float: left;
1150
+ margin-top: 1px;
1151
+ padding-right: 7px; }
1152
+
1153
+ .btn-medium.btn-left-caret [class*="icon-"] {
1154
+ float: left;
1155
+ margin-top: 4px; }
1156
+
1157
+ .btn-large.btn-left-caret [class*="icon-"] {
1158
+ float: left;
1159
+ margin-top: 8px;
1160
+ padding-right: 10px; }
1161
+
1162
+ /* btn-icon */
1163
+ .btn-icon {
1164
+ min-width: 40px; }
1165
+ .btn-icon.btn-large {
1166
+ min-width: 60px; }
1167
+ .btn-icon.btn-medium {
1168
+ min-width: 45px; }
1169
+ .btn-icon.btn-small {
1170
+ min-width: 30px; }
1171
+ .btn-icon [class*='icon-'] {
1172
+ padding: 0; }
1173
+
1174
+ /* button group */
1175
+ .btn-group {
1176
+ position: relative;
1177
+ display: inline-block;
1178
+ vertical-align: middle; }
1179
+ .btn-group > .btn {
1180
+ position: relative;
1181
+ float: left; }
1182
+ .btn-group > .btn:focus {
1183
+ outline: 0;
1184
+ z-index: 1; }
1185
+
1186
+ .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group {
1187
+ margin-left: -1px; }
1188
+
1189
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.btn-dropdown) {
1190
+ border-radius: 0; }
1191
+
1192
+ .btn-group > .btn:first-child {
1193
+ margin-left: 0; }
1194
+ .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
1195
+ border-top-right-radius: 0;
1196
+ border-bottom-right-radius: 0; }
1197
+
1198
+ .btn-group > .btn:last-child:not(:first-child), .btn-group > .btn-dropdown:not(:first-child) {
1199
+ border-top-left-radius: 0;
1200
+ border-bottom-left-radius: 0; }
1201
+
1202
+ .btn-group .btn-dropdown {
1203
+ min-width: 30px;
1204
+ vertical-align: middle; }
1205
+ .btn-group .btn-dropdown [class*='icon-'] {
1206
+ font-size: .3em;
1207
+ vertical-align: middle;
1208
+ margin-top: -2px;
1209
+ padding: 0; }
1210
+
1211
+ .btn-group .list-dropdown {
1212
+ top: 100%;
1213
+ right: 0;
1214
+ margin: 2px 0 0 0;
1215
+ box-shadow: 0 1px 4px #b5b5b5;
1216
+ display: none; }
1217
+
1218
+ .opened > .list-dropdown {
1219
+ display: block; }
1220
+
1221
+ .btn-group .btn-dropdown {
1222
+ border-left-color: rgba(255, 255, 255, 0.6); }
1223
+ .btn-group .btn-dropdown.btn-default, .btn-group .btn-dropdown.btn-icon {
1224
+ border-color: #cccccc; }
1225
+
1226
+ .normalized .form-control, .normalized .input-prefix-suffix {
1227
+ display: inline-block;
1228
+ width: 100%;
1229
+ vertical-align: middle;
1230
+ outline: 0;
1231
+ border: 1px solid #c7c7c7;
1232
+ background-color: #fafbfc;
1233
+ color: #606060;
1234
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
1235
+ -moz-box-sizing: border-box;
1236
+ box-sizing: border-box;
1237
+ font-size: 0.813em;
1238
+ padding: 4px 8px;
1239
+ border-radius: 3px;
1240
+ line-height: 1.75em;
1241
+ height: 2.462em;
1242
+ -webkit-transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear;
1243
+ transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear, box-shadow 0.1s linear; }
1244
+ .normalized .form-control:focus, .normalized .input-prefix-suffix:focus, .normalized .form-control.focus, .normalized .focus.input-prefix-suffix {
1245
+ border-width: 2px;
1246
+ padding: 3px 7px; }
1247
+ .normalized .form-control:hover, .normalized .input-prefix-suffix:hover {
1248
+ background-color: #fff; }
1249
+ .normalized .form-control:focus, .normalized .input-prefix-suffix:focus, .normalized .form-control.focus, .normalized .focus.input-prefix-suffix, .normalized .form-control:active, .normalized .input-prefix-suffix:active, .normalized .form-control.active, .normalized .active.input-prefix-suffix {
1250
+ background-color: #fff;
1251
+ border-color: #0c92e3;
1252
+ color: #606060;
1253
+ box-shadow: 0 0 4px #d1eafa; }
1254
+ .normalized .form-control[disabled], .normalized [disabled].input-prefix-suffix, .normalized .form-control[readonly], .normalized [readonly].input-prefix-suffix, .normalized .form-control[disabled]:hover, .normalized [disabled].input-prefix-suffix:hover, .normalized .form-control[disabled]:focus, .normalized [disabled].input-prefix-suffix:focus, .normalized .form-control[disabled]:focus:hover, .normalized [disabled].input-prefix-suffix:focus:hover, .normalized .form-control[disabled]:active, .normalized [disabled].input-prefix-suffix:active, .normalized .form-control[disabled]:focus:active, .normalized [disabled].input-prefix-suffix:focus:active {
1255
+ background-color: #eeeeee;
1256
+ border-color: #c7c7c7;
1257
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.07);
1258
+ cursor: not-allowed; }
1259
+
1260
+ .normalized .form-control::-moz-placeholder, .normalized .input-prefix-suffix::-moz-placeholder {
1261
+ color: #606060;
1262
+ opacity: .6; }
1263
+
1264
+ .normalized .form-control::-webkit-input-placeholder, .normalized .input-prefix-suffix::-webkit-input-placeholder {
1265
+ color: #606060;
1266
+ opacity: .6; }
1267
+
1268
+ .normalized .form-control::-ms-input-placeholder, .normalized .input-prefix-suffix::-ms-input-placeholder {
1269
+ color: #606060;
1270
+ opacity: .6; }
1271
+
1272
+ .normalized .has-error .form-control, .normalized .has-error .input-prefix-suffix {
1273
+ border: 2px solid #fa5111;
1274
+ padding: 4px 7px;
1275
+ color: #cf3e07;
1276
+ background-color: #ffeaea;
1277
+ box-shadow: none;
1278
+ -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
1279
+ transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
1280
+
1281
+ .normalized .has-error .form-control:hover, .normalized .has-error .input-prefix-suffix:hover {
1282
+ background-color: #fff; }
1283
+
1284
+ .normalized .has-error .form-control:focus, .normalized .has-error .input-prefix-suffix:focus {
1285
+ background-color: #fff;
1286
+ box-shadow: 0 0 4px #F5C0C0; }
1287
+
1288
+ .normalized .has-success .form-control, .normalized .has-success .input-prefix-suffix {
1289
+ border: 2px solid #468847;
1290
+ padding: 4px 7px;
1291
+ background-color: #eaffea;
1292
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1293
+ color: #468847;
1294
+ transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear;
1295
+ -webkit-transition: background 0.15s linear, color 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear; }
1296
+
1297
+ .normalized .has-success .form-control:focus, .normalized .has-success .input-prefix-suffix:focus {
1298
+ background-color: #fff;
1299
+ box-shadow: 0 0 4px #88c889; }
1300
+
1301
+ .loader svg {
1302
+ height: 100%;
1303
+ width: 100%; }
1304
+
1305
+ [class*="loading"] .loader .spin-left {
1306
+ -webkit-animation: spinleft 1s infinite linear;
1307
+ animation: spinleft 1s infinite linear; }
1308
+
1309
+ [class*="loading"] .loader .spin-right {
1310
+ -webkit-animation: spinright 0.5s infinite linear;
1311
+ animation: spinright 0.5s infinite linear; }
1312
+
1313
+ .btn .loader {
1314
+ position: absolute;
1315
+ width: 100%;
1316
+ height: 160%;
1317
+ top: -30%;
1318
+ left: 0;
1319
+ display: none;
1320
+ z-index: 1;
1321
+ overflow: hidden;
1322
+ -webkit-animation: fadein .1s 1 linear;
1323
+ animation: fadein .1s 1 linear; }
1324
+ .btn .loader .ecwid-spinner {
1325
+ margin: 0 auto;
1326
+ height: 100%;
1327
+ height: -webkit-calc(100% + 0px);
1328
+ width: -webkit-calc(100% + 0px); }
1329
+
1330
+ .btn-loading .loader {
1331
+ display: block; }
css/landing_old.css CHANGED
@@ -1,496 +1,496 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- * v2.0 | 20110126
3
- * License: none (public domain) */
4
- html, body, div, span, applet, object, iframe,
5
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
- a, abbr, acronym, address, big, cite, code,
7
- del, dfn, em, img, ins, kbd, q, s, samp,
8
- small, strike, strong, sub, sup, tt, var,
9
- b, u, i, center,
10
- dl, dt, dd, ol, ul, li,
11
- fieldset, form, label, legend,
12
- table, caption, tbody, tfoot, thead, tr, th, td,
13
- article, aside, canvas, details, embed,
14
- figure, figcaption, footer, header, hgroup,
15
- menu, nav, output, ruby, section, summary,
16
- time, mark, audio, video, button {
17
- margin: 0;
18
- padding: 0;
19
- border: 0;
20
- font-size: 100%;
21
- font: inherit;
22
- box-sizing: border-box;
23
- vertical-align: baseline; }
24
-
25
- /* HTML5 display-role reset for older browsers */
26
- article, aside, details, figcaption, figure,
27
- footer, header, hgroup, menu, nav, section {
28
- display: block; }
29
-
30
- body {
31
- line-height: 1; }
32
-
33
- ol, ul {
34
- list-style: none; }
35
-
36
- blockquote, q {
37
- quotes: none; }
38
-
39
- blockquote:before, blockquote:after,
40
- q:before, q:after {
41
- content: "";
42
- content: none; }
43
-
44
- table {
45
- border-collapse: collapse;
46
- border-spacing: 0; }
47
-
48
- body {
49
- font-family: "Open sans", sans-serif;
50
- font-weight: 400;
51
- color: #363636;
52
- min-width: 320px; }
53
-
54
- .ecwid-thank {
55
- padding-top: 36px; }
56
- .ecwid-thank h1 {
57
- text-align: center;
58
- font-size: 28px;
59
- color: #000000;
60
- line-height: 1.4;
61
- margin-bottom: 30px; }
62
- @media (max-width: 767px) {
63
- .ecwid-thank h1 {
64
- font-size: 22px;
65
- max-width: 490px;
66
- padding: 0 2%;
67
- margin: 0 auto 15px; }
68
- .ecwid-thank h1 br {
69
- display: none; } }
70
- @media (max-width: 500px) {
71
- .ecwid-thank h1 {
72
- max-width: 320px; } }
73
- .ecwid-thank h1 span {
74
- display: block;
75
- font-size: 14px;
76
- margin-bottom: 14px; }
77
-
78
- .ecwid-thank-steps {
79
- margin: 0 auto 51px;
80
- max-width: 1000px; }
81
- @media (max-width: 767px) {
82
- .ecwid-thank-steps {
83
- max-width: 450px;
84
- margin-bottom: 0;
85
- padding: 0 2%; } }
86
- .ecwid-thank-steps:after {
87
- content: "";
88
- display: table;
89
- clear: both; }
90
-
91
- .ecwid-thank-step {
92
- text-align: center;
93
- width: 33.33333%;
94
- float: left;
95
- position: relative;
96
- padding: 0 2%; }
97
- .ecwid-thank-step.active .ecwid-thank-step-image:before {
98
- position: absolute;
99
- content: url("../images/landing/correct.svg");
100
- width: 17px;
101
- left: 61%; }
102
- .ecwid-thank-step.active .ecwid-thank-step-image img.none-active {
103
- display: none; }
104
- .ecwid-thank-step.active .ecwid-thank-step-image img.active {
105
- display: inline-block; }
106
- @media (max-width: 767px) {
107
- .ecwid-thank-step {
108
- display: none; } }
109
- .ecwid-thank-step .ecwid-thank-step-image {
110
- height: 92px;
111
- position: relative; }
112
- .ecwid-thank-step .ecwid-thank-step-image:after {
113
- content: "";
114
- position: absolute;
115
- overflow: hidden; }
116
- @media (min-width: 768px) {
117
- .ecwid-thank-step .ecwid-thank-step-image:after {
118
- top: 40px;
119
- left: 77%;
120
- width: 64%;
121
- height: 7px;
122
- background: url("../images/landing/arrow.png") center right; } }
123
- .ecwid-thank-step img {
124
- margin: 3px 0 10px; }
125
- .ecwid-thank-step img.active {
126
- display: none; }
127
- .ecwid-thank-step h2 {
128
- font-size: 18px;
129
- line-height: 1.5;
130
- margin-bottom: 6px; }
131
- .ecwid-thank-step p {
132
- font-size: 14px;
133
- line-height: 1.5; }
134
- .ecwid-thank-step.ecwid-thank-step-one img {
135
- height: 77px; }
136
- .ecwid-thank-step.ecwid-thank-step-two img {
137
- height: 60px;
138
- margin-top: 13px; }
139
- .ecwid-thank-step.ecwid-thank-step-three .ecwid-thank-step-image:after {
140
- display: none; }
141
- .ecwid-thank-step.ecwid-thank-step-three h2 {
142
- font-weight: 600; }
143
- .ecwid-thank-step.ecwid-thank-step-three img {
144
- height: 82px; }
145
-
146
- .ecwid-thank-background {
147
- background: url("../images/landing/background-think.jpg");
148
- background-size: cover; }
149
- @media (min-width: 768px) {
150
- .ecwid-thank-background {
151
- background-position: center bottom; } }
152
- @media (min-width: 1440px) {
153
- .ecwid-thank-background {
154
- background-position: left -50px; } }
155
- .ecwid-thank-background .ecwid-thank-background-tablet {
156
- padding: 52px 5% 0; }
157
- .ecwid-thank-background .ecwid-thank-background-tablet img {
158
- display: block;
159
- margin: 0 auto;
160
- max-width: 100%; }
161
-
162
- .ecwid-description {
163
- padding: 0 2%; }
164
- .ecwid-description:after {
165
- content: "";
166
- display: table;
167
- clear: both; }
168
-
169
- .ecwid-description-inner {
170
- max-width: 930px;
171
- margin: 0 auto;
172
- table-layout: fixed;
173
- width: 100%; }
174
- @media (min-width: 768px) {
175
- .ecwid-description-inner {
176
- display: table;
177
- padding-top: 35px; } }
178
- @media (min-width: 992px) {
179
- .ecwid-description-inner {
180
- padding-top: 95px; } }
181
- @media (max-width: 767px) {
182
- .ecwid-description-inner {
183
- display: -webkit-flex;
184
- display: -ms-flexbox;
185
- display: flex;
186
- -webkit-flex-direction: column-reverse;
187
- -ms-flex-direction: column-reverse;
188
- flex-direction: column-reverse; } }
189
-
190
- .ecwid-description-image {
191
- padding-right: 5%;
192
- vertical-align: bottom; }
193
- @media (min-width: 768px) {
194
- .ecwid-description-image {
195
- display: table-cell;
196
- width: 60%; } }
197
- @media (min-width: 992px) {
198
- .ecwid-description-image {
199
- width: 65%; } }
200
- @media (max-width: 767px) {
201
- .ecwid-description-image {
202
- width: 100%;
203
- padding: 0 4%; } }
204
- .ecwid-description-image img {
205
- display: block;
206
- max-width: 100%; }
207
- @media (max-width: 767px) {
208
- .ecwid-description-image img {
209
- margin: 0 auto; } }
210
-
211
- .ecwid-description-text {
212
- padding-top: 35px;
213
- padding-bottom: 35px; }
214
- @media (min-width: 768px) {
215
- .ecwid-description-text {
216
- width: 40%;
217
- display: table-cell;
218
- vertical-align: middle; } }
219
- @media (min-width: 992px) {
220
- .ecwid-description-text {
221
- width: 35%;
222
- vertical-align: baseline; } }
223
- @media (max-width: 767px) {
224
- .ecwid-description-text {
225
- padding: 44px 4% 0;
226
- max-width: 500px;
227
- margin: 0 auto 50px;
228
- width: 100%; } }
229
- .ecwid-description-text h2 {
230
- line-height: 1.2;
231
- margin-bottom: 18px; }
232
- @media (min-width: 768px) {
233
- .ecwid-description-text h2 {
234
- font-size: 24px; } }
235
- @media (min-width: 992px) {
236
- .ecwid-description-text h2 {
237
- font-size: 28px; } }
238
- @media (max-width: 767px) {
239
- .ecwid-description-text h2 {
240
- font-size: 22px;
241
- text-align: center; } }
242
- .ecwid-description-text p {
243
- font-size: 14px;
244
- line-height: 1.5;
245
- padding: 0.8em 0; }
246
-
247
- .ecwid-features {
248
- background-color: #F4F4F4;
249
- padding: 44px 0 60px; }
250
- @media (max-width: 767px) {
251
- .ecwid-features {
252
- padding-bottom: 9px; } }
253
- .ecwid-features h2 {
254
- font-size: 28px;
255
- color: #1F1F1F;
256
- font-weight: 400;
257
- text-align: center;
258
- margin-bottom: 62px; }
259
- @media (max-width: 767px) {
260
- .ecwid-features h2 {
261
- font-size: 22px;
262
- margin-bottom: 40px; } }
263
-
264
- .ecwid-features-inner {
265
- margin: 0 auto;
266
- max-width: 930px;
267
- padding: 0 3%; }
268
-
269
- .ecwid-features-top {
270
- margin-bottom: 70px; }
271
- @media (max-width: 767px) {
272
- .ecwid-features-top {
273
- margin-bottom: 0; } }
274
- .ecwid-features-top:after {
275
- content: "";
276
- display: table;
277
- clear: both; }
278
- .ecwid-features-top .ecwid-features-top-item {
279
- width: 50%;
280
- float: left;
281
- text-align: center; }
282
- @media (max-width: 767px) {
283
- .ecwid-features-top .ecwid-features-top-item {
284
- padding: 0 2%;
285
- width: 100%;
286
- max-width: 320px;
287
- margin: 0 auto 35px;
288
- float: none; } }
289
- .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
290
- height: 82px; }
291
- @media (max-width: 767px) {
292
- .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
293
- height: 75px; } }
294
- .ecwid-features-top .ecwid-features-top-item img {
295
- height: 61px;
296
- margin-bottom: 36px; }
297
- @media (max-width: 767px) {
298
- .ecwid-features-top .ecwid-features-top-item img {
299
- margin-bottom: 20px; } }
300
- .ecwid-features-top .ecwid-features-top-item img.gift {
301
- height: 80px;
302
- margin-top: -10px; }
303
- .ecwid-features-top .ecwid-features-top-item h3 {
304
- font-size: 21px;
305
- font-weight: 600;
306
- margin-bottom: 15px; }
307
- @media (max-width: 767px) {
308
- .ecwid-features-top .ecwid-features-top-item h3 {
309
- font-size: 18px;
310
- margin-bottom: 6px; } }
311
- .ecwid-features-top .ecwid-features-top-item p {
312
- font-size: 14px;
313
- line-height: 1.45; }
314
- @media (max-width: 767px) {
315
- .ecwid-features-top .ecwid-features-top-item p {
316
- font-size: 13px; } }
317
-
318
- .ecwid-features-bottom:after {
319
- content: "";
320
- display: table;
321
- clear: both; }
322
- .ecwid-features-bottom .ecwid-features-bottom-item {
323
- width: 33.33333%;
324
- float: left;
325
- text-align: center; }
326
- @media (max-width: 767px) {
327
- .ecwid-features-bottom .ecwid-features-bottom-item {
328
- float: none;
329
- width: 100%;
330
- max-width: 270px;
331
- margin: 0 auto 35px; } }
332
- .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
333
- height: 82px; }
334
- @media (max-width: 767px) {
335
- .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
336
- height: 75px; } }
337
- .ecwid-features-bottom .ecwid-features-bottom-item img {
338
- height: 63px;
339
- margin-bottom: 17px; }
340
- .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
341
- height: 67px; }
342
- @media (min-width: 768px) {
343
- .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
344
- margin-top: -8px; } }
345
- .ecwid-features-bottom .ecwid-features-bottom-item h3 {
346
- font-size: 18px;
347
- font-weight: 600;
348
- margin-bottom: 6px; }
349
- .ecwid-features-bottom .ecwid-features-bottom-item p {
350
- font-size: 14px;
351
- line-height: 1.45; }
352
- @media (max-width: 767px) {
353
- .ecwid-features-bottom .ecwid-features-bottom-item p {
354
- font-size: 13px; }
355
- .ecwid-features-bottom .ecwid-features-bottom-item p br {
356
- display: none; } }
357
-
358
- .ecwid-start {
359
- text-align: center;
360
- padding: 64px 0 194px; }
361
- @media (max-width: 767px) {
362
- .ecwid-start {
363
- padding: 44px 0 64px; }
364
- .ecwid-start .ecwid-button .button {
365
- margin-bottom: 29px; } }
366
- .ecwid-start:after {
367
- content: "";
368
- display: table;
369
- clear: both; }
370
- .ecwid-start h2 {
371
- font-size: 28px;
372
- line-height: 1.4;
373
- margin-bottom: 32px; }
374
- @media (max-width: 767px) {
375
- .ecwid-start h2 {
376
- font-size: 22px;
377
- padding: 0 2%;
378
- margin-bottom: 1px; } }
379
-
380
- .ecwid-button {
381
- text-align: center; }
382
- .ecwid-button a,
383
- .ecwid-button button {
384
- background-image: none; }
385
- .ecwid-button .button {
386
- border-radius: 4px;
387
- border: 0;
388
- font-size: 20px;
389
- color: #ffffff;
390
- line-height: 2.6;
391
- letter-spacing: 0.01em;
392
- padding: 0.12em 1.5em;
393
- margin-bottom: 46px;
394
- outline: none;
395
- cursor: pointer; }
396
- @media (max-width: 767px) {
397
- .ecwid-button .button {
398
- font-size: 18px;
399
- margin-top: 25px;
400
- margin-bottom: 14px;
401
- padding: 0.12em 1em; } }
402
- @media (max-width: 500px) {
403
- .ecwid-button .button {
404
- font-size: 16px; } }
405
- .ecwid-button .button:hover {
406
- opacity: 0.8; }
407
- .ecwid-button .button.button--blue {
408
- background-color: #189DEE; }
409
- .ecwid-button .button.button--green {
410
- background-color: #59BB00; }
411
- .ecwid-button .button-description-mobile {
412
- font-size: 12px;
413
- line-height: 1.5;
414
- margin-bottom: 38px;
415
- color: #999; }
416
- .ecwid-button .button-description-mobile h3 {
417
- font-size: 18px;
418
- color: #363636;
419
- font-weight: 600;
420
- margin-bottom: -70px; }
421
- @media (min-width: 768px) {
422
- .ecwid-button .button-description-mobile {
423
- display: none; } }
424
- .ecwid-button .ecwid-button-description {
425
- font-size: 14px; }
426
- .ecwid-button .ecwid-button-description a {
427
- display: block;
428
- font-size: 20px;
429
- color: #288FB5;
430
- margin-top: 12px;
431
- text-decoration: none; }
432
- .ecwid-button .ecwid-button-description a:hover {
433
- opacity: 0.8; }
434
- @media (max-width: 767px) {
435
- .ecwid-button .ecwid-button-description a {
436
- margin-bottom: 10px;
437
- font-size: 18px; } }
438
-
439
-
440
- /*
441
- * Adapt landing to wordpress actual environment
442
- */
443
- .ecwid-button .button {
444
- height: auto;
445
- }
446
-
447
- #wpcontent {
448
- background: white;
449
- padding-left: 0px;
450
- }
451
- ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu>li.current>a.current:after
452
- {
453
- border-right-color:white;
454
- }
455
-
456
- .ecwid-landing.register .on-connect {
457
- display: none;
458
- }
459
-
460
-
461
- .ecwid-landing.connect .on-register {
462
- display: none;
463
- }
464
-
465
- .ecwid-landing .on-error {
466
- display: none;
467
- }
468
-
469
- .ecwid-landing.conn-error .on-error {
470
- display: inherit;
471
- }
472
-
473
- .ecwid-landing.conn-error .on-no-error {
474
- display: none;
475
- }
476
-
477
- .ecwid-button .ecwid-connection-error {
478
- color: red;
479
- }
480
-
481
- @media (min-width: 768px) {
482
- .ecwid-button .ecwid-connection-error {
483
- position: relative;
484
- top: -30px;
485
- margin-bottom: 8px;
486
- }
487
- }
488
-
489
- .ecwid-landing a:focus {
490
- outline: 0px none;
491
- box-shadow: none;
492
- }
493
-
494
- .ecwid-landing .button:hover {
495
- color: white;
496
  }
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ * v2.0 | 20110126
3
+ * License: none (public domain) */
4
+ html, body, div, span, applet, object, iframe,
5
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
6
+ a, abbr, acronym, address, big, cite, code,
7
+ del, dfn, em, img, ins, kbd, q, s, samp,
8
+ small, strike, strong, sub, sup, tt, var,
9
+ b, u, i, center,
10
+ dl, dt, dd, ol, ul, li,
11
+ fieldset, form, label, legend,
12
+ table, caption, tbody, tfoot, thead, tr, th, td,
13
+ article, aside, canvas, details, embed,
14
+ figure, figcaption, footer, header, hgroup,
15
+ menu, nav, output, ruby, section, summary,
16
+ time, mark, audio, video, button {
17
+ margin: 0;
18
+ padding: 0;
19
+ border: 0;
20
+ font-size: 100%;
21
+ font: inherit;
22
+ box-sizing: border-box;
23
+ vertical-align: baseline; }
24
+
25
+ /* HTML5 display-role reset for older browsers */
26
+ article, aside, details, figcaption, figure,
27
+ footer, header, hgroup, menu, nav, section {
28
+ display: block; }
29
+
30
+ body {
31
+ line-height: 1; }
32
+
33
+ ol, ul {
34
+ list-style: none; }
35
+
36
+ blockquote, q {
37
+ quotes: none; }
38
+
39
+ blockquote:before, blockquote:after,
40
+ q:before, q:after {
41
+ content: "";
42
+ content: none; }
43
+
44
+ table {
45
+ border-collapse: collapse;
46
+ border-spacing: 0; }
47
+
48
+ body {
49
+ font-family: "Open sans", sans-serif;
50
+ font-weight: 400;
51
+ color: #363636;
52
+ min-width: 320px; }
53
+
54
+ .ecwid-thank {
55
+ padding-top: 36px; }
56
+ .ecwid-thank h1 {
57
+ text-align: center;
58
+ font-size: 28px;
59
+ color: #000000;
60
+ line-height: 1.4;
61
+ margin-bottom: 30px; }
62
+ @media (max-width: 767px) {
63
+ .ecwid-thank h1 {
64
+ font-size: 22px;
65
+ max-width: 490px;
66
+ padding: 0 2%;
67
+ margin: 0 auto 15px; }
68
+ .ecwid-thank h1 br {
69
+ display: none; } }
70
+ @media (max-width: 500px) {
71
+ .ecwid-thank h1 {
72
+ max-width: 320px; } }
73
+ .ecwid-thank h1 span {
74
+ display: block;
75
+ font-size: 14px;
76
+ margin-bottom: 14px; }
77
+
78
+ .ecwid-thank-steps {
79
+ margin: 0 auto 51px;
80
+ max-width: 1000px; }
81
+ @media (max-width: 767px) {
82
+ .ecwid-thank-steps {
83
+ max-width: 450px;
84
+ margin-bottom: 0;
85
+ padding: 0 2%; } }
86
+ .ecwid-thank-steps:after {
87
+ content: "";
88
+ display: table;
89
+ clear: both; }
90
+
91
+ .ecwid-thank-step {
92
+ text-align: center;
93
+ width: 33.33333%;
94
+ float: left;
95
+ position: relative;
96
+ padding: 0 2%; }
97
+ .ecwid-thank-step.active .ecwid-thank-step-image:before {
98
+ position: absolute;
99
+ content: url("../images/landing/correct.svg");
100
+ width: 17px;
101
+ left: 61%; }
102
+ .ecwid-thank-step.active .ecwid-thank-step-image img.none-active {
103
+ display: none; }
104
+ .ecwid-thank-step.active .ecwid-thank-step-image img.active {
105
+ display: inline-block; }
106
+ @media (max-width: 767px) {
107
+ .ecwid-thank-step {
108
+ display: none; } }
109
+ .ecwid-thank-step .ecwid-thank-step-image {
110
+ height: 92px;
111
+ position: relative; }
112
+ .ecwid-thank-step .ecwid-thank-step-image:after {
113
+ content: "";
114
+ position: absolute;
115
+ overflow: hidden; }
116
+ @media (min-width: 768px) {
117
+ .ecwid-thank-step .ecwid-thank-step-image:after {
118
+ top: 40px;
119
+ left: 77%;
120
+ width: 64%;
121
+ height: 7px;
122
+ background: url("../images/landing/arrow.png") center right; } }
123
+ .ecwid-thank-step img {
124
+ margin: 3px 0 10px; }
125
+ .ecwid-thank-step img.active {
126
+ display: none; }
127
+ .ecwid-thank-step h2 {
128
+ font-size: 18px;
129
+ line-height: 1.5;
130
+ margin-bottom: 6px; }
131
+ .ecwid-thank-step p {
132
+ font-size: 14px;
133
+ line-height: 1.5; }
134
+ .ecwid-thank-step.ecwid-thank-step-one img {
135
+ height: 77px; }
136
+ .ecwid-thank-step.ecwid-thank-step-two img {
137
+ height: 60px;
138
+ margin-top: 13px; }
139
+ .ecwid-thank-step.ecwid-thank-step-three .ecwid-thank-step-image:after {
140
+ display: none; }
141
+ .ecwid-thank-step.ecwid-thank-step-three h2 {
142
+ font-weight: 600; }
143
+ .ecwid-thank-step.ecwid-thank-step-three img {
144
+ height: 82px; }
145
+
146
+ .ecwid-thank-background {
147
+ background: url("../images/landing/background-think.jpg");
148
+ background-size: cover; }
149
+ @media (min-width: 768px) {
150
+ .ecwid-thank-background {
151
+ background-position: center bottom; } }
152
+ @media (min-width: 1440px) {
153
+ .ecwid-thank-background {
154
+ background-position: left -50px; } }
155
+ .ecwid-thank-background .ecwid-thank-background-tablet {
156
+ padding: 52px 5% 0; }
157
+ .ecwid-thank-background .ecwid-thank-background-tablet img {
158
+ display: block;
159
+ margin: 0 auto;
160
+ max-width: 100%; }
161
+
162
+ .ecwid-description {
163
+ padding: 0 2%; }
164
+ .ecwid-description:after {
165
+ content: "";
166
+ display: table;
167
+ clear: both; }
168
+
169
+ .ecwid-description-inner {
170
+ max-width: 930px;
171
+ margin: 0 auto;
172
+ table-layout: fixed;
173
+ width: 100%; }
174
+ @media (min-width: 768px) {
175
+ .ecwid-description-inner {
176
+ display: table;
177
+ padding-top: 35px; } }
178
+ @media (min-width: 992px) {
179
+ .ecwid-description-inner {
180
+ padding-top: 95px; } }
181
+ @media (max-width: 767px) {
182
+ .ecwid-description-inner {
183
+ display: -webkit-flex;
184
+ display: -ms-flexbox;
185
+ display: flex;
186
+ -webkit-flex-direction: column-reverse;
187
+ -ms-flex-direction: column-reverse;
188
+ flex-direction: column-reverse; } }
189
+
190
+ .ecwid-description-image {
191
+ padding-right: 5%;
192
+ vertical-align: bottom; }
193
+ @media (min-width: 768px) {
194
+ .ecwid-description-image {
195
+ display: table-cell;
196
+ width: 60%; } }
197
+ @media (min-width: 992px) {
198
+ .ecwid-description-image {
199
+ width: 65%; } }
200
+ @media (max-width: 767px) {
201
+ .ecwid-description-image {
202
+ width: 100%;
203
+ padding: 0 4%; } }
204
+ .ecwid-description-image img {
205
+ display: block;
206
+ max-width: 100%; }
207
+ @media (max-width: 767px) {
208
+ .ecwid-description-image img {
209
+ margin: 0 auto; } }
210
+
211
+ .ecwid-description-text {
212
+ padding-top: 35px;
213
+ padding-bottom: 35px; }
214
+ @media (min-width: 768px) {
215
+ .ecwid-description-text {
216
+ width: 40%;
217
+ display: table-cell;
218
+ vertical-align: middle; } }
219
+ @media (min-width: 992px) {
220
+ .ecwid-description-text {
221
+ width: 35%;
222
+ vertical-align: baseline; } }
223
+ @media (max-width: 767px) {
224
+ .ecwid-description-text {
225
+ padding: 44px 4% 0;
226
+ max-width: 500px;
227
+ margin: 0 auto 50px;
228
+ width: 100%; } }
229
+ .ecwid-description-text h2 {
230
+ line-height: 1.2;
231
+ margin-bottom: 18px; }
232
+ @media (min-width: 768px) {
233
+ .ecwid-description-text h2 {
234
+ font-size: 24px; } }
235
+ @media (min-width: 992px) {
236
+ .ecwid-description-text h2 {
237
+ font-size: 28px; } }
238
+ @media (max-width: 767px) {
239
+ .ecwid-description-text h2 {
240
+ font-size: 22px;
241
+ text-align: center; } }
242
+ .ecwid-description-text p {
243
+ font-size: 14px;
244
+ line-height: 1.5;
245
+ padding: 0.8em 0; }
246
+
247
+ .ecwid-features {
248
+ background-color: #F4F4F4;
249
+ padding: 44px 0 60px; }
250
+ @media (max-width: 767px) {
251
+ .ecwid-features {
252
+ padding-bottom: 9px; } }
253
+ .ecwid-features h2 {
254
+ font-size: 28px;
255
+ color: #1F1F1F;
256
+ font-weight: 400;
257
+ text-align: center;
258
+ margin-bottom: 62px; }
259
+ @media (max-width: 767px) {
260
+ .ecwid-features h2 {
261
+ font-size: 22px;
262
+ margin-bottom: 40px; } }
263
+
264
+ .ecwid-features-inner {
265
+ margin: 0 auto;
266
+ max-width: 930px;
267
+ padding: 0 3%; }
268
+
269
+ .ecwid-features-top {
270
+ margin-bottom: 70px; }
271
+ @media (max-width: 767px) {
272
+ .ecwid-features-top {
273
+ margin-bottom: 0; } }
274
+ .ecwid-features-top:after {
275
+ content: "";
276
+ display: table;
277
+ clear: both; }
278
+ .ecwid-features-top .ecwid-features-top-item {
279
+ width: 50%;
280
+ float: left;
281
+ text-align: center; }
282
+ @media (max-width: 767px) {
283
+ .ecwid-features-top .ecwid-features-top-item {
284
+ padding: 0 2%;
285
+ width: 100%;
286
+ max-width: 320px;
287
+ margin: 0 auto 35px;
288
+ float: none; } }
289
+ .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
290
+ height: 82px; }
291
+ @media (max-width: 767px) {
292
+ .ecwid-features-top .ecwid-features-top-item .ecwid-features-top-item-image {
293
+ height: 75px; } }
294
+ .ecwid-features-top .ecwid-features-top-item img {
295
+ height: 61px;
296
+ margin-bottom: 36px; }
297
+ @media (max-width: 767px) {
298
+ .ecwid-features-top .ecwid-features-top-item img {
299
+ margin-bottom: 20px; } }
300
+ .ecwid-features-top .ecwid-features-top-item img.gift {
301
+ height: 80px;
302
+ margin-top: -10px; }
303
+ .ecwid-features-top .ecwid-features-top-item h3 {
304
+ font-size: 21px;
305
+ font-weight: 600;
306
+ margin-bottom: 15px; }
307
+ @media (max-width: 767px) {
308
+ .ecwid-features-top .ecwid-features-top-item h3 {
309
+ font-size: 18px;
310
+ margin-bottom: 6px; } }
311
+ .ecwid-features-top .ecwid-features-top-item p {
312
+ font-size: 14px;
313
+ line-height: 1.45; }
314
+ @media (max-width: 767px) {
315
+ .ecwid-features-top .ecwid-features-top-item p {
316
+ font-size: 13px; } }
317
+
318
+ .ecwid-features-bottom:after {
319
+ content: "";
320
+ display: table;
321
+ clear: both; }
322
+ .ecwid-features-bottom .ecwid-features-bottom-item {
323
+ width: 33.33333%;
324
+ float: left;
325
+ text-align: center; }
326
+ @media (max-width: 767px) {
327
+ .ecwid-features-bottom .ecwid-features-bottom-item {
328
+ float: none;
329
+ width: 100%;
330
+ max-width: 270px;
331
+ margin: 0 auto 35px; } }
332
+ .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
333
+ height: 82px; }
334
+ @media (max-width: 767px) {
335
+ .ecwid-features-bottom .ecwid-features-bottom-item .ecwid-features-bottom-item-image {
336
+ height: 75px; } }
337
+ .ecwid-features-bottom .ecwid-features-bottom-item img {
338
+ height: 63px;
339
+ margin-bottom: 17px; }
340
+ .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
341
+ height: 67px; }
342
+ @media (min-width: 768px) {
343
+ .ecwid-features-bottom .ecwid-features-bottom-item img.secure {
344
+ margin-top: -8px; } }
345
+ .ecwid-features-bottom .ecwid-features-bottom-item h3 {
346
+ font-size: 18px;
347
+ font-weight: 600;
348
+ margin-bottom: 6px; }
349
+ .ecwid-features-bottom .ecwid-features-bottom-item p {
350
+ font-size: 14px;
351
+ line-height: 1.45; }
352
+ @media (max-width: 767px) {
353
+ .ecwid-features-bottom .ecwid-features-bottom-item p {
354
+ font-size: 13px; }
355
+ .ecwid-features-bottom .ecwid-features-bottom-item p br {
356
+ display: none; } }
357
+
358
+ .ecwid-start {
359
+ text-align: center;
360
+ padding: 64px 0 194px; }
361
+ @media (max-width: 767px) {
362
+ .ecwid-start {
363
+ padding: 44px 0 64px; }
364
+ .ecwid-start .ecwid-button .button {
365
+ margin-bottom: 29px; } }
366
+ .ecwid-start:after {
367
+ content: "";
368
+ display: table;
369
+ clear: both; }
370
+ .ecwid-start h2 {
371
+ font-size: 28px;
372
+ line-height: 1.4;
373
+ margin-bottom: 32px; }
374
+ @media (max-width: 767px) {
375
+ .ecwid-start h2 {
376
+ font-size: 22px;
377
+ padding: 0 2%;
378
+ margin-bottom: 1px; } }
379
+
380
+ .ecwid-button {
381
+ text-align: center; }
382
+ .ecwid-button a,
383
+ .ecwid-button button {
384
+ background-image: none; }
385
+ .ecwid-button .button {
386
+ border-radius: 4px;
387
+ border: 0;
388
+ font-size: 20px;
389
+ color: #ffffff;
390
+ line-height: 2.6;
391
+ letter-spacing: 0.01em;
392
+ padding: 0.12em 1.5em;
393
+ margin-bottom: 46px;
394
+ outline: none;
395
+ cursor: pointer; }
396
+ @media (max-width: 767px) {
397
+ .ecwid-button .button {
398
+ font-size: 18px;
399
+ margin-top: 25px;
400
+ margin-bottom: 14px;
401
+ padding: 0.12em 1em; } }
402
+ @media (max-width: 500px) {
403
+ .ecwid-button .button {
404
+ font-size: 16px; } }
405
+ .ecwid-button .button:hover {
406
+ opacity: 0.8; }
407
+ .ecwid-button .button.button--blue {
408
+ background-color: #189DEE; }
409
+ .ecwid-button .button.button--green {
410
+ background-color: #59BB00; }
411
+ .ecwid-button .button-description-mobile {
412
+ font-size: 12px;
413
+ line-height: 1.5;
414
+ margin-bottom: 38px;
415
+ color: #999; }
416
+ .ecwid-button .button-description-mobile h3 {
417
+ font-size: 18px;
418
+ color: #363636;
419
+ font-weight: 600;
420
+ margin-bottom: -70px; }
421
+ @media (min-width: 768px) {
422
+ .ecwid-button .button-description-mobile {
423
+ display: none; } }
424
+ .ecwid-button .ecwid-button-description {
425
+ font-size: 14px; }
426
+ .ecwid-button .ecwid-button-description a {
427
+ display: block;
428
+ font-size: 20px;
429
+ color: #288FB5;
430
+ margin-top: 12px;
431
+ text-decoration: none; }
432
+ .ecwid-button .ecwid-button-description a:hover {
433
+ opacity: 0.8; }
434
+ @media (max-width: 767px) {
435
+ .ecwid-button .ecwid-button-description a {
436
+ margin-bottom: 10px;
437
+ font-size: 18px; } }
438
+
439
+
440
+ /*
441
+ * Adapt landing to wordpress actual environment
442
+ */
443
+ .ecwid-button .button {
444
+ height: auto;
445
+ }
446
+
447
+ #wpcontent {
448
+ background: white;
449
+ padding-left: 0px;
450
+ }
451
+ ul#adminmenu a.wp-has-current-submenu:after, ul#adminmenu>li.current>a.current:after
452
+ {
453
+ border-right-color:white;
454
+ }
455
+
456
+ .ecwid-landing.register .on-connect {
457
+ display: none;
458
+ }
459
+
460
+
461
+ .ecwid-landing.connect .on-register {
462
+ display: none;
463
+ }
464
+
465
+ .ecwid-landing .on-error {
466
+ display: none;
467
+ }
468
+
469
+ .ecwid-landing.conn-error .on-error {
470
+ display: inherit;
471
+ }
472
+
473
+ .ecwid-landing.conn-error .on-no-error {
474
+ display: none;
475
+ }
476
+
477
+ .ecwid-button .ecwid-connection-error {
478
+ color: red;
479
+ }
480
+
481
+ @media (min-width: 768px) {
482
+ .ecwid-button .ecwid-connection-error {
483
+ position: relative;
484
+ top: -30px;
485
+ margin-bottom: 8px;
486
+ }
487
+ }
488
+
489
+ .ecwid-landing a:focus {
490
+ outline: 0px none;
491
+ box-shadow: none;
492
+ }
493
+
494
+ .ecwid-landing .button:hover {
495
+ color: white;
496
  }
css/nav-menu.css CHANGED
@@ -1,56 +1,56 @@
1
- #update-nav-menu ul.menu li.menu-item.ecwid-link .field-url,
2
- #update-nav-menu ul.menu li.menu-item.ecwid-link .link-to-original
3
- {
4
- display: none;
5
- }
6
-
7
- #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache {
8
- padding: 1px 2px;
9
- margin: 6px 0;
10
- line-height: 15px;
11
- text-decoration: none;
12
- border-bottom: 1px solid #0073aa;
13
- }
14
-
15
- #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache-updated {
16
- display: none;
17
- padding: 1px 2px;
18
- margin: 6px 0;
19
- line-height: 15px;
20
- text-decoration: none;
21
- cursor: default;
22
- color: #62ae29;
23
- position: relative;
24
- left: 20px;
25
- }
26
- #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache-updated:before {
27
- content: "\f147";
28
- font: 20px 'dashicons';
29
- position: absolute;
30
- top: 6px;
31
- left: -20px;
32
- line-height: 10px;
33
- }
34
-
35
- #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache.cache-cleared:not(:hover) {
36
- color: #999;
37
- border-bottom-color:#999;
38
- }
39
-
40
- #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache.cache-cleared:hover {
41
- color:#666;
42
- border-bottom-color:#666;
43
- }
44
-
45
- #update-nav-menu .ecwid-store-with-cats-message {
46
- float: left;
47
- font-style: italic;
48
- color: #666;
49
- margin-bottom: 5px;
50
- }
51
-
52
- #update-nav-menu .ecwid-store-with-cats-reset-cache {
53
- float: left;
54
- margin-top: 0px;
55
- }
56
-
1
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .field-url,
2
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .link-to-original
3
+ {
4
+ display: none;
5
+ }
6
+
7
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache {
8
+ padding: 1px 2px;
9
+ margin: 6px 0;
10
+ line-height: 15px;
11
+ text-decoration: none;
12
+ border-bottom: 1px solid #0073aa;
13
+ }
14
+
15
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache-updated {
16
+ display: none;
17
+ padding: 1px 2px;
18
+ margin: 6px 0;
19
+ line-height: 15px;
20
+ text-decoration: none;
21
+ cursor: default;
22
+ color: #62ae29;
23
+ position: relative;
24
+ left: 20px;
25
+ }
26
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache-updated:before {
27
+ content: "\f147";
28
+ font: 20px 'dashicons';
29
+ position: absolute;
30
+ top: 6px;
31
+ left: -20px;
32
+ line-height: 10px;
33
+ }
34
+
35
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache.cache-cleared:not(:hover) {
36
+ color: #999;
37
+ border-bottom-color:#999;
38
+ }
39
+
40
+ #update-nav-menu ul.menu li.menu-item.ecwid-link .ecwid-reset-categories-cache.cache-cleared:hover {
41
+ color:#666;
42
+ border-bottom-color:#666;
43
+ }
44
+
45
+ #update-nav-menu .ecwid-store-with-cats-message {
46
+ float: left;
47
+ font-style: italic;
48
+ color: #666;
49
+ margin-bottom: 5px;
50
+ }
51
+
52
+ #update-nav-menu .ecwid-store-with-cats-reset-cache {
53
+ float: left;
54
+ margin-top: 0px;
55
+ }
56
+
css/page-editor.css CHANGED
@@ -1,58 +1,58 @@
1
- .mce-content-body img.ecwid-store-editor,
2
- .mceContentBody img.ecwid-store-editor
3
- {
4
- padding-top: 30px;
5
- background: #F1F1F1;
6
- border: 1px solid #E7E7E7;
7
- height: 200px;
8
- width: 100%;
9
- display: block;
10
- }
11
-
12
- .mce-content-body .ecwid-store-editor[data-ecwid-store-select="1"],
13
- .mceContentBody .ecwid-store-editor[data-ecwid-store-select="1"]
14
- {
15
- outline: 1px solid #777;
16
- }
17
-
18
- #ecwid-store-toolbar {
19
- position: absolute;
20
- }
21
-
22
- #ecwid-store-toolbar div {
23
- margin-top: 7px;
24
- margin-left: 7px;
25
- padding: 2px;
26
- width: 30px;
27
- height: 30px;
28
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
29
- background-color: #000;
30
- background-color: rgba(0, 0, 0, 0.9);
31
- cursor: pointer;
32
- color: #FFF;
33
- font-size: 30px;
34
- }
35
-
36
-
37
-
38
- #ecwid-edit-store-button {
39
- padding: 0 12px 2px;
40
- height: 30px;
41
- line-height: 28px;
42
-
43
- font-size: 12px;
44
-
45
- background: #2EA2CC;
46
- color: #FFF;
47
-
48
- border: 1px solid #0074A2;
49
- border-radius: 3px;
50
- box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5), 0 1px 0 rgba(0, 0, 0, 0.15);
51
-
52
- cursor: pointer;
53
- }
54
-
55
-
56
- #ecwid-edit-store-button:hover {
57
- background: #1E8CBE;
58
  }
1
+ .mce-content-body img.ecwid-store-editor,
2
+ .mceContentBody img.ecwid-store-editor
3
+ {
4
+ padding-top: 30px;
5
+ background: #F1F1F1;
6
+ border: 1px solid #E7E7E7;
7
+ height: 200px;
8
+ width: 100%;
9
+ display: block;
10
+ }
11
+
12
+ .mce-content-body .ecwid-store-editor[data-ecwid-store-select="1"],
13
+ .mceContentBody .ecwid-store-editor[data-ecwid-store-select="1"]
14
+ {
15
+ outline: 1px solid #777;
16
+ }
17
+
18
+ #ecwid-store-toolbar {
19
+ position: absolute;
20
+ }
21
+
22
+ #ecwid-store-toolbar div {
23
+ margin-top: 7px;
24
+ margin-left: 7px;
25
+ padding: 2px;
26
+ width: 30px;
27
+ height: 30px;
28
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
29
+ background-color: #000;
30
+ background-color: rgba(0, 0, 0, 0.9);
31
+ cursor: pointer;
32
+ color: #FFF;
33
+ font-size: 30px;
34
+ }
35
+
36
+
37
+
38
+ #ecwid-edit-store-button {
39
+ padding: 0 12px 2px;
40
+ height: 30px;
41
+ line-height: 28px;
42
+
43
+ font-size: 12px;
44
+
45
+ background: #2EA2CC;
46
+ color: #FFF;
47
+
48
+ border: 1px solid #0074A2;
49
+ border-radius: 3px;
50
+ box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5), 0 1px 0 rgba(0, 0, 0, 0.15);
51
+
52
+ cursor: pointer;
53
+ }
54
+
55
+
56
+ #ecwid-edit-store-button:hover {
57
+ background: #1E8CBE;
58
  }
css/products-list.css CHANGED
@@ -1,197 +1,197 @@
1
- /**
2
- * Common styles
3
- */
4
-
5
- .ecwid-initial-productsList-content {
6
- display: none;
7
- }
8
-
9
- .ecwid-productsList ul li.hide {
10
- display: none;
11
- }
12
-
13
- .ecwid-productsList {
14
- overflow: hidden;
15
- position: relative;
16
- }
17
-
18
-
19
- .ecwid-productsList ul,
20
- #widgets .ecwid-productsList ul
21
- {
22
- padding: 0px;
23
- margin: 0px;
24
- }
25
-
26
- .ecwid-productsList ul li {
27
- list-style: none;
28
- display: block;
29
- padding: 0px;
30
- }
31
-
32
- .ecwid-productsList ul li a,
33
- #widgets .ecwid-productsList ul li a
34
- {
35
- display: block;
36
- position: relative;
37
-
38
- border-radius: 5px;
39
- overflow: hidden;
40
-
41
- background: white;
42
- }
43
-
44
- .ecwid-productsList ul li a {
45
- opacity : .9;
46
- }
47
-
48
- .ecwid-productsList ul li:hover a {
49
- opacity: 1;
50
- }
51
-
52
- .ecwid-productsList .ecwid-productsList-name {
53
- color: #1E7EC8;
54
- }
55
-
56
- html#ecwid_html body#ecwid_body .ecwid-productsList .ecwid-productsList-image .ecwid-noimage {
57
- background-color: white;
58
- opacity: 1;
59
- }
60
-
61
- .ecwid-productsList ul li .ecwid-productsList-name,
62
- .ecwid-productsList ul li .ecwid-productsList-price,
63
- .ecwid-productsList ul li .ecwid-productsList-image {
64
- width: 100%;
65
- text-align: center;
66
- }
67
-
68
- .ecwid-productsList.width-m li .ecwid-productsList-image img {
69
- text-align: center;
70
- max-width:100%;
71
- max-height: 300px;
72
- }
73
-
74
- html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-name
75
- {
76
- white-space: nowrap;
77
- overflow: hidden;
78
- text-overflow: ellipsis;
79
- }
80
-
81
- html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-price
82
- {
83
- font-size: 14px;
84
- }
85
-
86
- /*
87
- * Narrow layout
88
- */
89
- .ecwid-productsList.width-s ul li .ecwid-productsList-name,
90
- .ecwid-productsList.width-s ul li .ecwid-productsList-price
91
- {
92
- display: none;
93
- }
94
-
95
- .ecwid-productsList.width-s ul li {
96
- padding: 5px 0px;
97
- }
98
-
99
- /*
100
- * Medium width layout
101
- */
102
-
103
- .ecwid-productsList.width-m ul li {
104
- padding: 10px 3px 14px;
105
- }
106
-
107
- .ecwid-productsList.width-m ul li .ecwid-productsList-image {
108
- border-bottom-left-radius: 0px;
109
- border-bottom-right-radius: 0px;
110
- }
111
-
112
- html#ecwid_html body#ecwid_body .ecwid-productsList.width-m ul li .ecwid-productsList-name {
113
- padding-top: 3px;
114
- }
115
-
116
- html#ecwid_html body#ecwid_body .ecwid-productsList.width-m ul li .ecwid-productsList-price
117
- {
118
- padding-bottom: 8px;
119
- }
120
-
121
- .ecwid-productsList.width-m ul li .ecwid-productsList-price,
122
- .ecwid-productsList.width-m ul li .ecwid-productsList-name {
123
- width: auto;
124
- margin: 0 5px;
125
- }
126
-
127
-
128
- /*
129
- * Wide layout
130
- */
131
- .ecwid-productsList.width-l ul li
132
- {
133
- margin: 6px 0px;
134
- }
135
-
136
- .ecwid-productsList.width-l ul li a {
137
- min-height: 60px;
138
- }
139
-
140
-
141
- .ecwid-productsList.width-l ul li .ecwid-productsList-image,
142
- .ecwid-productsList.width-l ul li .ecwid-productsList-name,
143
- .ecwid-productsList.width-l ul li .ecwid-productsList-price
144
- {
145
- text-align: left;
146
- }
147
-
148
- .ecwid-productsList.width-l ul li .ecwid-productsList-image {
149
- display: table-cell;
150
- vertical-align: middle;
151
- height: 60px;
152
- padding: 5px;
153
- }
154
-
155
- .ecwid-productsList.width-l ul li .ecwid-productsList-image img {
156
- width: auto;
157
- max-width: 75px;
158
- display: block;
159
- margin: 0px auto;
160
- }
161
-
162
- html#ecwid_html body#ecwid_body .ecwid-productsList div.ecwid-productsList-image.ecwid-noimage {
163
- background-position: 50% 50%;
164
- background-size: 55px 55px;
165
- opacity: 1;
166
- width: 75px;
167
- height: 60px;
168
- padding: 5px;
169
- }
170
-
171
- .ecwid-productsList.width-l ul li .ecwid-productsList-name,
172
- .ecwid-productsList.width-l ul li .ecwid-productsList-price
173
- {
174
- width: auto;
175
- position: absolute;
176
- left: 93px;
177
- right: 0px;
178
- overflow: hidden;
179
- white-space: nowrap;
180
- text-overflow: ellipsis;
181
- }
182
-
183
- .ecwid-productsList.width-l ul li .ecwid-productsList-name {
184
- bottom: 50%;
185
- margin-bottom: 4px;
186
- }
187
-
188
-
189
- .ecwid-productsList.width-l ul li .ecwid-productsList-price {
190
- top: 50%;
191
- margin-top: -2px;
192
- }
193
-
194
- html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-price
195
- {
196
- font-size: 14px;
197
  }
1
+ /**
2
+ * Common styles
3
+ */
4
+
5
+ .ecwid-initial-productsList-content {
6
+ display: none;
7
+ }
8
+
9
+ .ecwid-productsList ul li.hide {
10
+ display: none;
11
+ }
12
+
13
+ .ecwid-productsList {
14
+ overflow: hidden;
15
+ position: relative;
16
+ }
17
+
18
+
19
+ .ecwid-productsList ul,
20
+ #widgets .ecwid-productsList ul
21
+ {
22
+ padding: 0px;
23
+ margin: 0px;
24
+ }
25
+
26
+ .ecwid-productsList ul li {
27
+ list-style: none;
28
+ display: block;
29
+ padding: 0px;
30
+ }
31
+
32
+ .ecwid-productsList ul li a,
33
+ #widgets .ecwid-productsList ul li a
34
+ {
35
+ display: block;
36
+ position: relative;
37
+
38
+ border-radius: 5px;
39
+ overflow: hidden;
40
+
41
+ background: white;
42
+ }
43
+
44
+ .ecwid-productsList ul li a {
45
+ opacity : .9;
46
+ }
47
+
48
+ .ecwid-productsList ul li:hover a {
49
+ opacity: 1;
50
+ }
51
+
52
+ .ecwid-productsList .ecwid-productsList-name {
53
+ color: #1E7EC8;
54
+ }
55
+
56
+ html#ecwid_html body#ecwid_body .ecwid-productsList .ecwid-productsList-image .ecwid-noimage {
57
+ background-color: white;
58
+ opacity: 1;
59
+ }
60
+
61
+ .ecwid-productsList ul li .ecwid-productsList-name,
62
+ .ecwid-productsList ul li .ecwid-productsList-price,
63
+ .ecwid-productsList ul li .ecwid-productsList-image {
64
+ width: 100%;
65
+ text-align: center;
66
+ }
67
+
68
+ .ecwid-productsList.width-m li .ecwid-productsList-image img {
69
+ text-align: center;
70
+ max-width:100%;
71
+ max-height: 300px;
72
+ }
73
+
74
+ html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-name
75
+ {
76
+ white-space: nowrap;
77
+ overflow: hidden;
78
+ text-overflow: ellipsis;
79
+ }
80
+
81
+ html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-price
82
+ {
83
+ font-size: 14px;
84
+ }
85
+
86
+ /*
87
+ * Narrow layout
88
+ */
89
+ .ecwid-productsList.width-s ul li .ecwid-productsList-name,
90
+ .ecwid-productsList.width-s ul li .ecwid-productsList-price
91
+ {
92
+ display: none;
93
+ }
94
+
95
+ .ecwid-productsList.width-s ul li {
96
+ padding: 5px 0px;
97
+ }
98
+
99
+ /*
100
+ * Medium width layout
101
+ */
102
+
103
+ .ecwid-productsList.width-m ul li {
104
+ padding: 10px 3px 14px;
105
+ }
106
+
107
+ .ecwid-productsList.width-m ul li .ecwid-productsList-image {
108
+ border-bottom-left-radius: 0px;
109
+ border-bottom-right-radius: 0px;
110
+ }
111
+
112
+ html#ecwid_html body#ecwid_body .ecwid-productsList.width-m ul li .ecwid-productsList-name {
113
+ padding-top: 3px;
114
+ }
115
+
116
+ html#ecwid_html body#ecwid_body .ecwid-productsList.width-m ul li .ecwid-productsList-price
117
+ {
118
+ padding-bottom: 8px;
119
+ }
120
+
121
+ .ecwid-productsList.width-m ul li .ecwid-productsList-price,
122
+ .ecwid-productsList.width-m ul li .ecwid-productsList-name {
123
+ width: auto;
124
+ margin: 0 5px;
125
+ }
126
+
127
+
128
+ /*
129
+ * Wide layout
130
+ */
131
+ .ecwid-productsList.width-l ul li
132
+ {
133
+ margin: 6px 0px;
134
+ }
135
+
136
+ .ecwid-productsList.width-l ul li a {
137
+ min-height: 60px;
138
+ }
139
+
140
+
141
+ .ecwid-productsList.width-l ul li .ecwid-productsList-image,
142
+ .ecwid-productsList.width-l ul li .ecwid-productsList-name,
143
+ .ecwid-productsList.width-l ul li .ecwid-productsList-price
144
+ {
145
+ text-align: left;
146
+ }
147
+
148
+ .ecwid-productsList.width-l ul li .ecwid-productsList-image {
149
+ display: table-cell;
150
+ vertical-align: middle;
151
+ height: 60px;
152
+ padding: 5px;
153
+ }
154
+
155
+ .ecwid-productsList.width-l ul li .ecwid-productsList-image img {
156
+ width: auto;
157
+ max-width: 75px;
158
+ display: block;
159
+ margin: 0px auto;
160
+ }
161
+
162
+ html#ecwid_html body#ecwid_body .ecwid-productsList div.ecwid-productsList-image.ecwid-noimage {
163
+ background-position: 50% 50%;
164
+ background-size: 55px 55px;
165
+ opacity: 1;
166
+ width: 75px;
167
+ height: 60px;
168
+ padding: 5px;
169
+ }
170
+
171
+ .ecwid-productsList.width-l ul li .ecwid-productsList-name,
172
+ .ecwid-productsList.width-l ul li .ecwid-productsList-price
173
+ {
174
+ width: auto;
175
+ position: absolute;
176
+ left: 93px;
177
+ right: 0px;
178
+ overflow: hidden;
179
+ white-space: nowrap;
180
+ text-overflow: ellipsis;
181
+ }
182
+
183
+ .ecwid-productsList.width-l ul li .ecwid-productsList-name {
184
+ bottom: 50%;
185
+ margin-bottom: 4px;
186
+ }
187
+
188
+
189
+ .ecwid-productsList.width-l ul li .ecwid-productsList-price {
190
+ top: 50%;
191
+ margin-top: -2px;
192
+ }
193
+
194
+ html#ecwid_html body#ecwid_body .ecwid-productsList ul li .ecwid-productsList-price
195
+ {
196
+ font-size: 14px;
197
  }
css/recently-viewed.css CHANGED
@@ -1,114 +1,114 @@
1
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product {
2
- display: block;
3
- position: relative;
4
- opacity: .85;
5
- }
6
-
7
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:not(:first-child) {
8
- border-top: 1px solid #CCC;
9
- }
10
-
11
-
12
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price {
13
- font-size: 14px;
14
- }
15
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title {
16
- font-size: 12px;
17
- height: 2em;
18
- line-height: 1em;
19
- }
20
-
21
-
22
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product.hidden {
23
- display: none;
24
- }
25
-
26
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:hover {
27
- cursor: pointer;
28
- opacity: 1;
29
- }
30
-
31
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:active,
32
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:focus
33
- {
34
- outline: none;
35
- }
36
-
37
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title {
38
- overflow: hidden;
39
- max-height: 55px;
40
-
41
- font-size: 12px;
42
- }
43
-
44
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:hover .ecwid-title {
45
- text-decoration: underline;
46
- }
47
-
48
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product div[itemprop="offers"] {
49
- position: static;
50
- }
51
-
52
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-SingleProduct-picture img {
53
- height: auto !important;
54
- width: auto !important;
55
- max-width: 100px;
56
- max-height: 100px;
57
- margin-top: 10px !important;
58
- vertical-align: middle;
59
- }
60
-
61
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price,
62
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title,
63
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product div[itemprop="image"]
64
- {
65
- text-align: center;
66
- }
67
-
68
-
69
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product {
70
- height: 120px;
71
- }
72
-
73
-
74
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title,
75
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price {
76
- display: none;
77
- }
78
-
79
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-title,
80
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-price {
81
- display: block;
82
- position: absolute;
83
- left: 120px;
84
- text-align: left;
85
- margin-right: 5px;
86
- text-overflow: ellipsis;
87
- white-space: nowrap;
88
- }
89
-
90
-
91
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-title {
92
- top: 25px;
93
- }
94
-
95
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-price {
96
- bottom: 25px;
97
- }
98
-
99
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-SingleProduct-picture {
100
- vertical-align: middle;
101
- display: table-cell;
102
- line-height: 120px;
103
- width: 100px;
104
- padding: 0px 10px !important;
105
- }
106
-
107
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-SingleProduct-picture img {
108
- margin-top: 0px !important;
109
- }
110
-
111
- html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products li {
112
- background-image: none;
113
- }
114
-
1
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product {
2
+ display: block;
3
+ position: relative;
4
+ opacity: .85;
5
+ }
6
+
7
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:not(:first-child) {
8
+ border-top: 1px solid #CCC;
9
+ }
10
+
11
+
12
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price {
13
+ font-size: 14px;
14
+ }
15
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title {
16
+ font-size: 12px;
17
+ height: 2em;
18
+ line-height: 1em;
19
+ }
20
+
21
+
22
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product.hidden {
23
+ display: none;
24
+ }
25
+
26
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:hover {
27
+ cursor: pointer;
28
+ opacity: 1;
29
+ }
30
+
31
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:active,
32
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:focus
33
+ {
34
+ outline: none;
35
+ }
36
+
37
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title {
38
+ overflow: hidden;
39
+ max-height: 55px;
40
+
41
+ font-size: 12px;
42
+ }
43
+
44
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product:hover .ecwid-title {
45
+ text-decoration: underline;
46
+ }
47
+
48
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product div[itemprop="offers"] {
49
+ position: static;
50
+ }
51
+
52
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-SingleProduct-picture img {
53
+ height: auto !important;
54
+ width: auto !important;
55
+ max-width: 100px;
56
+ max-height: 100px;
57
+ margin-top: 10px !important;
58
+ vertical-align: middle;
59
+ }
60
+
61
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price,
62
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title,
63
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product div[itemprop="image"]
64
+ {
65
+ text-align: center;
66
+ }
67
+
68
+
69
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product {
70
+ height: 120px;
71
+ }
72
+
73
+
74
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-title,
75
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products .product .ecwid-price {
76
+ display: none;
77
+ }
78
+
79
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-title,
80
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-price {
81
+ display: block;
82
+ position: absolute;
83
+ left: 120px;
84
+ text-align: left;
85
+ margin-right: 5px;
86
+ text-overflow: ellipsis;
87
+ white-space: nowrap;
88
+ }
89
+
90
+
91
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-title {
92
+ top: 25px;
93
+ }
94
+
95
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-price {
96
+ bottom: 25px;
97
+ }
98
+
99
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-SingleProduct-picture {
100
+ vertical-align: middle;
101
+ display: table-cell;
102
+ line-height: 120px;
103
+ width: 100px;
104
+ padding: 0px 10px !important;
105
+ }
106
+
107
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products.wide .product .ecwid-SingleProduct-picture img {
108
+ margin-top: 0px !important;
109
+ }
110
+
111
+ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products li {
112
+ background-image: none;
113
+ }
114
+
css/settings.3.8.css CHANGED
@@ -1,234 +1,234 @@
1
- .ecwid-pb-view-size .main-area {
2
- border-color: rgba(30, 140, 190, 0.5);
3
- }
4
-
5
- .ecwid-pb-view-size .main-area path,
6
- .ecwid-pb-view-size .main-area rect {
7
- fill: rgb(30, 140, 190);
8
- }
9
-
10
- .ecwid-pb-view-size .bottom {
11
- margin-top: 11px;
12
- }
13
-
14
- .ecwid-settings h2 {
15
- background: none;
16
- padding-left: 12px;
17
- }
18
-
19
- .ecwid-settings hr {
20
- background: #cacaca;
21
- }
22
-
23
- .ecwid-settings .pure-control-group {
24
- margin-bottom: 22px;
25
- }
26
-
27
- .pure-form.ecwid-settings .pure-control-group label {
28
- font-size: 14px;
29
- width: 265px;
30
- }
31
-
32
- .pure-form.ecwid-settings.general-settings .pure-button-secondary,
33
- .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
34
- {
35
- color: #0074a2;
36
- }
37
-
38
- .pure-form.ecwid-settings.general-settings .pure-button-secondary:hover,
39
- .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
40
- {
41
- border-color: #0074a2;
42
- }
43
-
44
- .ecwid-settings.general-settings button {
45
- top: 1px;
46
- padding: 2px 10px 1px;
47
- height: 32px;
48
- }
49
-
50
- .ecwid-pb-view-size .ruler {
51
- background: #cacaca;
52
- }
53
-
54
-
55
- .ecwid-settings .pure-control-group.checkbox label.disabled {
56
- color: #999;
57
- }
58
-
59
- @media screen and (max-width: 782px) {
60
- .ecwid-settings.general-settings,
61
- .ecwid-settings.appearance-settings,
62
- .ecwid-settings.advanced-settings
63
- {
64
- max-width: inherit;
65
- width: inherit;
66
- }
67
-
68
- .ecwid-settings h2 {
69
- margin-bottom: 0px;
70
- }
71
-
72
- .ecwid-settings.pure-form fieldset > :not(legend) {
73
- margin-left: 0px;
74
- }
75
-
76
-
77
- .general-settings.ecwid-settings .greeting-box {
78
- height: inherit;
79
- text-align: center;
80
- }
81
-
82
- .general-settings.ecwid-settings .greeting-box > div {
83
- display: block;
84
- }
85
- .general-settings.ecwid-settings ol {
86
- padding-left: 0px;
87
- }
88
-
89
- .general-settings.ecwid-settings .section {
90
- width: 100%;
91
- }
92
-
93
- .general-settings.ecwid-settings .section .left,
94
- .general-settings.ecwid-settings .note {
95
- margin-top: 0px;
96
- }
97
-
98
- .general-settings.ecwid-settings .section .left,
99
- .general-settings.ecwid-settings .section .right {
100
- text-align: left;
101
- display: block;
102
- }
103
-
104
- .general-settings.ecwid-settings button,
105
- .general-settings.ecwid-settings #ecwid_store_id,
106
- .general-settings.ecwid-settings .pure-button {
107
- display: block;
108
- width: inherit;
109
- margin: 10px 0px 10px 0px;
110
- padding: 0px 5px;
111
- }
112
- .general-settings.ecwid-settings button,
113
- .general-settings.ecwid-settings #ecwid_store_id {
114
- width: 100%;
115
- }
116
-
117
- .general-settings.ecwid-settings .button-primary {
118
- width: 100%;
119
- text-align: center;
120
- margin-top: 10px;
121
- }
122
-
123
- .general-settings.ecwid-settings .two-buttons {
124
- position: relative;
125
- }
126
-
127
- .general-settings.ecwid-settings .two-buttons .pure-button:last-child {
128
- position: absolute;
129
- right: 0px;
130
- }
131
- .general-settings.ecwid-settings .two-buttons .pure-button {
132
- display: inline-block;
133
- min-width: 44%;
134
- width: inherit;
135
- }
136
-
137
- .general-settings.ecwid-settings input {
138
- display: block;
139
- width: 100%;
140
- }
141
-
142
- .ecwid-settings .pure-control-group {
143
- position: relative;
144
- }
145
-
146
- .appearance-settings.ecwid-settings .ecwid-pb-view-size {
147
- display: block;
148
- }
149
-
150
- .appearance-settings.ecwid-settings .ecwid-pb-view-size input {
151
- position: relative;
152
- z-index: 2;
153
- }
154
-
155
- .appearance-settings.ecwid-settings .pure-control-group.small-input input {
156
- margin: 0px auto;
157
- }
158
-
159
- .appearance-settings.ecwid-settings .ecwid-pb-view-size {
160
- margin: 0px auto 33px;
161
- padding: 0px;
162
- }
163
-
164
- .appearance-settings.ecwid-settings .ecwid-pb-view-size .ruler {
165
- z-index: 1;
166
- position: absolute;
167
- }
168
-
169
- .appearance-settings.ecwid-settings .ecwid-pb-view-size .bottom {
170
- margin-top: 5px;
171
- }
172
-
173
- .appearance-settings.ecwid-settings .ecwid-pb-view-size.list,
174
- .appearance-settings.ecwid-settings .ecwid-pb-view-size.table {
175
- margin-bottom: 0px;
176
- }
177
-
178
- .appearance-settings.ecwid-settings .note.pb-note {
179
- margin: 0px;
180
- }
181
-
182
- .appearance-settings.ecwid-settings select {
183
- width: 100%;
184
- }
185
-
186
- .advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) label {
187
- margin-top:35px;
188
- }
189
-
190
- .advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) input,
191
- .advanced-settings.ecwid-settings select {
192
- width: 100%;
193
- }
194
-
195
- .advanced-settings.ecwid-settings label {
196
- margin-bottom: 10px;
197
- }
198
-
199
- .advanced-settings.ecwid-settings .note {
200
- margin-top: 5px;
201
- }
202
-
203
- .ecwid-settings fieldset {
204
- min-width: 0px !important;
205
- }
206
-
207
- .ecwid-pb-view-size .bottom .ruler {
208
- bottom: 15px;
209
- }
210
- .ecwid-settings .pure-control-group.small-input .input > div,
211
- .ecwid-settings .pure-control-group.small-input .input input,
212
- .ecwid-settings .pure-control-group.small-input .label > label {
213
- position: static;
214
- }
215
-
216
- .ecwid-settings .pure-control-group.small-input .label,
217
- .ecwid-settings .pure-control-group.small-input .label label {
218
- width: auto;
219
- margin-bottom: 0px;
220
- }
221
-
222
- .ecwid-settings .pure-control-group.small-input .note {
223
- display: block;
224
- position: relative;
225
- left: 45px;
226
- margin-right: 45px;
227
- }
228
-
229
- .ecwid-settings .pure-control-group.checkbox label {
230
- display: inline-block;
231
- }
232
-
233
- }
234
-
1
+ .ecwid-pb-view-size .main-area {
2
+ border-color: rgba(30, 140, 190, 0.5);
3
+ }
4
+
5
+ .ecwid-pb-view-size .main-area path,
6
+ .ecwid-pb-view-size .main-area rect {
7
+ fill: rgb(30, 140, 190);
8
+ }
9
+
10
+ .ecwid-pb-view-size .bottom {
11
+ margin-top: 11px;
12
+ }
13
+
14
+ .ecwid-settings h2 {
15
+ background: none;
16
+ padding-left: 12px;
17
+ }
18
+
19
+ .ecwid-settings hr {
20
+ background: #cacaca;
21
+ }
22
+
23
+ .ecwid-settings .pure-control-group {
24
+ margin-bottom: 22px;
25
+ }
26
+
27
+ .pure-form.ecwid-settings .pure-control-group label {
28
+ font-size: 14px;
29
+ width: 265px;
30
+ }
31
+
32
+ .pure-form.ecwid-settings.general-settings .pure-button-secondary,
33
+ .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
34
+ {
35
+ color: #0074a2;
36
+ }
37
+
38
+ .pure-form.ecwid-settings.general-settings .pure-button-secondary:hover,
39
+ .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
40
+ {
41
+ border-color: #0074a2;
42
+ }
43
+
44
+ .ecwid-settings.general-settings button {
45
+ top: 1px;
46
+ padding: 2px 10px 1px;
47
+ height: 32px;
48
+ }
49
+
50
+ .ecwid-pb-view-size .ruler {
51
+ background: #cacaca;
52
+ }
53
+
54
+
55
+ .ecwid-settings .pure-control-group.checkbox label.disabled {
56
+ color: #999;
57
+ }
58
+
59
+ @media screen and (max-width: 782px) {
60
+ .ecwid-settings.general-settings,
61
+ .ecwid-settings.appearance-settings,
62
+ .ecwid-settings.advanced-settings
63
+ {
64
+ max-width: inherit;
65
+ width: inherit;
66
+ }
67
+
68
+ .ecwid-settings h2 {
69
+ margin-bottom: 0px;
70
+ }
71
+
72
+ .ecwid-settings.pure-form fieldset > :not(legend) {
73
+ margin-left: 0px;
74
+ }
75
+
76
+
77
+ .general-settings.ecwid-settings .greeting-box {
78
+ height: inherit;
79
+ text-align: center;
80
+ }
81
+
82
+ .general-settings.ecwid-settings .greeting-box > div {
83
+ display: block;
84
+ }
85
+ .general-settings.ecwid-settings ol {
86
+ padding-left: 0px;
87
+ }
88
+
89
+ .general-settings.ecwid-settings .section {
90
+ width: 100%;
91
+ }
92
+
93
+ .general-settings.ecwid-settings .section .left,
94
+ .general-settings.ecwid-settings .note {
95
+ margin-top: 0px;
96
+ }
97
+
98
+ .general-settings.ecwid-settings .section .left,
99
+ .general-settings.ecwid-settings .section .right {
100
+ text-align: left;
101
+ display: block;
102
+ }
103
+
104
+ .general-settings.ecwid-settings button,
105
+ .general-settings.ecwid-settings #ecwid_store_id,
106
+ .general-settings.ecwid-settings .pure-button {
107
+ display: block;
108
+ width: inherit;
109
+ margin: 10px 0px 10px 0px;
110
+ padding: 0px 5px;
111
+ }
112
+ .general-settings.ecwid-settings button,
113
+ .general-settings.ecwid-settings #ecwid_store_id {
114
+ width: 100%;
115
+ }
116
+
117
+ .general-settings.ecwid-settings .button-primary {
118
+ width: 100%;
119
+ text-align: center;
120
+ margin-top: 10px;
121
+ }
122
+
123
+ .general-settings.ecwid-settings .two-buttons {
124
+ position: relative;
125
+ }
126
+
127
+ .general-settings.ecwid-settings .two-buttons .pure-button:last-child {
128
+ position: absolute;
129
+ right: 0px;
130
+ }
131
+ .general-settings.ecwid-settings .two-buttons .pure-button {
132
+ display: inline-block;
133
+ min-width: 44%;
134
+ width: inherit;
135
+ }
136
+
137
+ .general-settings.ecwid-settings input {
138
+ display: block;
139
+ width: 100%;
140
+ }
141
+
142
+ .ecwid-settings .pure-control-group {
143
+ position: relative;
144
+ }
145
+
146
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size {
147
+ display: block;
148
+ }
149
+
150
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size input {
151
+ position: relative;
152
+ z-index: 2;
153
+ }
154
+
155
+ .appearance-settings.ecwid-settings .pure-control-group.small-input input {
156
+ margin: 0px auto;
157
+ }
158
+
159
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size {
160
+ margin: 0px auto 33px;
161
+ padding: 0px;
162
+ }
163
+
164
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size .ruler {
165
+ z-index: 1;
166
+ position: absolute;
167
+ }
168
+
169
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size .bottom {
170
+ margin-top: 5px;
171
+ }
172
+
173
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size.list,
174
+ .appearance-settings.ecwid-settings .ecwid-pb-view-size.table {
175
+ margin-bottom: 0px;
176
+ }
177
+
178
+ .appearance-settings.ecwid-settings .note.pb-note {
179
+ margin: 0px;
180
+ }
181
+
182
+ .appearance-settings.ecwid-settings select {
183
+ width: 100%;
184
+ }
185
+
186
+ .advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) label {
187
+ margin-top:35px;
188
+ }
189
+
190
+ .advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) input,
191
+ .advanced-settings.ecwid-settings select {
192
+ width: 100%;
193
+ }
194
+
195
+ .advanced-settings.ecwid-settings label {
196
+ margin-bottom: 10px;
197
+ }
198
+
199
+ .advanced-settings.ecwid-settings .note {
200
+ margin-top: 5px;
201
+ }
202
+
203
+ .ecwid-settings fieldset {
204
+ min-width: 0px !important;
205
+ }
206
+
207
+ .ecwid-pb-view-size .bottom .ruler {
208
+ bottom: 15px;
209
+ }
210
+ .ecwid-settings .pure-control-group.small-input .input > div,
211
+ .ecwid-settings .pure-control-group.small-input .input input,
212
+ .ecwid-settings .pure-control-group.small-input .label > label {
213
+ position: static;
214
+ }
215
+
216
+ .ecwid-settings .pure-control-group.small-input .label,
217
+ .ecwid-settings .pure-control-group.small-input .label label {
218
+ width: auto;
219
+ margin-bottom: 0px;
220
+ }
221
+
222
+ .ecwid-settings .pure-control-group.small-input .note {
223
+ display: block;
224
+ position: relative;
225
+ left: 45px;
226
+ margin-right: 45px;
227
+ }
228
+
229
+ .ecwid-settings .pure-control-group.checkbox label {
230
+ display: inline-block;
231
+ }
232
+
233
+ }
234
+
css/settings.css CHANGED
@@ -1,769 +1,769 @@
1
- .pure-form.ecwid-settings fieldset {
2
- font-size: 14px;
3
- }
4
-
5
- .pure-form.ecwid-settings fieldset > :not(legend) {
6
- margin-left:14px;
7
- }
8
-
9
- .pure-form.ecwid-settings .pure-button {
10
- height: auto;
11
- line-height: 32px;
12
- padding: 0px 20px;
13
- font-size: 14px;
14
- background-image: none;
15
- background-color: #f6f6f6;
16
- font-weight: normal;
17
- color: #333333;
18
- border: 1px solid #cccccc;
19
- border-radius: 3px;
20
- }
21
-
22
- .pure-form.ecwid-settings .pure-button-secondary {
23
- font-weight: bold;
24
- color: #246fba;
25
- }
26
-
27
- .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover {
28
- border-color: #137ebe;
29
- color: #137ebe;
30
- }
31
-
32
- .pure-form.ecwid-settings .pure-button.pure-button-primary {
33
- color: white;
34
- font-weight: normal;
35
- border-color: #189DEE;
36
- background-color: #189DEE;
37
- }
38
-
39
- .pure-form.ecwid-settings .pure-button.pure-button-primary:hover {
40
- border-color: #137ebe;
41
- background-color: #137ebe;
42
- }
43
-
44
- .pure-form.ecwid-settings .link {
45
- border: 0px none;
46
- background: transparent;
47
- box-shadow: none;
48
- }
49
-
50
- .pure-control-group.small-input > div {
51
- display: table-cell;
52
- vertical-align: middle;
53
- position: relative;
54
- }
55
-
56
- .pure-control-group.small-input .label {
57
- width: 265px;
58
- font-weight: bold;
59
- }
60
-
61
- .pure-control-group.small-input .input > div {
62
- width: 45px;
63
- text-align: center;
64
- vertical-align: middle;
65
- z-index: 10;
66
- position: relative;
67
- left: 265px;
68
- }
69
-
70
- .pure-control-group.small-input .input input {
71
- margin: 0px auto;
72
- }
73
-
74
- .pure-control-group.small-input .label > * {
75
- position: relative;
76
- left: -45px;
77
- }
78
-
79
- /* 2.8 compatibility for left menu icon */
80
- .wp-menu-image>a>img {
81
- display: none;
82
- }
83
-
84
- @media screen and (max-width: 782px) {
85
- .ecwid-settings {
86
- width: 100%;
87
- }
88
- }
89
-
90
- .ecwid-settings {
91
- width: 650px;
92
- }
93
-
94
- .ecwid-settings .pure-control-group {
95
- margin-bottom: 19px;
96
- }
97
-
98
- .ecwid-settings legend {
99
- margin-bottom: 10px;
100
- }
101
-
102
- .ecwid-settings hr {
103
- margin-left: 0px;
104
- border: 0px none;
105
- height: 1px;
106
- background: #e5e5e5;
107
- margin-bottom: 20px;
108
- }
109
-
110
- .pure-form.ecwid-settings .pure-control-group label {
111
- width: 232px;
112
- font-weight: bold;
113
- text-align: left;
114
- margin-right: 5px;
115
- }
116
-
117
- .ecwid-settings.general-settings button {
118
- position: relative;
119
- top: 2px;
120
- padding: 5px 31px 5px 31px;
121
- margin-left: 5px;
122
- }
123
-
124
- .ecwid-settings.general-settings hr {
125
- margin-bottom: 6px;
126
- }
127
-
128
- .ecwid-settings .warning {
129
- background: #FFF797;
130
- font-size: 12px;
131
- padding: 8px 14px 8px 14px;
132
- font-weight: bold;
133
- color: #444444;
134
- }
135
-
136
- .ecwid-settings.appearance-settings h3 {
137
- font-size: 12px;
138
- }
139
-
140
- .ecwid-settings.appearance-settings input[type=text] {
141
- font-size: 13px;
142
- padding: 5px 3px 4px 3px;
143
- outline-offset: 0px;
144
- }
145
-
146
- .ecwid-settings input[type=text].number {
147
- width: 27px;
148
- text-align: center;
149
- }
150
-
151
- .ecwid-settings select {
152
- padding: 5px;
153
- }
154
-
155
- .ecwid-settings .note.pb-note {
156
- margin-right: 30px;
157
- margin-left: 30px;
158
- }
159
-
160
- .ecwid-settings.appearance-settings {
161
- max-width: 650px;
162
- }
163
-
164
- .ecwid-settings.appearance-settings .products-per-page-label {
165
- padding-top: 5px;
166
- padding-bottom: 15px;
167
- display: block;
168
- }
169
-
170
- .ecwid-settings.appearance-settings input[type=checkbox] {
171
- margin-right: 3px;
172
- margin-left: 7px;
173
- }
174
-
175
- .ecwid-pb-view-size {
176
- display: inline-block;
177
- position: relative;
178
- width: 153px;
179
- height: 153px;
180
- margin-left: 30px;
181
- margin-right: 25px;
182
- }
183
-
184
- .ecwid-pb-view-size .title {
185
- margin: 8px;
186
- width: 110px;
187
- text-align: center;
188
- }
189
-
190
- .ecwid-pb-view-size * {
191
- transition: background-image .3s, border-color .3s, font-weight .3s;
192
- }
193
-
194
-
195
- .ecwid-pb-view-size .main-area {
196
- width: 116px;
197
- height: 82px;
198
- border: 2px solid rgb(125, 209, 227);
199
- border-color: rgba(125, 209, 227, .5);
200
- border-radius: 2px;
201
- float: left;
202
- background-position: 50% 50%;
203
- background-repeat: no-repeat;
204
- text-align: center;
205
- }
206
-
207
- .ecwid-pb-view-size .main-area svg {
208
- margin-top: 7px;
209
- }
210
-
211
- .ecwid-pb-view-size .main-area path,
212
- .ecwid-pb-view-size .main-area rect {
213
- fill: rgb(125, 209, 227);
214
- }
215
-
216
- .ecwid-pb-view-size .fallback-image {
217
- width: 100px;
218
- height: 66px;
219
- background-repeat: no-repeat;
220
- margin-top:7px;
221
- margin-left:8px;
222
- }
223
-
224
- .ecwid-pb-view-size .grid-image {
225
- background-image: url(../images/grid.png);
226
- }
227
-
228
- .ecwid-pb-view-size .list-image {
229
- background-image: url(../images/list.png);
230
- }
231
-
232
- .ecwid-pb-view-size .table-image {
233
- background-image: url(../images/table.png);
234
- }
235
-
236
- .ecwid-pb-view-size .right {
237
- height:86px;
238
- float: right;
239
- position: relative;
240
- }
241
-
242
- .ecwid-pb-view-size .right input
243
- {
244
- margin-top: 30px;
245
- }
246
-
247
- .ecwid-pb-view-size .bottom input
248
- {
249
- margin-left: 48px;
250
- }
251
-
252
- .ecwid-pb-view-size .bottom {
253
- width: 120px;
254
- margin-top: 8px;
255
- position: absolute;
256
- top: 114px;
257
- }
258
-
259
- .ecwid-pb-view-size .ruler {
260
- position: absolute;
261
- background: #cccccc;
262
- z-index: -1;
263
- }
264
-
265
- .ecwid-pb-view-size .right .ruler {
266
- width: 1px;
267
- height: 100%;
268
- right: 13px;
269
- }
270
-
271
- .ecwid-pb-view-size .bottom .ruler {
272
- width: 100%;
273
- height: 1px;
274
- bottom: 12px;
275
- }
276
-
277
- .ecwid-settings.advanced-settings .pure-control-group {
278
- margin-bottom: 20px;
279
- }
280
-
281
- .ecwid-settings.advanced-settings .pure-control-group.last {
282
- margin-bottom: 0px;
283
- }
284
-
285
- .ecwid-settings.advanced-settings .pure-control-group input:not([type=checkbox]),
286
- .ecwid-settings.advanced-settings select
287
- {
288
- width: 200px;
289
- height: 30px;
290
- margin-right: 15px;
291
- font-size: 13px;
292
- border-color: #cacaca;
293
- }
294
-
295
- .ecwid-settings.advanced-settings .note {
296
- margin-top: 15px;
297
- }
298
-
299
- .ecwid-settings.advanced-settings sup {
300
- color: #298CBA;
301
- }
302
-
303
- .ecwid-settings.advanced-settings .pure-control-group.hidden,
304
- .ecwid-settings.advanced-settings hr.hidden {
305
- display: none;
306
- }
307
-
308
- .ecwid-settings .note.inline-note {
309
- max-width: 300px;
310
- margin-left: 15px;
311
- vertical-align: middle;
312
- }
313
-
314
- .ecwid-settings .note.grayed-links,
315
- .ecwid-settings .note.grayed-links a:not(:hover)
316
- {
317
- font-size: 11px;
318
- color: #A0A0A0;
319
- margin-top:10px;
320
- margin-bottom: 10px;
321
- }
322
-
323
- /* Common main */
324
- .ecwid-admin {
325
- margin-left: 20px;
326
- }
327
- .ecwid-admin .box {
328
- position: relative;
329
- margin-top: 25px;
330
-
331
- border: 1px solid #E5E5E5;
332
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
333
- background: #FFF;
334
- }
335
-
336
-
337
- .ecwid-admin h2:before {
338
- background: url(../images/ecwid_logo_symbol_RGB.svg);
339
- width: 100px;
340
- height: 20px;
341
- border: 2px solid blue;
342
- }
343
-
344
- .ecwid-admin h3 {
345
- position: relative;
346
- padding: 0px;
347
- margin: 0px;
348
- left: 60px;
349
-
350
- display: inline-block;
351
- height: 70px;
352
- line-height: 70px;
353
-
354
- text-align: left;
355
-
356
- font-size: 18px;
357
- font-weight: normal;
358
- }
359
-
360
- .ecwid-admin .head {
361
- border-bottom: 1px solid #E5E5E5;
362
- height: 70px;
363
- }
364
-
365
- .ecwid-admin .box .head {
366
- text-align: left;
367
- margin-bottom: 20px;
368
- }
369
-
370
- .ecwid-admin .head svg {
371
- width: 32px;
372
- height: 32px;
373
- position: absolute;
374
- top: 20px;
375
- left: 20px;
376
- margin-right: 10px;
377
- }
378
- /* END Common main */
379
-
380
-
381
- /* CONNECT - positioning */
382
- .ecwid-connect .box > div {
383
- margin: 0px auto;
384
- text-align: center;
385
- }
386
-
387
- .ecwid-connect .box h3 + div {
388
- margin-top: 40px;
389
- }
390
-
391
- .ecwid-connect .box div:last-child {
392
- margin-bottom: 40px;
393
- }
394
-
395
- .ecwid-connect .box .greeting-message {
396
- margin-top: 11px;
397
- line-height: 1.3em;
398
- margin-bottom: 38px;
399
- }
400
-
401
-
402
- .ecwid-connect.ecwid-reconnect .box .greeting-message {
403
- margin-bottom: 15px;
404
- }
405
-
406
- .ecwid-connect .box .connect-button {
407
- margin-top: 8px;
408
- margin-bottom: 15px;
409
- }
410
- .ecwid-connect .where-to-find-store-id {
411
- margin-top: 25px;
412
- margin-bottom: 0;
413
- }
414
-
415
- .ecwid-connect .box .note {
416
- margin-top: 6px;
417
- max-width: 760px;
418
- font-size: 13px;
419
- }
420
-
421
- .ecwid-connect .box .note.reconnect-message {
422
- margin-bottom: 38px;
423
- color: #707070;
424
- }
425
- .ecwid-connect .box .create-account-link {
426
- margin-top: 35px;
427
- }
428
-
429
-
430
- /* CONNECT - styles */
431
- .ecwid-connect .box .greeting-message {
432
- font-size: 24px;
433
- font-weight: lighter;
434
- }
435
-
436
- .ecwid-connect .box .connect-button a {
437
- padding: 14px 40px;
438
- border: 0px none;
439
- border-radius: 4px;
440
-
441
- background: #59bb00;
442
- color: white;
443
- font-size: 18px;
444
- font-weight: lighter;
445
- text-decoration: none;
446
-
447
- transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
448
- display: inline-block;
449
-
450
- white-space: nowrap;
451
- }
452
-
453
- .ecwid-connect .box .connect-button a:hover {
454
- background: #64A52F;
455
- }
456
-
457
- .ecwid-connect .box .note {
458
- color: #A0A0A0;
459
- line-height: 18px;
460
- max-width: 400px;
461
- }
462
-
463
- .ecwid-connect .box .note.initial {
464
- }
465
-
466
- .ecwid-connect .box .note.auth-error {
467
- max-width: 350px;
468
- color: red;
469
- }
470
-
471
- /* wpcontent to stress the rule without using !mportant */
472
- #wpcontent .ecwid-connect.no-oauth .with-oauth,
473
- #wpcontent .ecwid-connect.with-oauth .no-oauth
474
- {
475
- display: none;
476
- }
477
-
478
- .ecwid-connect .connect-store-id {
479
-
480
- }
481
-
482
- .ecwid-connect #ecwid-store-id {
483
- line-height: 38px;
484
- width: 260px;
485
- border-radius: 4px;
486
- font-size: 16px;
487
- font-weight: lighter;
488
- padding-left: 10px;
489
- font-family: 'Open Sans';
490
- }
491
-
492
- .ecwid-connect .box .create-account-link a {
493
- text-decoration: none;
494
- font-size: 14px;
495
- }
496
-
497
- .ecwid-dashboard .body {
498
- padding: 70px 50px;
499
- }
500
-
501
- .ecwid-dashboard .greeting-image {
502
- padding-right: 37px;
503
- display: table-cell;
504
- }
505
-
506
- .ecwid-dashboard .greeting {
507
- display: table-cell;
508
- vertical-align: middle;
509
- }
510
-
511
- .ecwid-dashboard .greeting .greeting-title {
512
- font-size: 24px;
513
- margin-bottom: 12px;
514
- }
515
-
516
- .ecwid-dashboard .greeting .greeting-message {
517
- font-size: 16px;
518
- margin-bottom: 5px;
519
- line-height: 1.3em;
520
- }
521
-
522
- .ecwid-dashboard .drop-down.store-id {
523
- font-size: 14px;
524
- padding: 10px 16px;
525
- position: absolute;
526
- right: 6px;
527
- top: 13px;
528
- line-height: 20px;
529
- display: inline-block;
530
- border: 1px solid transparent;
531
- border-bottom: none;
532
- height: 21px;
533
-
534
- cursor: pointer;
535
- }
536
-
537
- .ecwid-dashboard .drop-down.store-id.hover {
538
- cursor: default;
539
- }
540
-
541
- .ecwid-dashboard .drop-down.hover
542
- {
543
- border: 1px solid #CCC;
544
- border-bottom: none;
545
- background: white;
546
- }
547
-
548
- .ecwid-dashboard .store-id a {
549
- text-decoration: none;
550
- }
551
-
552
- .ecwid-dashboard .drop-down > *:first-child:after {
553
- font-family: 'dashicons';
554
- content: '\f347';
555
- position: relative;
556
- top: .2em;
557
- font-weight: lighter;
558
- }
559
-
560
- .ecwid-dashboard .drop-down.hover > *:first-child:after {
561
- font-family: 'dashicons';
562
- content: '\f343';
563
- }
564
-
565
-
566
- .ecwid-dashboard .drop-down > *:first-child {
567
- color: #0074A2;
568
- white-space: nowrap;
569
- }
570
-
571
- .ecwid-dashboard .drop-down > *:first-child:hover {
572
- color: #2EA2CC;
573
- }
574
-
575
- .ecwid-dashboard .drop-down {
576
- position: relative;
577
- }
578
-
579
- .ecwid-dashboard .drop-down.hover {
580
- color: #2EA2CC;
581
- }
582
-
583
- .ecwid-dashboard .drop-down ul
584
- {
585
- display: none;
586
- }
587
- .ecwid-dashboard .drop-down.hover ul
588
- {
589
- display: inline-block;
590
- }
591
-
592
-
593
- .ecwid-dashboard .drop-down ul {
594
- position: absolute;
595
- top: 100%;
596
- width: 100%;
597
- font-size: 14px;
598
- left: 0px;
599
- margin: 0px;
600
- padding-left: 0px;
601
-
602
- outline: 1px solid #ccc;
603
- }
604
-
605
- .ecwid-dashboard .drop-down ul li {
606
- border-bottom: 1px solid #ccc;
607
- margin-bottom: 0;
608
- background: white;
609
- text-align: left;
610
- }
611
-
612
- .ecwid-dashboard .drop-down ul li:last-child {
613
- border-bottom: none;
614
- }
615
-
616
-
617
- .ecwid-dashboard .drop-down ul a {
618
- display: block;
619
- padding: 10px 16px;
620
- text-decoration: none;
621
- }
622
-
623
- .ecwid-dashboard .drop-down ul li:hover {
624
- background: #0074A2;
625
- }
626
-
627
- .ecwid-dashboard .drop-down ul li:hover a {
628
- color: white;
629
- }
630
-
631
- .ecwid-dashboard .drop-down * {
632
- transition: color .2s, background .2s;
633
- }
634
-
635
- .ecwid-dashboard .greeting-links {
636
- padding-left: 0px;
637
- margin-top: 5px;
638
- }
639
-
640
- .ecwid-dashboard .greeting-links > * {
641
- display: inline-block;
642
- margin: 15px 15px;
643
- }
644
-
645
- .ecwid-dashboard .greeting-links > *:first-child {
646
- margin-left: 0;
647
- }
648
-
649
- .ecwid-dashboard .greeting-links a {
650
- text-decoration: none;
651
- font-size: 14px;
652
- }
653
-
654
- .ecwid-dashboard.width-smaller .head {
655
- height: 74px;
656
- }
657
-
658
- .ecwid-dashboard.width-smaller .head svg {
659
- left: 20px;
660
- top: 24px;
661
- }
662
-
663
- .ecwid-dashboard.width-smaller .head h3 {
664
- left: 68px;
665
- top: -4px;
666
- }
667
-
668
- .ecwid-dashboard.width-smaller .store-id {
669
- right: inherit;
670
- left: 51px;
671
- top: 30px;
672
- }
673
-
674
- .ecwid-dashboard.width-smaller .body {
675
- text-align: center;
676
- padding: 20px 0px;
677
- }
678
-
679
- .ecwid-dashboard.width-smaller .greeting-image,
680
- .ecwid-dashboard.width-smaller .greeting
681
- {
682
- display: block;
683
- padding-right: 0px;
684
- }
685
-
686
- .ecwid-dashboard.width-smaller .greeting-title {
687
- margin-top: 10px;
688
- }
689
-
690
-
691
- .ecwid-admin .mobile-br br {
692
- display: none;
693
- }
694
-
695
- .ecwid-admin.width-smaller .mobile-br br {
696
- display: inherit;
697
- }
698
-
699
- .ecwid-popup {
700
- position: fixed;
701
- left: 170px;
702
- top: 42px;
703
- right: 10px;
704
- bottom: 10px;
705
- }
706
-
707
- .ecwid-popup .wrap {
708
- margin: 0px;
709
- }
710
-
711
- .ecwid-popup .box {
712
- margin: 0px;
713
- position: absolute;
714
- left: 0;
715
- right: 0;
716
- top: 0;
717
- bottom: 0;
718
- }
719
- .ecwid-popup h3 span.close {
720
- position: absolute;
721
- right: 15px;
722
- cursor: pointer;
723
- color: #2EA2CC;
724
- }
725
-
726
- .ecwid-popup h3 span.close:before {
727
- content: "\e606";
728
- font-family: ecwid-plugin-icons;
729
- font-size: 36px;
730
- }
731
-
732
- .ecwid-button.button-green {
733
- background: #29b80a;
734
- color: white;
735
- border-color: #199806;
736
- padding: 0 10px;
737
- margin-top: 10px;
738
- }
739
-
740
- .ecwid-button.button-green:hover {
741
- background: #2cc40b;
742
- color: white;
743
- }
744
-
745
- label.premium-feature svg {
746
- height: 10px;
747
- width: 10px;
748
- display:inline-block;
749
- }
750
-
751
- label.premium-feature svg path {
752
- fill: #f9af17;
753
- }
754
-
755
-
756
- @media screen and (max-width: 960px) {
757
- .ecwid-popup {
758
- left: 44px;
759
- }
760
- }
761
-
762
- @media screen and (max-width: 782px) {
763
- .ecwid-popup {
764
- left: 0px;
765
- right: 0px;
766
- top: 46px;
767
- bottom: 0px;
768
- }
769
  }
1
+ .pure-form.ecwid-settings fieldset {
2
+ font-size: 14px;
3
+ }
4
+
5
+ .pure-form.ecwid-settings fieldset > :not(legend) {
6
+ margin-left:14px;
7
+ }
8
+
9
+ .pure-form.ecwid-settings .pure-button {
10
+ height: auto;
11
+ line-height: 32px;
12
+ padding: 0px 20px;
13
+ font-size: 14px;
14
+ background-image: none;
15
+ background-color: #f6f6f6;
16
+ font-weight: normal;
17
+ color: #333333;
18
+ border: 1px solid #cccccc;
19
+ border-radius: 3px;
20
+ }
21
+
22
+ .pure-form.ecwid-settings .pure-button-secondary {
23
+ font-weight: bold;
24
+ color: #246fba;
25
+ }
26
+
27
+ .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover {
28
+ border-color: #137ebe;
29
+ color: #137ebe;
30
+ }
31
+
32
+ .pure-form.ecwid-settings .pure-button.pure-button-primary {
33
+ color: white;
34
+ font-weight: normal;
35
+ border-color: #189DEE;
36
+ background-color: #189DEE;
37
+ }
38
+
39
+ .pure-form.ecwid-settings .pure-button.pure-button-primary:hover {
40
+ border-color: #137ebe;
41
+ background-color: #137ebe;
42
+ }
43
+
44
+ .pure-form.ecwid-settings .link {
45
+ border: 0px none;
46
+ background: transparent;
47
+ box-shadow: none;
48
+ }
49
+
50
+ .pure-control-group.small-input > div {
51
+ display: table-cell;
52
+ vertical-align: middle;
53
+ position: relative;
54
+ }
55
+
56
+ .pure-control-group.small-input .label {
57
+ width: 265px;
58
+ font-weight: bold;
59
+ }
60
+
61
+ .pure-control-group.small-input .input > div {
62
+ width: 45px;
63
+ text-align: center;
64
+ vertical-align: middle;
65
+ z-index: 10;
66
+ position: relative;
67
+ left: 265px;
68
+ }
69
+
70
+ .pure-control-group.small-input .input input {
71
+ margin: 0px auto;
72
+ }
73
+
74
+ .pure-control-group.small-input .label > * {
75
+ position: relative;
76
+ left: -45px;
77
+ }
78
+
79
+ /* 2.8 compatibility for left menu icon */
80
+ .wp-menu-image>a>img {
81
+ display: none;
82
+ }
83
+
84
+ @media screen and (max-width: 782px) {
85
+ .ecwid-settings {
86
+ width: 100%;
87
+ }
88
+ }
89
+
90
+ .ecwid-settings {
91
+ width: 650px;
92
+ }
93
+
94
+ .ecwid-settings .pure-control-group {
95
+ margin-bottom: 19px;
96
+ }
97
+
98
+ .ecwid-settings legend {
99
+ margin-bottom: 10px;
100
+ }
101
+
102
+ .ecwid-settings hr {
103
+ margin-left: 0px;
104
+ border: 0px none;
105
+ height: 1px;
106
+ background: #e5e5e5;
107
+ margin-bottom: 20px;
108
+ }
109
+
110
+ .pure-form.ecwid-settings .pure-control-group label {
111
+ width: 232px;
112
+ font-weight: bold;
113
+ text-align: left;
114
+ margin-right: 5px;
115
+ }
116
+
117
+ .ecwid-settings.general-settings button {
118
+ position: relative;
119
+ top: 2px;
120
+ padding: 5px 31px 5px 31px;
121
+ margin-left: 5px;
122
+ }
123
+
124
+ .ecwid-settings.general-settings hr {
125
+ margin-bottom: 6px;
126
+ }
127
+
128
+ .ecwid-settings .warning {
129
+ background: #FFF797;
130
+ font-size: 12px;
131
+ padding: 8px 14px 8px 14px;
132
+ font-weight: bold;
133
+ color: #444444;
134
+ }
135
+
136
+ .ecwid-settings.appearance-settings h3 {
137
+ font-size: 12px;
138
+ }
139
+
140
+ .ecwid-settings.appearance-settings input[type=text] {
141
+ font-size: 13px;
142
+ padding: 5px 3px 4px 3px;
143
+ outline-offset: 0px;
144
+ }
145
+
146
+ .ecwid-settings input[type=text].number {
147
+ width: 27px;
148
+ text-align: center;
149
+ }
150
+
151
+ .ecwid-settings select {
152
+ padding: 5px;
153
+ }
154
+
155
+ .ecwid-settings .note.pb-note {
156
+ margin-right: 30px;
157
+ margin-left: 30px;
158
+ }
159
+
160
+ .ecwid-settings.appearance-settings {
161
+ max-width: 650px;
162
+ }
163
+
164
+ .ecwid-settings.appearance-settings .products-per-page-label {
165
+ padding-top: 5px;
166
+ padding-bottom: 15px;
167
+ display: block;
168
+ }
169
+
170
+ .ecwid-settings.appearance-settings input[type=checkbox] {
171
+ margin-right: 3px;
172
+ margin-left: 7px;
173
+ }
174
+
175
+ .ecwid-pb-view-size {
176
+ display: inline-block;
177
+ position: relative;
178
+ width: 153px;
179
+ height: 153px;
180
+ margin-left: 30px;
181
+ margin-right: 25px;
182
+ }
183
+
184
+ .ecwid-pb-view-size .title {
185
+ margin: 8px;
186
+ width: 110px;
187
+ text-align: center;
188
+ }
189
+
190
+ .ecwid-pb-view-size * {
191
+ transition: background-image .3s, border-color .3s, font-weight .3s;
192
+ }
193
+
194
+
195
+ .ecwid-pb-view-size .main-area {
196
+ width: 116px;
197
+ height: 82px;
198
+ border: 2px solid rgb(125, 209, 227);
199
+ border-color: rgba(125, 209, 227, .5);
200
+ border-radius: 2px;
201
+ float: left;
202
+ background-position: 50% 50%;
203
+ background-repeat: no-repeat;
204
+ text-align: center;
205
+ }
206
+
207
+ .ecwid-pb-view-size .main-area svg {
208
+ margin-top: 7px;
209
+ }
210
+
211
+ .ecwid-pb-view-size .main-area path,
212
+ .ecwid-pb-view-size .main-area rect {
213
+ fill: rgb(125, 209, 227);
214
+ }
215
+
216
+ .ecwid-pb-view-size .fallback-image {
217
+ width: 100px;
218
+ height: 66px;
219
+ background-repeat: no-repeat;
220
+ margin-top:7px;
221
+ margin-left:8px;
222
+ }
223
+
224
+ .ecwid-pb-view-size .grid-image {
225
+ background-image: url(../images/grid.png);
226
+ }
227
+
228
+ .ecwid-pb-view-size .list-image {
229
+ background-image: url(../images/list.png);
230
+ }
231
+
232
+ .ecwid-pb-view-size .table-image {
233
+ background-image: url(../images/table.png);
234
+ }
235
+
236
+ .ecwid-pb-view-size .right {
237
+ height:86px;
238
+ float: right;
239
+ position: relative;
240
+ }
241
+
242
+ .ecwid-pb-view-size .right input
243
+ {
244
+ margin-top: 30px;
245
+ }
246
+
247
+ .ecwid-pb-view-size .bottom input
248
+ {
249
+ margin-left: 48px;
250
+ }
251
+
252
+ .ecwid-pb-view-size .bottom {
253
+ width: 120px;
254
+ margin-top: 8px;
255
+ position: absolute;
256
+ top: 114px;
257
+ }
258
+
259
+ .ecwid-pb-view-size .ruler {
260
+ position: absolute;
261
+ background: #cccccc;
262
+ z-index: -1;
263
+ }
264
+
265
+ .ecwid-pb-view-size .right .ruler {
266
+ width: 1px;
267
+ height: 100%;
268
+ right: 13px;
269
+ }
270
+
271
+ .ecwid-pb-view-size .bottom .ruler {
272
+ width: 100%;
273
+ height: 1px;
274
+ bottom: 12px;
275
+ }
276
+
277
+ .ecwid-settings.advanced-settings .pure-control-group {
278
+ margin-bottom: 20px;
279
+ }
280
+
281
+ .ecwid-settings.advanced-settings .pure-control-group.last {
282
+ margin-bottom: 0px;
283
+ }
284
+
285
+ .ecwid-settings.advanced-settings .pure-control-group input:not([type=checkbox]),
286
+ .ecwid-settings.advanced-settings select
287
+ {
288
+ width: 200px;
289
+ height: 30px;
290
+ margin-right: 15px;
291
+ font-size: 13px;
292
+ border-color: #cacaca;
293
+ }
294
+
295
+ .ecwid-settings.advanced-settings .note {
296
+ margin-top: 15px;
297
+ }
298
+
299
+ .ecwid-settings.advanced-settings sup {
300
+ color: #298CBA;
301
+ }
302
+
303
+ .ecwid-settings.advanced-settings .pure-control-group.hidden,
304
+ .ecwid-settings.advanced-settings hr.hidden {
305
+ display: none;
306
+ }
307
+
308
+ .ecwid-settings .note.inline-note {
309
+ max-width: 300px;
310
+ margin-left: 15px;
311
+ vertical-align: middle;
312
+ }
313
+
314
+ .ecwid-settings .note.grayed-links,
315
+ .ecwid-settings .note.grayed-links a:not(:hover)
316
+ {
317
+ font-size: 11px;
318
+ color: #A0A0A0;
319
+ margin-top:10px;
320
+ margin-bottom: 10px;
321
+ }
322
+
323
+ /* Common main */
324
+ .ecwid-admin {
325
+ margin-left: 20px;
326
+ }
327
+ .ecwid-admin .box {
328
+ position: relative;
329
+ margin-top: 25px;
330
+
331
+ border: 1px solid #E5E5E5;
332
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
333
+ background: #FFF;
334
+ }
335
+
336
+
337
+ .ecwid-admin h2:before {
338
+ background: url(../images/ecwid_logo_symbol_RGB.svg);
339
+ width: 100px;
340
+ height: 20px;
341
+ border: 2px solid blue;
342
+ }
343
+
344
+ .ecwid-admin h3 {
345
+ position: relative;
346
+ padding: 0px;
347
+ margin: 0px;
348
+ left: 60px;
349
+
350
+ display: inline-block;
351
+ height: 70px;
352
+ line-height: 70px;
353
+
354
+ text-align: left;
355
+
356
+ font-size: 18px;
357
+ font-weight: normal;
358
+ }
359
+
360
+ .ecwid-admin .head {
361
+ border-bottom: 1px solid #E5E5E5;
362
+ height: 70px;
363
+ }
364
+
365
+ .ecwid-admin .box .head {
366
+ text-align: left;
367
+ margin-bottom: 20px;
368
+ }
369
+
370
+ .ecwid-admin .head svg {
371
+ width: 32px;
372
+ height: 32px;
373
+ position: absolute;
374
+ top: 20px;
375
+ left: 20px;
376
+ margin-right: 10px;
377
+ }
378
+ /* END Common main */
379
+
380
+
381
+ /* CONNECT - positioning */
382
+ .ecwid-connect .box > div {
383
+ margin: 0px auto;
384
+ text-align: center;
385
+ }
386
+
387
+ .ecwid-connect .box h3 + div {
388
+ margin-top: 40px;
389
+ }
390
+
391
+ .ecwid-connect .box div:last-child {
392
+ margin-bottom: 40px;
393
+ }
394
+
395
+ .ecwid-connect .box .greeting-message {
396
+ margin-top: 11px;
397
+ line-height: 1.3em;
398
+ margin-bottom: 38px;
399
+ }
400
+
401
+
402
+ .ecwid-connect.ecwid-reconnect .box .greeting-message {
403
+ margin-bottom: 15px;
404
+ }
405
+
406
+ .ecwid-connect .box .connect-button {
407
+ margin-top: 8px;
408
+ margin-bottom: 15px;
409
+ }
410
+ .ecwid-connect .where-to-find-store-id {
411
+ margin-top: 25px;
412
+ margin-bottom: 0;
413
+ }
414
+
415
+ .ecwid-connect .box .note {
416
+ margin-top: 6px;
417
+ max-width: 760px;
418
+ font-size: 13px;
419
+ }
420
+
421
+ .ecwid-connect .box .note.reconnect-message {
422
+ margin-bottom: 38px;
423
+ color: #707070;
424
+ }
425
+ .ecwid-connect .box .create-account-link {
426
+ margin-top: 35px;
427
+ }
428
+
429
+
430
+ /* CONNECT - styles */
431
+ .ecwid-connect .box .greeting-message {
432
+ font-size: 24px;
433
+ font-weight: lighter;
434
+ }
435
+
436
+ .ecwid-connect .box .connect-button a {
437
+ padding: 14px 40px;
438
+ border: 0px none;
439
+ border-radius: 4px;
440
+
441
+ background: #59bb00;
442
+ color: white;
443
+ font-size: 18px;
444
+ font-weight: lighter;
445
+ text-decoration: none;
446
+
447
+ transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
448
+ display: inline-block;
449
+
450
+ white-space: nowrap;
451
+ }
452
+
453
+ .ecwid-connect .box .connect-button a:hover {
454
+ background: #64A52F;
455
+ }
456
+
457
+ .ecwid-connect .box .note {
458
+ color: #A0A0A0;
459
+ line-height: 18px;
460
+ max-width: 400px;
461
+ }
462
+
463
+ .ecwid-connect .box .note.initial {
464
+ }
465
+
466
+ .ecwid-connect .box .note.auth-error {
467
+ max-width: 350px;
468
+ color: red;
469
+ }
470
+
471
+ /* wpcontent to stress the rule without using !mportant */
472
+ #wpcontent .ecwid-connect.no-oauth .with-oauth,
473
+ #wpcontent .ecwid-connect.with-oauth .no-oauth
474
+ {
475
+ display: none;
476
+ }
477
+
478
+ .ecwid-connect .connect-store-id {
479
+
480
+ }
481
+
482
+ .ecwid-connect #ecwid-store-id {
483
+ line-height: 38px;
484
+ width: 260px;
485
+ border-radius: 4px;
486
+ font-size: 16px;
487
+ font-weight: lighter;
488
+ padding-left: 10px;
489
+ font-family: 'Open Sans';
490
+ }
491
+
492
+ .ecwid-connect .box .create-account-link a {
493
+ text-decoration: none;
494
+ font-size: 14px;
495
+ }
496
+
497
+ .ecwid-dashboard .body {
498
+ padding: 70px 50px;
499
+ }
500
+
501
+ .ecwid-dashboard .greeting-image {
502
+ padding-right: 37px;
503
+ display: table-cell;
504
+ }
505
+
506
+ .ecwid-dashboard .greeting {
507
+ display: table-cell;
508
+ vertical-align: middle;
509
+ }
510
+
511
+ .ecwid-dashboard .greeting .greeting-title {
512
+ font-size: 24px;
513
+ margin-bottom: 12px;
514
+ }
515
+
516
+ .ecwid-dashboard .greeting .greeting-message {
517
+ font-size: 16px;
518
+ margin-bottom: 5px;
519
+ line-height: 1.3em;
520
+ }
521
+
522
+ .ecwid-dashboard .drop-down.store-id {
523
+ font-size: 14px;
524
+ padding: 10px 16px;
525
+ position: absolute;
526
+ right: 6px;
527
+ top: 13px;
528
+ line-height: 20px;
529
+ display: inline-block;
530
+ border: 1px solid transparent;
531
+ border-bottom: none;
532
+ height: 21px;
533
+
534
+ cursor: pointer;
535
+ }
536
+
537
+ .ecwid-dashboard .drop-down.store-id.hover {
538
+ cursor: default;
539
+ }
540
+
541
+ .ecwid-dashboard .drop-down.hover
542
+ {
543
+ border: 1px solid #CCC;
544
+ border-bottom: none;
545
+ background: white;
546
+ }
547
+
548
+ .ecwid-dashboard .store-id a {
549
+ text-decoration: none;
550
+ }
551
+
552
+ .ecwid-dashboard .drop-down > *:first-child:after {
553
+ font-family: 'dashicons';
554
+ content: '\f347';
555
+ position: relative;
556
+ top: .2em;
557
+ font-weight: lighter;
558
+ }
559
+
560
+ .ecwid-dashboard .drop-down.hover > *:first-child:after {
561
+ font-family: 'dashicons';
562
+ content: '\f343';
563
+ }
564
+
565
+
566
+ .ecwid-dashboard .drop-down > *:first-child {
567
+ color: #0074A2;
568
+ white-space: nowrap;
569
+ }
570
+
571
+ .ecwid-dashboard .drop-down > *:first-child:hover {
572
+ color: #2EA2CC;
573
+ }
574
+
575
+ .ecwid-dashboard .drop-down {
576
+ position: relative;
577
+ }
578
+
579
+ .ecwid-dashboard .drop-down.hover {
580
+ color: #2EA2CC;
581
+ }
582
+
583
+ .ecwid-dashboard .drop-down ul
584
+ {
585
+ display: none;
586
+ }
587
+ .ecwid-dashboard .drop-down.hover ul
588
+ {
589
+ display: inline-block;
590
+ }
591
+
592
+
593
+ .ecwid-dashboard .drop-down ul {
594
+ position: absolute;
595
+ top: 100%;
596
+ width: 100%;
597
+ font-size: 14px;
598
+ left: 0px;
599
+ margin: 0px;
600
+ padding-left: 0px;
601
+
602
+ outline: 1px solid #ccc;
603
+ }
604
+
605
+ .ecwid-dashboard .drop-down ul li {
606
+ border-bottom: 1px solid #ccc;
607
+ margin-bottom: 0;
608
+ background: white;
609
+ text-align: left;
610
+ }
611
+
612
+ .ecwid-dashboard .drop-down ul li:last-child {
613
+ border-bottom: none;
614
+ }
615
+
616
+
617
+ .ecwid-dashboard .drop-down ul a {
618
+ display: block;
619
+ padding: 10px 16px;
620
+ text-decoration: none;
621
+ }
622
+
623
+ .ecwid-dashboard .drop-down ul li:hover {
624
+ background: #0074A2;
625
+ }
626
+
627
+ .ecwid-dashboard .drop-down ul li:hover a {
628
+ color: white;
629
+ }
630
+
631
+ .ecwid-dashboard .drop-down * {
632
+ transition: color .2s, background .2s;
633
+ }
634
+
635
+ .ecwid-dashboard .greeting-links {
636
+ padding-left: 0px;
637
+ margin-top: 5px;
638
+ }
639
+
640
+ .ecwid-dashboard .greeting-links > * {
641
+ display: inline-block;
642
+ margin: 15px 15px;
643
+ }
644
+
645
+ .ecwid-dashboard .greeting-links > *:first-child {
646
+ margin-left: 0;
647
+ }
648
+
649
+ .ecwid-dashboard .greeting-links a {
650
+ text-decoration: none;
651
+ font-size: 14px;
652
+ }
653
+
654
+ .ecwid-dashboard.width-smaller .head {
655
+ height: 74px;
656
+ }
657
+
658
+ .ecwid-dashboard.width-smaller .head svg {
659
+ left: 20px;
660
+ top: 24px;
661
+ }
662
+
663
+ .ecwid-dashboard.width-smaller .head h3 {
664
+ left: 68px;
665
+ top: -4px;
666
+ }
667
+
668
+ .ecwid-dashboard.width-smaller .store-id {
669
+ right: inherit;
670
+ left: 51px;
671
+ top: 30px;
672
+ }
673
+
674
+ .ecwid-dashboard.width-smaller .body {
675
+ text-align: center;
676
+ padding: 20px 0px;
677
+ }
678
+
679
+ .ecwid-dashboard.width-smaller .greeting-image,
680
+ .ecwid-dashboard.width-smaller .greeting
681
+ {
682
+ display: block;
683
+ padding-right: 0px;
684
+ }
685
+
686
+ .ecwid-dashboard.width-smaller .greeting-title {
687
+ margin-top: 10px;
688
+ }
689
+
690
+
691
+ .ecwid-admin .mobile-br br {
692
+ display: none;
693
+ }
694
+
695
+ .ecwid-admin.width-smaller .mobile-br br {
696
+ display: inherit;
697
+ }
698
+
699
+ .ecwid-popup {
700
+ position: fixed;
701
+ left: 170px;
702
+ top: 42px;
703
+ right: 10px;
704
+ bottom: 10px;
705
+ }
706
+
707
+ .ecwid-popup .wrap {
708
+ margin: 0px;
709
+ }
710
+
711
+ .ecwid-popup .box {
712
+ margin: 0px;
713
+ position: absolute;
714
+ left: 0;
715
+ right: 0;
716
+ top: 0;
717
+ bottom: 0;
718
+ }
719
+ .ecwid-popup h3 span.close {
720
+ position: absolute;
721
+ right: 15px;
722
+ cursor: pointer;
723
+ color: #2EA2CC;
724
+ }
725
+
726
+ .ecwid-popup h3 span.close:before {
727
+ content: "\e606";
728
+ font-family: ecwid-plugin-icons;
729
+ font-size: 36px;
730
+ }
731
+
732
+ .ecwid-button.button-green {
733
+ background: #29b80a;
734
+ color: white;
735
+ border-color: #199806;
736
+ padding: 0 10px;
737
+ margin-top: 10px;
738
+ }
739
+
740
+ .ecwid-button.button-green:hover {
741
+ background: #2cc40b;
742
+ color: white;
743
+ }
744
+
745
+ label.premium-feature svg {
746
+ height: 10px;
747
+ width: 10px;
748
+ display:inline-block;
749
+ }
750
+
751
+ label.premium-feature svg path {
752
+ fill: #f9af17;
753
+ }
754
+
755
+
756
+ @media screen and (max-width: 960px) {
757
+ .ecwid-popup {
758
+ left: 44px;
759
+ }
760
+ }
761
+
762
+ @media screen and (max-width: 782px) {
763
+ .ecwid-popup {
764
+ left: 0px;
765
+ right: 0px;
766
+ top: 46px;
767
+ bottom: 0px;
768
+ }
769
  }
css/store-popup.css CHANGED
@@ -1,449 +1,449 @@
1
- .ecwid-store-icon {
2
- padding-right: 3px;
3
- position: relative;
4
- display: inline-block;
5
- width: 16px;
6
- top: 3px;
7
- height: 16px;
8
- max-height: 16px;
9
- }
10
-
11
- .ecwid-store-icon svg * {
12
- fill: #888;
13
- }
14
-
15
- #ecwid-store-popup-content {
16
- display: none;
17
- }
18
-
19
- #ecwid-store-popup-content a {
20
- text-decoration: none;
21
- }
22
-
23
- #ecwid-store-popup-content .media-frame-content {
24
- }
25
-
26
- #ecwid-store-popup-content.open {
27
- display: block;
28
- }
29
-
30
- .wp-media-buttons:not(.has-ecwid) .update-ecwid {
31
- display: none;
32
- }
33
-
34
- .wp-media-buttons.has-ecwid .add-ecwid {
35
- display: none;
36
- }
37
-
38
- #ecwid-store-popup-content .media-modal-close:hover {
39
- text-decoration: none;
40
- }
41
-
42
- /*
43
- * Menu items visibility
44
- */
45
- #ecwid-store-popup-content .media-modal-content .media-menu a {
46
- display: none
47
- }
48
-
49
- #ecwid-store-popup-content .media-modal-content[data-mode=store-settings] .media-menu a[data-content=store-settings],
50
- #ecwid-store-popup-content .media-modal-content[data-mode=add-store] .media-menu a[data-content=add-store],
51
- #ecwid-store-popup-content .media-modal-content .media-menu a[data-content=appearance]
52
- {
53
- display: inherit;
54
- }
55
-
56
- body[class*=branch-3] #ecwid-store-popup-content .media-frame-title span.dashicons {
57
- display: none;
58
- }
59
- /*
60
- * Content area visibility
61
- */
62
- #ecwid-store-popup-content .media-modal-content .media-frame-title,
63
- #ecwid-store-popup-content .media-modal-content .media-frame-content,
64
- #ecwid-store-popup-content .media-modal-content .media-toolbar-primary
65
- {
66
- display: none;
67
- }
68
-
69
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=add-store] .media-frame-title.add-store,
70
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=add-store] .media-frame-content.store-settings,
71
-
72
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=store-settings] .media-frame-title.store-settings,
73
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=store-settings] .media-frame-content.store-settings,
74
-
75
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=appearance] .media-frame-title.appearance,
76
- #ecwid-store-popup-content .media-modal-content[data-active-dialog=appearance] .media-frame-content.appearance,
77
-
78
- #ecwid-store-popup-content .media-modal-content[data-mode=add-store] .media-frame-toolbar .media-toolbar-primary.add-store,
79
- #ecwid-store-popup-content .media-modal-content[data-mode=store-settings] .media-frame-toolbar .media-toolbar-primary.store-settings
80
- {
81
- display: inherit;
82
- }
83
-
84
- /*
85
- * Size and centering
86
- */
87
-
88
- @media only screen and (min-width: 960px) and (min-height: 660px) {
89
-
90
- html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
91
- position: absolute;
92
- width: 900px;
93
- height: 650px;
94
- top: 50%;
95
- left: 50%;
96
- right: inherit;
97
- bottom: inherit;
98
- transform: translate(-50%,-50%);
99
- -moz-transform: translate(-50%,-50%);
100
- -ms-transform: translate(-50%,-50%);
101
- -webkit-transform: translate(-50%,-50%);
102
- }
103
- }
104
-
105
- @media only screen and (min-width: 960px) and (min-height: 400px) and (max-height: 660px) {
106
-
107
- html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
108
- position: absolute;
109
- width: 900px;
110
- left: 50%;
111
- right: inherit;
112
- transform: translate(-50%,0%);
113
- -moz-transform: translate(-50%,0%);
114
- -ms-transform: translate(-50%,0%);
115
- -webkit-transform: translate(-50%,0%);
116
- }
117
- }
118
-
119
- @media only screen and (min-width: 640px) and (max-width: 960px) and (min-height: 660px) {
120
-
121
- html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
122
- position: absolute;
123
- height: 650px;
124
- top: 50%;
125
- bottom: inherit;
126
- transform: translate(0%,-50%);
127
- -moz-transform: translate(0%,-50%);
128
- -ms-transform: translate(0%,-50%);
129
- -webkit-transform: translate(0%,-50%);
130
- }
131
- }
132
-
133
- @media only screen and (max-width: 750px) {
134
- #ecwid-store-popup-content .store-settings-preview {
135
- display: none !important;
136
- }
137
-
138
- #ecwid-store-popup-content .store-settings-wrapper {
139
- padding-left: 0px;
140
- }
141
- }
142
-
143
- html:not(.ie8) #ecwid-store-popup-content .store-settings-wrapper {
144
- position: absolute;
145
- top: 50%;
146
- transform: translate(0%,-50%);
147
- -moz-transform: translate(0%,-50%);
148
- -ms-transform: translate(0%,-50%);
149
- -webkit-transform: translate(0%,-50%);
150
- }
151
- /*
152
- *
153
- */
154
- .ecwid-store-editor {
155
- padding: 13px 19px;
156
- }
157
-
158
- #ecwid-store-popup-content .pure-control-group {
159
- margin: 10px 0px;
160
- }
161
-
162
- #ecwid-store-popup-content label {
163
- font-size: 14px;
164
- font-weight: 400;
165
- display: inline-block;
166
- width: 270px;
167
- }
168
-
169
- #ecwid-store-popup-content .products-per-page-label {
170
- display: block;
171
- }
172
-
173
- #ecwid-store-popup-content .ecwid-pb-view-size {
174
- margin-left: 15px;
175
- margin-right: 30px;
176
- margin-top: 15px;
177
- }
178
-
179
- #ecwid-store-popup-content .ecwid-pb-view-size:nth-child(4) {
180
- margin-right: 0px;
181
- }
182
-
183
-
184
- #ecwid-store-popup-content .ecwid-pb-view-size .title {
185
- font-size: 14px;
186
- }
187
-
188
- #ecwid-store-popup-content .ecwid-pb-view-size .ruler {
189
- z-index: 0;
190
- }
191
-
192
- #ecwid-store-popup-content input {
193
- position: relative;
194
- font-size: 13px;
195
- }
196
-
197
- #ecwid-store-popup-content input.number {
198
- border-radius: 4px;
199
- width: 27px;
200
- padding: 3px;
201
- text-align: center;
202
- }
203
-
204
- #ecwid-store-popup-content .note.pb-note {
205
- max-width: 595px;
206
- font-size: 11px;
207
- margin: 8px 5px;
208
- line-height: 16px;
209
- }
210
-
211
- #ecwid-store-popup-content hr.after-pb {
212
- margin-bottom: 25px;
213
- }
214
-
215
- #ecwid-store-popup-content .media-toolbar-secondary {
216
- font-size: 14px;
217
- margin-left:5px;
218
- }
219
-
220
- #ecwid-store-popup-content .media-toolbar-secondary .store-id {
221
- margin-top: 10px;
222
- font-weight: bold;
223
- }
224
-
225
-
226
- #ecwid-store-popup-content .ecwid-store-editor.add-store {
227
- padding-top: 125px;
228
- }
229
-
230
- #ecwid-store-popup-content .store-settings-preview {
231
- display: inline-block;
232
- width: 162px;
233
- height: 200px;
234
- }
235
-
236
- #ecwid-store-popup-content .store-settings,
237
- #ecwid-store-popup-content .store-settings-preview
238
- {
239
- vertical-align: top;
240
- display: inline-block;
241
- }
242
-
243
- #ecwid-store-popup-content .store-settings h3 {
244
- font-size: 20px;
245
- margin-bottom: 5px;
246
- }
247
-
248
- #ecwid-store-popup-content .store-settings-preview {
249
- width: 145px;
250
- margin-top: 17px;
251
- position: relative;
252
- }
253
-
254
- #ecwid-store-popup-content .store-settings-preview label {
255
- position: absolute;
256
- background: transparent;
257
- cursor: pointer;
258
- display: inline-block;
259
- }
260
-
261
- #ecwid-store-popup-content .store-settings .note {
262
- margin-right: 30px;
263
- }
264
-
265
- #ecwid-store-popup-content .note {
266
- color: #BBBBBB;
267
- }
268
-
269
- #ecwid-store-popup-content .store-settings-preview .ecwid-search {
270
- top: 0px;
271
- width: 45px;
272
- height: 45px;
273
- }
274
-
275
- #ecwid-store-popup-content .store-settings-preview .ecwid-minicart {
276
- top: 0px;
277
- right: 0px;
278
- width: 45px;
279
- height: 45px;
280
- }
281
-
282
- #ecwid-store-popup-content .store-settings-preview .ecwid-categories {
283
- top: 45px;
284
- width: 100%;
285
- height: 20px;
286
- }
287
-
288
- #ecwid-store-popup-content .store-settings-wrapper path {
289
- fill: #d1ecf5;
290
- }
291
-
292
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=categories] path.categories,
293
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=minicart] path.minicart,
294
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=search] path.search,
295
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-categories[data-ecwid-widget-hover=categories] path.categories,
296
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-minicart[data-ecwid-widget-hover=minicart] path.minicart,
297
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-search[data-ecwid-widget-hover=search] path.search
298
- {
299
- fill: #56d5ff;
300
- }
301
-
302
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-categories path.categories,
303
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-minicart path.minicart,
304
- #ecwid-store-popup-content .store-settings-wrapper.ecwid-search path.search,
305
- #ecwid-store-popup-content .store-settings-wrapper path.productbrowser
306
- {
307
- fill: #298cba;
308
- }
309
-
310
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=categories] label[data-ecwid-widget=categories],
311
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=minicart] label[data-ecwid-widget=minicart],
312
- #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=search] label[data-ecwid-widget=search]
313
- {
314
- color: #40c1ec;
315
- }
316
-
317
- #ecwid-store-popup-content .media-frame-content.store-settings {
318
- padding-left: 43px;
319
- }
320
-
321
- #ecwid-store-popup-content .media-frame-content .store-settings-wrapper .store-settings {
322
- padding-left: 43px;
323
- }
324
-
325
- #ecwid-store-popup-content .store-settings .pure-control-group {
326
- margin: 20px 0px;
327
- }
328
-
329
- #ecwid-store-popup-content .store-settings .pure-control-group label {
330
- font-size: 16px;
331
- color: black;
332
- font-weight: 400;
333
- }
334
-
335
- #ecwid-store-popup-content .appearance label {
336
- font-weight: 600;
337
- }
338
-
339
- #ecwid-store-popup-content .pure-control-group.default-category-id {
340
- display: table;
341
- }
342
-
343
- #ecwid-store-popup-content .pure-control-group.default-category-id label {
344
- width: 270px;
345
- min-width: 270px;
346
- max-width: 270px;
347
- display: table-cell;
348
- }
349
-
350
- #ecwid-store-popup-content .pure-control-group.default-category-id .value {
351
- display: table-cell;
352
- }
353
-
354
- #ecwid-store-popup-content .pure-control-group.default-category-id .value select,
355
- #ecwid-store-popup-content .pure-control-group.default-category-id .value input {
356
- width:100%;
357
- }
358
-
359
-
360
- @media only screen and (max-width: 440px) {
361
- #ecwid-store-popup-content .appearance .pure-control-group.params-list {
362
- margin: 35px 0px;
363
- position: relative;
364
- }
365
-
366
- #ecwid-store-popup-content .appearance .pure-control-group.params-list select,
367
- #ecwid-store-popup-content .appearance .pure-control-group.params-list input {
368
- width: 100%;
369
- }
370
-
371
- #ecwid-store-popup-content .appearance .pure-control-group.params-list label,
372
- #ecwid-store-popup-content .appearance .pure-control-group.params-list .value {
373
- display: inline-block;
374
- width: 100%;
375
- }
376
-
377
- #ecwid-store-popup-content .appearance .pure-control-group.params-list input#ecwid_pb_categoriesperrow {
378
- width: 27px;
379
- position: absolute;
380
- right: 0px;
381
- }
382
-
383
- #ecwid-store-popup-content .media-frame-content .store-settings-wrapper .store-settings {
384
- padding-left: 0px;
385
- }
386
-
387
-
388
- #ecwid-store-popup-content .appearance .pure-control-group.params-list label {
389
- width: auto;
390
- min-width: inherit;
391
- max-width: inherit;
392
- }
393
- }
394
-
395
- #ecwid-store-popup-content .store-settings .pure-control-group input[type=checkbox] {
396
- margin-right: 15px;
397
- }
398
-
399
-
400
- /*
401
- * Two styles below are the copy of wp pre-4.3 styles for close cross in the up right corner
402
- * Need to use those to make sure it is displayed the same way across different wp versions
403
- */
404
- #ecwid-store-popup-content .media-modal-close {
405
- position: absolute;
406
- text-decoration: none;
407
- top: 10px;
408
- right: 10px;
409
- width: 30px;
410
- height: 30px;
411
- z-index: 1000;
412
- -webkit-transition: color .1s ease-in-out,background .1s ease-in-out;
413
- transition: color .1s ease-in-out,background .1s ease-in-out;
414
- }
415
-
416
- #ecwid-store-popup-content .media-modal-close span.media-modal-icon {
417
- display: block;
418
- margin-top: 5px;
419
- width: 30px;
420
- height: 15px;
421
- background-image: none;
422
- text-align: center;
423
- }
424
-
425
-
426
- @media only screen and (max-width: 640px) {
427
- #ecwid-store-popup-content .note.pb-note {
428
- width: auto;
429
- text-align: left;
430
- }
431
-
432
- #ecwid-store-popup-content .pb-views {
433
- text-align: center;
434
- }
435
-
436
-
437
- #ecwid-store-popup-content .appearance input.number {
438
- margin-left: inherit;
439
- }
440
-
441
- #ecwid-store-popup-content .ecwid-pb-view-size {
442
- margin-left: 25px;
443
- margin-right: 25px;
444
- }
445
-
446
- #ecwid-store-popup-content .media-frame-content .store-settings-wrapper {
447
- padding-left: 0px;
448
- }
449
- }
1
+ .ecwid-store-icon {
2
+ padding-right: 3px;
3
+ position: relative;
4
+ display: inline-block;
5
+ width: 16px;
6
+ top: 3px;
7
+ height: 16px;
8
+ max-height: 16px;
9
+ }
10
+
11
+ .ecwid-store-icon svg * {
12
+ fill: #888;
13
+ }
14
+
15
+ #ecwid-store-popup-content {
16
+ display: none;
17
+ }
18
+
19
+ #ecwid-store-popup-content a {
20
+ text-decoration: none;
21
+ }
22
+
23
+ #ecwid-store-popup-content .media-frame-content {
24
+ }
25
+
26
+ #ecwid-store-popup-content.open {
27
+ display: block;
28
+ }
29
+
30
+ .wp-media-buttons:not(.has-ecwid) .update-ecwid {
31
+ display: none;
32
+ }
33
+
34
+ .wp-media-buttons.has-ecwid .add-ecwid {
35
+ display: none;
36
+ }
37
+
38
+ #ecwid-store-popup-content .media-modal-close:hover {
39
+ text-decoration: none;
40
+ }
41
+
42
+ /*
43
+ * Menu items visibility
44
+ */
45
+ #ecwid-store-popup-content .media-modal-content .media-menu a {
46
+ display: none
47
+ }
48
+
49
+ #ecwid-store-popup-content .media-modal-content[data-mode=store-settings] .media-menu a[data-content=store-settings],
50
+ #ecwid-store-popup-content .media-modal-content[data-mode=add-store] .media-menu a[data-content=add-store],
51
+ #ecwid-store-popup-content .media-modal-content .media-menu a[data-content=appearance]
52
+ {
53
+ display: inherit;
54
+ }
55
+
56
+ body[class*=branch-3] #ecwid-store-popup-content .media-frame-title span.dashicons {
57
+ display: none;
58
+ }
59
+ /*
60
+ * Content area visibility
61
+ */
62
+ #ecwid-store-popup-content .media-modal-content .media-frame-title,
63
+ #ecwid-store-popup-content .media-modal-content .media-frame-content,
64
+ #ecwid-store-popup-content .media-modal-content .media-toolbar-primary
65
+ {
66
+ display: none;
67
+ }
68
+
69
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=add-store] .media-frame-title.add-store,
70
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=add-store] .media-frame-content.store-settings,
71
+
72
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=store-settings] .media-frame-title.store-settings,
73
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=store-settings] .media-frame-content.store-settings,
74
+
75
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=appearance] .media-frame-title.appearance,
76
+ #ecwid-store-popup-content .media-modal-content[data-active-dialog=appearance] .media-frame-content.appearance,
77
+
78
+ #ecwid-store-popup-content .media-modal-content[data-mode=add-store] .media-frame-toolbar .media-toolbar-primary.add-store,
79
+ #ecwid-store-popup-content .media-modal-content[data-mode=store-settings] .media-frame-toolbar .media-toolbar-primary.store-settings
80
+ {
81
+ display: inherit;
82
+ }
83
+
84
+ /*
85
+ * Size and centering
86
+ */
87
+
88
+ @media only screen and (min-width: 960px) and (min-height: 660px) {
89
+
90
+ html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
91
+ position: absolute;
92
+ width: 900px;
93
+ height: 650px;
94
+ top: 50%;
95
+ left: 50%;
96
+ right: inherit;
97
+ bottom: inherit;
98
+ transform: translate(-50%,-50%);
99
+ -moz-transform: translate(-50%,-50%);
100
+ -ms-transform: translate(-50%,-50%);
101
+ -webkit-transform: translate(-50%,-50%);
102
+ }
103
+ }
104
+
105
+ @media only screen and (min-width: 960px) and (min-height: 400px) and (max-height: 660px) {
106
+
107
+ html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
108
+ position: absolute;
109
+ width: 900px;
110
+ left: 50%;
111
+ right: inherit;
112
+ transform: translate(-50%,0%);
113
+ -moz-transform: translate(-50%,0%);
114
+ -ms-transform: translate(-50%,0%);
115
+ -webkit-transform: translate(-50%,0%);
116
+ }
117
+ }
118
+
119
+ @media only screen and (min-width: 640px) and (max-width: 960px) and (min-height: 660px) {
120
+
121
+ html:not(.ie8) #ecwid-store-popup-content .media-modal-content {
122
+ position: absolute;
123
+ height: 650px;
124
+ top: 50%;
125
+ bottom: inherit;
126
+ transform: translate(0%,-50%);
127
+ -moz-transform: translate(0%,-50%);
128
+ -ms-transform: translate(0%,-50%);
129
+ -webkit-transform: translate(0%,-50%);
130
+ }
131
+ }
132
+
133
+ @media only screen and (max-width: 750px) {
134
+ #ecwid-store-popup-content .store-settings-preview {
135
+ display: none !important;
136
+ }
137
+
138
+ #ecwid-store-popup-content .store-settings-wrapper {
139
+ padding-left: 0px;
140
+ }
141
+ }
142
+
143
+ html:not(.ie8) #ecwid-store-popup-content .store-settings-wrapper {
144
+ position: absolute;
145
+ top: 50%;
146
+ transform: translate(0%,-50%);
147
+ -moz-transform: translate(0%,-50%);
148
+ -ms-transform: translate(0%,-50%);
149
+ -webkit-transform: translate(0%,-50%);
150
+ }
151
+ /*
152
+ *
153
+ */
154
+ .ecwid-store-editor {
155
+ padding: 13px 19px;
156
+ }
157
+
158
+ #ecwid-store-popup-content .pure-control-group {
159
+ margin: 10px 0px;
160
+ }
161
+
162
+ #ecwid-store-popup-content label {
163
+ font-size: 14px;
164
+ font-weight: 400;
165
+ display: inline-block;
166
+ width: 270px;
167
+ }
168
+
169
+ #ecwid-store-popup-content .products-per-page-label {
170
+ display: block;
171
+ }
172
+
173
+ #ecwid-store-popup-content .ecwid-pb-view-size {
174
+ margin-left: 15px;
175
+ margin-right: 30px;
176
+ margin-top: 15px;
177
+ }
178
+
179
+ #ecwid-store-popup-content .ecwid-pb-view-size:nth-child(4) {
180
+ margin-right: 0px;
181
+ }
182
+
183
+
184
+ #ecwid-store-popup-content .ecwid-pb-view-size .title {
185
+ font-size: 14px;
186
+ }
187
+
188
+ #ecwid-store-popup-content .ecwid-pb-view-size .ruler {
189
+ z-index: 0;
190
+ }
191
+
192
+ #ecwid-store-popup-content input {
193
+ position: relative;
194
+ font-size: 13px;
195
+ }
196
+
197
+ #ecwid-store-popup-content input.number {
198
+ border-radius: 4px;
199
+ width: 27px;
200
+ padding: 3px;
201
+ text-align: center;
202
+ }
203
+
204
+ #ecwid-store-popup-content .note.pb-note {
205
+ max-width: 595px;
206
+ font-size: 11px;
207
+ margin: 8px 5px;
208
+ line-height: 16px;
209
+ }
210
+
211
+ #ecwid-store-popup-content hr.after-pb {
212
+ margin-bottom: 25px;
213
+ }
214
+
215
+ #ecwid-store-popup-content .media-toolbar-secondary {
216
+ font-size: 14px;
217
+ margin-left:5px;
218
+ }
219
+
220
+ #ecwid-store-popup-content .media-toolbar-secondary .store-id {
221
+ margin-top: 10px;
222
+ font-weight: bold;
223
+ }
224
+
225
+
226
+ #ecwid-store-popup-content .ecwid-store-editor.add-store {
227
+ padding-top: 125px;
228
+ }
229
+
230
+ #ecwid-store-popup-content .store-settings-preview {
231
+ display: inline-block;
232
+ width: 162px;
233
+ height: 200px;
234
+ }
235
+
236
+ #ecwid-store-popup-content .store-settings,
237
+ #ecwid-store-popup-content .store-settings-preview
238
+ {
239
+ vertical-align: top;
240
+ display: inline-block;
241
+ }
242
+
243
+ #ecwid-store-popup-content .store-settings h3 {
244
+ font-size: 20px;
245
+ margin-bottom: 5px;
246
+ }
247
+
248
+ #ecwid-store-popup-content .store-settings-preview {
249
+ width: 145px;
250
+ margin-top: 17px;
251
+ position: relative;
252
+ }
253
+
254
+ #ecwid-store-popup-content .store-settings-preview label {
255
+ position: absolute;
256
+ background: transparent;
257
+ cursor: pointer;
258
+ display: inline-block;
259
+ }
260
+
261
+ #ecwid-store-popup-content .store-settings .note {
262
+ margin-right: 30px;
263
+ }
264
+
265
+ #ecwid-store-popup-content .note {
266
+ color: #BBBBBB;
267
+ }
268
+
269
+ #ecwid-store-popup-content .store-settings-preview .ecwid-search {
270
+ top: 0px;
271
+ width: 45px;
272
+ height: 45px;
273
+ }
274
+
275
+ #ecwid-store-popup-content .store-settings-preview .ecwid-minicart {
276
+ top: 0px;
277
+ right: 0px;
278
+ width: 45px;
279
+ height: 45px;
280
+ }
281
+
282
+ #ecwid-store-popup-content .store-settings-preview .ecwid-categories {
283
+ top: 45px;
284
+ width: 100%;
285
+ height: 20px;
286
+ }
287
+
288
+ #ecwid-store-popup-content .store-settings-wrapper path {
289
+ fill: #d1ecf5;
290
+ }
291
+
292
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=categories] path.categories,
293
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=minicart] path.minicart,
294
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=search] path.search,
295
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-categories[data-ecwid-widget-hover=categories] path.categories,
296
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-minicart[data-ecwid-widget-hover=minicart] path.minicart,
297
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-search[data-ecwid-widget-hover=search] path.search
298
+ {
299
+ fill: #56d5ff;
300
+ }
301
+
302
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-categories path.categories,
303
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-minicart path.minicart,
304
+ #ecwid-store-popup-content .store-settings-wrapper.ecwid-search path.search,
305
+ #ecwid-store-popup-content .store-settings-wrapper path.productbrowser
306
+ {
307
+ fill: #298cba;
308
+ }
309
+
310
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=categories] label[data-ecwid-widget=categories],
311
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=minicart] label[data-ecwid-widget=minicart],
312
+ #ecwid-store-popup-content .store-settings-wrapper[data-ecwid-widget-hover=search] label[data-ecwid-widget=search]
313
+ {
314
+ color: #40c1ec;
315
+ }
316
+
317
+ #ecwid-store-popup-content .media-frame-content.store-settings {
318
+ padding-left: 43px;
319
+ }
320
+
321
+ #ecwid-store-popup-content .media-frame-content .store-settings-wrapper .store-settings {
322
+ padding-left: 43px;
323
+ }
324
+
325
+ #ecwid-store-popup-content .store-settings .pure-control-group {
326
+ margin: 20px 0px;
327
+ }
328
+
329
+ #ecwid-store-popup-content .store-settings .pure-control-group label {
330
+ font-size: 16px;
331
+ color: black;
332
+ font-weight: 400;
333
+ }
334
+
335
+ #ecwid-store-popup-content .appearance label {
336
+ font-weight: 600;
337
+ }
338
+
339
+ #ecwid-store-popup-content .pure-control-group.default-category-id {
340
+ display: table;
341
+ }
342
+
343
+ #ecwid-store-popup-content .pure-control-group.default-category-id label {
344
+ width: 270px;
345
+ min-width: 270px;
346
+ max-width: 270px;
347
+ display: table-cell;
348
+ }
349
+
350
+ #ecwid-store-popup-content .pure-control-group.default-category-id .value {
351
+ display: table-cell;
352
+ }
353
+
354
+ #ecwid-store-popup-content .pure-control-group.default-category-id .value select,
355
+ #ecwid-store-popup-content .pure-control-group.default-category-id .value input {
356
+ width:100%;
357
+ }
358
+
359
+
360
+ @media only screen and (max-width: 440px) {
361
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list {
362
+ margin: 35px 0px;
363
+ position: relative;
364
+ }
365
+
366
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list select,
367
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list input {
368
+ width: 100%;
369
+ }
370
+
371
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list label,
372
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list .value {
373
+ display: inline-block;
374
+ width: 100%;
375
+ }
376
+
377
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list input#ecwid_pb_categoriesperrow {
378
+ width: 27px;
379
+ position: absolute;
380
+ right: 0px;
381
+ }
382
+
383
+ #ecwid-store-popup-content .media-frame-content .store-settings-wrapper .store-settings {
384
+ padding-left: 0px;
385
+ }
386
+
387
+
388
+ #ecwid-store-popup-content .appearance .pure-control-group.params-list label {
389
+ width: auto;
390
+ min-width: inherit;
391
+ max-width: inherit;
392
+ }
393
+ }
394
+
395
+ #ecwid-store-popup-content .store-settings .pure-control-group input[type=checkbox] {
396
+ margin-right: 15px;
397
+ }
398
+
399
+
400
+ /*
401
+ * Two styles below are the copy of wp pre-4.3 styles for close cross in the up right corner
402
+ * Need to use those to make sure it is displayed the same way across different wp versions
403
+ */
404
+ #ecwid-store-popup-content .media-modal-close {
405
+ position: absolute;
406
+ text-decoration: none;
407
+ top: 10px;
408
+ right: 10px;
409
+ width: 30px;
410
+ height: 30px;
411
+ z-index: 1000;
412
+ -webkit-transition: color .1s ease-in-out,background .1s ease-in-out;
413
+ transition: color .1s ease-in-out,background .1s ease-in-out;
414
+ }
415
+
416
+ #ecwid-store-popup-content .media-modal-close span.media-modal-icon {
417
+ display: block;
418
+ margin-top: 5px;
419
+ width: 30px;
420
+ height: 15px;
421
+ background-image: none;
422
+ text-align: center;
423
+ }
424
+
425
+
426
+ @media only screen and (max-width: 640px) {
427
+ #ecwid-store-popup-content .note.pb-note {
428
+ width: auto;
429
+ text-align: left;
430
+ }
431
+
432
+ #ecwid-store-popup-content .pb-views {
433
+ text-align: center;
434
+ }
435
+
436
+
437
+ #ecwid-store-popup-content .appearance input.number {
438
+ margin-left: inherit;
439
+ }
440
+
441
+ #ecwid-store-popup-content .ecwid-pb-view-size {
442
+ margin-left: 25px;
443
+ margin-right: 25px;
444
+ }
445
+
446
+ #ecwid-store-popup-content .media-frame-content .store-settings-wrapper {
447
+ padding-left: 0px;
448
+ }
449
+ }
css/themes/2015.css CHANGED
@@ -1,12 +1,12 @@
1
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel-field {
2
- width: inherit;
3
- }
4
-
5
- html#ecwid_html body#ecwid_body p+.ecwid-shopping-cart-search {
6
- position: relative;
7
- top: -1.6842em;
8
- }
9
-
10
- html#ecwid_html body.ecwid-shopping-cart h1.entry-title {
11
- margin-bottom: 1.1em;
12
  }
1
+ html#ecwid_html body#ecwid_body .ecwid-SearchPanel-field {
2
+ width: inherit;
3
+ }
4
+
5
+ html#ecwid_html body#ecwid_body p+.ecwid-shopping-cart-search {
6
+ position: relative;
7
+ top: -1.6842em;
8
+ }
9
+
10
+ html#ecwid_html body.ecwid-shopping-cart h1.entry-title {
11
+ margin-bottom: 1.1em;
12
  }
css/themes/2016.css CHANGED
@@ -1,5 +1,5 @@
1
- .ecwid a,
2
- .ecwid-shopping-cart-categories a
3
- {
4
- box-shadow: none;
5
  }
1
+ .ecwid a,
2
+ .ecwid-shopping-cart-categories a
3
+ {
4
+ box-shadow: none;
5
  }
css/themes/2017.css CHANGED
@@ -9,3 +9,7 @@ html#ecwid_html body#ecwid_body .ecwid-recently-viewed-products li a:hover {
9
  -moz-box-shadow: none;
10
  box-shadow: none;
11
  }
 
 
 
 
9
  -moz-box-shadow: none;
10
  box-shadow: none;
11
  }
12
+
13
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .entry-content {
14
+ width: auto;
15
+ }
css/themes/accesspress-mag.css CHANGED
@@ -1,11 +1,11 @@
1
- html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary,
2
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel-button {
3
- color: #333 !important;
4
- }
5
- html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary:hover {
6
- color: #fff !important;
7
- }
8
-
9
- html#ecwid_html body#ecwid_body .ecwid .ecwid-btn.ecwid-btn--secondary {
10
- font-size: 13px;
11
  }
1
+ html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary,
2
+ html#ecwid_html body#ecwid_body .ecwid-SearchPanel-button {
3
+ color: #333 !important;
4
+ }
5
+ html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary:hover {
6
+ color: #fff !important;
7
+ }
8
+
9
+ html#ecwid_html body#ecwid_body .ecwid .ecwid-btn.ecwid-btn--secondary {
10
+ font-size: 13px;
11
  }
css/themes/attitude.css CHANGED
@@ -1,8 +1,8 @@
1
- html#ecwid_html body#ecwid_body .ecwid-results-topPanel-sortByPanel select {
2
- height: auto;
3
- width: auto;
4
- }
5
-
6
- .ecwid-shopping-cart-categories #horizontal-menu .horizontal-menu-parent {
7
- margin: 0;
8
  }
1
+ html#ecwid_html body#ecwid_body .ecwid-results-topPanel-sortByPanel select {
2
+ height: auto;
3
+ width: auto;
4
+ }
5
+
6
+ .ecwid-shopping-cart-categories #horizontal-menu .horizontal-menu-parent {
7
+ margin: 0;
8
  }
css/themes/customizr.css CHANGED
@@ -1,59 +1,59 @@
1
- .ecwid-shopping-cart-search input,
2
- .ecwid-results-topPanel-sortByPanel select{
3
- width: inherit;
4
- }
5
-
6
- .ecwid-shopping-cart-search button.ecwid-SearchPanel-button,
7
- .widget_ecwid_search button.ecwid-SearchPanel-button
8
- {
9
- display: inline-block;
10
- padding: 4px 12px;
11
- margin-bottom: 0;
12
- font-size: 14px;
13
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
14
- line-height: 20px;
15
- text-align: center;
16
- vertical-align: middle;
17
- cursor: pointer;
18
- border: 1px solid #CCC;
19
- border-radius: 4px;
20
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
21
- color: #FFF;
22
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
23
- background-color: #363636;
24
- background-image: -moz-linear-gradient(top,#444,#222);
25
- background-image: -webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));
26
- background-image: -webkit-linear-gradient(top,#444,#222);
27
- background-image: -o-linear-gradient(top,#444,#222);
28
- background-image: linear-gradient(to bottom,#444,#222);
29
- background-repeat: repeat-x;
30
- border-color: #222 #222 #000;
31
- border-color: rgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.25);
32
-
33
- transition-property: border,background,color;
34
- -webkit-transition-duration: .15s;
35
- transition-duration: .15s;
36
- -webkit-transition-timing-function: ease-in-out;
37
- transition-timing-function: ease-in-out;
38
- }
39
-
40
- .ecwid-shopping-cart-search button.ecwid-SearchPanel-button:hover {
41
- color: #FFF;
42
- background-color: #222;
43
- background-position: 0px -15px;
44
- }
45
-
46
- .ecwid-shopping-cart-search .ecwid-SearchPanel-field {
47
- margin-bottom: 0px;
48
- }
49
- #ecwid_product_browser_scroller {
50
- position: relative;
51
- }
52
-
53
- .ecwid-productBrowser-sharePanel-header {
54
- line-height: normal;
55
- }
56
-
57
- .ecwid-productBrowser table {
58
- line-height: normal;
59
  }
1
+ .ecwid-shopping-cart-search input,
2
+ .ecwid-results-topPanel-sortByPanel select{
3
+ width: inherit;
4
+ }
5
+
6
+ .ecwid-shopping-cart-search button.ecwid-SearchPanel-button,
7
+ .widget_ecwid_search button.ecwid-SearchPanel-button
8
+ {
9
+ display: inline-block;
10
+ padding: 4px 12px;
11
+ margin-bottom: 0;
12
+ font-size: 14px;
13
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
14
+ line-height: 20px;
15
+ text-align: center;
16
+ vertical-align: middle;
17
+ cursor: pointer;
18
+ border: 1px solid #CCC;
19
+ border-radius: 4px;
20
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
21
+ color: #FFF;
22
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
23
+ background-color: #363636;
24
+ background-image: -moz-linear-gradient(top,#444,#222);
25
+ background-image: -webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));
26
+ background-image: -webkit-linear-gradient(top,#444,#222);
27
+ background-image: -o-linear-gradient(top,#444,#222);
28
+ background-image: linear-gradient(to bottom,#444,#222);
29
+ background-repeat: repeat-x;
30
+ border-color: #222 #222 #000;
31
+ border-color: rgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.1)rgba(0, 0, 0, 0.25);
32
+
33
+ transition-property: border,background,color;
34
+ -webkit-transition-duration: .15s;
35
+ transition-duration: .15s;
36
+ -webkit-transition-timing-function: ease-in-out;
37
+ transition-timing-function: ease-in-out;
38
+ }
39
+
40
+ .ecwid-shopping-cart-search button.ecwid-SearchPanel-button:hover {
41
+ color: #FFF;
42
+ background-color: #222;
43
+ background-position: 0px -15px;
44
+ }
45
+
46
+ .ecwid-shopping-cart-search .ecwid-SearchPanel-field {
47
+ margin-bottom: 0px;
48
+ }
49
+ #ecwid_product_browser_scroller {
50
+ position: relative;
51
+ }
52
+
53
+ .ecwid-productBrowser-sharePanel-header {
54
+ line-height: normal;
55
+ }
56
+
57
+ .ecwid-productBrowser table {
58
+ line-height: normal;
59
  }
css/themes/evolve.css CHANGED
@@ -1,20 +1,20 @@
1
- .ecwid-shopping-cart-product-browser table,
2
- .ecwid-shopping-cart-categories table,
3
- .ecwid-popup table,
4
- .ecwid-MessageBox table {
5
- border: 0px none !important;
6
- }
7
-
8
- .ecwid-shopping-cart-product-browser button,
9
- .ecwid-popup button,
10
- .ecwid-MessageBox button {
11
- color: inherit !important;
12
- }
13
-
14
- .ecwid-shopping-cart-search button {
15
- padding: 0.15em 0.3em !important;
16
- }
17
-
18
- .ecwid-productBrowser-details-rightPanel table td {
19
- padding: 0 !important;
20
  }
1
+ .ecwid-shopping-cart-product-browser table,
2
+ .ecwid-shopping-cart-categories table,
3
+ .ecwid-popup table,
4
+ .ecwid-MessageBox table {
5
+ border: 0px none !important;
6
+ }
7
+
8
+ .ecwid-shopping-cart-product-browser button,
9
+ .ecwid-popup button,
10
+ .ecwid-MessageBox button {
11
+ color: inherit !important;
12
+ }
13
+
14
+ .ecwid-shopping-cart-search button {
15
+ padding: 0.15em 0.3em !important;
16
+ }
17
+
18
+ .ecwid-productBrowser-details-rightPanel table td {
19
+ padding: 0 !important;
20
  }
css/themes/mantra.css CHANGED
@@ -1,3 +1,3 @@
1
- html#ecwid_html body#ecwid_body div.ecwid-minicart-mini {
2
- margin-top: 1px;
3
  }
1
+ html#ecwid_html body#ecwid_body div.ecwid-minicart-mini {
2
+ margin-top: 1px;
3
  }
css/themes/responsive-adjustments.css CHANGED
@@ -1,385 +1,385 @@
1
- /* Page Adjustments */
2
- body.ecwid-shopping-cart #wrapper {
3
- padding: 0 47px 20px 47px;
4
- }
5
-
6
- body.ecwid-shopping-cart .page {
7
- position: relative;
8
- }
9
-
10
- body.ecwid-shopping-cart #content-full {
11
- margin-top: 55px;
12
- }
13
-
14
- .ecwid-shopping-cart .breadcrumb-list {
15
- display: none;
16
- }
17
-
18
- body.ecwid-shopping-cart h1.entry-title {
19
- padding-left: 1px;
20
- font-size: 37px;
21
- margin-top: 16px;
22
- }
23
-
24
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a,
25
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-link,
26
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLink a,
27
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-results-topPanel .ecwid-results-topPanel-viewAsPanel-link,
28
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-productsTable-addToBagLink
29
- {
30
- text-decoration: none;
31
- }
32
-
33
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a:hover,
34
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-link:hover,
35
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLink a:hover,
36
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-results-topPanel .ecwid-results-topPanel-viewAsPanel-link:hover,
37
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-productsTable-addToBagLink:hover
38
- {
39
- text-decoration: underline;
40
- }
41
-
42
- html#ecwid_html body#ecwid_body #container .ecwid-categories-category {
43
- font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
44
- font-size: 22px;
45
- }
46
-
47
- /* Minicart */
48
-
49
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-minicart {
50
- position: absolute;
51
- top: 58px;
52
- display: inline-block;
53
- right: 0px;
54
- }
55
-
56
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-minicart div.ecwid-minicart-mini {
57
- width: 100px;
58
- text-align: right;
59
- }
60
- .ecwid-shopping-cart-minicart {
61
- visibility: hidden;
62
- }
63
-
64
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-rolloverContainer {
65
- display: block;
66
- }
67
-
68
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart {
69
- margin-right: 5px;
70
- height: 35px;
71
- }
72
-
73
- /* Search */
74
-
75
-
76
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel input.ecwid-SearchPanel-field {
77
- width:30px;
78
- }
79
-
80
- .ecwid-shopping-cart .ecwid-shopping-cart-search {
81
- position: absolute;
82
- right: 5px;
83
- top: 8px;
84
- z-index: 1;
85
- height: 45px;
86
- }
87
-
88
- .ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel {
89
- display: none;
90
- width: 40px;
91
- }
92
-
93
- .ecwid-shopping-cart.ecwid-search-open .ecwid-search-placeholder {
94
- display: none;
95
- }
96
-
97
- .ecwid-shopping-cart.ecwid-search-open .ecwid-shopping-cart-search .ecwid-SearchPanel {
98
- display: block;
99
- width: 180px;
100
- -webkit-transition: width 0.1s;
101
- transition: width 0.1s;
102
- }
103
-
104
- .ecwid-shopping-cart-search,
105
- .ecwid-SearchPanel {
106
- white-space: nowrap;
107
- }
108
-
109
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-button,
110
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel .ecwid-SearchPanel-button {
111
- border: 0 none;
112
- background: transparent;
113
- line-height: normal;
114
- vertical-align: top;
115
- padding: 0;
116
- margin: 0;
117
- width: 0px;
118
- height:30px;
119
- position: relative;
120
- right: 0px;
121
- cursor: pointer;
122
- font-size: 0px;
123
- }
124
-
125
- .ecwid-shopping-cart-search .ecwid-search-placeholder {
126
- width: 1px;
127
- height: 20px;
128
- position: absolute;
129
- right: 23px;
130
- top: -2px;
131
- z-index: 1;
132
- }
133
-
134
- .ecwid-shopping-cart .ecwid-search-placeholder:after,
135
- .ecwid-SearchPanel .ecwid-SearchPanel-button:before {
136
- content: '\f179';
137
- font-weight: bold;
138
- font-family: 'dashicons';
139
- font-size: 18px;
140
- color: #AAA;
141
- position: relative;
142
- }
143
-
144
- .ecwid-shopping-cart .ecwid-search-placeholder:after
145
- {
146
- top: 7px;
147
- cursor: pointer;
148
- }
149
-
150
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search input,
151
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search input:focus
152
- {
153
- border: 1px solid #D1D1D1;
154
- outline: none;
155
- }
156
-
157
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-search-open .ecwid-shopping-cart-search input.ecwid-SearchPanel-field,
158
- html#ecwid_html body#ecwid_body .ecwid-productBrowser-search-SearchPanel input[type=search],
159
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel input.ecwid-SearchPanel-field
160
- {
161
- -webkit-appearance: none;
162
- border-radius: 3px;
163
- margin-right: -24px;
164
- padding: 6px 0px 6px 3px;
165
- box-shadow: none;
166
- border: 1px solid #D1D1D1;
167
- width:100%;
168
- box-sizing: border-box;
169
- }
170
-
171
- input.ecwid-SearchPanel-field::-webkit-search-cancel-button {
172
- -webkit-appearance: none;
173
- margin: 0px;
174
- }
175
-
176
- /* Auth */
177
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories {
178
- margin-top: 60px;
179
- }
180
-
181
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-product-browser {
182
- margin-top: 50px;
183
- }
184
-
185
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini,
186
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search,
187
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart {
188
- position: absolute;
189
- }
190
-
191
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini {
192
- margin-bottom: 5px;
193
- display: inline-block;
194
- width: inherit;
195
- right: 0px;
196
- }
197
-
198
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-with-search .ecwid-productBrowser-auth-mini {
199
- margin-right: 25px;
200
- }
201
-
202
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini td {
203
- height: 45px;
204
- }
205
-
206
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-ProductBrowser-auth-anonim,
207
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-ProductBrowser-auth-logged {
208
- margin-right: 0px;
209
- }
210
-
211
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-search-open .ecwid-productBrowser-auth-mini {
212
- margin-right: 195px;
213
- -webkit-transition: margin-right 0.1s;
214
- transition: margin-right 0.1s;
215
- }
216
-
217
- /* Product browser */
218
-
219
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser {
220
- padding: 0;
221
- }
222
-
223
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-head {
224
- font-size: 26px;
225
- margin-top: 2px;
226
- }
227
-
228
- body.ecwid-shopping-cart h1,
229
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a,
230
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a:active,
231
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-head,
232
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a,
233
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:active,
234
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-price,
235
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-categoryPath a,
236
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-results-topPanel div
237
- {
238
- font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
239
- }
240
-
241
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath a,
242
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath a:active
243
- {
244
- font-size: 14px;
245
- }
246
-
247
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLabel
248
- {
249
- font-size: 13px;
250
- }
251
-
252
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath {
253
- padding-top: 5px;
254
- }
255
-
256
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid-mainTable {
257
- margin-top: 18px;
258
- }
259
-
260
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid div.ecwid-productBrowser-productNameLink {
261
- text-align: center;
262
- }
263
-
264
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a,
265
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:active,
266
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:visited
267
- {
268
- text-decoration: none;
269
- font-size: 20px;
270
- }
271
-
272
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid div.ecwid-productBrowser-sku {
273
- display: none;
274
- }
275
-
276
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-price {
277
- margin-top: 0;
278
- font-weight: 600;
279
- }
280
-
281
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser td.ecwid-productBrowser-productsGrid-cellSpace {
282
- height: 62px;
283
- }
284
-
285
- /* Product details */
286
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-details-rightPanel {
287
- margin-right: 4px;
288
- }
289
-
290
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-details-inStockLabel,
291
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-fieldLabel,
292
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-details-qtyLabel
293
- {
294
- font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
295
- }
296
-
297
- @media screen and (max-width: 650px) {
298
-
299
- body.ecwid-shopping-cart #content-full {
300
- margin-top: 32px;
301
- }
302
- body.ecwid-shopping-cart h1.entry-title {
303
- display: none;
304
- }
305
-
306
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser {
307
- padding: 0 4px !important;
308
- }
309
-
310
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories {
311
- display: none;
312
-
313
- }
314
- /* Search */
315
-
316
- .ecwid-shopping-cart .ecwid-shopping-cart-search {
317
- top: -35px;
318
- right: auto;
319
- width: 100%;
320
- white-space: nowrap;
321
- }
322
-
323
- .ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel {
324
- display: block;
325
- width:100%;
326
- }
327
-
328
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel input.ecwid-SearchPanel-field {
329
- width: 100%;
330
- box-sizing: border-box;
331
- display: inline-block;
332
- }
333
-
334
- /* Auth */
335
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini {
336
- top: -25px;
337
- }
338
-
339
- html#ecwid_html body#ecwid_body .ecwid-productBrowser-auth > div,
340
- html#ecwid_html body#ecwid_body.ecwid-with-search .ecwid-productBrowser-auth > div,
341
- html#ecwid_html body#ecwid_body.ecwid-with-minicart .ecwid-productBrowser-auth > div,
342
- html#ecwid_html body#ecwid_body.ecwid-with-minicart.ecwid-with-search .ecwid-productBrowser-auth > div {
343
- margin-right: 0px;
344
- }
345
-
346
-
347
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini td {
348
- height: auto;
349
- }
350
-
351
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-ProductBrowser-auth-space {
352
- display: none;
353
- }
354
- /* Minicart */
355
-
356
- .ecwid-shopping-cart-minicart {
357
- position: absolute;
358
- right: auto;
359
- left: 31px;
360
- top: -204px;
361
- }
362
-
363
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart,
364
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-rolloverContainer
365
- {
366
- display: none;
367
- }
368
-
369
- /* Product Browser */
370
- html#ecwid_html body#ecwid_body .ecwid-shopping-cart-product-browser {
371
- margin-top: 40px;
372
- }
373
-
374
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-head {
375
- }
376
-
377
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath {
378
- padding-top: 6px;
379
- }
380
-
381
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productNameLink {
382
- margin-top: 10px;
383
- }
384
-
385
- }
1
+ /* Page Adjustments */
2
+ body.ecwid-shopping-cart #wrapper {
3
+ padding: 0 47px 20px 47px;
4
+ }
5
+
6
+ body.ecwid-shopping-cart .page {
7
+ position: relative;
8
+ }
9
+
10
+ body.ecwid-shopping-cart #content-full {
11
+ margin-top: 55px;
12
+ }
13
+
14
+ .ecwid-shopping-cart .breadcrumb-list {
15
+ display: none;
16
+ }
17
+
18
+ body.ecwid-shopping-cart h1.entry-title {
19
+ padding-left: 1px;
20
+ font-size: 37px;
21
+ margin-top: 16px;
22
+ }
23
+
24
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a,
25
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-link,
26
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLink a,
27
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-results-topPanel .ecwid-results-topPanel-viewAsPanel-link,
28
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-productsTable-addToBagLink
29
+ {
30
+ text-decoration: none;
31
+ }
32
+
33
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a:hover,
34
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-link:hover,
35
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLink a:hover,
36
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-results-topPanel .ecwid-results-topPanel-viewAsPanel-link:hover,
37
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-productsTable-addToBagLink:hover
38
+ {
39
+ text-decoration: underline;
40
+ }
41
+
42
+ html#ecwid_html body#ecwid_body #container .ecwid-categories-category {
43
+ font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
44
+ font-size: 22px;
45
+ }
46
+
47
+ /* Minicart */
48
+
49
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-minicart {
50
+ position: absolute;
51
+ top: 58px;
52
+ display: inline-block;
53
+ right: 0px;
54
+ }
55
+
56
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-minicart div.ecwid-minicart-mini {
57
+ width: 100px;
58
+ text-align: right;
59
+ }
60
+ .ecwid-shopping-cart-minicart {
61
+ visibility: hidden;
62
+ }
63
+
64
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-rolloverContainer {
65
+ display: block;
66
+ }
67
+
68
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart {
69
+ margin-right: 5px;
70
+ height: 35px;
71
+ }
72
+
73
+ /* Search */
74
+
75
+
76
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel input.ecwid-SearchPanel-field {
77
+ width:30px;
78
+ }
79
+
80
+ .ecwid-shopping-cart .ecwid-shopping-cart-search {
81
+ position: absolute;
82
+ right: 5px;
83
+ top: 8px;
84
+ z-index: 1;
85
+ height: 45px;
86
+ }
87
+
88
+ .ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel {
89
+ display: none;
90
+ width: 40px;
91
+ }
92
+
93
+ .ecwid-shopping-cart.ecwid-search-open .ecwid-search-placeholder {
94
+ display: none;
95
+ }
96
+
97
+ .ecwid-shopping-cart.ecwid-search-open .ecwid-shopping-cart-search .ecwid-SearchPanel {
98
+ display: block;
99
+ width: 180px;
100
+ -webkit-transition: width 0.1s;
101
+ transition: width 0.1s;
102
+ }
103
+
104
+ .ecwid-shopping-cart-search,
105
+ .ecwid-SearchPanel {
106
+ white-space: nowrap;
107
+ }
108
+
109
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search .ecwid-SearchPanel .ecwid-SearchPanel-button,
110
+ html#ecwid_html body#ecwid_body .ecwid-SearchPanel .ecwid-SearchPanel-button {
111
+ border: 0 none;
112
+ background: transparent;
113
+ line-height: normal;
114
+ vertical-align: top;
115
+ padding: 0;
116
+ margin: 0;
117
+ width: 0px;
118
+ height:30px;
119
+ position: relative;
120
+ right: 0px;
121
+ cursor: pointer;
122
+ font-size: 0px;
123
+ }
124
+
125
+ .ecwid-shopping-cart-search .ecwid-search-placeholder {
126
+ width: 1px;
127
+ height: 20px;
128
+ position: absolute;
129
+ right: 23px;
130
+ top: -2px;
131
+ z-index: 1;
132
+ }
133
+
134
+ .ecwid-shopping-cart .ecwid-search-placeholder:after,
135
+ .ecwid-SearchPanel .ecwid-SearchPanel-button:before {
136
+ content: '\f179';
137
+ font-weight: bold;
138
+ font-family: 'dashicons';
139
+ font-size: 18px;
140
+ color: #AAA;
141
+ position: relative;
142
+ }
143
+
144
+ .ecwid-shopping-cart .ecwid-search-placeholder:after
145
+ {
146
+ top: 7px;
147
+ cursor: pointer;
148
+ }
149
+
150
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search input,
151
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-search input:focus
152
+ {
153
+ border: 1px solid #D1D1D1;
154
+ outline: none;
155
+ }
156
+
157
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-search-open .ecwid-shopping-cart-search input.ecwid-SearchPanel-field,
158
+ html#ecwid_html body#ecwid_body .ecwid-productBrowser-search-SearchPanel input[type=search],
159
+ html#ecwid_html body#ecwid_body .ecwid-SearchPanel input.ecwid-SearchPanel-field
160
+ {
161
+ -webkit-appearance: none;
162
+ border-radius: 3px;
163
+ margin-right: -24px;
164
+ padding: 6px 0px 6px 3px;
165
+ box-shadow: none;
166
+ border: 1px solid #D1D1D1;
167
+ width:100%;
168
+ box-sizing: border-box;
169
+ }
170
+
171
+ input.ecwid-SearchPanel-field::-webkit-search-cancel-button {
172
+ -webkit-appearance: none;
173
+ margin: 0px;
174
+ }
175
+
176
+ /* Auth */
177
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories {
178
+ margin-top: 60px;
179
+ }
180
+
181
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-product-browser {
182
+ margin-top: 50px;
183
+ }
184
+
185
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini,
186
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search,
187
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart {
188
+ position: absolute;
189
+ }
190
+
191
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini {
192
+ margin-bottom: 5px;
193
+ display: inline-block;
194
+ width: inherit;
195
+ right: 0px;
196
+ }
197
+
198
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-with-search .ecwid-productBrowser-auth-mini {
199
+ margin-right: 25px;
200
+ }
201
+
202
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini td {
203
+ height: 45px;
204
+ }
205
+
206
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-ProductBrowser-auth-anonim,
207
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-ProductBrowser-auth-logged {
208
+ margin-right: 0px;
209
+ }
210
+
211
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart.ecwid-search-open .ecwid-productBrowser-auth-mini {
212
+ margin-right: 195px;
213
+ -webkit-transition: margin-right 0.1s;
214
+ transition: margin-right 0.1s;
215
+ }
216
+
217
+ /* Product browser */
218
+
219
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser {
220
+ padding: 0;
221
+ }
222
+
223
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-head {
224
+ font-size: 26px;
225
+ margin-top: 2px;
226
+ }
227
+
228
+ body.ecwid-shopping-cart h1,
229
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a,
230
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth a:active,
231
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-head,
232
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a,
233
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:active,
234
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-price,
235
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-categoryPath a,
236
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-results-topPanel div
237
+ {
238
+ font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
239
+ }
240
+
241
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath a,
242
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath a:active
243
+ {
244
+ font-size: 14px;
245
+ }
246
+
247
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath-categoryLabel
248
+ {
249
+ font-size: 13px;
250
+ }
251
+
252
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath {
253
+ padding-top: 5px;
254
+ }
255
+
256
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid-mainTable {
257
+ margin-top: 18px;
258
+ }
259
+
260
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid div.ecwid-productBrowser-productNameLink {
261
+ text-align: center;
262
+ }
263
+
264
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a,
265
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:active,
266
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-productNameLink a:visited
267
+ {
268
+ text-decoration: none;
269
+ font-size: 20px;
270
+ }
271
+
272
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productsGrid div.ecwid-productBrowser-sku {
273
+ display: none;
274
+ }
275
+
276
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-price {
277
+ margin-top: 0;
278
+ font-weight: 600;
279
+ }
280
+
281
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser td.ecwid-productBrowser-productsGrid-cellSpace {
282
+ height: 62px;
283
+ }
284
+
285
+ /* Product details */
286
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser div.ecwid-productBrowser-details-rightPanel {
287
+ margin-right: 4px;
288
+ }
289
+
290
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-details-inStockLabel,
291
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-fieldLabel,
292
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-details-qtyLabel
293
+ {
294
+ font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
295
+ }
296
+
297
+ @media screen and (max-width: 650px) {
298
+
299
+ body.ecwid-shopping-cart #content-full {
300
+ margin-top: 32px;
301
+ }
302
+ body.ecwid-shopping-cart h1.entry-title {
303
+ display: none;
304
+ }
305
+
306
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser {
307
+ padding: 0 4px !important;
308
+ }
309
+
310
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-categories {
311
+ display: none;
312
+
313
+ }
314
+ /* Search */
315
+
316
+ .ecwid-shopping-cart .ecwid-shopping-cart-search {
317
+ top: -35px;
318
+ right: auto;
319
+ width: 100%;
320
+ white-space: nowrap;
321
+ }
322
+
323
+ .ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel {
324
+ display: block;
325
+ width:100%;
326
+ }
327
+
328
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-search .ecwid-SearchPanel input.ecwid-SearchPanel-field {
329
+ width: 100%;
330
+ box-sizing: border-box;
331
+ display: inline-block;
332
+ }
333
+
334
+ /* Auth */
335
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini {
336
+ top: -25px;
337
+ }
338
+
339
+ html#ecwid_html body#ecwid_body .ecwid-productBrowser-auth > div,
340
+ html#ecwid_html body#ecwid_body.ecwid-with-search .ecwid-productBrowser-auth > div,
341
+ html#ecwid_html body#ecwid_body.ecwid-with-minicart .ecwid-productBrowser-auth > div,
342
+ html#ecwid_html body#ecwid_body.ecwid-with-minicart.ecwid-with-search .ecwid-productBrowser-auth > div {
343
+ margin-right: 0px;
344
+ }
345
+
346
+
347
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-auth-mini td {
348
+ height: auto;
349
+ }
350
+
351
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-ProductBrowser-auth-space {
352
+ display: none;
353
+ }
354
+ /* Minicart */
355
+
356
+ .ecwid-shopping-cart-minicart {
357
+ position: absolute;
358
+ right: auto;
359
+ left: 31px;
360
+ top: -204px;
361
+ }
362
+
363
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-minicart,
364
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-minicart-mini-rolloverContainer
365
+ {
366
+ display: none;
367
+ }
368
+
369
+ /* Product Browser */
370
+ html#ecwid_html body#ecwid_body .ecwid-shopping-cart-product-browser {
371
+ margin-top: 40px;
372
+ }
373
+
374
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-head {
375
+ }
376
+
377
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productBrowser-categoryPath {
378
+ padding-top: 6px;
379
+ }
380
+
381
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-shopping-cart-product-browser .ecwid-productBrowser-productNameLink {
382
+ margin-top: 10px;
383
+ }
384
+
385
+ }
css/themes/responsive.css CHANGED
@@ -1,22 +1,22 @@
1
- /* Mobile */
2
- @media screen and (max-width: 400px) {
3
-
4
- body.ecwid-shopping-cart #container {
5
- padding: 0 10px;
6
- }
7
-
8
- body.ecwid-shopping-cart #wrapper {
9
- padding: 0 10px;
10
- }
11
- }
12
-
13
- @media screen and (max-width: 650px) {
14
-
15
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart #select-State-Box,
16
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart #select-Country-Box,
17
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-AddressForm-state,
18
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-AddressForm-country,
19
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-fieldEnvelope {
20
- width: 100%;
21
- }
22
  }
1
+ /* Mobile */
2
+ @media screen and (max-width: 400px) {
3
+
4
+ body.ecwid-shopping-cart #container {
5
+ padding: 0 10px;
6
+ }
7
+
8
+ body.ecwid-shopping-cart #wrapper {
9
+ padding: 0 10px;
10
+ }
11
+ }
12
+
13
+ @media screen and (max-width: 650px) {
14
+
15
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart #select-State-Box,
16
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart #select-Country-Box,
17
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-AddressForm-state,
18
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-AddressForm-country,
19
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-fieldEnvelope {
20
+ width: 100%;
21
+ }
22
  }
css/themes/responsiveboat.css CHANGED
@@ -1,7 +1,7 @@
1
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productsList ul li .ecwid-productsList-name {
2
- font-size: 16px;
3
- }
4
-
5
- html#ecwid_html body#ecwid_body .ecwid-productBrowser-details-rightPanel table {
6
- line-height: initial;
7
  }
1
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart .ecwid-productsList ul li .ecwid-productsList-name {
2
+ font-size: 16px;
3
+ }
4
+
5
+ html#ecwid_html body#ecwid_body .ecwid-productBrowser-details-rightPanel table {
6
+ line-height: initial;
7
  }
css/themes/salient.css CHANGED
@@ -1,3 +1,3 @@
1
- label span.ecwid-productBrowser-details-optionRadioButton-name {
2
- color: inherit !important;
3
  }
1
+ label span.ecwid-productBrowser-details-optionRadioButton-name {
2
+ color: inherit !important;
3
  }
css/themes/sliding-door.css CHANGED
@@ -1,7 +1,7 @@
1
- html#ecwid_html body#ecwid_body #container {
2
- margin-left: 200px;
3
- margin-right: 200px;
4
- }
5
- html#ecwid_html body#ecwid_body #content {
6
- width: 550px;
7
  }
1
+ html#ecwid_html body#ecwid_body #container {
2
+ margin-left: 200px;
3
+ margin-right: 200px;
4
+ }
5
+ html#ecwid_html body#ecwid_body #content {
6
+ width: 550px;
7
  }
css/themes/storefront.css CHANGED
@@ -1,7 +1,7 @@
1
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-productsList-thumbnail {
2
- padding-top: 15px;
3
- }
4
- html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-productsList-details {
5
- padding-top: 15px;
6
- padding-bottom: 25px;
7
  }
1
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-productsList-thumbnail {
2
+ padding-top: 15px;
3
+ }
4
+ html#ecwid_html body#ecwid_body.ecwid-shopping-cart div.ecwid-productBrowser-productsList-details {
5
+ padding-top: 15px;
6
+ padding-bottom: 25px;
7
  }
css/themes/twentyfourteen.css CHANGED
@@ -1,8 +1,8 @@
1
- .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta {
2
- max-width: none;
3
- }
4
-
5
- #ecwid_product_browser_scroller.ecwid-scroller-adjustment {
6
- position: relative;
7
- top: -48px;
8
  }
1
+ .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta {
2
+ max-width: none;
3
+ }
4
+
5
+ #ecwid_product_browser_scroller.ecwid-scroller-adjustment {
6
+ position: relative;
7
+ top: -48px;
8
  }
css/themes/zerif-lite.css CHANGED
@@ -1,4 +1,4 @@
1
- html#ecwid_html body#ecwid_body div.ecwid-search-widget {
2
- font-size: 16px;
3
- }
4
-
1
+ html#ecwid_html body#ecwid_body div.ecwid-search-widget {
2
+ font-size: 16px;
3
+ }
4
+
ecwid-shopping-cart.php CHANGED
@@ -1,2796 +1,2592 @@
1
- <?php
2
- /*
3
- Plugin Name: Ecwid Shopping Cart
4
- Plugin URI: http://www.ecwid.com?source=wporg
5
- Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
6
- Text Domain: ecwid-shopping-cart
7
- Author: Ecwid Team
8
- Version: 4.7.4
9
- Author URI: http://www.ecwid.com?source=wporg
10
- */
11
-
12
- register_activation_hook( __FILE__, 'ecwid_store_activate' );
13
- register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
14
- register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
15
-
16
- define("APP_ECWID_COM", 'app.ecwid.com');
17
- define("ECWID_DEMO_STORE_ID", 1003);
18
- define('ECWID_API_AVAILABILITY_CHECK_TIME', 60*60*3);
19
-
20
- define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
21
-
22
- define ( 'ECWID_VERSION_BUILTIN_CHAMELEON', '4.4.2.1' );
23
-
24
- if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
25
- define( 'ECWID_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
26
- }
27
-
28
- if ( ! defined( 'ECWID_PLUGIN_BASENAME' ) ) {
29
- define( 'ECWID_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
30
- }
31
-
32
- if ( ! defined( 'ECWID_PLUGIN_URL' ) ) {
33
- define( 'ECWID_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
34
- }
35
-
36
- if ( ! defined('ECWID_SHORTCODES_DIR' ) ) {
37
- define( 'ECWID_SHORTCODES_DIR', ECWID_PLUGIN_DIR . 'includes/shortcodes' );
38
- }
39
-
40
- // Older versions of Google XML Sitemaps plugin generate it in admin, newer in site area, so the hook should be assigned in both of them
41
- add_action('sm_buildmap', 'ecwid_build_google_xml_sitemap');
42
-
43
- // Needs to be in both front-end and back-end to allow admin zone recognize the shortcode
44
- add_shortcode('ecwid', 'ecwid_shortcode');
45
-
46
- add_action( 'plugins_loaded', 'ecwid_init_integrations' );
47
- add_filter('plugins_loaded', 'ecwid_load_textdomain');
48
-
49
- if ( is_admin() ){
50
- add_action('admin_init', 'ecwid_settings_api_init');
51
- add_action('admin_init', 'ecwid_check_version');
52
- add_action('admin_init', 'ecwid_process_oauth_params');
53
- add_action('admin_notices', 'ecwid_show_admin_messages');
54
- add_action('admin_menu', 'ecwid_build_menu');
55
- add_action('admin_enqueue_scripts', 'ecwid_common_admin_scripts');
56
- add_action('admin_enqueue_scripts', 'ecwid_register_admin_styles');
57
- add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
58
- add_action('wp_ajax_ecwid_hide_vote_message', 'ecwid_hide_vote_message');
59
- add_action('wp_ajax_ecwid_hide_message', 'ecwid_ajax_hide_message');
60
- add_action('wp_ajax_save-widget', 'ecwid_ajax_save_widget');
61
- add_action('wp_ajax_ecwid_reset_categories_cache', 'ecwid_reset_categories_cache');
62
- add_action('wp_ajax_ecwid_create_store', 'ecwid_create_store');
63
- add_filter('plugin_action_links_' . ECWID_PLUGIN_BASENAME, 'ecwid_plugin_actions');
64
- add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
65
- add_action('save_post', 'ecwid_save_post');
66
- add_action('init', 'ecwid_apply_theme', 0);
67
- add_action('get_footer', 'ecwid_admin_get_footer');
68
- add_action('admin_post_ecwid_connect', 'ecwid_admin_post_connect');
69
- add_filter('tiny_mce_before_init', 'ecwid_tinymce_init');
70
- add_action('admin_post_ecwid_get_debug', 'ecwid_get_debug_file');
71
- } else {
72
- add_shortcode('ecwid_script', 'ecwid_script_shortcode');
73
- add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
74
- add_shortcode('ecwid_searchbox', 'ecwid_searchbox_shortcode');
75
- add_shortcode('ecwid_categories', 'ecwid_categories_shortcode');
76
- add_shortcode('ecwid_script', 'ecwid_script_shortcode');
77
- add_shortcode('ecwid_product', 'ecwid_product_shortcode');
78
- add_action('init', 'ecwid_backward_compatibility');
79
- add_action('send_headers', 'ecwid_503_on_store_closed');
80
- add_action('template_redirect', 'ecwid_404_on_broken_escaped_fragment');
81
- add_action('template_redirect', 'ecwid_apply_theme');
82
- add_action('wp_enqueue_scripts', 'ecwid_enqueue_frontend');
83
- add_action('wp', 'ecwid_seo_ultimate_compatibility', 0);
84
- add_action('wp', 'ecwid_remove_default_canonical');
85
- add_filter('wp', 'ecwid_seo_compatibility_init', 0);
86
- add_filter('wp_title', 'ecwid_seo_title', 10000);
87
- add_filter('document_title_parts', 'ecwid_seo_title_parts');
88
- add_action('plugins_loaded', 'ecwid_minifier_compatibility', 0);
89
- add_action('wp_head', 'ecwid_meta_description', 0);
90
- add_action('wp_head', 'ecwid_ajax_crawling_fragment');
91
- add_action('wp_head', 'ecwid_meta');
92
- add_action('wp_head', 'ecwid_canonical');
93
- add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
94
- add_action('wp_head', 'ecwid_add_chameleon');
95
- add_action('wp_head', 'ecwid_product_browser_url_in_head');
96
- add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
97
- add_filter('the_content', 'ecwid_content_started', 0);
98
- add_filter('body_class', 'ecwid_body_class');
99
- add_action('redirect_canonical', 'ecwid_redirect_canonical', 10, 2 );
100
- $ecwid_seo_title = '';
101
- }
102
- add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
103
- if (get_option('ecwid_last_oauth_fail_time') > 0) {
104
- add_action('plugins_loaded', 'ecwid_test_oauth');
105
- }
106
-
107
- $ecwid_script_rendered = false; // controls single script.js on page
108
-
109
- require_once ECWID_PLUGIN_DIR . 'includes/themes.php';
110
- require_once ECWID_PLUGIN_DIR . 'includes/oembed.php';
111
- require_once ECWID_PLUGIN_DIR . 'includes/widgets.php';
112
- require_once ECWID_PLUGIN_DIR . 'includes/shortcodes.php';
113
-
114
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-message-manager.php';
115
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-store-editor.php';
116
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-oauth.php';
117
-
118
- if (is_admin()) {
119
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-help-page.php';
120
- }
121
-
122
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
123
-
124
- require_once ECWID_PLUGIN_DIR . 'lib/ecwid_platform.php';
125
- require_once ECWID_PLUGIN_DIR . 'lib/ecwid_api_v3.php';
126
-
127
- function ecwid_init_integrations()
128
- {
129
- if ( !function_exists( 'get_plugins' ) ) { require_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); }
130
-
131
- $integrations = array(
132
- 'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
133
- 'wpseo' => 'wordpress-seo/wp-seo.php',
134
- 'divibuilder' => 'divi-builder/divi-builder.php',
135
- 'autoptimize' => 'autoptimize/autoptimize.php'
136
- );
137
-
138
- foreach ($integrations as $key => $plugin) {
139
- if ( is_plugin_active($plugin) ) {
140
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-integration-' . $key . '.php';
141
- }
142
- }
143
- }
144
-
145
- $version = get_bloginfo('version');
146
-
147
- function ecwid_add_breadcrumbs_navxt($trail)
148
- {
149
- $breadcrumb = new bcn_breadcrumb('Ecwid', '', '', 'http://ecwid.com');
150
- $trail->add($breadcrumb);
151
- }
152
-
153
- function ecwid_add_breadcrumb_links_wpseo($links)
154
- {
155
- return array_merge((array)$links, array(
156
- array(
157
- 'text' => 'ecwid.com',
158
- 'url' => 'http://ecwid.com'
159
- )
160
- ));
161
- }
162
- if (version_compare($version, '3.6') < 0) {
163
- /**
164
- * A copy of has_shortcode functionality from wordpress 3.6
165
- * http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/shortcodes.php
166
- */
167
-
168
- if (!function_exists('shortcode_exists')) {
169
- function shortcode_exists( $tag ) {
170
- global $shortcode_tags;
171
- return array_key_exists( $tag, $shortcode_tags );
172
- }
173
- }
174
-
175
- if (!function_exists('has_shortcode')) {
176
- function has_shortcode( $content, $tag ) {
177
- if ( false === strpos( $content, '[' ) ) {
178
- return false;
179
- }
180
-
181
- if ( shortcode_exists( $tag ) ) {
182
- preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
183
- if ( empty( $matches ) )
184
- return false;
185
-
186
- foreach ( $matches as $shortcode ) {
187
- if ( $tag === $shortcode[2] ) {
188
- return true;
189
- } elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) {
190
- return true;
191
- }
192
- }
193
- }
194
- return false;
195
- }
196
- }
197
- }
198
-
199
- if (is_admin()) {
200
- $main_button_class = "";
201
- if (version_compare($version, '3.8-beta') > 0) {
202
- $main_button_class = "button-primary";
203
- } else {
204
- $main_button_class = "pure-button pure-button-primary";
205
- }
206
-
207
- define('ECWID_MAIN_BUTTON_CLASS', $main_button_class);
208
- }
209
-
210
- function ecwid_body_class($classes)
211
- {
212
- if (ecwid_page_has_productbrowser()) {
213
- $classes[] = 'ecwid-shopping-cart';
214
- }
215
-
216
- return $classes;
217
- }
218
-
219
- function ecwid_redirect_canonical($redirect_url, $requested_url) {
220
- if (!is_front_page()) {
221
- return $redirect_url;
222
- }
223
-
224
- if (strpos($requested_url, '_escaped_fragment_') === false) {
225
- return $redirect_url;
226
- }
227
-
228
- $parsed = parse_url($requested_url);
229
- $query = array();
230
- parse_str($parsed['query'], $query);
231
-
232
- if (!array_key_exists('_escaped_fragment_', $query)) {
233
- return $redirect_url;
234
- }
235
-
236
- if (!ecwid_page_has_productbrowser(get_the_ID())) {
237
- return $redirect_url;
238
- }
239
-
240
- return $requested_url;
241
- }
242
-
243
- function ecwid_ie8_fonts_inclusion()
244
- {
245
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
246
-
247
- $url = ECWID_PLUGIN_URL . 'fonts/ecwid-logo.eot';
248
- echo <<<HTML
249
- <style>
250
- @font-face {
251
- font-family: 'ecwid-logo';
252
- src:url($url);
253
- }
254
- </style>
255
- HTML;
256
-
257
- }
258
-
259
- add_action('wp_ajax_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
260
- add_action('wp_ajax_nopriv_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
261
-
262
-
263
- function ecwid_enqueue_frontend() {
264
-
265
- if (!wp_script_is('jquery-ui-widget')) {
266
- wp_enqueue_script('jquery-ui-widget', includes_url() . 'js/jquery/ui/widget.min.js', array('jquery'));
267
- }
268
-
269
- wp_register_script('ecwid-products-list-js', ECWID_PLUGIN_URL . 'js/products-list.js', array('jquery-ui-widget'), get_option('ecwid_plugin_version'));
270
- wp_enqueue_script('ecwid-products-list-js');
271
-
272
- wp_register_style('ecwid-products-list-css', ECWID_PLUGIN_URL . 'css/products-list.css', array(), get_option('ecwid_plugin_version'));
273
- wp_enqueue_style('ecwid-css', ECWID_PLUGIN_URL . 'css/frontend.css',array(), get_option('ecwid_plugin_version'));
274
- wp_enqueue_style('ecwid-fonts-css', ECWID_PLUGIN_URL . 'css/fonts.css', array(), get_option('ecwid_plugin_version'));
275
-
276
- wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
277
-
278
- if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
279
- wp_enqueue_script('ecwid-recently-viewed', ECWID_PLUGIN_URL . 'js/recently-viewed-common.js', array('jquery', 'utils'), get_option('ecwid_plugin_version'), true);
280
-
281
- wp_localize_script(
282
- 'ecwid-products-list-js',
283
- 'wp_ecwid_products_list_vars',
284
- array(
285
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
286
- 'is_api_available' => ecwid_is_paid_account()
287
- )
288
- );
289
- }
290
-
291
- if (is_plugin_active('contact-form-7-designer/cf7-styles.php')) {
292
- wp_enqueue_script('ecwid-cf7designer', ECWID_PLUGIN_URL . 'js/cf7designer.js', array(), get_option('ecwid-plugin-version'), true);
293
- }
294
- }
295
-
296
- function ecwid_add_chameleon() {
297
- if (!get_option('ecwid_use_chameleon')) {
298
- return;
299
- }
300
-
301
- $colors = array();
302
-
303
- foreach (array('foreground', 'background', 'link', 'price', 'button') as $kind) {
304
- $color = get_option( 'ecwid_chameleon_colors_' . $kind );
305
- if ( $color ) {
306
- $colors['color-' . $kind] = $color;
307
- }
308
- }
309
-
310
- if (empty($colors)) {
311
- $colors = 'auto';
312
- }
313
-
314
- $colors = json_encode($colors);
315
- $font = '"auto"';
316
-
317
- $chameleon = apply_filters( 'ecwid_chameleon_settings', array('colors' => $colors, 'font' => $font));
318
-
319
- if (!is_array($chameleon)) {
320
- $chameleon = array(
321
- 'colors' => $colors,
322
- 'font' => $font
323
- );
324
- }
325
-
326
- if (!isset($chameleon['colors'])) {
327
- $chameleon['colors'] = json_encode($colors);
328
- }
329
-
330
- if (!isset($chameleon['font'])) {
331
- $chameleon['font'] = $font;
332
- }
333
-
334
- echo <<<HTML
335
- <script type="text/javascript">
336
- window.ec = window.ec || Object();
337
- window.ec.config = window.ec.config || Object();
338
- window.ec.config.chameleon = window.ec.config.chameleon || Object();
339
- window.ec.config.chameleon.font = $chameleon[font];
340
- window.ec.config.chameleon.colors = $chameleon[colors];
341
- </script>
342
- HTML;
343
-
344
- }
345
-
346
- function ecwid_load_textdomain() {
347
- load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
348
-
349
- }
350
-
351
- function ecwid_404_on_broken_escaped_fragment() {
352
- if (!ecwid_is_api_enabled()) {
353
- return;
354
- }
355
-
356
- if (!isset($_GET['_escaped_fragment_'])) {
357
- return;
358
- }
359
-
360
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
361
- $api = ecwid_new_product_api();
362
-
363
- if (isset($params['mode']) && !empty($params['mode']) && isset($params['id'])) {
364
- $result = array();
365
- $is_root_cat = $params['mode'] == 'category' && $params['id'] == 0;
366
- if ($params['mode'] == 'product') {
367
- $result = $api->get_product($params['id']);
368
- } elseif (!$is_root_cat && $params['mode'] == 'category') {
369
- $result = $api->get_category($params['id']);
370
- }
371
-
372
- if (!$is_root_cat && empty($result)) {
373
- global $wp_query;
374
-
375
- $wp_query->set_404();
376
- status_header(404);
377
- }
378
- }
379
- }
380
-
381
- function ecwid_503_on_store_closed() {
382
- if (!ecwid_is_api_enabled()) {
383
- return;
384
- }
385
-
386
- if (!isset($_GET['_escaped_fragment_'])) {
387
- return;
388
- }
389
-
390
- $api = ecwid_new_product_api();
391
- $profile = $api->get_profile();
392
-
393
- if ($profile['closed']) {
394
- header('HTTP/1.1 503 Service Temporarily Unavailable');
395
- header('Status: 503 Service Temporarily Unavailable');
396
- }
397
- }
398
-
399
- function ecwid_backward_compatibility() {
400
- // Backward compatibility with 1.1.2 and earlier
401
- if (isset($_GET['ecwid_product_id']) || isset($_GET['ecwid_category_id'])) {
402
-
403
- if (isset($_GET['ecwid_product_id']))
404
- $redirect = ecwid_get_product_url(intval($_GET['ecwid_product_id']));
405
- elseif (isset($_GET['ecwid_category_id']))
406
- $redirect = ecwid_get_category_url(intval($_GET['ecwid_category_id']));
407
-
408
- wp_redirect($redirect, 301);
409
- exit();
410
- }
411
- }
412
-
413
- function ecwid_build_sitemap($callback)
414
- {
415
- if (!ecwid_is_paid_account() || !ecwid_is_store_page_available()) return;
416
-
417
- $page_id = ecwid_get_current_store_page_id();
418
-
419
- if (get_post_status($page_id) == 'publish') {
420
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-sitemap-builder.php';
421
-
422
- $sitemap = new EcwidSitemapBuilder(ecwid_get_store_page_url(), $callback, ecwid_new_product_api());
423
-
424
- $sitemap->generate();
425
- }
426
- }
427
-
428
- function ecwid_build_google_xml_sitemap()
429
- {
430
- return ecwid_build_sitemap('ecwid_google_xml_sitemap_build_sitemap_callback');
431
- }
432
-
433
- function ecwid_google_xml_sitemap_build_sitemap_callback($url, $priority, $frequency)
434
- {
435
- static $generatorObject = null;
436
- if (is_null($generatorObject)) {
437
- $generatorObject = GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign!
438
- }
439
-
440
- if($generatorObject != null) {
441
- $page = new GoogleSitemapGeneratorPage($url, $priority, $frequency);
442
- $generatorObject->AddElement($page);
443
- }
444
- }
445
-
446
- function ecwid_minifier_compatibility()
447
- {
448
- if ( !function_exists( 'get_plugins' ) ) { require_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); }
449
-
450
- $plugins = get_plugins();
451
- $wp_minify_plugin = 'wp-minify/wp-minify.php';
452
- if (array_key_exists($wp_minify_plugin, $plugins) && is_plugin_active($wp_minify_plugin)) {
453
- global $wp_minify;
454
-
455
- if (is_object($wp_minify) && array_key_exists('default_exclude', get_object_vars($wp_minify)) && is_array($wp_minify->default_exclude)) {
456
- $wp_minify->default_exclude[] = 'ecwid.com/script.js';
457
- }
458
- }
459
- }
460
-
461
- function ecwid_check_version()
462
- {
463
- $plugin_data = get_plugin_data(__FILE__);
464
- $current_version = $plugin_data['Version'];
465
- $stored_version = get_option('ecwid_plugin_version', null);
466
-
467
- $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
468
- if (is_null($migration_since_version)) {
469
- update_option('ecwid_plugin_migration_since_version', $current_version);
470
- }
471
-
472
- $fresh_install = !$stored_version;
473
- $upgrade = $stored_version && version_compare($current_version, $stored_version) > 0;
474
-
475
- if ($fresh_install) {
476
-
477
- ecwid_plugin_add_oauth();
478
- do_action('ecwid_plugin_installed', $current_version);
479
- add_option('ecwid_plugin_version', $current_version);
480
-
481
- update_option('ecwid_use_chameleon', true);
482
-
483
- add_option('ecwid_use_new_horizontal_categories', 'Y');
484
- add_option('ecwid_use_new_search', 'Y');
485
-
486
- } elseif ($upgrade) {
487
-
488
- ecwid_plugin_add_oauth();
489
- do_action('ecwid_plugin_upgraded', array( 'old' => $stored_version, 'new' => $current_version ) );
490
- update_option('ecwid_plugin_version', $current_version);
491
-
492
- add_option('ecwid_use_new_horizontal_categories', '');
493
- add_option('ecwid_use_new_search', '');
494
- }
495
-
496
- if ($fresh_install || $upgrade || @$_GET['ecwid_reinit']) {
497
- if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
498
- add_option('ecwid_fetch_url_use_file_get_contents', '');
499
- add_option('ecwid_remote_get_timeout', '5');
500
- }
501
-
502
- if (ecwid_migrations_is_original_plugin_version_older_than('4.1.3')) {
503
- add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
504
- }
505
-
506
- if (ecwid_migrations_is_original_plugin_version_older_than('4.4.5')) {
507
- add_option('ecwid_enable_sso');
508
- }
509
-
510
-
511
- add_option('ecwid_chameleon_colors_foreground', '');
512
- add_option('ecwid_chameleon_colors_background', '');
513
- add_option('ecwid_chameleon_colors_link', '');
514
- add_option('ecwid_chameleon_colors_button', '');
515
- add_option('ecwid_chameleon_colors_price', '');
516
- }
517
- }
518
-
519
- function ecwid_get_woocommerce_status() {
520
-
521
- $woo = EcwidPlatform::cache_get('woo_status');
522
-
523
- if (is_null($woo)) {
524
- $woo = 0;
525
- $all_plugins = get_plugins();
526
- if (array_key_exists('woocommerce/woocommerce.php', $all_plugins)) {
527
- $active_plugins = get_option('active_plugins');
528
- if (in_array('woocommerce/woocommerce.php', $active_plugins)) {
529
- $woo = 2;
530
- } else {
531
- $woo = 1;
532
- }
533
- }
534
- EcwidPlatform::cache_set('woo_status', $woo, 60 * 60 * 24);
535
- }
536
-
537
- return $woo;
538
- }
539
-
540
- function ecwid_migrations_is_original_plugin_version_older_than($version)
541
- {
542
- $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
543
- return version_compare($migration_since_version, $version) < 0;
544
- }
545
-
546
- function ecwid_log_error($message)
547
- {
548
- $errors = get_option('ecwid_error_log');
549
- if (!$errors) {
550
- $errors = array();
551
- } else {
552
- $errors = json_decode($errors);
553
- if (!is_array($errors)) {
554
- $errors = array();
555
- }
556
- }
557
-
558
- while (count($errors) > 10) {
559
- array_shift($errors);
560
- }
561
-
562
- $errors[] = array(
563
- 'message' => $message,
564
- 'date' => strftime('%c')
565
- );
566
-
567
- update_option('ecwid_error_log', json_encode($errors));
568
- }
569
-
570
- function ecwid_get_last_logged_error()
571
- {
572
-
573
-
574
- return '';
575
- }
576
-
577
- function ecwid_plugin_add_oauth()
578
- {
579
- add_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
580
- add_option('ecwid_oauth_client_secret', 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8');
581
-
582
- update_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
583
- update_option('ecwid_oauth_client_secret', 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8');
584
- }
585
-
586
- function ecwid_override_option($name, $new_value = null)
587
- {
588
- static $overridden = array();
589
-
590
- if (!array_key_exists($name, $overridden)) {
591
- $overridden[$name] = get_option($name);
592
- }
593
-
594
- if (!is_null($new_value)) {
595
- update_option($name, $new_value);
596
- } else {
597
- update_option($name, $overridden[$name]);
598
- }
599
- }
600
- function ecwid_tinymce_init($in)
601
- {
602
- if(!empty($in['extended_valid_elements'])) {
603
- $in['extended_valid_elements'] .= ',';
604
- } else {
605
- $in['extended_valid_elements'] = '';
606
- }
607
-
608
- $in['extended_valid_elements'] .= '@[id|class|style|title|itemscope|itemtype|itemprop|customprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]';
609
-
610
- return $in;
611
- }
612
-
613
- function ecwid_seo_ultimate_compatibility()
614
- {
615
- global $seo_ultimate;
616
-
617
- if ($seo_ultimate && ecwid_page_has_productbrowser()) {
618
- remove_action('template_redirect', array($seo_ultimate->modules['titles'], 'before_header'), 0);
619
- remove_action('wp_head', array($seo_ultimate->modules['titles'], 'after_header'), 1000);
620
- remove_action('su_head', array($seo_ultimate->modules['meta-descriptions'], 'head_tag_output'));
621
- remove_action('su_head', array($seo_ultimate->modules['canonical'], 'link_rel_canonical_tag'));
622
- remove_action('su_head', array($seo_ultimate->modules['canonical'], 'http_link_rel_canonical'));
623
- }
624
- }
625
-
626
- function ecwid_remove_default_canonical()
627
- {
628
- if (array_key_exists('_escaped_fragment_', $_GET) && ecwid_page_has_productbrowser()) {
629
- remove_action( 'wp_head','rel_canonical');
630
- }
631
- }
632
-
633
- function ecwid_seo_compatibility_init($title)
634
- {
635
- if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
636
- return $title;
637
- }
638
-
639
- // Platinum SEO Pack
640
- // Canonical
641
- ecwid_override_option('psp_canonical', false);
642
- // Title
643
- ecwid_override_option('aiosp_rewrite_titles', false);
644
-
645
- add_action('amt_basic_metadata_head', 'ecwid_amt_remove_description');
646
- return $title;
647
-
648
- }
649
-
650
- function ecwid_amt_remove_description($params)
651
- {
652
- foreach ($params as $key => $value) {
653
- if (preg_match('/meta name="description"/', $value)) {
654
- unset ($params[$key]);
655
- }
656
- }
657
-
658
- return $params;
659
- }
660
-
661
- function ecwid_seo_compatibility_restore()
662
- {
663
- if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
664
- return;
665
- }
666
-
667
- ecwid_override_option('psp_canonical');
668
- ecwid_override_option('aiosp_rewrite_titles');
669
- }
670
-
671
- function add_ecwid_admin_bar_node() {
672
- global $wp_admin_bar;
673
-
674
- if ( !is_super_admin() || !is_admin_bar_showing() )
675
- return;
676
-
677
- $theme = ecwid_get_theme_name();
678
- $store_url = ecwid_get_store_page_url();
679
-
680
-
681
- if (!is_admin()) {
682
- $subject = sprintf(__('Ecwid plugin doesn\'t work well with my "%s" theme', 'ecwid-shopping-cart'), $theme);
683
- $body = <<<TEXT
684
- Hey Ecwid,
685
-
686
- My store looks bad with my theme on Wordpress.
687
-
688
- The theme title is %s.
689
- The store URL is %s
690
-
691
- Can you have a look?
692
-
693
- Thanks.
694
- TEXT;
695
- } else {
696
- $subject = __('I have a problem with my Ecwid store', 'ecwid-shopping-cart');
697
- $body = <<<TEXT
698
- Hey Ecwid,
699
-
700
- I have a problem with my Ecwid store.
701
-
702
- [Please provide details here]
703
-
704
- The theme title is %s.
705
- The store URL is %
706
-
707
- Can you have a look?
708
-
709
- Thanks.
710
- TEXT;
711
- }
712
-
713
- $body = __($body, 'ecwid-shopping-cart');
714
- $body = sprintf($body, $theme, $store_url);
715
-
716
- $wp_admin_bar->add_menu( array(
717
- 'id' => 'ecwid-main',
718
- 'title' => '<span class="ab-icon ecwid-top-menu-item"></span>',
719
- 'href' => admin_url('admin.php?page=ecwid'),
720
- ));
721
-
722
- $wp_admin_bar->add_menu(array(
723
- "id" => "ecwid-go-to-page",
724
- "title" => __("Visit storefront", 'ecwid-shopping-cart'),
725
- "parent" => "ecwid-main",
726
- 'href' => ecwid_get_store_page_url()
727
- )
728
- );
729
-
730
- $wp_admin_bar->add_menu(array(
731
- "id" => "ecwid-control-panel",
732
- "title" => __("Manage my store", 'ecwid-shopping-cart'),
733
- "parent" => "ecwid-main",
734
- 'href' => admin_url('admin.php?page=ecwid')
735
- )
736
- );
737
-
738
- $wp_admin_bar->add_menu(array(
739
- "id" => "ecwid-faq",
740
- "title" => __("Read FAQ", 'ecwid-shopping-cart'),
741
- "parent" => "ecwid-main",
742
- 'href' => __('https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-', 'ecwid-shopping-cart'),
743
- 'meta' => array(
744
- 'target' => '_blank'
745
- )
746
- )
747
- );
748
-
749
- $wp_admin_bar->add_menu(array(
750
- 'id' => 'ecwid-report-problem',
751
- 'title' => __( 'Report a problem with the store', 'ecwid-shopping-cart' ),
752
- 'parent' => 'ecwid-main',
753
- 'href' => 'mailto:wordpress@ecwid.com?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($body),
754
- 'meta' => array(
755
- 'target' => '_blank'
756
- )
757
- ));
758
- }
759
-
760
- function ecwid_content_has_productbrowser($content) {
761
-
762
- $result = has_shortcode($content, 'ecwid_productbrowser');
763
-
764
- if (!$result && has_shortcode($content, 'ecwid')) {
765
- $shortcodes = ecwid_find_shortcodes($content, 'ecwid');
766
- if ($shortcodes) foreach ($shortcodes as $shortcode) {
767
-
768
- $attributes = shortcode_parse_atts($shortcode[3]);
769
-
770
- if (isset($attributes['widgets'])) {
771
- $widgets = preg_split('![^0-9^a-z^A-Z^-^_]!', $attributes['widgets']);
772
- if (is_array($widgets) && in_array('productbrowser', $widgets)) {
773
- $result = true;
774
- }
775
- }
776
- }
777
- }
778
-
779
- return $result;
780
- }
781
-
782
- function ecwid_page_has_productbrowser($post_id = null)
783
- {
784
- static $results = null;
785
-
786
- if (is_null($post_id)) {
787
- if (is_admin()) return;
788
- $post_id = get_the_ID();
789
- }
790
-
791
- if (!isset($results[$post_id])) {
792
- $post = get_post($post_id);
793
-
794
- if ($post) {
795
- $post_content = get_post($post_id)->post_content;
796
-
797
- $results[$post_id] = ecwid_content_has_productbrowser($post_content);
798
- $results[$post_id] = apply_filters( 'ecwid_page_has_product_browser', $results[$post_id] );
799
- }
800
- }
801
-
802
- return $results[$post_id];
803
- }
804
-
805
- function ecwid_ajax_crawling_fragment() {
806
- if (ecwid_is_api_enabled() && !isset($_GET['_escaped_fragment_']) && ecwid_page_has_productbrowser())
807
- echo '<meta name="fragment" content="!">' . PHP_EOL;
808
- }
809
-
810
- function ecwid_meta() {
811
-
812
- echo '<link rel="dns-prefetch" href="//images-cdn.ecwid.com/">' . PHP_EOL;
813
- echo '<link rel="dns-prefetch" href="//images.ecwid.com/">' . PHP_EOL;
814
- echo '<link rel="dns-prefetch" href="//app.ecwid.com/">' . PHP_EOL;
815
-
816
- if (!ecwid_page_has_productbrowser() && ecwid_is_store_page_available()) {
817
- $page_url = ecwid_get_store_page_url();
818
- echo '<link rel="prefetch" href="' . $page_url . '" />' . PHP_EOL;
819
- echo '<link rel="prerender" href="' . $page_url . '" />' . PHP_EOL;
820
- }
821
- }
822
-
823
- function ecwid_product_browser_url_in_head() {
824
- echo ecwid_get_product_browser_url_script();
825
- }
826
-
827
-
828
- function ecwid_canonical() {
829
-
830
- if (!ecwid_is_applicable_escaped_fragment()) {
831
- return;
832
- }
833
-
834
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
835
-
836
- $api = ecwid_new_product_api();
837
-
838
- if ($params['mode'] == 'product') {
839
- $product = $api->get_product($params['id']);
840
- $link = ecwid_get_product_url($product);
841
- } else if ($params['mode'] == 'category') {
842
- $category = $api->get_category($params['id']);
843
- $link = ecwid_get_category_url($category);
844
- }
845
-
846
- echo '<link rel="canonical" href="' . esc_attr($link) . '" />' . PHP_EOL;
847
- }
848
-
849
- function ecwid_is_applicable_escaped_fragment() {
850
-
851
- $allowed = ecwid_is_api_enabled() && isset($_GET['_escaped_fragment_']);
852
- if (!$allowed) return false;
853
-
854
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
855
- if (!$params) return false;
856
-
857
- if (!in_array($params['mode'], array('category', 'product')) || !isset($params['id'])) return false;
858
-
859
- return true;
860
- }
861
-
862
- function ecwid_meta_description() {
863
-
864
- if (!ecwid_is_applicable_escaped_fragment()) {
865
- return;
866
- }
867
-
868
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
869
- $api = ecwid_new_product_api();
870
- if ($params['mode'] == 'product') {
871
- $product = $api->get_product($params['id']);
872
- $description = $product['description'];
873
- } elseif ($params['mode'] == 'category') {
874
- $category = $api->get_category($params['id']);
875
- $description = $category['description'];
876
- } else return;
877
-
878
- $description = ecwid_trim_description($description);
879
-
880
- echo <<<HTML
881
- <meta name="description" content="$description" />
882
- HTML;
883
- }
884
-
885
- function ecwid_trim_description($description)
886
- {
887
- $description = strip_tags($description);
888
- $description = html_entity_decode($description, ENT_NOQUOTES, 'UTF-8');
889
-
890
- $description = preg_replace('![\p{Z}\s]{1,}!u', ' ', $description);
891
- $description = trim($description, " \t\xA0\n\r"); // Space, tab, non-breaking space, newline, carriage return
892
- $description = mb_substr($description, 0, ECWID_TRIMMED_DESCRIPTION_LENGTH, 'UTF-8');
893
- $description = htmlspecialchars($description, ENT_COMPAT, 'UTF-8');
894
-
895
- return $description;
896
- }
897
-
898
-
899
- function ecwid_ajax_hide_message($params)
900
- {
901
- if (!current_user_can('manage_options')) {
902
- return;
903
- }
904
-
905
- if (Ecwid_Message_Manager::disable_message($_GET['message'])) {
906
- wp_send_json(array('status' => 'success'));
907
- }
908
- }
909
-
910
- function ecwid_hide_vote_message()
911
- {
912
- update_option('ecwid_show_vote_message', false);
913
- }
914
-
915
- function ecwid_get_product_and_category($category_id, $product_id) {
916
- $params = array
917
- (
918
- array("alias" => "c", "action" => "category", "params" => array("id" => $category_id)),
919
- array("alias" => "p", "action" => "product", "params" => array("id" => $product_id)),
920
- );
921
-
922
- $api = ecwid_new_product_api();
923
- $batch_result = $api->get_batch_request($params);
924
-
925
- if (false == $batch_result) {
926
- $product = $api->get_product($product_id);
927
- $category = false;
928
- } else {
929
- $category = $batch_result["c"];
930
- $product = $batch_result["p"];
931
- }
932
-
933
- $return = "";
934
-
935
- if (is_array($product)) {
936
- $return .=$product["name"];
937
- }
938
-
939
- if(is_array($category)) {
940
- $return.=" | ";
941
- $return .=$category["name"];
942
- }
943
- return $return;
944
- }
945
-
946
- function ecwid_get_title_separator()
947
- {
948
- $sep = apply_filters('document_title_separator', '|');
949
-
950
- if (!empty($sep)) {
951
- return $sep;
952
- }
953
-
954
- return apply_filters('ecwid_title_separator', '|');
955
- }
956
-
957
- function ecwid_seo_title($content) {
958
-
959
- $title = _ecwid_get_seo_title();
960
- if (!empty($title)) {
961
- $sep = ecwid_get_title_separator();
962
-
963
- return "$title $sep $content";
964
- }
965
-
966
- return $content;
967
- }
968
-
969
-
970
- function ecwid_seo_title_parts($parts)
971
- {
972
- $title = _ecwid_get_seo_title();
973
- if ($title) {
974
- array_unshift($parts, $title);
975
- }
976
-
977
- return $parts;
978
- }
979
-
980
- function _ecwid_get_seo_title()
981
- {
982
-
983
- if (!ecwid_is_applicable_escaped_fragment()) {
984
- return;
985
- }
986
-
987
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
988
-
989
- $ecwid_seo_title = '';
990
-
991
- $separator = ecwid_get_title_separator();
992
-
993
- $api = ecwid_new_product_api();
994
-
995
- if ( isset( $params['mode'] ) && ! empty( $params['mode'] ) ) {
996
- if ( $params['mode'] == 'product' ) {
997
- if ( isset( $params['category'] ) && ! empty( $params['category'] ) ) {
998
- $ecwid_seo_title = ecwid_get_product_and_category( $params['category'], $params['id'] );
999
- } elseif ( empty( $params['category'] ) ) {
1000
- $ecwid_product = $api->get_product( $params['id'] );
1001
- $ecwid_seo_title = $ecwid_product['name'];
1002
- if ( isset( $ecwid_product['categories'] ) && is_array( $ecwid_product['categories'] ) ) {
1003
- foreach ( $ecwid_product['categories'] as $ecwid_category ) {
1004
- if ( $ecwid_category['defaultCategory'] == true ) {
1005
- $ecwid_seo_title .= ' ' . $separator . ' ';
1006
- $ecwid_seo_title .= $ecwid_category['name'];
1007
- }
1008
- }
1009
- }
1010
- }
1011
- } elseif ( $params['mode'] == 'category' ) {
1012
- $api = ecwid_new_product_api();
1013
- $ecwid_category = $api->get_category( $params['id'] );
1014
- $ecwid_seo_title = $ecwid_category['name'];
1015
- }
1016
- }
1017
-
1018
- if ( ! empty( $ecwid_seo_title ) ) {
1019
- return $ecwid_seo_title;
1020
- }
1021
-
1022
- return "";
1023
- }
1024
-
1025
- function ecwid_add_credits($powered_by)
1026
- {
1027
- if (!ecwid_is_paid_account()) {
1028
-
1029
- $new_powered_by = '<li>';
1030
- $new_powered_by .= sprintf(
1031
- __('<a %s>Online store powered by Ecwid</a>', 'ecwid-shopping-cart'),
1032
- 'target="_blank" href="//www.ecwid.com?source=wporg-metalink"'
1033
- );
1034
- $new_powered_by .= '</li>';
1035
-
1036
- $powered_by .= $new_powered_by;
1037
- }
1038
-
1039
- return $powered_by;
1040
- }
1041
-
1042
- function ecwid_content_started($content)
1043
- {
1044
- global $ecwid_script_rendered;
1045
-
1046
- $ecwid_script_rendered = false;
1047
-
1048
- return $content;
1049
- }
1050
-
1051
- function ecwid_wrap_shortcode_content($content, $name, $attrs)
1052
- {
1053
- $version = get_option('ecwid_plugin_version');
1054
-
1055
- $shortcode_content = ecwid_get_scriptjs_code(@$attrs['lang']);
1056
-
1057
- if ($name == 'product2') {
1058
- $shortcode_content .= $content;
1059
- } else {
1060
- $shortcode_content .= "<div class=\"ecwid-shopping-cart-$name\">$content</div>";
1061
- }
1062
-
1063
- $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
1064
- . $shortcode_content
1065
- . "<!-- END Ecwid Shopping Cart v $version -->";
1066
-
1067
- return apply_filters('ecwid_shortcode_content', $shortcode_content);
1068
- }
1069
-
1070
- function ecwid_get_scriptjs_code($force_lang = null) {
1071
- global $ecwid_script_rendered;
1072
-
1073
- if (!$ecwid_script_rendered) {
1074
- $store_id = get_ecwid_store_id();
1075
- $force_lang_str = !empty($force_lang) ? "&lang=$force_lang" : '';
1076
- $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
1077
- $s = $s . ecwid_sso();
1078
- $s .= '<script type="text/javascript">if (jQuery && jQuery.mobile) { jQuery.mobile.hashListeningEnabled = false; jQuery.mobile.pushStateEnabled=false; }</script>';
1079
- $ecwid_script_rendered = true;
1080
-
1081
- return $s;
1082
- } else {
1083
- return '';
1084
- }
1085
- }
1086
-
1087
- function ecwid_script_shortcode($params) {
1088
-
1089
- $attributes = shortcode_atts(
1090
- array(
1091
- 'lang' => null
1092
- ), $params
1093
- );
1094
-
1095
- $content = "";
1096
- if (!is_null($attributes['lang'])) {
1097
- $content = ecwid_get_scriptjs_code($attributes['lang']);
1098
- }
1099
-
1100
- return ecwid_wrap_shortcode_content($content, 'script', $params);
1101
- }
1102
-
1103
- function ecwid_minicart_shortcode($attributes) {
1104
- $params = shortcode_atts(
1105
- array(
1106
- 'layout' => null,
1107
- 'is_ecwid_shortcode' => false,
1108
- 'lang' => null
1109
- ), $attributes
1110
- );
1111
- $layout = $params['layout'];
1112
- if (!in_array($layout, array('', 'attachToCategories', 'floating', 'Mini', 'MiniAttachToProductBrowser'), true)) {
1113
- $layout = 'MiniAttachToProductBrowser';
1114
- }
1115
- if ($params['is_ecwid_shortcode']) {
1116
- // it is a part of the ecwid shortcode, we need to show it anyways
1117
- $ecwid_enable_minicart = $ecwid_show_categories = true;
1118
- } else {
1119
- // it is a ecwid_minicart widget that works based on appearance settings
1120
- $ecwid_enable_minicart = get_option('ecwid_enable_minicart');
1121
- $ecwid_show_categories = get_option('ecwid_show_categories');
1122
- }
1123
- $result = '';
1124
- if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) {
1125
- $result = <<<EOT
1126
- <script data-cfasync="false" type="text/javascript"> xMinicart("style=","layout=$layout"); </script>
1127
- EOT;
1128
- }
1129
- $result = apply_filters('ecwid_minicart_shortcode_content', $result);
1130
- if (!empty($result)) {
1131
- $result = ecwid_wrap_shortcode_content($result, 'minicart', $params);
1132
- }
1133
- return $result;
1134
- }
1135
- function ecwid_get_search_js_code() {
1136
- if (get_option('ecwid_use_new_search', false)) {
1137
- return 'xSearch("style=");';
1138
- } else {
1139
- return 'xSearchPanel("style=")';
1140
- }
1141
- }
1142
-
1143
- function ecwid_searchbox_shortcode($attributes) {
1144
-
1145
- $params = shortcode_atts(
1146
- array(
1147
- 'is_ecwid_shortcode' => false,
1148
- 'lang' => null
1149
- ), $attributes
1150
- );
1151
- $ecwid_show_search_box = $params['is_ecwid_shortcode'] ? true : get_option('ecwid_show_search_box');
1152
- $result = '';
1153
- if (!empty($ecwid_show_search_box)) {
1154
- $code = ecwid_get_search_js_code();
1155
- $result = <<<EOT
1156
- <script data-cfasync="false" type="text/javascript"> $code </script>
1157
- EOT;
1158
- }
1159
- $result = apply_filters('ecwid_search_shortcode_content', $result);
1160
- if (!empty($result)) {
1161
- $result = ecwid_wrap_shortcode_content($result, 'search', $params);
1162
- }
1163
-
1164
- return $result;
1165
- }
1166
-
1167
- function ecwid_categories_shortcode($attributes) {
1168
-
1169
- $params = shortcode_atts(
1170
- array(
1171
- 'is_ecwid_shortcode' => false,
1172
- 'lang' => null
1173
- ), $attributes
1174
- );
1175
- $ecwid_show_categories = $params['is_ecwid_shortcode'] ? true : get_option('ecwid_show_categories');
1176
- $result = '';
1177
- if (!empty($ecwid_show_categories)) {
1178
- if (get_option('ecwid_use_new_horizontal_categories')) {
1179
- $store_id = get_ecwid_store_id();
1180
- $ver = get_option('ecwid_plugin_version');
1181
- $result = <<<HTML
1182
- <script data-cfasync="false" type="text/javascript"> xCategoriesV2("style="); </script>
1183
- HTML;
1184
- } else {
1185
- $result = <<<EOT
1186
- <script data-cfasync="false" type="text/javascript"> xCategories("style="); </script>
1187
- EOT;
1188
- }
1189
- }
1190
- $result = apply_filters('ecwid_categories_shortcode_content', $result);
1191
- if (!empty($result)) {
1192
- $result = ecwid_wrap_shortcode_content($result, 'categories', $params);
1193
- }
1194
-
1195
- return $result;
1196
- }
1197
-
1198
-
1199
- function ecwid_productbrowser_shortcode($shortcode_params) {
1200
-
1201
- $atts = shortcode_atts(
1202
- array(
1203
- 'categories_per_row' => false,
1204
- 'grid' => false,
1205
- 'list' => false,
1206
- 'table' => false,
1207
- 'search_view' => false,
1208
- 'category_view' => false
1209
- ), $shortcode_params
1210
- );
1211
- $grid = explode(',', $atts['grid']);
1212
- if (count($grid) == 2) {
1213
- $atts['grid_rows'] = intval($grid[0]);
1214
- $atts['grid_cols'] = intval($grid[1]);
1215
- } else {
1216
- list($atts['grid_rows'], $atts['grid_cols']) = array(false, false);
1217
- }
1218
- $store_id = get_ecwid_store_id();
1219
- $list_of_views = array('list','grid','table');
1220
- $ecwid_pb_categoriesperrow = $atts['categories_per_row'] ? $atts['categories_per_row'] : get_option('ecwid_pb_categoriesperrow');
1221
- $ecwid_pb_productspercolumn_grid = $atts['grid_rows'] ? $atts['grid_rows'] : get_option('ecwid_pb_productspercolumn_grid');
1222
- $ecwid_pb_productsperrow_grid = $atts['grid_cols'] ? $atts['grid_cols'] : get_option('ecwid_pb_productsperrow_grid');
1223
- $ecwid_pb_productsperpage_list = $atts['list'] ? $atts['list'] : get_option('ecwid_pb_productsperpage_list');
1224
- $ecwid_pb_productsperpage_table = $atts['table'] ? $atts['table'] : get_option('ecwid_pb_productsperpage_table');
1225
- $ecwid_pb_defaultview = $atts['category_view'] ? $atts['category_view'] : get_option('ecwid_pb_defaultview');
1226
- $ecwid_pb_searchview = $atts['search_view'] ? $atts['search_view'] : get_option('ecwid_pb_searchview');
1227
- $ecwid_mobile_catalog_link = get_option('ecwid_mobile_catalog_link');
1228
- $ecwid_default_category_id =
1229
- !empty($shortcode_params) && array_key_exists('default_category_id', $shortcode_params)
1230
- ? $shortcode_params['default_category_id']
1231
- : get_option('ecwid_default_category_id');
1232
- $defaults = ecwid_get_default_pb_size();
1233
- if (empty($ecwid_pb_categoriesperrow)) {
1234
- $ecwid_pb_categoriesperrow = 3;
1235
- }
1236
- if (empty($ecwid_pb_productspercolumn_grid)) {
1237
- $ecwid_pb_productspercolumn_grid = $defaults['grid_rows'];
1238
- }
1239
- if (empty($ecwid_pb_productsperrow_grid)) {
1240
- $ecwid_pb_productsperrow_grid = $defaults['grid_columns'];
1241
- }
1242
- if (empty($ecwid_pb_productsperpage_list)) {
1243
- $ecwid_pb_productsperpage_list = $defaults['list_rows'];
1244
- }
1245
- if (empty($ecwid_pb_productsperpage_table)) {
1246
- $ecwid_pb_productsperpage_table = $defaults['list_rows'];
1247
- }
1248
- if (empty($ecwid_pb_defaultview) || !in_array($ecwid_pb_defaultview, $list_of_views)) {
1249
- $ecwid_pb_defaultview = 'grid';
1250
- }
1251
- if (empty($ecwid_pb_searchview) || !in_array($ecwid_pb_searchview, $list_of_views)) {
1252
- $ecwid_pb_searchview = 'list';
1253
- }
1254
- if (empty($ecwid_default_category_id)) {
1255
- $ecwid_default_category_str = '';
1256
- } else {
1257
- $ecwid_default_category_str = ',"defaultCategoryId='. $ecwid_default_category_id .'"';
1258
- }
1259
- $plain_content = '';
1260
- if (ecwid_can_display_html_catalog()) {
1261
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
1262
- include_once ECWID_PLUGIN_DIR . 'lib/ecwid_product_api.php';
1263
- include_once ECWID_PLUGIN_DIR . 'lib/ecwid_catalog.php';
1264
- $page_url = get_page_link();
1265
- $catalog = new EcwidCatalog($store_id, $page_url);
1266
- if (isset($params['mode']) && !empty($params['mode'])) {
1267
- if ($params['mode'] == 'product') {
1268
- $plain_content = $catalog->get_product($params['id']);
1269
- $url = ecwid_get_product_url(ecwid_new_product_api()->get_product($params['id']));
1270
- } elseif ($params['mode'] == 'category') {
1271
- $plain_content = $catalog->get_category($params['id']);
1272
- $ecwid_default_category_str = ',"defaultCategoryId=' . $params['id'] . '"';
1273
- $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
1274
- }
1275
- } else {
1276
- $plain_content = $catalog->get_category(intval($ecwid_default_category_id));
1277
- if (empty($plain_content)) {
1278
- $plain_content = $catalog->get_category(0);
1279
- } else {
1280
- $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
1281
- }
1282
- }
1283
- if ($url) {
1284
- $parsed = parse_url($url);
1285
- $plain_content .= '<script data-cfasync="false" type="text/javascript"> if (!document.location.hash) document.location.hash = "'. $parsed['fragment'] . '";</script>';
1286
- }
1287
- }
1288
- $s = '';
1289
- $s = <<<EOT
1290
- <div id="ecwid-store-$store_id">
1291
- {$plain_content}
1292
- </div>
1293
- <script data-cfasync="false" type="text/javascript"> xProductBrowser("categoriesPerRow=$ecwid_pb_categoriesperrow","views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)","categoryView=$ecwid_pb_defaultview","searchView=$ecwid_pb_searchview","style="$ecwid_default_category_str, "id=ecwid-store-$store_id");</script>
1294
- EOT;
1295
- return ecwid_wrap_shortcode_content($s, 'product-browser', $shortcode_params);
1296
- }
1297
-
1298
- function ecwid_product_shortcode($shortcode_attributes) {
1299
-
1300
- $attributes = shortcode_atts(
1301
- array(
1302
- 'id' => null,
1303
- 'display' => 'picture title price options addtobag',
1304
- 'link' => 'yes',
1305
- 'version' => '1',
1306
- 'show_border' => '1',
1307
- 'show_price_on_button' => '1'
1308
- ),
1309
- $shortcode_attributes
1310
- );
1311
-
1312
- $id = $attributes['id'];
1313
-
1314
- if (is_null($id) || !is_numeric($id) || $id <= 0) return;
1315
-
1316
- if ($attributes['link'] == 'yes' && !ecwid_is_store_page_available()) {
1317
- $attributes['link'] = 'no';
1318
- }
1319
-
1320
-
1321
- $version = $attributes['version'];
1322
- if (!in_array($version, array('1', '2'))) {
1323
- $version = 1;
1324
- }
1325
-
1326
- $widget_parts = array();
1327
- if ($version == 1) {
1328
- $widget_parts = _ecwid_get_single_product_widget_parts_v1($attributes);
1329
- } else if ($version == 2) {
1330
- $widget_parts = _ecwid_get_single_product_widget_parts_v2($attributes);
1331
- }
1332
-
1333
- $display_items = $widget_parts['display_items'];
1334
-
1335
- $result = $widget_parts['opening_div'];
1336
-
1337
- $items = preg_split('![^0-9^a-z^A-Z^\-^_]!', $attributes['display']);
1338
-
1339
- if (is_array($items) && count($items) > 0) foreach ($items as $item) {
1340
- if (array_key_exists($item, $display_items)) {
1341
- if ($attributes['link'] == 'yes' && in_array($item, array('title', 'picture'))) {
1342
- $product_link = ecwid_get_store_page_url() . '#!/~/product/id=' . $id;
1343
- $result .= '<a href="' . esc_url($product_link) . '">' . $display_items[$item] . '</a>';
1344
- } else {
1345
- $result .= $display_items[$item];
1346
- }
1347
- }
1348
- }
1349
-
1350
- $result .= '</div>';
1351
-
1352
- $result .= ecwid_get_product_browser_url_script();
1353
- $result .= $widget_parts['widget_call'];
1354
-
1355
- update_option('ecwid_single_product_used', time());
1356
-
1357
- $name = 'product' . $version;
1358
-
1359
- return ecwid_wrap_shortcode_content($result, $name, $shortcode_attributes);
1360
- }
1361
-
1362
- function _ecwid_get_single_product_widget_parts_v1($attributes) {
1363
- return array(
1364
- 'display_items' => array(
1365
- 'picture' => '<div itemprop="picture"></div>',
1366
- 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1367
- 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1368
- . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
1369
- . '</div>',
1370
- 'options' => '<div itemprop="options"></div>',
1371
- 'qty' => '<div itemprop="qty"></div>',
1372
- 'addtobag' => '<div itemprop="addtobag"></div>'
1373
- ),
1374
- 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
1375
- . 'itemscope itemtype="http://schema.org/Product" '
1376
- . 'data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1377
- 'widget_call' => '<script data-cfasync="false" type="text/javascript">xSingleProduct()</script>'
1378
- );
1379
- }
1380
-
1381
- function _ecwid_get_single_product_widget_parts_v2($attributes) {
1382
-
1383
- $price_location_attributes = ' data-spw-price-location="button"';
1384
- $bordered_class = ' ecwid-SingleProduct-v2-bordered';
1385
- if ($attributes['show_border'] == 0) {
1386
- $bordered_class = '';
1387
- }
1388
-
1389
- if ($attributes['show_price_on_button'] == 0) {
1390
- $price_location_attributes = '';
1391
- }
1392
-
1393
- return array(
1394
- 'display_items' => array(
1395
- 'picture' => '<div itemprop="picture"></div>',
1396
- 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1397
- 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1398
- . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"' . $price_location_attributes . '>'
1399
- . '<div itemprop="priceCurrency"></div>'
1400
- . '</div>'
1401
- . '</div>',
1402
- 'options' => '<div customprop="options"></div>',
1403
- 'qty' => '<div customprop="qty"></div>',
1404
- 'addtobag' => '<div customprop="addtobag"></div>'
1405
- ),
1406
- 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct-v2' . $bordered_class . ' ecwid-Product ecwid-Product-%d"'
1407
- . 'itemscope itemtype="http://schema.org/Product" data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1408
- 'widget_call' => '<script data-cfasync="false" type="text/javascript">xProduct()</script>'
1409
- );
1410
- }
1411
-
1412
-
1413
- function ecwid_install_theme() {
1414
- if ( ! class_exists( 'Theme_Upgrader', false ) ) {
1415
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1416
- }
1417
-
1418
- wp_enqueue_script( 'customize-loader' );
1419
-
1420
- $title = __('Install Themes');
1421
- $parent_file = 'themes.php';
1422
- $submenu_file = 'themes.php';
1423
- require_once(ABSPATH . 'wp-admin/admin-header.php');
1424
-
1425
- $upgrader = new Theme_Upgrader( );
1426
- $result = $upgrader->install("https://plugins.ecwid.com/files/ecwid-ecommerce.zip");
1427
-
1428
- if ( !$result || is_wp_error($result) ) {
1429
- echo '<a href="javascript:history.back()">' . __('Back') . '</a>';
1430
- } else {
1431
- _e( 'Preparing theme preview...', 'ecwid-shopping-cart' );
1432
- echo '<script type="text/javascript">location.href="themes.php?theme=ecwid-ecommerce";</script>';
1433
-
1434
- Ecwid_Message_Manager::disable_message( 'install_ecwid_theme' );
1435
- }
1436
-
1437
- include(ABSPATH . 'wp-admin/admin-footer.php');
1438
- }
1439
-
1440
- function ecwid_shortcode($attributes)
1441
- {
1442
- $defaults = ecwid_get_default_pb_size();
1443
-
1444
- $attributes = shortcode_atts(
1445
- array(
1446
- 'widgets' => 'productbrowser',
1447
- 'categories_per_row' => '3',
1448
- 'category_view' => 'grid',
1449
- 'search_view' => 'grid',
1450
- 'grid' => $defaults['grid_rows'] . ',' . $defaults['grid_columns'],
1451
- 'list' => $defaults['list_rows'],
1452
- 'table' => $defaults['table_rows'],
1453
- 'minicart_layout' => 'MiniAttachToProductBrowser',
1454
- 'default_category_id' => 0,
1455
- 'lang' => ''
1456
- )
1457
- , $attributes
1458
- );
1459
-
1460
- $allowed_widgets = array('productbrowser', 'search', 'categories', 'minicart');
1461
- $widgets = preg_split('![^0-9^a-z^A-Z^-^_]!', $attributes['widgets']);
1462
- foreach ($widgets as $key => $widget) {
1463
- if (!in_array($widget, $allowed_widgets)) {
1464
- unset($widgets[$key]);
1465
- }
1466
- }
1467
-
1468
- if (empty($widgets)) {
1469
- $widgets = array('productbrowser');
1470
- }
1471
-
1472
- $attributes['layout'] = $attributes['minicart_layout'];
1473
- $attributes['is_ecwid_shortcode'] = true;
1474
-
1475
- $result = '';
1476
-
1477
- $widgets_order = array('minicart', 'search', 'categories', 'productbrowser');
1478
- foreach ($widgets_order as $widget) {
1479
- if (in_array($widget, $widgets)) {
1480
- if ( class_exists( 'Ecwid_Shortcode_' . $widget ) ) {
1481
-
1482
- $class = 'Ecwid_Shortcode_' . $widget;
1483
-
1484
- $shortcode = new $class($attributes);
1485
-
1486
- $result .= $shortcode->render();
1487
- } else {
1488
- $result .= call_user_func_array( 'ecwid_' . $widget . '_shortcode', array( $attributes ) );
1489
- }
1490
- }
1491
- }
1492
-
1493
- update_option('ecwid_store_shortcode_used', time());
1494
-
1495
- return $result;
1496
- }
1497
-
1498
- function ecwid_parse_escaped_fragment($escaped_fragment) {
1499
- static $parsed = array();
1500
-
1501
- if (empty($parsed[$escaped_fragment])) {
1502
-
1503
- $fragment = urldecode( $escaped_fragment );
1504
- $return = array();
1505
-
1506
- if ( preg_match( '/^(\/~\/)([a-z]+)\/(.*)$/', $fragment, $matches ) ) {
1507
- parse_str( $matches[3], $return );
1508
- $return['mode'] = $matches[2];
1509
- } elseif ( preg_match( '!.*/(p|c)/([0-9]*)!', $fragment, $matches ) ) {
1510
- if ( count( $matches ) == 3 && in_array( $matches[1], array( 'p', 'c' ) ) ) {
1511
- $return = array(
1512
- 'mode' => 'p' == $matches[1] ? 'product' : 'category',
1513
- 'id' => $matches[2]
1514
- );
1515
- }
1516
- }
1517
-
1518
- $parsed[$escaped_fragment] = $return;
1519
- }
1520
-
1521
- return $parsed[$escaped_fragment];
1522
- }
1523
-
1524
- function ecwid_ajax_get_product_info() {
1525
- $id = $_GET['id'];
1526
-
1527
- if (ecwid_is_api_enabled()) {
1528
- $api = ecwid_new_product_api();
1529
- $product = $api->get_product_https($id);
1530
-
1531
- echo json_encode($product);
1532
- }
1533
-
1534
- exit();
1535
- }
1536
-
1537
- function ecwid_store_activate() {
1538
-
1539
- $my_post = array();
1540
- $defaults = ecwid_get_default_pb_size();
1541
- $content = <<<EOT
1542
- [ecwid widgets="productbrowser minicart categories search" grid="$defaults[grid_rows],$defaults[grid_columns]" list="$defaults[list_rows]" table="$defaults[table_rows]" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]
1543
- EOT;
1544
- add_option("ecwid_store_page_id", '', '', 'yes');
1545
- add_option("ecwid_store_page_id_auto", '', '', 'yes');
1546
-
1547
- add_option("ecwid_store_id", ECWID_DEMO_STORE_ID, '', 'yes');
1548
-
1549
- add_option("ecwid_enable_minicart", 'Y', '', 'yes');
1550
- add_option("ecwid_show_categories", '', '', 'yes');
1551
- add_option("ecwid_show_search_box", '', '', 'yes');
1552
-
1553
- add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
1554
-
1555
- add_option("ecwid_pb_productspercolumn_grid", $defaults['grid_rows'], '', 'yes');
1556
- add_option("ecwid_pb_productsperrow_grid", $defaults['grid_columns'], '', 'yes');
1557
- add_option("ecwid_pb_productsperpage_list", $defaults['list_rows'], '', 'yes');
1558
- add_option("ecwid_pb_productsperpage_table", $defaults['table_rows'], '', 'yes');
1559
-
1560
- add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
1561
- add_option("ecwid_pb_searchview", 'list', '', 'yes');
1562
-
1563
- add_option("ecwid_mobile_catalog_link", '', '', 'yes');
1564
- add_option("ecwid_default_category_id", '', '', 'yes');
1565
-
1566
- add_option('ecwid_is_api_enabled', 'on', '', 'yes');
1567
- add_option('ecwid_api_check_time', 0, '', 'yes');
1568
-
1569
- add_option('ecwid_show_vote_message', true);
1570
-
1571
- add_option("ecwid_sso_secret_key", '', '', 'yes');
1572
-
1573
- add_option("ecwid_installation_date", time());
1574
-
1575
- add_option('ecwid_hide_appearance_menu', get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', '', 'yes');
1576
-
1577
- /* All new options should go to check_version thing */
1578
-
1579
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
1580
-
1581
- $id = get_option("ecwid_store_page_id");
1582
- $_tmp_page = null;
1583
- if (!empty($id) and ($id > 0)) {
1584
- $_tmp_page = get_post($id);
1585
- }
1586
- if (is_null($_tmp_page)) {
1587
- $id = get_option('ecwid_store_page_id_auto');
1588
-
1589
- if (!empty($id) and ($id > 0)) {
1590
- $_tmp_page = get_post($id);
1591
- }
1592
- }
1593
- if ($_tmp_page !== null) {
1594
- $my_post = array();
1595
- $my_post['ID'] = $id;
1596
- $my_post['post_status'] = 'publish';
1597
- wp_update_post( $my_post );
1598
-
1599
- if ($id == get_option('ecwid_store_page_id_auto')) {
1600
- update_option('ecwid_store_page_id', $id);
1601
- }
1602
-
1603
- } else {
1604
-
1605
- ecwid_load_textdomain();
1606
- $my_post['post_title'] = __('Store', 'ecwid-shopping-cart');
1607
- $my_post['post_content'] = $content;
1608
- $my_post['post_status'] = 'publish';
1609
- $my_post['post_author'] = 1;
1610
- $my_post['post_type'] = 'page';
1611
- $my_post['comment_status'] = 'closed';
1612
- $id = wp_insert_post( $my_post );
1613
- update_option('ecwid_store_page_id', $id);
1614
-
1615
- Ecwid_Nav_Menus::replace_auto_added_menu();
1616
-
1617
- if (ecwid_get_theme_identification() == 'responsive') {
1618
- update_post_meta($id, '_wp_page_template', 'full-width-page.php');
1619
- update_option("ecwid_show_search_box", 'Y');
1620
- }
1621
- }
1622
-
1623
- Ecwid_Nav_Menus::add_menu_on_activate();
1624
-
1625
- Ecwid_Message_Manager::enable_message('on_activate');
1626
- }
1627
-
1628
- add_action('in_admin_header', 'ecwid_disable_other_notices');
1629
- function ecwid_disable_other_notices() {
1630
-
1631
- $pages = array('toplevel_page_ecwid', 'admin_page_ecwid-help', 'admin_page-ecwid-install-theme');
1632
-
1633
- if (!in_array(get_current_screen()->base, $pages)) return;
1634
-
1635
- global $wp_filter;
1636
-
1637
- foreach ($wp_filter['admin_notices'] as $priority => $collection) {
1638
- foreach ($collection as $name => $item) {
1639
- if ($name != 'ecwid_show_admin_messages') {
1640
- unset($wp_filter['admin_notices'][$priority][$name]);
1641
- }
1642
- }
1643
- }
1644
- }
1645
-
1646
- function ecwid_show_admin_messages() {
1647
- if (is_admin()) {
1648
- Ecwid_Message_Manager::show_messages();
1649
- }
1650
- }
1651
-
1652
- function ecwid_show_admin_message($message) {
1653
-
1654
- $class = version_compare(get_bloginfo('version'), '3.0') < 0 ? "updated fade" : "update-nag";
1655
- echo sprintf('<div class="%s" style="margin-top: 5px">%s</div>', $class, $message);
1656
- }
1657
-
1658
- function ecwid_store_deactivate() {
1659
- $ecwid_page_id = get_option("ecwid_store_page_id");
1660
- $_tmp_page = null;
1661
- if (!empty($ecwid_page_id) and ($ecwid_page_id > 0)) {
1662
- $_tmp_page = get_page($ecwid_page_id);
1663
- if ($_tmp_page !== null) {
1664
- $my_post = array();
1665
- $my_post['ID'] = $ecwid_page_id;
1666
- $my_post['post_status'] = 'draft';
1667
- wp_update_post( $my_post );
1668
- } else {
1669
- update_option('ecwid_store_page_id', '');
1670
- }
1671
- }
1672
-
1673
- Ecwid_Message_Manager::reset_hidden_messages();
1674
- }
1675
-
1676
- function ecwid_uninstall() {
1677
- delete_option("ecwid_store_page_id_auto");
1678
- delete_option("ecwid_store_id");
1679
- delete_option("ecwid_enable_minicart");
1680
- delete_option("ecwid_show_categories");
1681
- delete_option("ecwid_show_search_box");
1682
- delete_option("ecwid_pb_categoriesperrow");
1683
- delete_option("ecwid_pb_productspercolumn_grid");
1684
- delete_option("ecwid_pb_productsperrow_grid");
1685
- delete_option("ecwid_pb_productsperpage_list");
1686
- delete_option("ecwid_pb_productsperpage_table");
1687
- delete_option("ecwid_pb_defaultview");
1688
- delete_option("ecwid_pb_searchview");
1689
- delete_option("ecwid_mobile_catalog_link");
1690
- delete_option("ecwid_default_category_id");
1691
- delete_option('ecwid_is_api_enabled');
1692
- delete_option('ecwid_api_check_time');
1693
- delete_option('ecwid_show_vote_message');
1694
- delete_option("ecwid_sso_secret_key");
1695
- delete_option("ecwid_installation_date");
1696
- delete_option('ecwid_hide_appearance_menu');
1697
-
1698
- delete_option("ecwid_plugin_version");
1699
- delete_option("ecwid_use_chameleon");
1700
- }
1701
-
1702
- function ecwid_is_old_search_widget_used()
1703
- {
1704
- if (get_option('ecwid_use_new_search')) {
1705
- return false;
1706
- }
1707
-
1708
- if (Ecwid_Widget_Search::is_active_widget()) {
1709
- return true;
1710
- }
1711
-
1712
- $widgets = ecwid_get_store_shortcode_widgets();
1713
- if ($widgets && in_array('search', $widgets)) {
1714
- return true;
1715
- }
1716
-
1717
- $post = get_post(ecwid_get_current_store_page_id());
1718
- if ($post && !is_wp_error($post)) {
1719
-
1720
- $shortcodes = ecwid_find_shortcodes( $post->post_content, 'ecwid_search' );
1721
-
1722
- if ( $shortcodes ) {
1723
- return TRUE;
1724
- }
1725
- }
1726
-
1727
- return false;
1728
- }
1729
-
1730
- function ecwid_is_old_cats_widget_used()
1731
- {
1732
- if (get_option('ecwid_use_new_horizontal_categories')) {
1733
- return false;
1734
- }
1735
-
1736
- $widgets = ecwid_get_store_shortcode_widgets();
1737
- if ($widgets && in_array('categories', $widgets)) {
1738
- return true;
1739
- }
1740
-
1741
- $post = get_post(ecwid_get_current_store_page_id());
1742
- if ($post && !is_wp_error($post)) {
1743
- $shortcodes = ecwid_find_shortcodes( $post->post_content, 'ecwid_categories');
1744
-
1745
- if ($shortcodes) return true;
1746
- }
1747
-
1748
- return false;
1749
- }
1750
-
1751
-
1752
- function ecwid_get_store_shortcode_widgets()
1753
- {
1754
- if (get_option('ecwid_use_new_horizontal_categories') && get_option('ecwid_use_new_search')) return false;
1755
-
1756
- $page_contents = get_post(ecwid_get_current_store_page_id())->post_content;
1757
- $shortcodes = ecwid_find_shortcodes($page_contents, 'ecwid');
1758
- if (!$shortcodes) {
1759
- return null;
1760
- }
1761
-
1762
- $shortcode = $shortcodes[0];
1763
- $attributes = shortcode_parse_atts($shortcode[3]);
1764
-
1765
- if (!isset($attributes['widgets'])) {
1766
- return null;
1767
- }
1768
-
1769
- return explode(' ', $attributes['widgets']);
1770
- }
1771
-
1772
- function ecwid_abs_intval($value) {
1773
- if (!is_null($value))
1774
- return abs(intval($value));
1775
- else
1776
- return null;
1777
- }
1778
-
1779
- function ecwid_build_menu() {
1780
-
1781
- $is_newbie = get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
1782
-
1783
- add_menu_page(
1784
- __('Ecwid shopping cart settings', 'ecwid-shopping-cart'),
1785
- __('Ecwid Store', 'ecwid-shopping-cart'),
1786
- 'manage_options',
1787
- 'ecwid',
1788
- 'ecwid_general_settings_do_page',
1789
- '',
1790
- '2.562347345'
1791
- );
1792
-
1793
- if ($is_newbie) {
1794
- $title = __('Setup', 'ecwid-shopping-cart');
1795
- } else {
1796
- $title = __('Dashboard', 'ecwid-shopping-cart');
1797
- }
1798
- add_submenu_page(
1799
- 'ecwid',
1800
- $title,
1801
- $title,
1802
- 'manage_options',
1803
- 'ecwid',
1804
- 'ecwid_general_settings_do_page'
1805
- );
1806
-
1807
- global $ecwid_oauth;
1808
- if (!$is_newbie && $ecwid_oauth->has_scope( 'allow_sso' )) {
1809
- add_submenu_page(
1810
- 'ecwid',
1811
- __('Sales', 'ecwid-shopping-cart'),
1812
- __('Sales', 'ecwid-shopping-cart'),
1813
- 'manage_options',
1814
- 'ecwid-admin-orders',
1815
- 'ecwid_admin_orders_do_page'
1816
- );
1817
-
1818
-
1819
- add_submenu_page(
1820
- 'ecwid',
1821
- __('Products', 'ecwid-shopping-cart'),
1822
- __('Products', 'ecwid-shopping-cart'),
1823
- 'manage_options',
1824
- 'ecwid-admin-products',
1825
- 'ecwid_admin_products_do_page'
1826
- );
1827
- }
1828
- if (get_option('ecwid_hide_appearance_menu') != 'Y') {
1829
- add_submenu_page(
1830
- 'ecwid',
1831
- __('Appearance settings', 'ecwid-shopping-cart'),
1832
- __('Appearance', 'ecwid-shopping-cart'),
1833
- 'manage_options',
1834
- 'ecwid-appearance',
1835
- 'ecwid_appearance_settings_do_page'
1836
- );
1837
- }
1838
-
1839
- if (!$is_newbie || (isset($_GET['page']) && $_GET['page'] == 'ecwid-advanced')) {
1840
- add_submenu_page(
1841
- 'ecwid',
1842
- __('Advanced settings', 'ecwid-shopping-cart'),
1843
- __('Advanced', 'ecwid-shopping-cart'),
1844
- 'manage_options',
1845
- 'ecwid-advanced',
1846
- 'ecwid_advanced_settings_do_page'
1847
- );
1848
- }
1849
-
1850
- add_submenu_page('', 'Ecwid debug', '', 'manage_options', 'ecwid_debug', 'ecwid_debug_do_page');
1851
- add_submenu_page('', 'Ecwid get mobile app', '', 'manage_options', 'ecwid-admin-mobile', 'ecwid_admin_mobile_do_page');
1852
- add_submenu_page(
1853
- 'ecwid',
1854
- __('Help', 'ecwid-shopping-cart'),
1855
- __('Help', 'ecwid-shopping-cart'),
1856
- 'manage_options', 'ecwid-help', 'ecwid_help_do_page'
1857
- );
1858
- add_submenu_page('', 'Install ecwid theme', '', 'manage_options', 'ecwid-install-theme', 'ecwid_install_theme');
1859
- }
1860
-
1861
- function ecwid_get_categories($nocache = false) {
1862
- $categories = EcwidPlatform::cache_get('all_categories');
1863
-
1864
- if ( false == $categories || $nocache ) {
1865
- $request = Ecwid_Http::create_get(
1866
- 'get_categories_through_endpoint',
1867
- ecwid_get_categories_js_url(),
1868
- array( Ecwid_Http::POLICY_EXPECT_JSONP )
1869
- );
1870
- $categories = $request->do_request();
1871
-
1872
- if (!is_null($categories)) {
1873
- EcwidPlatform::cache_set( 'all_categories', $categories, 60 * 60 * 2 );
1874
- }
1875
- }
1876
-
1877
- return $categories;
1878
- }
1879
-
1880
- function ecwid_reset_categories_cache()
1881
- {
1882
- if (!current_user_can('manage_options')) {
1883
- return;
1884
- }
1885
-
1886
- EcwidPlatform::cache_reset('all_categories');
1887
- }
1888
-
1889
- function ecwid_register_admin_styles($hook_suffix) {
1890
-
1891
- wp_enqueue_style('ecwid-admin-css', ECWID_PLUGIN_URL . 'css/admin.css', array(), get_option('ecwid_plugin_version'));
1892
- wp_enqueue_style('ecwid-fonts-css', ECWID_PLUGIN_URL . 'css/fonts.css', array(), get_option('ecwid_plugin_version'));
1893
-
1894
-
1895
- if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
1896
- wp_enqueue_style('ecwid-admin38-css', ECWID_PLUGIN_URL . 'css/admin.3.8.css', array('ecwid-admin-css'), get_option('ecwid_plugin_version'), 'all');
1897
- }
1898
-
1899
- if (isset($_GET['page']) && $_GET['page'] == 'ecwid') {
1900
-
1901
- if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
1902
- // Open dashboard for the first time, ecwid store id is set to demo => need landing styles/scripts
1903
- wp_enqueue_script('ecwid-landing-js', ECWID_PLUGIN_URL . 'js/landing.js', array(), get_option('ecwid_plugin_version'));
1904
- wp_localize_script('ecwid-landing-js', 'ecwidParams', array(
1905
- 'registerLink' => ecwid_get_register_link()
1906
- ));
1907
- if (ecwid_use_old_landing()) {
1908
- wp_enqueue_style('ecwid-landing-css', ECWID_PLUGIN_URL . 'css/landing_old.css', array(), get_option('ecwid_plugin_version'), 'all');
1909
- } else {
1910
- wp_enqueue_style('ecwid-landing-css', ECWID_PLUGIN_URL . 'css/landing.css', array(), get_option('ecwid_plugin_version'), 'all');
1911
- }
1912
- wp_enqueue_style('ecwid-landing-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300', array(), get_option('ecwid_plugin_version'));
1913
- } else {
1914
- // We already connected and disconnected the store, no need for fancy landing
1915
- wp_enqueue_script('ecwid-connect-js', ECWID_PLUGIN_URL . 'js/dashboard.js', array(), get_option('ecwid_plugin_version'));
1916
- }
1917
- }
1918
- }
1919
-
1920
- function ecwid_register_settings_styles($hook_suffix) {
1921
-
1922
- if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
1923
-
1924
- wp_enqueue_style('ecwid-settings-css', ECWID_PLUGIN_URL . 'css/settings.css', array(), get_option('ecwid_plugin_version'), 'all');
1925
-
1926
- if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
1927
- wp_enqueue_style('ecwid-settings38-css', ECWID_PLUGIN_URL . 'css/settings.3.8.css', array('ecwid-settings-css'), '', 'all');
1928
- }}
1929
-
1930
- function ecwid_plugin_actions($links) {
1931
- $settings_link = "<a href='admin.php?page=ecwid'>"
1932
- . (get_ecwid_store_id() == ECWID_DEMO_STORE_ID ? __('Setup', 'ecwid-shopping-cart') : __('Settings') )
1933
- . "</a>";
1934
- array_unshift( $links, $settings_link );
1935
-
1936
- return $links;
1937
- }
1938
-
1939
- function ecwid_settings_api_init() {
1940
-
1941
- if ( isset( $_POST['settings_section'] ) ) {
1942
- switch ( $_POST['settings_section'] ) {
1943
- case 'appearance':
1944
- register_setting( 'ecwid_options_page', 'ecwid_enable_minicart' );
1945
-
1946
- register_setting( 'ecwid_options_page', 'ecwid_show_categories' );
1947
- register_setting( 'ecwid_options_page', 'ecwid_show_search_box' );
1948
-
1949
- register_setting( 'ecwid_options_page', 'ecwid_pb_categoriesperrow', 'ecwid_abs_intval' );
1950
- register_setting( 'ecwid_options_page', 'ecwid_pb_productspercolumn_grid', 'ecwid_abs_intval' );
1951
- register_setting( 'ecwid_options_page', 'ecwid_pb_productsperrow_grid', 'ecwid_abs_intval' );
1952
- register_setting( 'ecwid_options_page', 'ecwid_pb_productsperpage_list', 'ecwid_abs_intval' );
1953
- register_setting( 'ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval' );
1954
- register_setting( 'ecwid_options_page', 'ecwid_pb_defaultview' );
1955
- register_setting( 'ecwid_options_page', 'ecwid_pb_searchview' );
1956
- break;
1957
-
1958
- case 'general':
1959
- register_setting( 'ecwid_options_page', 'ecwid_store_id', 'ecwid_abs_intval' );
1960
- if ( isset( $_POST['ecwid_store_id'] ) && intval( $_POST['ecwid_store_id'] ) == 0 ) {
1961
- Ecwid_Message_Manager::reset_hidden_messages();
1962
- }
1963
- break;
1964
-
1965
- case 'advanced':
1966
- register_setting( 'ecwid_options_page', 'ecwid_default_category_id', 'ecwid_abs_intval' );
1967
- register_setting( 'ecwid_options_page', 'ecwid_sso_secret_key' );
1968
- register_setting( 'ecwid_options_page', 'ecwid_use_chameleon' );
1969
- register_setting( 'ecwid_options_page', 'ecwid_use_new_horizontal_categories' );
1970
- register_setting( 'ecwid_options_page', 'ecwid_use_new_search' );
1971
- register_setting( 'ecwid_options_page', 'ecwid_is_sso_enabled' );
1972
- break;
1973
- }
1974
-
1975
- if ($_POST['settings_section'] == 'advanced' && !@$_POST['ecwid_is_sso_enabled']) {
1976
- update_option('ecwid_sso_secret_key', '');
1977
- }
1978
- }
1979
-
1980
- if (isset($_POST['ecwid_store_id'])) {
1981
- update_option('ecwid_is_api_enabled', 'off');
1982
- update_option('ecwid_api_check_time', 0);
1983
- update_option('ecwid_last_oauth_fail_time', 0);
1984
- }
1985
- }
1986
-
1987
- function ecwid_common_admin_scripts() {
1988
-
1989
- wp_enqueue_script('ecwid-admin-js', ECWID_PLUGIN_URL . 'js/admin.js', array(), get_option('ecwid_plugin_version'));
1990
- wp_enqueue_script('ecwid-modernizr-js', ECWID_PLUGIN_URL . 'js/modernizr.js', array(), get_option('ecwid_plugin_version'));
1991
-
1992
- wp_localize_script('ecwid-admin-js', 'ecwid_l10n', array(
1993
- 'dashboard' => __('Dashboard', 'ecwid-shopping-cart'),
1994
- 'dashboard_url' => 'admin.php?page=ecwid',
1995
- 'products' => __('Products', 'ecwid-shopping-cart'),
1996
- 'products_url' => 'admin.php?page=ecwid-admin-products',
1997
- 'orders' => __('Orders', 'ecwid-shopping-cart'),
1998
- 'orders_url' => 'admin.php?page=ecwid-admin-orders',
1999
- 'reset_cats_cache' => __('Refresh categories list', 'ecwid-shopping-cart'),
2000
- 'cache_updated' => __('Done', 'ecwid-shopping-cart'),
2001
- 'reset_cache_message' => __('The store top-level categories are automatically added to this drop-down menu', 'ecwid-shopping-cart'),
2002
- ));
2003
- }
2004
-
2005
- function ecwid_get_register_link()
2006
- {
2007
- $link = 'https://my.ecwid.com/cp/?source=wporg&partner=wporg%s#register';
2008
-
2009
- $current_user = wp_get_current_user();
2010
-
2011
- $user_data = '';
2012
- if ($current_user->ID && function_exists('get_user_meta')) {
2013
- $meta = get_user_meta($current_user->ID);
2014
-
2015
- $data = array(
2016
- 'name' => get_user_meta($current_user->ID, 'first_name', true) . ' ' . get_user_meta($current_user->ID, 'last_name', true),
2017
- 'nickname' => $current_user->display_name,
2018
- 'email' => $current_user->user_email
2019
- );
2020
-
2021
- foreach ($data as $key => $value) {
2022
- if (trim($value) == '') {
2023
- unset($data[$key]);
2024
- }
2025
- }
2026
- $user_data = '&' . build_query($data);
2027
- }
2028
-
2029
- $link = sprintf($link, $user_data);
2030
-
2031
- return $link;
2032
- }
2033
-
2034
- function ecwid_create_store() {
2035
- $api = new Ecwid_Api_V3();
2036
- $result = $api->create_store();
2037
- if (is_array($result) && $result['response']['code'] == 200) {
2038
- $data = json_decode($result['body']);
2039
-
2040
- update_option('ecwid_store_id', $data->id);
2041
-
2042
- $api->save_token($data->token);
2043
- update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
2044
-
2045
- header( 'HTTP/1.1 200 OK' );
2046
-
2047
- } else {
2048
-
2049
-
2050
- header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
2051
- }
2052
- }
2053
-
2054
- function ecwid_general_settings_do_page() {
2055
-
2056
- $store_id = get_option( 'ecwid_store_id' );
2057
-
2058
- $connection_error = isset( $_GET['connection_error'] );
2059
-
2060
- if ( $store_id == ECWID_DEMO_STORE_ID ) {
2061
- $no_oauth = @$_GET['oauth'] == 'no';
2062
-
2063
- $there_was_oauth_error = isset( $connection_error ) && $no_oauth;
2064
- $customer_returned_from_creating_store_at_ecwid =
2065
- EcwidPlatform::cache_get( 'user_was_redirected_to_ecwid_site_to_create_account' );
2066
-
2067
- if ( $there_was_oauth_error || $customer_returned_from_creating_store_at_ecwid ) {
2068
- EcwidPlatform::cache_reset( 'user_was_redirected_to_ecwid_site_to_create_account' );
2069
- require_once ECWID_PLUGIN_DIR . 'templates/connect.php';
2070
- } else {
2071
- $register = ! $connection_error && ! isset( $_GET['connect'] ) && ! @$_COOKIE['ecwid_create_store_clicked'];
2072
-
2073
- $api = new Ecwid_Api_V3();
2074
- global $current_user;
2075
-
2076
- if ( ecwid_use_old_landing() ) {
2077
- require_once( ECWID_PLUGIN_DIR . '/templates/landing_old.php' );
2078
- } else if ($api->does_store_exist($current_user->user_email)) {
2079
- require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
2080
- } else {
2081
- require_once( ECWID_PLUGIN_DIR . '/templates/landing.php' );
2082
- }
2083
- }
2084
- } else {
2085
- global $ecwid_oauth;
2086
-
2087
- if ( !$ecwid_oauth->has_scope( 'allow_sso' ) && !isset($_GET['reconnect']) ) {
2088
- if ( ecwid_test_oauth(true) ) {
2089
- require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
2090
- } else {
2091
- require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
2092
- }
2093
- } else {
2094
-
2095
- if ($connection_error || isset($_GET['reconnect'])) {
2096
- if (isset($_GET['reason'])) switch ($_GET['reason']) {
2097
- case '1': $reconnect_message = "Message 1"; break;
2098
- case '2': $reconnect_message = "Message 2"; break;
2099
- }
2100
-
2101
- $scopes = '';
2102
-
2103
- $connection_error = isset($_GET['connection_error']);
2104
-
2105
- require_once ECWID_PLUGIN_DIR . 'templates/reconnect.php';
2106
- } else {
2107
- $time = time() - get_option('ecwid_time_correction', 0);
2108
- $page = 'dashboard';
2109
-
2110
- $iframe_src = ecwid_get_iframe_src($time, $page);
2111
-
2112
- $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
2113
- $result = $request->do_request(array(
2114
- 'timeout' => 20
2115
- ));
2116
-
2117
- if ($result['code'] == 403 && strpos($result['data'], 'Token too old') !== false ) {
2118
-
2119
- if (isset($result['headers']['date'])) {
2120
- $time = strtotime($result['headers']['date']);
2121
-
2122
- $iframe_src = ecwid_get_iframe_src($time, $page);
2123
-
2124
- $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
2125
-
2126
- $result = $request->do_request();
2127
-
2128
- if ($result['code'] == 200) {
2129
- update_option('ecwid_time_correction', time() - $time);
2130
- }
2131
- }
2132
- }
2133
-
2134
- if ( is_array( $result ) && $result['code'] == 200 ) {
2135
- ecwid_admin_do_page( 'dashboard' );
2136
- } else {
2137
- require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
2138
- }
2139
- }
2140
- }
2141
- }
2142
- }
2143
-
2144
- function ecwid_get_iframe_src($time, $page) {
2145
-
2146
- return sprintf(
2147
- 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
2148
- get_ecwid_store_id(),
2149
- Ecwid_Api_V3::get_token(),
2150
- $time,
2151
- hash( 'sha256', get_ecwid_store_id() . Ecwid_Api_V3::get_token() . $time . Ecwid_Api_V3::CLIENT_SECRET ),
2152
- $page,
2153
- substr( get_bloginfo( 'language' ), 0, 2 )
2154
- );
2155
- }
2156
-
2157
- function ecwid_admin_do_page( $page ) {
2158
-
2159
- if (isset($_GET['show_timeout']) && $_GET['show_timeout'] == '1') {
2160
- require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
2161
- die();
2162
- }
2163
- global $ecwid_oauth;
2164
-
2165
- if (isset($_GET['ecwid_page']) && $_GET['ecwid_page']) {
2166
- $page = $_GET['ecwid_page'];
2167
- }
2168
-
2169
- if ($page == ecwid_get_admin_iframe_upgrade_page()) {
2170
- update_option('ecwid_api_check_time', time() - ECWID_API_AVAILABILITY_CHECK_TIME + 10 * 60);
2171
- }
2172
-
2173
- if ($page == 'dashboard') {
2174
- $show_reconnect = true;
2175
- }
2176
-
2177
- $time = time() - get_option('ecwid_time_correction', 0);
2178
-
2179
- $iframe_src = ecwid_get_iframe_src($time, $page);
2180
-
2181
- $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
2182
-
2183
- $result = $request->do_request();
2184
-
2185
- if (empty($result['code']) && empty($result['data'])) {
2186
- require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
2187
- } else if ($result['code'] != 200) {
2188
- if (ecwid_test_oauth(true)) {
2189
- require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
2190
- } else {
2191
- require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
2192
- }
2193
- } else {
2194
- require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
2195
- }
2196
- }
2197
-
2198
-
2199
- function ecwid_admin_products_do_page() {
2200
- ecwid_admin_do_page('products');
2201
- }
2202
-
2203
- function ecwid_admin_orders_do_page() {
2204
- ecwid_admin_do_page('orders');
2205
- }
2206
-
2207
-
2208
- function ecwid_admin_mobile_do_page() {
2209
- ecwid_admin_do_page('mobile');
2210
- }
2211
-
2212
- function ecwid_help_do_page() {
2213
-
2214
- $help = new Ecwid_Help_Page();
2215
- $faqs = $help->get_faqs();
2216
-
2217
- wp_enqueue_style('ecwid-help', ECWID_PLUGIN_URL . 'css/help.css',array(), get_option('ecwid_plugin_version'));
2218
-
2219
- $col_size = 6;
2220
- require_once ECWID_PLUGIN_DIR . 'templates/help.php';
2221
- }
2222
-
2223
- function ecwid_process_oauth_params() {
2224
-
2225
- if (strtoupper($_SERVER['REQUEST_METHOD']) != 'GET' || !isset($_GET['page'])) {
2226
- return;
2227
- }
2228
-
2229
- $is_dashboard = $_GET['page'] == 'ecwid';
2230
-
2231
- if (!$is_dashboard) {
2232
- return;
2233
- }
2234
-
2235
- global $ecwid_oauth;
2236
- $is_connect = get_ecwid_store_id() != ECWID_DEMO_STORE_ID && !isset($_GET['connection_error']);
2237
-
2238
- $is_reconnect = isset($_GET['reconnect']) && !isset($_GET['connection_error']);
2239
-
2240
- if ($is_connect) {
2241
- $ecwid_oauth->update_state( array( 'mode' => 'connect' ) );
2242
- }
2243
-
2244
- if ($is_reconnect && !isset($_GET['api_v3_sso'])) {
2245
- $ecwid_oauth->update_state( array(
2246
- 'mode' => 'reconnect',
2247
- // explicitly set to empty array if not available to reset current state
2248
- 'scope' => isset($_GET['scope']) ? $_GET['scope'] : array(),
2249
- // explicitly set to empty string if not available to reset current state
2250
- 'return_url' => isset($_GET['return-url']) ? $_GET['return-url'] : '',
2251
- 'reason' => isset($_GET['reason']) ? $_GET['reason'] : ''
2252
- ));
2253
- }
2254
- }
2255
-
2256
- function ecwid_admin_post_connect()
2257
- {
2258
- if (!current_user_can('manage_options')) {
2259
- return;
2260
- }
2261
-
2262
- if (isset($_GET['force_store_id'])) {
2263
- update_option('ecwid_store_id', $_GET['force_store_id']);
2264
- update_option('ecwid_is_api_enabled', 'off');
2265
- update_option('ecwid_api_check_time', 0);
2266
- update_option('ecwid_last_oauth_fail_time', 1);
2267
- wp_redirect('admin.php?page=ecwid');
2268
- exit;
2269
- }
2270
- global $ecwid_oauth;
2271
-
2272
- if (ecwid_test_oauth(true)) {
2273
-
2274
- if (@isset($_GET['api_v3_sso'])) {
2275
- $ecwid_oauth->update_state(array('mode' => 'reconnect', 'return_url' => 'admin.php?page=ecwid-advanced'));
2276
- wp_redirect($ecwid_oauth->get_sso_reconnect_dialog_url());
2277
- } else {
2278
- wp_redirect( $ecwid_oauth->get_auth_dialog_url() );
2279
- }
2280
- } else if (!isset($_GET['reconnect'])) {
2281
- wp_redirect('admin.php?page=ecwid&oauth=no&connection_error');
2282
- } else {
2283
- wp_redirect('admin.php?page=ecwid&reconnect&connection_error');
2284
- }
2285
- exit;
2286
- }
2287
-
2288
- function ecwid_test_oauth($force = false)
2289
- {
2290
- global $ecwid_oauth;
2291
-
2292
- $last_fail = get_option('ecwid_last_oauth_fail_time');
2293
-
2294
- if ( ($last_fail > 0 && $last_fail + 60*60*24 < time()) || $force) {
2295
-
2296
- $result = $ecwid_oauth->test_post();
2297
-
2298
- if ($result) {
2299
- update_option('ecwid_last_oauth_fail_time', $last_fail = 0);
2300
- } else {
2301
- update_option('ecwid_last_oauth_fail_time', $last_fail = time());
2302
- }
2303
- }
2304
-
2305
- return $last_fail == 0;
2306
- }
2307
-
2308
- function ecwid_get_categories_for_selector() {
2309
-
2310
- function walk_through_categories($categories, $parent_prefix) {
2311
- if (empty($categories)) {
2312
- return array();
2313
- }
2314
- $result = array();
2315
-
2316
- foreach ($categories as $category) {
2317
- $result[$category->id] = $category;
2318
- $result[$category->id]->path = $parent_prefix . $category->name;
2319
- $result = array_merge($result, walk_through_categories($category->sub, $category->name . ' > '));
2320
- unset($result[$category->id]->sub);
2321
- }
2322
-
2323
- return $result;
2324
- }
2325
-
2326
- $result = walk_through_categories(ecwid_get_categories(true), "");
2327
-
2328
- return $result;
2329
- }
2330
-
2331
- function ecwid_advanced_settings_do_page() {
2332
- $categories = ecwid_get_categories_for_selector();
2333
-
2334
- $is_sso_enabled = ecwid_is_sso_enabled();
2335
-
2336
- global $ecwid_oauth;
2337
-
2338
- $has_create_customers_scope = $ecwid_oauth->has_scope('create_customers');
2339
-
2340
- $key = get_option('ecwid_sso_secret_key');
2341
- $is_sso_checkbox_disabled = !$is_sso_enabled && !$has_create_customers_scope && empty($key);
2342
-
2343
- $reconnect_link = admin_url('admin-post.php?action=ecwid_connect&reconnect&api_v3_sso');
2344
-
2345
- require_once ECWID_PLUGIN_DIR . 'templates/advanced-settings.php';
2346
- }
2347
-
2348
- function ecwid_get_admin_iframe_upgrade_page() {
2349
- return 'billing:feature=sso&plan=ecwid_venture';
2350
- }
2351
-
2352
- function ecwid_appearance_settings_do_page() {
2353
-
2354
- wp_register_script('ecwid-appearance-js', ECWID_PLUGIN_URL . 'js/appearance.js', array(), get_option('ecwid_plugin_version'), true);
2355
- wp_enqueue_script('ecwid-appearance-js');
2356
-
2357
- $disabled = false;
2358
- if (!empty($ecwid_page_id) && ($ecwid_page_id > 0)) {
2359
- $_tmp_page = get_post($ecwid_page_id);
2360
- $content = $_tmp_page->post_content;
2361
- if ( (strpos($content, "[ecwid_productbrowser]") === false) && (strpos($content, "xProductBrowser") !== false) )
2362
- $disabled = true;
2363
- }
2364
- // $disabled_str is used in appearance settings template
2365
- if ($disabled)
2366
- $disabled_str = 'disabled = "disabled"';
2367
- else
2368
- $disabled_str = "";
2369
-
2370
- require_once ECWID_PLUGIN_DIR . 'templates/appearance-settings.php';
2371
- }
2372
-
2373
- function ecwid_debug_do_page() {
2374
-
2375
- if (ecwid_is_api_enabled()) {
2376
- $remote_get_results = wp_remote_get( 'http://app.ecwid.com/api/v1/' . get_ecwid_store_id() . '/profile' );
2377
-
2378
- $api_v3_profile_results = wp_remote_get( 'https://app.ecwid.com/api/v3/' . get_ecwid_store_id() . '/profile?token=' . Ecwid_Api_V3::get_token() );
2379
- }
2380
-
2381
- global $ecwid_oauth;
2382
-
2383
- require_once ECWID_PLUGIN_DIR . 'templates/debug.php';
2384
- }
2385
-
2386
- function ecwid_get_debug_file() {
2387
- if (!current_user_can('manage_options')) {
2388
- return;
2389
- }
2390
-
2391
- header('Content-Disposition: attachment;filename=ecwid-plugin-log.html');
2392
-
2393
-
2394
- ecwid_debug_do_page();
2395
- wp_die();
2396
- }
2397
-
2398
- function get_ecwid_store_id() {
2399
- $store_id = get_option('ecwid_store_id');
2400
- if (empty($store_id)) {
2401
- $store_id = ECWID_DEMO_STORE_ID;
2402
- }
2403
-
2404
- return $store_id;
2405
- }
2406
-
2407
- function ecwid_save_post($post_id)
2408
- {
2409
- // If primary or auto store page gets updated
2410
- if ($post_id == get_option('ecwid_store_page_id') || $post_id == get_option('ecwid_store_page_id_auto')) {
2411
- $new_status = get_post_status($post_id);
2412
-
2413
- // and the update either disables the page or removes product browser
2414
- if (!in_array($new_status, array('publish', 'private')) || !ecwid_page_has_productbrowser($post_id)) {
2415
-
2416
- // then look for another enabled page that has a product browser in it
2417
- $pages = get_pages(array('post_status' => 'publish,private'));
2418
-
2419
- foreach ($pages as $page) {
2420
- if (ecwid_page_has_productbrowser($page->ID)) {
2421
- update_option('ecwid_store_page_id_auto', $page->ID);
2422
- return;
2423
- }
2424
- }
2425
- }
2426
- }
2427
-
2428
- // if there is no current store page and this new page has a product browser
2429
- if (ecwid_page_has_productbrowser($post_id) && !ecwid_get_current_store_page_id()) {
2430
- // then this page becomes a new store page
2431
- update_option('ecwid_store_page_id_auto', $post_id);
2432
- }
2433
- }
2434
-
2435
- function ecwid_get_current_store_page_id()
2436
- {
2437
- static $page_id = null;
2438
-
2439
- if (is_null($page_id)) {
2440
- $page_id = false;
2441
- foreach(array('ecwid_store_page_id', 'ecwid_store_page_id_auto') as $option) {
2442
- $id = get_option($option);
2443
- if ($id) {
2444
- $status = get_post_status($id);
2445
-
2446
- if ($status == 'publish' || $status == 'private') {
2447
- $page_id = $id;
2448
- break;
2449
- }
2450
- }
2451
- }
2452
- }
2453
-
2454
- return $page_id;
2455
- }
2456
-
2457
- function ecwid_get_store_page_url()
2458
- {
2459
- static $link = null;
2460
-
2461
- if (is_null($link)) {
2462
- $link = get_page_link(ecwid_get_current_store_page_id());
2463
- }
2464
-
2465
- return $link;
2466
- }
2467
-
2468
- function ecwid_is_store_page_available()
2469
- {
2470
- return ecwid_get_current_store_page_id() != false;
2471
- }
2472
-
2473
- function ecwid_get_product_url($product)
2474
- {
2475
- return ecwid_get_entity_url($product, 'p');
2476
- }
2477
-
2478
- function ecwid_get_category_url($category)
2479
- {
2480
- return ecwid_get_entity_url($category, 'c');
2481
- }
2482
-
2483
- function ecwid_get_entity_url($entity, $type) {
2484
-
2485
- $link = ecwid_get_store_page_url();
2486
-
2487
- if (is_numeric($entity)) {
2488
- return $link . '#!/' . $type . '/' . $entity;
2489
- } elseif (is_array($entity) && isset($entity['url'])) {
2490
- $link .= substr($entity['url'], strpos($entity['url'], '#'));
2491
- }
2492
-
2493
- return $link;
2494
-
2495
- }
2496
-
2497
- function ecwid_get_product_browser_url_script()
2498
- {
2499
- $str = '';
2500
- if (ecwid_is_store_page_available()) {
2501
- $url = ecwid_get_store_page_url();
2502
-
2503
- $str = '<script data-cfasync="false" type="text/javascript">var ecwid_ProductBrowserURL = "' . esc_js($url) . '";</script>';
2504
- }
2505
-
2506
- return $str;
2507
-
2508
- }
2509
-
2510
- function ecwid_get_wp_install_date( ) {
2511
- global $wpdb;
2512
-
2513
- $wp_date = get_option( 'ecwid_wp_install_date' );
2514
- if ( ! $wp_date ) {
2515
- global $wpdb;
2516
- $oldest_user = strtotime( $wpdb->get_var( "SELECT min(`user_registered`) FROM {$wpdb->users}" ) );
2517
- $oldest_post = strtotime( $wpdb->get_var( "SELECT min(`post_date`) FROM {$wpdb->posts}" ) );
2518
- $wpconfig_create = @filectime( ABSPATH . '/wp-config.php' );
2519
-
2520
- $wp_date = min( $oldest_user, $oldest_post, $wpconfig_create );
2521
- update_option( 'ecwid_wp_install_date', $wp_date );
2522
- }
2523
-
2524
- return $wp_date;
2525
- }
2526
-
2527
- function ecwid_check_for_remote_connection_errors()
2528
- {
2529
- global $ecwid_oauth;
2530
-
2531
- $results = array();
2532
- $results['https_get_error'] = wp_remote_get(ecwid_get_categories_js_url('abc'));
2533
- $results['https_post_error'] = wp_remote_post($ecwid_oauth->get_test_post_url());
2534
-
2535
- foreach ($results as $type => $value) {
2536
- if (is_wp_error($value)) {
2537
- $results[$type] = $value->get_error_message();
2538
- } else {
2539
- unset($results[$type]);
2540
- }
2541
- }
2542
-
2543
- return $results;
2544
- }
2545
-
2546
- function ecwid_is_sso_enabled() {
2547
- global $ecwid_oauth;
2548
-
2549
- $is_sso_enabled = false;
2550
-
2551
- $is_apiv3_sso = ecwid_is_paid_account() && get_option('ecwid_is_sso_enabled') && $ecwid_oauth->has_scope('create_customers');
2552
- $is_apiv1_sso = ecwid_is_paid_account() && get_option('ecwid_sso_secret_key');
2553
-
2554
- $is_sso_enabled = $is_apiv3_sso || $is_apiv1_sso;
2555
-
2556
- return $is_sso_enabled;
2557
- }
2558
-
2559
- function ecwid_sso() {
2560
-
2561
- if (!ecwid_is_sso_enabled()) return;
2562
-
2563
- $current_user = wp_get_current_user();
2564
-
2565
- $signin_url = wp_login_url(ecwid_get_store_page_url());
2566
- $signout_url = wp_logout_url(ecwid_get_store_page_url());
2567
- $sign_in_out_urls = <<<JS
2568
- window.EcwidSignInUrl = '$signin_url';
2569
- window.EcwidSignOutUrl = '$signout_url';
2570
- window.Ecwid.OnAPILoaded.add(function() {
2571
-
2572
- window.Ecwid.setSignInUrls({
2573
- signInUrl: '$signin_url',
2574
- signOutUrl: '$signout_url'
2575
- });
2576
- });
2577
- JS;
2578
-
2579
- $ecwid_sso_profile = '';
2580
- if ($current_user->ID) {
2581
- $meta = get_user_meta($current_user->ID);
2582
-
2583
- $user_data = array(
2584
- 'userId' => "{$current_user->ID}",
2585
- 'profile' => array(
2586
- 'email' => $current_user->user_email,
2587
- 'billingPerson' => array(
2588
- 'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
2589
- )
2590
- )
2591
- );
2592
-
2593
- global $ecwid_oauth;
2594
- if ($ecwid_oauth->has_scope('create_customers')) {
2595
- $key = Ecwid_Api_V3::CLIENT_SECRET;
2596
- $user_data['appClientId'] = Ecwid_Api_V3::CLIENT_ID;
2597
- } else {
2598
- $key = get_option('ecwid_sso_secret_key');
2599
- $user_data['appId'] = "wp_" . get_ecwid_store_id();
2600
- }
2601
-
2602
- $user_data_encoded = base64_encode(json_encode($user_data));
2603
- $time = time();
2604
- $hmac = ecwid_hmacsha1("$user_data_encoded $time", $key);
2605
-
2606
- $ecwid_sso_profile = "$user_data_encoded $hmac $time";
2607
-
2608
-
2609
- //die(var_dump($user_data, json_encode($user_data), $ecwid_sso_profile));
2610
- }
2611
-
2612
-
2613
- return <<<HTML
2614
- <script data-cfasync="false" type="text/javascript">
2615
-
2616
- var ecwid_sso_profile='$ecwid_sso_profile';
2617
- $sign_in_out_urls
2618
- </script>
2619
- HTML;
2620
- }
2621
-
2622
- // from: http://www.php.net/manual/en/function.sha1.php#39492
2623
-
2624
- function ecwid_hmacsha1($data, $key) {
2625
- if (function_exists("hash_hmac")) {
2626
- return hash_hmac('sha1', $data, $key);
2627
- } else {
2628
- $blocksize=64;
2629
- $hashfunc='sha1';
2630
- if (strlen($key)>$blocksize)
2631
- $key=pack('H*', $hashfunc($key));
2632
- $key=str_pad($key,$blocksize,chr(0x00));
2633
- $ipad=str_repeat(chr(0x36),$blocksize);
2634
- $opad=str_repeat(chr(0x5c),$blocksize);
2635
- $hmac = pack(
2636
- 'H*',$hashfunc(
2637
- ($key^$opad).pack(
2638
- 'H*',$hashfunc(
2639
- ($key^$ipad).$data
2640
- )
2641
- )
2642
- )
2643
- );
2644
- return bin2hex($hmac);
2645
- }
2646
- }
2647
-
2648
- function ecwid_can_display_html_catalog()
2649
- {
2650
- if (!isset($_GET['_escaped_fragment_'])) return;
2651
-
2652
- $api = ecwid_new_product_api();
2653
- if (!$api) return;
2654
-
2655
- $profile = $api->get_profile();
2656
- if (!$profile) return;
2657
- return $profile['closed'] != true;
2658
- }
2659
-
2660
- function ecwid_get_default_pb_size() {
2661
- return array(
2662
- 'grid_rows' => 10,
2663
- 'grid_columns' => 3,
2664
- 'list_rows' => 60,
2665
- 'table_rows' => 60
2666
- );
2667
- }
2668
-
2669
- function ecwid_is_paid_account()
2670
- {
2671
- return ecwid_is_api_enabled() && get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
2672
- }
2673
-
2674
- function ecwid_is_api_enabled()
2675
- {
2676
- $ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
2677
- $ecwid_api_check_time = get_option('ecwid_api_check_time');
2678
- $now = time();
2679
-
2680
- if ( $now > ($ecwid_api_check_time + ECWID_API_AVAILABILITY_CHECK_TIME) && get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
2681
- $ecwid = ecwid_new_product_api();
2682
-
2683
- $ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
2684
-
2685
- update_option('ecwid_is_api_enabled', $ecwid_is_api_enabled);
2686
- update_option('ecwid_api_check_time', $now);
2687
- }
2688
-
2689
- if ('on' == $ecwid_is_api_enabled)
2690
- return true;
2691
- else
2692
- return false;
2693
- }
2694
-
2695
- function ecwid_new_product_api()
2696
- {
2697
- include_once ECWID_PLUGIN_DIR . 'lib/ecwid_product_api.php';
2698
- $ecwid_store_id = intval(get_ecwid_store_id());
2699
- $api = new EcwidProductApi($ecwid_store_id);
2700
-
2701
- return $api;
2702
- }
2703
-
2704
- function ecwid_embed_svg($name) {
2705
- $code = file_get_contents(ECWID_PLUGIN_DIR . 'images/' . $name . '.svg');
2706
-
2707
- echo $code;
2708
- }
2709
-
2710
- function ecwid_get_categories_js_url($callback = null) {
2711
-
2712
- $url = 'https://my.ecwid.com/categories.js?ownerid=' . get_ecwid_store_id();
2713
-
2714
- if ($callback) {
2715
- $url .= '&callback=' . $callback;
2716
- }
2717
-
2718
- return $url;
2719
- }
2720
-
2721
-
2722
- function ecwid_use_old_landing() {
2723
- return version_compare(get_bloginfo('version'), '3.7') < 0;
2724
- }
2725
-
2726
- /*
2727
- * Basically a copy of has_shortcode that returns the matched shortcode
2728
- */
2729
- function ecwid_find_shortcodes( $content, $tag ) {
2730
-
2731
- if ( false === strpos( $content, '[' ) ) {
2732
- return false;
2733
- }
2734
-
2735
- if ( shortcode_exists( $tag ) ) {
2736
- preg_match_all( '/' . ecwid_get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
2737
- if ( empty( $matches ) )
2738
- return false;
2739
-
2740
- $result = array();
2741
- foreach ( $matches as $shortcode ) {
2742
- if ( $tag === $shortcode[2] ) {
2743
- $result[] = $shortcode;
2744
- } elseif ( !empty($shortcode[5]) && $found = ecwid_find_shortcodes( $shortcode[5], $tag ) ) {
2745
- $result = array_merge($result, $found);
2746
- }
2747
- }
2748
-
2749
- if (empty($result)) {
2750
- $result = false;
2751
- }
2752
- return $result;
2753
- }
2754
- return false;
2755
- }
2756
-
2757
- // Since we use shortcode regex in our own functions, we need it to be persistent
2758
- function ecwid_get_shortcode_regex() {
2759
- global $shortcode_tags;
2760
- $tagnames = array_keys($shortcode_tags);
2761
- $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
2762
-
2763
- // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
2764
- // Also, see shortcode_unautop() and shortcode.js.
2765
- return
2766
- '\\[' // Opening bracket
2767
- . '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
2768
- . "($tagregexp)" // 2: Shortcode name
2769
- . '(?![\\w-])' // Not followed by word character or hyphen
2770
- . '(' // 3: Unroll the loop: Inside the opening shortcode tag
2771
- . '[^\\]\\/]*' // Not a closing bracket or forward slash
2772
- . '(?:'
2773
- . '\\/(?!\\])' // A forward slash not followed by a closing bracket
2774
- . '[^\\]\\/]*' // Not a closing bracket or forward slash
2775
- . ')*?'
2776
- . ')'
2777
- . '(?:'
2778
- . '(\\/)' // 4: Self closing tag ...
2779
- . '\\]' // ... and closing bracket
2780
- . '|'
2781
- . '\\]' // Closing bracket
2782
- . '(?:'
2783
- . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags
2784
- . '[^\\[]*+' // Not an opening bracket
2785
- . '(?:'
2786
- . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
2787
- . '[^\\[]*+' // Not an opening bracket
2788
- . ')*+'
2789
- . ')'
2790
- . '\\[\\/\\2\\]' // Closing shortcode tag
2791
- . ')?'
2792
- . ')'
2793
- . '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
2794
- }
2795
-
2796
- ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: Ecwid Shopping Cart
4
+ Plugin URI: http://www.ecwid.com?source=wporg
5
+ Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
6
+ Text Domain: ecwid-shopping-cart
7
+ Author: Ecwid Team
8
+ Version: 4.7.5
9
+ Author URI: http://www.ecwid.com?source=wporg
10
+ */
11
+
12
+ register_activation_hook( __FILE__, 'ecwid_store_activate' );
13
+ register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
14
+ register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
15
+
16
+ define("APP_ECWID_COM", 'app.ecwid.com');
17
+ define("ECWID_DEMO_STORE_ID", 1003);
18
+ define('ECWID_API_AVAILABILITY_CHECK_TIME', 60*60*3);
19
+
20
+ define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
21
+
22
+ define ( 'ECWID_VERSION_BUILTIN_CHAMELEON', '4.4.2.1' );
23
+
24
+ if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
25
+ define( 'ECWID_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
26
+ }
27
+
28
+ if ( ! defined( 'ECWID_PLUGIN_BASENAME' ) ) {
29
+ define( 'ECWID_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
30
+ }
31
+
32
+ if ( ! defined( 'ECWID_PLUGIN_URL' ) ) {
33
+ define( 'ECWID_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
34
+ }
35
+
36
+ if ( ! defined('ECWID_SHORTCODES_DIR' ) ) {
37
+ define( 'ECWID_SHORTCODES_DIR', ECWID_PLUGIN_DIR . 'includes/shortcodes' );
38
+ }
39
+
40
+ // Older versions of Google XML Sitemaps plugin generate it in admin, newer in site area, so the hook should be assigned in both of them
41
+ add_action('sm_buildmap', 'ecwid_build_google_xml_sitemap');
42
+
43
+ // Needs to be in both front-end and back-end to allow admin zone recognize the shortcode
44
+ add_shortcode('ecwid', 'ecwid_shortcode');
45
+
46
+ add_action( 'plugins_loaded', 'ecwid_init_integrations' );
47
+ add_filter('plugins_loaded', 'ecwid_load_textdomain');
48
+
49
+ if ( is_admin() ){
50
+ add_action('admin_init', 'ecwid_settings_api_init');
51
+ add_action('admin_init', 'ecwid_check_version');
52
+ add_action('admin_init', 'ecwid_process_oauth_params');
53
+ add_action('admin_notices', 'ecwid_show_admin_messages');
54
+ add_action('admin_menu', 'ecwid_build_menu');
55
+ add_action('admin_enqueue_scripts', 'ecwid_common_admin_scripts');
56
+ add_action('admin_enqueue_scripts', 'ecwid_register_admin_styles');
57
+ add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
58
+ add_action('wp_ajax_ecwid_hide_vote_message', 'ecwid_hide_vote_message');
59
+ add_action('wp_ajax_ecwid_hide_message', 'ecwid_ajax_hide_message');
60
+ add_action('wp_ajax_save-widget', 'ecwid_ajax_save_widget');
61
+ add_action('wp_ajax_ecwid_reset_categories_cache', 'ecwid_reset_categories_cache');
62
+ add_action('wp_ajax_ecwid_create_store', 'ecwid_create_store');
63
+ add_filter('plugin_action_links_' . ECWID_PLUGIN_BASENAME, 'ecwid_plugin_actions');
64
+ add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
65
+ add_action('save_post', 'ecwid_save_post');
66
+ add_action('init', 'ecwid_apply_theme', 0);
67
+ add_action('get_footer', 'ecwid_admin_get_footer');
68
+ add_action('admin_post_ecwid_connect', 'ecwid_admin_post_connect');
69
+ add_filter('tiny_mce_before_init', 'ecwid_tinymce_init');
70
+ add_action('admin_post_ecwid_get_debug', 'ecwid_get_debug_file');
71
+ } else {
72
+ add_shortcode('ecwid_script', 'ecwid_script_shortcode');
73
+ add_action('init', 'ecwid_backward_compatibility');
74
+ add_action('send_headers', 'ecwid_503_on_store_closed');
75
+ add_action('template_redirect', 'ecwid_404_on_broken_escaped_fragment');
76
+ add_action('template_redirect', 'ecwid_apply_theme');
77
+ add_action('wp_enqueue_scripts', 'ecwid_enqueue_frontend');
78
+ add_action('wp', 'ecwid_seo_ultimate_compatibility', 0);
79
+ add_action('wp', 'ecwid_remove_default_canonical');
80
+ add_filter('wp', 'ecwid_seo_compatibility_init', 0);
81
+ add_filter('wp_title', 'ecwid_seo_title', 10000);
82
+ add_filter('document_title_parts', 'ecwid_seo_title_parts');
83
+ add_action('plugins_loaded', 'ecwid_minifier_compatibility', 0);
84
+ add_action('wp_head', 'ecwid_meta_description', 0);
85
+ add_action('wp_head', 'ecwid_ajax_crawling_fragment');
86
+ add_action('wp_head', 'ecwid_meta');
87
+ add_action('wp_head', 'ecwid_canonical');
88
+ add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
89
+ add_action('wp_head', 'ecwid_add_chameleon');
90
+ add_action('wp_head', 'ecwid_product_browser_url_in_head');
91
+ add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
92
+ add_filter('the_content', 'ecwid_content_started', 0);
93
+ add_filter('body_class', 'ecwid_body_class');
94
+ add_action('redirect_canonical', 'ecwid_redirect_canonical', 10, 2 );
95
+ $ecwid_seo_title = '';
96
+ }
97
+ add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
98
+ if (get_option('ecwid_last_oauth_fail_time') > 0) {
99
+ add_action('plugins_loaded', 'ecwid_test_oauth');
100
+ }
101
+
102
+ $ecwid_script_rendered = false; // controls single script.js on page
103
+
104
+ require_once ECWID_PLUGIN_DIR . 'includes/themes.php';
105
+ require_once ECWID_PLUGIN_DIR . 'includes/oembed.php';
106
+ require_once ECWID_PLUGIN_DIR . 'includes/widgets.php';
107
+ require_once ECWID_PLUGIN_DIR . 'includes/shortcodes.php';
108
+
109
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-message-manager.php';
110
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-store-editor.php';
111
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-oauth.php';
112
+
113
+ if (is_admin()) {
114
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-help-page.php';
115
+ }
116
+
117
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
118
+
119
+ require_once ECWID_PLUGIN_DIR . 'lib/ecwid_platform.php';
120
+ require_once ECWID_PLUGIN_DIR . 'lib/ecwid_api_v3.php';
121
+
122
+ function ecwid_init_integrations()
123
+ {
124
+ if ( !function_exists( 'get_plugins' ) ) { require_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); }
125
+
126
+ $integrations = array(
127
+ 'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
128
+ 'wpseo' => 'wordpress-seo/wp-seo.php',
129
+ 'divibuilder' => 'divi-builder/divi-builder.php',
130
+ 'autoptimize' => 'autoptimize/autoptimize.php'
131
+ );
132
+
133
+ foreach ($integrations as $key => $plugin) {
134
+ if ( is_plugin_active($plugin) ) {
135
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-integration-' . $key . '.php';
136
+ }
137
+ }
138
+ }
139
+
140
+ $version = get_bloginfo('version');
141
+
142
+ function ecwid_add_breadcrumbs_navxt($trail)
143
+ {
144
+ $breadcrumb = new bcn_breadcrumb('Ecwid', '', '', 'http://ecwid.com');
145
+ $trail->add($breadcrumb);
146
+ }
147
+
148
+ function ecwid_add_breadcrumb_links_wpseo($links)
149
+ {
150
+ return array_merge((array)$links, array(
151
+ array(
152
+ 'text' => 'ecwid.com',
153
+ 'url' => 'http://ecwid.com'
154
+ )
155
+ ));
156
+ }
157
+ if (version_compare($version, '3.6') < 0) {
158
+ /**
159
+ * A copy of has_shortcode functionality from wordpress 3.6
160
+ * http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/shortcodes.php
161
+ */
162
+
163
+ if (!function_exists('shortcode_exists')) {
164
+ function shortcode_exists( $tag ) {
165
+ global $shortcode_tags;
166
+ return array_key_exists( $tag, $shortcode_tags );
167
+ }
168
+ }
169
+
170
+ if (!function_exists('has_shortcode')) {
171
+ function has_shortcode( $content, $tag ) {
172
+ if ( false === strpos( $content, '[' ) ) {
173
+ return false;
174
+ }
175
+
176
+ if ( shortcode_exists( $tag ) ) {
177
+ preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
178
+ if ( empty( $matches ) )
179
+ return false;
180
+
181
+ foreach ( $matches as $shortcode ) {
182
+ if ( $tag === $shortcode[2] ) {
183
+ return true;
184
+ } elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) {
185
+ return true;
186
+ }
187
+ }
188
+ }
189
+ return false;
190
+ }
191
+ }
192
+ }
193
+
194
+ if (is_admin()) {
195
+ $main_button_class = "";
196
+ if (version_compare($version, '3.8-beta') > 0) {
197
+ $main_button_class = "button-primary";
198
+ } else {
199
+ $main_button_class = "pure-button pure-button-primary";
200
+ }
201
+
202
+ define('ECWID_MAIN_BUTTON_CLASS', $main_button_class);
203
+ }
204
+
205
+ function ecwid_body_class($classes)
206
+ {
207
+ if (ecwid_page_has_productbrowser()) {
208
+ $classes[] = 'ecwid-shopping-cart';
209
+ }
210
+
211
+ return $classes;
212
+ }
213
+
214
+ function ecwid_redirect_canonical($redirect_url, $requested_url) {
215
+ if (!is_front_page()) {
216
+ return $redirect_url;
217
+ }
218
+
219
+ if (strpos($requested_url, '_escaped_fragment_') === false) {
220
+ return $redirect_url;
221
+ }
222
+
223
+ $parsed = parse_url($requested_url);
224
+ $query = array();
225
+ parse_str($parsed['query'], $query);
226
+
227
+ if (!array_key_exists('_escaped_fragment_', $query)) {
228
+ return $redirect_url;
229
+ }
230
+
231
+ if (!ecwid_page_has_productbrowser(get_the_ID())) {
232
+ return $redirect_url;
233
+ }
234
+
235
+ return $requested_url;
236
+ }
237
+
238
+ function ecwid_ie8_fonts_inclusion()
239
+ {
240
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
241
+
242
+ $url = ECWID_PLUGIN_URL . 'fonts/ecwid-logo.eot';
243
+ echo <<<HTML
244
+ <style>
245
+ @font-face {
246
+ font-family: 'ecwid-logo';
247
+ src:url($url);
248
+ }
249
+ </style>
250
+ HTML;
251
+
252
+ }
253
+
254
+ add_action('wp_ajax_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
255
+ add_action('wp_ajax_nopriv_ecwid_get_product_info', 'ecwid_ajax_get_product_info' );
256
+
257
+
258
+ function ecwid_enqueue_frontend() {
259
+
260
+ if (!wp_script_is('jquery-ui-widget')) {
261
+ wp_enqueue_script('jquery-ui-widget', includes_url() . 'js/jquery/ui/widget.min.js', array('jquery'));
262
+ }
263
+
264
+ wp_register_script('ecwid-products-list-js', ECWID_PLUGIN_URL . 'js/products-list.js', array('jquery-ui-widget'), get_option('ecwid_plugin_version'));
265
+ wp_enqueue_script('ecwid-products-list-js');
266
+
267
+ wp_register_style('ecwid-products-list-css', ECWID_PLUGIN_URL . 'css/products-list.css', array(), get_option('ecwid_plugin_version'));
268
+ wp_enqueue_style('ecwid-css', ECWID_PLUGIN_URL . 'css/frontend.css',array(), get_option('ecwid_plugin_version'));
269
+ wp_enqueue_style('ecwid-fonts-css', ECWID_PLUGIN_URL . 'css/fonts.css', array(), get_option('ecwid_plugin_version'));
270
+
271
+ wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
272
+
273
+ if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
274
+ wp_enqueue_script('ecwid-recently-viewed', ECWID_PLUGIN_URL . 'js/recently-viewed-common.js', array('jquery', 'utils'), get_option('ecwid_plugin_version'), true);
275
+
276
+ wp_localize_script(
277
+ 'ecwid-products-list-js',
278
+ 'wp_ecwid_products_list_vars',
279
+ array(
280
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
281
+ 'is_api_available' => ecwid_is_paid_account()
282
+ )
283
+ );
284
+ }
285
+
286
+ if (is_plugin_active('contact-form-7-designer/cf7-styles.php')) {
287
+ wp_enqueue_script('ecwid-cf7designer', ECWID_PLUGIN_URL . 'js/cf7designer.js', array(), get_option('ecwid-plugin-version'), true);
288
+ }
289
+ }
290
+
291
+ function ecwid_add_chameleon() {
292
+ if (!get_option('ecwid_use_chameleon')) {
293
+ return;
294
+ }
295
+
296
+ $colors = array();
297
+
298
+ foreach (array('foreground', 'background', 'link', 'price', 'button') as $kind) {
299
+ $color = get_option( 'ecwid_chameleon_colors_' . $kind );
300
+ if ( $color ) {
301
+ $colors['color-' . $kind] = $color;
302
+ }
303
+ }
304
+
305
+ if (empty($colors)) {
306
+ $colors = 'auto';
307
+ }
308
+
309
+ $colors = json_encode($colors);
310
+ $font = '"auto"';
311
+
312
+ $chameleon = apply_filters( 'ecwid_chameleon_settings', array('colors' => $colors, 'font' => $font));
313
+
314
+ if (!is_array($chameleon)) {
315
+ $chameleon = array(
316
+ 'colors' => $colors,
317
+ 'font' => $font
318
+ );
319
+ }
320
+
321
+ if (!isset($chameleon['colors'])) {
322
+ $chameleon['colors'] = json_encode($colors);
323
+ }
324
+
325
+ if (!isset($chameleon['font'])) {
326
+ $chameleon['font'] = $font;
327
+ }
328
+
329
+ echo <<<HTML
330
+ <script type="text/javascript">
331
+ window.ec = window.ec || Object();
332
+ window.ec.config = window.ec.config || Object();
333
+ window.ec.config.chameleon = window.ec.config.chameleon || Object();
334
+ window.ec.config.chameleon.font = $chameleon[font];
335
+ window.ec.config.chameleon.colors = $chameleon[colors];
336
+ </script>
337
+ HTML;
338
+
339
+ }
340
+
341
+ function ecwid_load_textdomain() {
342
+ load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
343
+
344
+ }
345
+
346
+ function ecwid_404_on_broken_escaped_fragment() {
347
+ if (!ecwid_is_api_enabled()) {
348
+ return;
349
+ }
350
+
351
+ if (!isset($_GET['_escaped_fragment_'])) {
352
+ return;
353
+ }
354
+
355
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
356
+ $api = ecwid_new_product_api();
357
+
358
+ if (isset($params['mode']) && !empty($params['mode']) && isset($params['id'])) {
359
+ $result = array();
360
+ $is_root_cat = $params['mode'] == 'category' && $params['id'] == 0;
361
+ if ($params['mode'] == 'product') {
362
+ $result = $api->get_product($params['id']);
363
+ } elseif (!$is_root_cat && $params['mode'] == 'category') {
364
+ $result = $api->get_category($params['id']);
365
+ }
366
+
367
+ if (!$is_root_cat && empty($result)) {
368
+ global $wp_query;
369
+
370
+ $wp_query->set_404();
371
+ status_header(404);
372
+ }
373
+ }
374
+ }
375
+
376
+ function ecwid_503_on_store_closed() {
377
+ if (!ecwid_is_api_enabled()) {
378
+ return;
379
+ }
380
+
381
+ if (!isset($_GET['_escaped_fragment_'])) {
382
+ return;
383
+ }
384
+
385
+ $api = ecwid_new_product_api();
386
+ $profile = $api->get_profile();
387
+
388
+ if ($profile['closed']) {
389
+ header('HTTP/1.1 503 Service Temporarily Unavailable');
390
+ header('Status: 503 Service Temporarily Unavailable');
391
+ }
392
+ }
393
+
394
+ function ecwid_backward_compatibility() {
395
+ // Backward compatibility with 1.1.2 and earlier
396
+ if (isset($_GET['ecwid_product_id']) || isset($_GET['ecwid_category_id'])) {
397
+
398
+ if (isset($_GET['ecwid_product_id']))
399
+ $redirect = ecwid_get_product_url(intval($_GET['ecwid_product_id']));
400
+ elseif (isset($_GET['ecwid_category_id']))
401
+ $redirect = ecwid_get_category_url(intval($_GET['ecwid_category_id']));
402
+
403
+ wp_redirect($redirect, 301);
404
+ exit();
405
+ }
406
+ }
407
+
408
+ function ecwid_build_sitemap($callback)
409
+ {
410
+ if (!ecwid_is_paid_account() || !ecwid_is_store_page_available()) return;
411
+
412
+ $page_id = ecwid_get_current_store_page_id();
413
+
414
+ if (get_post_status($page_id) == 'publish') {
415
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-sitemap-builder.php';
416
+
417
+ $sitemap = new EcwidSitemapBuilder(ecwid_get_store_page_url(), $callback, ecwid_new_product_api());
418
+
419
+ $sitemap->generate();
420
+ }
421
+ }
422
+
423
+ function ecwid_build_google_xml_sitemap()
424
+ {
425
+ return ecwid_build_sitemap('ecwid_google_xml_sitemap_build_sitemap_callback');
426
+ }
427
+
428
+ function ecwid_google_xml_sitemap_build_sitemap_callback($url, $priority, $frequency)
429
+ {
430
+ static $generatorObject = null;
431
+ if (is_null($generatorObject)) {
432
+ $generatorObject = GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign!
433
+ }
434
+
435
+ if($generatorObject != null) {
436
+ $page = new GoogleSitemapGeneratorPage($url, $priority, $frequency);
437
+ $generatorObject->AddElement($page);
438
+ }
439
+ }
440
+
441
+ function ecwid_minifier_compatibility()
442
+ {
443
+ if ( !function_exists( 'get_plugins' ) ) { require_once ( ABSPATH . 'wp-admin/includes/plugin.php' ); }
444
+
445
+ $plugins = get_plugins();
446
+ $wp_minify_plugin = 'wp-minify/wp-minify.php';
447
+ if (array_key_exists($wp_minify_plugin, $plugins) && is_plugin_active($wp_minify_plugin)) {
448
+ global $wp_minify;
449
+
450
+ if (is_object($wp_minify) && array_key_exists('default_exclude', get_object_vars($wp_minify)) && is_array($wp_minify->default_exclude)) {
451
+ $wp_minify->default_exclude[] = 'ecwid.com/script.js';
452
+ }
453
+ }
454
+ }
455
+
456
+ function ecwid_check_version()
457
+ {
458
+ $plugin_data = get_plugin_data(__FILE__);
459
+ $current_version = $plugin_data['Version'];
460
+ $stored_version = get_option('ecwid_plugin_version', null);
461
+
462
+ $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
463
+ if (is_null($migration_since_version)) {
464
+ update_option('ecwid_plugin_migration_since_version', $current_version);
465
+ }
466
+
467
+ $fresh_install = !$stored_version;
468
+ $upgrade = $stored_version && version_compare($current_version, $stored_version) > 0;
469
+
470
+ if ($fresh_install) {
471
+
472
+ ecwid_plugin_add_oauth();
473
+ do_action('ecwid_plugin_installed', $current_version);
474
+ add_option('ecwid_plugin_version', $current_version);
475
+
476
+ update_option('ecwid_use_chameleon', true);
477
+
478
+ add_option('ecwid_use_new_horizontal_categories', 'Y');
479
+ add_option('ecwid_use_new_search', 'Y');
480
+
481
+ } elseif ($upgrade) {
482
+
483
+ ecwid_plugin_add_oauth();
484
+ do_action('ecwid_plugin_upgraded', array( 'old' => $stored_version, 'new' => $current_version ) );
485
+ update_option('ecwid_plugin_version', $current_version);
486
+
487
+ add_option('ecwid_use_new_horizontal_categories', '');
488
+ add_option('ecwid_use_new_search', '');
489
+ }
490
+
491
+ if ($fresh_install || $upgrade || @$_GET['ecwid_reinit']) {
492
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
493
+ add_option('ecwid_fetch_url_use_file_get_contents', '');
494
+ add_option('ecwid_remote_get_timeout', '5');
495
+ }
496
+
497
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.1.3')) {
498
+ add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
499
+ }
500
+
501
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.4.5')) {
502
+ add_option('ecwid_enable_sso');
503
+ }
504
+
505
+
506
+ add_option('ecwid_chameleon_colors_foreground', '');
507
+ add_option('ecwid_chameleon_colors_background', '');
508
+ add_option('ecwid_chameleon_colors_link', '');
509
+ add_option('ecwid_chameleon_colors_button', '');
510
+ add_option('ecwid_chameleon_colors_price', '');
511
+ }
512
+ }
513
+
514
+ function ecwid_get_woocommerce_status() {
515
+
516
+ $woo = EcwidPlatform::cache_get('woo_status');
517
+
518
+ if (is_null($woo)) {
519
+ $woo = 0;
520
+ $all_plugins = get_plugins();
521
+ if (array_key_exists('woocommerce/woocommerce.php', $all_plugins)) {
522
+ $active_plugins = get_option('active_plugins');
523
+ if (in_array('woocommerce/woocommerce.php', $active_plugins)) {
524
+ $woo = 2;
525
+ } else {
526
+ $woo = 1;
527
+ }
528
+ }
529
+ EcwidPlatform::cache_set('woo_status', $woo, 60 * 60 * 24);
530
+ }
531
+
532
+ return $woo;
533
+ }
534
+
535
+ function ecwid_migrations_is_original_plugin_version_older_than($version)
536
+ {
537
+ $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
538
+ return version_compare($migration_since_version, $version) < 0;
539
+ }
540
+
541
+ function ecwid_log_error($message)
542
+ {
543
+ $errors = get_option('ecwid_error_log');
544
+ if (!$errors) {
545
+ $errors = array();
546
+ } else {
547
+ $errors = json_decode($errors);
548
+ if (!is_array($errors)) {
549
+ $errors = array();
550
+ }
551
+ }
552
+
553
+ while (count($errors) > 10) {
554
+ array_shift($errors);
555
+ }
556
+
557
+ $errors[] = array(
558
+ 'message' => $message,
559
+ 'date' => strftime('%c')
560
+ );
561
+
562
+ update_option('ecwid_error_log', json_encode($errors));
563
+ }
564
+
565
+ function ecwid_get_last_logged_error()
566
+ {
567
+
568
+
569
+ return '';
570
+ }
571
+
572
+ function ecwid_plugin_add_oauth()
573
+ {
574
+ add_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
575
+ add_option('ecwid_oauth_client_secret', 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8');
576
+
577
+ update_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
578
+ update_option('ecwid_oauth_client_secret', 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8');
579
+ }
580
+
581
+ function ecwid_override_option($name, $new_value = null)
582
+ {
583
+ static $overridden = array();
584
+
585
+ if (!array_key_exists($name, $overridden)) {
586
+ $overridden[$name] = get_option($name);
587
+ }
588
+
589
+ if (!is_null($new_value)) {
590
+ update_option($name, $new_value);
591
+ } else {
592
+ update_option($name, $overridden[$name]);
593
+ }
594
+ }
595
+ function ecwid_tinymce_init($in)
596
+ {
597
+ if(!empty($in['extended_valid_elements'])) {
598
+ $in['extended_valid_elements'] .= ',';
599
+ } else {
600
+ $in['extended_valid_elements'] = '';
601
+ }
602
+
603
+ $in['extended_valid_elements'] .= '@[id|class|style|title|itemscope|itemtype|itemprop|customprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]';
604
+
605
+ return $in;
606
+ }
607
+
608
+ function ecwid_seo_ultimate_compatibility()
609
+ {
610
+ global $seo_ultimate;
611
+
612
+ if ($seo_ultimate && ecwid_page_has_productbrowser()) {
613
+ remove_action('template_redirect', array($seo_ultimate->modules['titles'], 'before_header'), 0);
614
+ remove_action('wp_head', array($seo_ultimate->modules['titles'], 'after_header'), 1000);
615
+ remove_action('su_head', array($seo_ultimate->modules['meta-descriptions'], 'head_tag_output'));
616
+ remove_action('su_head', array($seo_ultimate->modules['canonical'], 'link_rel_canonical_tag'));
617
+ remove_action('su_head', array($seo_ultimate->modules['canonical'], 'http_link_rel_canonical'));
618
+ }
619
+ }
620
+
621
+ function ecwid_remove_default_canonical()
622
+ {
623
+ if (array_key_exists('_escaped_fragment_', $_GET) && ecwid_page_has_productbrowser()) {
624
+ remove_action( 'wp_head','rel_canonical');
625
+ }
626
+ }
627
+
628
+ function ecwid_seo_compatibility_init($title)
629
+ {
630
+ if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
631
+ return $title;
632
+ }
633
+
634
+ // Platinum SEO Pack
635
+ // Canonical
636
+ ecwid_override_option('psp_canonical', false);
637
+ // Title
638
+ ecwid_override_option('aiosp_rewrite_titles', false);
639
+
640
+ add_action('amt_basic_metadata_head', 'ecwid_amt_remove_description');
641
+ return $title;
642
+
643
+ }
644
+
645
+ function ecwid_amt_remove_description($params)
646
+ {
647
+ foreach ($params as $key => $value) {
648
+ if (preg_match('/meta name="description"/', $value)) {
649
+ unset ($params[$key]);
650
+ }
651
+ }
652
+
653
+ return $params;
654
+ }
655
+
656
+ function ecwid_seo_compatibility_restore()
657
+ {
658
+ if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
659
+ return;
660
+ }
661
+
662
+ ecwid_override_option('psp_canonical');
663
+ ecwid_override_option('aiosp_rewrite_titles');
664
+ }
665
+
666
+ function add_ecwid_admin_bar_node() {
667
+ global $wp_admin_bar;
668
+
669
+ if ( !is_super_admin() || !is_admin_bar_showing() )
670
+ return;
671
+
672
+ $theme = ecwid_get_theme_name();
673
+ $store_url = ecwid_get_store_page_url();
674
+
675
+
676
+ if (!is_admin()) {
677
+ $subject = sprintf(__('Ecwid plugin doesn\'t work well with my "%s" theme', 'ecwid-shopping-cart'), $theme);
678
+ $body = <<<TEXT
679
+ Hey Ecwid,
680
+
681
+ My store looks bad with my theme on Wordpress.
682
+
683
+ The theme title is %s.
684
+ The store URL is %s
685
+
686
+ Can you have a look?
687
+
688
+ Thanks.
689
+ TEXT;
690
+ } else {
691
+ $subject = __('I have a problem with my Ecwid store', 'ecwid-shopping-cart');
692
+ $body = <<<TEXT
693
+ Hey Ecwid,
694
+
695
+ I have a problem with my Ecwid store.
696
+
697
+ [Please provide details here]
698
+
699
+ The theme title is %s.
700
+ The store URL is %
701
+
702
+ Can you have a look?
703
+
704
+ Thanks.
705
+ TEXT;
706
+ }
707
+
708
+ $body = __($body, 'ecwid-shopping-cart');
709
+ $body = sprintf($body, $theme, $store_url);
710
+
711
+ $wp_admin_bar->add_menu( array(
712
+ 'id' => 'ecwid-main',
713
+ 'title' => '<span class="ab-icon ecwid-top-menu-item"></span>',
714
+ 'href' => admin_url('admin.php?page=ecwid'),
715
+ ));
716
+
717
+ $wp_admin_bar->add_menu(array(
718
+ "id" => "ecwid-go-to-page",
719
+ "title" => __("Visit storefront", 'ecwid-shopping-cart'),
720
+ "parent" => "ecwid-main",
721
+ 'href' => ecwid_get_store_page_url()
722
+ )
723
+ );
724
+
725
+ $wp_admin_bar->add_menu(array(
726
+ "id" => "ecwid-control-panel",
727
+ "title" => __("Manage my store", 'ecwid-shopping-cart'),
728
+ "parent" => "ecwid-main",
729
+ 'href' => admin_url('admin.php?page=ecwid')
730
+ )
731
+ );
732
+
733
+ $wp_admin_bar->add_menu(array(
734
+ "id" => "ecwid-faq",
735
+ "title" => __("Read FAQ", 'ecwid-shopping-cart'),
736
+ "parent" => "ecwid-main",
737
+ 'href' => __('https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-', 'ecwid-shopping-cart'),
738
+ 'meta' => array(
739
+ 'target' => '_blank'
740
+ )
741
+ )
742
+ );
743
+
744
+ $wp_admin_bar->add_menu(array(
745
+ 'id' => 'ecwid-report-problem',
746
+ 'title' => __( 'Report a problem with the store', 'ecwid-shopping-cart' ),
747
+ 'parent' => 'ecwid-main',
748
+ 'href' => 'mailto:wordpress@ecwid.com?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($body),
749
+ 'meta' => array(
750
+ 'target' => '_blank'
751
+ )
752
+ ));
753
+ }
754
+
755
+ function ecwid_content_has_productbrowser($content) {
756
+
757
+ $result = has_shortcode($content, 'ecwid_productbrowser');
758
+
759
+ if (!$result && has_shortcode($content, 'ecwid')) {
760
+ $shortcodes = ecwid_find_shortcodes($content, 'ecwid');
761
+ if ($shortcodes) foreach ($shortcodes as $shortcode) {
762
+
763
+ $attributes = shortcode_parse_atts($shortcode[3]);
764
+
765
+ if (isset($attributes['widgets'])) {
766
+ $widgets = preg_split('![^0-9^a-z^A-Z^-^_]!', $attributes['widgets']);
767
+ if (is_array($widgets) && in_array('productbrowser', $widgets)) {
768
+ $result = true;
769
+ }
770
+ }
771
+ }
772
+ }
773
+
774
+ return $result;
775
+ }
776
+
777
+ function ecwid_page_has_productbrowser($post_id = null)
778
+ {
779
+ static $results = null;
780
+
781
+ if (is_null($post_id)) {
782
+ if (is_admin()) return;
783
+ $post_id = get_the_ID();
784
+ }
785
+
786
+ if (!isset($results[$post_id])) {
787
+ $post = get_post($post_id);
788
+
789
+ if ($post) {
790
+ $post_content = get_post($post_id)->post_content;
791
+
792
+ $results[$post_id] = ecwid_content_has_productbrowser($post_content);
793
+ $results[$post_id] = apply_filters( 'ecwid_page_has_product_browser', $results[$post_id] );
794
+ }
795
+ }
796
+
797
+ return $results[$post_id];
798
+ }
799
+
800
+ function ecwid_ajax_crawling_fragment() {
801
+ if (ecwid_is_api_enabled() && !isset($_GET['_escaped_fragment_']) && ecwid_page_has_productbrowser())
802
+ echo '<meta name="fragment" content="!">' . PHP_EOL;
803
+ }
804
+
805
+ function ecwid_meta() {
806
+
807
+ echo '<link rel="dns-prefetch" href="//images-cdn.ecwid.com/">' . PHP_EOL;
808
+ echo '<link rel="dns-prefetch" href="//images.ecwid.com/">' . PHP_EOL;
809
+ echo '<link rel="dns-prefetch" href="//app.ecwid.com/">' . PHP_EOL;
810
+
811
+ if (!ecwid_page_has_productbrowser() && ecwid_is_store_page_available()) {
812
+ $page_url = ecwid_get_store_page_url();
813
+ echo '<link rel="prefetch" href="' . $page_url . '" />' . PHP_EOL;
814
+ echo '<link rel="prerender" href="' . $page_url . '" />' . PHP_EOL;
815
+ }
816
+ }
817
+
818
+ function ecwid_product_browser_url_in_head() {
819
+ echo ecwid_get_product_browser_url_script();
820
+ }
821
+
822
+
823
+ function ecwid_canonical() {
824
+
825
+ if (!ecwid_is_applicable_escaped_fragment()) {
826
+ return;
827
+ }
828
+
829
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
830
+
831
+ $api = ecwid_new_product_api();
832
+
833
+ if ($params['mode'] == 'product') {
834
+ $product = $api->get_product($params['id']);
835
+ $link = ecwid_get_product_url($product);
836
+ } else if ($params['mode'] == 'category') {
837
+ $category = $api->get_category($params['id']);
838
+ $link = ecwid_get_category_url($category);
839
+ }
840
+
841
+ echo '<link rel="canonical" href="' . esc_attr($link) . '" />' . PHP_EOL;
842
+ }
843
+
844
+ function ecwid_is_applicable_escaped_fragment() {
845
+
846
+ $allowed = ecwid_is_api_enabled() && isset($_GET['_escaped_fragment_']);
847
+ if (!$allowed) return false;
848
+
849
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
850
+ if (!$params) return false;
851
+
852
+ if (!in_array($params['mode'], array('category', 'product')) || !isset($params['id'])) return false;
853
+
854
+ return true;
855
+ }
856
+
857
+ function ecwid_meta_description() {
858
+
859
+ if (!ecwid_is_applicable_escaped_fragment()) {
860
+ return;
861
+ }
862
+
863
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
864
+ $api = ecwid_new_product_api();
865
+ if ($params['mode'] == 'product') {
866
+ $product = $api->get_product($params['id']);
867
+ $description = $product['description'];
868
+ } elseif ($params['mode'] == 'category') {
869
+ $category = $api->get_category($params['id']);
870
+ $description = $category['description'];
871
+ } else return;
872
+
873
+ $description = ecwid_trim_description($description);
874
+
875
+ echo <<<HTML
876
+ <meta name="description" content="$description" />
877
+ HTML;
878
+ }
879
+
880
+ function ecwid_trim_description($description)
881
+ {
882
+ $description = strip_tags($description);
883
+ $description = html_entity_decode($description, ENT_NOQUOTES, 'UTF-8');
884
+
885
+ $description = preg_replace('![\p{Z}\s]{1,}!u', ' ', $description);
886
+ $description = trim($description, " \t\xA0\n\r"); // Space, tab, non-breaking space, newline, carriage return
887
+ $description = mb_substr($description, 0, ECWID_TRIMMED_DESCRIPTION_LENGTH, 'UTF-8');
888
+ $description = htmlspecialchars($description, ENT_COMPAT, 'UTF-8');
889
+
890
+ return $description;
891
+ }
892
+
893
+
894
+ function ecwid_ajax_hide_message($params)
895
+ {
896
+ if (!current_user_can('manage_options')) {
897
+ return;
898
+ }
899
+
900
+ if (Ecwid_Message_Manager::disable_message($_GET['message'])) {
901
+ wp_send_json(array('status' => 'success'));
902
+ }
903
+ }
904
+
905
+ function ecwid_hide_vote_message()
906
+ {
907
+ update_option('ecwid_show_vote_message', false);
908
+ }
909
+
910
+ function ecwid_get_product_and_category($category_id, $product_id) {
911
+ $params = array
912
+ (
913
+ array("alias" => "c", "action" => "category", "params" => array("id" => $category_id)),
914
+ array("alias" => "p", "action" => "product", "params" => array("id" => $product_id)),
915
+ );
916
+
917
+ $api = ecwid_new_product_api();
918
+ $batch_result = $api->get_batch_request($params);
919
+
920
+ if (false == $batch_result) {
921
+ $product = $api->get_product($product_id);
922
+ $category = false;
923
+ } else {
924
+ $category = $batch_result["c"];
925
+ $product = $batch_result["p"];
926
+ }
927
+
928
+ $return = "";
929
+
930
+ if (is_array($product)) {
931
+ $return .=$product["name"];
932
+ }
933
+
934
+ if(is_array($category)) {
935
+ $return.=" | ";
936
+ $return .=$category["name"];
937
+ }
938
+ return $return;
939
+ }
940
+
941
+ function ecwid_get_title_separator()
942
+ {
943
+ $sep = apply_filters('document_title_separator', '|');
944
+
945
+ if (!empty($sep)) {
946
+ return $sep;
947
+ }
948
+
949
+ return apply_filters('ecwid_title_separator', '|');
950
+ }
951
+
952
+ function ecwid_seo_title($content) {
953
+
954
+ $title = _ecwid_get_seo_title();
955
+ if (!empty($title)) {
956
+ $sep = ecwid_get_title_separator();
957
+
958
+ return "$title $sep $content";
959
+ }
960
+
961
+ return $content;
962
+ }
963
+
964
+
965
+ function ecwid_seo_title_parts($parts)
966
+ {
967
+ $title = _ecwid_get_seo_title();
968
+ if ($title) {
969
+ array_unshift($parts, $title);
970
+ }
971
+
972
+ return $parts;
973
+ }
974
+
975
+ function _ecwid_get_seo_title()
976
+ {
977
+
978
+ if (!ecwid_is_applicable_escaped_fragment()) {
979
+ return;
980
+ }
981
+
982
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
983
+
984
+ $ecwid_seo_title = '';
985
+
986
+ $separator = ecwid_get_title_separator();
987
+
988
+ $api = ecwid_new_product_api();
989
+
990
+ if ( isset( $params['mode'] ) && ! empty( $params['mode'] ) ) {
991
+ if ( $params['mode'] == 'product' ) {
992
+ if ( isset( $params['category'] ) && ! empty( $params['category'] ) ) {
993
+ $ecwid_seo_title = ecwid_get_product_and_category( $params['category'], $params['id'] );
994
+ } elseif ( empty( $params['category'] ) ) {
995
+ $ecwid_product = $api->get_product( $params['id'] );
996
+ $ecwid_seo_title = $ecwid_product['name'];
997
+ if ( isset( $ecwid_product['categories'] ) && is_array( $ecwid_product['categories'] ) ) {
998
+ foreach ( $ecwid_product['categories'] as $ecwid_category ) {
999
+ if ( $ecwid_category['defaultCategory'] == true ) {
1000
+ $ecwid_seo_title .= ' ' . $separator . ' ';
1001
+ $ecwid_seo_title .= $ecwid_category['name'];
1002
+ }
1003
+ }
1004
+ }
1005
+ }
1006
+ } elseif ( $params['mode'] == 'category' ) {
1007
+ $api = ecwid_new_product_api();
1008
+ $ecwid_category = $api->get_category( $params['id'] );
1009
+ $ecwid_seo_title = $ecwid_category['name'];
1010
+ }
1011
+ }
1012
+
1013
+ if ( ! empty( $ecwid_seo_title ) ) {
1014
+ return $ecwid_seo_title;
1015
+ }
1016
+
1017
+ return "";
1018
+ }
1019
+
1020
+ function ecwid_add_credits($powered_by)
1021
+ {
1022
+ if (!ecwid_is_paid_account()) {
1023
+
1024
+ $new_powered_by = '<li>';
1025
+ $new_powered_by .= sprintf(
1026
+ __('<a %s>Online store powered by Ecwid</a>', 'ecwid-shopping-cart'),
1027
+ 'target="_blank" href="//www.ecwid.com?source=wporg-metalink"'
1028
+ );
1029
+ $new_powered_by .= '</li>';
1030
+
1031
+ $powered_by .= $new_powered_by;
1032
+ }
1033
+
1034
+ return $powered_by;
1035
+ }
1036
+
1037
+ function ecwid_content_started($content)
1038
+ {
1039
+ global $ecwid_script_rendered;
1040
+
1041
+ $ecwid_script_rendered = false;
1042
+
1043
+ return $content;
1044
+ }
1045
+
1046
+ function ecwid_wrap_shortcode_content($content, $name, $attrs)
1047
+ {
1048
+ $version = get_option('ecwid_plugin_version');
1049
+
1050
+ $shortcode_content = ecwid_get_scriptjs_code(@$attrs['lang']);
1051
+
1052
+ if ($name == 'product2') {
1053
+ $shortcode_content .= $content;
1054
+ } else {
1055
+ $shortcode_content .= "<div class=\"ecwid-shopping-cart-$name\">$content</div>";
1056
+ }
1057
+
1058
+ $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
1059
+ . $shortcode_content
1060
+ . "<!-- END Ecwid Shopping Cart v $version -->";
1061
+
1062
+ return apply_filters('ecwid_shortcode_content', $shortcode_content);
1063
+ }
1064
+
1065
+ function ecwid_get_scriptjs_code($force_lang = null) {
1066
+ global $ecwid_script_rendered;
1067
+
1068
+ if (!$ecwid_script_rendered) {
1069
+ $store_id = get_ecwid_store_id();
1070
+ $force_lang_str = !empty($force_lang) ? "&lang=$force_lang" : '';
1071
+ $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
1072
+ $s = $s . ecwid_sso();
1073
+ $s .= '<script type="text/javascript">if (jQuery && jQuery.mobile) { jQuery.mobile.hashListeningEnabled = false; jQuery.mobile.pushStateEnabled=false; }</script>';
1074
+ $ecwid_script_rendered = true;
1075
+
1076
+ return $s;
1077
+ } else {
1078
+ return '';
1079
+ }
1080
+ }
1081
+
1082
+ function ecwid_script_shortcode($params) {
1083
+
1084
+ $attributes = shortcode_atts(
1085
+ array(
1086
+ 'lang' => null
1087
+ ), $params
1088
+ );
1089
+
1090
+ $content = "";
1091
+ if (!is_null($attributes['lang'])) {
1092
+ $content = ecwid_get_scriptjs_code($attributes['lang']);
1093
+ }
1094
+
1095
+ return ecwid_wrap_shortcode_content($content, 'script', $params);
1096
+ }
1097
+
1098
+ function ecwid_minicart_shortcode($attributes) {
1099
+
1100
+ $shortcode = new Ecwid_Shortcode_Minicart($attributes);
1101
+
1102
+ return $shortcode->render();
1103
+ }
1104
+
1105
+ function ecwid_get_search_js_code() {
1106
+ if (get_option('ecwid_use_new_search', false)) {
1107
+ return 'xSearch("style=");';
1108
+ } else {
1109
+ return 'xSearchPanel("style=")';
1110
+ }
1111
+ }
1112
+
1113
+ function ecwid_searchbox_shortcode($attributes) {
1114
+
1115
+ $shortcode = new Ecwid_Shortcode_Search($attributes);
1116
+
1117
+ return $shortcode->render();
1118
+ }
1119
+
1120
+ function ecwid_categories_shortcode($attributes) {
1121
+
1122
+
1123
+ $shortcode = new Ecwid_Shortcode_Categories($attributes);
1124
+
1125
+ return $shortcode->render();
1126
+ }
1127
+
1128
+
1129
+ function ecwid_productbrowser_shortcode($shortcode_params) {
1130
+
1131
+ $shortcode = new Ecwid_Shortcode_ProductBrowser($shortcode_params);
1132
+
1133
+ return $shortcode->render();
1134
+ }
1135
+
1136
+ function _ecwid_get_single_product_widget_parts_v1($attributes) {
1137
+ return array(
1138
+ 'display_items' => array(
1139
+ 'picture' => '<div itemprop="picture"></div>',
1140
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1141
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1142
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
1143
+ . '</div>',
1144
+ 'options' => '<div itemprop="options"></div>',
1145
+ 'qty' => '<div itemprop="qty"></div>',
1146
+ 'addtobag' => '<div itemprop="addtobag"></div>'
1147
+ ),
1148
+ 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
1149
+ . 'itemscope itemtype="http://schema.org/Product" '
1150
+ . 'data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1151
+ 'widget_call' => '<script data-cfasync="false" type="text/javascript">xSingleProduct()</script>'
1152
+ );
1153
+ }
1154
+
1155
+ function _ecwid_get_single_product_widget_parts_v2($attributes) {
1156
+
1157
+ $price_location_attributes = ' data-spw-price-location="button"';
1158
+ $bordered_class = ' ecwid-SingleProduct-v2-bordered';
1159
+ if ($attributes['show_border'] == 0) {
1160
+ $bordered_class = '';
1161
+ }
1162
+
1163
+ if ($attributes['show_price_on_button'] == 0) {
1164
+ $price_location_attributes = '';
1165
+ }
1166
+
1167
+ return array(
1168
+ 'display_items' => array(
1169
+ 'picture' => '<div itemprop="picture"></div>',
1170
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1171
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1172
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"' . $price_location_attributes . '>'
1173
+ . '<div itemprop="priceCurrency"></div>'
1174
+ . '</div>'
1175
+ . '</div>',
1176
+ 'options' => '<div customprop="options"></div>',
1177
+ 'qty' => '<div customprop="qty"></div>',
1178
+ 'addtobag' => '<div customprop="addtobag"></div>'
1179
+ ),
1180
+ 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct-v2' . $bordered_class . ' ecwid-Product ecwid-Product-%d"'
1181
+ . 'itemscope itemtype="http://schema.org/Product" data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1182
+ 'widget_call' => '<script data-cfasync="false" type="text/javascript">xProduct()</script>'
1183
+ );
1184
+ }
1185
+
1186
+
1187
+ function ecwid_install_theme() {
1188
+ if ( ! class_exists( 'Theme_Upgrader', false ) ) {
1189
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1190
+ }
1191
+
1192
+ wp_enqueue_script( 'customize-loader' );
1193
+
1194
+ $title = __('Install Themes');
1195
+ $parent_file = 'themes.php';
1196
+ $submenu_file = 'themes.php';
1197
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
1198
+
1199
+ $upgrader = new Theme_Upgrader( );
1200
+ $result = $upgrader->install("https://plugins.ecwid.com/files/ecwid-ecommerce.zip");
1201
+
1202
+ if ( !$result || is_wp_error($result) ) {
1203
+ echo '<a href="javascript:history.back()">' . __('Back') . '</a>';
1204
+ } else {
1205
+ _e( 'Preparing theme preview...', 'ecwid-shopping-cart' );
1206
+ echo '<script type="text/javascript">location.href="themes.php?theme=ecwid-ecommerce";</script>';
1207
+
1208
+ Ecwid_Message_Manager::disable_message( 'install_ecwid_theme' );
1209
+ }
1210
+
1211
+ include(ABSPATH . 'wp-admin/admin-footer.php');
1212
+ }
1213
+
1214
+ function ecwid_shortcode($attributes)
1215
+ {
1216
+ $defaults = ecwid_get_default_pb_size();
1217
+
1218
+ $attributes = shortcode_atts(
1219
+ array(
1220
+ 'widgets' => 'productbrowser',
1221
+ 'categories_per_row' => '3',
1222
+ 'category_view' => 'grid',
1223
+ 'search_view' => 'grid',
1224
+ 'grid' => $defaults['grid_rows'] . ',' . $defaults['grid_columns'],
1225
+ 'list' => $defaults['list_rows'],
1226
+ 'table' => $defaults['table_rows'],
1227
+ 'minicart_layout' => 'MiniAttachToProductBrowser',
1228
+ 'default_category_id' => 0,
1229
+ 'lang' => ''
1230
+ )
1231
+ , $attributes
1232
+ );
1233
+
1234
+ $allowed_widgets = array('productbrowser', 'search', 'categories', 'minicart');
1235
+ $widgets = preg_split('![^0-9^a-z^A-Z^-^_]!', $attributes['widgets']);
1236
+ foreach ($widgets as $key => $widget) {
1237
+ if (!in_array($widget, $allowed_widgets)) {
1238
+ unset($widgets[$key]);
1239
+ }
1240
+ }
1241
+
1242
+ if (empty($widgets)) {
1243
+ $widgets = array('productbrowser');
1244
+ }
1245
+
1246
+ $attributes['layout'] = $attributes['minicart_layout'];
1247
+ $attributes['is_ecwid_shortcode'] = true;
1248
+
1249
+ $result = '';
1250
+
1251
+ $widgets_order = array('minicart', 'search', 'categories', 'productbrowser');
1252
+ foreach ($widgets_order as $widget) {
1253
+ if (in_array($widget, $widgets)) {
1254
+ if ( class_exists( 'Ecwid_Shortcode_' . $widget ) ) {
1255
+
1256
+ $class = 'Ecwid_Shortcode_' . $widget;
1257
+
1258
+ $shortcode = new $class($attributes);
1259
+
1260
+ $result .= $shortcode->render();
1261
+ } else {
1262
+ $result .= call_user_func_array( 'ecwid_' . $widget . '_shortcode', array( $attributes ) );
1263
+ }
1264
+ }
1265
+ }
1266
+
1267
+ update_option('ecwid_store_shortcode_used', time());
1268
+
1269
+ return $result;
1270
+ }
1271
+
1272
+ function ecwid_parse_escaped_fragment($escaped_fragment) {
1273
+ static $parsed = array();
1274
+
1275
+ if (empty($parsed[$escaped_fragment])) {
1276
+
1277
+ $fragment = urldecode( $escaped_fragment );
1278
+ $return = array();
1279
+
1280
+ if ( preg_match( '/^(\/~\/)([a-z]+)\/(.*)$/', $fragment, $matches ) ) {
1281
+ parse_str( $matches[3], $return );
1282
+ $return['mode'] = $matches[2];
1283
+ } elseif ( preg_match( '!.*/(p|c)/([0-9]*)!', $fragment, $matches ) ) {
1284
+ if ( count( $matches ) == 3 && in_array( $matches[1], array( 'p', 'c' ) ) ) {
1285
+ $return = array(
1286
+ 'mode' => 'p' == $matches[1] ? 'product' : 'category',
1287
+ 'id' => $matches[2]
1288
+ );
1289
+ }
1290
+ }
1291
+
1292
+ $parsed[$escaped_fragment] = $return;
1293
+ }
1294
+
1295
+ return $parsed[$escaped_fragment];
1296
+ }
1297
+
1298
+ function ecwid_ajax_get_product_info() {
1299
+ $id = $_GET['id'];
1300
+
1301
+ if (ecwid_is_api_enabled()) {
1302
+ $api = ecwid_new_product_api();
1303
+ $product = $api->get_product_https($id);
1304
+
1305
+ echo json_encode($product);
1306
+ }
1307
+
1308
+ exit();
1309
+ }
1310
+
1311
+ function ecwid_store_activate() {
1312
+
1313
+ $my_post = array();
1314
+ $defaults = ecwid_get_default_pb_size();
1315
+ $content = <<<EOT
1316
+ [ecwid widgets="productbrowser minicart categories search" grid="$defaults[grid_rows],$defaults[grid_columns]" list="$defaults[list_rows]" table="$defaults[table_rows]" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]
1317
+ EOT;
1318
+ add_option("ecwid_store_page_id", '', '', 'yes');
1319
+ add_option("ecwid_store_page_id_auto", '', '', 'yes');
1320
+
1321
+ add_option("ecwid_store_id", ECWID_DEMO_STORE_ID, '', 'yes');
1322
+
1323
+ add_option("ecwid_enable_minicart", 'Y', '', 'yes');
1324
+ add_option("ecwid_show_categories", '', '', 'yes');
1325
+ add_option("ecwid_show_search_box", '', '', 'yes');
1326
+
1327
+ add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
1328
+
1329
+ add_option("ecwid_pb_productspercolumn_grid", $defaults['grid_rows'], '', 'yes');
1330
+ add_option("ecwid_pb_productsperrow_grid", $defaults['grid_columns'], '', 'yes');
1331
+ add_option("ecwid_pb_productsperpage_list", $defaults['list_rows'], '', 'yes');
1332
+ add_option("ecwid_pb_productsperpage_table", $defaults['table_rows'], '', 'yes');
1333
+
1334
+ add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
1335
+ add_option("ecwid_pb_searchview", 'list', '', 'yes');
1336
+
1337
+ add_option("ecwid_mobile_catalog_link", '', '', 'yes');
1338
+ add_option("ecwid_default_category_id", '', '', 'yes');
1339
+
1340
+ add_option('ecwid_is_api_enabled', 'on', '', 'yes');
1341
+ add_option('ecwid_api_check_time', 0, '', 'yes');
1342
+
1343
+ add_option('ecwid_show_vote_message', true);
1344
+
1345
+ add_option("ecwid_sso_secret_key", '', '', 'yes');
1346
+
1347
+ add_option("ecwid_installation_date", time());
1348
+
1349
+ add_option('ecwid_hide_appearance_menu', get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', '', 'yes');
1350
+
1351
+ /* All new options should go to check_version thing */
1352
+
1353
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
1354
+
1355
+ $id = get_option("ecwid_store_page_id");
1356
+ $_tmp_page = null;
1357
+ if (!empty($id) and ($id > 0)) {
1358
+ $_tmp_page = get_post($id);
1359
+ }
1360
+ if (is_null($_tmp_page)) {
1361
+ $id = get_option('ecwid_store_page_id_auto');
1362
+
1363
+ if (!empty($id) and ($id > 0)) {
1364
+ $_tmp_page = get_post($id);
1365
+ }
1366
+ }
1367
+ if ($_tmp_page !== null) {
1368
+ $my_post = array();
1369
+ $my_post['ID'] = $id;
1370
+ $my_post['post_status'] = 'publish';
1371
+ wp_update_post( $my_post );
1372
+
1373
+ if ($id == get_option('ecwid_store_page_id_auto')) {
1374
+ update_option('ecwid_store_page_id', $id);
1375
+ }
1376
+
1377
+ } else {
1378
+
1379
+ ecwid_load_textdomain();
1380
+ $my_post['post_title'] = __('Store', 'ecwid-shopping-cart');
1381
+ $my_post['post_content'] = $content;
1382
+ $my_post['post_status'] = 'publish';
1383
+ $my_post['post_author'] = 1;
1384
+ $my_post['post_type'] = 'page';
1385
+ $my_post['comment_status'] = 'closed';
1386
+ $id = wp_insert_post( $my_post );
1387
+ update_option('ecwid_store_page_id', $id);
1388
+
1389
+ Ecwid_Nav_Menus::replace_auto_added_menu();
1390
+
1391
+ if (ecwid_get_theme_identification() == 'responsive') {
1392
+ update_post_meta($id, '_wp_page_template', 'full-width-page.php');
1393
+ update_option("ecwid_show_search_box", 'Y');
1394
+ }
1395
+ }
1396
+
1397
+ Ecwid_Nav_Menus::add_menu_on_activate();
1398
+
1399
+ Ecwid_Message_Manager::enable_message('on_activate');
1400
+ }
1401
+
1402
+ add_action('in_admin_header', 'ecwid_disable_other_notices');
1403
+ function ecwid_disable_other_notices() {
1404
+
1405
+ $pages = array('toplevel_page_ecwid', 'admin_page_ecwid-help', 'admin_page-ecwid-install-theme');
1406
+
1407
+ if (!in_array(get_current_screen()->base, $pages)) return;
1408
+
1409
+
1410
+ global $wp_filter;
1411
+
1412
+ if (!$wp_filter || !isset($wp_filter['admin_notices']) || !class_exists('WP_Hook') || ! ( $wp_filter['admin_notices'] instanceof WP_Hook) ) {
1413
+ return;
1414
+ }
1415
+
1416
+ foreach ($wp_filter['admin_notices']->callbacks as $priority => $collection) {
1417
+ foreach ($collection as $name => $item) {
1418
+ if ($name != 'ecwid_show_admin_messages') {
1419
+ remove_action('admin_notices', $item['function'], $priority);
1420
+ }
1421
+ }
1422
+ }
1423
+ }
1424
+
1425
+ function ecwid_show_admin_messages() {
1426
+ if (is_admin()) {
1427
+ Ecwid_Message_Manager::show_messages();
1428
+ }
1429
+ }
1430
+
1431
+ function ecwid_show_admin_message($message) {
1432
+
1433
+ $class = version_compare(get_bloginfo('version'), '3.0') < 0 ? "updated fade" : "update-nag";
1434
+ echo sprintf('<div class="%s" style="margin-top: 5px">%s</div>', $class, $message);
1435
+ }
1436
+
1437
+ function ecwid_store_deactivate() {
1438
+ $ecwid_page_id = get_option("ecwid_store_page_id");
1439
+ $_tmp_page = null;
1440
+ if (!empty($ecwid_page_id) and ($ecwid_page_id > 0)) {
1441
+ $_tmp_page = get_page($ecwid_page_id);
1442
+ if ($_tmp_page !== null) {
1443
+ $my_post = array();
1444
+ $my_post['ID'] = $ecwid_page_id;
1445
+ $my_post['post_status'] = 'draft';
1446
+ wp_update_post( $my_post );
1447
+ } else {
1448
+ update_option('ecwid_store_page_id', '');
1449
+ }
1450
+ }
1451
+
1452
+ Ecwid_Message_Manager::reset_hidden_messages();
1453
+ }
1454
+
1455
+ function ecwid_uninstall() {
1456
+ delete_option("ecwid_store_page_id_auto");
1457
+ delete_option("ecwid_store_id");
1458
+ delete_option("ecwid_enable_minicart");
1459
+ delete_option("ecwid_show_categories");
1460
+ delete_option("ecwid_show_search_box");
1461
+ delete_option("ecwid_pb_categoriesperrow");
1462
+ delete_option("ecwid_pb_productspercolumn_grid");
1463
+ delete_option("ecwid_pb_productsperrow_grid");
1464
+ delete_option("ecwid_pb_productsperpage_list");
1465
+ delete_option("ecwid_pb_productsperpage_table");
1466
+ delete_option("ecwid_pb_defaultview");
1467
+ delete_option("ecwid_pb_searchview");
1468
+ delete_option("ecwid_mobile_catalog_link");
1469
+ delete_option("ecwid_default_category_id");
1470
+ delete_option('ecwid_is_api_enabled');
1471
+ delete_option('ecwid_api_check_time');
1472
+ delete_option('ecwid_show_vote_message');
1473
+ delete_option("ecwid_sso_secret_key");
1474
+ delete_option("ecwid_installation_date");
1475
+ delete_option('ecwid_hide_appearance_menu');
1476
+
1477
+ delete_option("ecwid_plugin_version");
1478
+ delete_option("ecwid_use_chameleon");
1479
+ }
1480
+
1481
+ function ecwid_is_old_search_widget_used()
1482
+ {
1483
+ if (get_option('ecwid_use_new_search')) {
1484
+ return false;
1485
+ }
1486
+
1487
+ if (Ecwid_Widget_Search::is_active_widget()) {
1488
+ return true;
1489
+ }
1490
+
1491
+ $widgets = ecwid_get_store_shortcode_widgets();
1492
+ if ($widgets && in_array('search', $widgets)) {
1493
+ return true;
1494
+ }
1495
+
1496
+ $post = get_post(ecwid_get_current_store_page_id());
1497
+ if ($post && !is_wp_error($post)) {
1498
+
1499
+ $shortcodes = ecwid_find_shortcodes( $post->post_content, 'ecwid_search' );
1500
+
1501
+ if ( $shortcodes ) {
1502
+ return TRUE;
1503
+ }
1504
+ }
1505
+
1506
+ return false;
1507
+ }
1508
+
1509
+ function ecwid_is_old_cats_widget_used()
1510
+ {
1511
+ if (get_option('ecwid_use_new_horizontal_categories')) {
1512
+ return false;
1513
+ }
1514
+
1515
+ $widgets = ecwid_get_store_shortcode_widgets();
1516
+ if ($widgets && in_array('categories', $widgets)) {
1517
+ return true;
1518
+ }
1519
+
1520
+ $post = get_post(ecwid_get_current_store_page_id());
1521
+ if ($post && !is_wp_error($post)) {
1522
+ $shortcodes = ecwid_find_shortcodes( $post->post_content, 'ecwid_categories');
1523
+
1524
+ if ($shortcodes) return true;
1525
+ }
1526
+
1527
+ return false;
1528
+ }
1529
+
1530
+
1531
+ function ecwid_get_store_shortcode_widgets()
1532
+ {
1533
+ if (get_option('ecwid_use_new_horizontal_categories') && get_option('ecwid_use_new_search')) return false;
1534
+
1535
+ $page_contents = get_post(ecwid_get_current_store_page_id())->post_content;
1536
+ $shortcodes = ecwid_find_shortcodes($page_contents, 'ecwid');
1537
+ if (!$shortcodes) {
1538
+ return null;
1539
+ }
1540
+
1541
+ $shortcode = $shortcodes[0];
1542
+ $attributes = shortcode_parse_atts($shortcode[3]);
1543
+
1544
+ if (!isset($attributes['widgets'])) {
1545
+ return null;
1546
+ }
1547
+
1548
+ return explode(' ', $attributes['widgets']);
1549
+ }
1550
+
1551
+ function ecwid_abs_intval($value) {
1552
+ if (!is_null($value))
1553
+ return abs(intval($value));
1554
+ else
1555
+ return null;
1556
+ }
1557
+
1558
+ function ecwid_build_menu() {
1559
+
1560
+ $is_newbie = get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
1561
+
1562
+ add_menu_page(
1563
+ __('Ecwid shopping cart settings', 'ecwid-shopping-cart'),
1564
+ __('Ecwid Store', 'ecwid-shopping-cart'),
1565
+ 'manage_options',
1566
+ 'ecwid',
1567
+ 'ecwid_general_settings_do_page',
1568
+ '',
1569
+ '2.562347345'
1570
+ );
1571
+
1572
+ if ($is_newbie) {
1573
+ $title = __('Setup', 'ecwid-shopping-cart');
1574
+ } else {
1575
+ $title = __('Dashboard', 'ecwid-shopping-cart');
1576
+ }
1577
+ add_submenu_page(
1578
+ 'ecwid',
1579
+ $title,
1580
+ $title,
1581
+ 'manage_options',
1582
+ 'ecwid',
1583
+ 'ecwid_general_settings_do_page'
1584
+ );
1585
+
1586
+ global $ecwid_oauth;
1587
+ if (!$is_newbie && $ecwid_oauth->has_scope( 'allow_sso' )) {
1588
+ add_submenu_page(
1589
+ 'ecwid',
1590
+ __('Sales', 'ecwid-shopping-cart'),
1591
+ __('Sales', 'ecwid-shopping-cart'),
1592
+ 'manage_options',
1593
+ 'ecwid-admin-orders',
1594
+ 'ecwid_admin_orders_do_page'
1595
+ );
1596
+
1597
+
1598
+ add_submenu_page(
1599
+ 'ecwid',
1600
+ __('Products', 'ecwid-shopping-cart'),
1601
+ __('Products', 'ecwid-shopping-cart'),
1602
+ 'manage_options',
1603
+ 'ecwid-admin-products',
1604
+ 'ecwid_admin_products_do_page'
1605
+ );
1606
+ }
1607
+ if (get_option('ecwid_hide_appearance_menu') != 'Y') {
1608
+ add_submenu_page(
1609
+ 'ecwid',
1610
+ __('Appearance settings', 'ecwid-shopping-cart'),
1611
+ __('Appearance', 'ecwid-shopping-cart'),
1612
+ 'manage_options',
1613
+ 'ecwid-appearance',
1614
+ 'ecwid_appearance_settings_do_page'
1615
+ );
1616
+ }
1617
+
1618
+ if (!$is_newbie || (isset($_GET['page']) && $_GET['page'] == 'ecwid-advanced')) {
1619
+ add_submenu_page(
1620
+ 'ecwid',
1621
+ __('Advanced settings', 'ecwid-shopping-cart'),
1622
+ __('Advanced', 'ecwid-shopping-cart'),
1623
+ 'manage_options',
1624
+ 'ecwid-advanced',
1625
+ 'ecwid_advanced_settings_do_page'
1626
+ );
1627
+ }
1628
+
1629
+ add_submenu_page('', 'Ecwid debug', '', 'manage_options', 'ecwid_debug', 'ecwid_debug_do_page');
1630
+ add_submenu_page('', 'Ecwid get mobile app', '', 'manage_options', 'ecwid-admin-mobile', 'ecwid_admin_mobile_do_page');
1631
+ add_submenu_page(
1632
+ 'ecwid',
1633
+ __('Help', 'ecwid-shopping-cart'),
1634
+ __('Help', 'ecwid-shopping-cart'),
1635
+ 'manage_options', 'ecwid-help', 'ecwid_help_do_page'
1636
+ );
1637
+ add_submenu_page('', 'Install ecwid theme', '', 'manage_options', 'ecwid-install-theme', 'ecwid_install_theme');
1638
+ }
1639
+
1640
+ function ecwid_get_categories($nocache = false) {
1641
+ $categories = EcwidPlatform::cache_get('all_categories');
1642
+
1643
+ if ( false == $categories || $nocache ) {
1644
+ $request = Ecwid_Http::create_get(
1645
+ 'get_categories_through_endpoint',
1646
+ ecwid_get_categories_js_url(),
1647
+ array( Ecwid_Http::POLICY_EXPECT_JSONP )
1648
+ );
1649
+
1650
+ if (!$request) {
1651
+ return false;
1652
+ }
1653
+
1654
+ $categories = $request->do_request();
1655
+
1656
+ if (!is_null($categories)) {
1657
+ EcwidPlatform::cache_set( 'all_categories', $categories, 60 * 60 * 2 );
1658
+ }
1659
+ }
1660
+
1661
+ return $categories;
1662
+ }
1663
+
1664
+ function ecwid_reset_categories_cache()
1665
+ {
1666
+ if (!current_user_can('manage_options')) {
1667
+ return;
1668
+ }
1669
+
1670
+ EcwidPlatform::cache_reset('all_categories');
1671
+ }
1672
+
1673
+ function ecwid_register_admin_styles($hook_suffix) {
1674
+
1675
+ wp_enqueue_style('ecwid-admin-css', ECWID_PLUGIN_URL . 'css/admin.css', array(), get_option('ecwid_plugin_version'));
1676
+ wp_enqueue_style('ecwid-fonts-css', ECWID_PLUGIN_URL . 'css/fonts.css', array(), get_option('ecwid_plugin_version'));
1677
+
1678
+
1679
+ if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
1680
+ wp_enqueue_style('ecwid-admin38-css', ECWID_PLUGIN_URL . 'css/admin.3.8.css', array('ecwid-admin-css'), get_option('ecwid_plugin_version'), 'all');
1681
+ }
1682
+
1683
+ if (isset($_GET['page']) && $_GET['page'] == 'ecwid') {
1684
+
1685
+ if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
1686
+ // Open dashboard for the first time, ecwid store id is set to demo => need landing styles/scripts
1687
+ wp_enqueue_script('ecwid-landing-js', ECWID_PLUGIN_URL . 'js/landing.js', array(), get_option('ecwid_plugin_version'));
1688
+ wp_localize_script('ecwid-landing-js', 'ecwidParams', array(
1689
+ 'registerLink' => ecwid_get_register_link()
1690
+ ));
1691
+ if (ecwid_use_old_landing()) {
1692
+ wp_enqueue_style('ecwid-landing-css', ECWID_PLUGIN_URL . 'css/landing_old.css', array(), get_option('ecwid_plugin_version'), 'all');
1693
+ } else {
1694
+ wp_enqueue_style('ecwid-landing-css', ECWID_PLUGIN_URL . 'css/landing.css', array(), get_option('ecwid_plugin_version'), 'all');
1695
+ }
1696
+ wp_enqueue_style('ecwid-landing-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300', array(), get_option('ecwid_plugin_version'));
1697
+ } else {
1698
+ // We already connected and disconnected the store, no need for fancy landing
1699
+ wp_enqueue_script('ecwid-connect-js', ECWID_PLUGIN_URL . 'js/dashboard.js', array(), get_option('ecwid_plugin_version'));
1700
+ }
1701
+ }
1702
+ }
1703
+
1704
+ function ecwid_register_settings_styles($hook_suffix) {
1705
+
1706
+ if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
1707
+
1708
+ wp_enqueue_style('ecwid-settings-css', ECWID_PLUGIN_URL . 'css/settings.css', array(), get_option('ecwid_plugin_version'), 'all');
1709
+
1710
+ if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
1711
+ wp_enqueue_style('ecwid-settings38-css', ECWID_PLUGIN_URL . 'css/settings.3.8.css', array('ecwid-settings-css'), '', 'all');
1712
+ }}
1713
+
1714
+ function ecwid_plugin_actions($links) {
1715
+ $settings_link = "<a href='admin.php?page=ecwid'>"
1716
+ . (get_ecwid_store_id() == ECWID_DEMO_STORE_ID ? __('Setup', 'ecwid-shopping-cart') : __('Settings') )
1717
+ . "</a>";
1718
+ array_unshift( $links, $settings_link );
1719
+
1720
+ return $links;
1721
+ }
1722
+
1723
+ function ecwid_settings_api_init() {
1724
+
1725
+ if ( isset( $_POST['settings_section'] ) ) {
1726
+ switch ( $_POST['settings_section'] ) {
1727
+ case 'appearance':
1728
+ register_setting( 'ecwid_options_page', 'ecwid_enable_minicart' );
1729
+
1730
+ register_setting( 'ecwid_options_page', 'ecwid_show_categories' );
1731
+ register_setting( 'ecwid_options_page', 'ecwid_show_search_box' );
1732
+
1733
+ register_setting( 'ecwid_options_page', 'ecwid_pb_categoriesperrow', 'ecwid_abs_intval' );
1734
+ register_setting( 'ecwid_options_page', 'ecwid_pb_productspercolumn_grid', 'ecwid_abs_intval' );
1735
+ register_setting( 'ecwid_options_page', 'ecwid_pb_productsperrow_grid', 'ecwid_abs_intval' );
1736
+ register_setting( 'ecwid_options_page', 'ecwid_pb_productsperpage_list', 'ecwid_abs_intval' );
1737
+ register_setting( 'ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval' );
1738
+ register_setting( 'ecwid_options_page', 'ecwid_pb_defaultview' );
1739
+ register_setting( 'ecwid_options_page', 'ecwid_pb_searchview' );
1740
+ break;
1741
+
1742
+ case 'general':
1743
+ register_setting( 'ecwid_options_page', 'ecwid_store_id', 'ecwid_abs_intval' );
1744
+ if ( isset( $_POST['ecwid_store_id'] ) && intval( $_POST['ecwid_store_id'] ) == 0 ) {
1745
+ Ecwid_Message_Manager::reset_hidden_messages();
1746
+ }
1747
+ break;
1748
+
1749
+ case 'advanced':
1750
+ register_setting( 'ecwid_options_page', 'ecwid_default_category_id', 'ecwid_abs_intval' );
1751
+ register_setting( 'ecwid_options_page', 'ecwid_sso_secret_key' );
1752
+ register_setting( 'ecwid_options_page', 'ecwid_use_chameleon' );
1753
+ register_setting( 'ecwid_options_page', 'ecwid_use_new_horizontal_categories' );
1754
+ register_setting( 'ecwid_options_page', 'ecwid_use_new_search' );
1755
+ register_setting( 'ecwid_options_page', 'ecwid_is_sso_enabled' );
1756
+ break;
1757
+ }
1758
+
1759
+ if ($_POST['settings_section'] == 'advanced' && !@$_POST['ecwid_is_sso_enabled']) {
1760
+ update_option('ecwid_sso_secret_key', '');
1761
+ }
1762
+ }
1763
+
1764
+ if (isset($_POST['ecwid_store_id'])) {
1765
+ update_option('ecwid_is_api_enabled', 'off');
1766
+ update_option('ecwid_api_check_time', 0);
1767
+ update_option('ecwid_last_oauth_fail_time', 0);
1768
+ }
1769
+ }
1770
+
1771
+ function ecwid_common_admin_scripts() {
1772
+
1773
+ wp_enqueue_script('ecwid-admin-js', ECWID_PLUGIN_URL . 'js/admin.js', array(), get_option('ecwid_plugin_version'));
1774
+ wp_enqueue_script('ecwid-modernizr-js', ECWID_PLUGIN_URL . 'js/modernizr.js', array(), get_option('ecwid_plugin_version'));
1775
+
1776
+ wp_localize_script('ecwid-admin-js', 'ecwid_l10n', array(
1777
+ 'dashboard' => __('Dashboard', 'ecwid-shopping-cart'),
1778
+ 'dashboard_url' => 'admin.php?page=ecwid',
1779
+ 'products' => __('Products', 'ecwid-shopping-cart'),
1780
+ 'products_url' => 'admin.php?page=ecwid-admin-products',
1781
+ 'orders' => __('Orders', 'ecwid-shopping-cart'),
1782
+ 'orders_url' => 'admin.php?page=ecwid-admin-orders',
1783
+ 'reset_cats_cache' => __('Refresh categories list', 'ecwid-shopping-cart'),
1784
+ 'cache_updated' => __('Done', 'ecwid-shopping-cart'),
1785
+ 'reset_cache_message' => __('The store top-level categories are automatically added to this drop-down menu', 'ecwid-shopping-cart'),
1786
+ ));
1787
+ }
1788
+
1789
+ function ecwid_get_register_link()
1790
+ {
1791
+ $link = 'https://my.ecwid.com/cp/?source=wporg&partner=wporg%s#register';
1792
+
1793
+ $current_user = wp_get_current_user();
1794
+
1795
+ $user_data = '';
1796
+ if ($current_user->ID && function_exists('get_user_meta')) {
1797
+ $meta = get_user_meta($current_user->ID);
1798
+
1799
+ $data = array(
1800
+ 'name' => get_user_meta($current_user->ID, 'first_name', true) . ' ' . get_user_meta($current_user->ID, 'last_name', true),
1801
+ 'nickname' => $current_user->display_name,
1802
+ 'email' => $current_user->user_email
1803
+ );
1804
+
1805
+ foreach ($data as $key => $value) {
1806
+ if (trim($value) == '') {
1807
+ unset($data[$key]);
1808
+ }
1809
+ }
1810
+ $user_data = '&' . build_query($data);
1811
+ }
1812
+
1813
+ $link = sprintf($link, $user_data);
1814
+
1815
+ return $link;
1816
+ }
1817
+
1818
+ function ecwid_create_store() {
1819
+ $api = new Ecwid_Api_V3();
1820
+ $result = $api->create_store();
1821
+ if (is_array($result) && $result['response']['code'] == 200) {
1822
+ $data = json_decode($result['body']);
1823
+
1824
+ update_option('ecwid_store_id', $data->id);
1825
+
1826
+ $api->save_token($data->token);
1827
+ update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
1828
+
1829
+ header( 'HTTP/1.1 200 OK' );
1830
+
1831
+ } else {
1832
+
1833
+
1834
+ header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
1835
+ }
1836
+ }
1837
+
1838
+ function ecwid_general_settings_do_page() {
1839
+
1840
+ $store_id = get_option( 'ecwid_store_id' );
1841
+
1842
+ $connection_error = isset( $_GET['connection_error'] );
1843
+
1844
+ if ( $store_id == ECWID_DEMO_STORE_ID ) {
1845
+ $no_oauth = @$_GET['oauth'] == 'no';
1846
+
1847
+ $there_was_oauth_error = isset( $connection_error ) && $no_oauth;
1848
+ $customer_returned_from_creating_store_at_ecwid =
1849
+ EcwidPlatform::cache_get( 'user_was_redirected_to_ecwid_site_to_create_account' );
1850
+
1851
+ if ( $there_was_oauth_error || $customer_returned_from_creating_store_at_ecwid ) {
1852
+ EcwidPlatform::cache_reset( 'user_was_redirected_to_ecwid_site_to_create_account' );
1853
+ require_once ECWID_PLUGIN_DIR . 'templates/connect.php';
1854
+ } else {
1855
+ $register = ! $connection_error && ! isset( $_GET['connect'] ) && ! @$_COOKIE['ecwid_create_store_clicked'];
1856
+
1857
+ $api = new Ecwid_Api_V3();
1858
+ global $current_user;
1859
+
1860
+ if ( ecwid_use_old_landing() ) {
1861
+ require_once( ECWID_PLUGIN_DIR . '/templates/landing_old.php' );
1862
+ } else if ($api->does_store_exist($current_user->user_email)) {
1863
+ require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
1864
+ } else {
1865
+ require_once( ECWID_PLUGIN_DIR . '/templates/landing.php' );
1866
+ }
1867
+ }
1868
+ } else {
1869
+ global $ecwid_oauth;
1870
+
1871
+ if ( !$ecwid_oauth->has_scope( 'allow_sso' ) && !isset($_GET['reconnect']) ) {
1872
+ if ( ecwid_test_oauth(true) ) {
1873
+ require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
1874
+ } else {
1875
+ require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
1876
+ }
1877
+ } else {
1878
+
1879
+ if ($connection_error || isset($_GET['reconnect'])) {
1880
+ if (isset($_GET['reason'])) switch ($_GET['reason']) {
1881
+ case '1': $reconnect_message = "Message 1"; break;
1882
+ case '2': $reconnect_message = "Message 2"; break;
1883
+ }
1884
+
1885
+ $scopes = '';
1886
+
1887
+ $connection_error = isset($_GET['connection_error']);
1888
+
1889
+ require_once ECWID_PLUGIN_DIR . 'templates/reconnect.php';
1890
+ } else {
1891
+ $time = time() - get_option('ecwid_time_correction', 0);
1892
+ $page = 'dashboard';
1893
+
1894
+ $iframe_src = ecwid_get_iframe_src($time, $page);
1895
+
1896
+ $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
1897
+ if (!$request) {
1898
+ echo Ecwid_Message_Manager::show_message('no_oauth');
1899
+ return;
1900
+ }
1901
+
1902
+ $result = $request->do_request(array(
1903
+ 'timeout' => 20
1904
+ ));
1905
+
1906
+ if ($result['code'] == 403 && strpos($result['data'], 'Token too old') !== false ) {
1907
+
1908
+ if (isset($result['headers']['date'])) {
1909
+ $time = strtotime($result['headers']['date']);
1910
+
1911
+ $iframe_src = ecwid_get_iframe_src($time, $page);
1912
+
1913
+ $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
1914
+ if (!$request) {
1915
+ echo Ecwid_Message_Manager::show_message('no_oauth');
1916
+ return;
1917
+ }
1918
+ $result = $request->do_request();
1919
+
1920
+ if ($result['code'] == 200) {
1921
+ update_option('ecwid_time_correction', time() - $time);
1922
+ }
1923
+ }
1924
+ }
1925
+
1926
+ if ( is_array( $result ) && $result['code'] == 200 ) {
1927
+ ecwid_admin_do_page( 'dashboard' );
1928
+ } else {
1929
+ require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
1930
+ }
1931
+ }
1932
+ }
1933
+ }
1934
+ }
1935
+
1936
+ function ecwid_get_iframe_src($time, $page) {
1937
+
1938
+ return sprintf(
1939
+ 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
1940
+ get_ecwid_store_id(),
1941
+ Ecwid_Api_V3::get_token(),
1942
+ $time,
1943
+ hash( 'sha256', get_ecwid_store_id() . Ecwid_Api_V3::get_token() . $time . Ecwid_Api_V3::CLIENT_SECRET ),
1944
+ $page,
1945
+ substr( get_bloginfo( 'language' ), 0, 2 )
1946
+ );
1947
+ }
1948
+
1949
+ function ecwid_admin_do_page( $page ) {
1950
+
1951
+ if (isset($_GET['show_timeout']) && $_GET['show_timeout'] == '1') {
1952
+ require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
1953
+ die();
1954
+ }
1955
+ global $ecwid_oauth;
1956
+
1957
+ if (isset($_GET['ecwid_page']) && $_GET['ecwid_page']) {
1958
+ $page = $_GET['ecwid_page'];
1959
+ }
1960
+
1961
+ if ($page == ecwid_get_admin_iframe_upgrade_page()) {
1962
+ update_option('ecwid_api_check_time', time() - ECWID_API_AVAILABILITY_CHECK_TIME + 10 * 60);
1963
+ }
1964
+
1965
+ if ($page == 'dashboard') {
1966
+ $show_reconnect = true;
1967
+ }
1968
+
1969
+ $time = time() - get_option('ecwid_time_correction', 0);
1970
+
1971
+ $iframe_src = ecwid_get_iframe_src($time, $page);
1972
+
1973
+ $request = Ecwid_Http::create_get('embedded_admin_iframe', $iframe_src, array(Ecwid_Http::POLICY_RETURN_VERBOSE));
1974
+ if (!$request) {
1975
+ echo Ecwid_Message_Manager::show_message('no_oauth');
1976
+ return;
1977
+ }
1978
+
1979
+ $result = $request->do_request();
1980
+
1981
+ if (empty($result['code']) && empty($result['data'])) {
1982
+ require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
1983
+ } else if ($result['code'] != 200) {
1984
+ if (ecwid_test_oauth(true)) {
1985
+ require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
1986
+ } else {
1987
+ require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
1988
+ }
1989
+ } else {
1990
+ require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
1991
+ }
1992
+ }
1993
+
1994
+
1995
+ function ecwid_admin_products_do_page() {
1996
+ ecwid_admin_do_page('products');
1997
+ }
1998
+
1999
+ function ecwid_admin_orders_do_page() {
2000
+ ecwid_admin_do_page('orders');
2001
+ }
2002
+
2003
+
2004
+ function ecwid_admin_mobile_do_page() {
2005
+ ecwid_admin_do_page('mobile');
2006
+ }
2007
+
2008
+ function ecwid_help_do_page() {
2009
+
2010
+ $help = new Ecwid_Help_Page();
2011
+ $faqs = $help->get_faqs();
2012
+
2013
+ wp_enqueue_style('ecwid-help', ECWID_PLUGIN_URL . 'css/help.css',array(), get_option('ecwid_plugin_version'));
2014
+
2015
+ $col_size = 6;
2016
+ require_once ECWID_PLUGIN_DIR . 'templates/help.php';
2017
+ }
2018
+
2019
+ function ecwid_process_oauth_params() {
2020
+
2021
+ if (strtoupper($_SERVER['REQUEST_METHOD']) != 'GET' || !isset($_GET['page'])) {
2022
+ return;
2023
+ }
2024
+
2025
+ $is_dashboard = $_GET['page'] == 'ecwid';
2026
+
2027
+ if (!$is_dashboard) {
2028
+ return;
2029
+ }
2030
+
2031
+ global $ecwid_oauth;
2032
+ $is_connect = get_ecwid_store_id() != ECWID_DEMO_STORE_ID && !isset($_GET['connection_error']);
2033
+
2034
+ $is_reconnect = isset($_GET['reconnect']) && !isset($_GET['connection_error']);
2035
+
2036
+ if ($is_connect) {
2037
+ $ecwid_oauth->update_state( array( 'mode' => 'connect' ) );
2038
+ }
2039
+
2040
+ if ($is_reconnect && !isset($_GET['api_v3_sso'])) {
2041
+ $ecwid_oauth->update_state( array(
2042
+ 'mode' => 'reconnect',
2043
+ // explicitly set to empty array if not available to reset current state
2044
+ 'scope' => isset($_GET['scope']) ? $_GET['scope'] : array(),
2045
+ // explicitly set to empty string if not available to reset current state
2046
+ 'return_url' => isset($_GET['return-url']) ? $_GET['return-url'] : '',
2047
+ 'reason' => isset($_GET['reason']) ? $_GET['reason'] : ''
2048
+ ));
2049
+ }
2050
+ }
2051
+
2052
+ function ecwid_admin_post_connect()
2053
+ {
2054
+ if (!current_user_can('manage_options')) {
2055
+ return;
2056
+ }
2057
+
2058
+ if (isset($_GET['force_store_id'])) {
2059
+ update_option('ecwid_store_id', $_GET['force_store_id']);
2060
+ update_option('ecwid_is_api_enabled', 'off');
2061
+ update_option('ecwid_api_check_time', 0);
2062
+ update_option('ecwid_last_oauth_fail_time', 1);
2063
+ wp_redirect('admin.php?page=ecwid');
2064
+ exit;
2065
+ }
2066
+ global $ecwid_oauth;
2067
+
2068
+ if (ecwid_test_oauth(true)) {
2069
+
2070
+ if (@isset($_GET['api_v3_sso'])) {
2071
+ $ecwid_oauth->update_state(array('mode' => 'reconnect', 'return_url' => 'admin.php?page=ecwid-advanced'));
2072
+ wp_redirect($ecwid_oauth->get_sso_reconnect_dialog_url());
2073
+ } else {
2074
+ wp_redirect( $ecwid_oauth->get_auth_dialog_url() );
2075
+ }
2076
+ } else if (!isset($_GET['reconnect'])) {
2077
+ wp_redirect('admin.php?page=ecwid&oauth=no&connection_error');
2078
+ } else {
2079
+ wp_redirect('admin.php?page=ecwid&reconnect&connection_error');
2080
+ }
2081
+ exit;
2082
+ }
2083
+
2084
+ function ecwid_test_oauth($force = false)
2085
+ {
2086
+ global $ecwid_oauth;
2087
+
2088
+ $last_fail = get_option('ecwid_last_oauth_fail_time');
2089
+
2090
+ if ( ($last_fail > 0 && $last_fail + 60*60*24 < time()) || $force) {
2091
+
2092
+ $result = $ecwid_oauth->test_post();
2093
+
2094
+ if ($result) {
2095
+ update_option('ecwid_last_oauth_fail_time', $last_fail = 0);
2096
+ } else {
2097
+ update_option('ecwid_last_oauth_fail_time', $last_fail = time());
2098
+ }
2099
+ }
2100
+
2101
+ return $last_fail == 0;
2102
+ }
2103
+
2104
+ function ecwid_get_categories_for_selector() {
2105
+
2106
+ function walk_through_categories($categories, $parent_prefix) {
2107
+ if (empty($categories)) {
2108
+ return array();
2109
+ }
2110
+ $result = array();
2111
+
2112
+ foreach ($categories as $category) {
2113
+ $result[$category->id] = $category;
2114
+ $result[$category->id]->path = $parent_prefix . $category->name;
2115
+ $result = array_merge($result, walk_through_categories($category->sub, $category->name . ' > '));
2116
+ unset($result[$category->id]->sub);
2117
+ }
2118
+
2119
+ return $result;
2120
+ }
2121
+
2122
+ $result = walk_through_categories(ecwid_get_categories(true), "");
2123
+
2124
+ return $result;
2125
+ }
2126
+
2127
+ function ecwid_advanced_settings_do_page() {
2128
+ $categories = ecwid_get_categories_for_selector();
2129
+
2130
+ $is_sso_enabled = ecwid_is_sso_enabled();
2131
+
2132
+ global $ecwid_oauth;
2133
+
2134
+ $has_create_customers_scope = $ecwid_oauth->has_scope('create_customers');
2135
+
2136
+ $key = get_option('ecwid_sso_secret_key');
2137
+ $is_sso_checkbox_disabled = !$is_sso_enabled && !$has_create_customers_scope && empty($key);
2138
+
2139
+ $reconnect_link = admin_url('admin-post.php?action=ecwid_connect&reconnect&api_v3_sso');
2140
+
2141
+ require_once ECWID_PLUGIN_DIR . 'templates/advanced-settings.php';
2142
+ }
2143
+
2144
+ function ecwid_get_admin_iframe_upgrade_page() {
2145
+ return 'billing:feature=sso&plan=ecwid_venture';
2146
+ }
2147
+
2148
+ function ecwid_appearance_settings_do_page() {
2149
+
2150
+ wp_register_script('ecwid-appearance-js', ECWID_PLUGIN_URL . 'js/appearance.js', array(), get_option('ecwid_plugin_version'), true);
2151
+ wp_enqueue_script('ecwid-appearance-js');
2152
+
2153
+ $disabled = false;
2154
+ if (!empty($ecwid_page_id) && ($ecwid_page_id > 0)) {
2155
+ $_tmp_page = get_post($ecwid_page_id);
2156
+ $content = $_tmp_page->post_content;
2157
+ if ( (strpos($content, "[ecwid_productbrowser]") === false) && (strpos($content, "xProductBrowser") !== false) )
2158
+ $disabled = true;
2159
+ }
2160
+ // $disabled_str is used in appearance settings template
2161
+ if ($disabled)
2162
+ $disabled_str = 'disabled = "disabled"';
2163
+ else
2164
+ $disabled_str = "";
2165
+
2166
+ require_once ECWID_PLUGIN_DIR . 'templates/appearance-settings.php';
2167
+ }
2168
+
2169
+ function ecwid_debug_do_page() {
2170
+
2171
+ if (ecwid_is_api_enabled()) {
2172
+ $remote_get_results = wp_remote_get( 'http://app.ecwid.com/api/v1/' . get_ecwid_store_id() . '/profile' );
2173
+
2174
+ $api_v3_profile_results = wp_remote_get( 'https://app.ecwid.com/api/v3/' . get_ecwid_store_id() . '/profile?token=' . Ecwid_Api_V3::get_token() );
2175
+ }
2176
+
2177
+ global $ecwid_oauth;
2178
+
2179
+ require_once ECWID_PLUGIN_DIR . 'templates/debug.php';
2180
+ }
2181
+
2182
+ function ecwid_get_debug_file() {
2183
+ if (!current_user_can('manage_options')) {
2184
+ return;
2185
+ }
2186
+
2187
+ header('Content-Disposition: attachment;filename=ecwid-plugin-log.html');
2188
+
2189
+
2190
+ ecwid_debug_do_page();
2191
+ wp_die();
2192
+ }
2193
+
2194
+ function get_ecwid_store_id() {
2195
+ $store_id = get_option('ecwid_store_id');
2196
+ if (empty($store_id)) {
2197
+ $store_id = ECWID_DEMO_STORE_ID;
2198
+ }
2199
+
2200
+ return $store_id;
2201
+ }
2202
+
2203
+ function ecwid_save_post($post_id)
2204
+ {
2205
+ // If primary or auto store page gets updated
2206
+ if ($post_id == get_option('ecwid_store_page_id') || $post_id == get_option('ecwid_store_page_id_auto')) {
2207
+ $new_status = get_post_status($post_id);
2208
+
2209
+ // and the update either disables the page or removes product browser
2210
+ if (!in_array($new_status, array('publish', 'private')) || !ecwid_page_has_productbrowser($post_id)) {
2211
+
2212
+ // then look for another enabled page that has a product browser in it
2213
+ $pages = get_pages(array('post_status' => 'publish,private'));
2214
+
2215
+ foreach ($pages as $page) {
2216
+ if (ecwid_page_has_productbrowser($page->ID)) {
2217
+ update_option('ecwid_store_page_id_auto', $page->ID);
2218
+ return;
2219
+ }
2220
+ }
2221
+ }
2222
+ }
2223
+
2224
+ // if there is no current store page and this new page has a product browser
2225
+ if (ecwid_page_has_productbrowser($post_id) && !ecwid_get_current_store_page_id()) {
2226
+ // then this page becomes a new store page
2227
+ update_option('ecwid_store_page_id_auto', $post_id);
2228
+ }
2229
+ }
2230
+
2231
+ function ecwid_get_current_store_page_id()
2232
+ {
2233
+ static $page_id = null;
2234
+
2235
+ if (is_null($page_id)) {
2236
+ $page_id = false;
2237
+ foreach(array('ecwid_store_page_id', 'ecwid_store_page_id_auto') as $option) {
2238
+ $id = get_option($option);
2239
+ if ($id) {
2240
+ $status = get_post_status($id);
2241
+
2242
+ if ($status == 'publish' || $status == 'private') {
2243
+ $page_id = $id;
2244
+ break;
2245
+ }
2246
+ }
2247
+ }
2248
+ }
2249
+
2250
+ return $page_id;
2251
+ }
2252
+
2253
+ function ecwid_get_store_page_url()
2254
+ {
2255
+ static $link = null;
2256
+
2257
+ if (is_null($link)) {
2258
+ $link = get_page_link(ecwid_get_current_store_page_id());
2259
+ }
2260
+
2261
+ return $link;
2262
+ }
2263
+
2264
+ function ecwid_is_store_page_available()
2265
+ {
2266
+ return ecwid_get_current_store_page_id() != false;
2267
+ }
2268
+
2269
+ function ecwid_get_product_url($product)
2270
+ {
2271
+ return ecwid_get_entity_url($product, 'p');
2272
+ }
2273
+
2274
+ function ecwid_get_category_url($category)
2275
+ {
2276
+ return ecwid_get_entity_url($category, 'c');
2277
+ }
2278
+
2279
+ function ecwid_get_entity_url($entity, $type) {
2280
+
2281
+ $link = ecwid_get_store_page_url();
2282
+
2283
+ if (is_numeric($entity)) {
2284
+ return $link . '#!/' . $type . '/' . $entity;
2285
+ } elseif (is_array($entity) && isset($entity['url'])) {
2286
+ $link .= substr($entity['url'], strpos($entity['url'], '#'));
2287
+ }
2288
+
2289
+ return $link;
2290
+
2291
+ }
2292
+
2293
+ function ecwid_get_product_browser_url_script()
2294
+ {
2295
+ $str = '';
2296
+ if (ecwid_is_store_page_available()) {
2297
+ $url = ecwid_get_store_page_url();
2298
+
2299
+ $str = '<script data-cfasync="false" type="text/javascript">var ecwid_ProductBrowserURL = "' . esc_js($url) . '";</script>';
2300
+ }
2301
+
2302
+ return $str;
2303
+
2304
+ }
2305
+
2306
+ function ecwid_get_wp_install_date( ) {
2307
+ global $wpdb;
2308
+
2309
+ $wp_date = get_option( 'ecwid_wp_install_date' );
2310
+ if ( ! $wp_date ) {
2311
+ global $wpdb;
2312
+ $oldest_user = strtotime( $wpdb->get_var( "SELECT min(`user_registered`) FROM {$wpdb->users}" ) );
2313
+ $oldest_post = strtotime( $wpdb->get_var( "SELECT min(`post_date`) FROM {$wpdb->posts}" ) );
2314
+ $wpconfig_create = @filectime( ABSPATH . '/wp-config.php' );
2315
+
2316
+ $wp_date = min( $oldest_user, $oldest_post, $wpconfig_create );
2317
+ update_option( 'ecwid_wp_install_date', $wp_date );
2318
+ }
2319
+
2320
+ return $wp_date;
2321
+ }
2322
+
2323
+ function ecwid_check_for_remote_connection_errors()
2324
+ {
2325
+ global $ecwid_oauth;
2326
+
2327
+ $results = array();
2328
+ $results['https_get_error'] = wp_remote_get(ecwid_get_categories_js_url('abc'));
2329
+ $results['https_post_error'] = wp_remote_post($ecwid_oauth->get_test_post_url());
2330
+
2331
+ foreach ($results as $type => $value) {
2332
+ if (is_wp_error($value)) {
2333
+ $results[$type] = $value->get_error_message();
2334
+ } else {
2335
+ unset($results[$type]);
2336
+ }
2337
+ }
2338
+
2339
+ return $results;
2340
+ }
2341
+
2342
+ function ecwid_is_sso_enabled() {
2343
+ global $ecwid_oauth;
2344
+
2345
+ $is_sso_enabled = false;
2346
+
2347
+ $is_apiv3_sso = ecwid_is_paid_account() && get_option('ecwid_is_sso_enabled') && $ecwid_oauth->has_scope('create_customers');
2348
+ $is_apiv1_sso = ecwid_is_paid_account() && get_option('ecwid_sso_secret_key');
2349
+
2350
+ $is_sso_enabled = $is_apiv3_sso || $is_apiv1_sso;
2351
+
2352
+ return $is_sso_enabled;
2353
+ }
2354
+
2355
+ function ecwid_sso() {
2356
+
2357
+ if (!ecwid_is_sso_enabled()) return;
2358
+
2359
+ $current_user = wp_get_current_user();
2360
+
2361
+ $signin_url = wp_login_url(ecwid_get_store_page_url());
2362
+ $signout_url = wp_logout_url(ecwid_get_store_page_url());
2363
+ $sign_in_out_urls = <<<JS
2364
+ window.EcwidSignInUrl = '$signin_url';
2365
+ window.EcwidSignOutUrl = '$signout_url';
2366
+ window.Ecwid.OnAPILoaded.add(function() {
2367
+
2368
+ window.Ecwid.setSignInUrls({
2369
+ signInUrl: '$signin_url',
2370
+ signOutUrl: '$signout_url'
2371
+ });
2372
+ });
2373
+ JS;
2374
+
2375
+ $ecwid_sso_profile = '';
2376
+ if ($current_user->ID) {
2377
+ $meta = get_user_meta($current_user->ID);
2378
+
2379
+ $user_data = array(
2380
+ 'userId' => "{$current_user->ID}",
2381
+ 'profile' => array(
2382
+ 'email' => $current_user->user_email,
2383
+ 'billingPerson' => array(
2384
+ 'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
2385
+ )
2386
+ )
2387
+ );
2388
+
2389
+ global $ecwid_oauth;
2390
+ if ($ecwid_oauth->has_scope('create_customers')) {
2391
+ $key = Ecwid_Api_V3::CLIENT_SECRET;
2392
+ $user_data['appClientId'] = Ecwid_Api_V3::CLIENT_ID;
2393
+ } else {
2394
+ $key = get_option('ecwid_sso_secret_key');
2395
+ $user_data['appId'] = "wp_" . get_ecwid_store_id();
2396
+ }
2397
+
2398
+ $user_data_encoded = base64_encode(json_encode($user_data));
2399
+ $time = time();
2400
+ $hmac = ecwid_hmacsha1("$user_data_encoded $time", $key);
2401
+
2402
+ $ecwid_sso_profile = "$user_data_encoded $hmac $time";
2403
+
2404
+
2405
+ //die(var_dump($user_data, json_encode($user_data), $ecwid_sso_profile));
2406
+ }
2407
+
2408
+
2409
+ return <<<HTML
2410
+ <script data-cfasync="false" type="text/javascript">
2411
+
2412
+ var ecwid_sso_profile='$ecwid_sso_profile';
2413
+ $sign_in_out_urls
2414
+ </script>
2415
+ HTML;
2416
+ }
2417
+
2418
+ // from: http://www.php.net/manual/en/function.sha1.php#39492
2419
+
2420
+ function ecwid_hmacsha1($data, $key) {
2421
+ if (function_exists("hash_hmac")) {
2422
+ return hash_hmac('sha1', $data, $key);
2423
+ } else {
2424
+ $blocksize=64;
2425
+ $hashfunc='sha1';
2426
+ if (strlen($key)>$blocksize)
2427
+ $key=pack('H*', $hashfunc($key));
2428
+ $key=str_pad($key,$blocksize,chr(0x00));
2429
+ $ipad=str_repeat(chr(0x36),$blocksize);
2430
+ $opad=str_repeat(chr(0x5c),$blocksize);
2431
+ $hmac = pack(
2432
+ 'H*',$hashfunc(
2433
+ ($key^$opad).pack(
2434
+ 'H*',$hashfunc(
2435
+ ($key^$ipad).$data
2436
+ )
2437
+ )
2438
+ )
2439
+ );
2440
+ return bin2hex($hmac);
2441
+ }
2442
+ }
2443
+
2444
+ function ecwid_can_display_html_catalog()
2445
+ {
2446
+ if (!isset($_GET['_escaped_fragment_'])) return;
2447
+
2448
+ $api = ecwid_new_product_api();
2449
+ if (!$api) return;
2450
+
2451
+ $profile = $api->get_profile();
2452
+ if (!$profile) return;
2453
+ return $profile['closed'] != true;
2454
+ }
2455
+
2456
+ function ecwid_get_default_pb_size() {
2457
+ return array(
2458
+ 'grid_rows' => 10,
2459
+ 'grid_columns' => 3,
2460
+ 'list_rows' => 60,
2461
+ 'table_rows' => 60
2462
+ );
2463
+ }
2464
+
2465
+ function ecwid_is_paid_account()
2466
+ {
2467
+ return ecwid_is_api_enabled() && get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
2468
+ }
2469
+
2470
+ function ecwid_is_api_enabled()
2471
+ {
2472
+ $ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
2473
+ $ecwid_api_check_time = get_option('ecwid_api_check_time');
2474
+ $now = time();
2475
+
2476
+ if ( $now > ($ecwid_api_check_time + ECWID_API_AVAILABILITY_CHECK_TIME) && get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
2477
+ $ecwid = ecwid_new_product_api();
2478
+
2479
+ $ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
2480
+
2481
+ update_option('ecwid_is_api_enabled', $ecwid_is_api_enabled);
2482
+ update_option('ecwid_api_check_time', $now);
2483
+ }
2484
+
2485
+ if ('on' == $ecwid_is_api_enabled)
2486
+ return true;
2487
+ else
2488
+ return false;
2489
+ }
2490
+
2491
+ function ecwid_new_product_api()
2492
+ {
2493
+ include_once ECWID_PLUGIN_DIR . 'lib/ecwid_product_api.php';
2494
+ $ecwid_store_id = intval(get_ecwid_store_id());
2495
+ $api = new EcwidProductApi($ecwid_store_id);
2496
+
2497
+ return $api;
2498
+ }
2499
+
2500
+ function ecwid_embed_svg($name) {
2501
+ $code = file_get_contents(ECWID_PLUGIN_DIR . 'images/' . $name . '.svg');
2502
+
2503
+ echo $code;
2504
+ }
2505
+
2506
+ function ecwid_get_categories_js_url($callback = null) {
2507
+
2508
+ $url = 'https://my.ecwid.com/categories.js?ownerid=' . get_ecwid_store_id();
2509
+
2510
+ if ($callback) {
2511
+ $url .= '&callback=' . $callback;
2512
+ }
2513
+
2514
+ return $url;
2515
+ }
2516
+
2517
+
2518
+ function ecwid_use_old_landing() {
2519
+ return version_compare(get_bloginfo('version'), '3.7') < 0;
2520
+ }
2521
+
2522
+ /*
2523
+ * Basically a copy of has_shortcode that returns the matched shortcode
2524
+ */
2525
+ function ecwid_find_shortcodes( $content, $tag ) {
2526
+
2527
+ if ( false === strpos( $content, '[' ) ) {
2528
+ return false;
2529
+ }
2530
+
2531
+ if ( shortcode_exists( $tag ) ) {
2532
+ preg_match_all( '/' . ecwid_get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
2533
+ if ( empty( $matches ) )
2534
+ return false;
2535
+
2536
+ $result = array();
2537
+ foreach ( $matches as $shortcode ) {
2538
+ if ( $tag === $shortcode[2] ) {
2539
+ $result[] = $shortcode;
2540
+ } elseif ( !empty($shortcode[5]) && $found = ecwid_find_shortcodes( $shortcode[5], $tag ) ) {
2541
+ $result = array_merge($result, $found);
2542
+ }
2543
+ }
2544
+
2545
+ if (empty($result)) {
2546
+ $result = false;
2547
+ }
2548
+ return $result;
2549
+ }
2550
+ return false;
2551
+ }
2552
+
2553
+ // Since we use shortcode regex in our own functions, we need it to be persistent
2554
+ function ecwid_get_shortcode_regex() {
2555
+ global $shortcode_tags;
2556
+ $tagnames = array_keys($shortcode_tags);
2557
+ $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
2558
+
2559
+ // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
2560
+ // Also, see shortcode_unautop() and shortcode.js.
2561
+ return
2562
+ '\\[' // Opening bracket
2563
+ . '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
2564
+ . "($tagregexp)" // 2: Shortcode name
2565
+ . '(?![\\w-])' // Not followed by word character or hyphen
2566
+ . '(' // 3: Unroll the loop: Inside the opening shortcode tag
2567
+ . '[^\\]\\/]*' // Not a closing bracket or forward slash
2568
+ . '(?:'
2569
+ . '\\/(?!\\])' // A forward slash not followed by a closing bracket
2570
+ . '[^\\]\\/]*' // Not a closing bracket or forward slash
2571
+ . ')*?'
2572
+ . ')'
2573
+ . '(?:'
2574
+ . '(\\/)' // 4: Self closing tag ...
2575
+ . '\\]' // ... and closing bracket
2576
+ . '|'
2577
+ . '\\]' // Closing bracket
2578
+ . '(?:'
2579
+ . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags
2580
+ . '[^\\[]*+' // Not an opening bracket
2581
+ . '(?:'
2582
+ . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
2583
+ . '[^\\[]*+' // Not an opening bracket
2584
+ . ')*+'
2585
+ . ')'
2586
+ . '\\[\\/\\2\\]' // Closing shortcode tag
2587
+ . ')?'
2588
+ . ')'
2589
+ . '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
2590
+ }
2591
+
2592
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fonts/ecwid-icons.svg CHANGED
@@ -1,17 +1,17 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="icomoon" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
- <glyph unicode="&#xe600;" d="M930.909 605.091h-837.818c-20.945 0-46.545-17.222-46.545-38.633v-62.836c0-20.945 25.6-38.167 46.545-38.167h346.298v101.004h153.6v-101.004h337.92c20.945 0 46.545 17.222 46.545 38.633v60.044c0 20.945-25.6 40.96-46.545 40.96zM823.855 902.517c-50.269 50.269-89.833 31.651-115.433 0-46.545-58.647-95.418-103.331-125.207-128.465-6.982 7.913-17.222 13.033-28.393 13.033h-76.8c-11.171 0-21.411-5.12-28.393-13.033-29.789 25.135-78.662 69.818-125.207 128.465-25.6 31.651-65.164 50.269-115.433 0-180.131-180.131 59.113-227.607 98.676-227.607h84.247c0 0-202.938 88.436-140.102 164.771 26.531 32.116 48.407 8.844 83.316-13.964 34.444-22.342 79.127-44.684 109.382-58.647-2.793-5.585-5.12-11.636-5.12-18.153v-38.633c0-20.945 17.222-38.633 38.633-38.633h76.8c20.945 0 38.633 17.222 38.633 38.633v38.633c0 6.516-2.327 12.567-5.12 17.687 30.255 14.429 75.404 36.771 109.847 59.113 34.909 22.807 56.785 45.615 83.316 13.498 62.836-75.869-140.102-164.771-140.102-164.771h84.247c39.098 0.465 278.342 47.942 98.211 228.073zM439.389 410.997c0 0-307.2 0-345.833 0v-372.364c0-20.945 17.222-38.633 38.633-38.633h307.2v410.996zM592.989 410.997v-410.996h299.287c20.945 0 38.633 17.222 38.633 38.633v372.364c-38.633 0-337.92 0-337.92 0z" />
11
- <glyph unicode="&#xe601;" d="M349.556 716.335c21.876 0 41.425 16.291 41.425 38.633 0 101.935 16.291 126.604 118.225 126.604s118.225-24.669 118.225-126.604c0-21.876 19.084-38.633 41.425-38.633 21.876 0 38.633 16.291 38.633 38.633 0 63.302 2.793 206.196-198.284 206.196s-197.818-142.895-197.818-206.196c2.327-21.876 16.291-38.633 38.167-38.633zM1023.535 47.942l-126.604 602.298c-2.793 16.291-16.291 30.255-33.047 30.255h-703.767c-16.291 0-33.047-13.964-33.047-30.255l-126.604-602.298c-2.793-27.462 11.171-49.338 33.047-49.338h960.233c19.084 0 32.582 21.876 29.789 49.338zM333.265 521.31c-33.047 0-60.509 27.462-60.509 60.509s27.462 60.509 60.509 60.509 60.509-27.462 60.509-60.509-27.462-60.509-60.509-60.509zM690.735 521.31c-33.047 0-60.509 27.462-60.509 60.509s27.462 60.509 60.509 60.509c33.047 0 60.509-27.462 60.509-60.509s-27.462-60.509-60.509-60.509z" />
12
- <glyph unicode="&#xe602;" d="M976.524 884.364h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.531 0 47.942 23.273 47.942 54.458v123.811c0 31.185-21.411 54.458-47.476 54.458zM976.524 558.546h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.065 0 47.476 23.273 47.476 54.458v124.276c0.465 30.72-20.945 53.993-47.011 53.993zM976.524 232.728h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.065 0 47.476 23.273 47.476 54.458v124.276c0.465 30.72-20.945 53.993-47.011 53.993z" />
13
- <glyph unicode="&#xe603;" d="M848.989 185.717c0-15.424-12.503-27.927-27.927-27.927s-27.927 12.503-27.927 27.927c0 15.424 12.503 27.927 27.927 27.927s27.927-12.503 27.927-27.927zM233.658 184.786c0-15.424-12.503-27.927-27.927-27.927s-27.927 12.503-27.927 27.927c0 15.424 12.503 27.927 27.927 27.927s27.927-12.503 27.927-27.927zM823.389 977.455h-622.778c-110.778 0-200.611-89.833-200.611-200.611v-623.244c0-110.313 89.833-200.145 200.611-200.145h623.244c110.778 0 200.611 89.833 200.611 200.611v622.778c-0.465 110.778-90.298 200.611-201.076 200.611zM642.793 683.288c21.411 0 39.098-17.222 39.098-39.098s-17.687-39.098-39.098-39.098c-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM642.793 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.687-39.098-39.098-39.098s-39.098 17.222-39.098 39.098 17.687 39.098 39.098 39.098zM514.793 683.288c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM514.793 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM388.655 683.288c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098s17.222 39.098 39.098 39.098zM388.655 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098s17.222 39.098 39.098 39.098zM205.731 107.055c-42.822 0-77.731 34.909-77.731 77.731s34.909 78.196 77.731 78.196c43.287 0 78.196-34.909 78.196-78.196 0-42.822-34.909-77.731-78.196-77.731zM566.924 284.393c-37.236 0-51.665 15.825-53.527 20.945-1.862-5.12-15.36-20.945-52.596-20.945-39.098 0-40.495 0-81.92 0-48.873 0-124.742 25.6-147.084 103.796-22.807 77.731-54.458 194.56-68.887 246.691-14.429 52.596-16.291 56.32 8.844 56.32 22.807 0 70.284-3.258 85.644-56.32 14.895-53.062 44.684-153.6 56.32-192.698 16.756-55.855 63.302-61.44 93.556-61.44 40.96 0 63.302 1.396 63.302 33.978 13.033 0.465 33.047 0 42.356 0s29.324 0 42.356 0c0-31.185 22.342-34.444 63.302-33.978 47.011 0.465 84.247 12.567 101.935 71.215 15.825 53.527 59.578 221.556 77.731 294.633 10.705 43.753 63.767 48.873 84.713 48.873 24.669 0.465 15.825-20.015 1.862-75.404-15.36-62.371-56.785-237.847-82.851-317.905-25.6-77.265-88.436-118.225-155.927-118.225-41.425 0.465-40.495 0.465-79.127 0.465zM821.062 107.986c-43.287 0-78.196 34.909-78.196 78.196s34.909 78.196 78.196 78.196c42.822 0 78.196-34.909 78.196-78.196s-35.375-78.196-78.196-78.196z" />
14
- <glyph unicode="&#xe604;" d="M961.629 121.019c13.498-13.498 21.411-32.582 21.411-51.2 0-19.084-7.913-37.702-21.411-51.2-16.291-16.291-32.582-24.204-51.2-24.204-21.411 0-37.702 7.913-51.2 21.411l-200.145 197.353c-67.491-48.873-146.153-70.284-229.935-70.284-53.993 0-107.985 10.705-156.858 32.582-51.2 21.411-94.487 51.2-129.862 86.575-34.909 34.909-64.698 78.196-86.575 129.862s-32.582 102.865-32.582 156.858 10.705 107.985 32.582 156.858c21.411 51.2 51.2 94.487 86.575 129.862s78.196 64.698 129.862 86.575 102.865 32.582 156.858 32.582 107.985-10.705 156.858-32.582c51.2-21.411 94.487-51.2 129.862-86.575s64.698-78.196 86.575-129.862c21.411-51.2 32.582-102.865 32.582-156.858 0-83.782-24.204-161.978-70.284-229.935l196.887-197.818zM613.004 364.451c51.2 51.2 75.869 110.778 75.869 183.855 0 70.284-24.204 132.655-75.869 183.855s-110.778 75.869-183.855 75.869c-70.284 0-132.655-24.204-183.855-75.869s-75.404-110.778-75.404-183.855c0-70.284 24.204-132.655 75.869-183.855s110.778-75.869 183.855-75.869c69.818 0 132.189 26.996 183.389 75.869z" />
15
- <glyph unicode="&#xe605;" d="M50.735 50.735c0 9.309 7.447 16.756 16.756 16.756h890.88c9.309 0 16.756-7.447 16.756-16.756v-33.978c0-9.309-7.447-16.756-16.756-16.756h-891.345c-9.309 0-16.756 7.447-16.756 16.756v33.978zM977.455 608.815c-35.84 71.68-51.2 141.498-71.68 257.396 0 6.516-16.291 28.858-35.84 28.858h-715.869c-19.549 0-35.84-22.342-35.84-28.858 0 0-35.84-221.556-71.68-257.396 0-36.305 0-108.451 0-108.451s0.465-1.396 1.396-2.793h-1.396c0 0 3.258-17.687 25.6-27.927 3.258-1.862 6.516-3.258 10.24-4.189v-324.422c0-19.549 20.48-33.047 40.029-33.047h282.065v296.495c0 19.549 18.618 35.375 38.633 35.375h142.429c19.549 0 35.375-15.825 35.375-35.375v-296.495h284.858c19.549 0 35.375 13.498 35.375 33.047v324.422c28.393 4.655 35.84 33.047 35.84 33.047h-0.931c0.465 1.862 0.931 2.793 0.931 2.793s0.465 71.68 0.465 107.52zM327.215 250.415c0-19.549-8.844-35.84-28.393-35.84h-74.007c-19.549 0-28.858 16.291-28.858 35.84v143.36c0 19.549 9.309 35.84 28.858 35.84h74.007c19.549 0 28.393-16.291 28.393-35.84v-143.36zM827.113 250.415c0-19.549-7.913-35.84-27.462-35.84h-73.076c-19.549 0-28.858 16.291-28.858 35.84v143.36c0 19.549 9.309 35.84 28.858 35.84h73.076c19.549 0 27.462-16.291 27.462-35.84v-143.36zM833.629 829.44c0 0 38.167-181.993 61.44-220.625-35.375 0-97.745 0-97.745 0l-35.84 220.625h72.145zM898.327 572.975l-0.465-27.927c-3.258-24.669-24.204-43.753-49.804-43.753-27.927 0-50.269 16.756-50.269 44.684 0 0.931 1.396 26.996 1.396 26.996h99.142zM628.829 554.357v18.618h101.935l-0.465-28.393c-3.724-24.669-24.669-43.287-49.804-43.287-27.927 0-50.735 22.807-50.735 50.735 0 0.931 0 1.396 0.465 2.327h-1.396zM689.804 829.44c0 0 26.996-177.338 38.167-220.625 11.171 0-99.142 0-99.142 0l-10.705 220.625h71.68zM475.229 829.44h72.611l13.033-220.625h-97.745l12.102 220.625zM462.196 572.975h99.142l0.465-25.135c-1.862-26.065-23.738-46.545-50.269-46.545s-48.407 20.48-50.269 46.545l0.931 25.135zM331.869 829.44h71.68l-10.705-220.625c0 0-69.818 0-95.884 0 11.171 40.029 34.909 220.625 34.909 220.625zM294.633 572.975h99.142l0.931-18.618h-0.465c0-0.931 0.465-1.396 0.465-2.327 0-27.927-22.807-50.735-50.735-50.735-25.6 0-46.080 18.618-49.804 43.287l0.465 28.393zM190.371 829.44h69.818l-29.324-220.625c0 0-71.215 0-97.745 0 27.462 49.804 57.251 220.625 57.251 220.625zM126.604 572.975h99.142c0 0 0-20.015 0-20.945 0-27.927-22.807-50.735-50.735-50.735-24.669 0-45.615 17.687-49.804 41.425l1.396 30.255z" />
16
- <glyph unicode="&#xe606;" d="M865.745 109.848c-25.135-24.669-65.629-24.669-90.764 0l-267.636 263.913-272.756-268.567c-25.135-24.669-65.629-24.669-90.764 0s-25.135 64.698 0 89.367l268.567 264.378-269.033 264.378c-25.135 24.669-25.135 64.698 0 89.367s65.629 24.669 90.764 0l267.636-263.447 272.756 268.567c25.135 24.669 65.629 24.669 90.764 0s25.135-64.698 0-89.367l-268.567-264.378 268.567-264.844c25.135-24.669 25.135-64.698 0.465-89.367z" />
17
  </font></defs></svg>
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M930.909 605.091h-837.818c-20.945 0-46.545-17.222-46.545-38.633v-62.836c0-20.945 25.6-38.167 46.545-38.167h346.298v101.004h153.6v-101.004h337.92c20.945 0 46.545 17.222 46.545 38.633v60.044c0 20.945-25.6 40.96-46.545 40.96zM823.855 902.517c-50.269 50.269-89.833 31.651-115.433 0-46.545-58.647-95.418-103.331-125.207-128.465-6.982 7.913-17.222 13.033-28.393 13.033h-76.8c-11.171 0-21.411-5.12-28.393-13.033-29.789 25.135-78.662 69.818-125.207 128.465-25.6 31.651-65.164 50.269-115.433 0-180.131-180.131 59.113-227.607 98.676-227.607h84.247c0 0-202.938 88.436-140.102 164.771 26.531 32.116 48.407 8.844 83.316-13.964 34.444-22.342 79.127-44.684 109.382-58.647-2.793-5.585-5.12-11.636-5.12-18.153v-38.633c0-20.945 17.222-38.633 38.633-38.633h76.8c20.945 0 38.633 17.222 38.633 38.633v38.633c0 6.516-2.327 12.567-5.12 17.687 30.255 14.429 75.404 36.771 109.847 59.113 34.909 22.807 56.785 45.615 83.316 13.498 62.836-75.869-140.102-164.771-140.102-164.771h84.247c39.098 0.465 278.342 47.942 98.211 228.073zM439.389 410.997c0 0-307.2 0-345.833 0v-372.364c0-20.945 17.222-38.633 38.633-38.633h307.2v410.996zM592.989 410.997v-410.996h299.287c20.945 0 38.633 17.222 38.633 38.633v372.364c-38.633 0-337.92 0-337.92 0z" />
11
+ <glyph unicode="&#xe601;" d="M349.556 716.335c21.876 0 41.425 16.291 41.425 38.633 0 101.935 16.291 126.604 118.225 126.604s118.225-24.669 118.225-126.604c0-21.876 19.084-38.633 41.425-38.633 21.876 0 38.633 16.291 38.633 38.633 0 63.302 2.793 206.196-198.284 206.196s-197.818-142.895-197.818-206.196c2.327-21.876 16.291-38.633 38.167-38.633zM1023.535 47.942l-126.604 602.298c-2.793 16.291-16.291 30.255-33.047 30.255h-703.767c-16.291 0-33.047-13.964-33.047-30.255l-126.604-602.298c-2.793-27.462 11.171-49.338 33.047-49.338h960.233c19.084 0 32.582 21.876 29.789 49.338zM333.265 521.31c-33.047 0-60.509 27.462-60.509 60.509s27.462 60.509 60.509 60.509 60.509-27.462 60.509-60.509-27.462-60.509-60.509-60.509zM690.735 521.31c-33.047 0-60.509 27.462-60.509 60.509s27.462 60.509 60.509 60.509c33.047 0 60.509-27.462 60.509-60.509s-27.462-60.509-60.509-60.509z" />
12
+ <glyph unicode="&#xe602;" d="M976.524 884.364h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.531 0 47.942 23.273 47.942 54.458v123.811c0 31.185-21.411 54.458-47.476 54.458zM976.524 558.546h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.065 0 47.476 23.273 47.476 54.458v124.276c0.465 30.72-20.945 53.993-47.011 53.993zM976.524 232.728h-929.047c-26.065 0-47.476-23.273-47.476-54.458v-124.276c0-27.927 21.411-53.993 47.476-53.993h928.582c26.065 0 47.476 23.273 47.476 54.458v124.276c0.465 30.72-20.945 53.993-47.011 53.993z" />
13
+ <glyph unicode="&#xe603;" d="M848.989 185.717c0-15.424-12.503-27.927-27.927-27.927s-27.927 12.503-27.927 27.927c0 15.424 12.503 27.927 27.927 27.927s27.927-12.503 27.927-27.927zM233.658 184.786c0-15.424-12.503-27.927-27.927-27.927s-27.927 12.503-27.927 27.927c0 15.424 12.503 27.927 27.927 27.927s27.927-12.503 27.927-27.927zM823.389 977.455h-622.778c-110.778 0-200.611-89.833-200.611-200.611v-623.244c0-110.313 89.833-200.145 200.611-200.145h623.244c110.778 0 200.611 89.833 200.611 200.611v622.778c-0.465 110.778-90.298 200.611-201.076 200.611zM642.793 683.288c21.411 0 39.098-17.222 39.098-39.098s-17.687-39.098-39.098-39.098c-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM642.793 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.687-39.098-39.098-39.098s-39.098 17.222-39.098 39.098 17.687 39.098 39.098 39.098zM514.793 683.288c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM514.793 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098 0.465 21.876 17.687 39.098 39.098 39.098zM388.655 683.288c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098s17.222 39.098 39.098 39.098zM388.655 543.186c21.411 0 39.098-17.222 39.098-39.098 0-21.411-17.222-39.098-39.098-39.098-21.411 0-39.098 17.222-39.098 39.098s17.222 39.098 39.098 39.098zM205.731 107.055c-42.822 0-77.731 34.909-77.731 77.731s34.909 78.196 77.731 78.196c43.287 0 78.196-34.909 78.196-78.196 0-42.822-34.909-77.731-78.196-77.731zM566.924 284.393c-37.236 0-51.665 15.825-53.527 20.945-1.862-5.12-15.36-20.945-52.596-20.945-39.098 0-40.495 0-81.92 0-48.873 0-124.742 25.6-147.084 103.796-22.807 77.731-54.458 194.56-68.887 246.691-14.429 52.596-16.291 56.32 8.844 56.32 22.807 0 70.284-3.258 85.644-56.32 14.895-53.062 44.684-153.6 56.32-192.698 16.756-55.855 63.302-61.44 93.556-61.44 40.96 0 63.302 1.396 63.302 33.978 13.033 0.465 33.047 0 42.356 0s29.324 0 42.356 0c0-31.185 22.342-34.444 63.302-33.978 47.011 0.465 84.247 12.567 101.935 71.215 15.825 53.527 59.578 221.556 77.731 294.633 10.705 43.753 63.767 48.873 84.713 48.873 24.669 0.465 15.825-20.015 1.862-75.404-15.36-62.371-56.785-237.847-82.851-317.905-25.6-77.265-88.436-118.225-155.927-118.225-41.425 0.465-40.495 0.465-79.127 0.465zM821.062 107.986c-43.287 0-78.196 34.909-78.196 78.196s34.909 78.196 78.196 78.196c42.822 0 78.196-34.909 78.196-78.196s-35.375-78.196-78.196-78.196z" />
14
+ <glyph unicode="&#xe604;" d="M961.629 121.019c13.498-13.498 21.411-32.582 21.411-51.2 0-19.084-7.913-37.702-21.411-51.2-16.291-16.291-32.582-24.204-51.2-24.204-21.411 0-37.702 7.913-51.2 21.411l-200.145 197.353c-67.491-48.873-146.153-70.284-229.935-70.284-53.993 0-107.985 10.705-156.858 32.582-51.2 21.411-94.487 51.2-129.862 86.575-34.909 34.909-64.698 78.196-86.575 129.862s-32.582 102.865-32.582 156.858 10.705 107.985 32.582 156.858c21.411 51.2 51.2 94.487 86.575 129.862s78.196 64.698 129.862 86.575 102.865 32.582 156.858 32.582 107.985-10.705 156.858-32.582c51.2-21.411 94.487-51.2 129.862-86.575s64.698-78.196 86.575-129.862c21.411-51.2 32.582-102.865 32.582-156.858 0-83.782-24.204-161.978-70.284-229.935l196.887-197.818zM613.004 364.451c51.2 51.2 75.869 110.778 75.869 183.855 0 70.284-24.204 132.655-75.869 183.855s-110.778 75.869-183.855 75.869c-70.284 0-132.655-24.204-183.855-75.869s-75.404-110.778-75.404-183.855c0-70.284 24.204-132.655 75.869-183.855s110.778-75.869 183.855-75.869c69.818 0 132.189 26.996 183.389 75.869z" />
15
+ <glyph unicode="&#xe605;" d="M50.735 50.735c0 9.309 7.447 16.756 16.756 16.756h890.88c9.309 0 16.756-7.447 16.756-16.756v-33.978c0-9.309-7.447-16.756-16.756-16.756h-891.345c-9.309 0-16.756 7.447-16.756 16.756v33.978zM977.455 608.815c-35.84 71.68-51.2 141.498-71.68 257.396 0 6.516-16.291 28.858-35.84 28.858h-715.869c-19.549 0-35.84-22.342-35.84-28.858 0 0-35.84-221.556-71.68-257.396 0-36.305 0-108.451 0-108.451s0.465-1.396 1.396-2.793h-1.396c0 0 3.258-17.687 25.6-27.927 3.258-1.862 6.516-3.258 10.24-4.189v-324.422c0-19.549 20.48-33.047 40.029-33.047h282.065v296.495c0 19.549 18.618 35.375 38.633 35.375h142.429c19.549 0 35.375-15.825 35.375-35.375v-296.495h284.858c19.549 0 35.375 13.498 35.375 33.047v324.422c28.393 4.655 35.84 33.047 35.84 33.047h-0.931c0.465 1.862 0.931 2.793 0.931 2.793s0.465 71.68 0.465 107.52zM327.215 250.415c0-19.549-8.844-35.84-28.393-35.84h-74.007c-19.549 0-28.858 16.291-28.858 35.84v143.36c0 19.549 9.309 35.84 28.858 35.84h74.007c19.549 0 28.393-16.291 28.393-35.84v-143.36zM827.113 250.415c0-19.549-7.913-35.84-27.462-35.84h-73.076c-19.549 0-28.858 16.291-28.858 35.84v143.36c0 19.549 9.309 35.84 28.858 35.84h73.076c19.549 0 27.462-16.291 27.462-35.84v-143.36zM833.629 829.44c0 0 38.167-181.993 61.44-220.625-35.375 0-97.745 0-97.745 0l-35.84 220.625h72.145zM898.327 572.975l-0.465-27.927c-3.258-24.669-24.204-43.753-49.804-43.753-27.927 0-50.269 16.756-50.269 44.684 0 0.931 1.396 26.996 1.396 26.996h99.142zM628.829 554.357v18.618h101.935l-0.465-28.393c-3.724-24.669-24.669-43.287-49.804-43.287-27.927 0-50.735 22.807-50.735 50.735 0 0.931 0 1.396 0.465 2.327h-1.396zM689.804 829.44c0 0 26.996-177.338 38.167-220.625 11.171 0-99.142 0-99.142 0l-10.705 220.625h71.68zM475.229 829.44h72.611l13.033-220.625h-97.745l12.102 220.625zM462.196 572.975h99.142l0.465-25.135c-1.862-26.065-23.738-46.545-50.269-46.545s-48.407 20.48-50.269 46.545l0.931 25.135zM331.869 829.44h71.68l-10.705-220.625c0 0-69.818 0-95.884 0 11.171 40.029 34.909 220.625 34.909 220.625zM294.633 572.975h99.142l0.931-18.618h-0.465c0-0.931 0.465-1.396 0.465-2.327 0-27.927-22.807-50.735-50.735-50.735-25.6 0-46.080 18.618-49.804 43.287l0.465 28.393zM190.371 829.44h69.818l-29.324-220.625c0 0-71.215 0-97.745 0 27.462 49.804 57.251 220.625 57.251 220.625zM126.604 572.975h99.142c0 0 0-20.015 0-20.945 0-27.927-22.807-50.735-50.735-50.735-24.669 0-45.615 17.687-49.804 41.425l1.396 30.255z" />
16
+ <glyph unicode="&#xe606;" d="M865.745 109.848c-25.135-24.669-65.629-24.669-90.764 0l-267.636 263.913-272.756-268.567c-25.135-24.669-65.629-24.669-90.764 0s-25.135 64.698 0 89.367l268.567 264.378-269.033 264.378c-25.135 24.669-25.135 64.698 0 89.367s65.629 24.669 90.764 0l267.636-263.447 272.756 268.567c25.135 24.669 65.629 24.669 90.764 0s25.135-64.698 0-89.367l-268.567-264.378 268.567-264.844c25.135-24.669 25.135-64.698 0.465-89.367z" />
17
  </font></defs></svg>
images/add-store.svg CHANGED
@@ -1,40 +1,40 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
4
- <path class="categories" fill="#D1ECF5" d="M41,49.1H2c-1.1,0-2,0.9-2,2.1V56c0,1.1,0.9,2.1,2,2.1H41c1.1,0,2-0.9,2-2.1v-4.8C43,50,42.1,49.1,41,49.1z"></path>
5
- <path class="categories" fill="#D1ECF5" d="M91,49H52c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H91c1.1,0,2-0.9,2-2.1v-4.8C93,49.9,92.1,49,91,49z"></path>
6
- <path class="categories" fill="#D1ECF5" d="M141,49H102c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H141c1.1,0,2-0.9,2-2.1v-4.8
7
- C143,49.9,142.1,49,141,49z"></path>
8
-
9
- <path class="minicart" fill="#D1ECF5" d="M115.2,8.9c0.8,0,1.5-0.6,1.5-1.4c0-3.7,0.6-4.6,4.3-4.6c3.7,0,4.3,0.9,4.3,4.6c0,0.8,0.7,1.4,1.5,1.4
10
- c0.8,0,1.4-0.6,1.4-1.4c0-2.3,0.1-7.5-7.2-7.5c-7.3,0-7.2,5.2-7.2,7.5C113.9,8.3,114.4,8.9,115.2,8.9z"></path>
11
- <path class="minicart" fill="#D1ECF5" d="M139.7,33.2l-4.6-21.9c-0.1-0.6-0.6-1.1-1.2-1.1h-25.6c-0.6,0-1.2,0.5-1.2,1.1l-4.6,21.9
12
- c-0.1,1,0.4,1.8,1.2,1.8h34.9C139.3,35,139.8,34.2,139.7,33.2z M114.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2
13
- S115.8,16,114.6,16z M127.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2S128.8,16,127.6,16z"></path>
14
-
15
- <path class="productbrowser" fill="#D1ECF5" d="M40.1,72H2.9C1.4,72,0,73.4,0,74.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
16
- C43,73.4,41.6,72,40.1,72z M30.1,112.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
17
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
18
- <path class="productbrowser" fill="#D1ECF5" d="M90.1,72H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
19
- C93,73.4,91.6,72,90.1,72z M80.1,112.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
20
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
21
- <path class="productbrowser" fill="#D1ECF5" d="M140.1,72h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
22
- C143,73.4,141.6,72,140.1,72z M130.1,112.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
23
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
24
- <path class="productbrowser" fill="#D1ECF5" d="M40.1,123H2.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
25
- C43,124.4,41.6,123,40.1,123z M30.1,163.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
26
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
27
- <path class="productbrowser" fill="#D1ECF5" d="M90.1,123H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
28
- C93,124.4,91.6,123,90.1,123z M80.1,163.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
29
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
30
- <path class="productbrowser" fill="#D1ECF5" d="M140.1,123h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
31
- C143,124.4,141.6,123,140.1,123z M130.1,163.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
32
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
33
-
34
- <path class="search" fill="#D1ECF5" d="M38.2,31.3c0.5,0.5,0.8,1.2,0.8,1.9c0,0.7-0.3,1.4-0.8,1.9C37.6,35.7,37,36,36.3,36c-0.8,0-1.4-0.3-1.9-0.8
35
- L27,27.9c-2.5,1.8-5.4,2.6-8.5,2.6c-2,0-4-0.4-5.8-1.2c-1.9-0.8-3.5-1.9-4.8-3.2c-1.3-1.3-2.4-2.9-3.2-4.8c-0.8-1.9-1.2-3.8-1.2-5.8
36
- s0.4-4,1.2-5.8c0.8-1.9,1.9-3.5,3.2-4.8c1.3-1.3,2.9-2.4,4.8-3.2c1.9-0.8,3.8-1.2,5.8-1.2s4,0.4,5.8,1.2c1.9,0.8,3.5,1.9,4.8,3.2
37
- c1.3,1.3,2.4,2.9,3.2,4.8c0.8,1.9,1.2,3.8,1.2,5.8c0,3.1-0.9,6-2.6,8.5L38.2,31.3L38.2,31.3z M25.3,22.3c1.9-1.9,2.8-4.1,2.8-6.8
38
- c0-2.6-0.9-4.9-2.8-6.8c-1.9-1.9-4.1-2.8-6.8-2.8c-2.6,0-4.9,0.9-6.8,2.8c-1.9,1.9-2.8,4.1-2.8,6.8c0,2.6,0.9,4.9,2.8,6.8
39
- c1.9,1.9,4.1,2.8,6.8,2.8C21.1,25.1,23.4,24.1,25.3,22.3z"></path>
40
  </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
4
+ <path class="categories" fill="#D1ECF5" d="M41,49.1H2c-1.1,0-2,0.9-2,2.1V56c0,1.1,0.9,2.1,2,2.1H41c1.1,0,2-0.9,2-2.1v-4.8C43,50,42.1,49.1,41,49.1z"></path>
5
+ <path class="categories" fill="#D1ECF5" d="M91,49H52c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H91c1.1,0,2-0.9,2-2.1v-4.8C93,49.9,92.1,49,91,49z"></path>
6
+ <path class="categories" fill="#D1ECF5" d="M141,49H102c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H141c1.1,0,2-0.9,2-2.1v-4.8
7
+ C143,49.9,142.1,49,141,49z"></path>
8
+
9
+ <path class="minicart" fill="#D1ECF5" d="M115.2,8.9c0.8,0,1.5-0.6,1.5-1.4c0-3.7,0.6-4.6,4.3-4.6c3.7,0,4.3,0.9,4.3,4.6c0,0.8,0.7,1.4,1.5,1.4
10
+ c0.8,0,1.4-0.6,1.4-1.4c0-2.3,0.1-7.5-7.2-7.5c-7.3,0-7.2,5.2-7.2,7.5C113.9,8.3,114.4,8.9,115.2,8.9z"></path>
11
+ <path class="minicart" fill="#D1ECF5" d="M139.7,33.2l-4.6-21.9c-0.1-0.6-0.6-1.1-1.2-1.1h-25.6c-0.6,0-1.2,0.5-1.2,1.1l-4.6,21.9
12
+ c-0.1,1,0.4,1.8,1.2,1.8h34.9C139.3,35,139.8,34.2,139.7,33.2z M114.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2
13
+ S115.8,16,114.6,16z M127.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2S128.8,16,127.6,16z"></path>
14
+
15
+ <path class="productbrowser" fill="#D1ECF5" d="M40.1,72H2.9C1.4,72,0,73.4,0,74.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
16
+ C43,73.4,41.6,72,40.1,72z M30.1,112.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
17
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
18
+ <path class="productbrowser" fill="#D1ECF5" d="M90.1,72H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
19
+ C93,73.4,91.6,72,90.1,72z M80.1,112.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
20
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
21
+ <path class="productbrowser" fill="#D1ECF5" d="M140.1,72h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
22
+ C143,73.4,141.6,72,140.1,72z M130.1,112.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
23
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"></path>
24
+ <path class="productbrowser" fill="#D1ECF5" d="M40.1,123H2.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
25
+ C43,124.4,41.6,123,40.1,123z M30.1,163.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
26
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
27
+ <path class="productbrowser" fill="#D1ECF5" d="M90.1,123H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
28
+ C93,124.4,91.6,123,90.1,123z M80.1,163.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
29
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
30
+ <path class="productbrowser" fill="#D1ECF5" d="M140.1,123h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
31
+ C143,124.4,141.6,123,140.1,123z M130.1,163.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
32
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"></path>
33
+
34
+ <path class="search" fill="#D1ECF5" d="M38.2,31.3c0.5,0.5,0.8,1.2,0.8,1.9c0,0.7-0.3,1.4-0.8,1.9C37.6,35.7,37,36,36.3,36c-0.8,0-1.4-0.3-1.9-0.8
35
+ L27,27.9c-2.5,1.8-5.4,2.6-8.5,2.6c-2,0-4-0.4-5.8-1.2c-1.9-0.8-3.5-1.9-4.8-3.2c-1.3-1.3-2.4-2.9-3.2-4.8c-0.8-1.9-1.2-3.8-1.2-5.8
36
+ s0.4-4,1.2-5.8c0.8-1.9,1.9-3.5,3.2-4.8c1.3-1.3,2.9-2.4,4.8-3.2c1.9-0.8,3.8-1.2,5.8-1.2s4,0.4,5.8,1.2c1.9,0.8,3.5,1.9,4.8,3.2
37
+ c1.3,1.3,2.4,2.9,3.2,4.8c0.8,1.9,1.2,3.8,1.2,5.8c0,3.1-0.9,6-2.6,8.5L38.2,31.3L38.2,31.3z M25.3,22.3c1.9-1.9,2.8-4.1,2.8-6.8
38
+ c0-2.6-0.9-4.9-2.8-6.8c-1.9-1.9-4.1-2.8-6.8-2.8c-2.6,0-4.9,0.9-6.8,2.8c-1.9,1.9-2.8,4.1-2.8,6.8c0,2.6,0.9,4.9,2.8,6.8
39
+ c1.9,1.9,4.1,2.8,6.8,2.8C21.1,25.1,23.4,24.1,25.3,22.3z"></path>
40
  </svg>
images/black-app-store.svg CHANGED
@@ -1,3 +1,3 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg width="136" height="42" viewBox="0 0 136 42" xmlns="http://www.w3.org/2000/svg"><title>black download on the app store</title><g fill="none" fill-rule="evenodd"><g><rect fill="#050708" width="136" height="42" rx="7"/><path d="M30.045 20.85c-.03-3.496 2.806-5.197 2.936-5.276-1.606-2.39-4.097-2.716-4.972-2.742-2.092-.225-4.12 1.277-5.187 1.277-1.086 0-2.727-1.257-4.496-1.22-2.276.036-4.405 1.38-5.573 3.468-2.41 4.255-.612 10.51 1.697 13.95 1.155 1.684 2.505 3.565 4.272 3.5 1.727-.073 2.373-1.125 4.458-1.125 2.067 0 2.673 1.124 4.475 1.082 1.854-.03 3.022-1.692 4.137-3.392 1.335-1.93 1.87-3.833 1.892-3.93-.044-.016-3.602-1.4-3.637-5.592zM26.276 10.396c.873-1.113 1.47-2.627 1.304-4.164-1.263.057-2.844.89-3.754 1.98-.806.96-1.525 2.532-1.34 4.01 1.42.11 2.878-.73 3.79-1.826z" fill="#FFF"/></g><g fill="#FFF"><path d="M50.698 32.17h-2.39L47 27.992h-4.55l-1.245 4.178H38.88l4.505-14.223h2.784l4.528 14.223zm-4.092-5.93l-1.184-3.714c-.125-.38-.36-1.273-.706-2.68h-.042c-.138.605-.36 1.5-.665 2.68l-1.163 3.713h3.76zM62.288 26.916c0 1.744-.464 3.123-1.392 4.135-.83.902-1.863 1.352-3.095 1.352-1.33 0-2.284-.485-2.866-1.456h-.042v5.403H52.65V25.29c0-1.096-.03-2.222-.084-3.376h1.973l.124 1.626h.042c.748-1.225 1.883-1.836 3.406-1.836 1.19 0 2.185.477 2.98 1.434.798.957 1.196 2.216 1.196 3.778zM60.003 27c0-1-.22-1.822-.665-2.47-.485-.675-1.136-1.013-1.953-1.013-.553 0-1.056.188-1.505.56-.45.373-.745.862-.883 1.467-.07.282-.104.513-.104.694v1.71c0 .746.225 1.376.676 1.89.45.514 1.034.77 1.753.77.845 0 1.502-.33 1.973-.99.47-.663.707-1.535.707-2.62zM73.898 26.916c0 1.744-.464 3.123-1.393 4.135-.83.902-1.862 1.352-3.093 1.352-1.33 0-2.285-.485-2.866-1.456h-.042v5.403H64.26V25.29c0-1.096-.027-2.222-.082-3.376h1.972l.126 1.626h.042c.747-1.225 1.882-1.836 3.406-1.836 1.19 0 2.184.477 2.98 1.434.796.957 1.194 2.216 1.194 3.778zM71.613 27c0-1-.222-1.822-.666-2.47-.484-.675-1.134-1.013-1.95-1.013-.555 0-1.057.188-1.507.56-.45.373-.744.862-.882 1.467-.068.282-.104.513-.104.694v1.71c0 .746.225 1.376.673 1.89.45.513 1.035.77 1.757.77.845 0 1.502-.33 1.972-.99.472-.663.707-1.535.707-2.62zM86.88 28.18c0 1.21-.414 2.195-1.244 2.955-.912.83-2.18 1.245-3.813 1.245-1.507 0-2.714-.295-3.628-.886l.52-1.9c.984.606 2.064.91 3.24.91.846 0 1.504-.195 1.976-.582.47-.387.706-.906.706-1.554 0-.577-.194-1.063-.582-1.457-.386-.394-1.03-.76-1.93-1.1-2.452-.928-3.677-2.288-3.677-4.078 0-1.17.43-2.127 1.29-2.873.855-.748 1.998-1.12 3.426-1.12 1.274 0 2.332.224 3.177.674l-.56 1.858c-.79-.437-1.682-.655-2.68-.655-.79 0-1.405.198-1.847.59-.374.353-.56.782-.56 1.29 0 .56.213 1.026.642 1.392.373.337 1.052.702 2.036 1.096 1.206.493 2.09 1.07 2.66 1.73.567.658.85 1.482.85 2.465zM94.295 23.624h-2.472v4.98c0 1.266.436 1.9 1.31 1.9.4 0 .732-.037.995-.107l.062 1.73c-.442.168-1.024.252-1.744.252-.886 0-1.578-.275-2.078-.824-.497-.55-.748-1.47-.748-2.764v-5.17h-1.473v-1.71h1.473v-1.878l2.203-.675v2.552h2.472v1.712zM105.45 26.958c0 1.576-.445 2.87-1.33 3.882-.93 1.042-2.162 1.562-3.7 1.562-1.48 0-2.66-.5-3.54-1.497-.878-1-1.318-2.26-1.318-3.777 0-1.59.452-2.89 1.36-3.904.906-1.013 2.128-1.52 3.665-1.52 1.48 0 2.673.5 3.573 1.5.86.968 1.29 2.22 1.29 3.754zm-2.328.073c0-.944-.198-1.756-.6-2.432-.472-.82-1.144-1.227-2.015-1.227-.9 0-1.586.41-2.056 1.228-.402.677-.6 1.5-.6 2.476 0 .946.198 1.757.6 2.433.486.818 1.163 1.227 2.037 1.227.856 0 1.53-.417 2.014-1.25.414-.688.622-1.508.622-2.453zM112.74 23.918c-.222-.042-.46-.063-.707-.063-.79 0-1.4.302-1.83.908-.372.535-.56 1.21-.56 2.026v5.38h-2.24l.02-7.026c0-1.182-.028-2.258-.084-3.23h1.952l.082 1.963h.062c.237-.674.61-1.217 1.122-1.624.5-.367 1.04-.55 1.62-.55.208 0 .395.016.562.042v2.173zM122.77 26.557c0 .408-.026.752-.082 1.033h-6.728c.026 1.013.35 1.788.976 2.323.567.477 1.3.717 2.2.717.997 0 1.906-.162 2.723-.485l.35 1.58c-.955.425-2.082.635-3.384.635-1.565 0-2.794-.468-3.688-1.403-.892-.935-1.34-2.19-1.34-3.766 0-1.546.417-2.834 1.25-3.86.87-1.097 2.047-1.646 3.528-1.646 1.455 0 2.556.55 3.304 1.645.593.87.89 1.948.89 3.227zm-2.138-.59c.014-.677-.132-1.26-.436-1.753-.388-.634-.985-.95-1.787-.95-.734 0-1.33.31-1.786.93-.374.49-.596 1.082-.664 1.77h4.672v.002z"/></g><g fill="#FFF"><path d="M45.864 9.947c0 1.258-.37 2.205-1.113 2.84-.686.588-1.662.882-2.927.882-.627 0-1.163-.03-1.612-.085V6.712c.587-.096 1.218-.145 1.9-.145 1.204 0 2.112.266 2.724.798.686.602 1.03 1.462 1.03 2.582zm-1.162.03c0-.814-.213-1.44-.638-1.876-.425-.434-1.046-.652-1.863-.652-.346 0-.642.024-.887.073v5.226c.136.022.384.03.745.03.844 0 1.495-.237 1.953-.714.46-.476.692-1.17.692-2.084zM52.028 11.046c0 .775-.218 1.41-.654 1.908-.456.51-1.06.767-1.817.767-.727 0-1.307-.244-1.74-.735-.43-.49-.646-1.11-.646-1.856 0-.78.223-1.42.67-1.918.445-.497 1.044-.746 1.8-.746.728 0 1.312.245 1.755.735.42.478.633 1.093.633 1.846zm-1.144.036c0-.465-.1-.863-.296-1.196-.23-.402-.56-.603-.988-.603-.443 0-.78.2-1.01.603-.2.333-.297.738-.297 1.216 0 .465.1.864.296 1.196.237.402.57.603 1 .603.42 0 .75-.203.988-.612.204-.34.306-.74.306-1.206zM60.292 8.568l-1.552 5.04h-1.01l-.642-2.19c-.163-.545-.296-1.088-.4-1.627h-.02c-.095.555-.227 1.097-.398 1.63l-.683 2.187h-1.02l-1.46-5.04h1.133l.56 2.396c.136.567.248 1.107.337 1.618h.02c.082-.42.218-.957.41-1.606l.703-2.405h.9l.673 2.353c.163.574.296 1.126.398 1.66h.03c.076-.52.188-1.072.338-1.66l.6-2.354h1.084v-.002zM66.007 13.607h-1.102V10.72c0-.888-.333-1.333-1-1.333-.327 0-.59.122-.796.367-.204.244-.307.533-.307.863v2.988H61.7v-3.597c0-.442-.013-.922-.04-1.442h.97l.05.788h.03c.13-.245.32-.447.573-.608.298-.188.633-.283 1-.283.462 0 .847.15 1.153.456.38.372.57.93.57 1.668v3.02zM69.048 13.607h-1.102v-7.35h1.102v7.35zM75.538 11.046c0 .775-.217 1.41-.653 1.908-.457.51-1.062.767-1.817.767-.73 0-1.308-.244-1.74-.735-.43-.49-.647-1.11-.647-1.856 0-.78.223-1.42.67-1.918.445-.497 1.045-.746 1.8-.746.728 0 1.312.245 1.756.735.42.478.632 1.093.632 1.846zm-1.144.036c0-.465-.1-.863-.296-1.196-.23-.402-.56-.603-.988-.603-.444 0-.78.2-1.01.603-.198.333-.296.738-.296 1.216 0 .465.1.864.295 1.196.238.402.57.603 1 .603.42 0 .75-.203.988-.612.205-.34.306-.74.306-1.206zM80.874 13.607h-.99l-.082-.58h-.03c-.34.462-.822.694-1.45.694-.467 0-.846-.152-1.13-.455-.26-.276-.39-.62-.39-1.026 0-.617.253-1.086.76-1.41.508-.326 1.222-.485 2.14-.478v-.094c0-.664-.343-.995-1.03-.995-.49 0-.92.125-1.293.373l-.225-.735c.46-.29 1.03-.434 1.7-.434 1.297 0 1.947.695 1.947 2.084v1.855c0 .504.025.904.072 1.202zm-1.145-1.732v-.777c-1.217-.02-1.825.318-1.825 1.015 0 .263.07.46.212.59.142.133.323.198.538.198.242 0 .468-.077.675-.232.207-.156.334-.354.382-.596.01-.055.017-.12.017-.197zM87.14 13.607h-.98l-.05-.81h-.032c-.312.616-.845.924-1.593.924-.597 0-1.095-.237-1.49-.714-.394-.477-.59-1.096-.59-1.855 0-.815.213-1.475.642-1.98.416-.47.925-.705 1.53-.705.667 0 1.133.227 1.398.684h.02V6.256H87.1v5.992c0 .49.012.942.04 1.357zm-1.144-2.125v-.84c0-.146-.01-.263-.03-.353-.062-.27-.196-.497-.4-.68-.204-.182-.45-.274-.737-.274-.412 0-.734.165-.97.498-.235.332-.354.757-.354 1.275 0 .497.113.9.34 1.212.238.33.56.497.962.497.362 0 .652-.14.87-.416.214-.255.318-.563.318-.922zM96.567 11.046c0 .775-.217 1.41-.653 1.908-.456.51-1.06.767-1.817.767-.726 0-1.306-.244-1.74-.735-.43-.49-.647-1.11-.647-1.856 0-.78.222-1.42.668-1.918.447-.497 1.046-.746 1.803-.746.727 0 1.313.245 1.755.735.42.478.632 1.093.632 1.846zm-1.142.036c0-.465-.1-.863-.296-1.196-.233-.402-.56-.603-.99-.603-.442 0-.78.2-1.01.603-.2.333-.297.738-.297 1.216 0 .465.1.864.296 1.196.237.402.57.603 1 .603.42 0 .75-.203.99-.612.202-.34.305-.74.305-1.206zM102.495 13.607h-1.1V10.72c0-.888-.333-1.333-1-1.333-.33 0-.593.122-.797.367-.204.244-.306.533-.306.863v2.988H98.19v-3.597c0-.442-.014-.922-.04-1.442h.967l.052.788h.03c.13-.245.32-.447.57-.608.3-.188.634-.283 1-.283.463 0 .848.15 1.154.456.382.372.57.93.57 1.668v3.02zM109.915 9.407H108.7v2.448c0 .622.217.933.644.933.198 0 .362-.017.49-.053l.03.85c-.218.084-.504.125-.857.125-.435 0-.774-.134-1.02-.404-.245-.27-.367-.722-.367-1.358v-2.54h-.725v-.84h.725v-.923l1.08-.33v1.252h1.214v.84zM115.75 13.607h-1.102v-2.865c0-.903-.332-1.355-.998-1.355-.512 0-.86.262-1.052.786-.033.11-.052.244-.052.403v3.03h-1.1v-7.35h1.1v3.037h.02c.348-.553.846-.828 1.49-.828.457 0 .835.152 1.135.456.374.38.56.945.56 1.69v2.997zM121.772 10.85c0 .2-.015.37-.04.507h-3.307c.014.498.172.877.478 1.14.28.235.64.353 1.083.353.49 0 .935-.08 1.337-.238l.172.778c-.47.207-1.023.31-1.664.31-.767 0-1.372-.23-1.81-.69-.44-.458-.657-1.075-.657-1.85 0-.76.203-1.39.612-1.896.427-.538 1.005-.808 1.734-.808.712 0 1.254.27 1.62.808.296.428.442.957.442 1.585zm-1.052-.29c.008-.333-.064-.62-.214-.86-.19-.312-.482-.468-.877-.468-.36 0-.654.152-.878.456-.183.243-.292.533-.327.872h2.295z"/></g></g></svg>
3
-
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="136" height="42" viewBox="0 0 136 42" xmlns="http://www.w3.org/2000/svg"><title>black download on the app store</title><g fill="none" fill-rule="evenodd"><g><rect fill="#050708" width="136" height="42" rx="7"/><path d="M30.045 20.85c-.03-3.496 2.806-5.197 2.936-5.276-1.606-2.39-4.097-2.716-4.972-2.742-2.092-.225-4.12 1.277-5.187 1.277-1.086 0-2.727-1.257-4.496-1.22-2.276.036-4.405 1.38-5.573 3.468-2.41 4.255-.612 10.51 1.697 13.95 1.155 1.684 2.505 3.565 4.272 3.5 1.727-.073 2.373-1.125 4.458-1.125 2.067 0 2.673 1.124 4.475 1.082 1.854-.03 3.022-1.692 4.137-3.392 1.335-1.93 1.87-3.833 1.892-3.93-.044-.016-3.602-1.4-3.637-5.592zM26.276 10.396c.873-1.113 1.47-2.627 1.304-4.164-1.263.057-2.844.89-3.754 1.98-.806.96-1.525 2.532-1.34 4.01 1.42.11 2.878-.73 3.79-1.826z" fill="#FFF"/></g><g fill="#FFF"><path d="M50.698 32.17h-2.39L47 27.992h-4.55l-1.245 4.178H38.88l4.505-14.223h2.784l4.528 14.223zm-4.092-5.93l-1.184-3.714c-.125-.38-.36-1.273-.706-2.68h-.042c-.138.605-.36 1.5-.665 2.68l-1.163 3.713h3.76zM62.288 26.916c0 1.744-.464 3.123-1.392 4.135-.83.902-1.863 1.352-3.095 1.352-1.33 0-2.284-.485-2.866-1.456h-.042v5.403H52.65V25.29c0-1.096-.03-2.222-.084-3.376h1.973l.124 1.626h.042c.748-1.225 1.883-1.836 3.406-1.836 1.19 0 2.185.477 2.98 1.434.798.957 1.196 2.216 1.196 3.778zM60.003 27c0-1-.22-1.822-.665-2.47-.485-.675-1.136-1.013-1.953-1.013-.553 0-1.056.188-1.505.56-.45.373-.745.862-.883 1.467-.07.282-.104.513-.104.694v1.71c0 .746.225 1.376.676 1.89.45.514 1.034.77 1.753.77.845 0 1.502-.33 1.973-.99.47-.663.707-1.535.707-2.62zM73.898 26.916c0 1.744-.464 3.123-1.393 4.135-.83.902-1.862 1.352-3.093 1.352-1.33 0-2.285-.485-2.866-1.456h-.042v5.403H64.26V25.29c0-1.096-.027-2.222-.082-3.376h1.972l.126 1.626h.042c.747-1.225 1.882-1.836 3.406-1.836 1.19 0 2.184.477 2.98 1.434.796.957 1.194 2.216 1.194 3.778zM71.613 27c0-1-.222-1.822-.666-2.47-.484-.675-1.134-1.013-1.95-1.013-.555 0-1.057.188-1.507.56-.45.373-.744.862-.882 1.467-.068.282-.104.513-.104.694v1.71c0 .746.225 1.376.673 1.89.45.513 1.035.77 1.757.77.845 0 1.502-.33 1.972-.99.472-.663.707-1.535.707-2.62zM86.88 28.18c0 1.21-.414 2.195-1.244 2.955-.912.83-2.18 1.245-3.813 1.245-1.507 0-2.714-.295-3.628-.886l.52-1.9c.984.606 2.064.91 3.24.91.846 0 1.504-.195 1.976-.582.47-.387.706-.906.706-1.554 0-.577-.194-1.063-.582-1.457-.386-.394-1.03-.76-1.93-1.1-2.452-.928-3.677-2.288-3.677-4.078 0-1.17.43-2.127 1.29-2.873.855-.748 1.998-1.12 3.426-1.12 1.274 0 2.332.224 3.177.674l-.56 1.858c-.79-.437-1.682-.655-2.68-.655-.79 0-1.405.198-1.847.59-.374.353-.56.782-.56 1.29 0 .56.213 1.026.642 1.392.373.337 1.052.702 2.036 1.096 1.206.493 2.09 1.07 2.66 1.73.567.658.85 1.482.85 2.465zM94.295 23.624h-2.472v4.98c0 1.266.436 1.9 1.31 1.9.4 0 .732-.037.995-.107l.062 1.73c-.442.168-1.024.252-1.744.252-.886 0-1.578-.275-2.078-.824-.497-.55-.748-1.47-.748-2.764v-5.17h-1.473v-1.71h1.473v-1.878l2.203-.675v2.552h2.472v1.712zM105.45 26.958c0 1.576-.445 2.87-1.33 3.882-.93 1.042-2.162 1.562-3.7 1.562-1.48 0-2.66-.5-3.54-1.497-.878-1-1.318-2.26-1.318-3.777 0-1.59.452-2.89 1.36-3.904.906-1.013 2.128-1.52 3.665-1.52 1.48 0 2.673.5 3.573 1.5.86.968 1.29 2.22 1.29 3.754zm-2.328.073c0-.944-.198-1.756-.6-2.432-.472-.82-1.144-1.227-2.015-1.227-.9 0-1.586.41-2.056 1.228-.402.677-.6 1.5-.6 2.476 0 .946.198 1.757.6 2.433.486.818 1.163 1.227 2.037 1.227.856 0 1.53-.417 2.014-1.25.414-.688.622-1.508.622-2.453zM112.74 23.918c-.222-.042-.46-.063-.707-.063-.79 0-1.4.302-1.83.908-.372.535-.56 1.21-.56 2.026v5.38h-2.24l.02-7.026c0-1.182-.028-2.258-.084-3.23h1.952l.082 1.963h.062c.237-.674.61-1.217 1.122-1.624.5-.367 1.04-.55 1.62-.55.208 0 .395.016.562.042v2.173zM122.77 26.557c0 .408-.026.752-.082 1.033h-6.728c.026 1.013.35 1.788.976 2.323.567.477 1.3.717 2.2.717.997 0 1.906-.162 2.723-.485l.35 1.58c-.955.425-2.082.635-3.384.635-1.565 0-2.794-.468-3.688-1.403-.892-.935-1.34-2.19-1.34-3.766 0-1.546.417-2.834 1.25-3.86.87-1.097 2.047-1.646 3.528-1.646 1.455 0 2.556.55 3.304 1.645.593.87.89 1.948.89 3.227zm-2.138-.59c.014-.677-.132-1.26-.436-1.753-.388-.634-.985-.95-1.787-.95-.734 0-1.33.31-1.786.93-.374.49-.596 1.082-.664 1.77h4.672v.002z"/></g><g fill="#FFF"><path d="M45.864 9.947c0 1.258-.37 2.205-1.113 2.84-.686.588-1.662.882-2.927.882-.627 0-1.163-.03-1.612-.085V6.712c.587-.096 1.218-.145 1.9-.145 1.204 0 2.112.266 2.724.798.686.602 1.03 1.462 1.03 2.582zm-1.162.03c0-.814-.213-1.44-.638-1.876-.425-.434-1.046-.652-1.863-.652-.346 0-.642.024-.887.073v5.226c.136.022.384.03.745.03.844 0 1.495-.237 1.953-.714.46-.476.692-1.17.692-2.084zM52.028 11.046c0 .775-.218 1.41-.654 1.908-.456.51-1.06.767-1.817.767-.727 0-1.307-.244-1.74-.735-.43-.49-.646-1.11-.646-1.856 0-.78.223-1.42.67-1.918.445-.497 1.044-.746 1.8-.746.728 0 1.312.245 1.755.735.42.478.633 1.093.633 1.846zm-1.144.036c0-.465-.1-.863-.296-1.196-.23-.402-.56-.603-.988-.603-.443 0-.78.2-1.01.603-.2.333-.297.738-.297 1.216 0 .465.1.864.296 1.196.237.402.57.603 1 .603.42 0 .75-.203.988-.612.204-.34.306-.74.306-1.206zM60.292 8.568l-1.552 5.04h-1.01l-.642-2.19c-.163-.545-.296-1.088-.4-1.627h-.02c-.095.555-.227 1.097-.398 1.63l-.683 2.187h-1.02l-1.46-5.04h1.133l.56 2.396c.136.567.248 1.107.337 1.618h.02c.082-.42.218-.957.41-1.606l.703-2.405h.9l.673 2.353c.163.574.296 1.126.398 1.66h.03c.076-.52.188-1.072.338-1.66l.6-2.354h1.084v-.002zM66.007 13.607h-1.102V10.72c0-.888-.333-1.333-1-1.333-.327 0-.59.122-.796.367-.204.244-.307.533-.307.863v2.988H61.7v-3.597c0-.442-.013-.922-.04-1.442h.97l.05.788h.03c.13-.245.32-.447.573-.608.298-.188.633-.283 1-.283.462 0 .847.15 1.153.456.38.372.57.93.57 1.668v3.02zM69.048 13.607h-1.102v-7.35h1.102v7.35zM75.538 11.046c0 .775-.217 1.41-.653 1.908-.457.51-1.062.767-1.817.767-.73 0-1.308-.244-1.74-.735-.43-.49-.647-1.11-.647-1.856 0-.78.223-1.42.67-1.918.445-.497 1.045-.746 1.8-.746.728 0 1.312.245 1.756.735.42.478.632 1.093.632 1.846zm-1.144.036c0-.465-.1-.863-.296-1.196-.23-.402-.56-.603-.988-.603-.444 0-.78.2-1.01.603-.198.333-.296.738-.296 1.216 0 .465.1.864.295 1.196.238.402.57.603 1 .603.42 0 .75-.203.988-.612.205-.34.306-.74.306-1.206zM80.874 13.607h-.99l-.082-.58h-.03c-.34.462-.822.694-1.45.694-.467 0-.846-.152-1.13-.455-.26-.276-.39-.62-.39-1.026 0-.617.253-1.086.76-1.41.508-.326 1.222-.485 2.14-.478v-.094c0-.664-.343-.995-1.03-.995-.49 0-.92.125-1.293.373l-.225-.735c.46-.29 1.03-.434 1.7-.434 1.297 0 1.947.695 1.947 2.084v1.855c0 .504.025.904.072 1.202zm-1.145-1.732v-.777c-1.217-.02-1.825.318-1.825 1.015 0 .263.07.46.212.59.142.133.323.198.538.198.242 0 .468-.077.675-.232.207-.156.334-.354.382-.596.01-.055.017-.12.017-.197zM87.14 13.607h-.98l-.05-.81h-.032c-.312.616-.845.924-1.593.924-.597 0-1.095-.237-1.49-.714-.394-.477-.59-1.096-.59-1.855 0-.815.213-1.475.642-1.98.416-.47.925-.705 1.53-.705.667 0 1.133.227 1.398.684h.02V6.256H87.1v5.992c0 .49.012.942.04 1.357zm-1.144-2.125v-.84c0-.146-.01-.263-.03-.353-.062-.27-.196-.497-.4-.68-.204-.182-.45-.274-.737-.274-.412 0-.734.165-.97.498-.235.332-.354.757-.354 1.275 0 .497.113.9.34 1.212.238.33.56.497.962.497.362 0 .652-.14.87-.416.214-.255.318-.563.318-.922zM96.567 11.046c0 .775-.217 1.41-.653 1.908-.456.51-1.06.767-1.817.767-.726 0-1.306-.244-1.74-.735-.43-.49-.647-1.11-.647-1.856 0-.78.222-1.42.668-1.918.447-.497 1.046-.746 1.803-.746.727 0 1.313.245 1.755.735.42.478.632 1.093.632 1.846zm-1.142.036c0-.465-.1-.863-.296-1.196-.233-.402-.56-.603-.99-.603-.442 0-.78.2-1.01.603-.2.333-.297.738-.297 1.216 0 .465.1.864.296 1.196.237.402.57.603 1 .603.42 0 .75-.203.99-.612.202-.34.305-.74.305-1.206zM102.495 13.607h-1.1V10.72c0-.888-.333-1.333-1-1.333-.33 0-.593.122-.797.367-.204.244-.306.533-.306.863v2.988H98.19v-3.597c0-.442-.014-.922-.04-1.442h.967l.052.788h.03c.13-.245.32-.447.57-.608.3-.188.634-.283 1-.283.463 0 .848.15 1.154.456.382.372.57.93.57 1.668v3.02zM109.915 9.407H108.7v2.448c0 .622.217.933.644.933.198 0 .362-.017.49-.053l.03.85c-.218.084-.504.125-.857.125-.435 0-.774-.134-1.02-.404-.245-.27-.367-.722-.367-1.358v-2.54h-.725v-.84h.725v-.923l1.08-.33v1.252h1.214v.84zM115.75 13.607h-1.102v-2.865c0-.903-.332-1.355-.998-1.355-.512 0-.86.262-1.052.786-.033.11-.052.244-.052.403v3.03h-1.1v-7.35h1.1v3.037h.02c.348-.553.846-.828 1.49-.828.457 0 .835.152 1.135.456.374.38.56.945.56 1.69v2.997zM121.772 10.85c0 .2-.015.37-.04.507h-3.307c.014.498.172.877.478 1.14.28.235.64.353 1.083.353.49 0 .935-.08 1.337-.238l.172.778c-.47.207-1.023.31-1.664.31-.767 0-1.372-.23-1.81-.69-.44-.458-.657-1.075-.657-1.85 0-.76.203-1.39.612-1.896.427-.538 1.005-.808 1.734-.808.712 0 1.254.27 1.62.808.296.428.442.957.442 1.585zm-1.052-.29c.008-.333-.064-.62-.214-.86-.19-.312-.482-.468-.877-.468-.36 0-.654.152-.878.456-.183.243-.292.533-.327.872h2.295z"/></g></g></svg>
3
+
images/black-google.svg CHANGED
@@ -1,2 +1,2 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
  <svg width="136" height="42" viewBox="0 0 136 42" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>black get it on google</title><defs><linearGradient x1="19.215%" y1="-35.157%" x2="69.302%" y2="93.537%" id="b"><stop stop-color="#19A3B4" offset="0%"/><stop stop-color="#5BC3AF" offset="34.817%"/><stop stop-color="#C9F7A6" offset="92.234%"/><stop stop-color="#D7FEA5" offset="100%"/></linearGradient><path id="a" d="M13.983 7.228L1.547.216C1.194.018.87-.028.607.056L10.79 10.502l3.19-3.272"/><linearGradient x1="-14.698%" y1="-114.322%" x2="74.844%" y2="114.156%" id="c"><stop stop-color="#FC227C" offset="0%"/><stop stop-color="#FEEB7B" offset="100%"/></linearGradient><linearGradient x1="28.151%" y1="-14.814%" x2="48.188%" y2="82.894%" id="e"><stop stop-color="#0E4DA0" offset="0%"/><stop stop-color="#6BFED4" offset="100%"/></linearGradient><path id="d" d="M.605.057C.227.177-.018.57-.018 1.165l.002 18.697c0 .587.238.974.605 1.103L10.79 10.503.605.057"/><linearGradient x1="132.245%" y1="16.466%" x2="5.959%" y2="126.31%" id="g"><stop stop-color="#FC472E" offset="0%"/><stop stop-color="#FC472E" offset=".332%"/><stop stop-color="#893CD8" offset="100%"/></linearGradient><path id="f" d="M.59 20.965c.264.092.596.05.957-.154l12.45-7.02-3.205-3.287L.59 20.965"/><path id="h" d="M0 .054h91.96V18H0V.054z"/><path id="j" d="M0 .143h38.904V7H0V.143z"/><path id="l" d="M0 .143h38.904V7H0V.143z"/></defs><g fill="none" fill-rule="evenodd"><rect fill="#000" width="136" height="42" rx="7"/><g transform="translate(11 15)"><use fill="url(#b)" xlink:href="#a"/><path d="M14 13.79l4.244-2.394c.86-.487.86-1.28 0-1.765l-4.26-2.402L10.79 10.5 14 13.79" fill="url(#c)"/><use fill="url(#e)" xlink:href="#d"/><use fill="url(#g)" xlink:href="#f"/></g><g transform="translate(35 18)"><path d="M13.32 6.392H6.996v1.895h4.484c-.22 2.658-2.41 3.79-4.475 3.79-2.643 0-4.95-2.1-4.95-5.045 0-2.868 2.2-5.077 4.956-5.077 2.127 0 3.38 1.37 3.38 1.37l1.314-1.375S10.018.054 6.944.054C3.03.054 0 3.392 0 6.998c0 3.534 2.85 6.98 7.043 6.98 3.69 0 6.39-2.554 6.39-6.33 0-.796-.115-1.257-.115-1.257v.002zM18.692 5.02c-2.594 0-4.453 2.048-4.453 4.438 0 2.424 1.802 4.51 4.482 4.51 2.427 0 4.414-1.872 4.414-4.458 0-2.964-2.312-4.49-4.444-4.49m.026 1.757c1.275 0 2.484 1.042 2.484 2.72 0 1.644-1.204 2.716-2.49 2.716-1.414 0-2.53-1.144-2.53-2.728 0-1.55 1.103-2.708 2.536-2.708M28.48 5.02c-2.593 0-4.452 2.048-4.452 4.438 0 2.424 1.803 4.51 4.483 4.51 2.428 0 4.415-1.872 4.415-4.458 0-2.964-2.312-4.49-4.444-4.49m.027 1.757c1.275 0 2.484 1.042 2.484 2.72 0 1.644-1.203 2.716-2.49 2.716-1.413 0-2.528-1.144-2.528-2.728 0-1.55 1.102-2.708 2.535-2.708M38.07 5.024c-2.38 0-4.253 2.107-4.253 4.47 0 2.695 2.17 4.48 4.21 4.48 1.264 0 1.935-.505 2.43-1.086v.882c0 1.544-.927 2.47-2.328 2.47-1.354 0-2.032-1.018-2.268-1.595l-1.703.72c.603 1.29 1.82 2.635 3.983 2.635 2.367 0 4.17-1.506 4.17-4.666v-8.04h-1.856v.757c-.57-.62-1.35-1.026-2.388-1.026zm.172 1.754c1.167 0 2.365 1.007 2.365 2.727 0 1.748-1.196 2.71-2.39 2.71-1.27 0-2.45-1.04-2.45-2.694 0-1.717 1.225-2.742 2.475-2.742zM50.962 5.013c-2.246 0-4.132 1.805-4.132 4.47 0 2.818 2.102 4.49 4.347 4.49 1.874 0 3.024-1.036 3.71-1.964l-1.53-1.03c-.398.622-1.062 1.23-2.17 1.23-1.245 0-1.818-.688-2.173-1.355l5.94-2.49-.31-.73c-.573-1.428-1.91-2.622-3.682-2.622zm.077 1.72c.808 0 1.39.436 1.638.957l-3.966 1.675c-.17-1.297 1.045-2.63 2.327-2.63z" fill="#FFF"/><mask id="i" fill="#fff"><use xlink:href="#h"/></mask><path d="M43.804 13.707h1.95V.517h-1.95v13.19zM69.96 13.707h1.95V.517h-1.95v13.19zM64.333 6.95h-2.77V2.487h2.77c1.21 0 2.208 1.007 2.208 2.23 0 1.224-.997 2.23-2.207 2.23m0-6.43h-4.72V13.707h1.95V8.92h2.77c2.287 0 4.16-1.89 4.16-4.2 0-2.312-1.873-4.203-4.16-4.203M89.83 5.013l-2.556 5.877-2.556-5.877h-2.13l3.62 8.327L84.183 18h2.13l5.65-12.987H89.83zM79.893 9.894c-.25 1.097-1.09 1.886-2.16 2.18-2.254.62-2.815-3.082.537-2.573.575.07 1.078.215 1.623.394zm0 3.813h1.95V8.963c.306-4.893-5.833-6.044-8.156-2.516l1.57 1.064c1.136-2.006 4.377-1.544 4.59.606-.974-.26-2.027-.45-2.988-.35-1.502.152-2.787 1.115-2.99 2.693-.11.85.077 1.902.666 2.542.918.997 2.424 1.132 3.662.79.697-.19 1.246-.61 1.695-1.15v1.065z" fill="#FFF" mask="url(#i)"/></g><g transform="translate(35 6)"><mask id="k" fill="#fff"><use xlink:href="#j"/></mask><path d="M6.314 3.264H3.317v.934h2.125C5.337 5.506 4.3 6.064 3.322 6.064 2.067 6.064.974 5.03.974 3.58c0-1.413 1.042-2.5 2.348-2.5 1.01 0 1.603.674 1.603.674l.622-.677s-.8-.934-2.256-.934C1.436.143 0 1.787 0 3.563 0 5.303 1.35 7 3.34 7c1.748 0 3.028-1.257 3.028-3.117 0-.392-.055-.62-.055-.62z" fill="#FFF" mask="url(#k)"/><mask id="m" fill="#fff"><use xlink:href="#l"/></mask><path d="M18.56 6.867h.926V.37h-.925v6.497zM13.382 6.867h.925V1.342h1.518v-.97h-3.96v.97h1.517v5.525zM7.343 6.867h3.546v-.97H8.266V4.103h2.307v-.97H8.267V1.342h2.622v-.97H7.342v6.495zM21.757 6.867h.924V1.342h1.52v-.97h-3.96v.97h1.517v5.525zM29.87.143c-1.855 0-3.29 1.644-3.29 3.42 0 1.726 1.328 3.41 3.29 3.436 1.963-.027 3.292-1.71 3.292-3.437 0-1.776-1.436-3.42-3.292-3.42m0 5.92c-1.24-.015-2.317-1.044-2.317-2.483 0-1.4 1.026-2.483 2.317-2.5 1.292.017 2.317 1.1 2.317 2.5 0 1.44-1.076 2.468-2.317 2.484M34.086 6.867h.925V2.135l2.97 4.732h.924V.37h-.925V5.1L35.01.37h-.924v6.497z" fill="#FFF" mask="url(#m)"/></g></g></svg>
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
  <svg width="136" height="42" viewBox="0 0 136 42" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>black get it on google</title><defs><linearGradient x1="19.215%" y1="-35.157%" x2="69.302%" y2="93.537%" id="b"><stop stop-color="#19A3B4" offset="0%"/><stop stop-color="#5BC3AF" offset="34.817%"/><stop stop-color="#C9F7A6" offset="92.234%"/><stop stop-color="#D7FEA5" offset="100%"/></linearGradient><path id="a" d="M13.983 7.228L1.547.216C1.194.018.87-.028.607.056L10.79 10.502l3.19-3.272"/><linearGradient x1="-14.698%" y1="-114.322%" x2="74.844%" y2="114.156%" id="c"><stop stop-color="#FC227C" offset="0%"/><stop stop-color="#FEEB7B" offset="100%"/></linearGradient><linearGradient x1="28.151%" y1="-14.814%" x2="48.188%" y2="82.894%" id="e"><stop stop-color="#0E4DA0" offset="0%"/><stop stop-color="#6BFED4" offset="100%"/></linearGradient><path id="d" d="M.605.057C.227.177-.018.57-.018 1.165l.002 18.697c0 .587.238.974.605 1.103L10.79 10.503.605.057"/><linearGradient x1="132.245%" y1="16.466%" x2="5.959%" y2="126.31%" id="g"><stop stop-color="#FC472E" offset="0%"/><stop stop-color="#FC472E" offset=".332%"/><stop stop-color="#893CD8" offset="100%"/></linearGradient><path id="f" d="M.59 20.965c.264.092.596.05.957-.154l12.45-7.02-3.205-3.287L.59 20.965"/><path id="h" d="M0 .054h91.96V18H0V.054z"/><path id="j" d="M0 .143h38.904V7H0V.143z"/><path id="l" d="M0 .143h38.904V7H0V.143z"/></defs><g fill="none" fill-rule="evenodd"><rect fill="#000" width="136" height="42" rx="7"/><g transform="translate(11 15)"><use fill="url(#b)" xlink:href="#a"/><path d="M14 13.79l4.244-2.394c.86-.487.86-1.28 0-1.765l-4.26-2.402L10.79 10.5 14 13.79" fill="url(#c)"/><use fill="url(#e)" xlink:href="#d"/><use fill="url(#g)" xlink:href="#f"/></g><g transform="translate(35 18)"><path d="M13.32 6.392H6.996v1.895h4.484c-.22 2.658-2.41 3.79-4.475 3.79-2.643 0-4.95-2.1-4.95-5.045 0-2.868 2.2-5.077 4.956-5.077 2.127 0 3.38 1.37 3.38 1.37l1.314-1.375S10.018.054 6.944.054C3.03.054 0 3.392 0 6.998c0 3.534 2.85 6.98 7.043 6.98 3.69 0 6.39-2.554 6.39-6.33 0-.796-.115-1.257-.115-1.257v.002zM18.692 5.02c-2.594 0-4.453 2.048-4.453 4.438 0 2.424 1.802 4.51 4.482 4.51 2.427 0 4.414-1.872 4.414-4.458 0-2.964-2.312-4.49-4.444-4.49m.026 1.757c1.275 0 2.484 1.042 2.484 2.72 0 1.644-1.204 2.716-2.49 2.716-1.414 0-2.53-1.144-2.53-2.728 0-1.55 1.103-2.708 2.536-2.708M28.48 5.02c-2.593 0-4.452 2.048-4.452 4.438 0 2.424 1.803 4.51 4.483 4.51 2.428 0 4.415-1.872 4.415-4.458 0-2.964-2.312-4.49-4.444-4.49m.027 1.757c1.275 0 2.484 1.042 2.484 2.72 0 1.644-1.203 2.716-2.49 2.716-1.413 0-2.528-1.144-2.528-2.728 0-1.55 1.102-2.708 2.535-2.708M38.07 5.024c-2.38 0-4.253 2.107-4.253 4.47 0 2.695 2.17 4.48 4.21 4.48 1.264 0 1.935-.505 2.43-1.086v.882c0 1.544-.927 2.47-2.328 2.47-1.354 0-2.032-1.018-2.268-1.595l-1.703.72c.603 1.29 1.82 2.635 3.983 2.635 2.367 0 4.17-1.506 4.17-4.666v-8.04h-1.856v.757c-.57-.62-1.35-1.026-2.388-1.026zm.172 1.754c1.167 0 2.365 1.007 2.365 2.727 0 1.748-1.196 2.71-2.39 2.71-1.27 0-2.45-1.04-2.45-2.694 0-1.717 1.225-2.742 2.475-2.742zM50.962 5.013c-2.246 0-4.132 1.805-4.132 4.47 0 2.818 2.102 4.49 4.347 4.49 1.874 0 3.024-1.036 3.71-1.964l-1.53-1.03c-.398.622-1.062 1.23-2.17 1.23-1.245 0-1.818-.688-2.173-1.355l5.94-2.49-.31-.73c-.573-1.428-1.91-2.622-3.682-2.622zm.077 1.72c.808 0 1.39.436 1.638.957l-3.966 1.675c-.17-1.297 1.045-2.63 2.327-2.63z" fill="#FFF"/><mask id="i" fill="#fff"><use xlink:href="#h"/></mask><path d="M43.804 13.707h1.95V.517h-1.95v13.19zM69.96 13.707h1.95V.517h-1.95v13.19zM64.333 6.95h-2.77V2.487h2.77c1.21 0 2.208 1.007 2.208 2.23 0 1.224-.997 2.23-2.207 2.23m0-6.43h-4.72V13.707h1.95V8.92h2.77c2.287 0 4.16-1.89 4.16-4.2 0-2.312-1.873-4.203-4.16-4.203M89.83 5.013l-2.556 5.877-2.556-5.877h-2.13l3.62 8.327L84.183 18h2.13l5.65-12.987H89.83zM79.893 9.894c-.25 1.097-1.09 1.886-2.16 2.18-2.254.62-2.815-3.082.537-2.573.575.07 1.078.215 1.623.394zm0 3.813h1.95V8.963c.306-4.893-5.833-6.044-8.156-2.516l1.57 1.064c1.136-2.006 4.377-1.544 4.59.606-.974-.26-2.027-.45-2.988-.35-1.502.152-2.787 1.115-2.99 2.693-.11.85.077 1.902.666 2.542.918.997 2.424 1.132 3.662.79.697-.19 1.246-.61 1.695-1.15v1.065z" fill="#FFF" mask="url(#i)"/></g><g transform="translate(35 6)"><mask id="k" fill="#fff"><use xlink:href="#j"/></mask><path d="M6.314 3.264H3.317v.934h2.125C5.337 5.506 4.3 6.064 3.322 6.064 2.067 6.064.974 5.03.974 3.58c0-1.413 1.042-2.5 2.348-2.5 1.01 0 1.603.674 1.603.674l.622-.677s-.8-.934-2.256-.934C1.436.143 0 1.787 0 3.563 0 5.303 1.35 7 3.34 7c1.748 0 3.028-1.257 3.028-3.117 0-.392-.055-.62-.055-.62z" fill="#FFF" mask="url(#k)"/><mask id="m" fill="#fff"><use xlink:href="#l"/></mask><path d="M18.56 6.867h.926V.37h-.925v6.497zM13.382 6.867h.925V1.342h1.518v-.97h-3.96v.97h1.517v5.525zM7.343 6.867h3.546v-.97H8.266V4.103h2.307v-.97H8.267V1.342h2.622v-.97H7.342v6.495zM21.757 6.867h.924V1.342h1.52v-.97h-3.96v.97h1.517v5.525zM29.87.143c-1.855 0-3.29 1.644-3.29 3.42 0 1.726 1.328 3.41 3.29 3.436 1.963-.027 3.292-1.71 3.292-3.437 0-1.776-1.436-3.42-3.292-3.42m0 5.92c-1.24-.015-2.317-1.044-2.317-2.483 0-1.4 1.026-2.483 2.317-2.5 1.292.017 2.317 1.1 2.317 2.5 0 1.44-1.076 2.468-2.317 2.484M34.086 6.867h.925V2.135l2.97 4.732h.924V.37h-.925V5.1L35.01.37h-.924v6.497z" fill="#FFF" mask="url(#m)"/></g></g></svg>
images/categories.svg CHANGED
@@ -1,11 +1,11 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
- <path fill="#D1ECF5" d="M41,49.1H2c-1.1,0-2,0.9-2,2.1V56c0,1.1,0.9,2.1,2,2.1H41c1.1,0,2-0.9,2-2.1v-4.8C43,50,42.1,49.1,41,49.1z"
7
- />
8
- <path fill="#D1ECF5" d="M91,49H52c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H91c1.1,0,2-0.9,2-2.1v-4.8C93,49.9,92.1,49,91,49z"/>
9
- <path fill="#D1ECF5" d="M141,49H102c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H141c1.1,0,2-0.9,2-2.1v-4.8
10
- C143,49.9,142.1,49,141,49z"/>
11
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
+ <path fill="#D1ECF5" d="M41,49.1H2c-1.1,0-2,0.9-2,2.1V56c0,1.1,0.9,2.1,2,2.1H41c1.1,0,2-0.9,2-2.1v-4.8C43,50,42.1,49.1,41,49.1z"
7
+ />
8
+ <path fill="#D1ECF5" d="M91,49H52c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H91c1.1,0,2-0.9,2-2.1v-4.8C93,49.9,92.1,49,91,49z"/>
9
+ <path fill="#D1ECF5" d="M141,49H102c-1.1,0-2,0.9-2,2.1v4.8c0,1.1,0.9,2.1,2,2.1H141c1.1,0,2-0.9,2-2.1v-4.8
10
+ C143,49.9,142.1,49,141,49z"/>
11
+ </svg>
images/ecwid_logo_symbol_RGB.svg CHANGED
@@ -1,37 +1,37 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
- width="500px" height="500px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="preserve">
4
- <g>
5
- <path fill="#007AC9" d="M488.655,395.221c0,51.613-41.821,93.435-93.435,93.435H104.784c-51.595,0-93.44-41.821-93.44-93.435
6
- V104.792c0-51.595,41.846-93.447,93.44-93.447h290.437c51.613,0,93.435,41.852,93.435,93.447V395.221z"/>
7
- <g>
8
- <path fill="#FFFFFF" d="M385.354,279.303c12.294-37.304,31.492-119.104,38.734-148.208c6.396-25.745,10.59-35.345-0.971-35.151
9
- c-9.681,0.168-34.354,2.532-39.469,22.901c-8.498,34.025-28.816,112.391-36.257,137.288c-8.188,27.375-25.595,33.1-47.521,33.299
10
- c-19.087,0.137-29.589-1.331-29.589-15.864c-6.097-0.125-15.491-0.051-19.809-0.024c-4.306-0.025-13.701-0.101-19.798,0.024
11
- c0,15.292-10.501,15.864-29.602,15.864c-14.185,0-35.724-2.649-43.587-28.655c-5.5-18.13-19.237-65.052-26.267-89.838
12
- c-7.08-24.774-29.247-26.18-39.892-26.217c-11.69-0.05-10.764,1.841-4.007,26.217c6.731,24.388,21.527,78.776,31.873,115.221
13
- c10.372,36.435,45.883,48.315,68.554,48.315c19.473,0,20.17,0,38.287,0c17.396,0,23.505-7.453,24.438-9.817
14
- c0.933,2.364,7.651,9.817,25.034,9.817c18.154,0,17.656,0,37.117,0C344.168,334.475,373.521,315.312,385.354,279.303z"/>
15
- <path fill="#FFFFFF" d="M192.415,184.674c10.017,0,18.13-8.125,18.13-18.117c0-10.029-8.113-18.154-18.13-18.154
16
- c-10.029,0-18.129,8.125-18.129,18.154C174.285,176.549,182.385,184.674,192.415,184.674z"/>
17
- <path fill="#FFFFFF" d="M251.344,184.674c10.004,0,18.154-8.125,18.154-18.117c0-10.029-8.15-18.154-18.154-18.154
18
- c-10.004,0-18.129,8.125-18.129,18.154C233.214,176.549,241.339,184.674,251.344,184.674z"/>
19
- <path fill="#FFFFFF" d="M311.045,184.674c9.992,0,18.143-8.125,18.143-18.117c0-10.029-8.148-18.154-18.143-18.154
20
- c-10.017,0-18.129,8.125-18.129,18.154C292.916,176.549,301.028,184.674,311.045,184.674z"/>
21
- <path fill="#FFFFFF" d="M192.415,250c10.017,0,18.13-8.125,18.13-18.129c0-10.017-8.113-18.143-18.13-18.143
22
- c-10.029,0-18.129,8.125-18.129,18.143C174.285,241.875,182.385,250,192.415,250z"/>
23
- <path fill="#FFFFFF" d="M251.344,250c10.004,0,18.154-8.125,18.154-18.129c0-10.017-8.15-18.143-18.154-18.143
24
- c-10.004,0-18.129,8.125-18.129,18.143C233.214,241.875,241.339,250,251.344,250z"/>
25
- <path fill="#FFFFFF" d="M311.045,250c9.992,0,18.143-8.125,18.143-18.129c0-10.017-8.148-18.143-18.143-18.143
26
- c-10.017,0-18.129,8.125-18.129,18.143C292.916,241.875,301.028,250,311.045,250z"/>
27
- <path fill="#FFFFFF" d="M107.317,344.441c-20.046,0-36.34,16.312-36.34,36.384c0,20.058,16.294,36.321,36.34,36.321
28
- c20.095,0,36.358-16.264,36.358-36.321C143.675,360.756,127.413,344.441,107.317,344.441z M107.317,393.865
29
- c-7.18,0-13.028-5.836-13.028-13.04c0-7.205,5.848-13.04,13.028-13.04c7.204,0,13.046,5.835,13.046,13.04
30
- C120.363,388.029,114.521,393.865,107.317,393.865z"/>
31
- <path fill="#FFFFFF" d="M394.051,344.006c-20.069,0-36.369,16.289-36.369,36.348c0,20.045,16.3,36.383,36.369,36.383
32
- c20.07,0,36.347-16.338,36.347-36.383C430.397,360.295,414.123,344.006,394.051,344.006z M394.051,393.393
33
- c-7.191,0-13.039-5.836-13.039-13.04c0-7.205,5.848-13.041,13.039-13.041c7.192,0,13.041,5.836,13.041,13.041
34
- C407.092,387.557,401.244,393.393,394.051,393.393z"/>
35
- </g>
36
- </g>
37
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
+ width="500px" height="500px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="preserve">
4
+ <g>
5
+ <path fill="#007AC9" d="M488.655,395.221c0,51.613-41.821,93.435-93.435,93.435H104.784c-51.595,0-93.44-41.821-93.44-93.435
6
+ V104.792c0-51.595,41.846-93.447,93.44-93.447h290.437c51.613,0,93.435,41.852,93.435,93.447V395.221z"/>
7
+ <g>
8
+ <path fill="#FFFFFF" d="M385.354,279.303c12.294-37.304,31.492-119.104,38.734-148.208c6.396-25.745,10.59-35.345-0.971-35.151
9
+ c-9.681,0.168-34.354,2.532-39.469,22.901c-8.498,34.025-28.816,112.391-36.257,137.288c-8.188,27.375-25.595,33.1-47.521,33.299
10
+ c-19.087,0.137-29.589-1.331-29.589-15.864c-6.097-0.125-15.491-0.051-19.809-0.024c-4.306-0.025-13.701-0.101-19.798,0.024
11
+ c0,15.292-10.501,15.864-29.602,15.864c-14.185,0-35.724-2.649-43.587-28.655c-5.5-18.13-19.237-65.052-26.267-89.838
12
+ c-7.08-24.774-29.247-26.18-39.892-26.217c-11.69-0.05-10.764,1.841-4.007,26.217c6.731,24.388,21.527,78.776,31.873,115.221
13
+ c10.372,36.435,45.883,48.315,68.554,48.315c19.473,0,20.17,0,38.287,0c17.396,0,23.505-7.453,24.438-9.817
14
+ c0.933,2.364,7.651,9.817,25.034,9.817c18.154,0,17.656,0,37.117,0C344.168,334.475,373.521,315.312,385.354,279.303z"/>
15
+ <path fill="#FFFFFF" d="M192.415,184.674c10.017,0,18.13-8.125,18.13-18.117c0-10.029-8.113-18.154-18.13-18.154
16
+ c-10.029,0-18.129,8.125-18.129,18.154C174.285,176.549,182.385,184.674,192.415,184.674z"/>
17
+ <path fill="#FFFFFF" d="M251.344,184.674c10.004,0,18.154-8.125,18.154-18.117c0-10.029-8.15-18.154-18.154-18.154
18
+ c-10.004,0-18.129,8.125-18.129,18.154C233.214,176.549,241.339,184.674,251.344,184.674z"/>
19
+ <path fill="#FFFFFF" d="M311.045,184.674c9.992,0,18.143-8.125,18.143-18.117c0-10.029-8.148-18.154-18.143-18.154
20
+ c-10.017,0-18.129,8.125-18.129,18.154C292.916,176.549,301.028,184.674,311.045,184.674z"/>
21
+ <path fill="#FFFFFF" d="M192.415,250c10.017,0,18.13-8.125,18.13-18.129c0-10.017-8.113-18.143-18.13-18.143
22
+ c-10.029,0-18.129,8.125-18.129,18.143C174.285,241.875,182.385,250,192.415,250z"/>
23
+ <path fill="#FFFFFF" d="M251.344,250c10.004,0,18.154-8.125,18.154-18.129c0-10.017-8.15-18.143-18.154-18.143
24
+ c-10.004,0-18.129,8.125-18.129,18.143C233.214,241.875,241.339,250,251.344,250z"/>
25
+ <path fill="#FFFFFF" d="M311.045,250c9.992,0,18.143-8.125,18.143-18.129c0-10.017-8.148-18.143-18.143-18.143
26
+ c-10.017,0-18.129,8.125-18.129,18.143C292.916,241.875,301.028,250,311.045,250z"/>
27
+ <path fill="#FFFFFF" d="M107.317,344.441c-20.046,0-36.34,16.312-36.34,36.384c0,20.058,16.294,36.321,36.34,36.321
28
+ c20.095,0,36.358-16.264,36.358-36.321C143.675,360.756,127.413,344.441,107.317,344.441z M107.317,393.865
29
+ c-7.18,0-13.028-5.836-13.028-13.04c0-7.205,5.848-13.04,13.028-13.04c7.204,0,13.046,5.835,13.046,13.04
30
+ C120.363,388.029,114.521,393.865,107.317,393.865z"/>
31
+ <path fill="#FFFFFF" d="M394.051,344.006c-20.069,0-36.369,16.289-36.369,36.348c0,20.045,16.3,36.383,36.369,36.383
32
+ c20.07,0,36.347-16.338,36.347-36.383C430.397,360.295,414.123,344.006,394.051,344.006z M394.051,393.393
33
+ c-7.191,0-13.039-5.836-13.039-13.04c0-7.205,5.848-13.041,13.039-13.041c7.192,0,13.041,5.836,13.041,13.041
34
+ C407.092,387.557,401.244,393.393,394.051,393.393z"/>
35
+ </g>
36
+ </g>
37
+ </svg>
images/grid.svg CHANGED
@@ -1,23 +1,23 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
- <path fill="#CDCDCD" d="M29,1H3C2.005,1,1,1.99,1,3v27c0,1.012,1.006,2,2,2h26c0.995,0,2-0.988,2-2V3C31,1.99,29.995,1,29,1z M22,29
7
- c0,0.929,0.017,1-1,1H11c-1.016,0-1-0.071-1-1v-3c0-0.929-0.016-1,1-1h10c1.017,0,1,0.071,1,1V29z"/>
8
- <path fill="#CDCDCD" d="M64.199,1h-26.4C36.806,1,36,1.82,36,2.83v27.34c0,1.012,0.807,1.83,1.8,1.83h26.4
9
- C65.193,32,66,31.182,66,30.17V2.83C66,1.82,65.193,1,64.199,1z M57,28.317C57,29.246,56.177,30,55.16,30h-8.322
10
- C45.822,30,45,29.246,45,28.317v-1.636c0-0.929,0.823-1.682,1.839-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V28.317z"/>
11
- <path fill="#CDCDCD" d="M99.199,1H72.801C71.807,1,71,1.82,71,2.83v27.34c0,1.012,0.807,1.83,1.801,1.83h26.398
12
- c0.994,0,1.801-0.818,1.801-1.83V2.83C101,1.82,100.193,1,99.199,1z M92,28.317C92,29.246,91.177,30,90.16,30h-8.322
13
- C80.822,30,80,29.246,80,28.317v-1.636c0-0.929,0.822-1.682,1.838-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V28.317z"/>
14
- <path fill="#CDCDCD" d="M29.2,36h-26.4C1.806,36,1,36.82,1,37.83V64c0,1.012,0.807,1.83,1.8,1.83h26.399c0.995,0,1.8-0.818,1.8-1.83
15
- V37.83C31,36.82,30.193,36,29.2,36z M22,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.321c-1.016,0-1.839-0.754-1.839-1.684v-1.636
16
- c0-0.929,0.823-1.682,1.839-1.682h8.321c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
17
- <path fill="#CDCDCD" d="M64.199,36h-26.4c-0.994,0-1.8,0.82-1.8,1.83V64c0,1.012,0.807,1.83,1.8,1.83h26.4
18
- C65.193,65.83,66,65.012,66,64V37.83C66,36.82,65.193,36,64.199,36z M57,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.322
19
- c-1.016,0-1.839-0.754-1.839-1.684v-1.636c0-0.929,0.823-1.682,1.839-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
20
- <path fill="#CDCDCD" d="M99.199,36H72.801C71.807,36,71,36.82,71,37.83V64c0,1.012,0.807,1.83,1.801,1.83h26.398
21
- c0.994,0,1.801-0.818,1.801-1.83V37.83C101,36.82,100.193,36,99.199,36z M92,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.322
22
- c-1.016,0-1.838-0.754-1.838-1.684v-1.636c0-0.929,0.822-1.682,1.838-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
23
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
+ <path fill="#CDCDCD" d="M29,1H3C2.005,1,1,1.99,1,3v27c0,1.012,1.006,2,2,2h26c0.995,0,2-0.988,2-2V3C31,1.99,29.995,1,29,1z M22,29
7
+ c0,0.929,0.017,1-1,1H11c-1.016,0-1-0.071-1-1v-3c0-0.929-0.016-1,1-1h10c1.017,0,1,0.071,1,1V29z"/>
8
+ <path fill="#CDCDCD" d="M64.199,1h-26.4C36.806,1,36,1.82,36,2.83v27.34c0,1.012,0.807,1.83,1.8,1.83h26.4
9
+ C65.193,32,66,31.182,66,30.17V2.83C66,1.82,65.193,1,64.199,1z M57,28.317C57,29.246,56.177,30,55.16,30h-8.322
10
+ C45.822,30,45,29.246,45,28.317v-1.636c0-0.929,0.823-1.682,1.839-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V28.317z"/>
11
+ <path fill="#CDCDCD" d="M99.199,1H72.801C71.807,1,71,1.82,71,2.83v27.34c0,1.012,0.807,1.83,1.801,1.83h26.398
12
+ c0.994,0,1.801-0.818,1.801-1.83V2.83C101,1.82,100.193,1,99.199,1z M92,28.317C92,29.246,91.177,30,90.16,30h-8.322
13
+ C80.822,30,80,29.246,80,28.317v-1.636c0-0.929,0.822-1.682,1.838-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V28.317z"/>
14
+ <path fill="#CDCDCD" d="M29.2,36h-26.4C1.806,36,1,36.82,1,37.83V64c0,1.012,0.807,1.83,1.8,1.83h26.399c0.995,0,1.8-0.818,1.8-1.83
15
+ V37.83C31,36.82,30.193,36,29.2,36z M22,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.321c-1.016,0-1.839-0.754-1.839-1.684v-1.636
16
+ c0-0.929,0.823-1.682,1.839-1.682h8.321c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
17
+ <path fill="#CDCDCD" d="M64.199,36h-26.4c-0.994,0-1.8,0.82-1.8,1.83V64c0,1.012,0.807,1.83,1.8,1.83h26.4
18
+ C65.193,65.83,66,65.012,66,64V37.83C66,36.82,65.193,36,64.199,36z M57,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.322
19
+ c-1.016,0-1.839-0.754-1.839-1.684v-1.636c0-0.929,0.823-1.682,1.839-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
20
+ <path fill="#CDCDCD" d="M99.199,36H72.801C71.807,36,71,36.82,71,37.83V64c0,1.012,0.807,1.83,1.801,1.83h26.398
21
+ c0.994,0,1.801-0.818,1.801-1.83V37.83C101,36.82,100.193,36,99.199,36z M92,62.146c0,0.93-0.823,1.684-1.84,1.684h-8.322
22
+ c-1.016,0-1.838-0.754-1.838-1.684v-1.636c0-0.929,0.822-1.682,1.838-1.682h8.322c1.017,0,1.84,0.753,1.84,1.682V62.146z"/>
23
+ </svg>
images/landing/global.svg CHANGED
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
4
- <path fill-rule="evenodd" clip-rule="evenodd" fill="#70B4D5" d="M37.5,73.056c-19.637,0-35.556-15.918-35.556-35.557 c0-19.636,15.919-35.555,35.556-35.555s35.556,15.918,35.556,35.555C73.056,57.138,57.137,73.056,37.5,73.056z M61.938,59.137 c4.84-5.474,7.891-12.569,8.188-20.382H56.108c-0.119,6.328-1.131,12.22-2.794,17.268c5.389,1.432,8.624,3.076,8.624,3.076V59.137z M59.889,61.259c-1.645-0.711-4.23-1.697-7.534-2.576c-1.779,4.437-4.102,8.055-6.786,10.49 C51.029,67.786,55.921,65.007,59.889,61.259z M38.817,70.056c4.745-0.702,8.65-5.162,11.208-11.943 c-3.249-0.725-7.036-1.274-11.208-1.381V70.056z M38.817,53.967c4.562,0.103,8.663,0.706,12.101,1.476 c1.443-4.788,2.291-10.479,2.392-16.688H38.817V53.967z M53.307,35.995c-0.123-6.223-1.011-11.92-2.496-16.698 c-3.413,0.762-7.476,1.358-11.993,1.464v15.234H53.307z M36.058,35.995V20.762c-4.475-0.103-8.508-0.685-11.912-1.433 c-1.465,4.771-2.332,10.458-2.452,16.666H36.058z M21.691,38.755c0.1,6.202,0.946,11.889,2.387,16.674 c3.415-0.758,7.473-1.351,11.98-1.46V38.755H21.691z M36.058,70.044V56.73c-4.123,0.101-7.872,0.635-11.094,1.347 C27.5,64.821,31.364,69.281,36.058,70.044z M29.432,69.173c-2.692-2.442-5.02-6.074-6.8-10.528c-3.305,0.873-5.894,1.857-7.56,2.575 C19.047,64.987,23.953,67.781,29.432,69.173z M13.001,59.068c0.353-0.174,3.539-1.71,8.678-3.063 c-1.66-5.045-2.669-10.93-2.788-17.25H4.875C5.17,46.535,8.197,53.604,13.001,59.068z M4.885,35.995h14.012 c0.142-6.324,1.176-12.205,2.86-17.234c-4.661-1.216-7.744-2.59-8.607-2.998C8.311,21.191,5.239,28.232,4.885,35.995z M15.247,13.611c1.697,0.72,4.248,1.672,7.473,2.515c1.77-4.351,4.065-7.898,6.712-10.3C24.033,7.197,19.19,9.929,15.247,13.611z M25.056,16.688c3.202,0.699,6.921,1.218,11.002,1.313V4.955C31.419,5.708,27.593,10.078,25.056,16.688z M38.817,4.945v13.052 c4.113-0.109,7.852-0.648,11.066-1.361C47.307,10.007,43.439,5.646,38.817,4.945z M52.254,16.058 c3.227-0.856,5.765-1.813,7.421-2.521c-3.929-3.646-8.744-6.348-14.106-7.71C48.201,8.215,50.488,11.738,52.254,16.058z M61.777,15.681c-0.539,0.264-3.649,1.733-8.55,3.033c1.693,5.039,2.733,10.938,2.876,17.281h14.012 C69.76,28.193,66.659,21.12,61.777,15.681z"/>
5
  </svg>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
4
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#70B4D5" d="M37.5,73.056c-19.637,0-35.556-15.918-35.556-35.557 c0-19.636,15.919-35.555,35.556-35.555s35.556,15.918,35.556,35.555C73.056,57.138,57.137,73.056,37.5,73.056z M61.938,59.137 c4.84-5.474,7.891-12.569,8.188-20.382H56.108c-0.119,6.328-1.131,12.22-2.794,17.268c5.389,1.432,8.624,3.076,8.624,3.076V59.137z M59.889,61.259c-1.645-0.711-4.23-1.697-7.534-2.576c-1.779,4.437-4.102,8.055-6.786,10.49 C51.029,67.786,55.921,65.007,59.889,61.259z M38.817,70.056c4.745-0.702,8.65-5.162,11.208-11.943 c-3.249-0.725-7.036-1.274-11.208-1.381V70.056z M38.817,53.967c4.562,0.103,8.663,0.706,12.101,1.476 c1.443-4.788,2.291-10.479,2.392-16.688H38.817V53.967z M53.307,35.995c-0.123-6.223-1.011-11.92-2.496-16.698 c-3.413,0.762-7.476,1.358-11.993,1.464v15.234H53.307z M36.058,35.995V20.762c-4.475-0.103-8.508-0.685-11.912-1.433 c-1.465,4.771-2.332,10.458-2.452,16.666H36.058z M21.691,38.755c0.1,6.202,0.946,11.889,2.387,16.674 c3.415-0.758,7.473-1.351,11.98-1.46V38.755H21.691z M36.058,70.044V56.73c-4.123,0.101-7.872,0.635-11.094,1.347 C27.5,64.821,31.364,69.281,36.058,70.044z M29.432,69.173c-2.692-2.442-5.02-6.074-6.8-10.528c-3.305,0.873-5.894,1.857-7.56,2.575 C19.047,64.987,23.953,67.781,29.432,69.173z M13.001,59.068c0.353-0.174,3.539-1.71,8.678-3.063 c-1.66-5.045-2.669-10.93-2.788-17.25H4.875C5.17,46.535,8.197,53.604,13.001,59.068z M4.885,35.995h14.012 c0.142-6.324,1.176-12.205,2.86-17.234c-4.661-1.216-7.744-2.59-8.607-2.998C8.311,21.191,5.239,28.232,4.885,35.995z M15.247,13.611c1.697,0.72,4.248,1.672,7.473,2.515c1.77-4.351,4.065-7.898,6.712-10.3C24.033,7.197,19.19,9.929,15.247,13.611z M25.056,16.688c3.202,0.699,6.921,1.218,11.002,1.313V4.955C31.419,5.708,27.593,10.078,25.056,16.688z M38.817,4.945v13.052 c4.113-0.109,7.852-0.648,11.066-1.361C47.307,10.007,43.439,5.646,38.817,4.945z M52.254,16.058 c3.227-0.856,5.765-1.813,7.421-2.521c-3.929-3.646-8.744-6.348-14.106-7.71C48.201,8.215,50.488,11.738,52.254,16.058z M61.777,15.681c-0.539,0.264-3.649,1.733-8.55,3.033c1.693,5.039,2.733,10.938,2.876,17.281h14.012 C69.76,28.193,66.659,21.12,61.777,15.681z"/>
5
  </svg>
images/landing/responsive-grow.svg CHANGED
@@ -1,6 +1,6 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 71" enable-background="new 0 0 100 71" xml:space="preserve">
5
- <path fill-rule="evenodd" clip-rule="evenodd" fill="#70B4D5" d="M95.5,68.947H52.649c-1.988,0-3.6-1.613-3.6-3.6v-3.312H24.9v3 c0,1.986-1.612,3.6-3.601,3.6H4.5c-1.988,0-3.6-1.613-3.6-3.6V38.652c0-1.988,1.611-3.6,3.6-3.6h6.601V5.653 c0-1.989,1.611-3.601,3.6-3.601h64.8c1.988,0,3.6,1.611,3.6,3.601V26.99h12.4c1.988,0,3.6,1.612,3.6,3.601v34.757 C99.1,67.334,97.488,68.947,95.5,68.947z M6.056,38.033c-1.192,0-2.16,0.967-2.16,2.158v23.285c0,1.193,0.968,2.16,2.16,2.16h13.693 c1.192,0,2.159-0.967,2.159-2.16V40.191c0-1.191-0.967-2.158-2.159-2.158H6.056z M80.108,7.192c0-1.193-0.967-2.16-2.16-2.16H16.256 c-1.193,0-2.16,0.967-2.16,2.16v27.86H21.3c1.988,0,3.601,1.611,3.601,3.6v20.369l24.149,0.016V30.591 c0-1.988,1.611-3.601,3.6-3.601h27.459V7.192z M96.108,32.13c0-1.193-0.967-2.16-2.16-2.16H54.205c-1.193,0-2.16,0.967-2.16,2.16 v31.659c0,1.193,0.967,2.16,2.16,2.16h39.743c1.193,0,2.16-0.967,2.16-2.16V32.13z M57.044,49.777c-0.991,0-1.794-0.803-1.794-1.793 c0-0.992,0.803-1.795,1.794-1.795c0.99,0,1.794,0.803,1.794,1.795C58.838,48.975,58.034,49.777,57.044,49.777z M30.601,11.334 c-0.991,0-1.795-0.804-1.795-1.794c0-0.991,0.804-1.795,1.795-1.795c0.99,0,1.794,0.804,1.794,1.795 C32.395,10.53,31.591,11.334,30.601,11.334z M24.601,11.334c-0.991,0-1.795-0.804-1.795-1.794c0-0.991,0.804-1.795,1.795-1.795 c0.99,0,1.794,0.804,1.794,1.795C26.395,10.53,25.591,11.334,24.601,11.334z M18.601,11.334c-0.991,0-1.795-0.804-1.795-1.794 c0-0.991,0.804-1.795,1.795-1.795c0.99,0,1.794,0.804,1.794,1.795C20.395,10.53,19.591,11.334,18.601,11.334z M13.2,62.934 c-0.991,0-1.794-0.803-1.794-1.795c0-0.99,0.803-1.793,1.794-1.793s1.794,0.803,1.794,1.793 C14.994,62.131,14.191,62.934,13.2,62.934z"/>
6
  </svg>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 71" enable-background="new 0 0 100 71" xml:space="preserve">
5
+ <path fill-rule="evenodd" clip-rule="evenodd" fill="#70B4D5" d="M95.5,68.947H52.649c-1.988,0-3.6-1.613-3.6-3.6v-3.312H24.9v3 c0,1.986-1.612,3.6-3.601,3.6H4.5c-1.988,0-3.6-1.613-3.6-3.6V38.652c0-1.988,1.611-3.6,3.6-3.6h6.601V5.653 c0-1.989,1.611-3.601,3.6-3.601h64.8c1.988,0,3.6,1.611,3.6,3.601V26.99h12.4c1.988,0,3.6,1.612,3.6,3.601v34.757 C99.1,67.334,97.488,68.947,95.5,68.947z M6.056,38.033c-1.192,0-2.16,0.967-2.16,2.158v23.285c0,1.193,0.968,2.16,2.16,2.16h13.693 c1.192,0,2.159-0.967,2.159-2.16V40.191c0-1.191-0.967-2.158-2.159-2.158H6.056z M80.108,7.192c0-1.193-0.967-2.16-2.16-2.16H16.256 c-1.193,0-2.16,0.967-2.16,2.16v27.86H21.3c1.988,0,3.601,1.611,3.601,3.6v20.369l24.149,0.016V30.591 c0-1.988,1.611-3.601,3.6-3.601h27.459V7.192z M96.108,32.13c0-1.193-0.967-2.16-2.16-2.16H54.205c-1.193,0-2.16,0.967-2.16,2.16 v31.659c0,1.193,0.967,2.16,2.16,2.16h39.743c1.193,0,2.16-0.967,2.16-2.16V32.13z M57.044,49.777c-0.991,0-1.794-0.803-1.794-1.793 c0-0.992,0.803-1.795,1.794-1.795c0.99,0,1.794,0.803,1.794,1.795C58.838,48.975,58.034,49.777,57.044,49.777z M30.601,11.334 c-0.991,0-1.795-0.804-1.795-1.794c0-0.991,0.804-1.795,1.795-1.795c0.99,0,1.794,0.804,1.794,1.795 C32.395,10.53,31.591,11.334,30.601,11.334z M24.601,11.334c-0.991,0-1.795-0.804-1.795-1.794c0-0.991,0.804-1.795,1.795-1.795 c0.99,0,1.794,0.804,1.794,1.795C26.395,10.53,25.591,11.334,24.601,11.334z M18.601,11.334c-0.991,0-1.795-0.804-1.795-1.794 c0-0.991,0.804-1.795,1.795-1.795c0.99,0,1.794,0.804,1.794,1.795C20.395,10.53,19.591,11.334,18.601,11.334z M13.2,62.934 c-0.991,0-1.794-0.803-1.794-1.795c0-0.99,0.803-1.793,1.794-1.793s1.794,0.803,1.794,1.793 C14.994,62.131,14.191,62.934,13.2,62.934z"/>
6
  </svg>
images/list.svg CHANGED
@@ -1,15 +1,15 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
- <path fill="#CDCDCD" d="M99.572,1H2.427C1.639,1,1,1.638,1,2.425v17.149C1,20.361,1.639,21,2.427,21h97.146
7
- c0.788,0,1.427-0.639,1.427-1.426V2.425C101,1.638,100.361,1,99.572,1z M22,10h38v2H22V10z M18,16c0,1.012-1.005,2-2,2H6
8
- c-0.994,0-2-0.988-2-2V6c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V16z M65,17H22v-2h43V17z M72,7H22V5h50V7z"/>
9
- <path fill="#CDCDCD" d="M99.572,24H2.427C1.639,24,1,24.638,1,25.425v17.149C1,43.361,1.639,44,2.427,44h97.146
10
- c0.788,0,1.427-0.639,1.427-1.426V25.425C101,24.638,100.361,24,99.572,24z M22,33h38v2H22V33z M18,39c0,1.012-1.005,2-2,2H6
11
- c-0.994,0-2-0.988-2-2V29c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V39z M65,40H22v-2h43V40z M72,30H22v-2h50V30z"/>
12
- <path fill="#CDCDCD" d="M99.572,47H2.427C1.639,47,1,47.639,1,48.425v17.149C1,66.361,1.639,67,2.427,67h97.146
13
- c0.788,0,1.427-0.639,1.427-1.426V48.425C101,47.639,100.361,47,99.572,47z M22,56h38v2H22V56z M18,62c0,1.012-1.005,2-2,2H6
14
- c-0.994,0-2-0.988-2-2V52c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V62z M65,63H22v-2h43V63z M72,53H22v-2h50V53z"/>
15
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
+ <path fill="#CDCDCD" d="M99.572,1H2.427C1.639,1,1,1.638,1,2.425v17.149C1,20.361,1.639,21,2.427,21h97.146
7
+ c0.788,0,1.427-0.639,1.427-1.426V2.425C101,1.638,100.361,1,99.572,1z M22,10h38v2H22V10z M18,16c0,1.012-1.005,2-2,2H6
8
+ c-0.994,0-2-0.988-2-2V6c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V16z M65,17H22v-2h43V17z M72,7H22V5h50V7z"/>
9
+ <path fill="#CDCDCD" d="M99.572,24H2.427C1.639,24,1,24.638,1,25.425v17.149C1,43.361,1.639,44,2.427,44h97.146
10
+ c0.788,0,1.427-0.639,1.427-1.426V25.425C101,24.638,100.361,24,99.572,24z M22,33h38v2H22V33z M18,39c0,1.012-1.005,2-2,2H6
11
+ c-0.994,0-2-0.988-2-2V29c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V39z M65,40H22v-2h43V40z M72,30H22v-2h50V30z"/>
12
+ <path fill="#CDCDCD" d="M99.572,47H2.427C1.639,47,1,47.639,1,48.425v17.149C1,66.361,1.639,67,2.427,67h97.146
13
+ c0.788,0,1.427-0.639,1.427-1.426V48.425C101,47.639,100.361,47,99.572,47z M22,56h38v2H22V56z M18,62c0,1.012-1.005,2-2,2H6
14
+ c-0.994,0-2-0.988-2-2V52c0-1.01,1.006-2,2-2h10c0.995,0,2,0.99,2,2V62z M65,63H22v-2h43V63z M72,53H22v-2h50V53z"/>
15
+ </svg>
images/minicart.svg CHANGED
@@ -1,13 +1,13 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
- <g>
7
- <path fill="#D1ECF5" d="M115.2,8.9c0.8,0,1.5-0.6,1.5-1.4c0-3.7,0.6-4.6,4.3-4.6c3.7,0,4.3,0.9,4.3,4.6c0,0.8,0.7,1.4,1.5,1.4
8
- c0.8,0,1.4-0.6,1.4-1.4c0-2.3,0.1-7.5-7.2-7.5c-7.3,0-7.2,5.2-7.2,7.5C113.9,8.3,114.4,8.9,115.2,8.9z"/>
9
- <path fill="#D1ECF5" d="M139.7,33.2l-4.6-21.9c-0.1-0.6-0.6-1.1-1.2-1.1h-25.6c-0.6,0-1.2,0.5-1.2,1.1l-4.6,21.9
10
- c-0.1,1,0.4,1.8,1.2,1.8h34.9C139.3,35,139.8,34.2,139.7,33.2z M114.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2
11
- S115.8,16,114.6,16z M127.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2S128.8,16,127.6,16z"/>
12
- </g>
13
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
+ <g>
7
+ <path fill="#D1ECF5" d="M115.2,8.9c0.8,0,1.5-0.6,1.5-1.4c0-3.7,0.6-4.6,4.3-4.6c3.7,0,4.3,0.9,4.3,4.6c0,0.8,0.7,1.4,1.5,1.4
8
+ c0.8,0,1.4-0.6,1.4-1.4c0-2.3,0.1-7.5-7.2-7.5c-7.3,0-7.2,5.2-7.2,7.5C113.9,8.3,114.4,8.9,115.2,8.9z"/>
9
+ <path fill="#D1ECF5" d="M139.7,33.2l-4.6-21.9c-0.1-0.6-0.6-1.1-1.2-1.1h-25.6c-0.6,0-1.2,0.5-1.2,1.1l-4.6,21.9
10
+ c-0.1,1,0.4,1.8,1.2,1.8h34.9C139.3,35,139.8,34.2,139.7,33.2z M114.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2s2.2,1,2.2,2.2
11
+ S115.8,16,114.6,16z M127.6,16c-1.2,0-2.2-1-2.2-2.2s1-2.2,2.2-2.2c1.2,0,2.2,1,2.2,2.2S128.8,16,127.6,16z"/>
12
+ </g>
13
+ </svg>
images/product_browser.svg CHANGED
@@ -1,24 +1,24 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
- <path fill="#D1ECF5" d="M40.1,72H2.9C1.4,72,0,73.4,0,74.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
7
- C43,73.4,41.6,72,40.1,72z M30.1,112.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
8
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
9
- <path fill="#D1ECF5" d="M90.1,72H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
10
- C93,73.4,91.6,72,90.1,72z M80.1,112.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
11
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
12
- <path fill="#D1ECF5" d="M140.1,72h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
13
- C143,73.4,141.6,72,140.1,72z M130.1,112.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
14
- c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
15
- <path fill="#D1ECF5" d="M40.1,123H2.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
16
- C43,124.4,41.6,123,40.1,123z M30.1,163.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
17
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
18
- <path fill="#D1ECF5" d="M90.1,123H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
19
- C93,124.4,91.6,123,90.1,123z M80.1,163.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
20
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
21
- <path fill="#D1ECF5" d="M140.1,123h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
22
- C143,124.4,141.6,123,140.1,123z M130.1,163.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
23
- c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
24
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
+ <path fill="#D1ECF5" d="M40.1,72H2.9C1.4,72,0,73.4,0,74.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
7
+ C43,73.4,41.6,72,40.1,72z M30.1,112.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
8
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
9
+ <path fill="#D1ECF5" d="M90.1,72H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
10
+ C93,73.4,91.6,72,90.1,72z M80.1,112.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
11
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
12
+ <path fill="#D1ECF5" d="M140.1,72h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9V74.9
13
+ C143,73.4,141.6,72,140.1,72z M130.1,112.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
14
+ c1.5,0,1.4,0.1,1.4,1.5V112.6z"/>
15
+ <path fill="#D1ECF5" d="M40.1,123H2.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
16
+ C43,124.4,41.6,123,40.1,123z M30.1,163.6c0,1.3,0,1.5-1.4,1.5H14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
17
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
18
+ <path fill="#D1ECF5" d="M90.1,123H52.9c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
19
+ C93,124.4,91.6,123,90.1,123z M80.1,163.6c0,1.3,0,1.5-1.4,1.5H64.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
20
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
21
+ <path fill="#D1ECF5" d="M140.1,123h-37.3c-1.4,0-2.9,1.4-2.9,2.9v39.2c0,1.5,1.4,2.9,2.9,2.9h37.3c1.4,0,2.9-1.4,2.9-2.9v-39.2
22
+ C143,124.4,141.6,123,140.1,123z M130.1,163.6c0,1.3,0,1.5-1.4,1.5h-14.3c-1.5,0-1.4-0.1-1.4-1.5v-4.4c0-1.3,0-1.5,1.4-1.5h14.3
23
+ c1.5,0,1.4,0.1,1.4,1.5V163.6z"/>
24
+ </svg>
images/search.svg CHANGED
@@ -1,12 +1,12 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
- <path fill="#D1ECF5" d="M38.2,31.3c0.5,0.5,0.8,1.2,0.8,1.9c0,0.7-0.3,1.4-0.8,1.9C37.6,35.7,37,36,36.3,36c-0.8,0-1.4-0.3-1.9-0.8
7
- L27,27.9c-2.5,1.8-5.4,2.6-8.5,2.6c-2,0-4-0.4-5.8-1.2c-1.9-0.8-3.5-1.9-4.8-3.2c-1.3-1.3-2.4-2.9-3.2-4.8c-0.8-1.9-1.2-3.8-1.2-5.8
8
- s0.4-4,1.2-5.8c0.8-1.9,1.9-3.5,3.2-4.8c1.3-1.3,2.9-2.4,4.8-3.2c1.9-0.8,3.8-1.2,5.8-1.2s4,0.4,5.8,1.2c1.9,0.8,3.5,1.9,4.8,3.2
9
- c1.3,1.3,2.4,2.9,3.2,4.8c0.8,1.9,1.2,3.8,1.2,5.8c0,3.1-0.9,6-2.6,8.5L38.2,31.3L38.2,31.3z M25.3,22.3c1.9-1.9,2.8-4.1,2.8-6.8
10
- c0-2.6-0.9-4.9-2.8-6.8c-1.9-1.9-4.1-2.8-6.8-2.8c-2.6,0-4.9,0.9-6.8,2.8c-1.9,1.9-2.8,4.1-2.8,6.8c0,2.6,0.9,4.9,2.8,6.8
11
- c1.9,1.9,4.1,2.8,6.8,2.8C21.1,25.1,23.4,24.1,25.3,22.3z"/>
12
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 143 168" enable-background="new 0 0 143 168" xml:space="preserve">
6
+ <path fill="#D1ECF5" d="M38.2,31.3c0.5,0.5,0.8,1.2,0.8,1.9c0,0.7-0.3,1.4-0.8,1.9C37.6,35.7,37,36,36.3,36c-0.8,0-1.4-0.3-1.9-0.8
7
+ L27,27.9c-2.5,1.8-5.4,2.6-8.5,2.6c-2,0-4-0.4-5.8-1.2c-1.9-0.8-3.5-1.9-4.8-3.2c-1.3-1.3-2.4-2.9-3.2-4.8c-0.8-1.9-1.2-3.8-1.2-5.8
8
+ s0.4-4,1.2-5.8c0.8-1.9,1.9-3.5,3.2-4.8c1.3-1.3,2.9-2.4,4.8-3.2c1.9-0.8,3.8-1.2,5.8-1.2s4,0.4,5.8,1.2c1.9,0.8,3.5,1.9,4.8,3.2
9
+ c1.3,1.3,2.4,2.9,3.2,4.8c0.8,1.9,1.2,3.8,1.2,5.8c0,3.1-0.9,6-2.6,8.5L38.2,31.3L38.2,31.3z M25.3,22.3c1.9-1.9,2.8-4.1,2.8-6.8
10
+ c0-2.6-0.9-4.9-2.8-6.8c-1.9-1.9-4.1-2.8-6.8-2.8c-2.6,0-4.9,0.9-6.8,2.8c-1.9,1.9-2.8,4.1-2.8,6.8c0,2.6,0.9,4.9,2.8,6.8
11
+ c1.9,1.9,4.1,2.8,6.8,2.8C21.1,25.1,23.4,24.1,25.3,22.3z"/>
12
+ </svg>
images/star.svg CHANGED
@@ -1,10 +1,10 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 26 26" enable-background="new 0 0 26 26" xml:space="preserve">
6
- <path fill="#333333" d="M20.39,25c-0.17,0-0.34-0.04-0.49-0.12L13,21.37l-6.9,3.51C5.75,25.06,5.32,25.03,5,24.8
7
- c-0.32-0.23-0.49-0.61-0.42-1l1.32-7.44l-5.58-5.27c-0.29-0.27-0.39-0.67-0.27-1.04C0.18,9.7,0.5,9.43,0.9,9.37l7.71-1.09l3.45-6.77
8
- c0.35-0.69,1.53-0.69,1.88,0l3.45,6.77l7.71,1.08c0.4,0.06,0.72,0.32,0.85,0.69c0.12,0.37,0.02,0.77-0.27,1.04l-5.58,5.27l1.28,7.24
9
- c0.05,0.11,0.07,0.24,0.07,0.37c0,0.56-0.47,1.02-1.05,1.02C20.4,25,20.39,25,20.39,25z"/>
10
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 26 26" enable-background="new 0 0 26 26" xml:space="preserve">
6
+ <path fill="#333333" d="M20.39,25c-0.17,0-0.34-0.04-0.49-0.12L13,21.37l-6.9,3.51C5.75,25.06,5.32,25.03,5,24.8
7
+ c-0.32-0.23-0.49-0.61-0.42-1l1.32-7.44l-5.58-5.27c-0.29-0.27-0.39-0.67-0.27-1.04C0.18,9.7,0.5,9.43,0.9,9.37l7.71-1.09l3.45-6.77
8
+ c0.35-0.69,1.53-0.69,1.88,0l3.45,6.77l7.71,1.08c0.4,0.06,0.72,0.32,0.85,0.69c0.12,0.37,0.02,0.77-0.27,1.04l-5.58,5.27l1.28,7.24
9
+ c0.05,0.11,0.07,0.24,0.07,0.37c0,0.56-0.47,1.02-1.05,1.02C20.4,25,20.39,25,20.39,25z"/>
10
+ </svg>
images/store.svg CHANGED
@@ -1,20 +1,20 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
- <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- viewBox="0 0 26 26" enable-background="new 0 0 26 26" xml:space="preserve">
6
- <g>
7
- <path fill="#434343" d="M0.1,24.6c0-0.3,0.2-0.5,0.5-0.5h24.9c0.3,0,0.5,0.2,0.5,0.5v1c0,0.3-0.2,0.5-0.5,0.5H0.6
8
- c-0.3,0-0.5-0.2-0.5-0.5V24.6z"/>
9
- <path fill="#434343" d="M26,9c-1-2-1.4-3.9-2-7.2C24,1.6,23.6,1,23,1H3C2.4,1,2,1.6,2,1.8C2,1.8,1,8,0,9c0,1,0,3,0,3s0,0,0,0.1h0
10
- c0,0,0.1,0.5,0.7,0.8C0.8,12.9,0.9,13,1,13v0v9C1,22.6,1.6,23,2.1,23H10v-8.3c0-0.6,0.5-1,1.1-1h4c0.5,0,1,0.4,1,1V23h8
11
- c0.5,0,1-0.4,1-0.9v-9v0c0.8-0.1,1-0.9,1-0.9h0c0,0,0-0.1,0-0.1S26,10,26,9z M7.8,19c0,0.5-0.2,1-0.8,1H5c-0.5,0-0.8-0.5-0.8-1v-4
12
- c0-0.6,0.3-1,0.8-1H7c0.6,0,0.8,0.4,0.8,1V19z M21.8,19c0,0.5-0.2,1-0.8,1h-2c-0.5,0-0.8-0.5-0.8-1v-4c0-0.6,0.3-1,0.8-1h2
13
- c0.5,0,0.8,0.4,0.8,1V19z M22,2.8c0,0,1.1,5.1,1.7,6.2c-1,0-2.7,0-2.7,0l-1-6.2H22z M23.8,10l0,0.8c-0.1,0.7-0.7,1.2-1.4,1.2
14
- c-0.8,0-1.4-0.5-1.4-1.2c0,0,0-0.8,0-0.8H23.8z M16.3,10.5l0-0.5h2.8l0,0.8C19,11.5,18.4,12,17.7,12C16.9,12,16.3,11.4,16.3,10.5
15
- C16.3,10.6,16.3,10.5,16.3,10.5L16.3,10.5z M18,2.8c0,0,0.8,4.9,1.1,6.2c0.3,0-2.8,0-2.8,0L16,2.8H18z M12,2.8h2L14.4,9h-2.7
16
- L12,2.8z M11.6,10h2.8l0,0.7C14.3,11.4,13.7,12,13,12c-0.7,0-1.3-0.6-1.4-1.3L11.6,10z M8,2.8h2L9.7,9c0,0-2,0-2.7,0
17
- C7.3,7.9,8,2.8,8,2.8z M6.9,10h2.8l0,0.5h0c0,0,0,0,0,0.1c0,0.8-0.6,1.4-1.4,1.4c-0.7,0-1.3-0.5-1.4-1.2L6.9,10z M4,2.8h2L5.1,9
18
- c0,0-2,0-2.7,0C3.2,7.6,4,2.8,4,2.8z M2.2,10H5c0,0,0,0.6,0,0.6C5,11.4,4.4,12,3.6,12c-0.7,0-1.3-0.5-1.4-1.2L2.2,10z"/>
19
- </g>
20
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 26 26" enable-background="new 0 0 26 26" xml:space="preserve">
6
+ <g>
7
+ <path fill="#434343" d="M0.1,24.6c0-0.3,0.2-0.5,0.5-0.5h24.9c0.3,0,0.5,0.2,0.5,0.5v1c0,0.3-0.2,0.5-0.5,0.5H0.6
8
+ c-0.3,0-0.5-0.2-0.5-0.5V24.6z"/>
9
+ <path fill="#434343" d="M26,9c-1-2-1.4-3.9-2-7.2C24,1.6,23.6,1,23,1H3C2.4,1,2,1.6,2,1.8C2,1.8,1,8,0,9c0,1,0,3,0,3s0,0,0,0.1h0
10
+ c0,0,0.1,0.5,0.7,0.8C0.8,12.9,0.9,13,1,13v0v9C1,22.6,1.6,23,2.1,23H10v-8.3c0-0.6,0.5-1,1.1-1h4c0.5,0,1,0.4,1,1V23h8
11
+ c0.5,0,1-0.4,1-0.9v-9v0c0.8-0.1,1-0.9,1-0.9h0c0,0,0-0.1,0-0.1S26,10,26,9z M7.8,19c0,0.5-0.2,1-0.8,1H5c-0.5,0-0.8-0.5-0.8-1v-4
12
+ c0-0.6,0.3-1,0.8-1H7c0.6,0,0.8,0.4,0.8,1V19z M21.8,19c0,0.5-0.2,1-0.8,1h-2c-0.5,0-0.8-0.5-0.8-1v-4c0-0.6,0.3-1,0.8-1h2
13
+ c0.5,0,0.8,0.4,0.8,1V19z M22,2.8c0,0,1.1,5.1,1.7,6.2c-1,0-2.7,0-2.7,0l-1-6.2H22z M23.8,10l0,0.8c-0.1,0.7-0.7,1.2-1.4,1.2
14
+ c-0.8,0-1.4-0.5-1.4-1.2c0,0,0-0.8,0-0.8H23.8z M16.3,10.5l0-0.5h2.8l0,0.8C19,11.5,18.4,12,17.7,12C16.9,12,16.3,11.4,16.3,10.5
15
+ C16.3,10.6,16.3,10.5,16.3,10.5L16.3,10.5z M18,2.8c0,0,0.8,4.9,1.1,6.2c0.3,0-2.8,0-2.8,0L16,2.8H18z M12,2.8h2L14.4,9h-2.7
16
+ L12,2.8z M11.6,10h2.8l0,0.7C14.3,11.4,13.7,12,13,12c-0.7,0-1.3-0.6-1.4-1.3L11.6,10z M8,2.8h2L9.7,9c0,0-2,0-2.7,0
17
+ C7.3,7.9,8,2.8,8,2.8z M6.9,10h2.8l0,0.5h0c0,0,0,0,0,0.1c0,0.8-0.6,1.4-1.4,1.4c-0.7,0-1.3-0.5-1.4-1.2L6.9,10z M4,2.8h2L5.1,9
18
+ c0,0-2,0-2.7,0C3.2,7.6,4,2.8,4,2.8z M2.2,10H5c0,0,0,0.6,0,0.6C5,11.4,4.4,12,3.6,12c-0.7,0-1.3-0.5-1.4-1.2L2.2,10z"/>
19
+ </g>
20
+ </svg>
images/table.svg CHANGED
@@ -1,32 +1,32 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
- <g>
7
- <rect x="1.5" y="3" fill="#CDCDCD" width="30" height="6"/>
8
- <rect x="33.5" y="3" fill="#CDCDCD" width="33" height="6"/>
9
- <rect x="68.5" y="3" fill="#CDCDCD" width="32" height="6"/>
10
- <rect x="33.5" y="11" fill="#CDCDCD" width="33" height="6"/>
11
- <rect x="1.5" y="11" fill="#CDCDCD" width="30" height="6"/>
12
- <rect x="68.5" y="11" fill="#CDCDCD" width="32" height="6"/>
13
- <rect x="68.5" y="19" fill="#CDCDCD" width="32" height="6"/>
14
- <rect x="1.5" y="19" fill="#CDCDCD" width="30" height="6"/>
15
- <rect x="33.5" y="19" fill="#CDCDCD" width="33" height="6"/>
16
- <rect x="1.5" y="27" fill="#CDCDCD" width="30" height="6"/>
17
- <rect x="33.5" y="27" fill="#CDCDCD" width="33" height="6"/>
18
- <rect x="68.5" y="27" fill="#CDCDCD" width="32" height="6"/>
19
- <rect x="68.5" y="35" fill="#CDCDCD" width="32" height="6"/>
20
- <rect x="1.5" y="35" fill="#CDCDCD" width="30" height="6"/>
21
- <rect x="33.5" y="35" fill="#CDCDCD" width="33" height="6"/>
22
- <rect x="1.5" y="43" fill="#CDCDCD" width="30" height="6"/>
23
- <rect x="68.5" y="43" fill="#CDCDCD" width="32" height="6"/>
24
- <rect x="33.5" y="43" fill="#CDCDCD" width="33" height="6"/>
25
- <rect x="1.5" y="51" fill="#CDCDCD" width="30" height="6"/>
26
- <rect x="68.5" y="51" fill="#CDCDCD" width="32" height="6"/>
27
- <rect x="33.5" y="51" fill="#CDCDCD" width="33" height="6"/>
28
- <rect x="1.5" y="59" fill="#CDCDCD" width="30" height="6"/>
29
- <rect x="33.5" y="59" fill="#CDCDCD" width="33" height="6"/>
30
- <rect x="68.5" y="59" fill="#CDCDCD" width="32" height="6"/>
31
- </g>
32
- </svg>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="102px" height="68px" viewBox="0 0 102 68" enable-background="new 0 0 102 68" xml:space="preserve">
6
+ <g>
7
+ <rect x="1.5" y="3" fill="#CDCDCD" width="30" height="6"/>
8
+ <rect x="33.5" y="3" fill="#CDCDCD" width="33" height="6"/>
9
+ <rect x="68.5" y="3" fill="#CDCDCD" width="32" height="6"/>
10
+ <rect x="33.5" y="11" fill="#CDCDCD" width="33" height="6"/>
11
+ <rect x="1.5" y="11" fill="#CDCDCD" width="30" height="6"/>
12
+ <rect x="68.5" y="11" fill="#CDCDCD" width="32" height="6"/>
13
+ <rect x="68.5" y="19" fill="#CDCDCD" width="32" height="6"/>
14
+ <rect x="1.5" y="19" fill="#CDCDCD" width="30" height="6"/>
15
+ <rect x="33.5" y="19" fill="#CDCDCD" width="33" height="6"/>
16
+ <rect x="1.5" y="27" fill="#CDCDCD" width="30" height="6"/>
17
+ <rect x="33.5" y="27" fill="#CDCDCD" width="33" height="6"/>
18
+ <rect x="68.5" y="27" fill="#CDCDCD" width="32" height="6"/>
19
+ <rect x="68.5" y="35" fill="#CDCDCD" width="32" height="6"/>
20
+ <rect x="1.5" y="35" fill="#CDCDCD" width="30" height="6"/>
21
+ <rect x="33.5" y="35" fill="#CDCDCD" width="33" height="6"/>
22
+ <rect x="1.5" y="43" fill="#CDCDCD" width="30" height="6"/>
23
+ <rect x="68.5" y="43" fill="#CDCDCD" width="32" height="6"/>
24
+ <rect x="33.5" y="43" fill="#CDCDCD" width="33" height="6"/>
25
+ <rect x="1.5" y="51" fill="#CDCDCD" width="30" height="6"/>
26
+ <rect x="68.5" y="51" fill="#CDCDCD" width="32" height="6"/>
27
+ <rect x="33.5" y="51" fill="#CDCDCD" width="33" height="6"/>
28
+ <rect x="1.5" y="59" fill="#CDCDCD" width="30" height="6"/>
29
+ <rect x="33.5" y="59" fill="#CDCDCD" width="33" height="6"/>
30
+ <rect x="68.5" y="59" fill="#CDCDCD" width="32" height="6"/>
31
+ </g>
32
+ </svg>
includes/class-ecwid-help-page.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
-
3
- class Ecwid_Help_Page {
4
- const CONTACT_US_ACTION_NAME = 'ecwid_contact_us';
5
- public function __construct() {
6
- add_action('wp_ajax_' . self::CONTACT_US_ACTION_NAME, array( $this, 'submit_contact_us') );
7
- }
8
-
9
- public function submit_contact_us() {
10
-
11
- if ( !current_user_can('administrator') ) {
12
- header('403 Access Denied');
13
-
14
- die();
15
- }
16
- if ( !wp_verify_nonce($_POST['wp-nonce'], self::CONTACT_US_ACTION_NAME) ) {
17
- header('403 Access Denied');
18
-
19
- die();
20
- }
21
-
22
- $to = get_option( 'ecwid_support_email' );
23
-
24
- $body_lines = array();
25
- if ( get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
26
- $body_lines[] = 'Store ID: ' . get_ecwid_store_id();
27
- }
28
- $body_lines[] = 'Store URL: ' . ecwid_get_store_page_url();
29
- $body_lines[] = 'Wp theme: ' . ecwid_get_theme_name();
30
- $body_lines[] = 'Ecwid plugin version: ' . get_option('ecwid_plugin_version');
31
- $body_lines[] = 'Wordpress version: ' . get_bloginfo('version');
32
- $body_lines[] = '';
33
- $body_lines[] = 'Message:';
34
- $body_lines[] = '';
35
- $body_lines[] = $_POST['body'];
36
-
37
- global $current_user;
38
- $reply_to = $current_user->user_email;
39
-
40
- $result = wp_mail(
41
- $to,
42
- $_POST['subject'],
43
- implode(PHP_EOL, $body_lines),
44
- 'Reply-To:' . $reply_to
45
- );
46
-
47
- if ($result) {
48
- $nonce = wp_create_nonce( self::CONTACT_US_ACTION_NAME );
49
-
50
- echo json_encode(
51
- array(
52
- 'nonce' => $nonce
53
- )
54
- );
55
- wp_die();
56
- } else {
57
- header('500 Send mail failed');
58
- die();
59
- }
60
- }
61
-
62
- public function get_faqs() {
63
- global $faqs;
64
-
65
- include 'faq_entries.php';
66
-
67
- $max = 8;
68
-
69
- $result = array();
70
- foreach ( $faqs as $idx => $faq ) {
71
- if ( isset($faq['priority']) && $faq['priority'] == 'newbie_with_woo' ) {
72
- $installed_within_two_weeks = time() - get_option( 'ecwid_installation_date' ) < 60 * 60 * 24 * 14;
73
-
74
- if ( ecwid_get_woocommerce_status() && $installed_within_two_weeks ) {
75
- $result[] = $faq;
76
- unset($faqs[$idx]);
77
- }
78
- }
79
- }
80
- $faqs = array_values($faqs);
81
-
82
- while (count($result) < $max) {
83
- $rand = rand(0, count($faqs) - 1);
84
- $result[] = $faqs[$rand];
85
-
86
- unset($faqs[$rand]);
87
- $faqs = array_values($faqs);
88
- }
89
-
90
- $faqs = $result;
91
-
92
- $result = array();
93
- foreach ($faqs as $faq) {
94
- $faq['body'] = preg_replace('!<img alt="" src="([^"]*)"!', '<img alt="" src="' . ECWID_PLUGIN_URL . '/images/help/' . '$1"', $faq['body']);
95
-
96
- $result[] = (object) $faq;
97
- }
98
-
99
- return $result;
100
- }
101
- }
102
-
103
  $ecwid_help_page = new Ecwid_Help_Page();
1
+ <?php
2
+
3
+ class Ecwid_Help_Page {
4
+ const CONTACT_US_ACTION_NAME = 'ecwid_contact_us';
5
+ public function __construct() {
6
+ add_action('wp_ajax_' . self::CONTACT_US_ACTION_NAME, array( $this, 'submit_contact_us') );
7
+ }
8
+
9
+ public function submit_contact_us() {
10
+
11
+ if ( !current_user_can('administrator') ) {
12
+ header('403 Access Denied');
13
+
14
+ die();
15
+ }
16
+ if ( !wp_verify_nonce($_POST['wp-nonce'], self::CONTACT_US_ACTION_NAME) ) {
17
+ header('403 Access Denied');
18
+
19
+ die();
20
+ }
21
+
22
+ $to = get_option( 'ecwid_support_email' );
23
+
24
+ $body_lines = array();
25
+ if ( get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
26
+ $body_lines[] = 'Store ID: ' . get_ecwid_store_id();
27
+ }
28
+ $body_lines[] = 'Store URL: ' . ecwid_get_store_page_url();
29
+ $body_lines[] = 'Wp theme: ' . ecwid_get_theme_name();
30
+ $body_lines[] = 'Ecwid plugin version: ' . get_option('ecwid_plugin_version');
31
+ $body_lines[] = 'Wordpress version: ' . get_bloginfo('version');
32
+ $body_lines[] = '';
33
+ $body_lines[] = 'Message:';
34
+ $body_lines[] = '';
35
+ $body_lines[] = $_POST['body'];
36
+
37
+ global $current_user;
38
+ $reply_to = $current_user->user_email;
39
+
40
+ $result = wp_mail(
41
+ $to,
42
+ $_POST['subject'],
43
+ implode(PHP_EOL, $body_lines),
44
+ 'Reply-To:' . $reply_to
45
+ );
46
+
47
+ if ($result) {
48
+ $nonce = wp_create_nonce( self::CONTACT_US_ACTION_NAME );
49
+
50
+ echo json_encode(
51
+ array(
52
+ 'nonce' => $nonce
53
+ )
54
+ );
55
+ wp_die();
56
+ } else {
57
+ header('500 Send mail failed');
58
+ die();
59
+ }
60
+ }
61
+
62
+ public function get_faqs() {
63
+ global $faqs;
64
+
65
+ include 'faq_entries.php';
66
+
67
+ $max = 8;
68
+
69
+ $result = array();
70
+ foreach ( $faqs as $idx => $faq ) {
71
+ if ( isset($faq['priority']) && $faq['priority'] == 'newbie_with_woo' ) {
72
+ $installed_within_two_weeks = time() - get_option( 'ecwid_installation_date' ) < 60 * 60 * 24 * 14;
73
+
74
+ if ( ecwid_get_woocommerce_status() && $installed_within_two_weeks ) {
75
+ $result[] = $faq;
76
+ unset($faqs[$idx]);
77
+ }
78
+ }
79
+ }
80
+ $faqs = array_values($faqs);
81
+
82
+ while (count($result) < $max) {
83
+ $rand = rand(0, count($faqs) - 1);
84
+ $result[] = $faqs[$rand];
85
+
86
+ unset($faqs[$rand]);
87
+ $faqs = array_values($faqs);
88
+ }
89
+
90
+ $faqs = $result;
91
+
92
+ $result = array();
93
+ foreach ($faqs as $faq) {
94
+ $faq['body'] = preg_replace('!<img alt="" src="([^"]*)"!', '<img alt="" src="' . ECWID_PLUGIN_URL . '/images/help/' . '$1"', $faq['body']);
95
+
96
+ $result[] = (object) $faq;
97
+ }
98
+
99
+ return $result;
100
+ }
101
+ }
102
+
103
  $ecwid_help_page = new Ecwid_Help_Page();
includes/class-ecwid-integration-aiosp.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
-
3
- class Ecwid_Integration_All_In_One_SEO_Pack
4
- {
5
- // Store intermediate sitemap generation results here
6
- protected $sitemap = array();
7
-
8
- public function __construct()
9
- {
10
- add_action( 'wp', array( $this, 'disable_seo_on_escaped_fragment' ) );
11
-
12
- add_filter( 'aiosp_sitemap_extra', array( $this, 'aiosp_hook_sitemap_extra' ) );
13
- add_filter( 'aiosp_sitemap_custom_ecwid', array( $this, 'aiosp_hook_sitemap_content') );
14
- }
15
-
16
- // Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
17
- public function disable_seo_on_escaped_fragment()
18
- {
19
- if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
20
- return;
21
- }
22
-
23
- global $aioseop_options;
24
-
25
- $aioseop_options['aiosp_can'] = false;
26
- add_filter( 'aioseop_title', '__return_null' );
27
- add_filter( 'aioseop_description', '__return_null' );
28
- }
29
-
30
- // Hook that new sitemap type to aiosp sitemap
31
- public function aiosp_hook_sitemap_extra( $params )
32
- {
33
- return array_merge($params, array('ecwid'));
34
- }
35
-
36
- // Hook that adds content to aiosp sitemap
37
- public function aiosp_hook_sitemap_content()
38
- {
39
-
40
- $this->sitemap = array();
41
-
42
- ecwid_build_sitemap( array($this, 'sitemap_callback') );
43
-
44
- $sitemap = $this->sitemap;
45
- $this->sitemap = null;
46
-
47
- return $sitemap;
48
- }
49
-
50
- // A callback for the streaming sitemap builder
51
- public function sitemap_callback($url, $priority, $frequency)
52
- {
53
- array_push($this->sitemap, array(
54
- 'loc' => $url,
55
- 'priority' => $priority,
56
- 'changefreq' => $frequency
57
- ));
58
- }
59
- }
60
-
61
  $ecwid_integration_aiosp = new Ecwid_Integration_All_In_One_SEO_Pack();
1
+ <?php
2
+
3
+ class Ecwid_Integration_All_In_One_SEO_Pack
4
+ {
5
+ // Store intermediate sitemap generation results here
6
+ protected $sitemap = array();
7
+
8
+ public function __construct()
9
+ {
10
+ add_action( 'wp', array( $this, 'disable_seo_on_escaped_fragment' ) );
11
+
12
+ add_filter( 'aiosp_sitemap_extra', array( $this, 'aiosp_hook_sitemap_extra' ) );
13
+ add_filter( 'aiosp_sitemap_custom_ecwid', array( $this, 'aiosp_hook_sitemap_content') );
14
+ }
15
+
16
+ // Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
17
+ public function disable_seo_on_escaped_fragment()
18
+ {
19
+ if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
20
+ return;
21
+ }
22
+
23
+ global $aioseop_options;
24
+
25
+ $aioseop_options['aiosp_can'] = false;
26
+ add_filter( 'aioseop_title', '__return_null' );
27
+ add_filter( 'aioseop_description', '__return_null' );
28
+ }
29
+
30
+ // Hook that new sitemap type to aiosp sitemap
31
+ public function aiosp_hook_sitemap_extra( $params )
32
+ {
33
+ return array_merge($params, array('ecwid'));
34
+ }
35
+
36
+ // Hook that adds content to aiosp sitemap
37
+ public function aiosp_hook_sitemap_content()
38
+ {
39
+
40
+ $this->sitemap = array();
41
+
42
+ ecwid_build_sitemap( array($this, 'sitemap_callback') );
43
+
44
+ $sitemap = $this->sitemap;
45
+ $this->sitemap = null;
46
+
47
+ return $sitemap;
48
+ }
49
+
50
+ // A callback for the streaming sitemap builder
51
+ public function sitemap_callback($url, $priority, $frequency)
52
+ {
53
+ array_push($this->sitemap, array(
54
+ 'loc' => $url,
55
+ 'priority' => $priority,
56
+ 'changefreq' => $frequency
57
+ ));
58
+ }
59
+ }
60
+
61
  $ecwid_integration_aiosp = new Ecwid_Integration_All_In_One_SEO_Pack();
includes/class-ecwid-integration-autoptimize.php CHANGED
@@ -1,31 +1,31 @@
1
- <?php
2
-
3
- class Ecwid_Integration_Autoptimize
4
- {
5
- public function __construct()
6
- {
7
- add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
8
-
9
- add_filter( 'autoptimize_filter_js_movelast', array( $this, 'hook_js_movelast' ) );
10
- add_filter( 'autoptimize_filter_js_exclude', array( $this, 'hook_js_exclude' ) );
11
- }
12
-
13
- public function ecwid_shortcode_content($content) {
14
- return '<!-- noptimize -->' . $content . '<!-- /noptimize -->';
15
- }
16
-
17
- public function hook_js_movelast($scripts) {
18
- if ((bool)get_option('ecwid_use_chameleon')) {
19
- $scripts[] = 'chameleon.js';
20
- }
21
-
22
- return $scripts;
23
- }
24
-
25
- public function hook_js_exclude($exclude) {
26
- $code = ecwid_get_search_js_code();
27
- return $exclude . ", $code";
28
- }
29
- }
30
-
31
  $ecwid_integration_autoptimize = new Ecwid_Integration_Autoptimize();
1
+ <?php
2
+
3
+ class Ecwid_Integration_Autoptimize
4
+ {
5
+ public function __construct()
6
+ {
7
+ add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
8
+
9
+ add_filter( 'autoptimize_filter_js_movelast', array( $this, 'hook_js_movelast' ) );
10
+ add_filter( 'autoptimize_filter_js_exclude', array( $this, 'hook_js_exclude' ) );
11
+ }
12
+
13
+ public function ecwid_shortcode_content($content) {
14
+ return '<!-- noptimize -->' . $content . '<!-- /noptimize -->';
15
+ }
16
+
17
+ public function hook_js_movelast($scripts) {
18
+ if ((bool)get_option('ecwid_use_chameleon')) {
19
+ $scripts[] = 'chameleon.js';
20
+ }
21
+
22
+ return $scripts;
23
+ }
24
+
25
+ public function hook_js_exclude($exclude) {
26
+ $code = ecwid_get_search_js_code();
27
+ return $exclude . ", $code";
28
+ }
29
+ }
30
+
31
  $ecwid_integration_autoptimize = new Ecwid_Integration_Autoptimize();
includes/class-ecwid-integration-divibuilder.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
-
3
- class Ecwid_Integration_Divibuilder {
4
- public function __construct() {
5
- if (is_admin()) {
6
- add_action('admin_init', 'ecwid_create_divi_module' );
7
- add_action('admin_enqueue_style', array($this, 'enqueue_style'));
8
- } else {
9
- add_action('wp', 'ecwid_create_divi_module' );
10
- }
11
- }
12
-
13
- public function enqueue_style() {
14
- wp_enqueue_style('ecwid-divi', ECWID_PLUGIN_URL . '/css/divibuilder.css', array('et_pb_admin_css'));
15
- }
16
- }
17
-
18
- new Ecwid_Integration_Divibuilder();
19
-
20
- function ecwid_create_divi_module() {
21
-
22
- if ( class_exists( 'ET_Builder_Module' ) && ! class_exists( 'ET_Builder_Module_Ecwid' ) ) {
23
- class ET_Builder_Module_Ecwid extends ET_Builder_Module {
24
- function init() {
25
- $this->name = __( 'Ecwid', 'et_builder' );
26
- $this->slug = 'et_pb_ecwid';
27
- $this->use_row_content = TRUE;
28
- $this->decode_entities = TRUE;
29
-
30
- $this->whitelisted_fields = array(
31
- 'raw_content',
32
- 'admin_label',
33
- 'module_id',
34
- 'module_class',
35
- );
36
- }
37
-
38
- function get_fields() {
39
- $fields = array(
40
- 'raw_content' => array(
41
- 'label' => __( 'Content', 'et_builder' ),
42
- 'type' => 'text',
43
- 'option_category' => 'basic_option',
44
- 'description' => __( 'Here you can create the content that will be used within the module.', 'et_builder' ),
45
- 'default' => '[ecwid widgets="productbrowser minicart categories search" grid="3,3" list="10" table="20" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]'
46
-
47
- ),
48
- 'admin_label' => array(
49
- 'label' => __( 'Admin Label', 'et_builder' ),
50
- 'type' => 'text',
51
- 'description' => __( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
52
- ),
53
- 'module_id' => array(
54
- 'label' => __( 'CSS ID', 'et_builder' ),
55
- 'type' => 'text',
56
- 'option_category' => 'configuration',
57
- 'description' => __( 'Enter an optional CSS ID to be used for this module. An ID can be used to create custom CSS styling, or to create links to particular sections of your page.', 'et_builder' ),
58
- ),
59
- 'module_class' => array(
60
- 'label' => __( 'CSS Class', 'et_builder' ),
61
- 'type' => 'text',
62
- 'option_category' => 'configuration',
63
- 'description' => __( 'Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated with a space.', 'et_builder' ),
64
- ),
65
- );
66
-
67
- return $fields;
68
- }
69
-
70
- function shortcode_callback( $atts, $content = NULL, $function_name ) {
71
-
72
- $module_id = $this->shortcode_atts['module_id'];
73
- $module_class = $this->shortcode_atts['module_class'];
74
-
75
- $module_class = ET_Builder_Element::add_module_order_class( $module_class, $function_name );
76
-
77
- $this->shortcode_content = et_builder_replace_code_content_entities( $this->shortcode_content );
78
-
79
- $output = sprintf(
80
- '<div%2$s class="et_pb_ecwid et_pb_module%3$s">
81
- %1$s
82
- </div> <!-- .et_pb_ecwid -->',
83
- $this->shortcode_content,
84
- ( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
85
- ( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' )
86
- );
87
-
88
- return $output;
89
- }
90
- }
91
-
92
- new ET_Builder_Module_Ecwid;
93
-
94
- }
95
  }
1
+ <?php
2
+
3
+ class Ecwid_Integration_Divibuilder {
4
+ public function __construct() {
5
+ if (is_admin()) {
6
+ add_action('admin_init', 'ecwid_create_divi_module' );
7
+ add_action('admin_enqueue_style', array($this, 'enqueue_style'));
8
+ } else {
9
+ add_action('wp', 'ecwid_create_divi_module' );
10
+ }
11
+ }
12
+
13
+ public function enqueue_style() {
14
+ wp_enqueue_style('ecwid-divi', ECWID_PLUGIN_URL . '/css/divibuilder.css', array('et_pb_admin_css'));
15
+ }
16
+ }
17
+
18
+ new Ecwid_Integration_Divibuilder();
19
+
20
+ function ecwid_create_divi_module() {
21
+
22
+ if ( class_exists( 'ET_Builder_Module' ) && ! class_exists( 'ET_Builder_Module_Ecwid' ) ) {
23
+ class ET_Builder_Module_Ecwid extends ET_Builder_Module {
24
+ function init() {
25
+ $this->name = __( 'Ecwid', 'et_builder' );
26
+ $this->slug = 'et_pb_ecwid';
27
+ $this->use_row_content = TRUE;
28
+ $this->decode_entities = TRUE;
29
+
30
+ $this->whitelisted_fields = array(
31
+ 'raw_content',
32
+ 'admin_label',
33
+ 'module_id',
34
+ 'module_class',
35
+ );
36
+ }
37
+
38
+ function get_fields() {
39
+ $fields = array(
40
+ 'raw_content' => array(
41
+ 'label' => __( 'Content', 'et_builder' ),
42
+ 'type' => 'text',
43
+ 'option_category' => 'basic_option',
44
+ 'description' => __( 'Here you can create the content that will be used within the module.', 'et_builder' ),
45
+ 'default' => '[ecwid widgets="productbrowser minicart categories search" grid="3,3" list="10" table="20" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]'
46
+
47
+ ),
48
+ 'admin_label' => array(
49
+ 'label' => __( 'Admin Label', 'et_builder' ),
50
+ 'type' => 'text',
51
+ 'description' => __( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
52
+ ),
53
+ 'module_id' => array(
54
+ 'label' => __( 'CSS ID', 'et_builder' ),
55
+ 'type' => 'text',
56
+ 'option_category' => 'configuration',
57
+ 'description' => __( 'Enter an optional CSS ID to be used for this module. An ID can be used to create custom CSS styling, or to create links to particular sections of your page.', 'et_builder' ),
58
+ ),
59
+ 'module_class' => array(
60
+ 'label' => __( 'CSS Class', 'et_builder' ),
61
+ 'type' => 'text',
62
+ 'option_category' => 'configuration',
63
+ 'description' => __( 'Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated with a space.', 'et_builder' ),
64
+ ),
65
+ );
66
+
67
+ return $fields;
68
+ }
69
+
70
+ function shortcode_callback( $atts, $content = NULL, $function_name ) {
71
+
72
+ $module_id = $this->shortcode_atts['module_id'];
73
+ $module_class = $this->shortcode_atts['module_class'];
74
+
75
+ $module_class = ET_Builder_Element::add_module_order_class( $module_class, $function_name );
76
+
77
+ $this->shortcode_content = et_builder_replace_code_content_entities( $this->shortcode_content );
78
+
79
+ $output = sprintf(
80
+ '<div%2$s class="et_pb_ecwid et_pb_module%3$s">
81
+ %1$s
82
+ </div> <!-- .et_pb_ecwid -->',
83
+ $this->shortcode_content,
84
+ ( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
85
+ ( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' )
86
+ );
87
+
88
+ return $output;
89
+ }
90
+ }
91
+
92
+ new ET_Builder_Module_Ecwid;
93
+
94
+ }
95
  }
includes/class-ecwid-integration-wpseo.php CHANGED
@@ -1,129 +1,129 @@
1
- <?php
2
-
3
- class Ecwid_Integration_WordPress_SEO_By_Yoast
4
- {
5
- // Store intermediate sitemap generation results here
6
- protected $sitemap = array();
7
-
8
- public function __construct()
9
- {
10
- add_action( 'wp', array( $this, 'disable_seo_on_escaped_fragment' ) );
11
- add_action( 'template_redirect', array( $this, 'disable_rewrite_titles' ) );
12
-
13
- if (ecwid_is_paid_account() && ecwid_is_store_page_available()) {
14
- add_filter( 'wpseo_sitemap_index', array( $this, 'wpseo_hook_sitemap_index' ) );
15
- add_filter( 'wpseo_do_sitemap_ecwid', array( $this, 'wpseo_hook_do_sitemap' ) );
16
- if (array_key_exists('_escaped_fragment_', $_GET)) {
17
- add_filter( 'wpseo_title', 'ecwid_seo_title' );
18
- add_filter( 'wpseo_metadesc', array( $this, 'wpseo_hook_description' ) );
19
- }
20
- }
21
-
22
- add_filter( 'ecwid_title_separator', array( $this, 'get_title_separator' ) );
23
- }
24
-
25
- // Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
26
- public function disable_seo_on_escaped_fragment()
27
- {
28
- if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
29
- return;
30
- }
31
-
32
- global $wpseo_front;
33
- // Canonical
34
-
35
- if (empty($wpseo_front)) {
36
- $wpseo_front = WPSEO_Frontend::get_instance();
37
- }
38
-
39
- remove_action( 'wpseo_head', array( $wpseo_front, 'canonical' ), 20 );
40
- // Description
41
- remove_action( 'wpseo_head', array( $wpseo_front, 'metadesc' ), 10 );
42
- }
43
-
44
- public function disable_rewrite_titles()
45
- {
46
- global $wpseo_front;
47
-
48
- // Newer versions of Wordpress SEO assign their rewrite on this stage
49
- remove_action( 'template_redirect', array( $wpseo_front, 'force_rewrite_output_buffer' ), 99999 );
50
- }
51
-
52
- // Hook that new sitemap type to aiosp sitemap
53
- public function wpseo_hook_sitemap_index( )
54
- {
55
- $now = date('c', time());;
56
- $sitemap_url = wpseo_xml_sitemaps_base_url('ecwid-sitemap.xml');
57
- return <<<XML
58
- <sitemap>
59
- <loc>$sitemap_url</loc>
60
- <lastmod>$now</lastmod>
61
- </sitemap>
62
- XML;
63
- }
64
-
65
- // Hook that adds content to aiosp sitemap
66
- public function wpseo_hook_do_sitemap()
67
- {
68
-
69
- $this->sitemap = <<<XML
70
- <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
71
- XML;
72
-
73
-
74
- ecwid_build_sitemap( array($this, 'sitemap_callback') );
75
-
76
- $this->sitemap .= '</urlset>';
77
-
78
- $sitemap = $this->sitemap;
79
- $this->sitemap = null;
80
-
81
- $GLOBALS['wpseo_sitemaps']->set_sitemap($sitemap);
82
- }
83
-
84
- // A callback for the streaming sitemap builder
85
- public function sitemap_callback($url, $priority, $frequency, $obj)
86
- {
87
- $url = htmlspecialchars($url);
88
- $imageCode = '';
89
- $image = @$obj['originalImageUrl'];
90
- if ($image) {
91
- $image = htmlspecialchars($image);
92
- $title = htmlspecialchars($obj['name']);
93
- $imageCode = <<<XML
94
- <image:image>
95
- <image:title>$title</image:title>
96
- <image:loc>$image</image:loc>
97
-
98
- </image:image>
99
- XML;
100
- }
101
- $this->sitemap .= <<<XML
102
- <url>
103
- <loc>$url</loc>
104
- <changefreq>$frequency</changefreq>
105
- <priority>$priority</priority>
106
- $imageCode
107
- </url>
108
-
109
- XML;
110
- }
111
-
112
- public function get_title_separator($separator)
113
- {
114
- if (class_exists('WPSEO_Option_Titles')) {
115
- $separator = wpseo_replace_vars( '%%sep%%', array() );
116
- }
117
-
118
- return $separator;
119
- }
120
-
121
- public function wpseo_hook_description($description) {
122
- if ( ecwid_is_applicable_escaped_fragment() )
123
- return '';
124
-
125
- return $description;
126
- }
127
- }
128
-
129
- $ecwid_integration_wpseo = new Ecwid_Integration_WordPress_SEO_By_Yoast();
1
+ <?php
2
+
3
+ class Ecwid_Integration_WordPress_SEO_By_Yoast
4
+ {
5
+ // Store intermediate sitemap generation results here
6
+ protected $sitemap = array();
7
+
8
+ public function __construct()
9
+ {
10
+ add_action( 'wp', array( $this, 'disable_seo_on_escaped_fragment' ) );
11
+ add_action( 'template_redirect', array( $this, 'disable_rewrite_titles' ) );
12
+
13
+ if (ecwid_is_paid_account() && ecwid_is_store_page_available()) {
14
+ add_filter( 'wpseo_sitemap_index', array( $this, 'wpseo_hook_sitemap_index' ) );
15
+ add_filter( 'wpseo_do_sitemap_ecwid', array( $this, 'wpseo_hook_do_sitemap' ) );
16
+ if (array_key_exists('_escaped_fragment_', $_GET)) {
17
+ add_filter( 'wpseo_title', 'ecwid_seo_title' );
18
+ add_filter( 'wpseo_metadesc', array( $this, 'wpseo_hook_description' ) );
19
+ }
20
+ }
21
+
22
+ add_filter( 'ecwid_title_separator', array( $this, 'get_title_separator' ) );
23
+ }
24
+
25
+ // Disable titles, descriptions and canonical link on ecwid _escaped_fragment_ pages
26
+ public function disable_seo_on_escaped_fragment()
27
+ {
28
+ if (!array_key_exists('_escaped_fragment_', $_GET) || !ecwid_page_has_productbrowser()) {
29
+ return;
30
+ }
31
+
32
+ global $wpseo_front;
33
+ // Canonical
34
+
35
+ if (empty($wpseo_front)) {
36
+ $wpseo_front = WPSEO_Frontend::get_instance();
37
+ }
38
+
39
+ remove_action( 'wpseo_head', array( $wpseo_front, 'canonical' ), 20 );
40
+ // Description
41
+ remove_action( 'wpseo_head', array( $wpseo_front, 'metadesc' ), 10 );
42
+ }
43
+
44
+ public function disable_rewrite_titles()
45
+ {
46
+ global $wpseo_front;
47
+
48
+ // Newer versions of Wordpress SEO assign their rewrite on this stage
49
+ remove_action( 'template_redirect', array( $wpseo_front, 'force_rewrite_output_buffer' ), 99999 );
50
+ }
51
+
52
+ // Hook that new sitemap type to aiosp sitemap
53
+ public function wpseo_hook_sitemap_index( )
54
+ {
55
+ $now = date('c', time());;
56
+ $sitemap_url = wpseo_xml_sitemaps_base_url('ecwid-sitemap.xml');
57
+ return <<<XML
58
+ <sitemap>
59
+ <loc>$sitemap_url</loc>
60
+ <lastmod>$now</lastmod>
61
+ </sitemap>
62
+ XML;
63
+ }
64
+
65
+ // Hook that adds content to aiosp sitemap
66
+ public function wpseo_hook_do_sitemap()
67
+ {
68
+
69
+ $this->sitemap = <<<XML
70
+ <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
71
+ XML;
72
+
73
+
74
+ ecwid_build_sitemap( array($this, 'sitemap_callback') );
75
+
76
+ $this->sitemap .= '</urlset>';
77
+
78
+ $sitemap = $this->sitemap;
79
+ $this->sitemap = null;
80
+
81
+ $GLOBALS['wpseo_sitemaps']->set_sitemap($sitemap);
82
+ }
83
+
84
+ // A callback for the streaming sitemap builder
85
+ public function sitemap_callback($url, $priority, $frequency, $obj)
86
+ {
87
+ $url = htmlspecialchars($url);
88
+ $imageCode = '';
89
+ $image = @$obj['originalImageUrl'];
90
+ if ($image) {
91
+ $image = htmlspecialchars($image);
92
+ $title = htmlspecialchars($obj['name']);
93
+ $imageCode = <<<XML
94
+ <image:image>
95
+ <image:title>$title</image:title>
96
+ <image:loc>$image</image:loc>
97
+
98
+ </image:image>
99
+ XML;
100
+ }
101
+ $this->sitemap .= <<<XML
102
+ <url>
103
+ <loc>$url</loc>
104
+ <changefreq>$frequency</changefreq>
105
+ <priority>$priority</priority>
106
+ $imageCode
107
+ </url>
108
+
109
+ XML;
110
+ }
111
+
112
+ public function get_title_separator($separator)
113
+ {
114
+ if (class_exists('WPSEO_Option_Titles')) {
115
+ $separator = wpseo_replace_vars( '%%sep%%', array() );
116
+ }
117
+
118
+ return $separator;
119
+ }
120
+
121
+ public function wpseo_hook_description($description) {
122
+ if ( ecwid_is_applicable_escaped_fragment() )
123
+ return '';
124
+
125
+ return $description;
126
+ }
127
+ }
128
+
129
+ $ecwid_integration_wpseo = new Ecwid_Integration_WordPress_SEO_By_Yoast();
includes/class-ecwid-message-manager.php CHANGED
@@ -1,360 +1,360 @@
1
- <?php
2
-
3
- class Ecwid_Message_Manager
4
- {
5
- protected $messages = array();
6
-
7
- protected function __construct()
8
- {
9
- $this->init_messages();
10
- }
11
-
12
- public static function show_messages()
13
- {
14
- $mm = self::get_instance();
15
-
16
- foreach ($mm->messages as $name => $message) {
17
- if ($mm->need_to_show_message($name)) {
18
- $mm->show_message($name);
19
- }
20
- }
21
- }
22
-
23
- public static function get_oauth_message($wp_remote_post_error = '')
24
- {
25
- if (!$wp_remote_post_error) {
26
- $message = sprintf(
27
- __( <<<TXT
28
- Sorry, there is a problem. This page is supposed to display your store control panel. But this WordPress site doesn't seem to be able to connect to the Ecwid server, that's why there is no dashboard. This is caused by your server misconfiguration and can be fixed by your hosting provider.
29
- <br /><br />
30
- Here is a more techy description of the problem, please send it to your hosting provider: "The WordPress function wp_remote_post() failed to connect a remote server because of some error. Seems like HTTP POST requests are disabled on this server".
31
- <br /><br />
32
- Please also feel free to contact us at <a %s>wordpress@ecwid.com</a> and we will help you handle it with your hosting.
33
- <br /><br />
34
- Meanwhile, to manage your store, you can use the Ecwid Web Control Panel at <a %s>my.ecwid.com</a>. Your store front is working fine as well and you can check it here: <a %s>%s</a>.
35
- TXT
36
-
37
- ),
38
- 'href="mailto:wordpress@ecwid.com"',
39
- 'target="_blank" href="http://my.ecwid.com"',
40
- 'href="' . ecwid_get_store_page_url() . '" target="_blank"',
41
- ecwid_get_store_page_url()
42
- );
43
- } else {
44
- $message = sprintf(
45
- __('Sorry, there is a problem. This page is supposed to display your store Control Panel. However, this Wordpress site doesn\'t seem to be able to connect to the Ecwid server to show your store dashboard here. This is likely caused by your server misconfiguration and can be fixed by your hosting provider. Here is a more techy description of the problem, which you can send to your hosting provider: "The Wordpress function wp_remote_post() failed to connect a remote server because of some error: "%s". Seems like HTTP POST requests are disabled on this server". <br /><br />Please feel free to contact us at <a %s>wordpress@ecwid.com</a> and we will help you contact your hosting and ask them to fix the issue. <br /><br /> Meanwhile, to manage your store, you can use the Ecwid Web Control Panel at <a %s>my.ecwid.com</a>. Your store front is working fine as well and you can check it here: <a %s>%s</a>.'),
46
- $wp_remote_post_error,
47
- 'href="mailto:wordpress@ecwid.com"',
48
- 'target="_blank" href="http://my.ecwid.com"',
49
- 'href="' . ecwid_get_store_page_url() . '" target="_blank"',
50
- ecwid_get_store_page_url()
51
- );
52
- }
53
-
54
- return $message;
55
- }
56
-
57
- public static function get_upgrade_search_and_cats_message() {
58
- $is_old_search = ecwid_is_old_search_widget_used();
59
- $is_old_categories = ecwid_is_old_cats_widget_used();
60
-
61
- $main_message = __( 'Updated %s widgets are available for your Ecwid store. They are more mobile friendly and look better. Please enable them on the plugin settings page and check how they work in your store. The new widgets will be enabled automatically for all users in one of the upcoming plugin versions.', 'ecwid-shopping-cart' );
62
-
63
- $widgets = '';
64
- if ($is_old_search && $is_old_categories) {
65
- $widgets = _x( 'Search and Categories', 'upgrade widgets message', 'ecwid-shopping-cart' );
66
- } else if ( $is_old_search ) {
67
- $widgets = _x( 'Search', 'upgrade widgets message', 'ecwid-shopping-cart' );
68
- } else if ( $is_old_categories ) {
69
- $widgets = _x( 'Categories', 'upgrade widgets message', 'ecwid-shopping-cart' );
70
- }
71
-
72
- return sprintf($main_message, $widgets);
73
- }
74
-
75
- public static function show_message($name, $params = array())
76
- {
77
- $mm = self::get_instance();
78
-
79
- $mm->need_to_show_message($name);
80
-
81
- if (!isset($mm->messages[$name]) && empty($params)) {
82
- trigger_error('Ecwid plugin error: unknown message ' . $name);
83
- return;
84
- }
85
-
86
- $params = $mm->get_message_params($name, $params);
87
-
88
- $type = $params['type'];
89
-
90
- $title = $params['title'];
91
- $message = $params['message'];
92
-
93
- $primary_button = isset($params['primary_title']);
94
- if ($primary_button) {
95
- $primary_title = $params['primary_title'];
96
- $primary_url = $params['primary_url'];
97
- $primary_blank = @$params['primary_blank'];
98
- }
99
- $secondary_button = isset($params['secondary_title']);
100
- if ($secondary_button) {
101
- $secondary_title = $params['secondary_title'];
102
- $secondary_url = $params['secondary_url'];
103
- $secondary_blank = @$params['secondary_blank'];
104
- }
105
-
106
- $do_not_show_again = true == $params['hideable'];
107
-
108
- include ECWID_PLUGIN_DIR . 'templates/admin-message.php';
109
- }
110
-
111
- public static function disable_message($name)
112
- {
113
- $messages = get_option('ecwid_disabled_messages');
114
- $messages[$name] = true;
115
-
116
- update_option('ecwid_disabled_messages', $messages);
117
- }
118
-
119
- public static function enable_message($name)
120
- {
121
- $messages = get_option('ecwid_disabled_messages');
122
- if (isset($messages['name']))
123
- unset($messages['name']);
124
-
125
- update_option('ecwid_disabled_messages', $messages);
126
- }
127
-
128
- public static function reset_hidden_messages()
129
- {
130
- $hidden_messages = array();
131
-
132
- $messages = self::get_default_messages();
133
- foreach ($messages as $name => $message) {
134
- if (isset($message['default']) && $message['default'] == 'hidden') {
135
- $hidden_messages[$name] = true;
136
- }
137
- }
138
-
139
- update_option('ecwid_disabled_messages', array());
140
- }
141
-
142
- protected static function get_instance()
143
- {
144
- static $instance = null;
145
-
146
- if (is_null($instance)) {
147
- $instance = new Ecwid_Message_Manager();
148
- }
149
-
150
- return $instance;
151
- }
152
-
153
- protected function init_messages()
154
- {
155
- $this->messages = $this->get_default_messages();
156
-
157
- $hidden_messages = get_option('ecwid_disabled_messages');
158
-
159
- if ( !empty( $hidden_messages ) ) {
160
- foreach ($hidden_messages as $name => $message) {
161
- unset ($this->messages[$name]);
162
- }
163
- }
164
- }
165
-
166
- protected function get_message_params($name, $params)
167
- {
168
- if (is_array($name)) {
169
- $params = $name;
170
- $name = '';
171
- }
172
-
173
- if (isset($this->messages[$name])) {
174
- $params = array_merge(
175
- array('type' => 'info', 'title' => '', 'message' => '', 'hideable' => false),
176
- $this->messages[$name],
177
- $params
178
- );
179
- }
180
-
181
- if ($name == 'on_storeid_set') {
182
- $params['primary_url'] = ecwid_get_store_page_url();
183
- $params['secondary_url'] = 'post.php?post=' . ecwid_get_current_store_page_id() . '&action=edit&show-ecwid=true';
184
- }
185
-
186
- if ($name == 'on_appearance_widgets') {
187
-
188
- if (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'appearance') {
189
- $admin_page = 'admin.php?page=ecwid-appearance';
190
- } elseif (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'new') {
191
- $admin_page = 'post-new.php?post_type=page';
192
- } elseif (isset($_GET['from-ecwid']) && is_numeric($_GET['from-ecwid'])) {
193
- $admin_page = 'post.php?post=' . $_GET['from-ecwid'] . '&action=edit';
194
- }
195
-
196
- $params['secondary_url'] = $admin_page;
197
- }
198
- $types_map = array(
199
- 'info' => 'updated',
200
- 'warning' => 'update-nag',
201
- 'error' => 'error'
202
- );
203
- $params['type'] = $types_map[$params['type']];
204
-
205
- return $params;
206
- }
207
-
208
- protected static function get_default_messages()
209
- {
210
- return array(
211
- 'on_activate' => array(
212
- 'title' => __('Greetings! Your Ecwid plugin is now active.', 'ecwid-shopping-cart'),
213
- 'message' => __('Take a few simple steps to complete store setup', 'ecwid-shopping-cart'),
214
- 'primary_title' => __('Set up Ecwid Store', 'ecwid-shopping-cart'),
215
- 'primary_url' => 'admin.php?page=ecwid',
216
- 'hideable' => true,
217
- 'default' => 'disabled'
218
- ),
219
-
220
- 'on_no_storeid_on_setup_pages' => array(
221
- 'type' => 'warning',
222
- 'title' => __('Your store is almost ready!', 'ecwid-shopping-cart' ),
223
- 'message' => __('Complete setup and start selling', 'ecwid-shopping-cart' ),
224
- 'primary_title' => __('Complete Setup', 'ecwid-shopping-cart' ),
225
- 'primary_url' => 'admin.php?page=ecwid',
226
- 'hideable' => true
227
- ),
228
-
229
- 'on_appearance_widgets' => array(
230
- 'message' => __('To add extra functions to your store, drag and drop Ecwid store elements on your site. When you\'re done, you can get back to modifying your settings.', 'ecwid-shopping-cart' ),
231
- 'secondary_title' => __('Back to Store Settings', 'ecwid-shopping-cart'),
232
- 'secondary_url' => 'admin.php?page=ecwid-appearance',
233
- 'hideable' => true
234
- ),
235
-
236
- 'please_vote' => array(
237
- 'message' => sprintf(
238
- __('Do you like your Ecwid online store? We\'d appreciate it if you add your review and vote for the plugin on Wordpress site.', 'ecwid-shopping-cart'),
239
- 'target="_blank" href="http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart"'
240
- ),
241
- 'primary_title' => __('Rate Ecwid at WordPress.org', 'ecwid-shopping-cart'),
242
- 'primary_url' => 'http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart',
243
- 'hideable' => true
244
- ),
245
-
246
- 'no_oauth' => array(
247
-
248
- 'message' => Ecwid_Message_Manager::get_oauth_message(),
249
- 'hideable' => false,
250
- 'type' => 'error'
251
- ),
252
-
253
- 'install_ecwid_theme' => array(
254
- 'title' => __( 'Looking for a Wordpress theme for your store?', 'ecwid-shopping-cart' ),
255
- 'message' => __ ( 'We created the "Ecwid Ecommerce" theme to make Ecwid stores like yours look great in WordPress. Give it a try – the Ecwid theme is free.', 'ecwid-shopping-cart' ),
256
- 'primary_title' => __( 'Install the Ecwid theme', 'ecwid-shopping-cart' ),
257
- 'primary_url' => 'admin.php?page=ecwid-install-theme',
258
- 'hideable' => true
259
- ),
260
-
261
- 'upgrade_search_and_cats' => array(
262
- 'message' => Ecwid_Message_Manager::get_upgrade_search_and_cats_message(),
263
- 'hideable' => true,
264
- 'primary_title' => __ ( 'Open Ecwid store settings', 'ecwid-shopping-cart' ),
265
- 'primary_url' => 'admin.php?page=ecwid-advanced'
266
- )
267
- );
268
- }
269
-
270
- protected function need_to_show_message($name)
271
- {
272
- if ( !current_user_can( 'manage_options' ) ) {
273
- return false;
274
- }
275
-
276
- $admin_page = '';
277
- if (function_exists('get_current_screen')) {
278
- $screen = get_current_screen();
279
- $admin_page = $screen->base;
280
- }
281
-
282
- if ($admin_page == 'toplevel_page_ecwid' && isset($_GET['reconnect'])) {
283
- return false;
284
- }
285
-
286
- switch ($name) {
287
- case 'on_activate':
288
- return $admin_page != 'toplevel_page_ecwid' && get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
289
-
290
- case 'on_storeid_set':
291
- return get_ecwid_store_id() != ECWID_DEMO_STORE_ID && @$_GET['settings-updated'] == 'true' && $admin_page == 'toplevel_page_ecwid';
292
-
293
- case 'on_no_storeid_on_setup_pages':
294
- $is_newbie = get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
295
-
296
- $is_ecwid_settings = in_array($admin_page, array('ecwid-store_page_ecwid-advanced', 'ecwid-store_page_ecwid-appearance'));
297
- $is_store_page = $admin_page == 'post' && isset($_GET['post']) && $_GET['post'] == ecwid_get_current_store_page_id();
298
-
299
- return $is_newbie && ($is_ecwid_settings || $is_store_page);
300
-
301
- case 'on_appearance_widgets':
302
- return isset($_GET['from-ecwid']) && $_GET['from-ecwid'] != 'true' && $admin_page == 'widgets';
303
-
304
- case 'please_vote':
305
- $install_date = get_option('ecwid_installation_date');
306
-
307
- $result = false;
308
- if (!$install_date) {
309
- add_option('ecwid_installation_date', time());
310
- } else {
311
- $result = ecwid_is_paid_account() && $install_date + 60*60*24*30 < time();
312
- }
313
-
314
- foreach ($this->messages as $_name => $message) {
315
- if ($_name != $name && $this->need_to_show_message($_name)) {
316
- return false;
317
- }
318
- }
319
-
320
- return $result;
321
-
322
- case "upgrade_search_and_cats":
323
- return ecwid_is_old_cats_widget_used() || ecwid_is_old_search_widget_used();
324
-
325
- case "install_ecwid_theme":
326
- return false;
327
- $install_date = ecwid_get_wp_install_date();
328
- $theme = ecwid_get_theme_identification();
329
-
330
- $default_themes = array(
331
- 'twentyten',
332
- 'twentyeleven',
333
- 'twentytwelve',
334
- 'twentythirteen',
335
- 'twentyfourteen',
336
- 'twentyfifteen',
337
- 'twentysixteen'
338
- );
339
-
340
- $is_default_theme = in_array($theme, $default_themes);
341
- $is_newbie = (time() - $install_date) < 60*60*24*31;
342
- $is_ecwid_connected = get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
343
- $is_installing = get_current_screen()->base == 'admin_page_ecwid-install-theme';
344
- $theme_object = wp_get_theme('ecwid-ecommerce');
345
- $err = $theme_object->errors();
346
- $is_theme_installed = $theme_object;
347
- if ($is_theme_installed) {
348
- if ($err && $err->get_error_code() == 'theme_not_found') {
349
- $is_theme_installed = false;
350
- }
351
- }
352
-
353
- if ( $is_default_theme && $is_newbie && $is_ecwid_connected && !$is_installing && !$is_theme_installed ) {
354
- return true;
355
- }
356
-
357
- }
358
- }
359
-
360
  }
1
+ <?php
2
+
3
+ class Ecwid_Message_Manager
4
+ {
5
+ protected $messages = array();
6
+
7
+ protected function __construct()
8
+ {
9
+ $this->init_messages();
10
+ }
11
+
12
+ public static function show_messages()
13
+ {
14
+ $mm = self::get_instance();
15
+
16
+ foreach ($mm->messages as $name => $message) {
17
+ if ($mm->need_to_show_message($name)) {
18
+ $mm->show_message($name);
19
+ }
20
+ }
21
+ }
22
+
23
+ public static function get_oauth_message($wp_remote_post_error = '')
24
+ {
25
+ if (!$wp_remote_post_error) {
26
+ $message = sprintf(
27
+ __( <<<TXT
28
+ Sorry, there is a problem. This page is supposed to display your store control panel. But this WordPress site doesn't seem to be able to connect to the Ecwid server, that's why there is no dashboard. This is caused by your server misconfiguration and can be fixed by your hosting provider.
29
+ <br /><br />
30
+ Here is a more techy description of the problem, please send it to your hosting provider: "The WordPress function wp_remote_post() failed to connect a remote server because of some error. Seems like HTTP requests to remote servers are disabled on this server. Specifically, the requests to app.ecwid.com and my.ecwid.com are blocked.".
31
+ <br /><br />
32
+ Please also feel free to contact us at <a %s>wordpress@ecwid.com</a> and we will help you handle it with your hosting.
33
+ <br /><br />
34
+ Meanwhile, to manage your store, you can use the Ecwid Web Control Panel at <a %s>my.ecwid.com</a>. Your store front is working fine as well and you can check it here: <a %s>%s</a>.
35
+ TXT
36
+
37
+ ),
38
+ 'href="mailto:wordpress@ecwid.com"',
39
+ 'target="_blank" href="http://my.ecwid.com"',
40
+ 'href="' . ecwid_get_store_page_url() . '" target="_blank"',
41
+ ecwid_get_store_page_url()
42
+ );
43
+ } else {
44
+ $message = sprintf(
45
+ __('Sorry, there is a problem. This page is supposed to display your store Control Panel. However, this Wordpress site doesn\'t seem to be able to connect to the Ecwid server to show your store dashboard here. This is likely caused by your server misconfiguration and can be fixed by your hosting provider. Here is a more techy description of the problem, which you can send to your hosting provider: "The Wordpress function wp_remote_post() failed to connect a remote server because of some error: "%s". Seems like HTTP POST requests are disabled on this server". <br /><br />Please feel free to contact us at <a %s>wordpress@ecwid.com</a> and we will help you contact your hosting and ask them to fix the issue. <br /><br /> Meanwhile, to manage your store, you can use the Ecwid Web Control Panel at <a %s>my.ecwid.com</a>. Your store front is working fine as well and you can check it here: <a %s>%s</a>.'),
46
+ $wp_remote_post_error,
47
+ 'href="mailto:wordpress@ecwid.com"',
48
+ 'target="_blank" href="http://my.ecwid.com"',
49
+ 'href="' . ecwid_get_store_page_url() . '" target="_blank"',
50
+ ecwid_get_store_page_url()
51
+ );
52
+ }
53
+
54
+ return $message;
55
+ }
56
+
57
+ public static function get_upgrade_search_and_cats_message() {
58
+ $is_old_search = ecwid_is_old_search_widget_used();
59
+ $is_old_categories = ecwid_is_old_cats_widget_used();
60
+
61
+ $main_message = __( 'Updated %s widgets are available for your Ecwid store. They are more mobile friendly and look better. Please enable them on the plugin settings page and check how they work in your store. The new widgets will be enabled automatically for all users in one of the upcoming plugin versions.', 'ecwid-shopping-cart' );
62
+
63
+ $widgets = '';
64
+ if ($is_old_search && $is_old_categories) {
65
+ $widgets = _x( 'Search and Categories', 'upgrade widgets message', 'ecwid-shopping-cart' );
66
+ } else if ( $is_old_search ) {
67
+ $widgets = _x( 'Search', 'upgrade widgets message', 'ecwid-shopping-cart' );
68
+ } else if ( $is_old_categories ) {
69
+ $widgets = _x( 'Categories', 'upgrade widgets message', 'ecwid-shopping-cart' );
70
+ }
71
+
72
+ return sprintf($main_message, $widgets);
73
+ }
74
+
75
+ public static function show_message($name, $params = array())
76
+ {
77
+ $mm = self::get_instance();
78
+
79
+ $mm->need_to_show_message($name);
80
+
81
+ if (!isset($mm->messages[$name]) && empty($params)) {
82
+ trigger_error('Ecwid plugin error: unknown message ' . $name);
83
+ return;
84
+ }
85
+
86
+ $params = $mm->get_message_params($name, $params);
87
+
88
+ $type = $params['type'];
89
+
90
+ $title = $params['title'];
91
+ $message = $params['message'];
92
+
93
+ $primary_button = isset($params['primary_title']);
94
+ if ($primary_button) {
95
+ $primary_title = $params['primary_title'];
96
+ $primary_url = $params['primary_url'];
97
+ $primary_blank = @$params['primary_blank'];
98
+ }
99
+ $secondary_button = isset($params['secondary_title']);
100
+ if ($secondary_button) {
101
+ $secondary_title = $params['secondary_title'];
102
+ $secondary_url = $params['secondary_url'];
103
+ $secondary_blank = @$params['secondary_blank'];
104
+ }
105
+
106
+ $do_not_show_again = true == $params['hideable'];
107
+
108
+ include ECWID_PLUGIN_DIR . 'templates/admin-message.php';
109
+ }
110
+
111
+ public static function disable_message($name)
112
+ {
113
+ $messages = get_option('ecwid_disabled_messages');
114
+ $messages[$name] = true;
115
+
116
+ update_option('ecwid_disabled_messages', $messages);
117
+ }
118
+
119
+ public static function enable_message($name)
120
+ {
121
+ $messages = get_option('ecwid_disabled_messages');
122
+ if (isset($messages['name']))
123
+ unset($messages['name']);
124
+
125
+ update_option('ecwid_disabled_messages', $messages);
126
+ }
127
+
128
+ public static function reset_hidden_messages()
129
+ {
130
+ $hidden_messages = array();
131
+
132
+ $messages = self::get_default_messages();
133
+ foreach ($messages as $name => $message) {
134
+ if (isset($message['default']) && $message['default'] == 'hidden') {
135
+ $hidden_messages[$name] = true;
136
+ }
137
+ }
138
+
139
+ update_option('ecwid_disabled_messages', array());
140
+ }
141
+
142
+ protected static function get_instance()
143
+ {
144
+ static $instance = null;
145
+
146
+ if (is_null($instance)) {
147
+ $instance = new Ecwid_Message_Manager();
148
+ }
149
+
150
+ return $instance;
151
+ }
152
+
153
+ protected function init_messages()
154
+ {
155
+ $this->messages = $this->get_default_messages();
156
+
157
+ $hidden_messages = get_option('ecwid_disabled_messages');
158
+
159
+ if ( !empty( $hidden_messages ) ) {
160
+ foreach ($hidden_messages as $name => $message) {
161
+ unset ($this->messages[$name]);
162
+ }
163
+ }
164
+ }
165
+
166
+ protected function get_message_params($name, $params)
167
+ {
168
+ if (is_array($name)) {
169
+ $params = $name;
170
+ $name = '';
171
+ }
172
+
173
+ if (isset($this->messages[$name])) {
174
+ $params = array_merge(
175
+ array('type' => 'info', 'title' => '', 'message' => '', 'hideable' => false),
176
+ $this->messages[$name],
177
+ $params
178
+ );
179
+ }
180
+
181
+ if ($name == 'on_storeid_set') {
182
+ $params['primary_url'] = ecwid_get_store_page_url();
183
+ $params['secondary_url'] = 'post.php?post=' . ecwid_get_current_store_page_id() . '&action=edit&show-ecwid=true';
184
+ }
185
+
186
+ if ($name == 'on_appearance_widgets') {
187
+
188
+ if (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'appearance') {
189
+ $admin_page = 'admin.php?page=ecwid-appearance';
190
+ } elseif (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'new') {
191
+ $admin_page = 'post-new.php?post_type=page';
192
+ } elseif (isset($_GET['from-ecwid']) && is_numeric($_GET['from-ecwid'])) {
193
+ $admin_page = 'post.php?post=' . $_GET['from-ecwid'] . '&action=edit';
194
+ }
195
+
196
+ $params['secondary_url'] = $admin_page;
197
+ }
198
+ $types_map = array(
199
+ 'info' => 'updated',
200
+ 'warning' => 'update-nag',
201
+ 'error' => 'error'
202
+ );
203
+ $params['type'] = $types_map[$params['type']];
204
+
205
+ return $params;
206
+ }
207
+
208
+ protected static function get_default_messages()
209
+ {
210
+ return array(
211
+ 'on_activate' => array(
212
+ 'title' => __('Greetings! Your Ecwid plugin is now active.', 'ecwid-shopping-cart'),
213
+ 'message' => __('Take a few simple steps to complete store setup', 'ecwid-shopping-cart'),
214
+ 'primary_title' => __('Set up Ecwid Store', 'ecwid-shopping-cart'),
215
+ 'primary_url' => 'admin.php?page=ecwid',
216
+ 'hideable' => true,
217
+ 'default' => 'disabled'
218
+ ),
219
+
220
+ 'on_no_storeid_on_setup_pages' => array(
221
+ 'type' => 'warning',
222
+ 'title' => __('Your store is almost ready!', 'ecwid-shopping-cart' ),
223
+ 'message' => __('Complete setup and start selling', 'ecwid-shopping-cart' ),
224
+ 'primary_title' => __('Complete Setup', 'ecwid-shopping-cart' ),
225
+ 'primary_url' => 'admin.php?page=ecwid',
226
+ 'hideable' => true
227
+ ),
228
+
229
+ 'on_appearance_widgets' => array(
230
+ 'message' => __('To add extra functions to your store, drag and drop Ecwid store elements on your site. When you\'re done, you can get back to modifying your settings.', 'ecwid-shopping-cart' ),
231
+ 'secondary_title' => __('Back to Store Settings', 'ecwid-shopping-cart'),
232
+ 'secondary_url' => 'admin.php?page=ecwid-appearance',
233
+ 'hideable' => true
234
+ ),
235
+
236
+ 'please_vote' => array(
237
+ 'message' => sprintf(
238
+ __('Do you like your Ecwid online store? We\'d appreciate it if you add your review and vote for the plugin on Wordpress site.', 'ecwid-shopping-cart'),
239
+ 'target="_blank" href="http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart"'
240
+ ),
241
+ 'primary_title' => __('Rate Ecwid at WordPress.org', 'ecwid-shopping-cart'),
242
+ 'primary_url' => 'http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart',
243
+ 'hideable' => true
244
+ ),
245
+
246
+ 'no_oauth' => array(
247
+
248
+ 'message' => Ecwid_Message_Manager::get_oauth_message(),
249
+ 'hideable' => false,
250
+ 'type' => 'error'
251
+ ),
252
+
253
+ 'install_ecwid_theme' => array(
254
+ 'title' => __( 'Looking for a Wordpress theme for your store?', 'ecwid-shopping-cart' ),
255
+ 'message' => __ ( 'We created the "Ecwid Ecommerce" theme to make Ecwid stores like yours look great in WordPress. Give it a try – the Ecwid theme is free.', 'ecwid-shopping-cart' ),
256
+ 'primary_title' => __( 'Install the Ecwid theme', 'ecwid-shopping-cart' ),
257
+ 'primary_url' => 'admin.php?page=ecwid-install-theme',
258
+ 'hideable' => true
259
+ ),
260
+
261
+ 'upgrade_search_and_cats' => array(
262
+ 'message' => Ecwid_Message_Manager::get_upgrade_search_and_cats_message(),
263
+ 'hideable' => true,
264
+ 'primary_title' => __ ( 'Open Ecwid store settings', 'ecwid-shopping-cart' ),
265
+ 'primary_url' => 'admin.php?page=ecwid-advanced'
266
+ )
267
+ );
268
+ }
269
+
270
+ protected function need_to_show_message($name)
271
+ {
272
+ if ( !current_user_can( 'manage_options' ) ) {
273
+ return false;
274
+ }
275
+
276
+ $admin_page = '';
277
+ if (function_exists('get_current_screen')) {
278
+ $screen = get_current_screen();
279
+ $admin_page = $screen->base;
280
+ }
281
+
282
+ if ($admin_page == 'toplevel_page_ecwid' && isset($_GET['reconnect'])) {
283
+ return false;
284
+ }
285
+
286
+ switch ($name) {
287
+ case 'on_activate':
288
+ return $admin_page != 'toplevel_page_ecwid' && get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
289
+
290
+ case 'on_storeid_set':
291
+ return get_ecwid_store_id() != ECWID_DEMO_STORE_ID && @$_GET['settings-updated'] == 'true' && $admin_page == 'toplevel_page_ecwid';
292
+
293
+ case 'on_no_storeid_on_setup_pages':
294
+ $is_newbie = get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
295
+
296
+ $is_ecwid_settings = in_array($admin_page, array('ecwid-store_page_ecwid-advanced', 'ecwid-store_page_ecwid-appearance'));
297
+ $is_store_page = $admin_page == 'post' && isset($_GET['post']) && $_GET['post'] == ecwid_get_current_store_page_id();
298
+
299
+ return $is_newbie && ($is_ecwid_settings || $is_store_page);
300
+
301
+ case 'on_appearance_widgets':
302
+ return isset($_GET['from-ecwid']) && $_GET['from-ecwid'] != 'true' && $admin_page == 'widgets';
303
+
304
+ case 'please_vote':
305
+ $install_date = get_option('ecwid_installation_date');
306
+
307
+ $result = false;
308
+ if (!$install_date) {
309
+ add_option('ecwid_installation_date', time());
310
+ } else {
311
+ $result = ecwid_is_paid_account() && $install_date + 60*60*24*30 < time();
312
+ }
313
+
314
+ foreach ($this->messages as $_name => $message) {
315
+ if ($_name != $name && $this->need_to_show_message($_name)) {
316
+ return false;
317
+ }
318
+ }
319
+
320
+ return $result;
321
+
322
+ case "upgrade_search_and_cats":
323
+ return ecwid_is_old_cats_widget_used() || ecwid_is_old_search_widget_used();
324
+
325
+ case "install_ecwid_theme":
326
+ return false;
327
+ $install_date = ecwid_get_wp_install_date();
328
+ $theme = ecwid_get_theme_identification();
329
+
330
+ $default_themes = array(
331
+ 'twentyten',
332
+ 'twentyeleven',
333
+ 'twentytwelve',
334
+ 'twentythirteen',
335
+ 'twentyfourteen',
336
+ 'twentyfifteen',
337
+ 'twentysixteen'
338
+ );
339
+
340
+ $is_default_theme = in_array($theme, $default_themes);
341
+ $is_newbie = (time() - $install_date) < 60*60*24*31;
342
+ $is_ecwid_connected = get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
343
+ $is_installing = get_current_screen()->base == 'admin_page_ecwid-install-theme';
344
+ $theme_object = wp_get_theme('ecwid-ecommerce');
345
+ $err = $theme_object->errors();
346
+ $is_theme_installed = $theme_object;
347
+ if ($is_theme_installed) {
348
+ if ($err && $err->get_error_code() == 'theme_not_found') {
349
+ $is_theme_installed = false;
350
+ }
351
+ }
352
+
353
+ if ( $is_default_theme && $is_newbie && $is_ecwid_connected && !$is_installing && !$is_theme_installed ) {
354
+ return true;
355
+ }
356
+
357
+ }
358
+ }
359
+
360
  }
includes/class-ecwid-nav-menus.php CHANGED
@@ -1,301 +1,301 @@
1
- <?php
2
-
3
- class Ecwid_Nav_Menus {
4
-
5
- protected $item_types;
6
-
7
- public function __construct() {
8
- add_action('init', array( $this, 'init' ));
9
-
10
- add_filter('wp_get_nav_menu_items', array( $this, 'process_menu_items' ));
11
-
12
- if ( is_admin() ) {
13
- add_filter('admin_init', array( $this, 'add_meta_box' ));
14
-
15
- add_action('admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
16
- } else {
17
- add_action('wp_enqueue_scripts', array( $this, 'enqueue_frontend_assets' ) );
18
- }
19
- }
20
-
21
- public function init() {
22
- register_post_type('ecwid_menu_item',
23
- array(
24
- 'labels' => array(
25
- 'name' => __( 'Ecwid Menu Item', 'ecwid-shopping-cart' ),
26
- ),
27
- 'supports' => array( 'title' ),
28
-
29
- 'public' => FALSE,
30
- 'exclude_from_search' => TRUE,
31
- 'publicly_queryable' => FALSE,
32
- 'show_ui' => FALSE,
33
- 'show_in_menu' => FALSE,
34
- 'show_in_nav_menus' => FALSE,
35
- 'show_in_admin_bar' => FALSE,
36
- 'has_archive' => FALSE,
37
- )
38
- );
39
- }
40
-
41
- static public function add_menu_on_activate( ) {
42
-
43
- $locations = get_nav_menu_locations();
44
-
45
- if (empty($locations)) return;
46
-
47
- foreach ($locations as $name => $menu_id) {
48
- if ($menu_id > 0) {
49
- break;
50
- }
51
- }
52
- if ($menu_id == 0) return;
53
-
54
- $existing = self::_find_existing_store_page_menu($menu_id);
55
- if ($existing) return;
56
-
57
- $items = wp_get_nav_menu_items($menu_id);
58
-
59
- wp_update_nav_menu_item($menu_id, 0, array(
60
- 'menu-item-title' => 'Store',
61
- 'menu-item-object' => 'ecwid-store-with-categories',
62
- 'menu-item-type' => 'ecwid_menu_item',
63
- 'menu-item-status' => 'publish')
64
- );
65
- }
66
-
67
- static public function replace_auto_added_menu() {
68
-
69
- $options = get_option('nav_menu_options');
70
- $autofill = $options['auto_add'];
71
- if (empty($autofill)) {
72
- return false;
73
- }
74
-
75
- $store_page_id = get_option('ecwid_store_page_id');
76
- foreach ($autofill as $menu_id) {
77
- $items = wp_get_nav_menu_items($menu_id);
78
- foreach ($items as $item) {
79
- if ( $item->object == 'page' && $item->object_id == $store_page_id && time() - strtotime($item->post_date_gmt) < 60 ) {
80
- $result = wp_update_nav_menu_item($menu_id, $item->db_id, array(
81
- 'menu-item-title' => $item->title,
82
- 'menu-item-status' => $item->status,
83
- 'menu-item-object' => 'ecwid-store-with-categories',
84
- 'menu-item-type' => 'ecwid_menu_item')
85
- );
86
- }
87
- }
88
- }
89
- }
90
-
91
- static protected function _find_existing_store_page_menu($menu_id) {
92
- $items = wp_get_nav_menu_items($menu_id);
93
-
94
- if (empty($items)) return null;
95
-
96
- foreach ($items as $item) {
97
- if ( $item->object == 'page' && $item->object_id == ecwid_get_current_store_page_id() )
98
- return $item;
99
-
100
- if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
101
- return $item;
102
- }
103
- }
104
-
105
- return null;
106
- }
107
-
108
- public function add_meta_box() {
109
- /*
110
- */
111
- add_meta_box('ecwid_nav_links', __('Store', 'ecwid-shopping-cart'), array( $this, 'create_menu_items'), 'nav-menus', 'side');
112
- }
113
-
114
- public function enqueue_frontend_assets() {
115
- if (ecwid_get_current_store_page_id() != get_the_ID()) {
116
- return;
117
- }
118
-
119
- wp_enqueue_script( 'ecwid-menu', ECWID_PLUGIN_URL . 'js/nav-menu-frontend.js', array( 'jquery' ), get_option('ecwid_plugin_version') );
120
- wp_localize_script( 'ecwid-menu', 'ecwid_menu_data', array(
121
- 'items' => $this->get_nav_menu_items()
122
- ) );
123
- }
124
-
125
- public function enqueue_admin_assets() {
126
- $screen = get_current_screen();
127
-
128
- if ($screen->base != 'nav-menus') return;
129
-
130
- wp_enqueue_style('ecwid-nav-menu', ECWID_PLUGIN_URL . 'css/nav-menu.css', array(), get_option('ecwid_plugin_version'));
131
-
132
- EcwidPlatform::set('nav-menus-opened-once', null);
133
-
134
- $first_run = false;
135
- // It opens the page twice on the very first run of that page
136
- if (EcwidPlatform::get('nav-menus-opened-once', false) < 2) {
137
- EcwidPlatform::set('nav-menus-opened-once', EcwidPlatform::get('nav-menus-opened-once') + 1);
138
- $first_run = EcwidPlatform::get('nav-menus-opened-once') <= 2;
139
- }
140
-
141
- wp_enqueue_script('ecwid-admin-menu-js', ECWID_PLUGIN_URL . 'js/nav-menu.js', array(), get_option('ecwid_plugin_version'));
142
- wp_localize_script('ecwid-admin-menu-js', 'ecwid_params', array(
143
- 'store_page' => __('Store Page', 'ecwid-shopping-cart'),
144
- 'reset_cats_cache' => __('Refresh categories list', 'ecwid-shopping-cart'),
145
- 'cache_updated' => __('Done', 'ecwid-shopping-cart'),
146
- 'reset_cache_message' => __('The store top-level categories are automatically added to this drop-down menu', 'ecwid-shopping-cart'),
147
- 'first_run' => $first_run,
148
- 'register_link' => ecwid_get_register_link(),
149
- 'items' => $this->get_nav_menu_items()
150
- ));
151
- }
152
-
153
- public function process_menu_items($items)
154
- {
155
- if ( is_admin() || empty($items) ) {
156
- return $items;
157
- }
158
-
159
- $types = $this->get_nav_menu_items();
160
-
161
- $counter = 0;
162
-
163
- foreach ($items as $key => $item) {
164
-
165
- $items[$key]->menu_order += $counter;
166
-
167
- $ecwid_menu_type = isset($types[$item->object]) ? $types[$item->object] : null;
168
-
169
- if ($ecwid_menu_type) {
170
- $item->url = ecwid_get_store_page_url() . '#!/~/' . $ecwid_menu_type['url'];
171
- }
172
-
173
- if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
174
- $item->url = ecwid_get_store_page_url();
175
- }
176
- if ($item->object == 'ecwid-store-with-categories') {
177
- $categories = ecwid_get_categories();
178
- if (!empty($categories)) {
179
- foreach ($categories as $category) {
180
- $counter++;
181
- $post = new stdClass;
182
- $post->ID = 0;
183
- $post->post_author = '';
184
- $post->post_date = '';
185
- $post->post_date_gmt = '';
186
- $post->post_password = '';
187
- $post->post_name = '';
188
- $post->post_type = $item->post_type;
189
- $post->post_status = 'publish';
190
- $post->to_ping = '';
191
- $post->pinged = '';
192
- $post->post_parent = 0;
193
- $post->menu_order = $item->menu_order + $counter;
194
- $post->menu_item_parent = $item->ID;
195
- $post->url = ecwid_get_store_page_url() . $category->link;
196
- $post->classes = '';
197
- $post->type = 'post';
198
- $post->db_id = 0;
199
- $post->title = $category->name;
200
- $post->target = '';
201
- $post->object = '';
202
- $post->attr_title = '';
203
- $post->description = '';
204
- $post->xfn = '';
205
- $post->object_id = 0;
206
- array_splice($items, $key + $counter, 0, array( $post ));
207
- }
208
- $counter++;
209
- }
210
- }
211
- }
212
-
213
- return $items;
214
- }
215
-
216
- public function create_menu_items() {
217
- $menu_links = $this->get_nav_menu_items();
218
- ?>
219
- <div id="posttype-ecwid-links" class="posttypediv">
220
- <div id="tabs-panel-ecwid-links" class="tabs-panel tabs-panel-active">
221
- <ul id="ecwid-links-checklist" class="categorychecklist form-no-clear">
222
- <?php
223
- $i = -1;
224
- foreach ($menu_links as $key => $value) {
225
- ?>
226
- <li>
227
- <label class="menu-item-title">
228
- <input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-object-id]" value="<?php echo esc_attr($i); ?>" /> <?php echo $value['list-name']; ?>
229
- </label>
230
- <input type="hidden" class="menu-item-object" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-object]" value="<?php echo $value['classes']; ?>" />
231
- <input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-type]" value="ecwid_menu_item" />
232
- <input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-title]" value="<?php echo esc_html($value['label'] ); ?>" />
233
- <input type="hidden" class="menu-item-url" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-url]" value="<?php echo esc_url(ecwid_get_store_page_url() . '#!/~/' . $value['url']); ?>" />
234
- </li>
235
- <?php
236
- $i--;
237
- }
238
- ?>
239
- </ul>
240
- </div>
241
- <p class="button-controls">
242
- <span class="list-controls">
243
- <a href="<?php echo admin_url('nav-menus.php?page-tab=all&selectall=1#posttype-ecwid-links'); ?>" class="select-all"><?php _e('Select All'); ?></a>
244
- </span>
245
- <span class="add-to-menu">
246
- <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-post-type-menu-item" id="submit-posttype-ecwid-links">
247
- <span class="spinner"></span>
248
- </span>
249
- </p>
250
- </div>
251
- <?php
252
-
253
- }
254
-
255
- protected function get_nav_menu_items() {
256
- if ($this->item_types != null) {
257
- return $this->item_types;
258
- }
259
-
260
- $this->item_types = array(
261
- 'ecwid-cart' => array(
262
- 'list-name' => __('Cart', 'ecwid-shopping-cart'),
263
- 'classes' => 'ecwid-cart',
264
- 'url' => 'cart',
265
- 'label' => __('Shopping Cart', 'ecwid-shopping-cart'),
266
- 'name' => 'cart'
267
- ),
268
- 'ecwid-product-search' => array(
269
- 'list-name' => __('Product Search', 'ecwid-shopping-cart'),
270
- 'classes' => 'ecwid-product-search',
271
- 'url' => 'search',
272
- 'label' => __('Product Search', 'ecwid-shopping-cart'),
273
- 'name' => 'search'
274
- ),
275
- 'ecwid-my-account' => array(
276
- 'list-name' => __('My Account', 'ecwid-shopping-cart'),
277
- 'classes' => 'ecwid-my-account',
278
- 'url' => 'accountSettings',
279
- 'label' => __('My Account', 'ecwid-shopping-cart'),
280
- 'name' => 'account'
281
- ),
282
- 'ecwid-store' => array(
283
- 'list-name' => __('Store', 'ecwid-shopping-cart'),
284
- 'classes' => 'ecwid-store',
285
- 'url' => '',
286
- 'label' => __('Store', 'ecwid-shopping-cart'),
287
- 'name' => 'store'
288
- ),
289
- 'ecwid-store-with-categories' => array(
290
- 'list-name' => __('Store with Categories Menu', 'ecwid-shopping-cart'),
291
- 'classes' => 'ecwid-store-with-categories',
292
- 'url' => '',
293
- 'label' => __('Store', 'ecwid-shopping-cart'),
294
- 'name' => 'store-with-categories'
295
- )
296
- );
297
-
298
- return $this->item_types;
299
- }
300
- }
301
  $ecwid_menus = new Ecwid_Nav_Menus();
1
+ <?php
2
+
3
+ class Ecwid_Nav_Menus {
4
+
5
+ protected $item_types;
6
+
7
+ public function __construct() {
8
+ add_action('init', array( $this, 'init' ));
9
+
10
+ add_filter('wp_get_nav_menu_items', array( $this, 'process_menu_items' ));
11
+
12
+ if ( is_admin() ) {
13
+ add_filter('admin_init', array( $this, 'add_meta_box' ));
14
+
15
+ add_action('admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
16
+ } else {
17
+ add_action('wp_enqueue_scripts', array( $this, 'enqueue_frontend_assets' ) );
18
+ }
19
+ }
20
+
21
+ public function init() {
22
+ register_post_type('ecwid_menu_item',
23
+ array(
24
+ 'labels' => array(
25
+ 'name' => __( 'Ecwid Menu Item', 'ecwid-shopping-cart' ),
26
+ ),
27
+ 'supports' => array( 'title' ),
28
+
29
+ 'public' => FALSE,
30
+ 'exclude_from_search' => TRUE,
31
+ 'publicly_queryable' => FALSE,
32
+ 'show_ui' => FALSE,
33
+ 'show_in_menu' => FALSE,
34
+ 'show_in_nav_menus' => FALSE,
35
+ 'show_in_admin_bar' => FALSE,
36
+ 'has_archive' => FALSE,
37
+ )
38
+ );
39
+ }
40
+
41
+ static public function add_menu_on_activate( ) {
42
+
43
+ $locations = get_nav_menu_locations();
44
+
45
+ if (empty($locations)) return;
46
+
47
+ foreach ($locations as $name => $menu_id) {
48
+ if ($menu_id > 0) {
49
+ break;
50
+ }
51
+ }
52
+ if ($menu_id == 0) return;
53
+
54
+ $existing = self::_find_existing_store_page_menu($menu_id);
55
+ if ($existing) return;
56
+
57
+ $items = wp_get_nav_menu_items($menu_id);
58
+
59
+ wp_update_nav_menu_item($menu_id, 0, array(
60
+ 'menu-item-title' => 'Store',
61
+ 'menu-item-object' => 'ecwid-store-with-categories',
62
+ 'menu-item-type' => 'ecwid_menu_item',
63
+ 'menu-item-status' => 'publish')
64
+ );
65
+ }
66
+
67
+ static public function replace_auto_added_menu() {
68
+
69
+ $options = get_option('nav_menu_options');
70
+ $autofill = $options['auto_add'];
71
+ if (empty($autofill)) {
72
+ return false;
73
+ }
74
+
75
+ $store_page_id = get_option('ecwid_store_page_id');
76
+ foreach ($autofill as $menu_id) {
77
+ $items = wp_get_nav_menu_items($menu_id);
78
+ foreach ($items as $item) {
79
+ if ( $item->object == 'page' && $item->object_id == $store_page_id && time() - strtotime($item->post_date_gmt) < 60 ) {
80
+ $result = wp_update_nav_menu_item($menu_id, $item->db_id, array(
81
+ 'menu-item-title' => $item->title,
82
+ 'menu-item-status' => $item->status,
83
+ 'menu-item-object' => 'ecwid-store-with-categories',
84
+ 'menu-item-type' => 'ecwid_menu_item')
85
+ );
86
+ }
87
+ }
88
+ }
89
+ }
90
+
91
+ static protected function _find_existing_store_page_menu($menu_id) {
92
+ $items = wp_get_nav_menu_items($menu_id);
93
+
94
+ if (empty($items)) return null;
95
+
96
+ foreach ($items as $item) {
97
+ if ( $item->object == 'page' && $item->object_id == ecwid_get_current_store_page_id() )
98
+ return $item;
99
+
100
+ if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
101
+ return $item;
102
+ }
103
+ }
104
+
105
+ return null;
106
+ }
107
+
108
+ public function add_meta_box() {
109
+ /*
110
+ */
111
+ add_meta_box('ecwid_nav_links', __('Store', 'ecwid-shopping-cart'), array( $this, 'create_menu_items'), 'nav-menus', 'side');
112
+ }
113
+
114
+ public function enqueue_frontend_assets() {
115
+ if (ecwid_get_current_store_page_id() != get_the_ID()) {
116
+ return;
117
+ }
118
+
119
+ wp_enqueue_script( 'ecwid-menu', ECWID_PLUGIN_URL . 'js/nav-menu-frontend.js', array( 'jquery' ), get_option('ecwid_plugin_version') );
120
+ wp_localize_script( 'ecwid-menu', 'ecwid_menu_data', array(
121
+ 'items' => $this->get_nav_menu_items()
122
+ ) );
123
+ }
124
+
125
+ public function enqueue_admin_assets() {
126
+ $screen = get_current_screen();
127
+
128
+ if ($screen->base != 'nav-menus') return;
129
+
130
+ wp_enqueue_style('ecwid-nav-menu', ECWID_PLUGIN_URL . 'css/nav-menu.css', array(), get_option('ecwid_plugin_version'));
131
+
132
+ EcwidPlatform::set('nav-menus-opened-once', null);
133
+
134
+ $first_run = false;
135
+ // It opens the page twice on the very first run of that page
136
+ if (EcwidPlatform::get('nav-menus-opened-once', false) < 2) {
137
+ EcwidPlatform::set('nav-menus-opened-once', EcwidPlatform::get('nav-menus-opened-once') + 1);
138
+ $first_run = EcwidPlatform::get('nav-menus-opened-once') <= 2;
139
+ }
140
+
141
+ wp_enqueue_script('ecwid-admin-menu-js', ECWID_PLUGIN_URL . 'js/nav-menu.js', array(), get_option('ecwid_plugin_version'));
142
+ wp_localize_script('ecwid-admin-menu-js', 'ecwid_params', array(
143
+ 'store_page' => __('Store Page', 'ecwid-shopping-cart'),
144
+ 'reset_cats_cache' => __('Refresh categories list', 'ecwid-shopping-cart'),
145
+ 'cache_updated' => __('Done', 'ecwid-shopping-cart'),
146
+ 'reset_cache_message' => __('The store top-level categories are automatically added to this drop-down menu', 'ecwid-shopping-cart'),
147
+ 'first_run' => $first_run,
148
+ 'register_link' => ecwid_get_register_link(),
149
+ 'items' => $this->get_nav_menu_items()
150
+ ));
151
+ }
152
+
153
+ public function process_menu_items($items)
154
+ {
155
+ if ( is_admin() || empty($items) ) {
156
+ return $items;
157
+ }
158
+
159
+ $types = $this->get_nav_menu_items();
160
+
161
+ $counter = 0;
162
+
163
+ foreach ($items as $key => $item) {
164
+
165
+ $items[$key]->menu_order += $counter;
166
+
167
+ $ecwid_menu_type = isset($types[$item->object]) ? $types[$item->object] : null;
168
+
169
+ if ($ecwid_menu_type) {
170
+ $item->url = ecwid_get_store_page_url() . '#!/~/' . $ecwid_menu_type['url'];
171
+ }
172
+
173
+ if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
174
+ $item->url = ecwid_get_store_page_url();
175
+ }
176
+ if ($item->object == 'ecwid-store-with-categories') {
177
+ $categories = ecwid_get_categories();
178
+ if (!empty($categories)) {
179
+ foreach ($categories as $category) {
180
+ $counter++;
181
+ $post = new stdClass;
182
+ $post->ID = 0;
183
+ $post->post_author = '';
184
+ $post->post_date = '';
185
+ $post->post_date_gmt = '';
186
+ $post->post_password = '';
187
+ $post->post_name = '';
188
+ $post->post_type = $item->post_type;
189
+ $post->post_status = 'publish';
190
+ $post->to_ping = '';
191
+ $post->pinged = '';
192
+ $post->post_parent = 0;
193
+ $post->menu_order = $item->menu_order + $counter;
194
+ $post->menu_item_parent = $item->ID;
195
+ $post->url = ecwid_get_store_page_url() . $category->link;
196
+ $post->classes = '';
197
+ $post->type = 'post';
198
+ $post->db_id = 0;
199
+ $post->title = $category->name;
200
+ $post->target = '';
201
+ $post->object = '';
202
+ $post->attr_title = '';
203
+ $post->description = '';
204
+ $post->xfn = '';
205
+ $post->object_id = 0;
206
+ array_splice($items, $key + $counter, 0, array( $post ));
207
+ }
208
+ $counter++;
209
+ }
210
+ }
211
+ }
212
+
213
+ return $items;
214
+ }
215
+
216
+ public function create_menu_items() {
217
+ $menu_links = $this->get_nav_menu_items();
218
+ ?>
219
+ <div id="posttype-ecwid-links" class="posttypediv">
220
+ <div id="tabs-panel-ecwid-links" class="tabs-panel tabs-panel-active">
221
+ <ul id="ecwid-links-checklist" class="categorychecklist form-no-clear">
222
+ <?php
223
+ $i = -1;
224
+ foreach ($menu_links as $key => $value) {
225
+ ?>
226
+ <li>
227
+ <label class="menu-item-title">
228
+ <input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-object-id]" value="<?php echo esc_attr($i); ?>" /> <?php echo $value['list-name']; ?>
229
+ </label>
230
+ <input type="hidden" class="menu-item-object" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-object]" value="<?php echo $value['classes']; ?>" />
231
+ <input type="hidden" class="menu-item-type" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-type]" value="ecwid_menu_item" />
232
+ <input type="hidden" class="menu-item-title" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-title]" value="<?php echo esc_html($value['label'] ); ?>" />
233
+ <input type="hidden" class="menu-item-url" name="menu-item[<?php echo esc_attr($i); ?>][menu-item-url]" value="<?php echo esc_url(ecwid_get_store_page_url() . '#!/~/' . $value['url']); ?>" />
234
+ </li>
235
+ <?php
236
+ $i--;
237
+ }
238
+ ?>
239
+ </ul>
240
+ </div>
241
+ <p class="button-controls">
242
+ <span class="list-controls">
243
+ <a href="<?php echo admin_url('nav-menus.php?page-tab=all&selectall=1#posttype-ecwid-links'); ?>" class="select-all"><?php _e('Select All'); ?></a>
244
+ </span>
245
+ <span class="add-to-menu">
246
+ <input type="submit" class="button-secondary submit-add-to-menu right" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-post-type-menu-item" id="submit-posttype-ecwid-links">
247
+ <span class="spinner"></span>
248
+ </span>
249
+ </p>
250
+ </div>
251
+ <?php
252
+
253
+ }
254
+
255
+ protected function get_nav_menu_items() {
256
+ if ($this->item_types != null) {
257
+ return $this->item_types;
258
+ }
259
+
260
+ $this->item_types = array(
261
+ 'ecwid-cart' => array(
262
+ 'list-name' => __('Cart', 'ecwid-shopping-cart'),
263
+ 'classes' => 'ecwid-cart',
264
+ 'url' => 'cart',
265
+ 'label' => __('Shopping Cart', 'ecwid-shopping-cart'),
266
+ 'name' => 'cart'
267
+ ),
268
+ 'ecwid-product-search' => array(
269
+ 'list-name' => __('Product Search', 'ecwid-shopping-cart'),
270
+ 'classes' => 'ecwid-product-search',
271
+ 'url' => 'search',
272
+ 'label' => __('Product Search', 'ecwid-shopping-cart'),
273
+ 'name' => 'search'
274
+ ),
275
+ 'ecwid-my-account' => array(
276
+ 'list-name' => __('My Account', 'ecwid-shopping-cart'),
277
+ 'classes' => 'ecwid-my-account',
278
+ 'url' => 'accountSettings',
279
+ 'label' => __('My Account', 'ecwid-shopping-cart'),
280
+ 'name' => 'account'
281
+ ),
282
+ 'ecwid-store' => array(
283
+ 'list-name' => __('Store', 'ecwid-shopping-cart'),
284
+ 'classes' => 'ecwid-store',
285
+ 'url' => '',
286
+ 'label' => __('Store', 'ecwid-shopping-cart'),
287
+ 'name' => 'store'
288
+ ),
289
+ 'ecwid-store-with-categories' => array(
290
+ 'list-name' => __('Store with Categories Menu', 'ecwid-shopping-cart'),
291
+ 'classes' => 'ecwid-store-with-categories',
292
+ 'url' => '',
293
+ 'label' => __('Store', 'ecwid-shopping-cart'),
294
+ 'name' => 'store-with-categories'
295
+ )
296
+ );
297
+
298
+ return $this->item_types;
299
+ }
300
+ }
301
  $ecwid_menus = new Ecwid_Nav_Menus();
includes/class-ecwid-oauth.php CHANGED
@@ -1,350 +1,350 @@
1
- <?php
2
-
3
- include ECWID_PLUGIN_DIR . "lib/phpseclib/AES.php";
4
- require_once ECWID_PLUGIN_DIR . 'lib/ecwid_api_v3.php';
5
-
6
- class Ecwid_OAuth {
7
-
8
- const MODE_CONNECT = 'connect';
9
- const MODE_RECONNECT = 'reconnect';
10
-
11
- protected $state;
12
-
13
- protected $api;
14
-
15
- public function __construct()
16
- {
17
- add_action('admin_post_ecwid_oauth', array($this, 'process_authorization'));
18
- add_action('admin_post_ecwid_oauth_reconnect', array($this, 'process_authorization'));
19
- add_action('admin_post_ecwid_disconnect', array($this, 'disconnect_store'));
20
- add_action('admin_post_ecwid_show_reconnect', array($this, 'show_reconnect'));
21
-
22
- $this->_load_state();
23
-
24
- $this->api = new Ecwid_Api_V3();
25
- }
26
-
27
- public function show_reconnect()
28
- {
29
- $ecwid_oauth = $this;
30
- require_once(ECWID_PLUGIN_DIR . 'templates/reconnect.php');
31
- }
32
-
33
- public function test_post()
34
- {
35
- $return = EcwidPlatform::http_post_request($this->get_test_post_url());
36
-
37
- return is_array($return);
38
- }
39
-
40
- public function get_test_post_url()
41
- {
42
- return 'https://my.ecwid.com/api/oauth/token';
43
- }
44
-
45
-
46
- public function get_auth_dialog_url( )
47
- {
48
- $action = 'ecwid_oauth';
49
- if ( $this->_is_reconnect() ) {
50
- $action = 'ecwid_oauth_reconnect';
51
- }
52
-
53
- $redirect_uri = 'admin-post.php?action=' . $action;
54
-
55
- return $this->api->get_oauth_dialog_url(
56
- admin_url( $redirect_uri ),
57
- implode(' ', $this->_get_scope() )
58
- );
59
- }
60
-
61
- public function get_sso_reconnect_dialog_url()
62
- {
63
- $redirect_uri = 'admin-post.php?action=ecwid_oauth_reconnect';
64
-
65
- $scope = $this->_get_scope();
66
-
67
- if (!in_array('create_customers', $scope)) {
68
- $scope[] = 'create_customers';
69
- }
70
-
71
- return $this->api->get_oauth_dialog_url(
72
- admin_url( $redirect_uri ),
73
- implode(' ', $scope )
74
- );
75
- }
76
-
77
- public function process_authorization()
78
- {
79
- $reconnect = $_REQUEST['action'] == 'ecwid_oauth_reconnect';
80
-
81
- if ( isset( $_REQUEST['error'] ) || !isset( $_REQUEST['code'] ) ) {
82
- if ($reconnect) {
83
- $this->update_state(array('mode' => self::MODE_RECONNECT, 'error' => 'cancelled'));
84
- } else {
85
- $this->update_state(array('mode' => self::MODE_CONNECT, 'error' => 'cancelled'));
86
- }
87
-
88
- wp_redirect('admin.php?page=ecwid&connection_error' . ($reconnect ? '&reconnect' : ''));
89
- exit;
90
- }
91
-
92
- $base_admin_url = 'admin-post.php?action=ecwid_oauth' . ($reconnect ? '_reconnect' : '');
93
-
94
- $params['code'] = $_REQUEST['code'];
95
- $params['client_id'] = Ecwid_Api_V3::CLIENT_ID;
96
- $params['client_secret'] = Ecwid_Api_V3::CLIENT_SECRET;
97
- $params['redirect_uri'] = admin_url( $base_admin_url );
98
-
99
- $params['grant_type'] = 'authorization_code';
100
-
101
- $request = Ecwid_HTTP::create_post( 'oauth_authorize', 'https://my.ecwid.com/api/oauth/token', array(
102
- Ecwid_HTTP::POLICY_RETURN_VERBOSE
103
- ));
104
-
105
- $return = $request->do_request(array('body' => $params));
106
-
107
- if (is_array($return) && isset($return['data'])) {
108
- $result = json_decode($return['data']);
109
- }
110
-
111
- if (
112
- !is_array($return)
113
- || !isset( $result->store_id )
114
- || !isset( $result->scope )
115
- || !isset( $result->access_token )
116
- || ( $result->token_type != 'Bearer' )
117
- ) {
118
- ecwid_log_error(var_export($return, true));
119
- return $this->trigger_auth_error($reconnect ? 'reconnect' : 'default');
120
- }
121
-
122
- update_option( 'ecwid_store_id', $result->store_id );
123
- update_option( 'ecwid_oauth_scope', $result->scope );
124
- update_option( 'ecwid_api_check_time', 0 );
125
- EcwidPlatform::cache_reset( 'all_categories' );
126
- $this->api->save_token($result->access_token);
127
-
128
- // Reset "Create store cookie" set previously to display the landing page
129
- //in "Connect" mode rather than "Create" mode
130
- setcookie('ecwid_create_store_clicked', null, strtotime('-1 day'), ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
131
-
132
- if ( isset( $this->state->return_url ) && !empty( $this->state->return_url ) ) {
133
- wp_redirect( admin_url( $this->state->return_url ) );
134
- } else {
135
- $url = '';
136
- if ($reconnect) {
137
- $url = 'admin.php?page=ecwid&setting-updated=true';
138
- } else {
139
- $url = 'admin.php?page=ecwid';
140
- }
141
- wp_redirect( $url );
142
- }
143
- exit;
144
- }
145
-
146
- public function disconnect_store()
147
- {
148
- update_option( 'ecwid_store_id', ECWID_DEMO_STORE_ID );
149
- $this->api->save_token( '' );
150
- update_option( 'ecwid_is_api_enabled', 'off' );
151
- update_option( 'ecwid_api_check_time', 0 );
152
-
153
- wp_redirect('admin.php?page=ecwid');
154
- exit;
155
- }
156
-
157
- public function get_safe_scopes_array($scopes)
158
- {
159
- if (!isset($scopes) || empty($scopes)) {
160
- return $this->_get_default_scopes_array();
161
- }
162
-
163
- if (!empty($scopes)) {
164
- $scopes_array = explode(' ', $scopes);
165
-
166
- foreach ($scopes_array as $key => $scope) {
167
- if (!preg_match('/^[a-z_]+$/', $scope)) {
168
- unset($scopes_array[$key]);
169
- }
170
- }
171
- }
172
-
173
- return $scopes_array;
174
- }
175
-
176
- public function has_scope( $scope ) {
177
- $stored_scope = get_option( 'ecwid_oauth_scope' );
178
- if (empty($stored_scope)) {
179
- $stored_scope = 'read_store_profile read_catalog';
180
- }
181
-
182
- return in_array( $scope, explode(' ', $stored_scope) );
183
- }
184
-
185
- protected function _get_default_scopes_array() {
186
- return array( 'read_store_profile', 'read_catalog', 'allow_sso', 'create_customers' );
187
- }
188
-
189
- protected function trigger_auth_error($mode = 'default')
190
- {
191
- update_option('ecwid_last_oauth_fail_time', time());
192
-
193
- $logs = get_option('ecwid_error_log');
194
-
195
- if ($logs) {
196
- $logs = json_decode($logs);
197
- }
198
-
199
- if (is_array($logs) && count($logs) > 0) {
200
- $entry = $logs[count($logs) - 1];
201
- if (isset($entry->message)) {
202
- $last_error = $entry->message;
203
- }
204
- }
205
-
206
- if ( $mode == self::MODE_RECONNECT ) {
207
- $this->update_state(array(
208
- 'mode' => 'reconnect',
209
- 'error' => 'other'
210
- ));
211
- }
212
-
213
- if (isset($last_error)) {
214
- EcwidPlatform::report_error($last_error);
215
- }
216
-
217
- wp_redirect('admin.php?page=ecwid&connection_error' . ($mode == self::MODE_RECONNECT ? '&reconnect' : ''));
218
- exit;
219
- }
220
-
221
- protected function _get_scope() {
222
- $default = $this->_get_default_scopes_array();
223
-
224
- $scopes = array();
225
- if ( $this->_is_reconnect() ) {
226
- $scopes = isset($this->state->reconnect_scopes) && is_array($this->state->reconnect_scopes)
227
- ? $this->state->reconnect_scopes
228
- : array();
229
- }
230
-
231
- $scopes = array_merge($scopes, $default);
232
-
233
- return $scopes;
234
- }
235
-
236
- public function get_sso_admin_link() {
237
- $url = 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&inline=true';
238
-
239
- $store_id = get_ecwid_store_id();
240
-
241
- $token = $this->api->get_token();
242
-
243
- $timestamp = time();
244
- $signature = hash('sha256', $store_id . $token . $timestamp . Ecwid_Api_V3::CLIENT_SECRET);
245
-
246
- $url = sprintf(
247
- $url,
248
- $store_id,
249
- $token,
250
- $timestamp,
251
- $signature
252
- );
253
-
254
- return $url;
255
- }
256
-
257
- protected function _load_state() {
258
- if (isset($_COOKIE['ecwid_oauth_state'])) {
259
- $this->state = @json_decode( $_COOKIE['ecwid_oauth_state'] );
260
-
261
- }
262
-
263
- if (!is_object($this->state)) {
264
- $this->state = new stdClass();
265
- $this->state->reconnect_scopes = array();
266
- $this->state->reconnect_error = '';
267
- $this->state->return_url = '';
268
- $this->state->reason = '';
269
- $this->state->mode = self::MODE_CONNECT;
270
- }
271
-
272
- if (isset($_COOKIE['ecwid_create_store_clicked'])) {
273
- $this->state->create_store_clicked = $_COOKIE['ecwid_create_store_clicked'];
274
- }
275
- }
276
-
277
- public function get_state() {
278
- return $this->state;
279
- }
280
-
281
- public function was_create_store_clicked() {
282
- return $this->state->create_store_clicked;
283
- }
284
-
285
- protected function _save_state() {
286
- setcookie('ecwid_oauth_state', json_encode($this->state), strtotime('+1 day'), ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
287
- }
288
-
289
- public function get_reconnect_error() {
290
- return $this->state->reconnect_error;
291
- }
292
-
293
- public function update_state($params) {
294
-
295
- if (isset($params['mode'])) {
296
- $this->state->mode = $params['mode'] == self::MODE_RECONNECT ? self::MODE_RECONNECT : self::MODE_CONNECT;
297
- }
298
-
299
- if ( $this->_is_reconnect() ) {
300
- if ( isset( $params['scope'] ) ) {
301
- $this->state->reconnect_scopes = $this->get_safe_scopes_array( @$params['scope'] );
302
- }
303
- if ( isset( $params['return_url'] ) ) {
304
- $this->state->return_url = $params['return_url'];
305
- }
306
-
307
- if ( isset( $params['error'] ) ) {
308
- $this->state->reconnect_error = $params['error'];
309
- }
310
-
311
- if ( isset( $params['reason'] ) ) {
312
- $this->state->reason = $params['reason'];
313
- }
314
- }
315
-
316
- $this->_save_state();
317
- }
318
-
319
- public function get_error() {
320
-
321
- if ($this->_is_reconnect()) {
322
- return $this->state->reconnect_error;
323
- } else {
324
- return $this->state->error;
325
- }
326
- }
327
-
328
- public function get_reconnect_message() {
329
- $reconnect_message = '';
330
-
331
- if (isset($this->state->reason)) {
332
- switch ( $this->state->reason ) {
333
- case '1':
334
- $reconnect_message = "Message 1";
335
- break;
336
- case '2':
337
- $reconnect_message = "Message 2";
338
- break;
339
- }
340
- }
341
-
342
- return $reconnect_message;
343
- }
344
-
345
- protected function _is_reconnect() {
346
- return @$this->state->mode == self::MODE_RECONNECT;
347
- }
348
- }
349
-
350
- $ecwid_oauth = new Ecwid_OAuth();
1
+ <?php
2
+
3
+ include ECWID_PLUGIN_DIR . "lib/phpseclib/AES.php";
4
+ require_once ECWID_PLUGIN_DIR . 'lib/ecwid_api_v3.php';
5
+
6
+ class Ecwid_OAuth {
7
+
8
+ const MODE_CONNECT = 'connect';
9
+ const MODE_RECONNECT = 'reconnect';
10
+
11
+ protected $state;
12
+
13
+ protected $api;
14
+
15
+ public function __construct()
16
+ {
17
+ add_action('admin_post_ecwid_oauth', array($this, 'process_authorization'));
18
+ add_action('admin_post_ecwid_oauth_reconnect', array($this, 'process_authorization'));
19
+ add_action('admin_post_ecwid_disconnect', array($this, 'disconnect_store'));
20
+ add_action('admin_post_ecwid_show_reconnect', array($this, 'show_reconnect'));
21
+
22
+ $this->_load_state();
23
+
24
+ $this->api = new Ecwid_Api_V3();
25
+ }
26
+
27
+ public function show_reconnect()
28
+ {
29
+ $ecwid_oauth = $this;
30
+ require_once(ECWID_PLUGIN_DIR . 'templates/reconnect.php');
31
+ }
32
+
33
+ public function test_post()
34
+ {
35
+ $return = EcwidPlatform::http_post_request($this->get_test_post_url());
36
+
37
+ return is_array($return);
38
+ }
39
+
40
+ public function get_test_post_url()
41
+ {
42
+ return 'https://my.ecwid.com/api/oauth/token';
43
+ }
44
+
45
+
46
+ public function get_auth_dialog_url( )
47
+ {
48
+ $action = 'ecwid_oauth';
49
+ if ( $this->_is_reconnect() ) {
50
+ $action = 'ecwid_oauth_reconnect';
51
+ }
52
+
53
+ $redirect_uri = 'admin-post.php?action=' . $action;
54
+
55
+ return $this->api->get_oauth_dialog_url(
56
+ admin_url( $redirect_uri ),
57
+ implode(' ', $this->_get_scope() )
58
+ );
59
+ }
60
+
61
+ public function get_sso_reconnect_dialog_url()
62
+ {
63
+ $redirect_uri = 'admin-post.php?action=ecwid_oauth_reconnect';
64
+
65
+ $scope = $this->_get_scope();
66
+
67
+ if (!in_array('create_customers', $scope)) {
68
+ $scope[] = 'create_customers';
69
+ }
70
+
71
+ return $this->api->get_oauth_dialog_url(
72
+ admin_url( $redirect_uri ),
73
+ implode(' ', $scope )
74
+ );
75
+ }
76
+
77
+ public function process_authorization()
78
+ {
79
+ $reconnect = $_REQUEST['action'] == 'ecwid_oauth_reconnect';
80
+
81
+ if ( isset( $_REQUEST['error'] ) || !isset( $_REQUEST['code'] ) ) {
82
+ if ($reconnect) {
83
+ $this->update_state(array('mode' => self::MODE_RECONNECT, 'error' => 'cancelled'));
84
+ } else {
85
+ $this->update_state(array('mode' => self::MODE_CONNECT, 'error' => 'cancelled'));
86
+ }
87
+
88
+ wp_redirect('admin.php?page=ecwid&connection_error' . ($reconnect ? '&reconnect' : ''));
89
+ exit;
90
+ }
91
+
92
+ $base_admin_url = 'admin-post.php?action=ecwid_oauth' . ($reconnect ? '_reconnect' : '');
93
+
94
+ $params['code'] = $_REQUEST['code'];
95
+ $params['client_id'] = Ecwid_Api_V3::CLIENT_ID;
96
+ $params['client_secret'] = Ecwid_Api_V3::CLIENT_SECRET;
97
+ $params['redirect_uri'] = admin_url( $base_admin_url );
98
+
99
+ $params['grant_type'] = 'authorization_code';
100
+
101
+ $request = Ecwid_HTTP::create_post( 'oauth_authorize', 'https://my.ecwid.com/api/oauth/token', array(
102
+ Ecwid_HTTP::POLICY_RETURN_VERBOSE
103
+ ));
104
+
105
+ $return = $request->do_request(array('body' => $params));
106
+
107
+ if (is_array($return) && isset($return['data'])) {
108
+ $result = json_decode($return['data']);
109
+ }
110
+
111
+ if (
112
+ !is_array($return)
113
+ || !isset( $result->store_id )
114
+ || !isset( $result->scope )
115
+ || !isset( $result->access_token )
116
+ || ( $result->token_type != 'Bearer' )
117
+ ) {
118
+ ecwid_log_error(var_export($return, true));
119
+ return $this->trigger_auth_error($reconnect ? 'reconnect' : 'default');
120
+ }
121
+
122
+ update_option( 'ecwid_store_id', $result->store_id );
123
+ update_option( 'ecwid_oauth_scope', $result->scope );
124
+ update_option( 'ecwid_api_check_time', 0 );
125
+ EcwidPlatform::cache_reset( 'all_categories' );
126
+ $this->api->save_token($result->access_token);
127
+
128
+ // Reset "Create store cookie" set previously to display the landing page
129
+ //in "Connect" mode rather than "Create" mode
130
+ setcookie('ecwid_create_store_clicked', null, strtotime('-1 day'), ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
131
+
132
+ if ( isset( $this->state->return_url ) && !empty( $this->state->return_url ) ) {
133
+ wp_redirect( admin_url( $this->state->return_url ) );
134
+ } else {
135
+ $url = '';
136
+ if ($reconnect) {
137
+ $url = 'admin.php?page=ecwid&setting-updated=true';
138
+ } else {
139
+ $url = 'admin.php?page=ecwid';
140
+ }
141
+ wp_redirect( $url );
142
+ }
143
+ exit;
144
+ }
145
+
146
+ public function disconnect_store()
147
+ {
148
+ update_option( 'ecwid_store_id', ECWID_DEMO_STORE_ID );
149
+ $this->api->save_token( '' );
150
+ update_option( 'ecwid_is_api_enabled', 'off' );
151
+ update_option( 'ecwid_api_check_time', 0 );
152
+
153
+ wp_redirect('admin.php?page=ecwid');
154
+ exit;
155
+ }
156
+
157
+ public function get_safe_scopes_array($scopes)
158
+ {
159
+ if (!isset($scopes) || empty($scopes)) {
160
+ return $this->_get_default_scopes_array();
161
+ }
162
+
163
+ if (!empty($scopes)) {
164
+ $scopes_array = explode(' ', $scopes);
165
+
166
+ foreach ($scopes_array as $key => $scope) {
167
+ if (!preg_match('/^[a-z_]+$/', $scope)) {
168
+ unset($scopes_array[$key]);
169
+ }
170
+ }
171
+ }
172
+
173
+ return $scopes_array;
174
+ }
175
+
176
+ public function has_scope( $scope ) {
177
+ $stored_scope = get_option( 'ecwid_oauth_scope' );
178
+ if (empty($stored_scope)) {
179
+ $stored_scope = 'read_store_profile read_catalog';
180
+ }
181
+
182
+ return in_array( $scope, explode(' ', $stored_scope) );
183
+ }
184
+
185
+ protected function _get_default_scopes_array() {
186
+ return array( 'read_store_profile', 'read_catalog', 'allow_sso', 'create_customers' );
187
+ }
188
+
189
+ protected function trigger_auth_error($mode = 'default')
190
+ {
191
+ update_option('ecwid_last_oauth_fail_time', time());
192
+
193
+ $logs = get_option('ecwid_error_log');
194
+
195
+ if ($logs) {
196
+ $logs = json_decode($logs);
197
+ }
198
+
199
+ if (is_array($logs) && count($logs) > 0) {
200
+ $entry = $logs[count($logs) - 1];
201
+ if (isset($entry->message)) {
202
+ $last_error = $entry->message;
203
+ }
204
+ }
205
+
206
+ if ( $mode == self::MODE_RECONNECT ) {
207
+ $this->update_state(array(
208
+ 'mode' => 'reconnect',
209
+ 'error' => 'other'
210
+ ));
211
+ }
212
+
213
+ if (isset($last_error)) {
214
+ EcwidPlatform::report_error($last_error);
215
+ }
216
+
217
+ wp_redirect('admin.php?page=ecwid&connection_error' . ($mode == self::MODE_RECONNECT ? '&reconnect' : ''));
218
+ exit;
219
+ }
220
+
221
+ protected function _get_scope() {
222
+ $default = $this->_get_default_scopes_array();
223
+
224
+ $scopes = array();
225
+ if ( $this->_is_reconnect() ) {
226
+ $scopes = isset($this->state->reconnect_scopes) && is_array($this->state->reconnect_scopes)
227
+ ? $this->state->reconnect_scopes
228
+ : array();
229
+ }
230
+
231
+ $scopes = array_merge($scopes, $default);
232
+
233
+ return $scopes;
234
+ }
235
+
236
+ public function get_sso_admin_link() {
237
+ $url = 'https://my.ecwid.com/api/v3/%s/sso?token=%s&timestamp=%s&signature=%s&inline=true';
238
+
239
+ $store_id = get_ecwid_store_id();
240
+
241
+ $token = $this->api->get_token();
242
+
243
+ $timestamp = time();
244
+ $signature = hash('sha256', $store_id . $token . $timestamp . Ecwid_Api_V3::CLIENT_SECRET);
245
+
246
+ $url = sprintf(
247
+ $url,
248
+ $store_id,
249
+ $token,
250
+ $timestamp,
251
+ $signature
252
+ );
253
+
254
+ return $url;
255
+ }
256
+
257
+ protected function _load_state() {
258
+ if (isset($_COOKIE['ecwid_oauth_state'])) {
259
+ $this->state = @json_decode( $_COOKIE['ecwid_oauth_state'] );
260
+
261
+ }
262
+
263
+ if (!is_object($this->state)) {
264
+ $this->state = new stdClass();
265
+ $this->state->reconnect_scopes = array();
266
+ $this->state->reconnect_error = '';
267
+ $this->state->return_url = '';
268
+ $this->state->reason = '';
269
+ $this->state->mode = self::MODE_CONNECT;
270
+ }
271
+
272
+ if (isset($_COOKIE['ecwid_create_store_clicked'])) {
273
+ $this->state->create_store_clicked = $_COOKIE['ecwid_create_store_clicked'];
274
+ }
275
+ }
276
+
277
+ public function get_state() {
278
+ return $this->state;
279
+ }
280
+
281
+ public function was_create_store_clicked() {
282
+ return $this->state->create_store_clicked;
283
+ }
284
+
285
+ protected function _save_state() {
286
+ setcookie('ecwid_oauth_state', json_encode($this->state), strtotime('+1 day'), ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
287
+ }
288
+
289
+ public function get_reconnect_error() {
290
+ return $this->state->reconnect_error;
291
+ }
292
+
293
+ public function update_state($params) {
294
+
295
+ if (isset($params['mode'])) {
296
+ $this->state->mode = $params['mode'] == self::MODE_RECONNECT ? self::MODE_RECONNECT : self::MODE_CONNECT;
297
+ }
298
+
299
+ if ( $this->_is_reconnect() ) {
300
+ if ( isset( $params['scope'] ) ) {
301
+ $this->state->reconnect_scopes = $this->get_safe_scopes_array( @$params['scope'] );
302
+ }
303
+ if ( isset( $params['return_url'] ) ) {
304
+ $this->state->return_url = $params['return_url'];
305
+ }
306
+
307
+ if ( isset( $params['error'] ) ) {
308
+ $this->state->reconnect_error = $params['error'];
309
+ }
310
+
311
+ if ( isset( $params['reason'] ) ) {
312
+ $this->state->reason = $params['reason'];
313
+ }
314
+ }
315
+
316
+ $this->_save_state();
317
+ }
318
+
319
+ public function get_error() {
320
+
321
+ if ($this->_is_reconnect()) {
322
+ return $this->state->reconnect_error;
323
+ } else {
324
+ return $this->state->error;
325
+ }
326
+ }
327
+
328
+ public function get_reconnect_message() {
329
+ $reconnect_message = '';
330
+
331
+ if (isset($this->state->reason)) {
332
+ switch ( $this->state->reason ) {
333
+ case '1':
334
+ $reconnect_message = "Message 1";
335
+ break;
336
+ case '2':
337
+ $reconnect_message = "Message 2";
338
+ break;
339
+ }
340
+ }
341
+
342
+ return $reconnect_message;
343
+ }
344
+
345
+ protected function _is_reconnect() {
346
+ return @$this->state->mode == self::MODE_RECONNECT;
347
+ }
348
+ }
349
+
350
+ $ecwid_oauth = new Ecwid_OAuth();
includes/class-ecwid-sitemap-builder.php CHANGED
@@ -1,89 +1,89 @@
1
- <?php
2
-
3
- require_once dirname(__FILE__) . '/../lib/JSONStreamingParser/Listener.php';
4
- require_once dirname(__FILE__) . '/../lib/JSONStreamingParser/Parser.php';
5
-
6
-
7
- class EcwidSitemapBuilder implements JsonStreamingParser_Listener {
8
- var $_stack;
9
- var $_key;
10
- var $callback;
11
- var $base_url;
12
- var $api;
13
- var $type;
14
-
15
- public function __construct($base_url, $callback, $api) {
16
- $this->callback = $callback;
17
- $this->base_url = $base_url;
18
- $this->api = $api;
19
- }
20
-
21
- public function generate() {
22
-
23
- foreach (array('products', 'categories') as $type) {
24
- $this->type = $type;
25
- $stream = $this->api->get_method_response_stream($type);
26
- if (!is_null($stream)) {
27
- try {
28
- $parser = new JsonStreamingParser_Parser($stream, $this);
29
- $parser->parse();
30
- } catch (Exception $e) {
31
- fclose($stream);
32
- }
33
- }
34
- }
35
-
36
- return true;
37
- }
38
-
39
- public function file_position($line, $char) {
40
-
41
- }
42
-
43
- public function start_document() {
44
- $this->_stack = array();
45
-
46
- $this->_key = null;
47
- }
48
-
49
- public function end_document() {
50
- }
51
-
52
- public function start_object() {
53
- array_push($this->_stack, array());
54
- }
55
-
56
- public function end_object() {
57
-
58
- $obj = array_pop($this->_stack);
59
- if (is_array($obj) && array_key_exists('url', $obj)) {
60
- $callback = $this->callback;
61
-
62
- call_user_func(
63
- $callback,
64
- ecwid_get_entity_url($obj, $this->type == 'products' ? 'p' : 'c'),
65
- $this->type == 'products' ? 0.6 : 0.5,
66
- 'weekly',
67
- $obj
68
- );
69
- }
70
- }
71
-
72
- public function start_array() {
73
- }
74
-
75
- public function end_array() {
76
- }
77
-
78
- public function key($key) {
79
- $this->_key = $key;
80
- }
81
-
82
- public function value($value) {
83
- $params = array('url', 'originalImageUrl', 'name');
84
-
85
- if (in_array($this->_key, $params)) {
86
- $this->_stack[0][$this->_key] = $value;
87
- }
88
- }
89
  }
1
+ <?php
2
+
3
+ require_once dirname(__FILE__) . '/../lib/JSONStreamingParser/Listener.php';
4
+ require_once dirname(__FILE__) . '/../lib/JSONStreamingParser/Parser.php';
5
+
6
+
7
+ class EcwidSitemapBuilder implements JsonStreamingParser_Listener {
8
+ var $_stack;
9
+ var $_key;
10
+ var $callback;
11
+ var $base_url;
12
+ var $api;
13
+ var $type;
14
+
15
+ public function __construct($base_url, $callback, $api) {
16
+ $this->callback = $callback;
17
+ $this->base_url = $base_url;
18
+ $this->api = $api;
19
+ }
20
+
21
+ public function generate() {
22
+
23
+ foreach (array('products', 'categories') as $type) {
24
+ $this->type = $type;
25
+ $stream = $this->api->get_method_response_stream($type);
26
+ if (!is_null($stream)) {
27
+ try {
28
+ $parser = new JsonStreamingParser_Parser($stream, $this);
29
+ $parser->parse();
30
+ } catch (Exception $e) {
31
+ fclose($stream);
32
+ }
33
+ }
34
+ }
35
+
36
+ return true;
37
+ }
38
+
39
+ public function file_position($line, $char) {
40
+
41
+ }
42
+
43
+ public function start_document() {
44
+ $this->_stack = array();
45
+
46
+ $this->_key = null;
47
+ }
48
+
49
+ public function end_document() {
50
+ }
51
+
52
+ public function start_object() {
53
+ array_push($this->_stack, array());
54
+ }
55
+
56
+ public function end_object() {
57
+
58
+ $obj = array_pop($this->_stack);
59
+ if (is_array($obj) && array_key_exists('url', $obj)) {
60
+ $callback = $this->callback;
61
+
62
+ call_user_func(
63
+ $callback,
64
+ ecwid_get_entity_url($obj, $this->type == 'products' ? 'p' : 'c'),
65
+ $this->type == 'products' ? 0.6 : 0.5,
66
+ 'weekly',
67
+ $obj
68
+ );
69
+ }
70
+ }
71
+
72
+ public function start_array() {
73
+ }
74
+
75
+ public function end_array() {
76
+ }
77
+
78
+ public function key($key) {
79
+ $this->_key = $key;
80
+ }
81
+
82
+ public function value($value) {
83
+ $params = array('url', 'originalImageUrl', 'name');
84
+
85
+ if (in_array($this->_key, $params)) {
86
+ $this->_stack[0][$this->_key] = $value;
87
+ }
88
+ }
89
  }
includes/class-ecwid-store-editor.php CHANGED
@@ -1,89 +1,89 @@
1
- <?php
2
-
3
- class Ecwid_Store_Editor {
4
- public function __construct()
5
- {
6
- $version = get_bloginfo( 'version' );
7
- if ( version_compare( $version, '3.5' ) < 0 ) {
8
- return;
9
- }
10
-
11
- add_action( 'template_redirect', array( $this, 'get_store_svg' ) );
12
-
13
- add_action( 'current_screen', array($this, 'init') );
14
- }
15
-
16
- public function init()
17
- {
18
- $current_screen = get_current_screen();
19
-
20
- if ( $current_screen->base != 'post' || !in_array($current_screen->post_type, array('post', 'page')) ) {
21
- return;
22
- }
23
-
24
- add_filter( 'mce_external_plugins', array( $this, 'add_mce_plugin' ) );
25
- add_action( 'media_buttons_context', array( $this, 'add_editor_button' ) );
26
- add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts' ) );
27
- add_action( 'in_admin_header', array( $this, 'add_popup' ) );
28
- }
29
-
30
- public function add_mce_plugin($plugins) {
31
-
32
- $plugins_array = array(
33
- 'ecwid' => ECWID_PLUGIN_URL . 'js/store-editor-mce.js',
34
- 'ecwid_common' => ECWID_PLUGIN_URL . 'js/store-editor-common.js',
35
- );
36
-
37
- return array_merge($plugins, $plugins_array);
38
- }
39
-
40
- public function add_editor_button($context) {
41
-
42
- $image_code = file_get_contents( ECWID_PLUGIN_DIR . 'images/store.svg' );
43
-
44
- $title = __( 'Add Store', 'ecwid-shopping-cart' );
45
- $button = <<<HTML
46
- <a href="#" id="insert-ecwid-button" class="button add-ecwid ecwid_button" title="$title">
47
- <span class="ecwid-store-icon">$image_code</span>
48
- $title
49
- </a>
50
- HTML;
51
-
52
- $title = __( 'Edit Store', 'ecwid-shopping-cart' );
53
- $button .= <<<HTML
54
- <a href="#" id="update-ecwid-button" class="button update-ecwid ecwid_button" title="$title">
55
- <span class="ecwid-store-icon">$image_code</span>
56
- $title
57
- </a>
58
- HTML;
59
-
60
- return $context . $button;
61
- }
62
-
63
- public function add_scripts() {
64
- wp_enqueue_style( 'ecwid-store-editor-css', ECWID_PLUGIN_URL . 'css/store-popup.css', array(), get_option('ecwid_plugin_version') );
65
- wp_enqueue_script( 'ecwid-store-editor-common-js', ECWID_PLUGIN_URL . 'js/store-editor-common.js', array(), get_option('ecwid_plugin_version') );
66
- wp_enqueue_script( 'ecwid-store-editor-page-js', ECWID_PLUGIN_URL . 'js/store-editor-page.js', array(), get_option('ecwid_plugin_version') );
67
- wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
68
- wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_pb_defaults', ecwid_get_default_pb_size() );
69
- add_editor_style( ECWID_PLUGIN_URL . 'css/page-editor.css' );
70
- }
71
-
72
- public function get_store_svg() {
73
- // TODO: Move this to admin-post
74
- if (isset($_GET['file']) && $_GET['file'] == 'ecwid_store_svg.svg' && current_user_can('administrator')) {
75
- ecwid_load_textdomain();
76
- header( 'Content-type: image/svg+xml' );
77
- require_once( ECWID_PLUGIN_DIR . 'templates/store-svg.php' );
78
- die();
79
- }
80
- }
81
-
82
- public function add_popup() {
83
- $categories = ecwid_get_categories_for_selector();
84
-
85
- require_once( ECWID_PLUGIN_DIR . 'templates/store-popup.php' );
86
- }
87
- }
88
-
89
- $ecwid_store_editor = new Ecwid_Store_Editor();
1
+ <?php
2
+
3
+ class Ecwid_Store_Editor {
4
+ public function __construct()
5
+ {
6
+ $version = get_bloginfo( 'version' );
7
+ if ( version_compare( $version, '3.5' ) < 0 ) {
8
+ return;
9
+ }
10
+
11
+ add_action( 'template_redirect', array( $this, 'get_store_svg' ) );
12
+
13
+ add_action( 'current_screen', array($this, 'init') );
14
+ }
15
+
16
+ public function init()
17
+ {
18
+ $current_screen = get_current_screen();
19
+
20
+ if ( $current_screen->base != 'post' || !in_array($current_screen->post_type, array('post', 'page')) ) {
21
+ return;
22
+ }
23
+
24
+ add_filter( 'mce_external_plugins', array( $this, 'add_mce_plugin' ) );
25
+ add_action( 'media_buttons_context', array( $this, 'add_editor_button' ) );
26
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts' ) );
27
+ add_action( 'in_admin_header', array( $this, 'add_popup' ) );
28
+ }
29
+
30
+ public function add_mce_plugin($plugins) {
31
+
32
+ $plugins_array = array(
33
+ 'ecwid' => ECWID_PLUGIN_URL . 'js/store-editor-mce.js',
34
+ 'ecwid_common' => ECWID_PLUGIN_URL . 'js/store-editor-common.js',
35
+ );
36
+
37
+ return array_merge($plugins, $plugins_array);
38
+ }
39
+
40
+ public function add_editor_button($context) {
41
+
42
+ $image_code = file_get_contents( ECWID_PLUGIN_DIR . 'images/store.svg' );
43
+
44
+ $title = __( 'Add Store', 'ecwid-shopping-cart' );
45
+ $button = <<<HTML
46
+ <a href="#" id="insert-ecwid-button" class="button add-ecwid ecwid_button" title="$title">
47
+ <span class="ecwid-store-icon">$image_code</span>
48
+ $title
49
+ </a>
50
+ HTML;
51
+
52
+ $title = __( 'Edit Store', 'ecwid-shopping-cart' );
53
+ $button .= <<<HTML
54
+ <a href="#" id="update-ecwid-button" class="button update-ecwid ecwid_button" title="$title">
55
+ <span class="ecwid-store-icon">$image_code</span>
56
+ $title
57
+ </a>
58
+ HTML;
59
+
60
+ return $context . $button;
61
+ }
62
+
63
+ public function add_scripts() {
64
+ wp_enqueue_style( 'ecwid-store-editor-css', ECWID_PLUGIN_URL . 'css/store-popup.css', array(), get_option('ecwid_plugin_version') );
65
+ wp_enqueue_script( 'ecwid-store-editor-common-js', ECWID_PLUGIN_URL . 'js/store-editor-common.js', array(), get_option('ecwid_plugin_version') );
66
+ wp_enqueue_script( 'ecwid-store-editor-page-js', ECWID_PLUGIN_URL . 'js/store-editor-page.js', array(), get_option('ecwid_plugin_version') );
67
+ wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
68
+ wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_pb_defaults', ecwid_get_default_pb_size() );
69
+ add_editor_style( ECWID_PLUGIN_URL . 'css/page-editor.css' );
70
+ }
71
+
72
+ public function get_store_svg() {
73
+ // TODO: Move this to admin-post
74
+ if (isset($_GET['file']) && $_GET['file'] == 'ecwid_store_svg.svg' && current_user_can('administrator')) {
75
+ ecwid_load_textdomain();
76
+ header( 'Content-type: image/svg+xml' );
77
+ require_once( ECWID_PLUGIN_DIR . 'templates/store-svg.php' );
78
+ die();
79
+ }
80
+ }
81
+
82
+ public function add_popup() {
83
+ $categories = ecwid_get_categories_for_selector();
84
+
85
+ require_once( ECWID_PLUGIN_DIR . 'templates/store-popup.php' );
86
+ }
87
+ }
88
+
89
+ $ecwid_store_editor = new Ecwid_Store_Editor();
includes/faq_entries.php CHANGED
@@ -1,71 +1,71 @@
1
- <?php
2
-
3
- $faqs = array(
4
- array(
5
- 'title' => __( 'How secure is this plugin? Is my store PCI DSS compliant?', 'ecwid-shopping-cart' ),
6
- 'body' => __(
7
- 'Ecwid is PCI DSS Level 1 certified, which is the gold standard for e-commerce solutions worldwide. This means you won’t have any banking compliance issues when selling online with Ecwid. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#secureplugin">More details.</a>' , 'ecwid-shopping-cart'
8
- ),
9
- 'priority' => 'newbie_with_woo'
10
- ),
11
- array(
12
- 'title' => __( 'How can I manage my store from a mobile device?', 'ecwid-shopping-cart' ),
13
- 'body' => __(
14
- 'Ecwid provides free mobile applications for iOS and Android to manage your store and sell on the go. Scan products, track inventory, manage sales and accept payments using your mobile device as a POS station. <a target="_blank" href="https://www.ecwid.com/ecwid-mobile">More details.</a>'
15
- , 'ecwid-shopping-cart'
16
- ),
17
- 'priority' => 'newbie_with_woo'
18
- ),
19
- array(
20
- 'title' => __( 'How to set up a storefront on Facebook with Ecwid?', 'ecwid-shopping-cart' ),
21
- 'body' => __(
22
- 'You can add your online store to your Facebook business page. No addons needed. Ecwid will automatically synchronize products, customers, orders and inventory between your WordPress and Facebook storefronts. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#How%20to%20add%20my%20store%20to%20Facebook">More details.</a>'
23
- , 'ecwid-shopping-cart'
24
- ),
25
- 'priority' => 'newbie_with_woo'
26
- ),
27
- array(
28
- 'title' => __( 'How can I add a cart widget to my site sidebar?', 'ecwid-shopping-cart' ),
29
- 'body' => sprintf(
30
- __(
31
- 'You can add product search box, cart widget and more on the <a href="%s">"Appearance / Widgets page"</a> here in your site admin. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#Sidebar%%20widgets">More details.</a>'
32
- , 'ecwid-shopping-cart'
33
- ),
34
- admin_url("widgets.php?from-ecwid=true")
35
- )
36
- ),
37
- array(
38
- 'title' => __( 'How much does Ecwid cost?', 'ecwid-shopping-cart' ),
39
- 'body' => __(
40
- 'Our 4 account types vary by number of products, types of functionality, and level of support. For more information, check out our <a target="_blank" href="https://www.ecwid.com/pricing">pricing page.</a><br /><br />Free - Up to 10 products<br />Venture - $15/month<br />Business - $35/month<br />Unlimited - $99/month<br /><br />Pro Tip: You can also save money by enrolling in our annual plans.'
41
- , 'ecwid-shopping-cart'
42
- )
43
- ),
44
- array(
45
- 'title' => __( 'How do I add store categories to the site menu.', 'ecwid-shopping-cart' ),
46
- 'body' => __(
47
- 'You can add the store categories menu to your site menu to help your customers easily navigate your site. Just open "Appearance > Menus" in your WordPress control panel and add the "Store with Categories Menu" item to your site menu. A drop-down menu containing your store categories will automatically appear on your site.'
48
- , 'ecwid-shopping-cart'
49
- )
50
- ),
51
- array(
52
- 'title' => __( 'How do I put my products in the sitemap?', 'ecwid-shopping-cart' ),
53
- 'body' => __(
54
- 'To create sitemap for your Wordpress site we suggest using <a target="_blank" href="https://wordpress.org/plugins/google-sitemap-generator/">Google XML Sitemaps</a> or <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast Wordpress SEO</a>. &nbsp;plugins. These plugins are fully compatible with Ecwid and allow to generate a sitemap that will contain links to categories and product pages, so the store pages will get indexed faster. Please note that this option is available to <a target="_blank" href="https://www.ecwid.com/pricing">paid Ecwid users</a>.', 'ecwid-shopping-cart'
55
- )
56
- ),
57
- array(
58
- 'title' => __( 'How to add a single product with the add to bag button to the site pages?', 'ecwid-shopping-cart' ),
59
- 'body' => __(
60
- 'To feature a single product on a separate page or blog post of your site, use <b>[ecwid_product]</b> shortcode. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#Howtoembedasingleproductonapageorpostofmysite">How to use it.</a>'
61
- , 'ecwid-shopping-cart'
62
- )
63
- ),
64
- array(
65
- 'title' => __( 'Is it possible to display my store on the site home page?', 'ecwid-shopping-cart' ),
66
- 'body' => __(
67
- 'You can display your store on the site main page. Adjust the "Reading" settings of your site as described in our <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#displaystoreonhomepage">Help Center.</a>'
68
- , 'ecwid-shopping-cart'
69
- )
70
- )
71
  );
1
+ <?php
2
+
3
+ $faqs = array(
4
+ array(
5
+ 'title' => __( 'How secure is this plugin? Is my store PCI DSS compliant?', 'ecwid-shopping-cart' ),
6
+ 'body' => __(
7
+ 'Ecwid is PCI DSS Level 1 certified, which is the gold standard for e-commerce solutions worldwide. This means you won’t have any banking compliance issues when selling online with Ecwid. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#secureplugin">More details.</a>' , 'ecwid-shopping-cart'
8
+ ),
9
+ 'priority' => 'newbie_with_woo'
10
+ ),
11
+ array(
12
+ 'title' => __( 'How can I manage my store from a mobile device?', 'ecwid-shopping-cart' ),
13
+ 'body' => __(
14
+ 'Ecwid provides free mobile applications for iOS and Android to manage your store and sell on the go. Scan products, track inventory, manage sales and accept payments using your mobile device as a POS station. <a target="_blank" href="https://www.ecwid.com/ecwid-mobile">More details.</a>'
15
+ , 'ecwid-shopping-cart'
16
+ ),
17
+ 'priority' => 'newbie_with_woo'
18
+ ),
19
+ array(
20
+ 'title' => __( 'How to set up a storefront on Facebook with Ecwid?', 'ecwid-shopping-cart' ),
21
+ 'body' => __(
22
+ 'You can add your online store to your Facebook business page. No addons needed. Ecwid will automatically synchronize products, customers, orders and inventory between your WordPress and Facebook storefronts. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#How%20to%20add%20my%20store%20to%20Facebook">More details.</a>'
23
+ , 'ecwid-shopping-cart'
24
+ ),
25
+ 'priority' => 'newbie_with_woo'
26
+ ),
27
+ array(
28
+ 'title' => __( 'How can I add a cart widget to my site sidebar?', 'ecwid-shopping-cart' ),
29
+ 'body' => sprintf(
30
+ __(
31
+ 'You can add product search box, cart widget and more on the <a href="%s">"Appearance / Widgets page"</a> here in your site admin. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#Sidebar%%20widgets">More details.</a>'
32
+ , 'ecwid-shopping-cart'
33
+ ),
34
+ admin_url("widgets.php?from-ecwid=true")
35
+ )
36
+ ),
37
+ array(
38
+ 'title' => __( 'How much does Ecwid cost?', 'ecwid-shopping-cart' ),
39
+ 'body' => __(
40
+ 'Our 4 account types vary by number of products, types of functionality, and level of support. For more information, check out our <a target="_blank" href="https://www.ecwid.com/pricing">pricing page.</a><br /><br />Free - Up to 10 products<br />Venture - $15/month<br />Business - $35/month<br />Unlimited - $99/month<br /><br />Pro Tip: You can also save money by enrolling in our annual plans.'
41
+ , 'ecwid-shopping-cart'
42
+ )
43
+ ),
44
+ array(
45
+ 'title' => __( 'How do I add store categories to the site menu.', 'ecwid-shopping-cart' ),
46
+ 'body' => __(
47
+ 'You can add the store categories menu to your site menu to help your customers easily navigate your site. Just open "Appearance > Menus" in your WordPress control panel and add the "Store with Categories Menu" item to your site menu. A drop-down menu containing your store categories will automatically appear on your site.'
48
+ , 'ecwid-shopping-cart'
49
+ )
50
+ ),
51
+ array(
52
+ 'title' => __( 'How do I put my products in the sitemap?', 'ecwid-shopping-cart' ),
53
+ 'body' => __(
54
+ 'To create sitemap for your Wordpress site we suggest using <a target="_blank" href="https://wordpress.org/plugins/google-sitemap-generator/">Google XML Sitemaps</a> or <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast Wordpress SEO</a>. &nbsp;plugins. These plugins are fully compatible with Ecwid and allow to generate a sitemap that will contain links to categories and product pages, so the store pages will get indexed faster. Please note that this option is available to <a target="_blank" href="https://www.ecwid.com/pricing">paid Ecwid users</a>.', 'ecwid-shopping-cart'
55
+ )
56
+ ),
57
+ array(
58
+ 'title' => __( 'How to add a single product with the add to bag button to the site pages?', 'ecwid-shopping-cart' ),
59
+ 'body' => __(
60
+ 'To feature a single product on a separate page or blog post of your site, use <b>[ecwid_product]</b> shortcode. <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#Howtoembedasingleproductonapageorpostofmysite">How to use it.</a>'
61
+ , 'ecwid-shopping-cart'
62
+ )
63
+ ),
64
+ array(
65
+ 'title' => __( 'Is it possible to display my store on the site home page?', 'ecwid-shopping-cart' ),
66
+ 'body' => __(
67
+ 'You can display your store on the site main page. Adjust the "Reading" settings of your site as described in our <a target="_blank" href="https://support.ecwid.com/hc/en-us/articles/207101259-Wordpress-downloadable-#displaystoreonhomepage">Help Center.</a>'
68
+ , 'ecwid-shopping-cart'
69
+ )
70
+ )
71
  );
includes/oembed.php CHANGED
@@ -1,119 +1,119 @@
1
- <?php
2
-
3
- add_filter('embed_content', 'ecwid_oembed_content', 10, 1);
4
-
5
- function ecwid_oembed_content($data)
6
- {
7
- echo ecwid_get_embed_content();
8
- }
9
-
10
- function ecwid_get_embed_content()
11
- {
12
-
13
- $html = '';
14
- $root_category_id = 0;
15
-
16
- $post_content = get_post(get_the_ID())->post_content;
17
- $shortcodes = ecwid_find_shortcodes($post_content, 'ecwid');
18
-
19
- if (!$shortcodes || !isset($shortcodes[0]) || !isset($shortcodes[0][3])) {
20
- return;
21
- }
22
-
23
- $attributes = $shortcodes[0][3];
24
- if (!preg_match('/default_category_id=.([\\d]*)./', $attributes, $matches)) {
25
- return;
26
- }
27
-
28
- $root_category_id = 0;
29
- if (!is_numeric($matches[1])) {
30
- return;
31
- } else if (isset($matches[1])) {
32
- $root_category_id = $matches[1];
33
- }
34
-
35
- $categories = ecwid_get_categories();
36
-
37
- if ($root_category_id != 0) {
38
- $categories = _ecwid_find_category_in_horizontal_categories_tree($categories, $root_category_id);
39
- }
40
-
41
- $max_items = 5;
42
-
43
- $items = array();
44
-
45
- $see_more = false;
46
- $result = '';
47
- if (!empty($categories)) {
48
- foreach ($categories as $category) {
49
- $url = ecwid_get_category_url(array('id' => $category->id, 'url' => $category->link));
50
- $items[$url] = $category->name;
51
- if (count($items) >= $max_items) {
52
- $see_more = true;
53
- break;
54
- }
55
- }
56
- }
57
-
58
- if (ecwid_is_paid_account()) {
59
- $api = new Ecwid_Api_V3();
60
-
61
- $category = $api->get_category($root_category_id);
62
-
63
- if ($category) {
64
- $trimmed = ecwid_trim_description($category->description);
65
- $result .= '<div>' . ecwid_trim_description($category->description);
66
-
67
- if (mb_strlen($trimmed) < mb_strlen($category->description) && mb_strlen($trimmed) == ECWID_TRIMMED_DESCRIPTION_LENGTH) {
68
- $result .= '... <a class="wp-embed-more" href="' . get_page_link(get_post(get_the_ID())) . '">' . __('See more', 'ecwid-shopping-cart') . '</a>';
69
- }
70
- $result .= '</div>';
71
- }
72
-
73
- if (!$see_more) {
74
- $products = $api->get_products(array( 'category' => $root_category_id ));
75
-
76
- if ($products) {
77
- foreach ($products as $product) {
78
- $url = ecwid_get_product_url(array( 'id' => $product->id, 'url' => $product->url ));
79
- $items[$url] = $product->name;
80
- if (count($items) >= $max_items) {
81
- $see_more = TRUE;
82
- break;
83
- }
84
- }
85
- }
86
- }
87
- }
88
-
89
- $result .= '<ul>';
90
- if ($items) {
91
- foreach ($items as $url => $title) {
92
- $result .= '<li><a href="' . esc_attr($url) . '">' . esc_html($title) . '</a></li>';
93
- }
94
- }
95
-
96
- if ($see_more) {
97
- $result .= '<li><a class="wp-embed-more" href="' . get_page_link(get_post(get_the_ID())) . '">' . __('See more', 'ecwid-shopping-cart') . '</a></li>';
98
- }
99
-
100
- $result .= '</ul>';
101
- return $result;
102
- }
103
-
104
- function _ecwid_find_category_in_horizontal_categories_tree($categories, $root_id) {
105
- foreach($categories as $category) {
106
- if ($category->id == $root_id) {
107
- return $category->sub;
108
- }
109
-
110
- if (!is_null($category->sub)) {
111
- $result = _ecwid_find_category_in_horizontal_categories_tree($category->sub, $root_id);
112
- if ($result !== false) {
113
- return $result;
114
- }
115
- }
116
- }
117
- return false;
118
- }
119
-
1
+ <?php
2
+
3
+ add_filter('embed_content', 'ecwid_oembed_content', 10, 1);
4
+
5
+ function ecwid_oembed_content($data)
6
+ {
7
+ echo ecwid_get_embed_content();
8
+ }
9
+
10
+ function ecwid_get_embed_content()
11
+ {
12
+
13
+ $html = '';
14
+ $root_category_id = 0;
15
+
16
+ $post_content = get_post(get_the_ID())->post_content;
17
+ $shortcodes = ecwid_find_shortcodes($post_content, 'ecwid');
18
+
19
+ if (!$shortcodes || !isset($shortcodes[0]) || !isset($shortcodes[0][3])) {
20
+ return;
21
+ }
22
+
23
+ $attributes = $shortcodes[0][3];
24
+ if (!preg_match('/default_category_id=.([\\d]*)./', $attributes, $matches)) {
25
+ return;
26
+ }
27
+
28
+ $root_category_id = 0;
29
+ if (!is_numeric($matches[1])) {
30
+ return;
31
+ } else if (isset($matches[1])) {
32
+ $root_category_id = $matches[1];
33
+ }
34
+
35
+ $categories = ecwid_get_categories();
36
+
37
+ if ($root_category_id != 0) {
38
+ $categories = _ecwid_find_category_in_horizontal_categories_tree($categories, $root_category_id);
39
+ }
40
+
41
+ $max_items = 5;
42
+
43
+ $items = array();
44
+
45
+ $see_more = false;
46
+ $result = '';
47
+ if (!empty($categories)) {
48
+ foreach ($categories as $category) {
49
+ $url = ecwid_get_category_url(array('id' => $category->id, 'url' => $category->link));
50
+ $items[$url] = $category->name;
51
+ if (count($items) >= $max_items) {
52
+ $see_more = true;
53
+ break;
54
+ }
55
+ }
56
+ }
57
+
58
+ if (ecwid_is_paid_account()) {
59
+ $api = new Ecwid_Api_V3();
60
+
61
+ $category = $api->get_category($root_category_id);
62
+
63
+ if ($category) {
64
+ $trimmed = ecwid_trim_description($category->description);
65
+ $result .= '<div>' . ecwid_trim_description($category->description);
66
+
67
+ if (mb_strlen($trimmed) < mb_strlen($category->description) && mb_strlen($trimmed) == ECWID_TRIMMED_DESCRIPTION_LENGTH) {
68
+ $result .= '... <a class="wp-embed-more" href="' . get_page_link(get_post(get_the_ID())) . '">' . __('See more', 'ecwid-shopping-cart') . '</a>';
69
+ }
70
+ $result .= '</div>';
71
+ }
72
+
73
+ if (!$see_more) {
74
+ $products = $api->get_products(array( 'category' => $root_category_id ));
75
+
76
+ if ($products) {
77
+ foreach ($products as $product) {
78
+ $url = ecwid_get_product_url(array( 'id' => $product->id, 'url' => $product->url ));
79
+ $items[$url] = $product->name;
80
+ if (count($items) >= $max_items) {
81
+ $see_more = TRUE;
82
+ break;
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+
89
+ $result .= '<ul>';
90
+ if ($items) {
91
+ foreach ($items as $url => $title) {
92
+ $result .= '<li><a href="' . esc_attr($url) . '">' . esc_html($title) . '</a></li>';
93
+ }
94
+ }
95
+
96
+ if ($see_more) {
97
+ $result .= '<li><a class="wp-embed-more" href="' . get_page_link(get_post(get_the_ID())) . '">' . __('See more', 'ecwid-shopping-cart') . '</a></li>';
98
+ }
99
+
100
+ $result .= '</ul>';
101
+ return $result;
102
+ }
103
+
104
+ function _ecwid_find_category_in_horizontal_categories_tree($categories, $root_id) {
105
+ foreach($categories as $category) {
106
+ if ($category->id == $root_id) {
107
+ return $category->sub;
108
+ }
109
+
110
+ if (!is_null($category->sub)) {
111
+ $result = _ecwid_find_category_in_horizontal_categories_tree($category->sub, $root_id);
112
+ if ($result !== false) {
113
+ return $result;
114
+ }
115
+ }
116
+ }
117
+ return false;
118
+ }
119
+
includes/shortcodes.php CHANGED
@@ -1,29 +1,31 @@
1
- <?php
2
-
3
- include_once "shortcodes/class-ecwid-shortcode-productbrowser.php";
4
- include_once "shortcodes/class-ecwid-shortcode-minicart.php";
5
- include_once "shortcodes/class-ecwid-shortcode-search.php";
6
- include_once "shortcodes/class-ecwid-shortcode-categories.php";
7
-
8
- add_shortcode('ecwid_productbrowser', 'ecwid_render_shortcode');
9
- add_shortcode('ecwid_minicart', 'ecwid_render_shortcode');
10
- add_shortcode('ecwid_search', 'ecwid_render_shortcode');
11
- add_shortcode('ecwid_categories', 'ecwid_render_shortcode');
12
-
13
- function ecwid_render_shortcode($params, $content = '', $name) {
14
- $names = array('productbrowser', 'minicart', 'search', 'categories');
15
-
16
- $prefix = substr($name, 0, 6);
17
-
18
- if ($prefix != 'ecwid_') return '';
19
-
20
- $base = substr($name, 6);
21
-
22
- if (in_array($base, $names)) {
23
- $classname = 'Ecwid_Shortcode_' . $base;
24
-
25
- $shortcode = new $classname($params);
26
-
27
- return $shortcode->render();
28
- }
 
 
29
  }
1
+ <?php
2
+
3
+ include_once "shortcodes/class-ecwid-shortcode-productbrowser.php";
4
+ include_once "shortcodes/class-ecwid-shortcode-minicart.php";
5
+ include_once "shortcodes/class-ecwid-shortcode-search.php";
6
+ include_once "shortcodes/class-ecwid-shortcode-categories.php";
7
+ include_once "shortcodes/class-ecwid-shortcode-product.php";
8
+
9
+ add_shortcode('ecwid_productbrowser', 'ecwid_render_shortcode');
10
+ add_shortcode('ecwid_minicart', 'ecwid_render_shortcode');
11
+ add_shortcode('ecwid_search', 'ecwid_render_shortcode');
12
+ add_shortcode('ecwid_categories', 'ecwid_render_shortcode');
13
+ add_shortcode('ecwid_product', 'ecwid_render_shortcode');
14
+
15
+ function ecwid_render_shortcode($params, $content = '', $name) {
16
+ $names = array('productbrowser', 'minicart', 'search', 'categories', 'product');
17
+
18
+ $prefix = substr($name, 0, 6);
19
+
20
+ if ($prefix != 'ecwid_') return '';
21
+
22
+ $base = substr($name, 6);
23
+
24
+ if (in_array($base, $names)) {
25
+ $classname = 'Ecwid_Shortcode_' . $base;
26
+
27
+ $shortcode = new $classname($params);
28
+
29
+ return $shortcode->render();
30
+ }
31
  }
includes/shortcodes/class-ecwid-shortcode-base.php CHANGED
@@ -1,115 +1,115 @@
1
- <?php
2
- abstract class Ecwid_Shortcode_Base {
3
-
4
- protected $_params = array();
5
- protected $_lang;
6
- protected $_should_render = true;
7
- protected $_index;
8
-
9
- static protected $shortcodes = array();
10
-
11
- abstract public function get_shortcode_name();
12
- abstract protected function _process_params( $shortcode_params = array() );
13
- abstract public function get_ecwid_widget_function_name();
14
-
15
- public function __construct( $params ) {
16
-
17
- if (isset($params['lang']) && $params['lang']) {
18
- $this->_lang = $params['lang'];
19
- }
20
- $this->_process_params( $params );
21
-
22
- if (!isset(self::$shortcodes[$this->get_shortcode_name()])) {
23
- self::$shortcodes[$this->get_shortcode_name()] = array();
24
- }
25
- $this->_index = count(self::$shortcodes[$this->get_shortcode_name()]);
26
- self::$shortcodes[$this->get_shortcode_name()][] = $this;
27
- }
28
-
29
- public function wrap_code($code) {
30
-
31
- $version = get_option('ecwid_plugin_version');
32
-
33
- $shortcode_content = ecwid_get_scriptjs_code($this->_lang) . $code;
34
-
35
- $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
36
- . $shortcode_content
37
- . "<!-- END Ecwid Shopping Cart v $version -->";
38
-
39
- return apply_filters('ecwid_shortcode_content', $shortcode_content);
40
- }
41
-
42
- public function render() {
43
- if (!$this->_should_render) return '';
44
-
45
- $custom_renderer = apply_filters('ecwid_shortcode_custom_renderer', null, $this);
46
- if (is_callable($custom_renderer)) {
47
- return call_user_func( $custom_renderer, $this );
48
- }
49
-
50
- return self::_default_render();
51
- }
52
-
53
- public function render_script() {
54
- $params_string = $this->build_params_string(
55
- array_merge(
56
- $this->_params,
57
- array('id' => $this->get_html_id())
58
- )
59
- );
60
-
61
- $function = $this->get_ecwid_widget_function_name();
62
-
63
- return <<<HTML
64
- <script data-cfasync="false" type="text/javascript"> $function($params_string);</script>
65
- HTML;
66
- }
67
-
68
- public function render_placeholder() {
69
-
70
- $classname = $this->_get_html_class_name();
71
- $id = $this->get_html_id();
72
- return <<<HTML
73
- <div class="ecwid-shopping-cart-$classname" id="$id"></div>
74
- HTML;
75
- }
76
-
77
- protected function _get_html_class_name() {
78
- return $this->get_shortcode_name();
79
- }
80
-
81
- public function get_html_id() {
82
- return 'ecwid-shopping-cart-' . $this->get_shortcode_name() . '-' . ( $this->_index + 1);
83
- }
84
-
85
- protected function _default_render() {
86
- $result = '';
87
-
88
- $result .= $this->render_placeholder();
89
- $result .= $this->render_script();
90
-
91
- $result = apply_filters('ecwid_' . $this->get_shortcode_name() . '_shortcode_content', $result);
92
-
93
- if ($result) {
94
- return $this->wrap_code( $result );
95
- }
96
-
97
- return '';
98
- }
99
-
100
- public function build_params_string($params = null) {
101
-
102
- if (is_null($params)) {
103
- $params = $this->_params;
104
- }
105
-
106
- $pieces = array();
107
- if ( !empty ( $params ) ) {
108
- foreach ( $params as $key => $value ) {
109
- $pieces[] = "$key=$value";
110
- }
111
- }
112
-
113
- return '"' . implode('","', $pieces) . '"';
114
- }
115
  }
1
+ <?php
2
+ abstract class Ecwid_Shortcode_Base {
3
+
4
+ protected $_params = array();
5
+ protected $_lang;
6
+ protected $_should_render = true;
7
+ protected $_index;
8
+
9
+ static protected $shortcodes = array();
10
+
11
+ abstract public function get_shortcode_name();
12
+ abstract protected function _process_params( $shortcode_params = array() );
13
+ abstract public function get_ecwid_widget_function_name();
14
+
15
+ public function __construct( $params ) {
16
+
17
+ if (isset($params['lang']) && $params['lang']) {
18
+ $this->_lang = $params['lang'];
19
+ }
20
+ $this->_process_params( $params );
21
+
22
+ if (!isset(self::$shortcodes[$this->get_shortcode_name()])) {
23
+ self::$shortcodes[$this->get_shortcode_name()] = array();
24
+ }
25
+ $this->_index = count(self::$shortcodes[$this->get_shortcode_name()]);
26
+ self::$shortcodes[$this->get_shortcode_name()][] = $this;
27
+ }
28
+
29
+ public function wrap_code($code) {
30
+
31
+ $version = get_option('ecwid_plugin_version');
32
+
33
+ $shortcode_content = ecwid_get_scriptjs_code($this->_lang) . $code;
34
+
35
+ $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
36
+ . $shortcode_content
37
+ . "<!-- END Ecwid Shopping Cart v $version -->";
38
+
39
+ return apply_filters('ecwid_shortcode_content', $shortcode_content);
40
+ }
41
+
42
+ public function render() {
43
+ if (!$this->_should_render) return '';
44
+
45
+ $custom_renderer = apply_filters('ecwid_shortcode_custom_renderer', null, $this);
46
+ if (is_callable($custom_renderer)) {
47
+ return call_user_func( $custom_renderer, $this );
48
+ }
49
+
50
+ return self::_default_render();
51
+ }
52
+
53
+ public function render_script() {
54
+ $params_string = $this->build_params_string(
55
+ array_merge(
56
+ $this->_params,
57
+ array('id' => $this->get_html_id())
58
+ )
59
+ );
60
+
61
+ $function = $this->get_ecwid_widget_function_name();
62
+
63
+ return <<<HTML
64
+ <script data-cfasync="false" type="text/javascript"> $function($params_string);</script>
65
+ HTML;
66
+ }
67
+
68
+ public function render_placeholder() {
69
+
70
+ $classname = $this->_get_html_class_name();
71
+ $id = $this->get_html_id();
72
+ return <<<HTML
73
+ <div class="ecwid-shopping-cart-$classname" id="$id"></div>
74
+ HTML;
75
+ }
76
+
77
+ protected function _get_html_class_name() {
78
+ return $this->get_shortcode_name();
79
+ }
80
+
81
+ public function get_html_id() {
82
+ return 'ecwid-shopping-cart-' . $this->get_shortcode_name() . '-' . ( $this->_index + 1);
83
+ }
84
+
85
+ protected function _default_render() {
86
+ $result = '';
87
+
88
+ $result .= $this->render_placeholder();
89
+ $result .= $this->render_script();
90
+
91
+ $result = apply_filters('ecwid_' . $this->get_shortcode_name() . '_shortcode_content', $result);
92
+
93
+ if ($result) {
94
+ return $this->wrap_code( $result );
95
+ }
96
+
97
+ return '';
98
+ }
99
+
100
+ public function build_params_string($params = null) {
101
+
102
+ if (is_null($params)) {
103
+ $params = $this->_params;
104
+ }
105
+
106
+ $pieces = array();
107
+ if ( !empty ( $params ) ) {
108
+ foreach ( $params as $key => $value ) {
109
+ $pieces[] = "$key=$value";
110
+ }
111
+ }
112
+
113
+ return '"' . implode('","', $pieces) . '"';
114
+ }
115
  }
includes/shortcodes/class-ecwid-shortcode-categories.php CHANGED
@@ -1,30 +1,30 @@
1
- <?php
2
-
3
- require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
-
5
- class Ecwid_Shortcode_Categories extends Ecwid_Shortcode_Base {
6
-
7
- protected function _process_params( $params = array() ) {
8
- $this->_should_render = (isset($params['is_ecwid_shortcode']) && $params['is_ecwid_shortcode']) ? true : get_option('ecwid_show_categories');
9
- }
10
-
11
- public function get_shortcode_name() {
12
- return 'categories';
13
- }
14
-
15
- public function get_ecwid_widget_function_name() {
16
- if ( get_option('ecwid_use_new_horizontal_categories') ) {
17
- return 'xCategoriesV2';
18
- } else {
19
- return 'xCategories';
20
- }
21
- }
22
-
23
- public function render_placeholder() {
24
- $classname = $this->_get_html_class_name();
25
- $id = $this->get_html_id();
26
- return <<<HTML
27
- <div class="ecwid-shopping-cart-$classname"><div id="$id"></div></div>
28
- HTML;
29
- }
30
  }
1
+ <?php
2
+
3
+ require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
+
5
+ class Ecwid_Shortcode_Categories extends Ecwid_Shortcode_Base {
6
+
7
+ protected function _process_params( $params = array() ) {
8
+ $this->_should_render = (isset($params['is_ecwid_shortcode']) && $params['is_ecwid_shortcode']) ? true : get_option('ecwid_show_categories');
9
+ }
10
+
11
+ public function get_shortcode_name() {
12
+ return 'categories';
13
+ }
14
+
15
+ public function get_ecwid_widget_function_name() {
16
+ if ( get_option('ecwid_use_new_horizontal_categories') ) {
17
+ return 'xCategoriesV2';
18
+ } else {
19
+ return 'xCategories';
20
+ }
21
+ }
22
+
23
+ public function render_placeholder() {
24
+ $classname = $this->_get_html_class_name();
25
+ $id = $this->get_html_id();
26
+ return <<<HTML
27
+ <div class="ecwid-shopping-cart-$classname"><div id="$id"></div></div>
28
+ HTML;
29
+ }
30
  }
includes/shortcodes/class-ecwid-shortcode-minicart.php CHANGED
@@ -1,59 +1,59 @@
1
- <?php
2
-
3
- require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
-
5
- class Ecwid_Shortcode_Minicart extends Ecwid_Shortcode_Base {
6
-
7
- protected function _process_params( $shortcode_attributes = array() ) {
8
-
9
- $params = shortcode_atts(
10
- array(
11
- 'layout' => NULL,
12
- 'is_ecwid_shortcode' => FALSE,
13
- ), $shortcode_attributes
14
- );
15
-
16
- $layout = $params['layout'];
17
- if ( ! in_array( $layout, array(
18
- '',
19
- 'attachToCategories',
20
- 'floating',
21
- 'Mini',
22
- 'MiniAttachToProductBrowser'
23
- ), true )
24
- ) {
25
- $layout = 'MiniAttachToProductBrowser';
26
- }
27
-
28
- $this->_params = array(
29
- 'layout' => $layout
30
- );
31
-
32
- if ( $params['is_ecwid_shortcode'] ) {
33
- // it is a part of the ecwid shortcode, we need to show it anyways
34
- $ecwid_enable_minicart = $ecwid_show_categories = TRUE;
35
- } else {
36
- // it is a ecwid_minicart widget that works based on appearance settings
37
- $ecwid_enable_minicart = get_option( 'ecwid_enable_minicart' );
38
- $ecwid_show_categories = get_option( 'ecwid_show_categories' );
39
- }
40
-
41
- $this->_should_render = ! empty( $ecwid_enable_minicart ) && ! empty( $ecwid_show_categories );
42
- }
43
-
44
- public function get_shortcode_name() {
45
- return 'minicart';
46
- }
47
-
48
- public function get_ecwid_widget_function_name() {
49
- return 'xMinicart';
50
- }
51
-
52
- public function build_params_string($params = null) {
53
- if (!is_null($params) && array_key_exists('id', $params) && isset($params['layout']) && $params['layout'] == 'MiniAttachToProductBrowser') {
54
- unset($params['id']);
55
- }
56
-
57
- return parent::build_params_string($params);
58
- }
59
  }
1
+ <?php
2
+
3
+ require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
+
5
+ class Ecwid_Shortcode_Minicart extends Ecwid_Shortcode_Base {
6
+
7
+ protected function _process_params( $shortcode_attributes = array() ) {
8
+
9
+ $params = shortcode_atts(
10
+ array(
11
+ 'layout' => NULL,
12
+ 'is_ecwid_shortcode' => FALSE,
13
+ ), $shortcode_attributes
14
+ );
15
+
16
+ $layout = $params['layout'];
17
+ if ( ! in_array( $layout, array(
18
+ '',
19
+ 'attachToCategories',
20
+ 'floating',
21
+ 'Mini',
22
+ 'MiniAttachToProductBrowser'
23
+ ), true )
24
+ ) {
25
+ $layout = 'MiniAttachToProductBrowser';
26
+ }
27
+
28
+ $this->_params = array(
29
+ 'layout' => $layout
30
+ );
31
+
32
+ if ( $params['is_ecwid_shortcode'] ) {
33
+ // it is a part of the ecwid shortcode, we need to show it anyways
34
+ $ecwid_enable_minicart = $ecwid_show_categories = TRUE;
35
+ } else {
36
+ // it is a ecwid_minicart widget that works based on appearance settings
37
+ $ecwid_enable_minicart = get_option( 'ecwid_enable_minicart' );
38
+ $ecwid_show_categories = get_option( 'ecwid_show_categories' );
39
+ }
40
+
41
+ $this->_should_render = ! empty( $ecwid_enable_minicart ) && ! empty( $ecwid_show_categories );
42
+ }
43
+
44
+ public function get_shortcode_name() {
45
+ return 'minicart';
46
+ }
47
+
48
+ public function get_ecwid_widget_function_name() {
49
+ return 'xMinicart';
50
+ }
51
+
52
+ public function build_params_string($params = null) {
53
+ if (!is_null($params) && array_key_exists('id', $params) && isset($params['layout']) && $params['layout'] == 'MiniAttachToProductBrowser') {
54
+ unset($params['id']);
55
+ }
56
+
57
+ return parent::build_params_string($params);
58
+ }
59
  }
includes/shortcodes/class-ecwid-shortcode-product.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
+
5
+ class Ecwid_Shortcode_Product extends Ecwid_Shortcode_Base {
6
+
7
+ protected $_version;
8
+ public function get_shortcode_name() {
9
+ return 'product';
10
+ }
11
+
12
+ protected function _process_params( $shortcode_params = array() ) {
13
+ $attributes = shortcode_atts(
14
+ array(
15
+ 'id' => null,
16
+ 'display' => 'picture title price options addtobag',
17
+ 'link' => 'yes',
18
+ 'version' => '1',
19
+ 'show_border' => '1',
20
+ 'show_price_on_button' => '1',
21
+ 'center_align' => '0'
22
+ ),
23
+ $shortcode_params
24
+ );
25
+
26
+ $id = $attributes['id'];
27
+
28
+ if (is_null($id) || !is_numeric($id) || $id <= 0) {
29
+ $this->_should_render = false;
30
+ return;
31
+ }
32
+
33
+
34
+ if ($attributes['link'] == 'yes' && !ecwid_is_store_page_available()) {
35
+ $attributes['link'] = 'no';
36
+ }
37
+
38
+
39
+ $version = $attributes['version'];
40
+ if (!in_array($version, array('1', '2'))) {
41
+ $attributes['version'] = 1;
42
+ }
43
+
44
+ $this->params = $attributes;
45
+ }
46
+
47
+ public function render_placeholder() {
48
+ $widget_parts = array();
49
+
50
+ if ($this->params['version'] == 1) {
51
+ $widget_parts = $this->_get_widget_parts_v1();
52
+ } else if ($this->params['version'] == 2) {
53
+ $widget_parts = $this->_get_widget_parts_v2();
54
+ }
55
+
56
+ $display_items = $widget_parts['display_items'];
57
+
58
+ $result = $widget_parts['opening_div'];
59
+
60
+ $items = preg_split('![^0-9^a-z^A-Z^\-^_]!', $this->params['display']);
61
+
62
+ if (is_array($items) && count($items) > 0) foreach ($items as $item) {
63
+ if (array_key_exists($item, $display_items)) {
64
+ if ($this->params['link'] == 'yes' && in_array($item, array('title', 'picture'))) {
65
+ $product_link = ecwid_get_store_page_url() . '#!/~/product/id=' . $this->params['id'];
66
+ $result .= '<a href="' . esc_url($product_link) . '">' . $display_items[$item] . '</a>';
67
+ } else {
68
+ $result .= $display_items[$item];
69
+ }
70
+ }
71
+ }
72
+
73
+ $result .= '</div>';
74
+
75
+ update_option('ecwid_single_product_used', time());
76
+
77
+ return $result;
78
+ }
79
+
80
+ public function get_ecwid_widget_function_name() {
81
+ return $this->params['version'] == 1 ? 'xSingleProduct' : 'xProduct';
82
+ }
83
+
84
+ protected function _get_widget_parts_v1() {
85
+ return array(
86
+ 'display_items' => array(
87
+ 'picture' => '<div itemprop="picture"></div>',
88
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
89
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
90
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
91
+ . '</div>',
92
+ 'options' => '<div itemprop="options"></div>',
93
+ 'qty' => '<div itemprop="qty"></div>',
94
+ 'addtobag' => '<div itemprop="addtobag"></div>'
95
+ ),
96
+ 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
97
+ . 'itemscope itemtype="http://schema.org/Product" '
98
+ . 'data-single-product-id="%d" id="%s">', $this->params['id'], $this->params['id'], $this->get_html_id())
99
+ );
100
+ }
101
+
102
+ protected function _get_widget_parts_v2() {
103
+ $price_location_attributes = ' data-spw-price-location="button"';
104
+
105
+ $main_div_classes = array(
106
+ 'ecwid',
107
+ 'ecwid-SingleProduct-v2',
108
+ 'ecwid-Product',
109
+ 'ecwid-Product-' . $this->params['id']
110
+ );
111
+
112
+ if ($this->params['show_border'] != 0) { // defaults to 1
113
+ $bordered_class = '';
114
+ $main_div_classes[] = 'ecwid-SingleProduct-v2-bordered';
115
+ }
116
+
117
+ if ($this->params['center_align'] == 1) { // defaults to 0
118
+ $main_div_classes[] = 'ecwid-SingleProduct-v2-centered';
119
+ }
120
+
121
+ $main_div_class = implode( ' ', $main_div_classes );
122
+
123
+ if ($this->params['show_price_on_button'] == 0) { // defaults to 1
124
+ $price_location_attributes = '';
125
+ }
126
+
127
+ return array(
128
+ 'display_items' => array(
129
+ 'picture' => '<div itemprop="picture"></div>',
130
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
131
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
132
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"' . $price_location_attributes . '>'
133
+ . '<div itemprop="priceCurrency"></div>'
134
+ . '</div>'
135
+ . '</div>',
136
+ 'options' => '<div customprop="options"></div>',
137
+ 'qty' => '<div customprop="qty"></div>',
138
+ 'addtobag' => '<div customprop="addtobag"></div>'
139
+ ),
140
+ 'opening_div' => sprintf('<div class="' . $main_div_class . '" '
141
+ . 'itemscope itemtype="http://schema.org/Product" data-single-product-id="%d" id="%s">',
142
+ $this->params['id'],
143
+ $this->get_html_id()
144
+ )
145
+ );
146
+ }
147
+
148
+
149
+ public function build_params_string($params = null) {
150
+ if ( !is_null( $params ) && array_key_exists( 'id', $params ) ) {
151
+ unset( $params['id'] );
152
+ }
153
+
154
+ return parent::build_params_string( $params );
155
+ }
156
+ }
includes/shortcodes/class-ecwid-shortcode-productbrowser.php CHANGED
@@ -1,165 +1,165 @@
1
- <?php
2
-
3
- require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
-
5
- class Ecwid_Shortcode_ProductBrowser extends Ecwid_Shortcode_Base {
6
-
7
- public function get_shortcode_name() {
8
- return 'productbrowser';
9
- }
10
-
11
- protected function _get_html_class_name() {
12
- return 'product-browser';
13
- }
14
-
15
- public function get_html_id() {
16
- return 'ecwid-store-' . get_ecwid_store_id();
17
- }
18
-
19
- public function get_ecwid_widget_function_name() {
20
- return 'xProductBrowser';
21
- }
22
-
23
- public function render() {
24
- return parent::render();
25
- }
26
-
27
- public function render_placeholder( ) {
28
-
29
- $store_id = get_ecwid_store_id();
30
-
31
- $plain_content = '';
32
-
33
- if (ecwid_can_display_html_catalog()) {
34
- $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
35
- include_once ECWID_PLUGIN_DIR . 'lib/ecwid_product_api.php';
36
- include_once ECWID_PLUGIN_DIR . 'lib/ecwid_catalog.php';
37
-
38
- $page_url = get_page_link();
39
-
40
- $catalog = new EcwidCatalog($store_id, $page_url);
41
-
42
- $url = false;
43
-
44
- if (isset($params['mode']) && !empty($params['mode'])) {
45
- if ($params['mode'] == 'product') {
46
- $plain_content = $catalog->get_product($params['id']);
47
- $url = ecwid_get_product_url(ecwid_new_product_api()->get_product($params['id']));
48
- } elseif ($params['mode'] == 'category') {
49
- $plain_content = $catalog->get_category($params['id']);
50
- $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
51
- }
52
-
53
- } else {
54
- $id = intval($this->_get_param_default_category_id($params));
55
- $plain_content = $catalog->get_category($id);
56
- if (empty($plain_content)) {
57
- $plain_content = $catalog->get_category(0);
58
- } else {
59
- $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
60
- }
61
- }
62
-
63
- if ($url) {
64
- $parsed = parse_url($url);
65
- $plain_content .= '<script data-cfasync="false" type="text/javascript"> if (!document.location.hash) document.location.hash = "'. $parsed['fragment'] . '";</script>';
66
- }
67
- }
68
-
69
- $classname = $this->_get_html_class_name();
70
- $result = <<<HTML
71
- <div id="ecwid-store-$store_id" class="ecwid-shopping-cart-$classname">
72
- {$plain_content}
73
- </div>
74
- HTML;
75
-
76
- return $result;
77
- }
78
-
79
- protected function _process_params( $shortcode_params = array() ) {
80
-
81
- $atts = shortcode_atts(
82
- array(
83
- 'categories_per_row' => false,
84
- 'grid' => false,
85
- 'list' => false,
86
- 'table' => false,
87
- 'search_view' => false,
88
- 'category_view' => false
89
- ), $shortcode_params
90
- );
91
-
92
- $grid = explode(',', $atts['grid']);
93
- if (count($grid) == 2) {
94
- $atts['grid_rows'] = intval($grid[0]);
95
- $atts['grid_cols'] = intval($grid[1]);
96
- } else {
97
- list($atts['grid_rows'], $atts['grid_cols']) = array(false, false);
98
- }
99
-
100
- $list_of_views = array('list','grid','table');
101
-
102
- $cats_per_row = $atts['categories_per_row'] ? $atts['categories_per_row'] : get_option('ecwid_pb_categoriesperrow');
103
- $products_per_column_in_grid = $atts['grid_rows'] ? $atts['grid_rows'] : get_option('ecwid_pb_productspercolumn_grid');
104
- $products_per_row_in_grid = $atts['grid_cols'] ? $atts['grid_cols'] : get_option('ecwid_pb_productsperrow_grid');
105
- $products_in_list = $atts['list'] ? $atts['list'] : get_option('ecwid_pb_productsperpage_list');
106
- $products_in_table = $atts['table'] ? $atts['table'] : get_option('ecwid_pb_productsperpage_table');
107
- $default_view = $atts['category_view'] ? $atts['category_view'] : get_option('ecwid_pb_defaultview');
108
- $search_view = $atts['search_view'] ? $atts['search_view'] : get_option('ecwid_pb_searchview');
109
-
110
- $ecwid_default_category_id = $this->_get_param_default_category_id( $shortcode_params );
111
-
112
- $store_id = get_ecwid_store_id();
113
-
114
- if (empty($cats_per_row)) {
115
- $cats_per_row = 3;
116
- }
117
- if (empty($products_per_column_in_grid)) {
118
- $products_per_column_in_grid = 3;
119
- }
120
- if (empty($products_per_row_in_grid)) {
121
- $products_per_row_in_grid = 3;
122
- }
123
- if (empty($products_in_list)) {
124
- $products_in_list = 10;
125
- }
126
- if (empty($products_in_table)) {
127
- $products_in_table = 20;
128
- }
129
-
130
- if (empty($default_view) || !in_array($default_view, $list_of_views)) {
131
- $default_view = 'grid';
132
- }
133
- if (empty($search_view) || !in_array($search_view, $list_of_views)) {
134
- $search_view = 'list';
135
- }
136
-
137
- $input_params = array(
138
- 'categoriesPerRow' => $cats_per_row,
139
- 'views' => "grid($products_per_column_in_grid,$products_per_row_in_grid) list($products_in_list) table($products_in_table)",
140
- 'categoryView' => $default_view,
141
- 'searchView' => $search_view,
142
- 'id' => "ecwid-store-$store_id"
143
- );
144
-
145
- if ($ecwid_default_category_id) {
146
- $input_params['defaultCategoryId'] = $ecwid_default_category_id;
147
- }
148
-
149
- $this->_params = $input_params;
150
- }
151
-
152
- /**
153
- * @param $shortcode_params
154
- *
155
- * @return mixed|void
156
- */
157
- protected function _get_param_default_category_id( $shortcode_params ) {
158
- $ecwid_default_category_id =
159
- ! empty( $shortcode_params ) && array_key_exists( 'default_category_id', $shortcode_params )
160
- ? $shortcode_params['default_category_id']
161
- : get_option( 'ecwid_default_category_id' );
162
-
163
- return $ecwid_default_category_id;
164
- }
165
  }
1
+ <?php
2
+
3
+ require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
+
5
+ class Ecwid_Shortcode_ProductBrowser extends Ecwid_Shortcode_Base {
6
+
7
+ public function get_shortcode_name() {
8
+ return 'productbrowser';
9
+ }
10
+
11
+ protected function _get_html_class_name() {
12
+ return 'product-browser';
13
+ }
14
+
15
+ public function get_html_id() {
16
+ return 'ecwid-store-' . get_ecwid_store_id();
17
+ }
18
+
19
+ public function get_ecwid_widget_function_name() {
20
+ return 'xProductBrowser';
21
+ }
22
+
23
+ public function render() {
24
+ return parent::render();
25
+ }
26
+
27
+ public function render_placeholder( ) {
28
+
29
+ $store_id = get_ecwid_store_id();
30
+
31
+ $plain_content = '';
32
+
33
+ if (ecwid_can_display_html_catalog()) {
34
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
35
+ include_once ECWID_PLUGIN_DIR . 'lib/ecwid_product_api.php';
36
+ include_once ECWID_PLUGIN_DIR . 'lib/ecwid_catalog.php';
37
+
38
+ $page_url = get_page_link();
39
+
40
+ $catalog = new EcwidCatalog($store_id, $page_url);
41
+
42
+ $url = false;
43
+
44
+ if (isset($params['mode']) && !empty($params['mode'])) {
45
+ if ($params['mode'] == 'product') {
46
+ $plain_content = $catalog->get_product($params['id']);
47
+ $url = ecwid_get_product_url(ecwid_new_product_api()->get_product($params['id']));
48
+ } elseif ($params['mode'] == 'category') {
49
+ $plain_content = $catalog->get_category($params['id']);
50
+ $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
51
+ }
52
+
53
+ } else {
54
+ $id = intval($this->_get_param_default_category_id($params));
55
+ $plain_content = $catalog->get_category($id);
56
+ if (empty($plain_content)) {
57
+ $plain_content = $catalog->get_category(0);
58
+ } else {
59
+ $url = ecwid_get_category_url(ecwid_new_product_api()->get_category($params['id']));
60
+ }
61
+ }
62
+
63
+ if ($url) {
64
+ $parsed = parse_url($url);
65
+ $plain_content .= '<script data-cfasync="false" type="text/javascript"> if (!document.location.hash) document.location.hash = "'. $parsed['fragment'] . '";</script>';
66
+ }
67
+ }
68
+
69
+ $classname = $this->_get_html_class_name();
70
+ $result = <<<HTML
71
+ <div id="ecwid-store-$store_id" class="ecwid-shopping-cart-$classname">
72
+ {$plain_content}
73
+ </div>
74
+ HTML;
75
+
76
+ return $result;
77
+ }
78
+
79
+ protected function _process_params( $shortcode_params = array() ) {
80
+
81
+ $atts = shortcode_atts(
82
+ array(
83
+ 'categories_per_row' => false,
84
+ 'grid' => false,
85
+ 'list' => false,
86
+ 'table' => false,
87
+ 'search_view' => false,
88
+ 'category_view' => false
89
+ ), $shortcode_params
90
+ );
91
+
92
+ $grid = explode(',', $atts['grid']);
93
+ if (count($grid) == 2) {
94
+ $atts['grid_rows'] = intval($grid[0]);
95
+ $atts['grid_cols'] = intval($grid[1]);
96
+ } else {
97
+ list($atts['grid_rows'], $atts['grid_cols']) = array(false, false);
98
+ }
99
+
100
+ $list_of_views = array('list','grid','table');
101
+
102
+ $cats_per_row = $atts['categories_per_row'] ? $atts['categories_per_row'] : get_option('ecwid_pb_categoriesperrow');
103
+ $products_per_column_in_grid = $atts['grid_rows'] ? $atts['grid_rows'] : get_option('ecwid_pb_productspercolumn_grid');
104
+ $products_per_row_in_grid = $atts['grid_cols'] ? $atts['grid_cols'] : get_option('ecwid_pb_productsperrow_grid');
105
+ $products_in_list = $atts['list'] ? $atts['list'] : get_option('ecwid_pb_productsperpage_list');
106
+ $products_in_table = $atts['table'] ? $atts['table'] : get_option('ecwid_pb_productsperpage_table');
107
+ $default_view = $atts['category_view'] ? $atts['category_view'] : get_option('ecwid_pb_defaultview');
108
+ $search_view = $atts['search_view'] ? $atts['search_view'] : get_option('ecwid_pb_searchview');
109
+
110
+ $ecwid_default_category_id = $this->_get_param_default_category_id( $shortcode_params );
111
+
112
+ $store_id = get_ecwid_store_id();
113
+
114
+ if (empty($cats_per_row)) {
115
+ $cats_per_row = 3;
116
+ }
117
+ if (empty($products_per_column_in_grid)) {
118
+ $products_per_column_in_grid = 3;
119
+ }
120
+ if (empty($products_per_row_in_grid)) {
121
+ $products_per_row_in_grid = 3;
122
+ }
123
+ if (empty($products_in_list)) {
124
+ $products_in_list = 10;
125
+ }
126
+ if (empty($products_in_table)) {
127
+ $products_in_table = 20;
128
+ }
129
+
130
+ if (empty($default_view) || !in_array($default_view, $list_of_views)) {
131
+ $default_view = 'grid';
132
+ }
133
+ if (empty($search_view) || !in_array($search_view, $list_of_views)) {
134
+ $search_view = 'list';
135
+ }
136
+
137
+ $input_params = array(
138
+ 'categoriesPerRow' => $cats_per_row,
139
+ 'views' => "grid($products_per_column_in_grid,$products_per_row_in_grid) list($products_in_list) table($products_in_table)",
140
+ 'categoryView' => $default_view,
141
+ 'searchView' => $search_view,
142
+ 'id' => "ecwid-store-$store_id"
143
+ );
144
+
145
+ if ($ecwid_default_category_id) {
146
+ $input_params['defaultCategoryId'] = $ecwid_default_category_id;
147
+ }
148
+
149
+ $this->_params = $input_params;
150
+ }
151
+
152
+ /**
153
+ * @param $shortcode_params
154
+ *
155
+ * @return mixed|void
156
+ */
157
+ protected function _get_param_default_category_id( $shortcode_params ) {
158
+ $ecwid_default_category_id =
159
+ ! empty( $shortcode_params ) && array_key_exists( 'default_category_id', $shortcode_params )
160
+ ? $shortcode_params['default_category_id']
161
+ : get_option( 'ecwid_default_category_id' );
162
+
163
+ return $ecwid_default_category_id;
164
+ }
165
  }
includes/shortcodes/class-ecwid-shortcode-search.php CHANGED
@@ -1,22 +1,22 @@
1
- <?php
2
-
3
- require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
-
5
- class Ecwid_Shortcode_Search extends Ecwid_Shortcode_Base {
6
-
7
- protected function _process_params( $params = array() ) {
8
- $this->_should_render = (isset($params['is_ecwid_shortcode']) && $params['is_ecwid_shortcode']) ? true : get_option('ecwid_show_search_box');
9
- }
10
-
11
- public function get_shortcode_name() {
12
- return 'search';
13
- }
14
-
15
- public function get_ecwid_widget_function_name() {
16
- if (get_option('ecwid_use_new_search', false)) {
17
- return 'xSearch';
18
- } else {
19
- return 'xSearchPanel';
20
- }
21
- }
22
  }
1
+ <?php
2
+
3
+ require_once ECWID_SHORTCODES_DIR . '/class-ecwid-shortcode-base.php';
4
+
5
+ class Ecwid_Shortcode_Search extends Ecwid_Shortcode_Base {
6
+
7
+ protected function _process_params( $params = array() ) {
8
+ $this->_should_render = (isset($params['is_ecwid_shortcode']) && $params['is_ecwid_shortcode']) ? true : get_option('ecwid_show_search_box');
9
+ }
10
+
11
+ public function get_shortcode_name() {
12
+ return 'search';
13
+ }
14
+
15
+ public function get_ecwid_widget_function_name() {
16
+ if (get_option('ecwid_use_new_search', false)) {
17
+ return 'xSearch';
18
+ } else {
19
+ return 'xSearchPanel';
20
+ }
21
+ }
22
  }
includes/themes.php CHANGED
@@ -1,100 +1,100 @@
1
- <?php
2
-
3
- define( 'ECWID_THEMES_DIR', ECWID_PLUGIN_DIR . 'includes/themes' );
4
-
5
- add_action('after_switch_theme', 'ecwid_after_switch_theme');
6
-
7
- require ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
8
-
9
-
10
- function ecwid_get_theme_name()
11
- {
12
- $version = get_bloginfo('version');
13
-
14
- if (version_compare( $version, '3.4' ) < 0) {
15
- $theme_name = get_current_theme();
16
- } else {
17
- $theme = wp_get_theme();
18
- $theme_name = $theme->Name;
19
- }
20
-
21
- return $theme_name;
22
- }
23
-
24
- function ecwid_get_theme_identification()
25
- {
26
- $version = get_bloginfo('version');
27
-
28
- if (version_compare( $version, '3.4' ) < 0) {
29
- $theme_name = get_template();
30
- } else {
31
- $theme = wp_get_theme();
32
- $theme_name = $theme->template;
33
- }
34
-
35
- return $theme_name;
36
- }
37
-
38
- function ecwid_apply_theme($theme_name = null)
39
- {
40
- $generic_themes = array(
41
- 'pixova-lite' => array( 'js', 'scroll' ),
42
- 'accesspress-mag' => array( 'css' ),
43
- 'attitude' => array( 'css-no-parent' ),
44
- 'customizr' => array( 'js', 'css' ),
45
- 'edin' => array( 'js' ),
46
- 'evolve' => array( 'css-no-parent' ),
47
- 'mantra' => array( 'css-no-parent' ),
48
- 'pagelines' => array( 'js', 'scroll' ),
49
- 'responsiveboat' => array( 'css' ),
50
- 'twentyfourteen' => array( 'css', 'scroll' ),
51
- 'twentytwelve' => array( 'js', 'scroll' ),
52
- 'sliding-door' => array( 'css-no-parent' ),
53
- 'zerif-lite' => array( 'css-no-parent' ),
54
- 'storefront' => array( 'css' ),
55
- 'salient' => array( 'css-no-parent'),
56
- 'flora' => array('js'),
57
- );
58
- $generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
59
-
60
- $custom_themes = array(
61
- 'bretheon',
62
- 'responsive',
63
- 'envision',
64
- 'twentyfifteen',
65
- 'genesis',
66
- 'twentysixteen',
67
- 'central',
68
- 'mfupdate',
69
- 'trend',
70
- 'Boundless',
71
- 'twentyseventeen'
72
- );
73
-
74
- $custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
75
-
76
- if (empty($theme_name)) {
77
- $theme_name = ecwid_get_theme_identification();
78
- }
79
-
80
- $theme_file = '';
81
-
82
- if (function_exists('wp_get_theme') && wp_get_theme()->Name == 'ResponsiveBoat') {
83
- $theme_name = 'responsiveboat';
84
- }
85
-
86
- if ( in_array($theme_name, $custom_themes) ) {
87
- $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
88
- $theme_file = apply_filters( 'ecwid_get_theme_file', $theme_file );
89
- if ( !empty( $theme_file ) && is_file( $theme_file ) && is_readable( $theme_file ) ) {
90
- require_once( $theme_file );
91
- }
92
- } else if ( array_key_exists( $theme_name, $generic_themes ) ) {
93
- Ecwid_Theme_Base::create( $theme_name, $generic_themes[$theme_name] );
94
- }
95
- }
96
-
97
- function ecwid_after_switch_theme()
98
- {
99
- ecwid_apply_theme();
100
  }
1
+ <?php
2
+
3
+ define( 'ECWID_THEMES_DIR', ECWID_PLUGIN_DIR . 'includes/themes' );
4
+
5
+ add_action('after_switch_theme', 'ecwid_after_switch_theme');
6
+
7
+ require ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
8
+
9
+
10
+ function ecwid_get_theme_name()
11
+ {
12
+ $version = get_bloginfo('version');
13
+
14
+ if (version_compare( $version, '3.4' ) < 0) {
15
+ $theme_name = get_current_theme();
16
+ } else {
17
+ $theme = wp_get_theme();
18
+ $theme_name = $theme->Name;
19
+ }
20
+
21
+ return $theme_name;
22
+ }
23
+
24
+ function ecwid_get_theme_identification()
25
+ {
26
+ $version = get_bloginfo('version');
27
+
28
+ if (version_compare( $version, '3.4' ) < 0) {
29
+ $theme_name = get_template();
30
+ } else {
31
+ $theme = wp_get_theme();
32
+ $theme_name = $theme->template;
33
+ }
34
+
35
+ return $theme_name;
36
+ }
37
+
38
+ function ecwid_apply_theme($theme_name = null)
39
+ {
40
+ $generic_themes = array(
41
+ 'pixova-lite' => array( 'js', 'scroll' ),
42
+ 'accesspress-mag' => array( 'css' ),
43
+ 'attitude' => array( 'css-no-parent' ),
44
+ 'customizr' => array( 'js', 'css' ),
45
+ 'edin' => array( 'js' ),
46
+ 'evolve' => array( 'css-no-parent' ),
47
+ 'mantra' => array( 'css-no-parent' ),
48
+ 'pagelines' => array( 'js', 'scroll' ),
49
+ 'responsiveboat' => array( 'css' ),
50
+ 'twentyfourteen' => array( 'css', 'scroll' ),
51
+ 'twentytwelve' => array( 'js', 'scroll' ),
52
+ 'sliding-door' => array( 'css-no-parent' ),
53
+ 'zerif-lite' => array( 'css-no-parent' ),
54
+ 'storefront' => array( 'css' ),
55
+ 'salient' => array( 'css-no-parent'),
56
+ 'flora' => array('js'),
57
+ );
58
+ $generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
59
+
60
+ $custom_themes = array(
61
+ 'bretheon',
62
+ 'responsive',
63
+ 'envision',
64
+ 'twentyfifteen',
65
+ 'genesis',
66
+ 'twentysixteen',
67
+ 'central',
68
+ 'mfupdate',
69
+ 'trend',
70
+ 'Boundless',
71
+ 'twentyseventeen'
72
+ );
73
+
74
+ $custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
75
+
76
+ if (empty($theme_name)) {
77
+ $theme_name = ecwid_get_theme_identification();
78
+ }
79
+
80
+ $theme_file = '';
81
+
82
+ if (function_exists('wp_get_theme') && wp_get_theme()->Name == 'ResponsiveBoat') {
83
+ $theme_name = 'responsiveboat';
84
+ }
85
+
86
+ if ( in_array($theme_name, $custom_themes) ) {
87
+ $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
88
+ $theme_file = apply_filters( 'ecwid_get_theme_file', $theme_file );
89
+ if ( !empty( $theme_file ) && is_file( $theme_file ) && is_readable( $theme_file ) ) {
90
+ require_once( $theme_file );
91
+ }
92
+ } else if ( array_key_exists( $theme_name, $generic_themes ) ) {
93
+ Ecwid_Theme_Base::create( $theme_name, $generic_themes[$theme_name] );
94
+ }
95
+ }
96
+
97
+ function ecwid_after_switch_theme()
98
+ {
99
+ ecwid_apply_theme();
100
  }
includes/themes/class-ecwid-theme-base.php CHANGED
@@ -1,81 +1,81 @@
1
- <?php
2
-
3
- class Ecwid_Theme_Base {
4
-
5
- public $has_advanced_layout = false;
6
-
7
- protected $adjust_pb_scroll = false;
8
-
9
- protected $name;
10
-
11
- protected $has_js = false;
12
- protected $has_css = false;
13
- protected $css_parent = false;
14
-
15
- public function __construct()
16
- {
17
- }
18
-
19
- public static function create($name, $props) {
20
-
21
- $theme = new Ecwid_Theme_Base();
22
- $theme->name = $name;
23
-
24
- if (is_admin()) return;
25
-
26
- if ( in_array( 'scroll', $props ) ) {
27
- $theme->create_scroller();
28
- }
29
-
30
- if ( in_array( 'js', $props ) ) {
31
- $theme->add_js();
32
- }
33
-
34
- if ( in_array( 'css', $props ) ) {
35
- $theme->add_css();
36
- }
37
-
38
- if ( in_array( 'css-no-parent', $props ) ) {
39
- $theme->add_css( '' );
40
- }
41
-
42
- return $theme;
43
- }
44
-
45
- protected function add_js() {
46
- wp_enqueue_script(
47
- 'ecwid-theme-js',
48
- ECWID_PLUGIN_URL . 'js/themes/' . $this->name . '.js',
49
- array( 'jquery' ),
50
- get_option('ecwid_plugin_version')
51
- );
52
- }
53
-
54
- protected function create_scroller() {
55
- wp_enqueue_script(
56
- 'ecwid-scroller',
57
- ECWID_PLUGIN_URL . 'js/create_scroller.js' ,
58
- array( 'jquery' ),
59
- get_option('ecwid_plugin_version')
60
- );
61
- }
62
-
63
- protected function add_css( $parent = null ) {
64
-
65
- if (is_null($parent)) {
66
- $parent = array( $this->name . '-style' );
67
- } else if (empty($parent)) {
68
- $parent = array();
69
- } else {
70
- $parent = array( $parent );
71
- }
72
-
73
- wp_enqueue_style(
74
- 'ecwid-theme-css',
75
- ECWID_PLUGIN_URL . 'css/themes/' . $this->name . '.css',
76
- $parent,
77
- get_option('ecwid_plugin_version')
78
- );
79
- }
80
-
81
  }
1
+ <?php
2
+
3
+ class Ecwid_Theme_Base {
4
+
5
+ public $has_advanced_layout = false;
6
+
7
+ protected $adjust_pb_scroll = false;
8
+
9
+ protected $name;
10
+
11
+ protected $has_js = false;
12
+ protected $has_css = false;
13
+ protected $css_parent = false;
14
+
15
+ public function __construct()
16
+ {
17
+ }
18
+
19
+ public static function create($name, $props) {
20
+
21
+ $theme = new Ecwid_Theme_Base();
22
+ $theme->name = $name;
23
+
24
+ if (is_admin()) return;
25
+
26
+ if ( in_array( 'scroll', $props ) ) {
27
+ $theme->create_scroller();
28
+ }
29
+
30
+ if ( in_array( 'js', $props ) ) {
31
+ $theme->add_js();
32
+ }
33
+
34
+ if ( in_array( 'css', $props ) ) {
35
+ $theme->add_css();
36
+ }
37
+
38
+ if ( in_array( 'css-no-parent', $props ) ) {
39
+ $theme->add_css( '' );
40
+ }
41
+
42
+ return $theme;
43
+ }
44
+
45
+ protected function add_js() {
46
+ wp_enqueue_script(
47
+ 'ecwid-theme-js',
48
+ ECWID_PLUGIN_URL . 'js/themes/' . $this->name . '.js',
49
+ array( 'jquery' ),
50
+ get_option('ecwid_plugin_version')
51
+ );
52
+ }
53
+
54
+ protected function create_scroller() {
55
+ wp_enqueue_script(
56
+ 'ecwid-scroller',
57
+ ECWID_PLUGIN_URL . 'js/create_scroller.js' ,
58
+ array( 'jquery' ),
59
+ get_option('ecwid_plugin_version')
60
+ );
61
+ }
62
+
63
+ protected function add_css( $parent = null ) {
64
+
65
+ if (is_null($parent)) {
66
+ $parent = array( $this->name . '-style' );
67
+ } else if (empty($parent)) {
68
+ $parent = array();
69
+ } else {
70
+ $parent = array( $parent );
71
+ }
72
+
73
+ wp_enqueue_style(
74
+ 'ecwid-theme-css',
75
+ ECWID_PLUGIN_URL . 'css/themes/' . $this->name . '.css',
76
+ $parent,
77
+ get_option('ecwid_plugin_version')
78
+ );
79
+ }
80
+
81
  }
includes/themes/class-ecwid-theme-boundless.php CHANGED
@@ -1,37 +1,37 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Boundless extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Boundless';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
- }
15
-
16
- public function has_product_browser( $value )
17
- {
18
- if ( $value ) {
19
- return $value;
20
- }
21
-
22
- $meta = get_post_meta( get_the_ID(), '_witty_builder_data' );
23
-
24
- if ( is_array( $meta ) ) {
25
- $meta = serialize( $meta );
26
-
27
- // not exactly the intended usage, but quite simple and still works
28
- // $meta is a serialized array that has the actual content
29
- // a right way is to walk through the structure and run has_shortcode against all fields
30
- $result = ecwid_content_has_productbrowser($meta);
31
- }
32
-
33
- return $result;
34
- }
35
- }
36
-
37
  $ecwid_current_theme = new Ecwid_Theme_Boundless();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Boundless extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Boundless';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
+ }
15
+
16
+ public function has_product_browser( $value )
17
+ {
18
+ if ( $value ) {
19
+ return $value;
20
+ }
21
+
22
+ $meta = get_post_meta( get_the_ID(), '_witty_builder_data' );
23
+
24
+ if ( is_array( $meta ) ) {
25
+ $meta = serialize( $meta );
26
+
27
+ // not exactly the intended usage, but quite simple and still works
28
+ // $meta is a serialized array that has the actual content
29
+ // a right way is to walk through the structure and run has_shortcode against all fields
30
+ $result = ecwid_content_has_productbrowser($meta);
31
+ }
32
+
33
+ return $result;
34
+ }
35
+ }
36
+
37
  $ecwid_current_theme = new Ecwid_Theme_Boundless();
includes/themes/class-ecwid-theme-bretheon.php CHANGED
@@ -1,36 +1,36 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Bretheon extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Bretheon';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
- }
15
-
16
- public function has_product_browser( $value )
17
- {
18
- if ( $value ) {
19
- return $value;
20
- }
21
-
22
- $meta = get_post_meta( get_the_ID(), 'mfn-page-items' );
23
- if ( is_array( $meta ) ) {
24
- $meta = base64_decode( $meta[0] );
25
-
26
- // not exactly the intended usage, but quite simple and still works
27
- // $meta is a serialized array that has the actual content
28
- // a right way is to walk through the structure and run has_shortcode against all fields
29
- $result = ecwid_content_has_productbrowser($meta);
30
- }
31
-
32
- return $result;
33
- }
34
- }
35
-
36
  $ecwid_current_theme = new Ecwid_Theme_Bretheon();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Bretheon extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Bretheon';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
+ }
15
+
16
+ public function has_product_browser( $value )
17
+ {
18
+ if ( $value ) {
19
+ return $value;
20
+ }
21
+
22
+ $meta = get_post_meta( get_the_ID(), 'mfn-page-items' );
23
+ if ( is_array( $meta ) ) {
24
+ $meta = base64_decode( $meta[0] );
25
+
26
+ // not exactly the intended usage, but quite simple and still works
27
+ // $meta is a serialized array that has the actual content
28
+ // a right way is to walk through the structure and run has_shortcode against all fields
29
+ $result = ecwid_content_has_productbrowser($meta);
30
+ }
31
+
32
+ return $result;
33
+ }
34
+ }
35
+
36
  $ecwid_current_theme = new Ecwid_Theme_Bretheon();
includes/themes/class-ecwid-theme-central.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Central extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Central';
8
-
9
- protected $adjust_pb_scroll = true;
10
-
11
- public function __construct()
12
- {
13
- parent::__construct();
14
-
15
- add_filter('body_class', array( $this, 'body_class') );
16
- }
17
-
18
- public function body_class($classes) {
19
- // Yeah, we have to to turn off these ajax click handling routines that break our links
20
- if (ecwid_page_has_productbrowser()) {
21
- $classes[] = 'woocommerce';
22
- }
23
-
24
- return $classes;
25
- }
26
-
27
- }
28
-
29
  $ecwid_current_theme = new Ecwid_Theme_Central();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Central extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Central';
8
+
9
+ protected $adjust_pb_scroll = true;
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+
15
+ add_filter('body_class', array( $this, 'body_class') );
16
+ }
17
+
18
+ public function body_class($classes) {
19
+ // Yeah, we have to to turn off these ajax click handling routines that break our links
20
+ if (ecwid_page_has_productbrowser()) {
21
+ $classes[] = 'woocommerce';
22
+ }
23
+
24
+ return $classes;
25
+ }
26
+
27
+ }
28
+
29
  $ecwid_current_theme = new Ecwid_Theme_Central();
includes/themes/class-ecwid-theme-envision.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Envision extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Envision';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
- }
15
-
16
- public function has_product_browser( $value )
17
- {
18
- if ( $value ) {
19
- return $value;
20
- }
21
-
22
- $meta = serialize(get_post_meta( get_the_ID(), 'env_composer' ));
23
- //die(print_r(serialize($meta)));
24
-
25
- // not exactly the intended usage, but quite simple and still works
26
- // $meta is a serialized array that has the actual content
27
- // a right way is to walk through the structure and run has_shortcode against all fields
28
- $result = ecwid_content_has_productbrowser($meta);
29
-
30
- return $result;
31
- }
32
- }
33
-
34
  $ecwid_current_theme = new Ecwid_Theme_Envision();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Envision extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Envision';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
14
+ }
15
+
16
+ public function has_product_browser( $value )
17
+ {
18
+ if ( $value ) {
19
+ return $value;
20
+ }
21
+
22
+ $meta = serialize(get_post_meta( get_the_ID(), 'env_composer' ));
23
+ //die(print_r(serialize($meta)));
24
+
25
+ // not exactly the intended usage, but quite simple and still works
26
+ // $meta is a serialized array that has the actual content
27
+ // a right way is to walk through the structure and run has_shortcode against all fields
28
+ $result = ecwid_content_has_productbrowser($meta);
29
+
30
+ return $result;
31
+ }
32
+ }
33
+
34
  $ecwid_current_theme = new Ecwid_Theme_Envision();
includes/themes/class-ecwid-theme-genesis.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Genesis extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Genesis';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- if (array_key_exists('_escaped_fragment_', $_GET) && ecwid_page_has_productbrowser()) {
14
- remove_action( 'wp_head', 'genesis_canonical', 5 );
15
- }
16
- }
17
- }
18
-
19
  $ecwid_current_theme = new Ecwid_Theme_Genesis();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Genesis extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Genesis';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ if (array_key_exists('_escaped_fragment_', $_GET) && ecwid_page_has_productbrowser()) {
14
+ remove_action( 'wp_head', 'genesis_canonical', 5 );
15
+ }
16
+ }
17
+ }
18
+
19
  $ecwid_current_theme = new Ecwid_Theme_Genesis();
includes/themes/class-ecwid-theme-mfupdate.php CHANGED
@@ -1,32 +1,32 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_MFUpdate extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'MFUpdate';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
14
- }
15
-
16
- public function ecwid_shortcode_content($content) {
17
-
18
- $content .= <<<HTML
19
- <script type="text/javascript">
20
- Ecwid.OnPageLoaded.add( function() {
21
- if (jQuery('#container').data() && jQuery('#container').data().isotope) {
22
- jQuery('#container').data().isotope.reLayout();
23
- }
24
- }
25
- );</script>
26
- HTML;
27
-
28
- return $content;
29
- }
30
- }
31
-
32
  $ecwid_current_theme = new Ecwid_Theme_MFUpdate();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_MFUpdate extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'MFUpdate';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
14
+ }
15
+
16
+ public function ecwid_shortcode_content($content) {
17
+
18
+ $content .= <<<HTML
19
+ <script type="text/javascript">
20
+ Ecwid.OnPageLoaded.add( function() {
21
+ if (jQuery('#container').data() && jQuery('#container').data().isotope) {
22
+ jQuery('#container').data().isotope.reLayout();
23
+ }
24
+ }
25
+ );</script>
26
+ HTML;
27
+
28
+ return $content;
29
+ }
30
+ }
31
+
32
  $ecwid_current_theme = new Ecwid_Theme_MFUpdate();
includes/themes/class-ecwid-theme-responsive.php CHANGED
@@ -1,82 +1,82 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Responsive extends Ecwid_Theme_Base
6
- {
7
- public $has_advanced_layout = true;
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- if (!is_admin()) {
14
-
15
- if ( $this->need_advanced_layout() ) {
16
- wp_enqueue_style( 'ecwid-theme-adjustments' , ECWID_PLUGIN_URL . 'css/themes/responsive-adjustments.css', array(), get_option('ecwid_plugin_version'), 'all' );
17
- wp_enqueue_script( 'ecwid-theme', ECWID_PLUGIN_URL . 'js/themes/responsive.js', array( 'jquery' ), get_option('ecwid_plugin_version'), true );
18
-
19
- add_filter( 'ecwid_minicart_shortcode_content', array( $this, 'minicart_shortcode_content' ) );
20
- add_filter( 'ecwid_search_shortcode_content', array( $this, 'search_shortcode_content' ) );
21
- }
22
-
23
- wp_enqueue_style( 'ecwid-open-sans' , 'http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext,cyrillic,greek-ext,vietnamese,greek,latin-ext');
24
- wp_enqueue_style( 'dashicons' );
25
- wp_enqueue_style( 'ecwid-theme-fixes' , ECWID_PLUGIN_URL . 'css/themes/responsive.css', array(), get_option('ecwid_plugin_version'), 'all' );
26
-
27
- add_filter('body_class', array($this, 'body_class'));
28
-
29
- } else {
30
-
31
- add_action('ecwid_store_page_created', array($this, 'on_create_store_page'));
32
- add_action('switch_theme', array($this, 'switch_theme'));
33
-
34
- }
35
-
36
- }
37
-
38
- public function switch_theme()
39
- {
40
-
41
- }
42
-
43
- public function minicart_shortcode_content( $content )
44
- {
45
-
46
- if ( ecwid_page_has_productbrowser() ) {
47
- $content = '<script data-cfasync="false" type="text/javascript"> xMinicart("style=","layout=Mini"); </script>';
48
- }
49
-
50
- return $content;
51
- }
52
-
53
- public function search_shortcode_content( $content ) {
54
-
55
- $content .= '<script data-cfasync="false" type="text/javascript">jQuery(document.body).addClass("ecwid-with-search"); </script>';
56
-
57
- return $content;
58
- }
59
-
60
- public function body_class($classes)
61
- {
62
- if (get_option('ecwid_show_search_box')) {
63
- $classes[] = 'ecwid-with-search';
64
- }
65
-
66
- return $classes;
67
- }
68
-
69
- public function on_create_store_page($page_id)
70
- {
71
- update_post_meta($page_id, '_wp_page_template', 'full-width-page.php');
72
- }
73
-
74
- protected function need_advanced_layout()
75
- {
76
- return get_option('ecwid_advanced_theme_layout') == 'Y';
77
- }
78
-
79
- }
80
-
81
- global $ecwid_current_theme;
82
  $ecwid_current_theme = new Ecwid_Theme_Responsive();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Responsive extends Ecwid_Theme_Base
6
+ {
7
+ public $has_advanced_layout = true;
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ if (!is_admin()) {
14
+
15
+ if ( $this->need_advanced_layout() ) {
16
+ wp_enqueue_style( 'ecwid-theme-adjustments' , ECWID_PLUGIN_URL . 'css/themes/responsive-adjustments.css', array(), get_option('ecwid_plugin_version'), 'all' );
17
+ wp_enqueue_script( 'ecwid-theme', ECWID_PLUGIN_URL . 'js/themes/responsive.js', array( 'jquery' ), get_option('ecwid_plugin_version'), true );
18
+
19
+ add_filter( 'ecwid_minicart_shortcode_content', array( $this, 'minicart_shortcode_content' ) );
20
+ add_filter( 'ecwid_search_shortcode_content', array( $this, 'search_shortcode_content' ) );
21
+ }
22
+
23
+ wp_enqueue_style( 'ecwid-open-sans' , 'http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext,cyrillic,greek-ext,vietnamese,greek,latin-ext');
24
+ wp_enqueue_style( 'dashicons' );
25
+ wp_enqueue_style( 'ecwid-theme-fixes' , ECWID_PLUGIN_URL . 'css/themes/responsive.css', array(), get_option('ecwid_plugin_version'), 'all' );
26
+
27
+ add_filter('body_class', array($this, 'body_class'));
28
+
29
+ } else {
30
+
31
+ add_action('ecwid_store_page_created', array($this, 'on_create_store_page'));
32
+ add_action('switch_theme', array($this, 'switch_theme'));
33
+
34
+ }
35
+
36
+ }
37
+
38
+ public function switch_theme()
39
+ {
40
+
41
+ }
42
+
43
+ public function minicart_shortcode_content( $content )
44
+ {
45
+
46
+ if ( ecwid_page_has_productbrowser() ) {
47
+ $content = '<script data-cfasync="false" type="text/javascript"> xMinicart("style=","layout=Mini"); </script>';
48
+ }
49
+
50
+ return $content;
51
+ }
52
+
53
+ public function search_shortcode_content( $content ) {
54
+
55
+ $content .= '<script data-cfasync="false" type="text/javascript">jQuery(document.body).addClass("ecwid-with-search"); </script>';
56
+
57
+ return $content;
58
+ }
59
+
60
+ public function body_class($classes)
61
+ {
62
+ if (get_option('ecwid_show_search_box')) {
63
+ $classes[] = 'ecwid-with-search';
64
+ }
65
+
66
+ return $classes;
67
+ }
68
+
69
+ public function on_create_store_page($page_id)
70
+ {
71
+ update_post_meta($page_id, '_wp_page_template', 'full-width-page.php');
72
+ }
73
+
74
+ protected function need_advanced_layout()
75
+ {
76
+ return get_option('ecwid_advanced_theme_layout') == 'Y';
77
+ }
78
+
79
+ }
80
+
81
+ global $ecwid_current_theme;
82
  $ecwid_current_theme = new Ecwid_Theme_Responsive();
includes/themes/class-ecwid-theme-trend.php CHANGED
@@ -1,96 +1,96 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_Trend extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Trend';
8
-
9
- protected $shortcodes = array();
10
-
11
- public function __construct()
12
- {
13
- parent::__construct();
14
-
15
- // That actually means that ajax loading is disabled. Really ambigious naming
16
- if (class_exists('BW') && method_exists('BW', 'get_option') && !@BW::get_option('disable_ajax_loading')) {
17
- return;
18
- }
19
-
20
- add_filter('ecwid_disable_widgets', '__return_true');
21
- add_filter('ecwid_shortcode_custom_renderer', array($this, 'get_custom_renderer'));
22
- add_filter('the_content', array($this, 'add_shortcodes'));
23
- }
24
-
25
- public function get_custom_renderer() {
26
- return array($this, 'render_shortcode');
27
- }
28
-
29
- public function render_shortcode($shortcode) {
30
-
31
- if ($shortcode instanceof Ecwid_Shortcode_Base) {
32
- return $shortcode->render_placeholder() . $this->_render_shortcode_script($shortcode);
33
- }
34
-
35
- return '';
36
- }
37
-
38
- public function add_shortcodes($content) {
39
- $ecwid_store_id = get_ecwid_store_id();
40
- $before = <<<HTML
41
- <script>
42
- ecwid_shortcodes = [];
43
- </script>
44
- HTML;
45
- $after = <<<HTML
46
- <script>
47
- window.ecwid_script_defer = true;
48
- window.ecwid_dynamic_widgets = true;
49
-
50
- if (typeof Ecwid != 'undefined' && Ecwid.destroy) Ecwid.destroy();
51
-
52
- if (typeof ecwid_shortcodes != 'undefined') {
53
- window._xnext_initialization_scripts = ecwid_shortcodes;
54
-
55
- if (!document.getElementById('ecwid-script')) {
56
- var script = document.createElement('script');
57
- script.charset = 'utf-8';
58
- script.type = 'text/javascript';
59
- script.src = 'https://app.ecwid.com/script.js?$ecwid_store_id';
60
- script.id = 'ecwid-script'
61
- document.body.appendChild(script);
62
- } else {
63
- ecwid_onBodyDone();
64
- }
65
-
66
- }
67
- </script>
68
- HTML;
69
- return $before . $content . $after;
70
- }
71
-
72
- protected function _render_shortcode_script(Ecwid_Shortcode_Base $shortcode) {
73
-
74
- $args = $shortcode->build_params_string();
75
- $id = $shortcode->get_html_id();
76
- $widgetType = substr($shortcode->get_ecwid_widget_function_name(), 1);
77
- if ($widgetType == 'Search') {
78
- $widgetType = 'SearchWidget';
79
- }
80
- $store_id = get_ecwid_store_id();
81
-
82
- $code = <<<HTML
83
- <script type="text/javascript">
84
- ecwid_shortcodes[ecwid_shortcodes.length] = {
85
- widgetType: '$widgetType',
86
- id: '$id',
87
- arg: [$args]
88
- };
89
- </script>
90
- HTML;
91
- return $code;
92
-
93
- }
94
- }
95
-
96
  $ecwid_current_theme = new Ecwid_Theme_Trend();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Trend extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Trend';
8
+
9
+ protected $shortcodes = array();
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+
15
+ // That actually means that ajax loading is disabled. Really ambigious naming
16
+ if (class_exists('BW') && method_exists('BW', 'get_option') && !@BW::get_option('disable_ajax_loading')) {
17
+ return;
18
+ }
19
+
20
+ add_filter('ecwid_disable_widgets', '__return_true');
21
+ add_filter('ecwid_shortcode_custom_renderer', array($this, 'get_custom_renderer'));
22
+ add_filter('the_content', array($this, 'add_shortcodes'));
23
+ }
24
+
25
+ public function get_custom_renderer() {
26
+ return array($this, 'render_shortcode');
27
+ }
28
+
29
+ public function render_shortcode($shortcode) {
30
+
31
+ if ($shortcode instanceof Ecwid_Shortcode_Base) {
32
+ return $shortcode->render_placeholder() . $this->_render_shortcode_script($shortcode);
33
+ }
34
+
35
+ return '';
36
+ }
37
+
38
+ public function add_shortcodes($content) {
39
+ $ecwid_store_id = get_ecwid_store_id();
40
+ $before = <<<HTML
41
+ <script>
42
+ ecwid_shortcodes = [];
43
+ </script>
44
+ HTML;
45
+ $after = <<<HTML
46
+ <script>
47
+ window.ecwid_script_defer = true;
48
+ window.ecwid_dynamic_widgets = true;
49
+
50
+ if (typeof Ecwid != 'undefined' && Ecwid.destroy) Ecwid.destroy();
51
+
52
+ if (typeof ecwid_shortcodes != 'undefined') {
53
+ window._xnext_initialization_scripts = ecwid_shortcodes;
54
+
55
+ if (!document.getElementById('ecwid-script')) {
56
+ var script = document.createElement('script');
57
+ script.charset = 'utf-8';
58
+ script.type = 'text/javascript';
59
+ script.src = 'https://app.ecwid.com/script.js?$ecwid_store_id';
60
+ script.id = 'ecwid-script'
61
+ document.body.appendChild(script);
62
+ } else {
63
+ ecwid_onBodyDone();
64
+ }
65
+
66
+ }
67
+ </script>
68
+ HTML;
69
+ return $before . $content . $after;
70
+ }
71
+
72
+ protected function _render_shortcode_script(Ecwid_Shortcode_Base $shortcode) {
73
+
74
+ $args = $shortcode->build_params_string();
75
+ $id = $shortcode->get_html_id();
76
+ $widgetType = substr($shortcode->get_ecwid_widget_function_name(), 1);
77
+ if ($widgetType == 'Search') {
78
+ $widgetType = 'SearchWidget';
79
+ }
80
+ $store_id = get_ecwid_store_id();
81
+
82
+ $code = <<<HTML
83
+ <script type="text/javascript">
84
+ ecwid_shortcodes[ecwid_shortcodes.length] = {
85
+ widgetType: '$widgetType',
86
+ id: '$id',
87
+ arg: [$args]
88
+ };
89
+ </script>
90
+ HTML;
91
+ return $code;
92
+
93
+ }
94
+ }
95
+
96
  $ecwid_current_theme = new Ecwid_Theme_Trend();
includes/themes/class-ecwid-theme-twentyfifteen.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_2015 extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Twenty Fifteen';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- if (ecwid_page_has_productbrowser()) {
14
- wp_enqueue_style( 'ecwid-theme', ECWID_PLUGIN_URL . 'css/themes/2015.css', array('twentyfifteen-style'), get_option('ecwid_plugin_version') );
15
- }
16
-
17
- add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
18
- }
19
-
20
- public function on_ecwid_plugin_installed()
21
- {
22
- $widgets = get_option('sidebars_widgets');
23
-
24
- if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
25
- array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
26
- wp_set_sidebars_widgets($widgets);
27
-
28
- $options = get_option('widget_ecwidstorelink');
29
- if (!$options) {
30
- $options = array(
31
- 2 => array(
32
- 'label' => __('Shop', 'ecwid-shopping-cart')
33
- ),
34
- '_multiwidget' => 1
35
- );
36
- } else {
37
- $options[2] = array(
38
- 'label' => __('Shop', 'ecwid-shopping-cart')
39
- );
40
- }
41
-
42
- update_option('widget_ecwidstorelink', $options);
43
- }
44
- }
45
- }
46
-
47
  $ecwid_current_theme = new Ecwid_Theme_2015();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_2015 extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Twenty Fifteen';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ if (ecwid_page_has_productbrowser()) {
14
+ wp_enqueue_style( 'ecwid-theme', ECWID_PLUGIN_URL . 'css/themes/2015.css', array('twentyfifteen-style'), get_option('ecwid_plugin_version') );
15
+ }
16
+
17
+ add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
18
+ }
19
+
20
+ public function on_ecwid_plugin_installed()
21
+ {
22
+ $widgets = get_option('sidebars_widgets');
23
+
24
+ if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
25
+ array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
26
+ wp_set_sidebars_widgets($widgets);
27
+
28
+ $options = get_option('widget_ecwidstorelink');
29
+ if (!$options) {
30
+ $options = array(
31
+ 2 => array(
32
+ 'label' => __('Shop', 'ecwid-shopping-cart')
33
+ ),
34
+ '_multiwidget' => 1
35
+ );
36
+ } else {
37
+ $options[2] = array(
38
+ 'label' => __('Shop', 'ecwid-shopping-cart')
39
+ );
40
+ }
41
+
42
+ update_option('widget_ecwidstorelink', $options);
43
+ }
44
+ }
45
+ }
46
+
47
  $ecwid_current_theme = new Ecwid_Theme_2015();
includes/themes/class-ecwid-theme-twentysixteen.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_2016 extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'Twenty Sixteen';
8
-
9
- protected $adjust_pb_scroll = true;
10
-
11
- public function __construct()
12
- {
13
- parent::__construct();
14
-
15
- if (ecwid_page_has_productbrowser()) {
16
- wp_enqueue_style( 'ecwid-theme', ECWID_PLUGIN_URL . 'css/themes/2016.css', array('twentysixteen-style'), get_option('ecwid_plugin_version') );
17
- }
18
- add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
19
- }
20
-
21
- public function on_ecwid_plugin_installed()
22
- {
23
- $widgets = get_option('sidebars_widgets');
24
-
25
- if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
26
-
27
- array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
28
- wp_set_sidebars_widgets($widgets);
29
-
30
- $options = get_option('widget_ecwidstorelink');
31
-
32
- if (!$options) {
33
- $options = array(
34
- 2 => array(
35
- 'label' => __('Shop', 'ecwid-shopping-cart')
36
- ),
37
- '_multiwidget' => 1
38
- );
39
- } else {
40
- $options[2] = array(
41
- 'label' => __('Shop', 'ecwid-shopping-cart')
42
- );
43
- }
44
-
45
- update_option('widget_ecwidstorelink', $options);
46
- }
47
- }
48
- }
49
-
50
  $ecwid_current_theme = new Ecwid_Theme_2016();
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_2016 extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Twenty Sixteen';
8
+
9
+ protected $adjust_pb_scroll = true;
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+
15
+ if (ecwid_page_has_productbrowser()) {
16
+ wp_enqueue_style( 'ecwid-theme', ECWID_PLUGIN_URL . 'css/themes/2016.css', array('twentysixteen-style'), get_option('ecwid_plugin_version') );
17
+ }
18
+ add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
19
+ }
20
+
21
+ public function on_ecwid_plugin_installed()
22
+ {
23
+ $widgets = get_option('sidebars_widgets');
24
+
25
+ if (strpos(implode(' ', $widgets['sidebar-1']), 'ecwidstorelink') === false) {
26
+
27
+ array_unshift($widgets['sidebar-1'], 'ecwidstorelink-2');
28
+ wp_set_sidebars_widgets($widgets);
29
+
30
+ $options = get_option('widget_ecwidstorelink');
31
+
32
+ if (!$options) {
33
+ $options = array(
34
+ 2 => array(
35
+ 'label' => __('Shop', 'ecwid-shopping-cart')
36
+ ),
37
+ '_multiwidget' => 1
38
+ );
39
+ } else {
40
+ $options[2] = array(
41
+ 'label' => __('Shop', 'ecwid-shopping-cart')
42
+ );
43
+ }
44
+
45
+ update_option('widget_ecwidstorelink', $options);
46
+ }
47
+ }
48
+ }
49
+
50
  $ecwid_current_theme = new Ecwid_Theme_2016();
includes/widgets.php CHANGED
@@ -1,40 +1,40 @@
1
- <?php
2
-
3
- include_once "widgets/class-ecwid-widget-badge.php";
4
- include_once "widgets/class-ecwid-widget-minicart.php";
5
- include_once "widgets/class-ecwid-widget-minicart-miniview.php";
6
- include_once "widgets/class-ecwid-widget-recently-viewed.php";
7
- include_once "widgets/class-ecwid-widget-search.php";
8
- include_once "widgets/class-ecwid-widget-store-link.php";
9
- include_once "widgets/class-ecwid-widget-floating-shopping-cart.php";
10
- include_once "widgets/class-ecwid-widget-vertical-categories-list.php";
11
-
12
- if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
13
- include_once "widgets/class-ecwid-widget-vcategories.php";
14
- }
15
-
16
- function ecwid_sidebar_widgets_init() {
17
-
18
- $disable_widgets = apply_filters('ecwid_disable_widgets', false);
19
-
20
- if ($disable_widgets) {
21
- return;
22
- }
23
-
24
- register_widget('Ecwid_Widget_Badge');
25
- register_widget('Ecwid_Widget_Search');
26
-
27
- register_widget('Ecwid_Widget_Minicart_Miniview');
28
- register_widget('Ecwid_Widget_Minicart');
29
- register_widget('Ecwid_Widget_Store_Link');
30
- register_widget('Ecwid_Widget_Recently_Viewed');
31
- register_widget('Ecwid_Widget_Floating_Shopping_Cart');
32
- register_widget('Ecwid_Widget_Vertical_Categories_List');
33
-
34
- if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
35
- register_widget('Ecwid_Widget_VCategories');
36
- }
37
-
38
- }
39
-
40
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
1
+ <?php
2
+
3
+ include_once "widgets/class-ecwid-widget-badge.php";
4
+ include_once "widgets/class-ecwid-widget-minicart.php";
5
+ include_once "widgets/class-ecwid-widget-minicart-miniview.php";
6
+ include_once "widgets/class-ecwid-widget-recently-viewed.php";
7
+ include_once "widgets/class-ecwid-widget-search.php";
8
+ include_once "widgets/class-ecwid-widget-store-link.php";
9
+ include_once "widgets/class-ecwid-widget-floating-shopping-cart.php";
10
+ include_once "widgets/class-ecwid-widget-vertical-categories-list.php";
11
+
12
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
13
+ include_once "widgets/class-ecwid-widget-vcategories.php";
14
+ }
15
+
16
+ function ecwid_sidebar_widgets_init() {
17
+
18
+ $disable_widgets = apply_filters('ecwid_disable_widgets', false);
19
+
20
+ if ($disable_widgets) {
21
+ return;
22
+ }
23
+
24
+ register_widget('Ecwid_Widget_Badge');
25
+ register_widget('Ecwid_Widget_Search');
26
+
27
+ register_widget('Ecwid_Widget_Minicart_Miniview');
28
+ register_widget('Ecwid_Widget_Minicart');
29
+ register_widget('Ecwid_Widget_Store_Link');
30
+ register_widget('Ecwid_Widget_Recently_Viewed');
31
+ register_widget('Ecwid_Widget_Floating_Shopping_Cart');
32
+ register_widget('Ecwid_Widget_Vertical_Categories_List');
33
+
34
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
35
+ register_widget('Ecwid_Widget_VCategories');
36
+ }
37
+
38
+ }
39
+
40
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
includes/widgets/class-ecwid-widget-badge.php CHANGED
@@ -1,133 +1,133 @@
1
- <?php
2
-
3
- class Ecwid_Widget_Badge extends WP_Widget {
4
-
5
- var $url_template = "https://dj925myfyz5v.cloudfront.net/badges/%s.png";
6
- var $available_badges;
7
-
8
- function __construct() {
9
- $widget_ops = array('classname' => 'widget_ecwid_badge', 'description' => __("Do you like Ecwid and want to help it grow? You can add this fancy 'Powered by Ecwid' badge on your site to show your visitors that you're a proud user of Ecwid.", 'ecwid-shopping-cart') );
10
- parent::__construct('ecwidbadge', __('Ecwid Badge', 'ecwid-shopping-cart'), $widget_ops);
11
-
12
- $this->available_badges = array(
13
- 'ecwid-shopping-cart-widget-5' => array (
14
- 'name' => 'ecwid-shopping-cart-widget-5',
15
- 'width' => '73',
16
- 'height' => '20',
17
- 'alt' => __('Ecwid shopping cart widget', 'ecwid-shopping-cart')
18
- ),
19
- 'ecwid-shopping-cart-widget-6' => array (
20
- 'name' => 'ecwid-shopping-cart-widget-6',
21
- 'width' => '73',
22
- 'height' => '20',
23
- 'alt' => __('Ecwid shopping cart widget', 'ecwid-shopping-cart')
24
- ),
25
- 'ecwid-ecommerce-solution-2' => array (
26
- 'name' => 'ecwid-ecommerce-solution-2',
27
- 'width' => '165',
28
- 'height' => '58',
29
- 'alt' => __('Ecwid ecommerce solution', 'ecwid-shopping-cart')
30
- ),
31
- 'ecwid-free-shopping-cart-2' => array (
32
- 'name' => 'ecwid-free-shopping-cart-2',
33
- 'width' => '175',
34
- 'height' => '58',
35
- 'alt' => __('Ecwid free shopping cart', 'ecwid-shopping-cart')
36
- ),
37
- 'ecwid-shopping-cart-3' => array (
38
- 'name' => 'ecwid-shopping-cart-3',
39
- 'width' => '165',
40
- 'height' => '56',
41
- 'alt' => __('Ecwid shopping cart', 'ecwid-shopping-cart')
42
- ),
43
- 'ecwid-ecommerce-widgets-3' => array (
44
- 'name' => 'ecwid-ecommerce-widgets-3',
45
- 'width' => '165',
46
- 'height' => '58',
47
- 'alt' => __('Ecwid e-commerce widgets', 'ecwid-shopping-cart')
48
- ),
49
- 'ecwid-shopping-cart-3' => array (
50
- 'name' => 'ecwid-shopping-cart-3',
51
- 'width' => '165',
52
- 'height' => '56',
53
- 'alt' => __('Ecwid shopping cart', 'ecwid-shopping-cart')
54
- ),
55
- 'ecwid-ecommerce-widgets-3' => array (
56
- 'name' => 'ecwid-ecommerce-widgets-3',
57
- 'width' => '165',
58
- 'height' => '58',
59
- 'alt' => __('Ecwid e-commerce widgets', 'ecwid-shopping-cart')
60
- ),
61
- 'ecwid-ecommerce-solution-3' => array (
62
- 'name' => 'ecwid-ecommerce-solution-3',
63
- 'width' => '165',
64
- 'height' => '58',
65
- 'alt' => __('Ecwid ecommerce solution', 'ecwid-shopping-cart')
66
- ),
67
- 'ecwid-free-shopping-cart-3' => array (
68
- 'name' => 'ecwid-free-shopping-cart-3',
69
- 'width' => '175',
70
- 'height' => '58',
71
- 'alt' => __('Ecwid free shopping cart', 'ecwid-shopping-cart')
72
- )
73
- );
74
- }
75
-
76
- function widget($args, $instance)
77
- {
78
- extract($args);
79
-
80
- if (!isset($instance['badge_id']) || !array_key_exists($instance['badge_id'], $this->available_badges)) {
81
- return;
82
- }
83
- $badge = $this->available_badges[$instance['badge_id']];
84
- $url = sprintf($this->url_template, $badge['name']);
85
-
86
- echo $before_widget;
87
-
88
- echo <<<HTML
89
- <div>
90
- <a target="_blank" rel="nofollow" href="http://www.ecwid.com?source=wporg-badge">
91
- <img src="$url" width="$badge[width]" height="$badge[height]" alt="$badge[alt]" />
92
- </a>
93
- </div>
94
- HTML;
95
-
96
- echo $after_widget;
97
- }
98
-
99
- function update($new_instance, $old_instance){
100
- $instance = $old_instance;
101
- $instance['badge_id'] =
102
- array_key_exists($new_instance['badge_id'], $this->available_badges)
103
- ? $new_instance['badge_id']
104
- : '';
105
-
106
- return $instance;
107
- }
108
-
109
- function form($instance) {
110
- $instance = wp_parse_args( (array) $instance, array('badge_id' => 'ecwid-shopping-cart-widget-5') );
111
-
112
- foreach ($this->available_badges as $id => $widget) {
113
- $element_id = "badge-$id";
114
- $name = $this->get_field_name('badge_id');
115
- $checked = '';
116
- if (isset($instance['badge_id']) && $instance['badge_id'] == $id) {
117
- $checked = 'checked="checked"';
118
- }
119
- $url = sprintf($this->url_template, $id);
120
- $content = <<<HTML
121
- <label class="ecwid-badge">
122
- <div class="checkbox">
123
- <input name="$name" type="radio" value="$widget[name]"$checked/>
124
- </div>
125
- <div class="image">
126
- <img src="$url" width="$widget[width]" height="$widget[height]" alt="$widget[alt]" />
127
- </div>
128
- </label>
129
- HTML;
130
- echo $content;
131
- }
132
- }
133
  }
1
+ <?php
2
+
3
+ class Ecwid_Widget_Badge extends WP_Widget {
4
+
5
+ var $url_template = "https://dj925myfyz5v.cloudfront.net/badges/%s.png";
6
+ var $available_badges;
7
+
8
+ function __construct() {
9
+ $widget_ops = array('classname' => 'widget_ecwid_badge', 'description' => __("Do you like Ecwid and want to help it grow? You can add this fancy 'Powered by Ecwid' badge on your site to show your visitors that you're a proud user of Ecwid.", 'ecwid-shopping-cart') );
10
+ parent::__construct('ecwidbadge', __('Ecwid Badge', 'ecwid-shopping-cart'), $widget_ops);
11
+
12
+ $this->available_badges = array(
13
+ 'ecwid-shopping-cart-widget-5' => array (
14
+ 'name' => 'ecwid-shopping-cart-widget-5',
15
+ 'width' => '73',
16
+ 'height' => '20',
17
+ 'alt' => __('Ecwid shopping cart widget', 'ecwid-shopping-cart')
18
+ ),
19
+ 'ecwid-shopping-cart-widget-6' => array (
20
+ 'name' => 'ecwid-shopping-cart-widget-6',
21
+ 'width' => '73',
22
+ 'height' => '20',
23
+ 'alt' => __('Ecwid shopping cart widget', 'ecwid-shopping-cart')
24
+ ),
25
+ 'ecwid-ecommerce-solution-2' => array (
26
+ 'name' => 'ecwid-ecommerce-solution-2',
27
+ 'width' => '165',
28
+ 'height' => '58',
29
+ 'alt' => __('Ecwid ecommerce solution', 'ecwid-shopping-cart')
30
+ ),
31
+ 'ecwid-free-shopping-cart-2' => array (
32
+ 'name' => 'ecwid-free-shopping-cart-2',
33
+ 'width' => '175',
34
+ 'height' => '58',
35
+ 'alt' => __('Ecwid free shopping cart', 'ecwid-shopping-cart')
36
+ ),
37
+ 'ecwid-shopping-cart-3' => array (
38
+ 'name' => 'ecwid-shopping-cart-3',
39
+ 'width' => '165',
40
+ 'height' => '56',
41
+ 'alt' => __('Ecwid shopping cart', 'ecwid-shopping-cart')
42
+ ),
43
+ 'ecwid-ecommerce-widgets-3' => array (
44
+ 'name' => 'ecwid-ecommerce-widgets-3',
45
+ 'width' => '165',
46
+ 'height' => '58',
47
+ 'alt' => __('Ecwid e-commerce widgets', 'ecwid-shopping-cart')
48
+ ),
49
+ 'ecwid-shopping-cart-3' => array (
50
+ 'name' => 'ecwid-shopping-cart-3',
51
+ 'width' => '165',
52
+ 'height' => '56',
53
+ 'alt' => __('Ecwid shopping cart', 'ecwid-shopping-cart')
54
+ ),
55
+ 'ecwid-ecommerce-widgets-3' => array (
56
+ 'name' => 'ecwid-ecommerce-widgets-3',
57
+ 'width' => '165',
58
+ 'height' => '58',
59
+ 'alt' => __('Ecwid e-commerce widgets', 'ecwid-shopping-cart')
60
+ ),
61
+ 'ecwid-ecommerce-solution-3' => array (
62
+ 'name' => 'ecwid-ecommerce-solution-3',
63
+ 'width' => '165',
64
+ 'height' => '58',
65
+ 'alt' => __('Ecwid ecommerce solution', 'ecwid-shopping-cart')
66
+ ),
67
+ 'ecwid-free-shopping-cart-3' => array (
68
+ 'name' => 'ecwid-free-shopping-cart-3',
69
+ 'width' => '175',
70
+ 'height' => '58',
71
+ 'alt' => __('Ecwid free shopping cart', 'ecwid-shopping-cart')
72
+ )
73
+ );
74
+ }
75
+
76
+ function widget($args, $instance)
77
+ {
78
+ extract($args);
79
+
80
+ if (!isset($instance['badge_id']) || !array_key_exists($instance['badge_id'], $this->available_badges)) {
81
+ return;
82
+ }
83
+ $badge = $this->available_badges[$instance['badge_id']];
84
+ $url = sprintf($this->url_template, $badge['name']);
85
+
86
+ echo $before_widget;
87
+
88
+ echo <<<HTML
89
+ <div>
90
+ <a target="_blank" rel="nofollow" href="http://www.ecwid.com?source=wporg-badge">
91
+ <img src="$url" width="$badge[width]" height="$badge[height]" alt="$badge[alt]" />
92
+ </a>
93
+ </div>
94
+ HTML;
95
+
96
+ echo $after_widget;
97
+ }
98
+
99
+ function update($new_instance, $old_instance){
100
+ $instance = $old_instance;
101
+ $instance['badge_id'] =
102
+ array_key_exists($new_instance['badge_id'], $this->available_badges)
103
+ ? $new_instance['badge_id']
104
+ : '';
105
+
106
+ return $instance;
107
+ }
108
+
109
+ function form($instance) {
110
+ $instance = wp_parse_args( (array) $instance, array('badge_id' => 'ecwid-shopping-cart-widget-5') );
111
+
112
+ foreach ($this->available_badges as $id => $widget) {
113
+ $element_id = "badge-$id";
114
+ $name = $this->get_field_name('badge_id');
115
+ $checked = '';
116
+ if (isset($instance['badge_id']) && $instance['badge_id'] == $id) {
117
+ $checked = 'checked="checked"';
118
+ }
119
+ $url = sprintf($this->url_template, $id);
120
+ $content = <<<HTML
121
+ <label class="ecwid-badge">
122
+ <div class="checkbox">
123
+ <input name="$name" type="radio" value="$widget[name]"$checked/>
124
+ </div>
125
+ <div class="image">
126
+ <img src="$url" width="$widget[width]" height="$widget[height]" alt="$widget[alt]" />
127
+ </div>
128
+ </label>
129
+ HTML;
130
+ echo $content;
131
+ }
132
+ }
133
  }
includes/widgets/class-ecwid-widget-floating-shopping-cart.php CHANGED
@@ -1,89 +1,89 @@
1
- <?php
2
- class Ecwid_Widget_Floating_Shopping_Cart extends WP_Widget {
3
- static $was_enqueued = false;
4
-
5
- static protected $positions = array(
6
- 'topright',
7
- 'bottomright'
8
- );
9
-
10
- static protected $default_position = 'bottomright';
11
-
12
- public function __construct() {
13
- $widget_ops = array('classname' => 'widget_ecwid_floating_shopping_cart', 'description' => __("Adds a shopping cart widget to the top right corner of your site.", 'ecwid-shopping-cart') );
14
- parent::__construct('ecwidfloatingshoppingcart', __('Shopping Cart (Floating)', 'ecwid-shopping-cart'), $widget_ops);
15
-
16
- add_action('init', array($this, 'init'));
17
- }
18
-
19
- public function init() {
20
- if ( is_active_widget(false, false, $this->id_base, true ) ) {
21
- add_filter( 'body_class', array($this, 'body_class' ) );
22
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
23
- }
24
- }
25
-
26
- public function enqueue_scripts() {
27
- if (self::$was_enqueued) return;
28
-
29
- wp_enqueue_script('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . '/js/floating-shopping-cart.js', array('jquery'), get_option('ecwid_plugin_version'), true);
30
- wp_enqueue_style('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . 'css/floating-shopping-cart.css', array(), get_option('ecwid_plugin_version'));
31
- }
32
-
33
- public function body_class($classes) {
34
- $classes[] = 'ecwid-floating-shopping-cart';
35
-
36
- return $classes;
37
- }
38
-
39
- public function widget($args, $instance) {
40
-
41
- $position = @$instance['position'];
42
- if (!in_array($position, self::$positions)) {
43
- $position = self::$default_position;
44
- }
45
- echo '<!-- noptimize -->';
46
- echo ecwid_get_scriptjs_code();
47
- echo
48
- <<<HTML
49
- <div class="ecwid-float-icons position-$position" ondragstart="return false">
50
- <div class="ecwid-cart-icon off">
51
- <a href="#!/~/cart" data-count="0">
52
- <svg width="20" height="26" viewBox="0 0 20 26" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M.5 6.5v14.81c0 2.255 1.79 4.084 4 4.084h11c2.21 0 4-1.83 4-4.085V6.5H.5zM6 10.585c.552 0 1-.457 1-1.02C7 9 6.552 8.542 6 8.542S5 9 5 9.563c0 .565.448 1.022 1 1.022zm8 0c.552 0 1-.457 1-1.02 0-.565-.448-1.022-1-1.022S13 9 13 9.563c0 .565.448 1.022 1 1.022z" stroke="#439CA0"/><path d="M14.5 6h-1V4.582c0-1.97-1.57-3.575-3.5-3.575S6.5 2.61 6.5 4.582V6h-1V4.582C5.5 2.048 7.52-.014 10-.014c2.482 0 4.5 2.062 4.5 4.596V6z" fill="#439CA0"/></g></svg>
53
- <div id="ecwid-cart"><script type="text/javascript"> xMinicart("style="); </script></div>
54
- </a>
55
- </div>
56
- </div>
57
- HTML;
58
- echo '<!-- /noptimize -->';
59
- }
60
-
61
- public function update( $new_instance, $old_instance ) {
62
- $instance = $old_instance;
63
-
64
- $instance['position'] = in_array( $new_instance['position'], self::$positions )
65
- ? $new_instance['position']
66
- : self::$default_position;
67
-
68
- return $instance;
69
- }
70
-
71
- public function form( $instance ) {
72
- $instance = wp_parse_args( (array) $instance, array('position' => self::$default_position ) );
73
-
74
- $position = $instance['position'];
75
-
76
- echo '<p>' . __('Position', 'ecwid-shopping-cart') . ':</p>';
77
- echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="bottomright"'
78
- . ($position == 'bottomright' ? ' checked="checked"' : '') . '/>'
79
- . __('Bottom right', 'ecwid-shopping-cart')
80
- . '</label></p>';
81
-
82
- echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="topright"'
83
- . ($position == 'topright' ? ' checked="checked"' : '') . '/>'
84
- . __('Top right', 'ecwid-shopping-cart')
85
- . '</label></p>';
86
-
87
- }
88
-
89
- }
1
+ <?php
2
+ class Ecwid_Widget_Floating_Shopping_Cart extends WP_Widget {
3
+ static $was_enqueued = false;
4
+
5
+ static protected $positions = array(
6
+ 'topright',
7
+ 'bottomright'
8
+ );
9
+
10
+ static protected $default_position = 'bottomright';
11
+
12
+ public function __construct() {
13
+ $widget_ops = array('classname' => 'widget_ecwid_floating_shopping_cart', 'description' => __("Adds a shopping cart widget to the top right corner of your site.", 'ecwid-shopping-cart') );
14
+ parent::__construct('ecwidfloatingshoppingcart', __('Shopping Cart (Floating)', 'ecwid-shopping-cart'), $widget_ops);
15
+
16
+ add_action('init', array($this, 'init'));
17
+ }
18
+
19
+ public function init() {
20
+ if ( is_active_widget(false, false, $this->id_base, true ) ) {
21
+ add_filter( 'body_class', array($this, 'body_class' ) );
22
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
23
+ }
24
+ }
25
+
26
+ public function enqueue_scripts() {
27
+ if (self::$was_enqueued) return;
28
+
29
+ wp_enqueue_script('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . '/js/floating-shopping-cart.js', array('jquery'), get_option('ecwid_plugin_version'), true);
30
+ wp_enqueue_style('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . 'css/floating-shopping-cart.css', array(), get_option('ecwid_plugin_version'));
31
+ }
32
+
33
+ public function body_class($classes) {
34
+ $classes[] = 'ecwid-floating-shopping-cart';
35
+
36
+ return $classes;
37
+ }
38
+
39
+ public function widget($args, $instance) {
40
+
41
+ $position = @$instance['position'];
42
+ if (!in_array($position, self::$positions)) {
43
+ $position = self::$default_position;
44
+ }
45
+ echo '<!-- noptimize -->';
46
+ echo ecwid_get_scriptjs_code();
47
+ echo
48
+ <<<HTML
49
+ <div class="ecwid-float-icons position-$position" ondragstart="return false">
50
+ <div class="ecwid-cart-icon off">
51
+ <a href="#!/~/cart" data-count="0">
52
+ <svg width="20" height="26" viewBox="0 0 20 26" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M.5 6.5v14.81c0 2.255 1.79 4.084 4 4.084h11c2.21 0 4-1.83 4-4.085V6.5H.5zM6 10.585c.552 0 1-.457 1-1.02C7 9 6.552 8.542 6 8.542S5 9 5 9.563c0 .565.448 1.022 1 1.022zm8 0c.552 0 1-.457 1-1.02 0-.565-.448-1.022-1-1.022S13 9 13 9.563c0 .565.448 1.022 1 1.022z" stroke="#439CA0"/><path d="M14.5 6h-1V4.582c0-1.97-1.57-3.575-3.5-3.575S6.5 2.61 6.5 4.582V6h-1V4.582C5.5 2.048 7.52-.014 10-.014c2.482 0 4.5 2.062 4.5 4.596V6z" fill="#439CA0"/></g></svg>
53
+ <div id="ecwid-cart"><script type="text/javascript"> xMinicart("style="); </script></div>
54
+ </a>
55
+ </div>
56
+ </div>
57
+ HTML;
58
+ echo '<!-- /noptimize -->';
59
+ }
60
+
61
+ public function update( $new_instance, $old_instance ) {
62
+ $instance = $old_instance;
63
+
64
+ $instance['position'] = in_array( $new_instance['position'], self::$positions )
65
+ ? $new_instance['position']
66
+ : self::$default_position;
67
+
68
+ return $instance;
69
+ }
70
+
71
+ public function form( $instance ) {
72
+ $instance = wp_parse_args( (array) $instance, array('position' => self::$default_position ) );
73
+
74
+ $position = $instance['position'];
75
+
76
+ echo '<p>' . __('Position', 'ecwid-shopping-cart') . ':</p>';
77
+ echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="bottomright"'
78
+ . ($position == 'bottomright' ? ' checked="checked"' : '') . '/>'
79
+ . __('Bottom right', 'ecwid-shopping-cart')
80
+ . '</label></p>';
81
+
82
+ echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="topright"'
83
+ . ($position == 'topright' ? ' checked="checked"' : '') . '/>'
84
+ . __('Top right', 'ecwid-shopping-cart')
85
+ . '</label></p>';
86
+
87
+ }
88
+
89
+ }
includes/widgets/class-ecwid-widget-minicart-miniview.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- class Ecwid_Widget_Minicart_Miniview extends WP_Widget {
3
-
4
- function __construct() {
5
- $widget_ops = array('classname' => 'widget_ecwid_minicart_miniview', 'description' => __("Adds a compact cart widget for customer to see the products they added to the cart.", 'ecwid-shopping-cart') );
6
- parent::__construct('ecwidminicart_miniview', __('Shopping Cart (Mini)', 'ecwid-shopping-cart'), $widget_ops);
7
- }
8
-
9
- function widget($args, $instance) {
10
- extract($args);
11
- $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
12
-
13
- echo $before_widget;
14
-
15
- if ( $title )
16
- echo $before_title . $title . $after_title;
17
-
18
-
19
- echo '<div>';
20
- echo '<!-- noptimize -->';
21
-
22
- echo ecwid_get_scriptjs_code();
23
- echo ecwid_get_product_browser_url_script();
24
- echo '<script data-cfasync="false" type="text/javascript"> xMinicart("style=left:10px","layout=Mini"); </script>';
25
-
26
- echo '<!-- /noptimize -->';
27
- echo '</div>';
28
-
29
- echo $after_widget;
30
- }
31
-
32
- function update($new_instance, $old_instance){
33
- $instance = $old_instance;
34
- $instance['title'] = strip_tags(stripslashes($new_instance['title']));
35
-
36
- return $instance;
37
- }
38
-
39
- function form($instance){
40
- $instance = wp_parse_args( (array) $instance, array('title'=>'') );
41
-
42
- $title = htmlspecialchars($instance['title']);
43
-
44
- echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
45
- }
46
-
47
- }
1
+ <?php
2
+ class Ecwid_Widget_Minicart_Miniview extends WP_Widget {
3
+
4
+ function __construct() {
5
+ $widget_ops = array('classname' => 'widget_ecwid_minicart_miniview', 'description' => __("Adds a compact cart widget for customer to see the products they added to the cart.", 'ecwid-shopping-cart') );
6
+ parent::__construct('ecwidminicart_miniview', __('Shopping Cart (Mini)', 'ecwid-shopping-cart'), $widget_ops);
7
+ }
8
+
9
+ function widget($args, $instance) {
10
+ extract($args);
11
+ $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
12
+
13
+ echo $before_widget;
14
+
15
+ if ( $title )
16
+ echo $before_title . $title . $after_title;
17
+
18
+
19
+ echo '<div>';
20
+ echo '<!-- noptimize -->';
21
+
22
+ echo ecwid_get_scriptjs_code();
23
+ echo ecwid_get_product_browser_url_script();
24
+ echo '<script data-cfasync="false" type="text/javascript"> xMinicart("style=left:10px","layout=Mini"); </script>';
25
+
26
+ echo '<!-- /noptimize -->';
27
+ echo '</div>';
28
+
29
+ echo $after_widget;
30
+ }
31
+
32
+ function update($new_instance, $old_instance){
33
+ $instance = $old_instance;
34
+ $instance['title'] = strip_tags(stripslashes($new_instance['title']));
35
+
36
+ return $instance;
37
+ }
38
+
39
+ function form($instance){
40
+ $instance = wp_parse_args( (array) $instance, array('title'=>'') );
41
+
42
+ $title = htmlspecialchars($instance['title']);
43
+
44
+ echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
45
+ }
46
+
47
+ }
includes/widgets/class-ecwid-widget-minicart.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- class Ecwid_Widget_Minicart extends WP_Widget {
3
-
4
- function __construct() {
5
- $widget_ops = array('classname' => 'widget_ecwid_minicart', 'description' => __("Adds a cart widget for customer to see the products they added to the cart.", 'ecwid-shopping-cart') );
6
- parent::__construct('ecwidminicart', __('Shopping Cart', 'ecwid-shopping-cart'), $widget_ops);
7
-
8
- }
9
-
10
- function widget($args, $instance) {
11
- extract($args);
12
- $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
13
-
14
- echo $before_widget;
15
-
16
- if ( $title )
17
- echo $before_title . $title . $after_title;
18
-
19
- echo '<div>';
20
-
21
- echo '<!-- noptimize -->';
22
- echo ecwid_get_scriptjs_code();
23
- echo ecwid_get_product_browser_url_script();
24
- echo '<script data-cfasync="false" type="text/javascript"> xMinicart("style="); </script>';
25
-
26
- echo '<!-- /noptimize -->';
27
- echo '</div>';
28
-
29
- echo $after_widget;
30
- }
31
-
32
- function update($new_instance, $old_instance){
33
- $instance = $old_instance;
34
- $instance['title'] = strip_tags(stripslashes($new_instance['title']));
35
-
36
- return $instance;
37
- }
38
-
39
- function form($instance){
40
- $instance = wp_parse_args( (array) $instance, array('title'=>'') );
41
-
42
- $title = htmlspecialchars($instance['title']);
43
-
44
- echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
45
- }
46
-
47
- }
1
+ <?php
2
+ class Ecwid_Widget_Minicart extends WP_Widget {
3
+
4
+ function __construct() {
5
+ $widget_ops = array('classname' => 'widget_ecwid_minicart', 'description' => __("Adds a cart widget for customer to see the products they added to the cart.", 'ecwid-shopping-cart') );
6
+ parent::__construct('ecwidminicart', __('Shopping Cart', 'ecwid-shopping-cart'), $widget_ops);
7
+
8
+ }
9
+
10
+ function widget($args, $instance) {
11
+ extract($args);
12
+ $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
13
+
14
+ echo $before_widget;
15
+
16
+ if ( $title )
17
+ echo $before_title . $title . $after_title;
18
+
19
+ echo '<div>';
20
+
21
+ echo '<!-- noptimize -->';
22
+ echo ecwid_get_scriptjs_code();
23
+ echo ecwid_get_product_browser_url_script();
24
+ echo '<script data-cfasync="false" type="text/javascript"> xMinicart("style="); </script>';
25
+
26
+ echo '<!-- /noptimize -->';
27
+ echo '</div>';
28
+
29
+ echo $after_widget;
30
+ }
31
+
32
+ function update($new_instance, $old_instance){
33
+ $instance = $old_instance;
34
+ $instance['title'] = strip_tags(stripslashes($new_instance['title']));
35
+
36
+ return $instance;
37
+ }
38
+
39
+ function form($instance){
40
+ $instance = wp_parse_args( (array) $instance, array('title'=>'') );
41
+
42
+ $title = htmlspecialchars($instance['title']);
43
+
44
+ echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
45
+ }
46
+
47
+ }
includes/widgets/class-ecwid-widget-recently-viewed.php CHANGED
@@ -1,163 +1,163 @@
1
- <?php
2
- class Ecwid_Widget_Recently_Viewed extends WP_Widget {
3
-
4
- var $max = 10;
5
- var $min = 1;
6
- var $default = 3;
7
-
8
- function __construct() {
9
- $widget_ops = array('classname' => 'widget_ecwid_recently_viewed', 'description' => __('Displays a list of products recently viewed by the customer to easily return to the products they saw in your shop.', 'ecwid-shopping-cart'));
10
- parent::__construct('ecwidrecentlyviewed', __('Recently Viewed Products', 'ecwid-shopping-cart'), $widget_ops);
11
- $recently_viewed = false;
12
- if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
13
- $recently_viewed = json_decode(stripslashes($_COOKIE['ecwid-shopping-cart-recently-viewed']));
14
- }
15
-
16
- if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id() && !is_admin()) {
17
- setcookie('ecwid-shopping-cart-recently-viewed', null, strtotime('-1 day'));
18
- }
19
- }
20
-
21
- function widget($args, $instance) {
22
-
23
- wp_enqueue_script('ecwid-recently-viewed-js', ECWID_PLUGIN_URL . 'js/recently-viewed.js', array('ecwid-products-list-js'), get_option('ecwid_plugin_version'));
24
- wp_enqueue_style('ecwid-products-list-css');
25
- wp_enqueue_style('ecwid-recently-viewed-css', ECWID_PLUGIN_URL . 'css/recently-viewed.css', array(), get_option('ecwid_plugin_version'));
26
- extract($args);
27
-
28
- $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
29
-
30
- echo $before_widget;
31
-
32
- if ( $title )
33
- echo $before_title . $title . $after_title;
34
-
35
- echo '<!-- noptimize -->' . ecwid_get_scriptjs_code() . '<!-- /noptimize -->';
36
-
37
- $recently_viewed = false;
38
- if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
39
- $recently_viewed = json_decode($_COOKIE['ecwid-shopping-cart-recently-viewed']);
40
- }
41
- $recently_viewed = json_decode(stripslashes(@$_COOKIE['ecwid-shopping-cart-recently-viewed']));
42
-
43
- if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id()) {
44
- $recently_viewed = null;
45
- }
46
-
47
- echo '<div class="ecwid-recently-viewed-products" data-ecwid-max="' . $instance['number_of_products'] . '">';
48
-
49
-
50
- $api = false;
51
- if (ecwid_is_api_enabled()) {
52
- $api = ecwid_new_product_api();
53
- }
54
-
55
- $counter = 0;
56
- $ids = array();
57
- if ($recently_viewed && isset($recently_viewed->products)) {
58
-
59
- for ($i = count($recently_viewed->products) - 1; $i >= 0; $i--) {
60
- $product = $recently_viewed->products[$i];
61
-
62
- $counter++;
63
- if (isset($product->id) && isset($product->link)) {
64
- $ids[] = $product->id;
65
- $hide = $counter > $instance['number_of_products'] ? ' hidden' : '';
66
-
67
- $force_image = '';
68
- if ($api) {
69
- $product_https = $api->get_product_https($product->id);
70
- $force_image = $product_https['imageUrl'];
71
- }
72
-
73
- $name = isset($product_https) ? $product_https['name']: '';
74
-
75
- echo <<<HTML
76
- <a class="product$hide" href="$product->link" alt="$name" title="$name">
77
- <div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-$product->id" data-single-product-link="$product->link" itemscope itemtype="http://schema.org/Product" data-single-product-id="$product->id">
78
- <div itemprop="image" data-force-image="$force_image"></div>
79
- <div class="ecwid-title" itemprop="name"></div>
80
- <div itemtype="http://schema.org/Offer" itemscope itemprop="offers"><div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div></div>
81
- </div>
82
-
83
- <!-- noptimize --><script type="text/javascript">xSingleProduct();</script><!-- /noptimize -->
84
- </a>
85
- HTML;
86
- }
87
- }
88
- } else {
89
- echo <<<HTML
90
- <script type="text/javascript">
91
- jQuery(document).ready(function() {
92
- wpCookies.remove('ecwid-shopping-cart-recently-viewed');
93
- recently_viewed = {products: []};
94
- });
95
- </script>
96
- HTML;
97
- }
98
- $ids_string = '';
99
- if (!empty($ids)) {
100
- $ids_string = implode(',', $ids);
101
- }
102
-
103
- echo <<<HTML
104
- <script type="text/javascript">
105
- <!--
106
- jQuery(document).ready(function() {
107
- jQuery('#$this->id .ecwid-recently-viewed-products').recentlyViewedProducts();
108
- });
109
- -->
110
- </script>
111
- HTML;
112
-
113
- echo "</div>";
114
-
115
- $store_link_message = empty($instance['store_link_title']) ? __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart') : $instance['store_link_title'];
116
-
117
- $page_id = ecwid_get_current_store_page_id();
118
- $post = get_post($page_id);
119
-
120
- if (empty($recently_viewed->products)) {
121
- echo '<a class="show-if-empty" href="' . ecwid_get_store_page_url() . '">' . $store_link_message . '</a>';
122
- }
123
-
124
- echo $after_widget;
125
- }
126
-
127
- function update($new_instance, $old_instance){
128
- $instance = $old_instance;
129
- $instance['title'] = strip_tags(stripslashes($new_instance['title']));
130
- $instance['store_link_title'] = strip_tags(stripslashes($new_instance['store_link_title']));
131
- $num = intval($new_instance['number_of_products']);
132
- if ($num > $this->max || $num < $this->min) {
133
- $num = $this->default;
134
- }
135
- $instance['number_of_products'] = intval($new_instance['number_of_products']);
136
-
137
- return $instance;
138
- }
139
-
140
- function form($instance){
141
-
142
- $instance = wp_parse_args( (array) $instance,
143
- array(
144
- 'title' => __('Recently Viewed Products', 'ecwid-shopping-cart'),
145
- 'store_link_title' => __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart'),
146
- 'number_of_products' => 3
147
- )
148
- );
149
-
150
- $title = htmlspecialchars($instance['title']);
151
- $store_link_title = htmlspecialchars($instance['store_link_title']);
152
- $number_of_products = $instance['number_of_products'];
153
- if ($number_of_products)
154
-
155
- echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title') . ': <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
156
- echo '<p><label for="' . $this->get_field_name('store_link_title') . '">' . __('Store Link Title', 'ecwid-shopping-cart') . ': <input style="width:100%;" id="' . $this->get_field_id('store_link_title') . '" name="' . $this->get_field_name('store_link_title') . '" type="text" value="' . $store_link_title . '" /></label></p>';
157
- echo '<p><label for="' . $this->get_field_name('number_of_products') . '">' . __( 'Number of products to show', 'ecwid-shopping-cart' ) . ': <input style="width:100%;" id="' . $this->get_field_id('number_of_products') . '" name="' . $this->get_field_name('number_of_products') . '" type="number" min="' . $this->min . '" max="' . $this->max . '" value="' . $number_of_products . '" /></label></p>';
158
- }
159
-
160
- function is_valid_number_of_products($num) {
161
- return is_numeric($num) && $num <= $this->max && $num >= $this->min;
162
- }
163
- }
1
+ <?php
2
+ class Ecwid_Widget_Recently_Viewed extends WP_Widget {
3
+
4
+ var $max = 10;
5
+ var $min = 1;
6
+ var $default = 3;
7
+
8
+ function __construct() {
9
+ $widget_ops = array('classname' => 'widget_ecwid_recently_viewed', 'description' => __('Displays a list of products recently viewed by the customer to easily return to the products they saw in your shop.', 'ecwid-shopping-cart'));
10
+ parent::__construct('ecwidrecentlyviewed', __('Recently Viewed Products', 'ecwid-shopping-cart'), $widget_ops);
11
+ $recently_viewed = false;
12
+ if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
13
+ $recently_viewed = json_decode(stripslashes($_COOKIE['ecwid-shopping-cart-recently-viewed']));
14
+ }
15
+
16
+ if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id() && !is_admin()) {
17
+ setcookie('ecwid-shopping-cart-recently-viewed', null, strtotime('-1 day'));
18
+ }
19
+ }
20
+
21
+ function widget($args, $instance) {
22
+
23
+ wp_enqueue_script('ecwid-recently-viewed-js', ECWID_PLUGIN_URL . 'js/recently-viewed.js', array('ecwid-products-list-js'), get_option('ecwid_plugin_version'));
24
+ wp_enqueue_style('ecwid-products-list-css');
25
+ wp_enqueue_style('ecwid-recently-viewed-css', ECWID_PLUGIN_URL . 'css/recently-viewed.css', array(), get_option('ecwid_plugin_version'));
26
+ extract($args);
27
+
28
+ $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
29
+
30
+ echo $before_widget;
31
+
32
+ if ( $title )
33
+ echo $before_title . $title . $after_title;
34
+
35
+ echo '<!-- noptimize -->' . ecwid_get_scriptjs_code() . '<!-- /noptimize -->';
36
+
37
+ $recently_viewed = false;
38
+ if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
39
+ $recently_viewed = json_decode($_COOKIE['ecwid-shopping-cart-recently-viewed']);
40
+ }
41
+ $recently_viewed = json_decode(stripslashes(@$_COOKIE['ecwid-shopping-cart-recently-viewed']));
42
+
43
+ if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id()) {
44
+ $recently_viewed = null;
45
+ }
46
+
47
+ echo '<div class="ecwid-recently-viewed-products" data-ecwid-max="' . $instance['number_of_products'] . '">';
48
+
49
+
50
+ $api = false;
51
+ if (ecwid_is_api_enabled()) {
52
+ $api = ecwid_new_product_api();
53
+ }
54
+
55
+ $counter = 0;
56
+ $ids = array();
57
+ if ($recently_viewed && isset($recently_viewed->products)) {
58
+
59
+ for ($i = count($recently_viewed->products) - 1; $i >= 0; $i--) {
60
+ $product = $recently_viewed->products[$i];
61
+
62
+ $counter++;
63
+ if (isset($product->id) && isset($product->link)) {
64
+ $ids[] = $product->id;
65
+ $hide = $counter > $instance['number_of_products'] ? ' hidden' : '';
66
+
67
+ $force_image = '';
68
+ if ($api) {
69
+ $product_https = $api->get_product_https($product->id);
70
+ $force_image = $product_https['imageUrl'];
71
+ }
72
+
73
+ $name = isset($product_https) ? $product_https['name']: '';
74
+
75
+ echo <<<HTML
76
+ <a class="product$hide" href="$product->link" alt="$name" title="$name">
77
+ <div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-$product->id" data-single-product-link="$product->link" itemscope itemtype="http://schema.org/Product" data-single-product-id="$product->id">
78
+ <div itemprop="image" data-force-image="$force_image"></div>
79
+ <div class="ecwid-title" itemprop="name"></div>
80
+ <div itemtype="http://schema.org/Offer" itemscope itemprop="offers"><div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div></div>
81
+ </div>
82
+
83
+ <!-- noptimize --><script type="text/javascript">xSingleProduct();</script><!-- /noptimize -->
84
+ </a>
85
+ HTML;
86
+ }
87
+ }
88
+ } else {
89
+ echo <<<HTML
90
+ <script type="text/javascript">
91
+ jQuery(document).ready(function() {
92
+ wpCookies.remove('ecwid-shopping-cart-recently-viewed');
93
+ recently_viewed = {products: []};
94
+ });
95
+ </script>
96
+ HTML;
97
+ }
98
+ $ids_string = '';
99
+ if (!empty($ids)) {
100
+ $ids_string = implode(',', $ids);
101
+ }
102
+
103
+ echo <<<HTML
104
+ <script type="text/javascript">
105
+ <!--
106
+ jQuery(document).ready(function() {
107
+ jQuery('#$this->id .ecwid-recently-viewed-products').recentlyViewedProducts();
108
+ });
109
+ -->
110
+ </script>
111
+ HTML;
112
+
113
+ echo "</div>";
114
+
115
+ $store_link_message = empty($instance['store_link_title']) ? __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart') : $instance['store_link_title'];
116
+
117
+ $page_id = ecwid_get_current_store_page_id();
118
+ $post = get_post($page_id);
119
+
120
+ if (empty($recently_viewed->products)) {
121
+ echo '<a class="show-if-empty" href="' . ecwid_get_store_page_url() . '">' . $store_link_message . '</a>';
122
+ }
123
+
124
+ echo $after_widget;
125
+ }
126
+
127
+ function update($new_instance, $old_instance){
128
+ $instance = $old_instance;
129
+ $instance['title'] = strip_tags(stripslashes($new_instance['title']));
130
+ $instance['store_link_title'] = strip_tags(stripslashes($new_instance['store_link_title']));
131
+ $num = intval($new_instance['number_of_products']);
132
+ if ($num > $this->max || $num < $this->min) {
133
+ $num = $this->default;
134
+ }
135
+ $instance['number_of_products'] = intval($new_instance['number_of_products']);
136
+
137
+ return $instance;
138
+ }
139
+
140
+ function form($instance){
141
+
142
+ $instance = wp_parse_args( (array) $instance,
143
+ array(
144
+ 'title' => __('Recently Viewed Products', 'ecwid-shopping-cart'),
145
+ 'store_link_title' => __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart'),
146
+ 'number_of_products' => 3
147
+ )
148
+ );
149
+
150
+ $title = htmlspecialchars($instance['title']);
151
+ $store_link_title = htmlspecialchars($instance['store_link_title']);
152
+ $number_of_products = $instance['number_of_products'];
153
+ if ($number_of_products)
154
+
155
+ echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title') . ': <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
156
+ echo '<p><label for="' . $this->get_field_name('store_link_title') . '">' . __('Store Link Title', 'ecwid-shopping-cart') . ': <input style="width:100%;" id="' . $this->get_field_id('store_link_title') . '" name="' . $this->get_field_name('store_link_title') . '" type="text" value="' . $store_link_title . '" /></label></p>';
157
+ echo '<p><label for="' . $this->get_field_name('number_of_products') . '">' . __( 'Number of products to show', 'ecwid-shopping-cart' ) . ': <input style="width:100%;" id="' . $this->get_field_id('number_of_products') . '" name="' . $this->get_field_name('number_of_products') . '" type="number" min="' . $this->min . '" max="' . $this->max . '" value="' . $number_of_products . '" /></label></p>';
158
+ }
159
+
160
+ function is_valid_number_of_products($num) {
161
+ return is_numeric($num) && $num <= $this->max && $num >= $this->min;
162
+ }
163
+ }
includes/widgets/class-ecwid-widget-search.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
- class Ecwid_Widget_Search extends WP_Widget {
3
-
4
- static public function is_active_widget() {
5
- return is_active_widget(false, false, 'ecwidsearch');
6
- }
7
-
8
- function __construct() {
9
- $widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __("Displays a simple search box for your customers to find a product in your storex", 'ecwid-shopping-cart'));
10
- parent::__construct('ecwidsearch', __('Product Search', 'ecwid-shopping-cart'), $widget_ops);
11
- }
12
-
13
- function widget($args, $instance) {
14
- extract($args);
15
- $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
16
-
17
- echo $before_widget;
18
-
19
- if ( $title )
20
- echo $before_title . $title . $after_title;
21
-
22
- echo '<div>';
23
- echo '<!-- noptimize -->';
24
-
25
- echo ecwid_get_scriptjs_code();
26
- echo ecwid_get_product_browser_url_script();
27
-
28
- $code = ecwid_get_search_js_code();
29
- echo '<script data-cfasync="false" type="text/javascript"> ' . $code . ' </script>';
30
-
31
- echo '<!-- /noptimize -->';
32
- echo '</div>';
33
-
34
- echo $after_widget;
35
- }
36
-
37
- function update($new_instance, $old_instance){
38
- $instance = $old_instance;
39
- $instance['title'] = strip_tags(stripslashes($new_instance['title']));
40
-
41
- return $instance;
42
- }
43
-
44
- function form($instance){
45
- $instance = wp_parse_args( (array) $instance, array('title'=>'') );
46
-
47
- $title = htmlspecialchars($instance['title']);
48
-
49
- echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
50
- }
51
-
52
- }
1
+ <?php
2
+ class Ecwid_Widget_Search extends WP_Widget {
3
+
4
+ static public function is_active_widget() {
5
+ return is_active_widget(false, false, 'ecwidsearch');
6
+ }
7
+
8
+ function __construct() {
9
+ $widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __("Displays a simple search box for your customers to find a product in your storex", 'ecwid-shopping-cart'));
10
+ parent::__construct('ecwidsearch', __('Product Search', 'ecwid-shopping-cart'), $widget_ops);
11
+ }
12
+
13
+ function widget($args, $instance) {
14
+ extract($args);
15
+ $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
16
+
17
+ echo $before_widget;
18
+
19
+ if ( $title )
20
+ echo $before_title . $title . $after_title;
21
+
22
+ echo '<div>';
23
+ echo '<!-- noptimize -->';
24
+
25
+ echo ecwid_get_scriptjs_code();
26
+ echo ecwid_get_product_browser_url_script();
27
+
28
+ $code = ecwid_get_search_js_code();
29
+ echo '<script data-cfasync="false" type="text/javascript"> ' . $code . ' </script>';
30
+
31
+ echo '<!-- /noptimize -->';
32
+ echo '</div>';
33
+
34
+ echo $after_widget;
35
+ }
36
+
37
+ function update($new_instance, $old_instance){
38
+ $instance = $old_instance;
39
+ $instance['title'] = strip_tags(stripslashes($new_instance['title']));
40
+
41
+ return $instance;
42
+ }
43
+
44
+ function form($instance){
45
+ $instance = wp_parse_args( (array) $instance, array('title'=>'') );
46
+
47
+ $title = htmlspecialchars($instance['title']);
48
+
49
+ echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
50
+ }
51
+
52
+ }
includes/widgets/class-ecwid-widget-store-link.php CHANGED
@@ -1,36 +1,36 @@
1
- <?php
2
- class Ecwid_Widget_Store_Link extends WP_Widget {
3
-
4
- function __construct() {
5
- $widget_ops = array('classname' => 'widget_ecwid_store_link', 'description' => __('Displays a link to the store page in sidebar for customer to quickly access your store from any page on the site.', 'ecwid-shopping-cart'));
6
- parent::__construct('ecwidstorelink', __('Store Page Link', 'ecwid-shopping-cart'), $widget_ops);
7
- }
8
-
9
- function widget($args, $instance) {
10
- extract($args);
11
- echo $before_widget;
12
-
13
- echo '<div>';
14
-
15
- echo '<a href="' . ecwid_get_store_page_url() . '">' . $instance['label'] . '</a>';
16
- echo '</div>';
17
-
18
- echo $after_widget;
19
- }
20
-
21
- function update($new_instance, $old_instance){
22
- $instance = $old_instance;
23
- $instance['label'] = strip_tags(stripslashes($new_instance['label']));
24
-
25
- return $instance;
26
- }
27
-
28
- function form($instance){
29
- $instance = wp_parse_args( (array) $instance, array( 'label' => __('Shop', 'ecwid-shopping-cart') ) );
30
-
31
- $label = htmlspecialchars($instance['label']);
32
-
33
- echo '<p><label for="' . $this->get_field_name('label') . '">' . __('Text') . ': <input style="width:100%;" id="' . $this->get_field_id('label') . '" name="' . $this->get_field_name('label') . '" type="text" value="' . $label . '" /></label></p>';
34
- }
35
-
36
  }
1
+ <?php
2
+ class Ecwid_Widget_Store_Link extends WP_Widget {
3
+
4
+ function __construct() {
5
+ $widget_ops = array('classname' => 'widget_ecwid_store_link', 'description' => __('Displays a link to the store page in sidebar for customer to quickly access your store from any page on the site.', 'ecwid-shopping-cart'));
6
+ parent::__construct('ecwidstorelink', __('Store Page Link', 'ecwid-shopping-cart'), $widget_ops);
7
+ }
8
+
9
+ function widget($args, $instance) {
10
+ extract($args);
11
+ echo $before_widget;
12
+
13
+ echo '<div>';
14
+
15
+ echo '<a href="' . ecwid_get_store_page_url() . '">' . $instance['label'] . '</a>';
16
+ echo '</div>';
17
+
18
+ echo $after_widget;
19
+ }
20
+
21
+ function update($new_instance, $old_instance){
22
+ $instance = $old_instance;
23
+ $instance['label'] = strip_tags(stripslashes($new_instance['label']));
24
+
25
+ return $instance;
26
+ }
27
+
28
+ function form($instance){
29
+ $instance = wp_parse_args( (array) $instance, array( 'label' => __('Shop', 'ecwid-shopping-cart') ) );
30
+
31
+ $label = htmlspecialchars($instance['label']);
32
+
33
+ echo '<p><label for="' . $this->get_field_name('label') . '">' . __('Text') . ': <input style="width:100%;" id="' . $this->get_field_id('label') . '" name="' . $this->get_field_name('label') . '" type="text" value="' . $label . '" /></label></p>';
34
+ }
35
+
36
  }
includes/widgets/class-ecwid-widget-vcategories.php CHANGED
@@ -1,46 +1,46 @@
1
- <?php
2
- class Ecwid_Widget_VCategories extends WP_Widget {
3
-
4
- function __construct() {
5
- $widget_ops = array('classname' => 'widget_ecwid_vcategories', 'description' => __('Adds vertical categories block to let the customer navigate your store.', 'ecwid-shopping-cart'));
6
- parent::__construct('ecwidvcategories', __('Store Categories', 'ecwid-shopping-cart'), $widget_ops);
7
- }
8
-
9
- function widget($args, $instance) {
10
- extract($args);
11
- $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
12
-
13
- echo $before_widget;
14
-
15
- if ( $title )
16
- echo $before_title . $title . $after_title;
17
-
18
- echo '<div>';
19
- echo '<!-- noptimize -->';
20
-
21
- echo ecwid_get_scriptjs_code();
22
- echo ecwid_get_product_browser_url_script();
23
- echo '<script data-cfasync="false" type="text/javascript"> xVCategories("style="); </script>';
24
-
25
- echo '<!-- /noptimize -->';
26
- echo '</div>';
27
-
28
- echo $after_widget;
29
- }
30
-
31
- function update($new_instance, $old_instance){
32
- $instance = $old_instance;
33
- $instance['title'] = strip_tags(stripslashes($new_instance['title']));
34
-
35
- return $instance;
36
- }
37
-
38
- function form($instance){
39
- $instance = wp_parse_args( (array) $instance, array('title'=>'') );
40
-
41
- $title = htmlspecialchars($instance['title']);
42
-
43
- echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
44
- }
45
-
46
- }
1
+ <?php
2
+ class Ecwid_Widget_VCategories extends WP_Widget {
3
+
4
+ function __construct() {
5
+ $widget_ops = array('classname' => 'widget_ecwid_vcategories', 'description' => __('Adds vertical categories block to let the customer navigate your store.', 'ecwid-shopping-cart'));
6
+ parent::__construct('ecwidvcategories', __('Store Categories', 'ecwid-shopping-cart'), $widget_ops);
7
+ }
8
+
9
+ function widget($args, $instance) {
10
+ extract($args);
11
+ $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
12
+
13
+ echo $before_widget;
14
+
15
+ if ( $title )
16
+ echo $before_title . $title . $after_title;
17
+
18
+ echo '<div>';
19
+ echo '<!-- noptimize -->';
20
+
21
+ echo ecwid_get_scriptjs_code();
22
+ echo ecwid_get_product_browser_url_script();
23
+ echo '<script data-cfasync="false" type="text/javascript"> xVCategories("style="); </script>';
24
+
25
+ echo '<!-- /noptimize -->';
26
+ echo '</div>';
27
+
28
+ echo $after_widget;
29
+ }
30
+
31
+ function update($new_instance, $old_instance){
32
+ $instance = $old_instance;
33
+ $instance['title'] = strip_tags(stripslashes($new_instance['title']));
34
+
35
+ return $instance;
36
+ }
37
+
38
+ function form($instance){
39
+ $instance = wp_parse_args( (array) $instance, array('title'=>'') );
40
+
41
+ $title = htmlspecialchars($instance['title']);
42
+
43
+ echo '<p><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width:100%;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
44
+ }
45
+
46
+ }
includes/widgets/class-ecwid-widget-vertical-categories-list.php CHANGED
@@ -1,75 +1,75 @@
1
- <?php
2
- class Ecwid_Widget_Vertical_Categories_List extends WP_Widget {
3
-
4
- /**
5
- * Sets up a new Meta widget instance.
6
- *
7
- * @since 2.8.0
8
- * @access public
9
- */
10
- public function __construct() {
11
- $widget_ops = array('classname' => 'widget_ecwid_vcategories_list', 'description' => __( 'Adds root categories list to the sidebar to let your customers navigate the store.', 'ecwid-shopping-cart' ) );
12
- parent::__construct( 'ecwidvcategorieslist', __('Store Root Categories', 'ecwid-shopping-cart' ), $widget_ops);
13
- }
14
-
15
- public function widget( $args, $instance ) {
16
-
17
- $categories = ecwid_get_categories();
18
-
19
- if (empty($categories)) return;
20
-
21
- /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
22
- $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Browse by Category', 'ecwid-shopping-cart' ) : $instance['title'], $instance, $this->id_base );
23
-
24
- echo $args['before_widget'];
25
- if ( $title ) {
26
- echo $args['before_title'] . $title . $args['after_title'];
27
- }
28
-
29
- echo '<ul>';
30
-
31
- foreach ($categories as $category) {
32
- echo '<li>';
33
- echo '<a href="' . ecwid_get_store_page_url() . $category->link . '">' . $category->name . '</a>';
34
- echo '</li>';
35
- }
36
-
37
- echo '</ul>';
38
- echo $args['after_widget'];
39
- }
40
-
41
- /**
42
- * Handles updating settings for the current Meta widget instance.
43
- *
44
- * @since 2.8.0
45
- * @access public
46
- *
47
- * @param array $new_instance New settings for this instance as input by the user via
48
- * WP_Widget::form().
49
- * @param array $old_instance Old settings for this instance.
50
- * @return array Updated settings to save.
51
- */
52
- public function update( $new_instance, $old_instance ) {
53
- $instance = $old_instance;
54
- $instance['title'] = sanitize_text_field( $new_instance['title'] );
55
-
56
- return $instance;
57
- }
58
-
59
- /**
60
- * Outputs the settings form for the Meta widget.
61
- *
62
- * @since 2.8.0
63
- * @access public
64
- *
65
- * @param array $instance Current settings.
66
- */
67
- public function form( $instance ) {
68
- $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Browse by Category', 'ecwid-shopping-cart' ) ) );
69
- $title = sanitize_text_field( $instance['title'] );
70
- ?>
71
- <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
72
- <div class="ecwid-reset-categories-cache-block"></div>
73
- <?php
74
- }
75
- }
1
+ <?php
2
+ class Ecwid_Widget_Vertical_Categories_List extends WP_Widget {
3
+
4
+ /**
5
+ * Sets up a new Meta widget instance.
6
+ *
7
+ * @since 2.8.0
8
+ * @access public
9
+ */
10
+ public function __construct() {
11
+ $widget_ops = array('classname' => 'widget_ecwid_vcategories_list', 'description' => __( 'Adds root categories list to the sidebar to let your customers navigate the store.', 'ecwid-shopping-cart' ) );
12
+ parent::__construct( 'ecwidvcategorieslist', __('Store Root Categories', 'ecwid-shopping-cart' ), $widget_ops);
13
+ }
14
+
15
+ public function widget( $args, $instance ) {
16
+
17
+ $categories = ecwid_get_categories();
18
+
19
+ if (empty($categories)) return;
20
+
21
+ /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
22
+ $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Browse by Category', 'ecwid-shopping-cart' ) : $instance['title'], $instance, $this->id_base );
23
+
24
+ echo $args['before_widget'];
25
+ if ( $title ) {
26
+ echo $args['before_title'] . $title . $args['after_title'];
27
+ }
28
+
29
+ echo '<ul>';
30
+
31
+ foreach ($categories as $category) {
32
+ echo '<li>';
33
+ echo '<a href="' . ecwid_get_store_page_url() . $category->link . '">' . $category->name . '</a>';
34
+ echo '</li>';
35
+ }
36
+
37
+ echo '</ul>';
38
+ echo $args['after_widget'];
39
+ }
40
+
41
+ /**
42
+ * Handles updating settings for the current Meta widget instance.
43
+ *
44
+ * @since 2.8.0
45
+ * @access public
46
+ *
47
+ * @param array $new_instance New settings for this instance as input by the user via
48
+ * WP_Widget::form().
49
+ * @param array $old_instance Old settings for this instance.
50
+ * @return array Updated settings to save.
51
+ */
52
+ public function update( $new_instance, $old_instance ) {
53
+ $instance = $old_instance;
54
+ $instance['title'] = sanitize_text_field( $new_instance['title'] );
55
+
56
+ return $instance;
57
+ }
58
+
59
+ /**
60
+ * Outputs the settings form for the Meta widget.
61
+ *
62
+ * @since 2.8.0
63
+ * @access public
64
+ *
65
+ * @param array $instance Current settings.
66
+ */
67
+ public function form( $instance ) {
68
+ $instance = wp_parse_args( (array) $instance, array( 'title' => __( 'Browse by Category', 'ecwid-shopping-cart' ) ) );
69
+ $title = sanitize_text_field( $instance['title'] );
70
+ ?>
71
+ <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
72
+ <div class="ecwid-reset-categories-cache-block"></div>
73
+ <?php
74
+ }
75
+ }
js/admin.js CHANGED
@@ -1,205 +1,205 @@
1
- jQuery(document).ready(function() {
2
- window.ecwidOpenAdminPage = function(place) {
3
- jQuery('#ecwid-frame')[0].contentWindow.postMessage(JSON.stringify({
4
- ecwidAppNs: "ecwid-wp-plugin",
5
- method: "openPage",
6
- data: place
7
- }), "*")
8
- }
9
-
10
-
11
- jQuery('#hide-vote-message').click(function() {
12
- jQuery('#hide-vote-message').addClass('hiding');
13
- jQuery.getJSON(
14
- 'admin-ajax.php',
15
- { action:'ecwid_hide_vote_message' },
16
- function(data) {
17
- jQuery('#hide-vote-message').removeClass('hiding')
18
- .closest('div.update-nag, div.updated.fade').fadeOut();
19
- }
20
- );
21
- });
22
-
23
- jQuery('a.ecwid-message-hide').click(function() {
24
-
25
- var a = this;
26
- jQuery(a).css('cursor', 'wait');
27
- jQuery.getJSON(
28
- 'admin-ajax.php',
29
- {
30
- action: 'ecwid_hide_message',
31
- message: a.name
32
- },
33
- function(data) {
34
- jQuery(a).closest('.ecwid-message').fadeOut();
35
- }
36
- );
37
- });
38
-
39
- if (location.href.match(/wp-admin\/widgets.php/) || location.href.match(/wp-admin\/customize.php/)) {
40
- jQuery('div[id^="widget-"]').filter('div[id*="_ecwid"]').each(function(idx, el) {
41
- if (location.href.match(/wp-admin\/widgets.php\?from-ecwid=/) && el.id.match(/__i__/)) {
42
- if (jQuery('.ecwid-widget').length > 0) {
43
- jQuery(el).insertAfter(jQuery('.ecwid-widget:last'));
44
- } else {
45
- jQuery(el).prependTo(jQuery('#widget-list'));
46
- }
47
- jQuery('.widget-top', el).addClass('ecwid-widget-highlighted');
48
- }
49
-
50
- var classname = el.id.match(/ecwid(.*)-__i__/);
51
- if (classname) {
52
- classname = 'ecwid-widget-' + classname[1];
53
- jQuery(el).addClass('ecwid-widget')
54
- .find('.widget-top')
55
- .addClass(classname);
56
- }
57
-
58
- });
59
-
60
- jQuery(document).on('widget-added', function(event, widgetElement) {
61
- if (typeof this.widgets == 'undefined') {
62
- this.widgets = {
63
- 'ecwid-widget-badge': 'ecwidBadge',
64
- 'ecwid-widget-search': 'productSearch',
65
- 'ecwid-widget-recentlyviewed': 'recentlyViewedProducts',
66
- 'ecwid-widget-minicart': 'shoppingCart',
67
- 'ecwid-widget-minicart_miniview': 'miniShoppingCart',
68
- 'ecwid-widget-vcategories': 'storeCategories',
69
- 'ecwid-widget-storelink': 'storePageLink',
70
- 'ecwid-widget-floatingshoppingcart': 'floatingShoppingCart',
71
- 'ecwid-widget-vcategorieslist': 'storeRootCategories'
72
- };
73
- }
74
-
75
- jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
76
- prepareVerticalCategoriesWidget(el);
77
- });
78
- });
79
- }
80
-
81
- if (location.href.match(/wp-admin\/widgets.php/)) {
82
- jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
83
- prepareVerticalCategoriesWidget(el);
84
- });
85
- }
86
-
87
- jQuery('.drop-down').each(function(idx, el) {
88
- jQuery(el).find('>span').click(function (e) {
89
- jQuery(e.target).closest('.drop-down').addClass('hover');
90
-
91
- jQuery(window).bind('click.ecwidDropDown', function(e) {
92
- if (jQuery(e.target).closest('.drop-down')[0] != el) {
93
- jQuery(window).unbind('.ecwidDropDown');
94
- jQuery(el).removeClass('hover');
95
- }
96
- });
97
- })
98
- });
99
-
100
- jQuery('#ecwid-connect-no-oauth').click(function() {
101
- if (jQuery('#ecwid-store-id').val()) {
102
- location.href = this.href + '&force_store_id=' + jQuery('#ecwid-store-id').val();
103
- }
104
- return false;
105
- });
106
-
107
- var admin_pages = [
108
- {
109
- url: ecwid_l10n.dashboard_url,
110
- title: ecwid_l10n.dashboard,
111
- place: 'dashboard'
112
- },
113
- {
114
- url: ecwid_l10n.products_url,
115
- title: ecwid_l10n.products,
116
- place: 'products'
117
- },
118
- {
119
- url: ecwid_l10n.orders_url,
120
- title: ecwid_l10n.orders,
121
- place: 'orders'
122
- }
123
- ];
124
-
125
- if (jQuery('#ecwid-frame').length > 0) {
126
- if (jQuery('div.update-nag').length > 0) {
127
- jQuery('#ecwid-frame').addClass('has-wp-message');
128
- }
129
- for (var i = 0; i < admin_pages.length; i++) {
130
- jQuery('li.toplevel_page_ecwid .wp-submenu a[href="' + admin_pages[i].url + '"]')
131
- .data('ecwid-menu', admin_pages[i])
132
- .click(function() {
133
- var ecwidMenu = jQuery(this).data('ecwid-menu');
134
- jQuery('.toplevel_page_ecwid *.current').removeClass('current');
135
- jQuery(this).addClass('current').closest('li').addClass('current');
136
-
137
- ecwidOpenAdminPage(ecwidMenu.place);
138
-
139
- return false;
140
- });
141
- }
142
- }
143
-
144
- jQuery('#ecwid-get-mobile-app').click(function() {
145
- ecwidOpenAdminPage('mobile');
146
-
147
- return false;
148
- });
149
-
150
- if (document.location.hash == 'mobile') {
151
- ecwidOpenAdminPage('mobile');
152
- }
153
- });
154
-
155
- prepareVerticalCategoriesWidget = function(element) {
156
-
157
- element = jQuery(element);
158
-
159
- if (element.data('vcategoriesInitialized')) return;
160
-
161
- if (jQuery('input.widget-id', element).val() == 'ecwidvcategorieslist-__i__') return;
162
-
163
- resetCache = function(callback) {
164
- jQuery.getJSON(
165
- 'admin-ajax.php',
166
- {
167
- action: 'ecwid_reset_categories_cache'
168
- },
169
- callback
170
- );
171
- }
172
-
173
- $target = jQuery('<p class="ecwid-cats-reset-cache">').appendTo(jQuery('.ecwid-reset-categories-cache-block', element));
174
-
175
- jQuery('<span>')
176
- .text(ecwid_l10n.cache_updated)
177
- .addClass('ecwid-reset-categories-cache-updated')
178
- .appendTo($target);
179
-
180
- var a = jQuery('<a>')
181
- .text(ecwid_l10n.reset_cats_cache)
182
- .attr('href', 'javascript:void(0);')
183
- .addClass('ecwid-reset-categories-cache')
184
- .appendTo($target);
185
- a.click(function() {
186
-
187
- var that = this;
188
- jQuery(that).css('cursor', 'wait');
189
- resetCache(function() {
190
- jQuery(that).fadeOut(100, function() {
191
- jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeIn(100, function() {
192
- setTimeout(function () {
193
- jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeOut(500, function () {
194
- jQuery(that).fadeIn(500);
195
- })
196
- }, 4000);
197
- });
198
- });
199
-
200
- jQuery(that).css('cursor', 'pointer');
201
- });
202
- });
203
-
204
- element.data('vcategoriesInitialized', true);
205
- }
1
+ jQuery(document).ready(function() {
2
+ window.ecwidOpenAdminPage = function(place) {
3
+ jQuery('#ecwid-frame')[0].contentWindow.postMessage(JSON.stringify({
4
+ ecwidAppNs: "ecwid-wp-plugin",
5
+ method: "openPage",
6
+ data: place
7
+ }), "*")
8
+ }
9
+
10
+
11
+ jQuery('#hide-vote-message').click(function() {
12
+ jQuery('#hide-vote-message').addClass('hiding');
13
+ jQuery.getJSON(
14
+ 'admin-ajax.php',
15
+ { action:'ecwid_hide_vote_message' },
16
+ function(data) {
17
+ jQuery('#hide-vote-message').removeClass('hiding')
18
+ .closest('div.update-nag, div.updated.fade').fadeOut();
19
+ }
20
+ );
21
+ });
22
+
23
+ jQuery('a.ecwid-message-hide').click(function() {
24
+
25
+ var a = this;
26
+ jQuery(a).css('cursor', 'wait');
27
+ jQuery.getJSON(
28
+ 'admin-ajax.php',
29
+ {
30
+ action: 'ecwid_hide_message',
31
+ message: a.name
32
+ },
33
+ function(data) {
34
+ jQuery(a).closest('.ecwid-message').fadeOut();
35
+ }
36
+ );
37
+ });
38
+
39
+ if (location.href.match(/wp-admin\/widgets.php/) || location.href.match(/wp-admin\/customize.php/)) {
40
+ jQuery('div[id^="widget-"]').filter('div[id*="_ecwid"]').each(function(idx, el) {
41
+ if (location.href.match(/wp-admin\/widgets.php\?from-ecwid=/) && el.id.match(/__i__/)) {
42
+ if (jQuery('.ecwid-widget').length > 0) {
43
+ jQuery(el).insertAfter(jQuery('.ecwid-widget:last'));
44
+ } else {
45
+ jQuery(el).prependTo(jQuery('#widget-list'));
46
+ }
47
+ jQuery('.widget-top', el).addClass('ecwid-widget-highlighted');
48
+ }
49
+
50
+ var classname = el.id.match(/ecwid(.*)-__i__/);
51
+ if (classname) {
52
+ classname = 'ecwid-widget-' + classname[1];
53
+ jQuery(el).addClass('ecwid-widget')
54
+ .find('.widget-top')
55
+ .addClass(classname);
56
+ }
57
+
58
+ });
59
+
60
+ jQuery(document).on('widget-added', function(event, widgetElement) {
61
+ if (typeof this.widgets == 'undefined') {
62
+ this.widgets = {
63
+ 'ecwid-widget-badge': 'ecwidBadge',
64
+ 'ecwid-widget-search': 'productSearch',
65
+ 'ecwid-widget-recentlyviewed': 'recentlyViewedProducts',
66
+ 'ecwid-widget-minicart': 'shoppingCart',
67
+ 'ecwid-widget-minicart_miniview': 'miniShoppingCart',
68
+ 'ecwid-widget-vcategories': 'storeCategories',
69
+ 'ecwid-widget-storelink': 'storePageLink',
70
+ 'ecwid-widget-floatingshoppingcart': 'floatingShoppingCart',
71
+ 'ecwid-widget-vcategorieslist': 'storeRootCategories'
72
+ };
73
+ }
74
+
75
+ jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
76
+ prepareVerticalCategoriesWidget(el);
77
+ });
78
+ });
79
+ }
80
+
81
+ if (location.href.match(/wp-admin\/widgets.php/)) {
82
+ jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
83
+ prepareVerticalCategoriesWidget(el);
84
+ });
85
+ }
86
+
87
+ jQuery('.drop-down').each(function(idx, el) {
88
+ jQuery(el).find('>span').click(function (e) {
89
+ jQuery(e.target).closest('.drop-down').addClass('hover');
90
+
91
+ jQuery(window).bind('click.ecwidDropDown', function(e) {
92
+ if (jQuery(e.target).closest('.drop-down')[0] != el) {
93
+ jQuery(window).unbind('.ecwidDropDown');
94
+ jQuery(el).removeClass('hover');
95
+ }
96
+ });
97
+ })
98
+ });
99
+
100
+ jQuery('#ecwid-connect-no-oauth').click(function() {
101
+ if (jQuery('#ecwid-store-id').val()) {
102
+ location.href = this.href + '&force_store_id=' + jQuery('#ecwid-store-id').val();
103
+ }
104
+ return false;
105
+ });
106
+
107
+ var admin_pages = [
108
+ {
109
+ url: ecwid_l10n.dashboard_url,
110
+ title: ecwid_l10n.dashboard,
111
+ place: 'dashboard'
112
+ },
113
+ {
114
+ url: ecwid_l10n.products_url,
115
+ title: ecwid_l10n.products,
116
+ place: 'products'
117
+ },
118
+ {
119
+ url: ecwid_l10n.orders_url,
120
+ title: ecwid_l10n.orders,
121
+ place: 'orders'
122
+ }
123
+ ];
124
+
125
+ if (jQuery('#ecwid-frame').length > 0) {
126
+ if (jQuery('div.update-nag').length > 0) {
127
+ jQuery('#ecwid-frame').addClass('has-wp-message');
128
+ }
129
+ for (var i = 0; i < admin_pages.length; i++) {
130
+ jQuery('li.toplevel_page_ecwid .wp-submenu a[href="' + admin_pages[i].url + '"]')
131
+ .data('ecwid-menu', admin_pages[i])
132
+ .click(function() {
133
+ var ecwidMenu = jQuery(this).data('ecwid-menu');
134
+ jQuery('.toplevel_page_ecwid *.current').removeClass('current');
135
+ jQuery(this).addClass('current').closest('li').addClass('current');
136
+
137
+ ecwidOpenAdminPage(ecwidMenu.place);
138
+
139
+ return false;
140
+ });
141
+ }
142
+ }
143
+
144
+ jQuery('#ecwid-get-mobile-app').click(function() {
145
+ ecwidOpenAdminPage('mobile');
146
+
147
+ return false;
148
+ });
149
+
150
+ if (document.location.hash == 'mobile') {
151
+ ecwidOpenAdminPage('mobile');
152
+ }
153
+ });
154
+
155
+ prepareVerticalCategoriesWidget = function(element) {
156
+
157
+ element = jQuery(element);
158
+
159
+ if (element.data('vcategoriesInitialized')) return;
160
+
161
+ if (jQuery('input.widget-id', element).val() == 'ecwidvcategorieslist-__i__') return;
162
+
163
+ resetCache = function(callback) {
164
+ jQuery.getJSON(
165
+ 'admin-ajax.php',
166
+ {
167
+ action: 'ecwid_reset_categories_cache'
168
+ },
169
+ callback
170
+ );
171
+ }
172
+
173
+ $target = jQuery('<p class="ecwid-cats-reset-cache">').appendTo(jQuery('.ecwid-reset-categories-cache-block', element));
174
+
175
+ jQuery('<span>')
176
+ .text(ecwid_l10n.cache_updated)
177
+ .addClass('ecwid-reset-categories-cache-updated')
178
+ .appendTo($target);
179
+
180
+ var a = jQuery('<a>')
181
+ .text(ecwid_l10n.reset_cats_cache)
182
+ .attr('href', 'javascript:void(0);')
183
+ .addClass('ecwid-reset-categories-cache')
184
+ .appendTo($target);
185
+ a.click(function() {
186
+
187
+ var that = this;
188
+ jQuery(that).css('cursor', 'wait');
189
+ resetCache(function() {
190
+ jQuery(that).fadeOut(100, function() {
191
+ jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeIn(100, function() {
192
+ setTimeout(function () {
193
+ jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeOut(500, function () {
194
+ jQuery(that).fadeIn(500);
195
+ })
196
+ }, 4000);
197
+ });
198
+ });
199
+
200
+ jQuery(that).css('cursor', 'pointer');
201
+ });
202
+ });
203
+
204
+ element.data('vcategoriesInitialized', true);
205
+ }
js/appearance.js CHANGED
@@ -1,7 +1,7 @@
1
- if (!Modernizr.svg) {
2
- for (var i in {grid:1,list:1,table:1}) {
3
- var parent = jQuery('.' + i + '.ecwid-pb-view-size .main-area');
4
- parent.find('svg').remove();
5
- parent.append('<div class="fallback-image ' + i + '-image"></div>');
6
- }
7
  }
1
+ if (!Modernizr.svg) {
2
+ for (var i in {grid:1,list:1,table:1}) {
3
+ var parent = jQuery('.' + i + '.ecwid-pb-view-size .main-area');
4
+ parent.find('svg').remove();
5
+ parent.append('<div class="fallback-image ' + i + '-image"></div>');
6
+ }
7
  }
js/cf7designer.js CHANGED
@@ -1,5 +1,5 @@
1
- if (typeof(Ecwid) == 'object') {
2
- Ecwid.OnAPILoaded.add(function(page){
3
- jQuery('html').attr('id', 'ecwid_html')
4
- });
5
  }
1
+ if (typeof(Ecwid) == 'object') {
2
+ Ecwid.OnAPILoaded.add(function(page){
3
+ jQuery('html').attr('id', 'ecwid_html')
4
+ });
5
  }
js/create_scroller.js CHANGED
@@ -1,12 +1,12 @@
1
- jQuery(document).ready(function() {
2
- if (jQuery('#ecwid_product_browser_scroller').length == 0) {
3
-
4
- var parent = jQuery('div[id^="ecwid-store-"]');
5
-
6
- if (jQuery('.ecwid-shopping-cart-categories').length == 1) {
7
- parent = jQuery('.ecwid-shopping-cart-categories');
8
- }
9
-
10
- parent.before('<div id="ecwid_product_browser_scroller" class="ecwid-scroller-adjustment"></div>');
11
- }
12
  });
1
+ jQuery(document).ready(function() {
2
+ if (jQuery('#ecwid_product_browser_scroller').length == 0) {
3
+
4
+ var parent = jQuery('div[id^="ecwid-store-"]');
5
+
6
+ if (jQuery('.ecwid-shopping-cart-categories').length == 1) {
7
+ parent = jQuery('.ecwid-shopping-cart-categories');
8
+ }
9
+
10
+ parent.before('<div id="ecwid_product_browser_scroller" class="ecwid-scroller-adjustment"></div>');
11
+ }
12
  });
js/dashboard.js CHANGED
@@ -1,55 +1,55 @@
1
- jQuery(window).resize(function() {
2
- if (jQuery(this).width() < 768) {
3
- jQuery('.ecwid-admin').addClass('width-smaller');
4
- var head =
5
- jQuery('.ecwid-dashboard .box .head');
6
- /*
7
- head.addClass('drop-down');
8
- head.find('h2').addClass('drop-down-head');
9
- head.find('ul').addClass('drop-down-content open').removeClass('head-links');*/
10
- } else {
11
- jQuery('.ecwid-admin').removeClass('width-smaller');
12
- }
13
- }).trigger('resize');
14
-
15
- show_reconnect = function() {
16
- jQuery('<div class="ecwid-popup"></div>').load(
17
- 'admin-post.php?action=ecwid_show_reconnect',
18
- '',
19
- function() {
20
- jQuery('.ecwid-popup .close').click(function() {
21
- jQuery(this).closest('.ecwid-popup').remove();
22
- });
23
- }
24
- ).appendTo('body');
25
-
26
- }
27
-
28
-
29
- function ecwidSetPopupCentering(iframeSelector) {
30
- if (!iframeSelector) {
31
- if (console) console.log("Selector should be set");
32
- return;
33
- }
34
- var iframeElement = document.querySelector(iframeSelector);
35
- if (iframeElement === null) {
36
- if (console) console.log("Element not found by selector " + iframeSelector);
37
- return;
38
- }
39
- window.addEventListener('scroll', function(e) {
40
- sendCenteringSettings(iframeElement);
41
- });
42
- window.addEventListener('resize', function(e) {
43
- sendCenteringSettings(iframeElement);
44
- });
45
- sendCenteringSettings(iframeElement);
46
- function sendCenteringSettings(iframeElement) {
47
- var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
48
- var clientHeight = window.innerHeight;
49
- var data = {
50
- parentWindowVisibleHeight: clientHeight,
51
- visibleHeightAboveIframe: iframeElement.getBoundingClientRect().top
52
- };
53
- iframeElement.contentWindow.postMessage(JSON.stringify({data: data, method: 'setupPopupCentering'}), '*');
54
- }
55
- }
1
+ jQuery(window).resize(function() {
2
+ if (jQuery(this).width() < 768) {
3
+ jQuery('.ecwid-admin').addClass('width-smaller');
4
+ var head =
5
+ jQuery('.ecwid-dashboard .box .head');
6
+ /*
7
+ head.addClass('drop-down');
8
+ head.find('h2').addClass('drop-down-head');
9
+ head.find('ul').addClass('drop-down-content open').removeClass('head-links');*/
10
+ } else {
11
+ jQuery('.ecwid-admin').removeClass('width-smaller');
12
+ }
13
+ }).trigger('resize');
14
+
15
+ show_reconnect = function() {
16
+ jQuery('<div class="ecwid-popup"></div>').load(
17
+ 'admin-post.php?action=ecwid_show_reconnect',
18
+ '',
19
+ function() {
20
+ jQuery('.ecwid-popup .close').click(function() {
21
+ jQuery(this).closest('.ecwid-popup').remove();
22
+ });
23
+ }
24
+ ).appendTo('body');
25
+
26
+ }
27
+
28
+
29
+ function ecwidSetPopupCentering(iframeSelector) {
30
+ if (!iframeSelector) {
31
+ if (console) console.log("Selector should be set");
32
+ return;
33
+ }
34
+ var iframeElement = document.querySelector(iframeSelector);
35
+ if (iframeElement === null) {
36
+ if (console) console.log("Element not found by selector " + iframeSelector);
37
+ return;
38
+ }
39
+ window.addEventListener('scroll', function(e) {
40
+ sendCenteringSettings(iframeElement);
41
+ });
42
+ window.addEventListener('resize', function(e) {
43
+ sendCenteringSettings(iframeElement);
44
+ });
45
+ sendCenteringSettings(iframeElement);
46
+ function sendCenteringSettings(iframeElement) {
47
+ var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
48
+ var clientHeight = window.innerHeight;
49
+ var data = {
50
+ parentWindowVisibleHeight: clientHeight,
51
+ visibleHeightAboveIframe: iframeElement.getBoundingClientRect().top
52
+ };
53
+ iframeElement.contentWindow.postMessage(JSON.stringify({data: data, method: 'setupPopupCentering'}), '*');
54
+ }
55
+ }
js/floating-shopping-cart.js CHANGED
@@ -1,26 +1,26 @@
1
- var Cart = function() {
2
- var cartIcon = jQuery('.ecwid-cart-icon:first'),
3
- cartCounter = jQuery('a', cartIcon);
4
-
5
- function changeState(cartObj) {
6
- if (cartObj.productsQuantity) {
7
- cartIcon.removeClass('off');
8
- cartCounter.attr('data-count', cartObj.productsQuantity);
9
- }
10
- else {
11
- cartIcon.addClass('off');
12
- cartCounter.attr('data-count', 0);
13
- }
14
- }
15
-
16
- this.init = function() {
17
- Ecwid.OnCartChanged.add(function(cartObj) {
18
- changeState(cartObj);
19
- });
20
- }
21
- };
22
-
23
- if (window.Ecwid) {
24
- var x = new Cart();
25
- x.init();
26
  }
1
+ var Cart = function() {
2
+ var cartIcon = jQuery('.ecwid-cart-icon:first'),
3
+ cartCounter = jQuery('a', cartIcon);
4
+
5
+ function changeState(cartObj) {
6
+ if (cartObj.productsQuantity) {
7
+ cartIcon.removeClass('off');
8
+ cartCounter.attr('data-count', cartObj.productsQuantity);
9
+ }
10
+ else {
11
+ cartIcon.addClass('off');
12
+ cartCounter.attr('data-count', 0);
13
+ }
14
+ }
15
+
16
+ this.init = function() {
17
+ Ecwid.OnCartChanged.add(function(cartObj) {
18
+ changeState(cartObj);
19
+ });
20
+ }
21
+ };
22
+
23
+ if (window.Ecwid) {
24
+ var x = new Cart();
25
+ x.init();
26
  }
js/frontend.js CHANGED
@@ -1,3 +1,3 @@
1
- jQuery(document).ready(function() {
2
- jQuery('.ecwid-store-with-categories a').click(function() {jQuery(':focus').blur()});
3
- })
1
+ jQuery(document).ready(function() {
2
+ jQuery('.ecwid-store-with-categories a').click(function() {jQuery(':focus').blur()});
3
+ })
js/landing.js CHANGED
@@ -1,50 +1,50 @@
1
- switch_to_connect = function() {
2
- jQuery('.ecwid-landing').removeClass('register').addClass('connect');
3
- jQuery('.ecwid-thank-step-one').addClass('active');
4
- wpCookies.set('ecwid_create_store_clicked', 1);
5
- }
6
-
7
- hide_on_loading = '.create-store-button, .create-store-have-account-question';
8
- invisible_on_loading = '.create-store-have-account-link';
9
- show_on_loading = '.create-store-loading, .create-store-loading-note';
10
-
11
- hide_on_success = '.create-store-loading, .create-store-loading-note';
12
- show_on_success = '.create-store-success, .create-store-success-note';
13
-
14
-
15
- jQuery(document).ready(function(){
16
-
17
- jQuery('.create-store-button').click(function() {
18
-
19
- var $context = jQuery(this).closest('.ecwid-button');
20
- jQuery(hide_on_loading + ', ' + invisible_on_loading, $context).fadeTo(150, .01).promise().done(function() {
21
- jQuery(hide_on_loading, $context).hide();
22
- jQuery(invisible_on_loading, $context).css('visibility', 'hidden');
23
-
24
- jQuery(show_on_loading, $context).fadeIn(300);
25
- })
26
-
27
- jQuery.ajax(ajaxurl + '?action=ecwid_create_store',
28
- {
29
- success: function(result) {
30
- var html = result;
31
- jQuery(hide_on_success, $context).fadeTo(150, .01).promise().done(function() {
32
- jQuery(hide_on_success, $context).hide();
33
-
34
- jQuery(show_on_success, $context).fadeIn(300);
35
- setTimeout(function() {
36
- location.href="admin.php?page=ecwid";
37
- }, 1000);
38
- })
39
- },
40
- error: function() {
41
- window.location.href = ecwidParams.registerLink;
42
- }
43
- }
44
- );
45
- });
46
-
47
- });
48
- switch_to_success = function() {
49
-
50
- }
1
+ switch_to_connect = function() {
2
+ jQuery('.ecwid-landing').removeClass('register').addClass('connect');
3
+ jQuery('.ecwid-thank-step-one').addClass('active');
4
+ wpCookies.set('ecwid_create_store_clicked', 1);
5
+ }
6
+
7
+ hide_on_loading = '.create-store-button, .create-store-have-account-question';
8
+ invisible_on_loading = '.create-store-have-account-link';
9
+ show_on_loading = '.create-store-loading, .create-store-loading-note';
10
+
11
+ hide_on_success = '.create-store-loading, .create-store-loading-note';
12
+ show_on_success = '.create-store-success, .create-store-success-note';
13
+
14
+
15
+ jQuery(document).ready(function(){
16
+
17
+ jQuery('.create-store-button').click(function() {
18
+
19
+ var $context = jQuery(this).closest('.ecwid-button');
20
+ jQuery(hide_on_loading + ', ' + invisible_on_loading, $context).fadeTo(150, .01).promise().done(function() {
21
+ jQuery(hide_on_loading, $context).hide();
22
+ jQuery(invisible_on_loading, $context).css('visibility', 'hidden');
23
+
24
+ jQuery(show_on_loading, $context).fadeIn(300);
25
+ })
26
+
27
+ jQuery.ajax(ajaxurl + '?action=ecwid_create_store',
28
+ {
29
+ success: function(result) {
30
+ var html = result;
31
+ jQuery(hide_on_success, $context).fadeTo(150, .01).promise().done(function() {
32
+ jQuery(hide_on_success, $context).hide();
33
+
34
+ jQuery(show_on_success, $context).fadeIn(300);
35
+ setTimeout(function() {
36
+ location.href="admin.php?page=ecwid";
37
+ }, 1000);
38
+ })
39
+ },
40
+ error: function() {
41
+ window.location.href = ecwidParams.registerLink;
42
+ }
43
+ }
44
+ );
45
+ });
46
+
47
+ });
48
+ switch_to_success = function() {
49
+
50
+ }
js/modernizr.js CHANGED
@@ -1,1406 +1,1406 @@
1
- /*!
2
- * Modernizr v2.7.0
3
- * www.modernizr.com
4
- *
5
- * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
6
- * Available under the BSD and MIT licenses: www.modernizr.com/license/
7
- */
8
-
9
- /*
10
- * Modernizr tests which native CSS3 and HTML5 features are available in
11
- * the current UA and makes the results available to you in two ways:
12
- * as properties on a global Modernizr object, and as classes on the
13
- * <html> element. This information allows you to progressively enhance
14
- * your pages with a granular level of control over the experience.
15
- *
16
- * Modernizr has an optional (not included) conditional resource loader
17
- * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
18
- * To get a build that includes Modernizr.load(), as well as choosing
19
- * which tests to include, go to www.modernizr.com/download/
20
- *
21
- * Authors Faruk Ates, Paul Irish, Alex Sexton
22
- * Contributors Ryan Seddon, Ben Alman
23
- */
24
-
25
- window.Modernizr = (function( window, document, undefined ) {
26
-
27
- var version = '2.7.0',
28
-
29
- Modernizr = {},
30
-
31
- /*>>cssclasses*/
32
- // option for enabling the HTML classes to be added
33
- enableClasses = true,
34
- /*>>cssclasses*/
35
-
36
- docElement = document.documentElement,
37
-
38
- /**
39
- * Create our "modernizr" element that we do most feature tests on.
40
- */
41
- mod = 'modernizr',
42
- modElem = document.createElement(mod),
43
- mStyle = modElem.style,
44
-
45
- /**
46
- * Create the input element for various Web Forms feature tests.
47
- */
48
- inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,
49
-
50
- /*>>smile*/
51
- smile = ':)',
52
- /*>>smile*/
53
-
54
- toString = {}.toString,
55
-
56
- // TODO :: make the prefixes more granular
57
- /*>>prefixes*/
58
- // List of property values to set for css tests. See ticket #21
59
- prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
60
- /*>>prefixes*/
61
-
62
- /*>>domprefixes*/
63
- // Following spec is to expose vendor-specific style properties as:
64
- // elem.style.WebkitBorderRadius
65
- // and the following would be incorrect:
66
- // elem.style.webkitBorderRadius
67
-
68
- // Webkit ghosts their properties in lowercase but Opera & Moz do not.
69
- // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
70
- // erik.eae.net/archives/2008/03/10/21.48.10/
71
-
72
- // More here: github.com/Modernizr/Modernizr/issues/issue/21
73
- omPrefixes = 'Webkit Moz O ms',
74
-
75
- cssomPrefixes = omPrefixes.split(' '),
76
-
77
- domPrefixes = omPrefixes.toLowerCase().split(' '),
78
- /*>>domprefixes*/
79
-
80
- /*>>ns*/
81
- ns = {'svg': 'http://www.w3.org/2000/svg'},
82
- /*>>ns*/
83
-
84
- tests = {},
85
- inputs = {},
86
- attrs = {},
87
-
88
- classes = [],
89
-
90
- slice = classes.slice,
91
-
92
- featureName, // used in testing loop
93
-
94
-
95
- /*>>teststyles*/
96
- // Inject element with style element and some CSS rules
97
- injectElementWithStyles = function( rule, callback, nodes, testnames ) {
98
-
99
- var style, ret, node, docOverflow,
100
- div = document.createElement('div'),
101
- // After page load injecting a fake body doesn't work so check if body exists
102
- body = document.body,
103
- // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
104
- fakeBody = body || document.createElement('body');
105
-
106
- if ( parseInt(nodes, 10) ) {
107
- // In order not to give false positives we create a node for each test
108
- // This also allows the method to scale for unspecified uses
109
- while ( nodes-- ) {
110
- node = document.createElement('div');
111
- node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
112
- div.appendChild(node);
113
- }
114
- }
115
-
116
- // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
117
- // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
118
- // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
119
- // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
120
- // Documents served as xml will throw if using &shy; so use xml friendly encoded version. See issue #277
121
- style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
122
- div.id = mod;
123
- // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
124
- // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
125
- (body ? div : fakeBody).innerHTML += style;
126
- fakeBody.appendChild(div);
127
- if ( !body ) {
128
- //avoid crashing IE8, if background image is used
129
- fakeBody.style.background = '';
130
- //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
131
- fakeBody.style.overflow = 'hidden';
132
- docOverflow = docElement.style.overflow;
133
- docElement.style.overflow = 'hidden';
134
- docElement.appendChild(fakeBody);
135
- }
136
-
137
- ret = callback(div, rule);
138
- // If this is done after page load we don't want to remove the body so check if body exists
139
- if ( !body ) {
140
- fakeBody.parentNode.removeChild(fakeBody);
141
- docElement.style.overflow = docOverflow;
142
- } else {
143
- div.parentNode.removeChild(div);
144
- }
145
-
146
- return !!ret;
147
-
148
- },
149
- /*>>teststyles*/
150
-
151
- /*>>mq*/
152
- // adapted from matchMedia polyfill
153
- // by Scott Jehl and Paul Irish
154
- // gist.github.com/786768
155
- testMediaQuery = function( mq ) {
156
-
157
- var matchMedia = window.matchMedia || window.msMatchMedia;
158
- if ( matchMedia ) {
159
- return matchMedia(mq).matches;
160
- }
161
-
162
- var bool;
163
-
164
- injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
165
- bool = (window.getComputedStyle ?
166
- getComputedStyle(node, null) :
167
- node.currentStyle)['position'] == 'absolute';
168
- });
169
-
170
- return bool;
171
-
172
- },
173
- /*>>mq*/
174
-
175
-
176
- /*>>hasevent*/
177
- //
178
- // isEventSupported determines if a given element supports the given event
179
- // kangax.github.com/iseventsupported/
180
- //
181
- // The following results are known incorrects:
182
- // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
183
- // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
184
- // ...
185
- isEventSupported = (function() {
186
-
187
- var TAGNAMES = {
188
- 'select': 'input', 'change': 'input',
189
- 'submit': 'form', 'reset': 'form',
190
- 'error': 'img', 'load': 'img', 'abort': 'img'
191
- };
192
-
193
- function isEventSupported( eventName, element ) {
194
-
195
- element = element || document.createElement(TAGNAMES[eventName] || 'div');
196
- eventName = 'on' + eventName;
197
-
198
- // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
199
- var isSupported = eventName in element;
200
-
201
- if ( !isSupported ) {
202
- // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
203
- if ( !element.setAttribute ) {
204
- element = document.createElement('div');
205
- }
206
- if ( element.setAttribute && element.removeAttribute ) {
207
- element.setAttribute(eventName, '');
208
- isSupported = is(element[eventName], 'function');
209
-
210
- // If property was created, "remove it" (by setting value to `undefined`)
211
- if ( !is(element[eventName], 'undefined') ) {
212
- element[eventName] = undefined;
213
- }
214
- element.removeAttribute(eventName);
215
- }
216
- }
217
-
218
- element = null;
219
- return isSupported;
220
- }
221
- return isEventSupported;
222
- })(),
223
- /*>>hasevent*/
224
-
225
- // TODO :: Add flag for hasownprop ? didn't last time
226
-
227
- // hasOwnProperty shim by kangax needed for Safari 2.0 support
228
- _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
229
-
230
- if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
231
- hasOwnProp = function (object, property) {
232
- return _hasOwnProperty.call(object, property);
233
- };
234
- }
235
- else {
236
- hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
237
- return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
238
- };
239
- }
240
-
241
- // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
242
- // es5.github.com/#x15.3.4.5
243
-
244
- if (!Function.prototype.bind) {
245
- Function.prototype.bind = function bind(that) {
246
-
247
- var target = this;
248
-
249
- if (typeof target != "function") {
250
- throw new TypeError();
251
- }
252
-
253
- var args = slice.call(arguments, 1),
254
- bound = function () {
255
-
256
- if (this instanceof bound) {
257
-
258
- var F = function(){};
259
- F.prototype = target.prototype;
260
- var self = new F();
261
-
262
- var result = target.apply(
263
- self,
264
- args.concat(slice.call(arguments))
265
- );
266
- if (Object(result) === result) {
267
- return result;
268
- }
269
- return self;
270
-
271
- } else {
272
-
273
- return target.apply(
274
- that,
275
- args.concat(slice.call(arguments))
276
- );
277
-
278
- }
279
-
280
- };
281
-
282
- return bound;
283
- };
284
- }
285
-
286
- /**
287
- * setCss applies given styles to the Modernizr DOM node.
288
- */
289
- function setCss( str ) {
290
- mStyle.cssText = str;
291
- }
292
-
293
- /**
294
- * setCssAll extrapolates all vendor-specific css strings.
295
- */
296
- function setCssAll( str1, str2 ) {
297
- return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
298
- }
299
-
300
- /**
301
- * is returns a boolean for if typeof obj is exactly type.
302
- */
303
- function is( obj, type ) {
304
- return typeof obj === type;
305
- }
306
-
307
- /**
308
- * contains returns a boolean for if substr is found within str.
309
- */
310
- function contains( str, substr ) {
311
- return !!~('' + str).indexOf(substr);
312
- }
313
-
314
- /*>>testprop*/
315
-
316
- // testProps is a generic CSS / DOM property test.
317
-
318
- // In testing support for a given CSS property, it's legit to test:
319
- // `elem.style[styleName] !== undefined`
320
- // If the property is supported it will return an empty string,
321
- // if unsupported it will return undefined.
322
-
323
- // We'll take advantage of this quick test and skip setting a style
324
- // on our modernizr element, but instead just testing undefined vs
325
- // empty string.
326
-
327
- // Because the testing of the CSS property names (with "-", as
328
- // opposed to the camelCase DOM properties) is non-portable and
329
- // non-standard but works in WebKit and IE (but not Gecko or Opera),
330
- // we explicitly reject properties with dashes so that authors
331
- // developing in WebKit or IE first don't end up with
332
- // browser-specific content by accident.
333
-
334
- function testProps( props, prefixed ) {
335
- for ( var i in props ) {
336
- var prop = props[i];
337
- if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
338
- return prefixed == 'pfx' ? prop : true;
339
- }
340
- }
341
- return false;
342
- }
343
- /*>>testprop*/
344
-
345
- // TODO :: add testDOMProps
346
- /**
347
- * testDOMProps is a generic DOM property test; if a browser supports
348
- * a certain property, it won't return undefined for it.
349
- */
350
- function testDOMProps( props, obj, elem ) {
351
- for ( var i in props ) {
352
- var item = obj[props[i]];
353
- if ( item !== undefined) {
354
-
355
- // return the property name as a string
356
- if (elem === false) return props[i];
357
-
358
- // let's bind a function
359
- if (is(item, 'function')){
360
- // default to autobind unless override
361
- return item.bind(elem || obj);
362
- }
363
-
364
- // return the unbound function or obj or value
365
- return item;
366
- }
367
- }
368
- return false;
369
- }
370
-
371
- /*>>testallprops*/
372
- /**
373
- * testPropsAll tests a list of DOM properties we want to check against.
374
- * We specify literally ALL possible (known and/or likely) properties on
375
- * the element including the non-vendor prefixed one, for forward-
376
- * compatibility.
377
- */
378
- function testPropsAll( prop, prefixed, elem ) {
379
-
380
- var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
381
- props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
382
-
383
- // did they call .prefixed('boxSizing') or are we just testing a prop?
384
- if(is(prefixed, "string") || is(prefixed, "undefined")) {
385
- return testProps(props, prefixed);
386
-
387
- // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
388
- } else {
389
- props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
390
- return testDOMProps(props, prefixed, elem);
391
- }
392
- }
393
- /*>>testallprops*/
394
-
395
-
396
- /**
397
- * Tests
398
- * -----
399
- */
400
-
401
- // The *new* flexbox
402
- // dev.w3.org/csswg/css3-flexbox
403
-
404
- tests['flexbox'] = function() {
405
- return testPropsAll('flexWrap');
406
- };
407
-
408
- // The *old* flexbox
409
- // www.w3.org/TR/2009/WD-css3-flexbox-20090723/
410
-
411
- tests['flexboxlegacy'] = function() {
412
- return testPropsAll('boxDirection');
413
- };
414
-
415
- // On the S60 and BB Storm, getContext exists, but always returns undefined
416
- // so we actually have to call getContext() to verify
417
- // github.com/Modernizr/Modernizr/issues/issue/97/
418
-
419
- tests['canvas'] = function() {
420
- var elem = document.createElement('canvas');
421
- return !!(elem.getContext && elem.getContext('2d'));
422
- };
423
-
424
- tests['canvastext'] = function() {
425
- return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
426
- };
427
-
428
- // webk.it/70117 is tracking a legit WebGL feature detect proposal
429
-
430
- // We do a soft detect which may false positive in order to avoid
431
- // an expensive context creation: bugzil.la/732441
432
-
433
- tests['webgl'] = function() {
434
- return !!window.WebGLRenderingContext;
435
- };
436
-
437
- /*
438
- * The Modernizr.touch test only indicates if the browser supports
439
- * touch events, which does not necessarily reflect a touchscreen
440
- * device, as evidenced by tablets running Windows 7 or, alas,
441
- * the Palm Pre / WebOS (touch) phones.
442
- *
443
- * Additionally, Chrome (desktop) used to lie about its support on this,
444
- * but that has since been rectified: crbug.com/36415
445
- *
446
- * We also test for Firefox 4 Multitouch Support.
447
- *
448
- * For more info, see: modernizr.github.com/Modernizr/touch.html
449
- */
450
-
451
- tests['touch'] = function() {
452
- var bool;
453
-
454
- if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
455
- bool = true;
456
- } else {
457
- injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
458
- bool = node.offsetTop === 9;
459
- });
460
- }
461
-
462
- return bool;
463
- };
464
-
465
-
466
- // geolocation is often considered a trivial feature detect...
467
- // Turns out, it's quite tricky to get right:
468
- //
469
- // Using !!navigator.geolocation does two things we don't want. It:
470
- // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
471
- // 2. Disables page caching in WebKit: webk.it/43956
472
- //
473
- // Meanwhile, in Firefox < 8, an about:config setting could expose
474
- // a false positive that would throw an exception: bugzil.la/688158
475
-
476
- tests['geolocation'] = function() {
477
- return 'geolocation' in navigator;
478
- };
479
-
480
-
481
- tests['postmessage'] = function() {
482
- return !!window.postMessage;
483
- };
484
-
485
-
486
- // Chrome incognito mode used to throw an exception when using openDatabase
487
- // It doesn't anymore.
488
- tests['websqldatabase'] = function() {
489
- return !!window.openDatabase;
490
- };
491
-
492
- // Vendors had inconsistent prefixing with the experimental Indexed DB:
493
- // - Webkit's implementation is accessible through webkitIndexedDB
494
- // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
495
- // For speed, we don't test the legacy (and beta-only) indexedDB
496
- tests['indexedDB'] = function() {
497
- return !!testPropsAll("indexedDB", window);
498
- };
499
-
500
- // documentMode logic from YUI to filter out IE8 Compat Mode
501
- // which false positives.
502
- tests['hashchange'] = function() {
503
- return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
504
- };
505
-
506
- // Per 1.6:
507
- // This used to be Modernizr.historymanagement but the longer
508
- // name has been deprecated in favor of a shorter and property-matching one.
509
- // The old API is still available in 1.6, but as of 2.0 will throw a warning,
510
- // and in the first release thereafter disappear entirely.
511
- tests['history'] = function() {
512
- return !!(window.history && history.pushState);
513
- };
514
-
515
- tests['draganddrop'] = function() {
516
- var div = document.createElement('div');
517
- return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
518
- };
519
-
520
- // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
521
- // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
522
- // FF10 still uses prefixes, so check for it until then.
523
- // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
524
- tests['websockets'] = function() {
525
- return 'WebSocket' in window || 'MozWebSocket' in window;
526
- };
527
-
528
-
529
- // css-tricks.com/rgba-browser-support/
530
- tests['rgba'] = function() {
531
- // Set an rgba() color and check the returned value
532
-
533
- setCss('background-color:rgba(150,255,150,.5)');
534
-
535
- return contains(mStyle.backgroundColor, 'rgba');
536
- };
537
-
538
- tests['hsla'] = function() {
539
- // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
540
- // except IE9 who retains it as hsla
541
-
542
- setCss('background-color:hsla(120,40%,100%,.5)');
543
-
544
- return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
545
- };
546
-
547
- tests['multiplebgs'] = function() {
548
- // Setting multiple images AND a color on the background shorthand property
549
- // and then querying the style.background property value for the number of
550
- // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
551
-
552
- setCss('background:url(https://),url(https://),red url(https://)');
553
-
554
- // If the UA supports multiple backgrounds, there should be three occurrences
555
- // of the string "url(" in the return value for elemStyle.background
556
-
557
- return (/(url\s*\(.*?){3}/).test(mStyle.background);
558
- };
559
-
560
-
561
-
562
- // this will false positive in Opera Mini
563
- // github.com/Modernizr/Modernizr/issues/396
564
-
565
- tests['backgroundsize'] = function() {
566
- return testPropsAll('backgroundSize');
567
- };
568
-
569
- tests['borderimage'] = function() {
570
- return testPropsAll('borderImage');
571
- };
572
-
573
-
574
- // Super comprehensive table about all the unique implementations of
575
- // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance
576
-
577
- tests['borderradius'] = function() {
578
- return testPropsAll('borderRadius');
579
- };
580
-
581
- // WebOS unfortunately false positives on this test.
582
- tests['boxshadow'] = function() {
583
- return testPropsAll('boxShadow');
584
- };
585
-
586
- // FF3.0 will false positive on this test
587
- tests['textshadow'] = function() {
588
- return document.createElement('div').style.textShadow === '';
589
- };
590
-
591
-
592
- tests['opacity'] = function() {
593
- // Browsers that actually have CSS Opacity implemented have done so
594
- // according to spec, which means their return values are within the
595
- // range of [0.0,1.0] - including the leading zero.
596
-
597
- setCssAll('opacity:.55');
598
-
599
- // The non-literal . in this regex is intentional:
600
- // German Chrome returns this value as 0,55
601
- // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
602
- return (/^0.55$/).test(mStyle.opacity);
603
- };
604
-
605
-
606
- // Note, Android < 4 will pass this test, but can only animate
607
- // a single property at a time
608
- // daneden.me/2011/12/putting-up-with-androids-bullshit/
609
- tests['cssanimations'] = function() {
610
- return testPropsAll('animationName');
611
- };
612
-
613
-
614
- tests['csscolumns'] = function() {
615
- return testPropsAll('columnCount');
616
- };
617
-
618
-
619
- tests['cssgradients'] = function() {
620
- /**
621
- * For CSS Gradients syntax, please see:
622
- * webkit.org/blog/175/introducing-css-gradients/
623
- * developer.mozilla.org/en/CSS/-moz-linear-gradient
624
- * developer.mozilla.org/en/CSS/-moz-radial-gradient
625
- * dev.w3.org/csswg/css3-images/#gradients-
626
- */
627
-
628
- var str1 = 'background-image:',
629
- str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
630
- str3 = 'linear-gradient(left top,#9f9, white);';
631
-
632
- setCss(
633
- // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
634
- (str1 + '-webkit- '.split(' ').join(str2 + str1) +
635
- // standard syntax // trailing 'background-image:'
636
- prefixes.join(str3 + str1)).slice(0, -str1.length)
637
- );
638
-
639
- return contains(mStyle.backgroundImage, 'gradient');
640
- };
641
-
642
-
643
- tests['cssreflections'] = function() {
644
- return testPropsAll('boxReflect');
645
- };
646
-
647
-
648
- tests['csstransforms'] = function() {
649
- return !!testPropsAll('transform');
650
- };
651
-
652
-
653
- tests['csstransforms3d'] = function() {
654
-
655
- var ret = !!testPropsAll('perspective');
656
-
657
- // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
658
- // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
659
- // some conditions. As a result, Webkit typically recognizes the syntax but
660
- // will sometimes throw a false positive, thus we must do a more thorough check:
661
- if ( ret && 'webkitPerspective' in docElement.style ) {
662
-
663
- // Webkit allows this media query to succeed only if the feature is enabled.
664
- // `@media (transform-3d),(-webkit-transform-3d){ ... }`
665
- injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
666
- ret = node.offsetLeft === 9 && node.offsetHeight === 3;
667
- });
668
- }
669
- return ret;
670
- };
671
-
672
-
673
- tests['csstransitions'] = function() {
674
- return testPropsAll('transition');
675
- };
676
-
677
-
678
- /*>>fontface*/
679
- // @font-face detection routine by Diego Perini
680
- // javascript.nwbox.com/CSSSupport/
681
-
682
- // false positives:
683
- // WebOS github.com/Modernizr/Modernizr/issues/342
684
- // WP7 github.com/Modernizr/Modernizr/issues/538
685
- tests['fontface'] = function() {
686
- var bool;
687
-
688
- injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
689
- var style = document.getElementById('smodernizr'),
690
- sheet = style.sheet || style.styleSheet,
691
- cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
692
-
693
- bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
694
- });
695
-
696
- return bool;
697
- };
698
- /*>>fontface*/
699
-
700
- // CSS generated content detection
701
- tests['generatedcontent'] = function() {
702
- var bool;
703
-
704
- injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
705
- bool = node.offsetHeight >= 3;
706
- });
707
-
708
- return bool;
709
- };
710
-
711
-
712
-
713
- // These tests evaluate support of the video/audio elements, as well as
714
- // testing what types of content they support.
715
- //
716
- // We're using the Boolean constructor here, so that we can extend the value
717
- // e.g. Modernizr.video // true
718
- // Modernizr.video.ogg // 'probably'
719
- //
720
- // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
721
- // thx to NielsLeenheer and zcorpan
722
-
723
- // Note: in some older browsers, "no" was a return value instead of empty string.
724
- // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
725
- // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
726
-
727
- tests['video'] = function() {
728
- var elem = document.createElement('video'),
729
- bool = false;
730
-
731
- // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
732
- try {
733
- if ( bool = !!elem.canPlayType ) {
734
- bool = new Boolean(bool);
735
- bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
736
-
737
- // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
738
- bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
739
-
740
- bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
741
- }
742
-
743
- } catch(e) { }
744
-
745
- return bool;
746
- };
747
-
748
- tests['audio'] = function() {
749
- var elem = document.createElement('audio'),
750
- bool = false;
751
-
752
- try {
753
- if ( bool = !!elem.canPlayType ) {
754
- bool = new Boolean(bool);
755
- bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
756
- bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
757
-
758
- // Mimetypes accepted:
759
- // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
760
- // bit.ly/iphoneoscodecs
761
- bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
762
- bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
763
- elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
764
- }
765
- } catch(e) { }
766
-
767
- return bool;
768
- };
769
-
770
-
771
- // In FF4, if disabled, window.localStorage should === null.
772
-
773
- // Normally, we could not test that directly and need to do a
774
- // `('localStorage' in window) && ` test first because otherwise Firefox will
775
- // throw bugzil.la/365772 if cookies are disabled
776
-
777
- // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
778
- // will throw the exception:
779
- // QUOTA_EXCEEDED_ERRROR DOM Exception 22.
780
- // Peculiarly, getItem and removeItem calls do not throw.
781
-
782
- // Because we are forced to try/catch this, we'll go aggressive.
783
-
784
- // Just FWIW: IE8 Compat mode supports these features completely:
785
- // www.quirksmode.org/dom/html5.html
786
- // But IE8 doesn't support either with local files
787
-
788
- tests['localstorage'] = function() {
789
- try {
790
- localStorage.setItem(mod, mod);
791
- localStorage.removeItem(mod);
792
- return true;
793
- } catch(e) {
794
- return false;
795
- }
796
- };
797
-
798
- tests['sessionstorage'] = function() {
799
- try {
800
- sessionStorage.setItem(mod, mod);
801
- sessionStorage.removeItem(mod);
802
- return true;
803
- } catch(e) {
804
- return false;
805
- }
806
- };
807
-
808
-
809
- tests['webworkers'] = function() {
810
- return !!window.Worker;
811
- };
812
-
813
-
814
- tests['applicationcache'] = function() {
815
- return !!window.applicationCache;
816
- };
817
-
818
-
819
- // Thanks to Erik Dahlstrom
820
- tests['svg'] = function() {
821
- return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
822
- };
823
-
824
- // specifically for SVG inline in HTML, not within XHTML
825
- // test page: paulirish.com/demo/inline-svg
826
- tests['inlinesvg'] = function() {
827
- var div = document.createElement('div');
828
- div.innerHTML = '<svg/>';
829
- return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
830
- };
831
-
832
- // SVG SMIL animation
833
- tests['smil'] = function() {
834
- return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
835
- };
836
-
837
- // This test is only for clip paths in SVG proper, not clip paths on HTML content
838
- // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg
839
-
840
- // However read the comments to dig into applying SVG clippaths to HTML content here:
841
- // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
842
- tests['svgclippaths'] = function() {
843
- return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
844
- };
845
-
846
- /*>>webforms*/
847
- // input features and input types go directly onto the ret object, bypassing the tests loop.
848
- // Hold this guy to execute in a moment.
849
- function webforms() {
850
- /*>>input*/
851
- // Run through HTML5's new input attributes to see if the UA understands any.
852
- // We're using f which is the <input> element created early on
853
- // Mike Taylr has created a comprehensive resource for testing these attributes
854
- // when applied to all input types:
855
- // miketaylr.com/code/input-type-attr.html
856
- // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
857
-
858
- // Only input placeholder is tested while textarea's placeholder is not.
859
- // Currently Safari 4 and Opera 11 have support only for the input placeholder
860
- // Both tests are available in feature-detects/forms-placeholder.js
861
- Modernizr['input'] = (function( props ) {
862
- for ( var i = 0, len = props.length; i < len; i++ ) {
863
- attrs[ props[i] ] = !!(props[i] in inputElem);
864
- }
865
- if (attrs.list){
866
- // safari false positive's on datalist: webk.it/74252
867
- // see also github.com/Modernizr/Modernizr/issues/146
868
- attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
869
- }
870
- return attrs;
871
- })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
872
- /*>>input*/
873
-
874
- /*>>inputtypes*/
875
- // Run through HTML5's new input types to see if the UA understands any.
876
- // This is put behind the tests runloop because it doesn't return a
877
- // true/false like all the other tests; instead, it returns an object
878
- // containing each input type with its corresponding true/false value
879
-
880
- // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
881
- Modernizr['inputtypes'] = (function(props) {
882
-
883
- for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
884
-
885
- inputElem.setAttribute('type', inputElemType = props[i]);
886
- bool = inputElem.type !== 'text';
887
-
888
- // We first check to see if the type we give it sticks..
889
- // If the type does, we feed it a textual value, which shouldn't be valid.
890
- // If the value doesn't stick, we know there's input sanitization which infers a custom UI
891
- if ( bool ) {
892
-
893
- inputElem.value = smile;
894
- inputElem.style.cssText = 'position:absolute;visibility:hidden;';
895
-
896
- if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
897
-
898
- docElement.appendChild(inputElem);
899
- defaultView = document.defaultView;
900
-
901
- // Safari 2-4 allows the smiley as a value, despite making a slider
902
- bool = defaultView.getComputedStyle &&
903
- defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
904
- // Mobile android web browser has false positive, so must
905
- // check the height to see if the widget is actually there.
906
- (inputElem.offsetHeight !== 0);
907
-
908
- docElement.removeChild(inputElem);
909
-
910
- } else if ( /^(search|tel)$/.test(inputElemType) ){
911
- // Spec doesn't define any special parsing or detectable UI
912
- // behaviors so we pass these through as true
913
-
914
- // Interestingly, opera fails the earlier test, so it doesn't
915
- // even make it here.
916
-
917
- } else if ( /^(url|email)$/.test(inputElemType) ) {
918
- // Real url and email support comes with prebaked validation.
919
- bool = inputElem.checkValidity && inputElem.checkValidity() === false;
920
-
921
- } else {
922
- // If the upgraded input compontent rejects the :) text, we got a winner
923
- bool = inputElem.value != smile;
924
- }
925
- }
926
-
927
- inputs[ props[i] ] = !!bool;
928
- }
929
- return inputs;
930
- })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
931
- /*>>inputtypes*/
932
- }
933
- /*>>webforms*/
934
-
935
-
936
- // End of test definitions
937
- // -----------------------
938
-
939
-
940
-
941
- // Run through all tests and detect their support in the current UA.
942
- // todo: hypothetically we could be doing an array of tests and use a basic loop here.
943
- for ( var feature in tests ) {
944
- if ( hasOwnProp(tests, feature) ) {
945
- // run the test, throw the return value into the Modernizr,
946
- // then based on that boolean, define an appropriate className
947
- // and push it into an array of classes we'll join later.
948
- featureName = feature.toLowerCase();
949
- Modernizr[featureName] = tests[feature]();
950
-
951
- classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
952
- }
953
- }
954
-
955
- /*>>webforms*/
956
- // input tests need to run.
957
- Modernizr.input || webforms();
958
- /*>>webforms*/
959
-
960
-
961
- /**
962
- * addTest allows the user to define their own feature tests
963
- * the result will be added onto the Modernizr object,
964
- * as well as an appropriate className set on the html element
965
- *
966
- * @param feature - String naming the feature
967
- * @param test - Function returning true if feature is supported, false if not
968
- */
969
- Modernizr.addTest = function ( feature, test ) {
970
- if ( typeof feature == 'object' ) {
971
- for ( var key in feature ) {
972
- if ( hasOwnProp( feature, key ) ) {
973
- Modernizr.addTest( key, feature[ key ] );
974
- }
975
- }
976
- } else {
977
-
978
- feature = feature.toLowerCase();
979
-
980
- if ( Modernizr[feature] !== undefined ) {
981
- // we're going to quit if you're trying to overwrite an existing test
982
- // if we were to allow it, we'd do this:
983
- // var re = new RegExp("\\b(no-)?" + feature + "\\b");
984
- // docElement.className = docElement.className.replace( re, '' );
985
- // but, no rly, stuff 'em.
986
- return Modernizr;
987
- }
988
-
989
- test = typeof test == 'function' ? test() : test;
990
-
991
- if (typeof enableClasses !== "undefined" && enableClasses) {
992
- docElement.className += ' ' + (test ? '' : 'no-') + feature;
993
- }
994
- Modernizr[feature] = test;
995
-
996
- }
997
-
998
- return Modernizr; // allow chaining.
999
- };
1000
-
1001
-
1002
- // Reset modElem.cssText to nothing to reduce memory footprint.
1003
- setCss('');
1004
- modElem = inputElem = null;
1005
-
1006
- /*>>shiv*/
1007
- /**
1008
- * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
1009
- */
1010
- ;(function(window, document) {
1011
- /*jshint evil:true */
1012
- /** version */
1013
- var version = '3.7.0';
1014
-
1015
- /** Preset options */
1016
- var options = window.html5 || {};
1017
-
1018
- /** Used to skip problem elements */
1019
- var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
1020
-
1021
- /** Not all elements can be cloned in IE **/
1022
- var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
1023
-
1024
- /** Detect whether the browser supports default html5 styles */
1025
- var supportsHtml5Styles;
1026
-
1027
- /** Name of the expando, to work with multiple documents or to re-shiv one document */
1028
- var expando = '_html5shiv';
1029
-
1030
- /** The id for the the documents expando */
1031
- var expanID = 0;
1032
-
1033
- /** Cached data for each document */
1034
- var expandoData = {};
1035
-
1036
- /** Detect whether the browser supports unknown elements */
1037
- var supportsUnknownElements;
1038
-
1039
- (function() {
1040
- try {
1041
- var a = document.createElement('a');
1042
- a.innerHTML = '<xyz></xyz>';
1043
- //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
1044
- supportsHtml5Styles = ('hidden' in a);
1045
-
1046
- supportsUnknownElements = a.childNodes.length == 1 || (function() {
1047
- // assign a false positive if unable to shiv
1048
- (document.createElement)('a');
1049
- var frag = document.createDocumentFragment();
1050
- return (
1051
- typeof frag.cloneNode == 'undefined' ||
1052
- typeof frag.createDocumentFragment == 'undefined' ||
1053
- typeof frag.createElement == 'undefined'
1054
- );
1055
- }());
1056
- } catch(e) {
1057
- // assign a false positive if detection fails => unable to shiv
1058
- supportsHtml5Styles = true;
1059
- supportsUnknownElements = true;
1060
- }
1061
-
1062
- }());
1063
-
1064
- /*--------------------------------------------------------------------------*/
1065
-
1066
- /**
1067
- * Creates a style sheet with the given CSS text and adds it to the document.
1068
- * @private
1069
- * @param {Document} ownerDocument The document.
1070
- * @param {String} cssText The CSS text.
1071
- * @returns {StyleSheet} The style element.
1072
- */
1073
- function addStyleSheet(ownerDocument, cssText) {
1074
- var p = ownerDocument.createElement('p'),
1075
- parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
1076
-
1077
- p.innerHTML = 'x<style>' + cssText + '</style>';
1078
- return parent.insertBefore(p.lastChild, parent.firstChild);
1079
- }
1080
-
1081
- /**
1082
- * Returns the value of `html5.elements` as an array.
1083
- * @private
1084
- * @returns {Array} An array of shived element node names.
1085
- */
1086
- function getElements() {
1087
- var elements = html5.elements;
1088
- return typeof elements == 'string' ? elements.split(' ') : elements;
1089
- }
1090
-
1091
- /**
1092
- * Returns the data associated to the given document
1093
- * @private
1094
- * @param {Document} ownerDocument The document.
1095
- * @returns {Object} An object of data.
1096
- */
1097
- function getExpandoData(ownerDocument) {
1098
- var data = expandoData[ownerDocument[expando]];
1099
- if (!data) {
1100
- data = {};
1101
- expanID++;
1102
- ownerDocument[expando] = expanID;
1103
- expandoData[expanID] = data;
1104
- }
1105
- return data;
1106
- }
1107
-
1108
- /**
1109
- * returns a shived element for the given nodeName and document
1110
- * @memberOf html5
1111
- * @param {String} nodeName name of the element
1112
- * @param {Document} ownerDocument The context document.
1113
- * @returns {Object} The shived element.
1114
- */
1115
- function createElement(nodeName, ownerDocument, data){
1116
- if (!ownerDocument) {
1117
- ownerDocument = document;
1118
- }
1119
- if(supportsUnknownElements){
1120
- return ownerDocument.createElement(nodeName);
1121
- }
1122
- if (!data) {
1123
- data = getExpandoData(ownerDocument);
1124
- }
1125
- var node;
1126
-
1127
- if (data.cache[nodeName]) {
1128
- node = data.cache[nodeName].cloneNode();
1129
- } else if (saveClones.test(nodeName)) {
1130
- node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
1131
- } else {
1132
- node = data.createElem(nodeName);
1133
- }
1134
-
1135
- // Avoid adding some elements to fragments in IE < 9 because
1136
- // * Attributes like `name` or `type` cannot be set/changed once an element
1137
- // is inserted into a document/fragment
1138
- // * Link elements with `src` attributes that are inaccessible, as with
1139
- // a 403 response, will cause the tab/window to crash
1140
- // * Script elements appended to fragments will execute when their `src`
1141
- // or `text` property is set
1142
- return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
1143
- }
1144
-
1145
- /**
1146
- * returns a shived DocumentFragment for the given document
1147
- * @memberOf html5
1148
- * @param {Document} ownerDocument The context document.
1149
- * @returns {Object} The shived DocumentFragment.
1150
- */
1151
- function createDocumentFragment(ownerDocument, data){
1152
- if (!ownerDocument) {
1153
- ownerDocument = document;
1154
- }
1155
- if(supportsUnknownElements){
1156
- return ownerDocument.createDocumentFragment();
1157
- }
1158
- data = data || getExpandoData(ownerDocument);
1159
- var clone = data.frag.cloneNode(),
1160
- i = 0,
1161
- elems = getElements(),
1162
- l = elems.length;
1163
- for(;i<l;i++){
1164
- clone.createElement(elems[i]);
1165
- }
1166
- return clone;
1167
- }
1168
-
1169
- /**
1170
- * Shivs the `createElement` and `createDocumentFragment` methods of the document.
1171
- * @private
1172
- * @param {Document|DocumentFragment} ownerDocument The document.
1173
- * @param {Object} data of the document.
1174
- */
1175
- function shivMethods(ownerDocument, data) {
1176
- if (!data.cache) {
1177
- data.cache = {};
1178
- data.createElem = ownerDocument.createElement;
1179
- data.createFrag = ownerDocument.createDocumentFragment;
1180
- data.frag = data.createFrag();
1181
- }
1182
-
1183
-
1184
- ownerDocument.createElement = function(nodeName) {
1185
- //abort shiv
1186
- if (!html5.shivMethods) {
1187
- return data.createElem(nodeName);
1188
- }
1189
- return createElement(nodeName, ownerDocument, data);
1190
- };
1191
-
1192
- ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
1193
- 'var n=f.cloneNode(),c=n.createElement;' +
1194
- 'h.shivMethods&&(' +
1195
- // unroll the `createElement` calls
1196
- getElements().join().replace(/[\w\-]+/g, function(nodeName) {
1197
- data.createElem(nodeName);
1198
- data.frag.createElement(nodeName);
1199
- return 'c("' + nodeName + '")';
1200
- }) +
1201
- ');return n}'
1202
- )(html5, data.frag);
1203
- }
1204
-
1205
- /*--------------------------------------------------------------------------*/
1206
-
1207
- /**
1208
- * Shivs the given document.
1209
- * @memberOf html5
1210
- * @param {Document} ownerDocument The document to shiv.
1211
- * @returns {Document} The shived document.
1212
- */
1213
- function shivDocument(ownerDocument) {
1214
- if (!ownerDocument) {
1215
- ownerDocument = document;
1216
- }
1217
- var data = getExpandoData(ownerDocument);
1218
-
1219
- if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
1220
- data.hasCSS = !!addStyleSheet(ownerDocument,
1221
- // corrects block display not defined in IE6/7/8/9
1222
- 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
1223
- // adds styling not present in IE6/7/8/9
1224
- 'mark{background:#FF0;color:#000}' +
1225
- // hides non-rendered elements
1226
- 'template{display:none}'
1227
- );
1228
- }
1229
- if (!supportsUnknownElements) {
1230
- shivMethods(ownerDocument, data);
1231
- }
1232
- return ownerDocument;
1233
- }
1234
-
1235
- /*--------------------------------------------------------------------------*/
1236
-
1237
- /**
1238
- * The `html5` object is exposed so that more elements can be shived and
1239
- * existing shiving can be detected on iframes.
1240
- * @type Object
1241
- * @example
1242
- *
1243
- * // options can be changed before the script is included
1244
- * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
1245
- */
1246
- var html5 = {
1247
-
1248
- /**
1249
- * An array or space separated string of node names of the elements to shiv.
1250
- * @memberOf html5
1251
- * @type Array|String
1252
- */
1253
- 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
1254
-
1255
- /**
1256
- * current version of html5shiv
1257
- */
1258
- 'version': version,
1259
-
1260
- /**
1261
- * A flag to indicate that the HTML5 style sheet should be inserted.
1262
- * @memberOf html5
1263
- * @type Boolean
1264
- */
1265
- 'shivCSS': (options.shivCSS !== false),
1266
-
1267
- /**
1268
- * Is equal to true if a browser supports creating unknown/HTML5 elements
1269
- * @memberOf html5
1270
- * @type boolean
1271
- */
1272
- 'supportsUnknownElements': supportsUnknownElements,
1273
-
1274
- /**
1275
- * A flag to indicate that the document's `createElement` and `createDocumentFragment`
1276
- * methods should be overwritten.
1277
- * @memberOf html5
1278
- * @type Boolean
1279
- */
1280
- 'shivMethods': (options.shivMethods !== false),
1281
-
1282
- /**
1283
- * A string to describe the type of `html5` object ("default" or "default print").
1284
- * @memberOf html5
1285
- * @type String
1286
- */
1287
- 'type': 'default',
1288
-
1289
- // shivs the document according to the specified `html5` object options
1290
- 'shivDocument': shivDocument,
1291
-
1292
- //creates a shived element
1293
- createElement: createElement,
1294
-
1295
- //creates a shived documentFragment
1296
- createDocumentFragment: createDocumentFragment
1297
- };
1298
-
1299
- /*--------------------------------------------------------------------------*/
1300
-
1301
- // expose html5
1302
- window.html5 = html5;
1303
-
1304
- // shiv the document
1305
- shivDocument(document);
1306
-
1307
- }(this, document));
1308
- /*>>shiv*/
1309
-
1310
- // Assign private properties to the return object with prefix
1311
- Modernizr._version = version;
1312
-
1313
- // expose these for the plugin API. Look in the source for how to join() them against your input
1314
- /*>>prefixes*/
1315
- Modernizr._prefixes = prefixes;
1316
- /*>>prefixes*/
1317
- /*>>domprefixes*/
1318
- Modernizr._domPrefixes = domPrefixes;
1319
- Modernizr._cssomPrefixes = cssomPrefixes;
1320
- /*>>domprefixes*/
1321
-
1322
- /*>>mq*/
1323
- // Modernizr.mq tests a given media query, live against the current state of the window
1324
- // A few important notes:
1325
- // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
1326
- // * A max-width or orientation query will be evaluated against the current state, which may change later.
1327
- // * You must specify values. Eg. If you are testing support for the min-width media query use:
1328
- // Modernizr.mq('(min-width:0)')
1329
- // usage:
1330
- // Modernizr.mq('only screen and (max-width:768)')
1331
- Modernizr.mq = testMediaQuery;
1332
- /*>>mq*/
1333
-
1334
- /*>>hasevent*/
1335
- // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
1336
- // Modernizr.hasEvent('gesturestart', elem)
1337
- Modernizr.hasEvent = isEventSupported;
1338
- /*>>hasevent*/
1339
-
1340
- /*>>testprop*/
1341
- // Modernizr.testProp() investigates whether a given style property is recognized
1342
- // Note that the property names must be provided in the camelCase variant.
1343
- // Modernizr.testProp('pointerEvents')
1344
- Modernizr.testProp = function(prop){
1345
- return testProps([prop]);
1346
- };
1347
- /*>>testprop*/
1348
-
1349
- /*>>testallprops*/
1350
- // Modernizr.testAllProps() investigates whether a given style property,
1351
- // or any of its vendor-prefixed variants, is recognized
1352
- // Note that the property names must be provided in the camelCase variant.
1353
- // Modernizr.testAllProps('boxSizing')
1354
- Modernizr.testAllProps = testPropsAll;
1355
- /*>>testallprops*/
1356
-
1357
-
1358
- /*>>teststyles*/
1359
- // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
1360
- // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
1361
- Modernizr.testStyles = injectElementWithStyles;
1362
- /*>>teststyles*/
1363
-
1364
-
1365
- /*>>prefixed*/
1366
- // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
1367
- // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'
1368
-
1369
- // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
1370
- // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
1371
- //
1372
- // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
1373
-
1374
- // If you're trying to ascertain which transition end event to bind to, you might do something like...
1375
- //
1376
- // var transEndEventNames = {
1377
- // 'WebkitTransition' : 'webkitTransitionEnd',
1378
- // 'MozTransition' : 'transitionend',
1379
- // 'OTransition' : 'oTransitionEnd',
1380
- // 'msTransition' : 'MSTransitionEnd',
1381
- // 'transition' : 'transitionend'
1382
- // },
1383
- // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
1384
-
1385
- Modernizr.prefixed = function(prop, obj, elem){
1386
- if(!obj) {
1387
- return testPropsAll(prop, 'pfx');
1388
- } else {
1389
- // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
1390
- return testPropsAll(prop, obj, elem);
1391
- }
1392
- };
1393
- /*>>prefixed*/
1394
-
1395
-
1396
- /*>>cssclasses*/
1397
- // Remove "no-js" class from <html> element, if it exists:
1398
- docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
1399
-
1400
- // Add the new classes to the <html> element.
1401
- (enableClasses ? ' js ' + classes.join(' ') : '');
1402
- /*>>cssclasses*/
1403
-
1404
- return Modernizr;
1405
-
1406
- })(this, this.document);
1
+ /*!
2
+ * Modernizr v2.7.0
3
+ * www.modernizr.com
4
+ *
5
+ * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
6
+ * Available under the BSD and MIT licenses: www.modernizr.com/license/
7
+ */
8
+
9
+ /*
10
+ * Modernizr tests which native CSS3 and HTML5 features are available in
11
+ * the current UA and makes the results available to you in two ways:
12
+ * as properties on a global Modernizr object, and as classes on the
13
+ * <html> element. This information allows you to progressively enhance
14
+ * your pages with a granular level of control over the experience.
15
+ *
16
+ * Modernizr has an optional (not included) conditional resource loader
17
+ * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
18
+ * To get a build that includes Modernizr.load(), as well as choosing
19
+ * which tests to include, go to www.modernizr.com/download/
20
+ *
21
+ * Authors Faruk Ates, Paul Irish, Alex Sexton
22
+ * Contributors Ryan Seddon, Ben Alman
23
+ */
24
+
25
+ window.Modernizr = (function( window, document, undefined ) {
26
+
27
+ var version = '2.7.0',
28
+
29
+ Modernizr = {},
30
+
31
+ /*>>cssclasses*/
32
+ // option for enabling the HTML classes to be added
33
+ enableClasses = true,
34
+ /*>>cssclasses*/
35
+
36
+ docElement = document.documentElement,
37
+
38
+ /**
39
+ * Create our "modernizr" element that we do most feature tests on.
40
+ */
41
+ mod = 'modernizr',
42
+ modElem = document.createElement(mod),
43
+ mStyle = modElem.style,
44
+
45
+ /**
46
+ * Create the input element for various Web Forms feature tests.
47
+ */
48
+ inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,
49
+
50
+ /*>>smile*/
51
+ smile = ':)',
52
+ /*>>smile*/
53
+
54
+ toString = {}.toString,
55
+
56
+ // TODO :: make the prefixes more granular
57
+ /*>>prefixes*/
58
+ // List of property values to set for css tests. See ticket #21
59
+ prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
60
+ /*>>prefixes*/
61
+
62
+ /*>>domprefixes*/
63
+ // Following spec is to expose vendor-specific style properties as:
64
+ // elem.style.WebkitBorderRadius
65
+ // and the following would be incorrect:
66
+ // elem.style.webkitBorderRadius
67
+
68
+ // Webkit ghosts their properties in lowercase but Opera & Moz do not.
69
+ // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
70
+ // erik.eae.net/archives/2008/03/10/21.48.10/
71
+
72
+ // More here: github.com/Modernizr/Modernizr/issues/issue/21
73
+ omPrefixes = 'Webkit Moz O ms',
74
+
75
+ cssomPrefixes = omPrefixes.split(' '),
76
+
77
+ domPrefixes = omPrefixes.toLowerCase().split(' '),
78
+ /*>>domprefixes*/
79
+
80
+ /*>>ns*/
81
+ ns = {'svg': 'http://www.w3.org/2000/svg'},
82
+ /*>>ns*/
83
+
84
+ tests = {},
85
+ inputs = {},
86
+ attrs = {},
87
+
88
+ classes = [],
89
+
90
+ slice = classes.slice,
91
+
92
+ featureName, // used in testing loop
93
+
94
+
95
+ /*>>teststyles*/
96
+ // Inject element with style element and some CSS rules
97
+ injectElementWithStyles = function( rule, callback, nodes, testnames ) {
98
+
99
+ var style, ret, node, docOverflow,
100
+ div = document.createElement('div'),
101
+ // After page load injecting a fake body doesn't work so check if body exists
102
+ body = document.body,
103
+ // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
104
+ fakeBody = body || document.createElement('body');
105
+
106
+ if ( parseInt(nodes, 10) ) {
107
+ // In order not to give false positives we create a node for each test
108
+ // This also allows the method to scale for unspecified uses
109
+ while ( nodes-- ) {
110
+ node = document.createElement('div');
111
+ node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
112
+ div.appendChild(node);
113
+ }
114
+ }
115
+
116
+ // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
117
+ // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
118
+ // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
119
+ // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
120
+ // Documents served as xml will throw if using &shy; so use xml friendly encoded version. See issue #277
121
+ style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
122
+ div.id = mod;
123
+ // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
124
+ // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
125
+ (body ? div : fakeBody).innerHTML += style;
126
+ fakeBody.appendChild(div);
127
+ if ( !body ) {
128
+ //avoid crashing IE8, if background image is used
129
+ fakeBody.style.background = '';
130
+ //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
131
+ fakeBody.style.overflow = 'hidden';
132
+ docOverflow = docElement.style.overflow;
133
+ docElement.style.overflow = 'hidden';
134
+ docElement.appendChild(fakeBody);
135
+ }
136
+
137
+ ret = callback(div, rule);
138
+ // If this is done after page load we don't want to remove the body so check if body exists
139
+ if ( !body ) {
140
+ fakeBody.parentNode.removeChild(fakeBody);
141
+ docElement.style.overflow = docOverflow;
142
+ } else {
143
+ div.parentNode.removeChild(div);
144
+ }
145
+
146
+ return !!ret;
147
+
148
+ },
149
+ /*>>teststyles*/
150
+
151
+ /*>>mq*/
152
+ // adapted from matchMedia polyfill
153
+ // by Scott Jehl and Paul Irish
154
+ // gist.github.com/786768
155
+ testMediaQuery = function( mq ) {
156
+
157
+ var matchMedia = window.matchMedia || window.msMatchMedia;
158
+ if ( matchMedia ) {
159
+ return matchMedia(mq).matches;
160
+ }
161
+
162
+ var bool;
163
+
164
+ injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
165
+ bool = (window.getComputedStyle ?
166
+ getComputedStyle(node, null) :
167
+ node.currentStyle)['position'] == 'absolute';
168
+ });
169
+
170
+ return bool;
171
+
172
+ },
173
+ /*>>mq*/
174
+
175
+
176
+ /*>>hasevent*/
177
+ //
178
+ // isEventSupported determines if a given element supports the given event
179
+ // kangax.github.com/iseventsupported/
180
+ //
181
+ // The following results are known incorrects:
182
+ // Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
183
+ // Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
184
+ // ...
185
+ isEventSupported = (function() {
186
+
187
+ var TAGNAMES = {
188
+ 'select': 'input', 'change': 'input',
189
+ 'submit': 'form', 'reset': 'form',
190
+ 'error': 'img', 'load': 'img', 'abort': 'img'
191
+ };
192
+
193
+ function isEventSupported( eventName, element ) {
194
+
195
+ element = element || document.createElement(TAGNAMES[eventName] || 'div');
196
+ eventName = 'on' + eventName;
197
+
198
+ // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
199
+ var isSupported = eventName in element;
200
+
201
+ if ( !isSupported ) {
202
+ // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
203
+ if ( !element.setAttribute ) {
204
+ element = document.createElement('div');
205
+ }
206
+ if ( element.setAttribute && element.removeAttribute ) {
207
+ element.setAttribute(eventName, '');
208
+ isSupported = is(element[eventName], 'function');
209
+
210
+ // If property was created, "remove it" (by setting value to `undefined`)
211
+ if ( !is(element[eventName], 'undefined') ) {
212
+ element[eventName] = undefined;
213
+ }
214
+ element.removeAttribute(eventName);
215
+ }
216
+ }
217
+
218
+ element = null;
219
+ return isSupported;
220
+ }
221
+ return isEventSupported;
222
+ })(),
223
+ /*>>hasevent*/
224
+
225
+ // TODO :: Add flag for hasownprop ? didn't last time
226
+
227
+ // hasOwnProperty shim by kangax needed for Safari 2.0 support
228
+ _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;
229
+
230
+ if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
231
+ hasOwnProp = function (object, property) {
232
+ return _hasOwnProperty.call(object, property);
233
+ };
234
+ }
235
+ else {
236
+ hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
237
+ return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
238
+ };
239
+ }
240
+
241
+ // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
242
+ // es5.github.com/#x15.3.4.5
243
+
244
+ if (!Function.prototype.bind) {
245
+ Function.prototype.bind = function bind(that) {
246
+
247
+ var target = this;
248
+
249
+ if (typeof target != "function") {
250
+ throw new TypeError();
251
+ }
252
+
253
+ var args = slice.call(arguments, 1),
254
+ bound = function () {
255
+
256
+ if (this instanceof bound) {
257
+
258
+ var F = function(){};
259
+ F.prototype = target.prototype;
260
+ var self = new F();
261
+
262
+ var result = target.apply(
263
+ self,
264
+ args.concat(slice.call(arguments))
265
+ );
266
+ if (Object(result) === result) {
267
+ return result;
268
+ }
269
+ return self;
270
+
271
+ } else {
272
+
273
+ return target.apply(
274
+ that,
275
+ args.concat(slice.call(arguments))
276
+ );
277
+
278
+ }
279
+
280
+ };
281
+
282
+ return bound;
283
+ };
284
+ }
285
+
286
+ /**
287
+ * setCss applies given styles to the Modernizr DOM node.
288
+ */
289
+ function setCss( str ) {
290
+ mStyle.cssText = str;
291
+ }
292
+
293
+ /**
294
+ * setCssAll extrapolates all vendor-specific css strings.
295
+ */
296
+ function setCssAll( str1, str2 ) {
297
+ return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
298
+ }
299
+
300
+ /**
301
+ * is returns a boolean for if typeof obj is exactly type.
302
+ */
303
+ function is( obj, type ) {
304
+ return typeof obj === type;
305
+ }
306
+
307
+ /**
308
+ * contains returns a boolean for if substr is found within str.
309
+ */
310
+ function contains( str, substr ) {
311
+ return !!~('' + str).indexOf(substr);
312
+ }
313
+
314
+ /*>>testprop*/
315
+
316
+ // testProps is a generic CSS / DOM property test.
317
+
318
+ // In testing support for a given CSS property, it's legit to test:
319
+ // `elem.style[styleName] !== undefined`
320
+ // If the property is supported it will return an empty string,
321
+ // if unsupported it will return undefined.
322
+
323
+ // We'll take advantage of this quick test and skip setting a style
324
+ // on our modernizr element, but instead just testing undefined vs
325
+ // empty string.
326
+
327
+ // Because the testing of the CSS property names (with "-", as
328
+ // opposed to the camelCase DOM properties) is non-portable and
329
+ // non-standard but works in WebKit and IE (but not Gecko or Opera),
330
+ // we explicitly reject properties with dashes so that authors
331
+ // developing in WebKit or IE first don't end up with
332
+ // browser-specific content by accident.
333
+
334
+ function testProps( props, prefixed ) {
335
+ for ( var i in props ) {
336
+ var prop = props[i];
337
+ if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
338
+ return prefixed == 'pfx' ? prop : true;
339
+ }
340
+ }
341
+ return false;
342
+ }
343
+ /*>>testprop*/
344
+
345
+ // TODO :: add testDOMProps
346
+ /**
347
+ * testDOMProps is a generic DOM property test; if a browser supports
348
+ * a certain property, it won't return undefined for it.
349
+ */
350
+ function testDOMProps( props, obj, elem ) {
351
+ for ( var i in props ) {
352
+ var item = obj[props[i]];
353
+ if ( item !== undefined) {
354
+
355
+ // return the property name as a string
356
+ if (elem === false) return props[i];
357
+
358
+ // let's bind a function
359
+ if (is(item, 'function')){
360
+ // default to autobind unless override
361
+ return item.bind(elem || obj);
362
+ }
363
+
364
+ // return the unbound function or obj or value
365
+ return item;
366
+ }
367
+ }
368
+ return false;
369
+ }
370
+
371
+ /*>>testallprops*/
372
+ /**
373
+ * testPropsAll tests a list of DOM properties we want to check against.
374
+ * We specify literally ALL possible (known and/or likely) properties on
375
+ * the element including the non-vendor prefixed one, for forward-
376
+ * compatibility.
377
+ */
378
+ function testPropsAll( prop, prefixed, elem ) {
379
+
380
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
381
+ props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');
382
+
383
+ // did they call .prefixed('boxSizing') or are we just testing a prop?
384
+ if(is(prefixed, "string") || is(prefixed, "undefined")) {
385
+ return testProps(props, prefixed);
386
+
387
+ // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
388
+ } else {
389
+ props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
390
+ return testDOMProps(props, prefixed, elem);
391
+ }
392
+ }
393
+ /*>>testallprops*/
394
+
395
+
396
+ /**
397
+ * Tests
398
+ * -----
399
+ */
400
+
401
+ // The *new* flexbox
402
+ // dev.w3.org/csswg/css3-flexbox
403
+
404
+ tests['flexbox'] = function() {
405
+ return testPropsAll('flexWrap');
406
+ };
407
+
408
+ // The *old* flexbox
409
+ // www.w3.org/TR/2009/WD-css3-flexbox-20090723/
410
+
411
+ tests['flexboxlegacy'] = function() {
412
+ return testPropsAll('boxDirection');
413
+ };
414
+
415
+ // On the S60 and BB Storm, getContext exists, but always returns undefined
416
+ // so we actually have to call getContext() to verify
417
+ // github.com/Modernizr/Modernizr/issues/issue/97/
418
+
419
+ tests['canvas'] = function() {
420
+ var elem = document.createElement('canvas');
421
+ return !!(elem.getContext && elem.getContext('2d'));
422
+ };
423
+
424
+ tests['canvastext'] = function() {
425
+ return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
426
+ };
427
+
428
+ // webk.it/70117 is tracking a legit WebGL feature detect proposal
429
+
430
+ // We do a soft detect which may false positive in order to avoid
431
+ // an expensive context creation: bugzil.la/732441
432
+
433
+ tests['webgl'] = function() {
434
+ return !!window.WebGLRenderingContext;
435
+ };
436
+
437
+ /*
438
+ * The Modernizr.touch test only indicates if the browser supports
439
+ * touch events, which does not necessarily reflect a touchscreen
440
+ * device, as evidenced by tablets running Windows 7 or, alas,
441
+ * the Palm Pre / WebOS (touch) phones.
442
+ *
443
+ * Additionally, Chrome (desktop) used to lie about its support on this,
444
+ * but that has since been rectified: crbug.com/36415
445
+ *
446
+ * We also test for Firefox 4 Multitouch Support.
447
+ *
448
+ * For more info, see: modernizr.github.com/Modernizr/touch.html
449
+ */
450
+
451
+ tests['touch'] = function() {
452
+ var bool;
453
+
454
+ if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
455
+ bool = true;
456
+ } else {
457
+ injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
458
+ bool = node.offsetTop === 9;
459
+ });
460
+ }
461
+
462
+ return bool;
463
+ };
464
+
465
+
466
+ // geolocation is often considered a trivial feature detect...
467
+ // Turns out, it's quite tricky to get right:
468
+ //
469
+ // Using !!navigator.geolocation does two things we don't want. It:
470
+ // 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
471
+ // 2. Disables page caching in WebKit: webk.it/43956
472
+ //
473
+ // Meanwhile, in Firefox < 8, an about:config setting could expose
474
+ // a false positive that would throw an exception: bugzil.la/688158
475
+
476
+ tests['geolocation'] = function() {
477
+ return 'geolocation' in navigator;
478
+ };
479
+
480
+
481
+ tests['postmessage'] = function() {
482
+ return !!window.postMessage;
483
+ };
484
+
485
+
486
+ // Chrome incognito mode used to throw an exception when using openDatabase
487
+ // It doesn't anymore.
488
+ tests['websqldatabase'] = function() {
489
+ return !!window.openDatabase;
490
+ };
491
+
492
+ // Vendors had inconsistent prefixing with the experimental Indexed DB:
493
+ // - Webkit's implementation is accessible through webkitIndexedDB
494
+ // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
495
+ // For speed, we don't test the legacy (and beta-only) indexedDB
496
+ tests['indexedDB'] = function() {
497
+ return !!testPropsAll("indexedDB", window);
498
+ };
499
+
500
+ // documentMode logic from YUI to filter out IE8 Compat Mode
501
+ // which false positives.
502
+ tests['hashchange'] = function() {
503
+ return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
504
+ };
505
+
506
+ // Per 1.6:
507
+ // This used to be Modernizr.historymanagement but the longer
508
+ // name has been deprecated in favor of a shorter and property-matching one.
509
+ // The old API is still available in 1.6, but as of 2.0 will throw a warning,
510
+ // and in the first release thereafter disappear entirely.
511
+ tests['history'] = function() {
512
+ return !!(window.history && history.pushState);
513
+ };
514
+
515
+ tests['draganddrop'] = function() {
516
+ var div = document.createElement('div');
517
+ return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
518
+ };
519
+
520
+ // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
521
+ // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
522
+ // FF10 still uses prefixes, so check for it until then.
523
+ // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
524
+ tests['websockets'] = function() {
525
+ return 'WebSocket' in window || 'MozWebSocket' in window;
526
+ };
527
+
528
+
529
+ // css-tricks.com/rgba-browser-support/
530
+ tests['rgba'] = function() {
531
+ // Set an rgba() color and check the returned value
532
+
533
+ setCss('background-color:rgba(150,255,150,.5)');
534
+
535
+ return contains(mStyle.backgroundColor, 'rgba');
536
+ };
537
+
538
+ tests['hsla'] = function() {
539
+ // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
540
+ // except IE9 who retains it as hsla
541
+
542
+ setCss('background-color:hsla(120,40%,100%,.5)');
543
+
544
+ return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
545
+ };
546
+
547
+ tests['multiplebgs'] = function() {
548
+ // Setting multiple images AND a color on the background shorthand property
549
+ // and then querying the style.background property value for the number of
550
+ // occurrences of "url(" is a reliable method for detecting ACTUAL support for this!
551
+
552
+ setCss('background:url(https://),url(https://),red url(https://)');
553
+
554
+ // If the UA supports multiple backgrounds, there should be three occurrences
555
+ // of the string "url(" in the return value for elemStyle.background
556
+
557
+ return (/(url\s*\(.*?){3}/).test(mStyle.background);
558
+ };
559
+
560
+
561
+
562
+ // this will false positive in Opera Mini
563
+ // github.com/Modernizr/Modernizr/issues/396
564
+
565
+ tests['backgroundsize'] = function() {
566
+ return testPropsAll('backgroundSize');
567
+ };
568
+
569
+ tests['borderimage'] = function() {
570
+ return testPropsAll('borderImage');
571
+ };
572
+
573
+
574
+ // Super comprehensive table about all the unique implementations of
575
+ // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance
576
+
577
+ tests['borderradius'] = function() {
578
+ return testPropsAll('borderRadius');
579
+ };
580
+
581
+ // WebOS unfortunately false positives on this test.
582
+ tests['boxshadow'] = function() {
583
+ return testPropsAll('boxShadow');
584
+ };
585
+
586
+ // FF3.0 will false positive on this test
587
+ tests['textshadow'] = function() {
588
+ return document.createElement('div').style.textShadow === '';
589
+ };
590
+
591
+
592
+ tests['opacity'] = function() {
593
+ // Browsers that actually have CSS Opacity implemented have done so
594
+ // according to spec, which means their return values are within the
595
+ // range of [0.0,1.0] - including the leading zero.
596
+
597
+ setCssAll('opacity:.55');
598
+
599
+ // The non-literal . in this regex is intentional:
600
+ // German Chrome returns this value as 0,55
601
+ // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
602
+ return (/^0.55$/).test(mStyle.opacity);
603
+ };
604
+
605
+
606
+ // Note, Android < 4 will pass this test, but can only animate
607
+ // a single property at a time
608
+ // daneden.me/2011/12/putting-up-with-androids-bullshit/
609
+ tests['cssanimations'] = function() {
610
+ return testPropsAll('animationName');
611
+ };
612
+
613
+
614
+ tests['csscolumns'] = function() {
615
+ return testPropsAll('columnCount');
616
+ };
617
+
618
+
619
+ tests['cssgradients'] = function() {
620
+ /**
621
+ * For CSS Gradients syntax, please see:
622
+ * webkit.org/blog/175/introducing-css-gradients/
623
+ * developer.mozilla.org/en/CSS/-moz-linear-gradient
624
+ * developer.mozilla.org/en/CSS/-moz-radial-gradient
625
+ * dev.w3.org/csswg/css3-images/#gradients-
626
+ */
627
+
628
+ var str1 = 'background-image:',
629
+ str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
630
+ str3 = 'linear-gradient(left top,#9f9, white);';
631
+
632
+ setCss(
633
+ // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
634
+ (str1 + '-webkit- '.split(' ').join(str2 + str1) +
635
+ // standard syntax // trailing 'background-image:'
636
+ prefixes.join(str3 + str1)).slice(0, -str1.length)
637
+ );
638
+
639
+ return contains(mStyle.backgroundImage, 'gradient');
640
+ };
641
+
642
+
643
+ tests['cssreflections'] = function() {
644
+ return testPropsAll('boxReflect');
645
+ };
646
+
647
+
648
+ tests['csstransforms'] = function() {
649
+ return !!testPropsAll('transform');
650
+ };
651
+
652
+
653
+ tests['csstransforms3d'] = function() {
654
+
655
+ var ret = !!testPropsAll('perspective');
656
+
657
+ // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
658
+ // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
659
+ // some conditions. As a result, Webkit typically recognizes the syntax but
660
+ // will sometimes throw a false positive, thus we must do a more thorough check:
661
+ if ( ret && 'webkitPerspective' in docElement.style ) {
662
+
663
+ // Webkit allows this media query to succeed only if the feature is enabled.
664
+ // `@media (transform-3d),(-webkit-transform-3d){ ... }`
665
+ injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
666
+ ret = node.offsetLeft === 9 && node.offsetHeight === 3;
667
+ });
668
+ }
669
+ return ret;
670
+ };
671
+
672
+
673
+ tests['csstransitions'] = function() {
674
+ return testPropsAll('transition');
675
+ };
676
+
677
+
678
+ /*>>fontface*/
679
+ // @font-face detection routine by Diego Perini
680
+ // javascript.nwbox.com/CSSSupport/
681
+
682
+ // false positives:
683
+ // WebOS github.com/Modernizr/Modernizr/issues/342
684
+ // WP7 github.com/Modernizr/Modernizr/issues/538
685
+ tests['fontface'] = function() {
686
+ var bool;
687
+
688
+ injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
689
+ var style = document.getElementById('smodernizr'),
690
+ sheet = style.sheet || style.styleSheet,
691
+ cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
692
+
693
+ bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
694
+ });
695
+
696
+ return bool;
697
+ };
698
+ /*>>fontface*/
699
+
700
+ // CSS generated content detection
701
+ tests['generatedcontent'] = function() {
702
+ var bool;
703
+
704
+ injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
705
+ bool = node.offsetHeight >= 3;
706
+ });
707
+
708
+ return bool;
709
+ };
710
+
711
+
712
+
713
+ // These tests evaluate support of the video/audio elements, as well as
714
+ // testing what types of content they support.
715
+ //
716
+ // We're using the Boolean constructor here, so that we can extend the value
717
+ // e.g. Modernizr.video // true
718
+ // Modernizr.video.ogg // 'probably'
719
+ //
720
+ // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
721
+ // thx to NielsLeenheer and zcorpan
722
+
723
+ // Note: in some older browsers, "no" was a return value instead of empty string.
724
+ // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
725
+ // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5
726
+
727
+ tests['video'] = function() {
728
+ var elem = document.createElement('video'),
729
+ bool = false;
730
+
731
+ // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
732
+ try {
733
+ if ( bool = !!elem.canPlayType ) {
734
+ bool = new Boolean(bool);
735
+ bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,'');
736
+
737
+ // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
738
+ bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');
739
+
740
+ bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
741
+ }
742
+
743
+ } catch(e) { }
744
+
745
+ return bool;
746
+ };
747
+
748
+ tests['audio'] = function() {
749
+ var elem = document.createElement('audio'),
750
+ bool = false;
751
+
752
+ try {
753
+ if ( bool = !!elem.canPlayType ) {
754
+ bool = new Boolean(bool);
755
+ bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
756
+ bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,'');
757
+
758
+ // Mimetypes accepted:
759
+ // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
760
+ // bit.ly/iphoneoscodecs
761
+ bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,'');
762
+ bool.m4a = ( elem.canPlayType('audio/x-m4a;') ||
763
+ elem.canPlayType('audio/aac;')) .replace(/^no$/,'');
764
+ }
765
+ } catch(e) { }
766
+
767
+ return bool;
768
+ };
769
+
770
+
771
+ // In FF4, if disabled, window.localStorage should === null.
772
+
773
+ // Normally, we could not test that directly and need to do a
774
+ // `('localStorage' in window) && ` test first because otherwise Firefox will
775
+ // throw bugzil.la/365772 if cookies are disabled
776
+
777
+ // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
778
+ // will throw the exception:
779
+ // QUOTA_EXCEEDED_ERRROR DOM Exception 22.
780
+ // Peculiarly, getItem and removeItem calls do not throw.
781
+
782
+ // Because we are forced to try/catch this, we'll go aggressive.
783
+
784
+ // Just FWIW: IE8 Compat mode supports these features completely:
785
+ // www.quirksmode.org/dom/html5.html
786
+ // But IE8 doesn't support either with local files
787
+
788
+ tests['localstorage'] = function() {
789
+ try {
790
+ localStorage.setItem(mod, mod);
791
+ localStorage.removeItem(mod);
792
+ return true;
793
+ } catch(e) {
794
+ return false;
795
+ }
796
+ };
797
+
798
+ tests['sessionstorage'] = function() {
799
+ try {
800
+ sessionStorage.setItem(mod, mod);
801
+ sessionStorage.removeItem(mod);
802
+ return true;
803
+ } catch(e) {
804
+ return false;
805
+ }
806
+ };
807
+
808
+
809
+ tests['webworkers'] = function() {
810
+ return !!window.Worker;
811
+ };
812
+
813
+
814
+ tests['applicationcache'] = function() {
815
+ return !!window.applicationCache;
816
+ };
817
+
818
+
819
+ // Thanks to Erik Dahlstrom
820
+ tests['svg'] = function() {
821
+ return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
822
+ };
823
+
824
+ // specifically for SVG inline in HTML, not within XHTML
825
+ // test page: paulirish.com/demo/inline-svg
826
+ tests['inlinesvg'] = function() {
827
+ var div = document.createElement('div');
828
+ div.innerHTML = '<svg/>';
829
+ return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
830
+ };
831
+
832
+ // SVG SMIL animation
833
+ tests['smil'] = function() {
834
+ return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
835
+ };
836
+
837
+ // This test is only for clip paths in SVG proper, not clip paths on HTML content
838
+ // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg
839
+
840
+ // However read the comments to dig into applying SVG clippaths to HTML content here:
841
+ // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
842
+ tests['svgclippaths'] = function() {
843
+ return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
844
+ };
845
+
846
+ /*>>webforms*/
847
+ // input features and input types go directly onto the ret object, bypassing the tests loop.
848
+ // Hold this guy to execute in a moment.
849
+ function webforms() {
850
+ /*>>input*/
851
+ // Run through HTML5's new input attributes to see if the UA understands any.
852
+ // We're using f which is the <input> element created early on
853
+ // Mike Taylr has created a comprehensive resource for testing these attributes
854
+ // when applied to all input types:
855
+ // miketaylr.com/code/input-type-attr.html
856
+ // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
857
+
858
+ // Only input placeholder is tested while textarea's placeholder is not.
859
+ // Currently Safari 4 and Opera 11 have support only for the input placeholder
860
+ // Both tests are available in feature-detects/forms-placeholder.js
861
+ Modernizr['input'] = (function( props ) {
862
+ for ( var i = 0, len = props.length; i < len; i++ ) {
863
+ attrs[ props[i] ] = !!(props[i] in inputElem);
864
+ }
865
+ if (attrs.list){
866
+ // safari false positive's on datalist: webk.it/74252
867
+ // see also github.com/Modernizr/Modernizr/issues/146
868
+ attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
869
+ }
870
+ return attrs;
871
+ })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
872
+ /*>>input*/
873
+
874
+ /*>>inputtypes*/
875
+ // Run through HTML5's new input types to see if the UA understands any.
876
+ // This is put behind the tests runloop because it doesn't return a
877
+ // true/false like all the other tests; instead, it returns an object
878
+ // containing each input type with its corresponding true/false value
879
+
880
+ // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
881
+ Modernizr['inputtypes'] = (function(props) {
882
+
883
+ for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {
884
+
885
+ inputElem.setAttribute('type', inputElemType = props[i]);
886
+ bool = inputElem.type !== 'text';
887
+
888
+ // We first check to see if the type we give it sticks..
889
+ // If the type does, we feed it a textual value, which shouldn't be valid.
890
+ // If the value doesn't stick, we know there's input sanitization which infers a custom UI
891
+ if ( bool ) {
892
+
893
+ inputElem.value = smile;
894
+ inputElem.style.cssText = 'position:absolute;visibility:hidden;';
895
+
896
+ if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {
897
+
898
+ docElement.appendChild(inputElem);
899
+ defaultView = document.defaultView;
900
+
901
+ // Safari 2-4 allows the smiley as a value, despite making a slider
902
+ bool = defaultView.getComputedStyle &&
903
+ defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
904
+ // Mobile android web browser has false positive, so must
905
+ // check the height to see if the widget is actually there.
906
+ (inputElem.offsetHeight !== 0);
907
+
908
+ docElement.removeChild(inputElem);
909
+
910
+ } else if ( /^(search|tel)$/.test(inputElemType) ){
911
+ // Spec doesn't define any special parsing or detectable UI
912
+ // behaviors so we pass these through as true
913
+
914
+ // Interestingly, opera fails the earlier test, so it doesn't
915
+ // even make it here.
916
+
917
+ } else if ( /^(url|email)$/.test(inputElemType) ) {
918
+ // Real url and email support comes with prebaked validation.
919
+ bool = inputElem.checkValidity && inputElem.checkValidity() === false;
920
+
921
+ } else {
922
+ // If the upgraded input compontent rejects the :) text, we got a winner
923
+ bool = inputElem.value != smile;
924
+ }
925
+ }
926
+
927
+ inputs[ props[i] ] = !!bool;
928
+ }
929
+ return inputs;
930
+ })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
931
+ /*>>inputtypes*/
932
+ }
933
+ /*>>webforms*/
934
+
935
+
936
+ // End of test definitions
937
+ // -----------------------
938
+
939
+
940
+
941
+ // Run through all tests and detect their support in the current UA.
942
+ // todo: hypothetically we could be doing an array of tests and use a basic loop here.
943
+ for ( var feature in tests ) {
944
+ if ( hasOwnProp(tests, feature) ) {
945
+ // run the test, throw the return value into the Modernizr,
946
+ // then based on that boolean, define an appropriate className
947
+ // and push it into an array of classes we'll join later.
948
+ featureName = feature.toLowerCase();
949
+ Modernizr[featureName] = tests[feature]();
950
+
951
+ classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
952
+ }
953
+ }
954
+
955
+ /*>>webforms*/
956
+ // input tests need to run.
957
+ Modernizr.input || webforms();
958
+ /*>>webforms*/
959
+
960
+
961
+ /**
962
+ * addTest allows the user to define their own feature tests
963
+ * the result will be added onto the Modernizr object,
964
+ * as well as an appropriate className set on the html element
965
+ *
966
+ * @param feature - String naming the feature
967
+ * @param test - Function returning true if feature is supported, false if not
968
+ */
969
+ Modernizr.addTest = function ( feature, test ) {
970
+ if ( typeof feature == 'object' ) {
971
+ for ( var key in feature ) {
972
+ if ( hasOwnProp( feature, key ) ) {
973
+ Modernizr.addTest( key, feature[ key ] );
974
+ }
975
+ }
976
+ } else {
977
+
978
+ feature = feature.toLowerCase();
979
+
980
+ if ( Modernizr[feature] !== undefined ) {
981
+ // we're going to quit if you're trying to overwrite an existing test
982
+ // if we were to allow it, we'd do this:
983
+ // var re = new RegExp("\\b(no-)?" + feature + "\\b");
984
+ // docElement.className = docElement.className.replace( re, '' );
985
+ // but, no rly, stuff 'em.
986
+ return Modernizr;
987
+ }
988
+
989
+ test = typeof test == 'function' ? test() : test;
990
+
991
+ if (typeof enableClasses !== "undefined" && enableClasses) {
992
+ docElement.className += ' ' + (test ? '' : 'no-') + feature;
993
+ }
994
+ Modernizr[feature] = test;
995
+
996
+ }
997
+
998
+ return Modernizr; // allow chaining.
999
+ };
1000
+
1001
+
1002
+ // Reset modElem.cssText to nothing to reduce memory footprint.
1003
+ setCss('');
1004
+ modElem = inputElem = null;
1005
+
1006
+ /*>>shiv*/
1007
+ /**
1008
+ * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
1009
+ */
1010
+ ;(function(window, document) {
1011
+ /*jshint evil:true */
1012
+ /** version */
1013
+ var version = '3.7.0';
1014
+
1015
+ /** Preset options */
1016
+ var options = window.html5 || {};
1017
+
1018
+ /** Used to skip problem elements */
1019
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
1020
+
1021
+ /** Not all elements can be cloned in IE **/
1022
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
1023
+
1024
+ /** Detect whether the browser supports default html5 styles */
1025
+ var supportsHtml5Styles;
1026
+
1027
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
1028
+ var expando = '_html5shiv';
1029
+
1030
+ /** The id for the the documents expando */
1031
+ var expanID = 0;
1032
+
1033
+ /** Cached data for each document */
1034
+ var expandoData = {};
1035
+
1036
+ /** Detect whether the browser supports unknown elements */
1037
+ var supportsUnknownElements;
1038
+
1039
+ (function() {
1040
+ try {
1041
+ var a = document.createElement('a');
1042
+ a.innerHTML = '<xyz></xyz>';
1043
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
1044
+ supportsHtml5Styles = ('hidden' in a);
1045
+
1046
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
1047
+ // assign a false positive if unable to shiv
1048
+ (document.createElement)('a');
1049
+ var frag = document.createDocumentFragment();
1050
+ return (
1051
+ typeof frag.cloneNode == 'undefined' ||
1052
+ typeof frag.createDocumentFragment == 'undefined' ||
1053
+ typeof frag.createElement == 'undefined'
1054
+ );
1055
+ }());
1056
+ } catch(e) {
1057
+ // assign a false positive if detection fails => unable to shiv
1058
+ supportsHtml5Styles = true;
1059
+ supportsUnknownElements = true;
1060
+ }
1061
+
1062
+ }());
1063
+
1064
+ /*--------------------------------------------------------------------------*/
1065
+
1066
+ /**
1067
+ * Creates a style sheet with the given CSS text and adds it to the document.
1068
+ * @private
1069
+ * @param {Document} ownerDocument The document.
1070
+ * @param {String} cssText The CSS text.
1071
+ * @returns {StyleSheet} The style element.
1072
+ */
1073
+ function addStyleSheet(ownerDocument, cssText) {
1074
+ var p = ownerDocument.createElement('p'),
1075
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
1076
+
1077
+ p.innerHTML = 'x<style>' + cssText + '</style>';
1078
+ return parent.insertBefore(p.lastChild, parent.firstChild);
1079
+ }
1080
+
1081
+ /**
1082
+ * Returns the value of `html5.elements` as an array.
1083
+ * @private
1084
+ * @returns {Array} An array of shived element node names.
1085
+ */
1086
+ function getElements() {
1087
+ var elements = html5.elements;
1088
+ return typeof elements == 'string' ? elements.split(' ') : elements;
1089
+ }
1090
+
1091
+ /**
1092
+ * Returns the data associated to the given document
1093
+ * @private
1094
+ * @param {Document} ownerDocument The document.
1095
+ * @returns {Object} An object of data.
1096
+ */
1097
+ function getExpandoData(ownerDocument) {
1098
+ var data = expandoData[ownerDocument[expando]];
1099
+ if (!data) {
1100
+ data = {};
1101
+ expanID++;
1102
+ ownerDocument[expando] = expanID;
1103
+ expandoData[expanID] = data;
1104
+ }
1105
+ return data;
1106
+ }
1107
+
1108
+ /**
1109
+ * returns a shived element for the given nodeName and document
1110
+ * @memberOf html5
1111
+ * @param {String} nodeName name of the element
1112
+ * @param {Document} ownerDocument The context document.
1113
+ * @returns {Object} The shived element.
1114
+ */
1115
+ function createElement(nodeName, ownerDocument, data){
1116
+ if (!ownerDocument) {
1117
+ ownerDocument = document;
1118
+ }
1119
+ if(supportsUnknownElements){
1120
+ return ownerDocument.createElement(nodeName);
1121
+ }
1122
+ if (!data) {
1123
+ data = getExpandoData(ownerDocument);
1124
+ }
1125
+ var node;
1126
+
1127
+ if (data.cache[nodeName]) {
1128
+ node = data.cache[nodeName].cloneNode();
1129
+ } else if (saveClones.test(nodeName)) {
1130
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
1131
+ } else {
1132
+ node = data.createElem(nodeName);
1133
+ }
1134
+
1135
+ // Avoid adding some elements to fragments in IE < 9 because
1136
+ // * Attributes like `name` or `type` cannot be set/changed once an element
1137
+ // is inserted into a document/fragment
1138
+ // * Link elements with `src` attributes that are inaccessible, as with
1139
+ // a 403 response, will cause the tab/window to crash
1140
+ // * Script elements appended to fragments will execute when their `src`
1141
+ // or `text` property is set
1142
+ return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
1143
+ }
1144
+
1145
+ /**
1146
+ * returns a shived DocumentFragment for the given document
1147
+ * @memberOf html5
1148
+ * @param {Document} ownerDocument The context document.
1149
+ * @returns {Object} The shived DocumentFragment.
1150
+ */
1151
+ function createDocumentFragment(ownerDocument, data){
1152
+ if (!ownerDocument) {
1153
+ ownerDocument = document;
1154
+ }
1155
+ if(supportsUnknownElements){
1156
+ return ownerDocument.createDocumentFragment();
1157
+ }
1158
+ data = data || getExpandoData(ownerDocument);
1159
+ var clone = data.frag.cloneNode(),
1160
+ i = 0,
1161
+ elems = getElements(),
1162
+ l = elems.length;
1163
+ for(;i<l;i++){
1164
+ clone.createElement(elems[i]);
1165
+ }
1166
+ return clone;
1167
+ }
1168
+
1169
+ /**
1170
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
1171
+ * @private
1172
+ * @param {Document|DocumentFragment} ownerDocument The document.
1173
+ * @param {Object} data of the document.
1174
+ */
1175
+ function shivMethods(ownerDocument, data) {
1176
+ if (!data.cache) {
1177
+ data.cache = {};
1178
+ data.createElem = ownerDocument.createElement;
1179
+ data.createFrag = ownerDocument.createDocumentFragment;
1180
+ data.frag = data.createFrag();
1181
+ }
1182
+
1183
+
1184
+ ownerDocument.createElement = function(nodeName) {
1185
+ //abort shiv
1186
+ if (!html5.shivMethods) {
1187
+ return data.createElem(nodeName);
1188
+ }
1189
+ return createElement(nodeName, ownerDocument, data);
1190
+ };
1191
+
1192
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
1193
+ 'var n=f.cloneNode(),c=n.createElement;' +
1194
+ 'h.shivMethods&&(' +
1195
+ // unroll the `createElement` calls
1196
+ getElements().join().replace(/[\w\-]+/g, function(nodeName) {
1197
+ data.createElem(nodeName);
1198
+ data.frag.createElement(nodeName);
1199
+ return 'c("' + nodeName + '")';
1200
+ }) +
1201
+ ');return n}'
1202
+ )(html5, data.frag);
1203
+ }
1204
+
1205
+ /*--------------------------------------------------------------------------*/
1206
+
1207
+ /**
1208
+ * Shivs the given document.
1209
+ * @memberOf html5
1210
+ * @param {Document} ownerDocument The document to shiv.
1211
+ * @returns {Document} The shived document.
1212
+ */
1213
+ function shivDocument(ownerDocument) {
1214
+ if (!ownerDocument) {
1215
+ ownerDocument = document;
1216
+ }
1217
+ var data = getExpandoData(ownerDocument);
1218
+
1219
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
1220
+ data.hasCSS = !!addStyleSheet(ownerDocument,
1221
+ // corrects block display not defined in IE6/7/8/9
1222
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
1223
+ // adds styling not present in IE6/7/8/9
1224
+ 'mark{background:#FF0;color:#000}' +
1225
+ // hides non-rendered elements
1226
+ 'template{display:none}'
1227
+ );
1228
+ }
1229
+ if (!supportsUnknownElements) {
1230
+ shivMethods(ownerDocument, data);
1231
+ }
1232
+ return ownerDocument;
1233
+ }
1234
+
1235
+ /*--------------------------------------------------------------------------*/
1236
+
1237
+ /**
1238
+ * The `html5` object is exposed so that more elements can be shived and
1239
+ * existing shiving can be detected on iframes.
1240
+ * @type Object
1241
+ * @example
1242
+ *
1243
+ * // options can be changed before the script is included
1244
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
1245
+ */
1246
+ var html5 = {
1247
+
1248
+ /**
1249
+ * An array or space separated string of node names of the elements to shiv.
1250
+ * @memberOf html5
1251
+ * @type Array|String
1252
+ */
1253
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
1254
+
1255
+ /**
1256
+ * current version of html5shiv
1257
+ */
1258
+ 'version': version,
1259
+
1260
+ /**
1261
+ * A flag to indicate that the HTML5 style sheet should be inserted.
1262
+ * @memberOf html5
1263
+ * @type Boolean
1264
+ */
1265
+ 'shivCSS': (options.shivCSS !== false),
1266
+
1267
+ /**
1268
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
1269
+ * @memberOf html5
1270
+ * @type boolean
1271
+ */
1272
+ 'supportsUnknownElements': supportsUnknownElements,
1273
+
1274
+ /**
1275
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
1276
+ * methods should be overwritten.
1277
+ * @memberOf html5
1278
+ * @type Boolean
1279
+ */
1280
+ 'shivMethods': (options.shivMethods !== false),
1281
+
1282
+ /**
1283
+ * A string to describe the type of `html5` object ("default" or "default print").
1284
+ * @memberOf html5
1285
+ * @type String
1286
+ */
1287
+ 'type': 'default',
1288
+
1289
+ // shivs the document according to the specified `html5` object options
1290
+ 'shivDocument': shivDocument,
1291
+
1292
+ //creates a shived element
1293
+ createElement: createElement,
1294
+
1295
+ //creates a shived documentFragment
1296
+ createDocumentFragment: createDocumentFragment
1297
+ };
1298
+
1299
+ /*--------------------------------------------------------------------------*/
1300
+
1301
+ // expose html5
1302
+ window.html5 = html5;
1303
+
1304
+ // shiv the document
1305
+ shivDocument(document);
1306
+
1307
+ }(this, document));
1308
+ /*>>shiv*/
1309
+
1310
+ // Assign private properties to the return object with prefix
1311
+ Modernizr._version = version;
1312
+
1313
+ // expose these for the plugin API. Look in the source for how to join() them against your input
1314
+ /*>>prefixes*/
1315
+ Modernizr._prefixes = prefixes;
1316
+ /*>>prefixes*/
1317
+ /*>>domprefixes*/
1318
+ Modernizr._domPrefixes = domPrefixes;
1319
+ Modernizr._cssomPrefixes = cssomPrefixes;
1320
+ /*>>domprefixes*/
1321
+
1322
+ /*>>mq*/
1323
+ // Modernizr.mq tests a given media query, live against the current state of the window
1324
+ // A few important notes:
1325
+ // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
1326
+ // * A max-width or orientation query will be evaluated against the current state, which may change later.
1327
+ // * You must specify values. Eg. If you are testing support for the min-width media query use:
1328
+ // Modernizr.mq('(min-width:0)')
1329
+ // usage:
1330
+ // Modernizr.mq('only screen and (max-width:768)')
1331
+ Modernizr.mq = testMediaQuery;
1332
+ /*>>mq*/
1333
+
1334
+ /*>>hasevent*/
1335
+ // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
1336
+ // Modernizr.hasEvent('gesturestart', elem)
1337
+ Modernizr.hasEvent = isEventSupported;
1338
+ /*>>hasevent*/
1339
+
1340
+ /*>>testprop*/
1341
+ // Modernizr.testProp() investigates whether a given style property is recognized
1342
+ // Note that the property names must be provided in the camelCase variant.
1343
+ // Modernizr.testProp('pointerEvents')
1344
+ Modernizr.testProp = function(prop){
1345
+ return testProps([prop]);
1346
+ };
1347
+ /*>>testprop*/
1348
+
1349
+ /*>>testallprops*/
1350
+ // Modernizr.testAllProps() investigates whether a given style property,
1351
+ // or any of its vendor-prefixed variants, is recognized
1352
+ // Note that the property names must be provided in the camelCase variant.
1353
+ // Modernizr.testAllProps('boxSizing')
1354
+ Modernizr.testAllProps = testPropsAll;
1355
+ /*>>testallprops*/
1356
+
1357
+
1358
+ /*>>teststyles*/
1359
+ // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
1360
+ // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
1361
+ Modernizr.testStyles = injectElementWithStyles;
1362
+ /*>>teststyles*/
1363
+
1364
+
1365
+ /*>>prefixed*/
1366
+ // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
1367
+ // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'
1368
+
1369
+ // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
1370
+ // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
1371
+ //
1372
+ // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');
1373
+
1374
+ // If you're trying to ascertain which transition end event to bind to, you might do something like...
1375
+ //
1376
+ // var transEndEventNames = {
1377
+ // 'WebkitTransition' : 'webkitTransitionEnd',
1378
+ // 'MozTransition' : 'transitionend',
1379
+ // 'OTransition' : 'oTransitionEnd',
1380
+ // 'msTransition' : 'MSTransitionEnd',
1381
+ // 'transition' : 'transitionend'
1382
+ // },
1383
+ // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
1384
+
1385
+ Modernizr.prefixed = function(prop, obj, elem){
1386
+ if(!obj) {
1387
+ return testPropsAll(prop, 'pfx');
1388
+ } else {
1389
+ // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
1390
+ return testPropsAll(prop, obj, elem);
1391
+ }
1392
+ };
1393
+ /*>>prefixed*/
1394
+
1395
+
1396
+ /*>>cssclasses*/
1397
+ // Remove "no-js" class from <html> element, if it exists:
1398
+ docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +
1399
+
1400
+ // Add the new classes to the <html> element.
1401
+ (enableClasses ? ' js ' + classes.join(' ') : '');
1402
+ /*>>cssclasses*/
1403
+
1404
+ return Modernizr;
1405
+
1406
+ })(this, this.document);
js/nav-menu-frontend.js CHANGED
@@ -1,87 +1,87 @@
1
- jQuery(document).ready(function() {
2
-
3
- if (typeof Ecwid == 'undefined') return;
4
-
5
- refreshEcwidMenuItemsSelection();
6
-
7
- Ecwid.OnPageLoaded.add(function(page) {
8
- if (page.type == 'CART') {
9
- window.ecwidCurrentMenuPage = 'cart';
10
- } else if (page.type == 'ACCOUNT_SETTINGS' || page.type == 'ORDERS' || page.type == 'ADDRESS_BOOK') {
11
- window.ecwidCurrentMenuPage = 'my-account';
12
- } else if (page.type == 'SEARCH') {
13
- window.ecwidCurrentMenuPage = 'product-search';
14
- } else {
15
- window.ecwidCurrentMenuPage = 'store';
16
- }
17
- });
18
-
19
- Ecwid.OnPageLoaded.add(refreshEcwidMenuItemsSelection);
20
-
21
- function refreshEcwidMenuItemsSelection() {
22
- $allMenus = jQuery('ul').has('li.menu-item');
23
- $allMenus.each(function (idx, el) {
24
- var current = findCurrentEcwidMenuItem(el);
25
- if (current) {
26
- highlightCurrentMenuItem(el, current);
27
- }
28
- });
29
- }
30
-
31
- function highlightCurrentMenuItem(menu, item) {
32
- jQuery('.current_page_item', menu).removeClass('current_page_item');
33
- jQuery('.current-menu-item', menu).removeClass('current-menu-item');
34
-
35
- item.addClass('current-menu-item current_page_item');
36
- }
37
-
38
- function findCurrentEcwidMenuItem(menuElement) {
39
- var specificMenuItem = findSpecificMenuItem(menuElement);
40
- if (specificMenuItem) {
41
- return specificMenuItem;
42
- }
43
-
44
- var storeMenuItem = findStoreMenuItem(menuElement);
45
- if (storeMenuItem) {
46
- return storeMenuItem;
47
- }
48
-
49
- return null;
50
- }
51
-
52
- function findSpecificMenuItem(menuElement) {
53
- var currentPage = getCurrentEcwidPage();
54
- var currentMenuItem = null;
55
-
56
- if (['my-account', 'product-search', 'cart'].indexOf(currentPage) != -1) {
57
- currentMenuItem = jQuery('>li.menu-item-object-' + ecwid_menu_data.items['ecwid-' + currentPage]['classes'], menuElement);
58
- if (currentMenuItem.length > 0) {
59
- return currentMenuItem;
60
- }
61
- }
62
-
63
- return null;
64
- }
65
-
66
- function findStoreMenuItem(menuElement) {
67
- var currentMenuItem = null;
68
-
69
- var storeItems = ['ecwid-store', 'ecwid-store-with-categories'];
70
- for (var i = 0; i < storeItems.length; i++) {
71
- currentMenuItem = jQuery('>li.menu-item-object-' + ecwid_menu_data.items[storeItems[i]]['classes'], menuElement);
72
- if (currentMenuItem.length > 0) {
73
- return currentMenuItem;
74
- }
75
- }
76
-
77
- return null;
78
- }
79
-
80
- function getCurrentEcwidPage() {
81
- if (!window.ecwidCurrentMenuPage) {
82
- window.ecwidCurrentMenuPage = 'store';
83
- }
84
-
85
- return window.ecwidCurrentMenuPage;
86
- }
87
  })
1
+ jQuery(document).ready(function() {
2
+
3
+ if (typeof Ecwid == 'undefined') return;
4
+
5
+ refreshEcwidMenuItemsSelection();
6
+
7
+ Ecwid.OnPageLoaded.add(function(page) {
8
+ if (page.type == 'CART') {
9
+ window.ecwidCurrentMenuPage = 'cart';
10
+ } else if (page.type == 'ACCOUNT_SETTINGS' || page.type == 'ORDERS' || page.type == 'ADDRESS_BOOK') {
11
+ window.ecwidCurrentMenuPage = 'my-account';
12
+ } else if (page.type == 'SEARCH') {
13
+ window.ecwidCurrentMenuPage = 'product-search';
14
+ } else {
15
+ window.ecwidCurrentMenuPage = 'store';
16
+ }
17
+ });
18
+
19
+ Ecwid.OnPageLoaded.add(refreshEcwidMenuItemsSelection);
20
+
21
+ function refreshEcwidMenuItemsSelection() {
22
+ $allMenus = jQuery('ul').has('li.menu-item');
23
+ $allMenus.each(function (idx, el) {
24
+ var current = findCurrentEcwidMenuItem(el);
25
+ if (current) {
26
+ highlightCurrentMenuItem(el, current);
27
+ }
28
+ });
29
+ }
30
+
31
+ function highlightCurrentMenuItem(menu, item) {
32
+ jQuery('.current_page_item', menu).removeClass('current_page_item');
33
+ jQuery('.current-menu-item', menu).removeClass('current-menu-item');
34
+
35
+ item.addClass('current-menu-item current_page_item');
36
+ }
37
+
38
+ function findCurrentEcwidMenuItem(menuElement) {
39
+ var specificMenuItem = findSpecificMenuItem(menuElement);
40
+ if (specificMenuItem) {
41
+ return specificMenuItem;
42
+ }
43
+
44
+ var storeMenuItem = findStoreMenuItem(menuElement);
45
+ if (storeMenuItem) {
46
+ return storeMenuItem;
47
+ }
48
+
49
+ return null;
50
+ }
51
+
52
+ function findSpecificMenuItem(menuElement) {
53
+ var currentPage = getCurrentEcwidPage();
54
+ var currentMenuItem = null;
55
+
56
+ if (['my-account', 'product-search', 'cart'].indexOf(currentPage) != -1) {
57
+ currentMenuItem = jQuery('>li.menu-item-object-' + ecwid_menu_data.items['ecwid-' + currentPage]['classes'], menuElement);
58
+ if (currentMenuItem.length > 0) {
59
+ return currentMenuItem;
60
+ }
61
+ }
62
+
63
+ return null;
64
+ }
65
+
66
+ function findStoreMenuItem(menuElement) {
67
+ var currentMenuItem = null;
68
+
69
+ var storeItems = ['ecwid-store', 'ecwid-store-with-categories'];
70
+ for (var i = 0; i < storeItems.length; i++) {
71
+ currentMenuItem = jQuery('>li.menu-item-object-' + ecwid_menu_data.items[storeItems[i]]['classes'], menuElement);
72
+ if (currentMenuItem.length > 0) {
73
+ return currentMenuItem;
74
+ }
75
+ }
76
+
77
+ return null;
78
+ }
79
+
80
+ function getCurrentEcwidPage() {
81
+ if (!window.ecwidCurrentMenuPage) {
82
+ window.ecwidCurrentMenuPage = 'store';
83
+ }
84
+
85
+ return window.ecwidCurrentMenuPage;
86
+ }
87
  })
js/nav-menu.js CHANGED
@@ -1,101 +1,101 @@
1
- jQuery(document).ready(function() {
2
-
3
- var ecwidClasses = {};
4
- for (var i in ecwid_params.items) {
5
- ecwidClasses[i] = ecwid_params.items[i].name;
6
- }
7
-
8
- if (ecwid_params.first_run && jQuery('#ecwid_nav_links-hide:checked').length == 0) {
9
- jQuery('#ecwid_nav_links-hide').click();
10
- }
11
-
12
- processEcwidLinks = function(element) {
13
-
14
- var ecwidLink = findEcwidLink(element);
15
- if (!findEcwidLink(element)) return;
16
-
17
- if (jQuery(element).hasClass('ecwid-link')) return;
18
-
19
- jQuery(element).addClass('ecwid-link');
20
- jQuery(element).find('.item-type').text(ecwid_params.store_page);
21
-
22
- if (isStoreWithCategories(element)) {
23
-
24
- var $message = jQuery('<p>')
25
- .addClass('ecwid-store-with-cats-message')
26
- .text(ecwid_l10n.reset_cache_message)
27
- .insertAfter(jQuery('.field-move', element));
28
-
29
- $target = jQuery('<p class="ecwid-store-with-cats-reset-cache">').insertAfter($message);
30
-
31
- jQuery('<span>')
32
- .text(ecwid_l10n.cache_updated)
33
- .addClass('ecwid-reset-categories-cache-updated')
34
- .appendTo($target);
35
-
36
- jQuery('<a>')
37
- .text(ecwid_l10n.reset_cats_cache)
38
- .attr('href', 'javascript:void(0);')
39
- .addClass('ecwid-reset-categories-cache')
40
- .appendTo($target)
41
- .click(function() {
42
-
43
- var that = this;
44
- jQuery(this).css('cursor', 'wait');
45
- resetCache(function() {
46
- jQuery(that).fadeOut(100, function() {
47
- jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeIn(100, function() {
48
- setTimeout(function () {
49
- jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeOut(500, function () {
50
- jQuery(that).fadeIn(500);
51
- })
52
- }, 4000);
53
- });
54
- });
55
-
56
- jQuery(that).css('cursor', 'pointer');
57
- });
58
- });
59
- }
60
- }
61
-
62
- findEcwidLink = function(element) {
63
-
64
- for (var i in ecwidClasses) {
65
- if (jQuery(element).hasClass('menu-item-' + i)) {
66
- return i;
67
- }
68
- }
69
-
70
- return false;
71
- }
72
-
73
- isStoreWithCategories = function(element) {
74
- return jQuery(element).hasClass('menu-item-ecwid-store-with-categories');
75
- }
76
-
77
- resetCache = function(callback) {
78
-
79
- jQuery.getJSON(
80
- 'admin-ajax.php',
81
- {
82
- action: 'ecwid_reset_categories_cache'
83
- },
84
- callback
85
- );
86
-
87
- }
88
-
89
- jQuery('ul.menu > li.menu-item').each(function(idx, el) {
90
- processEcwidLinks(el);
91
- });
92
-
93
- jQuery('#ecwid_nav_links').insertAfter(jQuery('#add-page'));
94
-
95
- jQuery('#menu-to-edit').on('DOMNodeInserted', function(e) {
96
- if (!jQuery(e.srcElement).hasClass('menu-item')) return;
97
-
98
- processEcwidLinks(e.srcElement);
99
- });
100
-
101
  });
1
+ jQuery(document).ready(function() {
2
+
3
+ var ecwidClasses = {};
4
+ for (var i in ecwid_params.items) {
5
+ ecwidClasses[i] = ecwid_params.items[i].name;
6
+ }
7
+
8
+ if (ecwid_params.first_run && jQuery('#ecwid_nav_links-hide:checked').length == 0) {
9
+ jQuery('#ecwid_nav_links-hide').click();
10
+ }
11
+
12
+ processEcwidLinks = function(element) {
13
+
14
+ var ecwidLink = findEcwidLink(element);
15
+ if (!findEcwidLink(element)) return;
16
+
17
+ if (jQuery(element).hasClass('ecwid-link')) return;
18
+
19
+ jQuery(element).addClass('ecwid-link');
20
+ jQuery(element).find('.item-type').text(ecwid_params.store_page);
21
+
22
+ if (isStoreWithCategories(element)) {
23
+
24
+ var $message = jQuery('<p>')
25
+ .addClass('ecwid-store-with-cats-message')
26
+ .text(ecwid_l10n.reset_cache_message)
27
+ .insertAfter(jQuery('.field-move', element));
28
+
29
+ $target = jQuery('<p class="ecwid-store-with-cats-reset-cache">').insertAfter($message);
30
+
31
+ jQuery('<span>')
32
+ .text(ecwid_l10n.cache_updated)
33
+ .addClass('ecwid-reset-categories-cache-updated')
34
+ .appendTo($target);
35
+
36
+ jQuery('<a>')
37
+ .text(ecwid_l10n.reset_cats_cache)
38
+ .attr('href', 'javascript:void(0);')
39
+ .addClass('ecwid-reset-categories-cache')
40
+ .appendTo($target)
41
+ .click(function() {
42
+
43
+ var that = this;
44
+ jQuery(this).css('cursor', 'wait');
45
+ resetCache(function() {
46
+ jQuery(that).fadeOut(100, function() {
47
+ jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeIn(100, function() {
48
+ setTimeout(function () {
49
+ jQuery(that).prev('.ecwid-reset-categories-cache-updated').fadeOut(500, function () {
50
+ jQuery(that).fadeIn(500);
51
+ })
52
+ }, 4000);
53
+ });
54
+ });
55
+
56
+ jQuery(that).css('cursor', 'pointer');
57
+ });
58
+ });
59
+ }
60
+ }
61
+
62
+ findEcwidLink = function(element) {
63
+
64
+ for (var i in ecwidClasses) {
65
+ if (jQuery(element).hasClass('menu-item-' + i)) {
66
+ return i;
67
+ }
68
+ }
69
+
70
+ return false;
71
+ }
72
+
73
+ isStoreWithCategories = function(element) {
74
+ return jQuery(element).hasClass('menu-item-ecwid-store-with-categories');
75
+ }
76
+
77
+ resetCache = function(callback) {
78
+
79
+ jQuery.getJSON(
80
+ 'admin-ajax.php',
81
+ {
82
+ action: 'ecwid_reset_categories_cache'
83
+ },
84
+ callback
85
+ );
86
+
87
+ }
88
+
89
+ jQuery('ul.menu > li.menu-item').each(function(idx, el) {
90
+ processEcwidLinks(el);
91
+ });
92
+
93
+ jQuery('#ecwid_nav_links').insertAfter(jQuery('#add-page'));
94
+
95
+ jQuery('#menu-to-edit').on('DOMNodeInserted', function(e) {
96
+ if (!jQuery(e.srcElement).hasClass('menu-item')) return;
97
+
98
+ processEcwidLinks(e.srcElement);
99
+ });
100
+
101
  });
js/products-list.js CHANGED
@@ -1,292 +1,292 @@
1
- jQuery.widget('ecwid.productsList', {
2
-
3
- _create: function() {
4
-
5
- this.products = {};
6
- this.container = null;
7
- this._prefix = 'ecwid-productsList';
8
- this.sort = [];
9
- this.options = {
10
- max: 3,
11
- debug: false
12
- };
13
-
14
-
15
- this.element.addClass(this._prefix);
16
- this._removeInitialContent();
17
- this.container = jQuery('<ul>').appendTo(this.element);
18
- this._initFromHtmlData();
19
- this._readSingleProducts();
20
- this._onWindowResize();
21
- this._render();
22
-
23
- var self = this;
24
- jQuery(window).resize(
25
- ecwid_debounce(
26
- function() {
27
- self._onWindowResize();
28
- }
29
- , 200)
30
- );
31
-
32
- this.ajax_url = wp_ecwid_products_list_vars.ajax_url;
33
- this.is_api_available = wp_ecwid_products_list_vars.is_api_available;
34
- },
35
-
36
- _render: function() {
37
- var toShow = this._getProductsToShow();
38
-
39
- for (var i = 0; i < toShow.length; i++) {
40
- this._showProduct(this.products[toShow[i]]);
41
- }
42
-
43
- for (var id in this.products) {
44
- if (toShow.indexOf(id) == -1) {
45
- this._hideProduct(this.products[id]);
46
- }
47
- }
48
-
49
- if (toShow.length > 0) {
50
- jQuery('.show-if-empty', this.el).hide();
51
- }
52
- },
53
-
54
- _setOption: function(key, value) {
55
- this._super(key, value);
56
- if (key == 'max') {
57
- this.refresh();
58
- }
59
- },
60
-
61
- _getProductClass: function(id) {
62
- return this._prefix + '-product-' + id;
63
- },
64
-
65
- _getProductElement: function(id) {
66
- return this.container.find('.' + this._getProductClass(id));
67
- },
68
-
69
- _showProduct: function(product) {
70
- var existing = this._getProductElement(product.id);
71
-
72
- if (existing.length == 0) {
73
- this._buildProductElement(product);
74
- }
75
-
76
- this._fillProductElement(product);
77
-
78
- this._getProductElement(product.id)
79
- .addClass('show')
80
- .removeClass('hide')
81
- .prependTo(this.container);
82
- },
83
-
84
- _hideProduct: function(product) {
85
- this._getProductElement(product.id)
86
- .addClass('hide')
87
- .removeClass('show');
88
- },
89
-
90
- _buildProductElement: function(product) {
91
- var container = jQuery('<li class="' + this._getProductClass(product.id) + '">').appendTo(this.container);
92
-
93
- if (product.link != '') {
94
- container = jQuery('<a>')
95
- .appendTo(container);
96
- }
97
- if (product.image) {
98
- jQuery('<div class="' + this._prefix + '-image">').append('<img>').appendTo(container);
99
- } else {
100
- jQuery('<div class="' + this._prefix + '-image ecwid-noimage">').appendTo(container);
101
- }
102
- jQuery('<div class="' + this._prefix + '-name">').appendTo(container);
103
- jQuery('<div class="' + this._prefix + '-price ecwid-productBrowser-price">').appendTo(container);
104
- },
105
-
106
- _fillProductElement: function(product) {
107
- var container = jQuery('.'+ this._getProductClass(product.id), this.el);
108
-
109
- if (product.link != '') {
110
- jQuery('a', container)
111
- .attr('href', product.link)
112
- .attr('title', product.name);
113
- }
114
- if (product.image) {
115
- jQuery('.' + this._prefix + '-image img', container).attr('src', product.image);
116
- }
117
-
118
- jQuery('.' + this._prefix + '-name', container).text(product.name);
119
- jQuery('.' + this._prefix + '-price.ecwid-productBrowser-price', container).text(product.price);
120
-
121
- },
122
-
123
- _initFromHtmlData: function() {
124
- for (var option_name in this.options) {
125
- var data_name = 'ecwid-' + option_name;
126
- if (typeof(this.element.data(data_name)) != 'undefined') {
127
- this._setOption(option_name, this.element.data(data_name));
128
- }
129
- }
130
- },
131
-
132
- _removeInitialContent: function() {
133
- this.originalContentContainer = jQuery('<div class="ecwid-initial-productsList-content">')
134
- .data('generatedProductsList', this)
135
- .append(this.element.find('>*'))
136
- .insertAfter(this.element);
137
- },
138
-
139
- _readSingleProducts: function() {
140
-
141
- var self = this;
142
- var singleProductLoaded = function (container) {
143
- return jQuery('.ecwid-title', container).text() != '';
144
- }
145
-
146
- jQuery('.ecwid-SingleProduct', this.originalContentContainer).each(function(idx, el) {
147
- var interval = setInterval(
148
- function() {
149
- if (singleProductLoaded(el)) {
150
- clearInterval(interval);
151
- self._readSingleProduct(el);
152
- }
153
- },
154
- 500
155
- );
156
- });
157
- },
158
-
159
- _readSingleProduct: function(singleProductContainer) {
160
-
161
- var forced_image = jQuery('div[itemprop=image]', singleProductContainer).data('force-image');
162
- var product = {
163
- name: jQuery('.ecwid-title', singleProductContainer).text(),
164
- image: forced_image ? forced_image : jQuery('.ecwid-SingleProduct-picture img', singleProductContainer).attr('src'),
165
- id: jQuery(singleProductContainer).data('single-product-id'),
166
- link: jQuery(singleProductContainer).data('single-product-link'),
167
- }
168
- if (jQuery('.ecwid-productBrowser-price .gwt-HTML', singleProductContainer).length > 0) {
169
- product.price = jQuery('.ecwid-productBrowser-price .gwt-HTML', singleProductContainer).text();
170
- } else {
171
- product.price = jQuery('.ecwid-price', singleProductContainer).text();
172
- }
173
- this.addProduct(product, true);
174
- },
175
-
176
- _updateFromServer: function(id) {
177
-
178
- var that = this;
179
- if (!this.products[id]) return false;
180
- jQuery.getJSON(
181
- wp_ecwid_products_list_vars.ajax_url,
182
- {
183
- 'action': 'ecwid_get_product_info',
184
- 'id': id
185
- },
186
- function(data, result) {
187
- if (result == 'success') {
188
- that.products[id] = jQuery.extend(
189
- that.products[id], {
190
- image: data.imageUrl
191
- }
192
- );
193
-
194
- that._render();
195
- }
196
- }
197
- );
198
- },
199
-
200
- _getProductsToShow: function() {
201
- return this.sort.slice(0, this.option('max'));
202
- },
203
-
204
- _addToSort: function(id) {
205
- this.sort.push(id.toString());
206
- },
207
-
208
- _triggerError: function(message) {
209
- message = 'ecwid.productsList ' + message;
210
- if (this.options.debug) {
211
- alert(message);
212
- }
213
- console.log(message);
214
- },
215
-
216
- _destroy: function() {
217
- this.element.removeClass('.' + this._prefix).find('>*').remove();
218
- this.element.append(this.originalContentContainer.find('>*'));
219
- this.originalContentContainer.data('generatedProductsList', null);
220
- this.originalContentContainer = null;
221
- this._superApply(arguments);
222
- },
223
-
224
- refresh: function() {
225
- this._render();
226
- },
227
-
228
- addProduct: function(product, forceRender) {
229
- if (typeof(product.id) == 'undefined') {
230
- this._triggerError('addProduct error: product must have id');
231
- }
232
-
233
- if (typeof this.products[product.id] != 'undefined') {
234
- return;
235
- }
236
-
237
- this.products[product.id] = jQuery.extend(
238
- {}, {
239
- id: 0,
240
- name: 'no name',
241
- image: '',
242
- link: '',
243
- price: '',
244
- toString: function() {return this.name;}
245
- },
246
- product
247
- );
248
-
249
- this._addToSort(product.id);
250
-
251
- if (forceRender) {
252
- this._render();
253
- }
254
- },
255
-
256
- _onWindowResize: function() {
257
- if (this.element.width() < 150) {
258
- this.element.addClass('width-s').removeClass('width-m width-l');
259
- } else if (this.element.width() < 300) {
260
- this.element.addClass('width-m').removeClass('width-s width-l');
261
- } else {
262
- this.element.addClass('width-l').removeClass('width-s width-m');
263
- }
264
- }
265
- });
266
-
267
-
268
- // Debounce function from http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
269
- var ecwid_debounce = function (func, threshold, execAsap) {
270
-
271
- var timeout;
272
-
273
- return function debounced () {
274
- var obj = this, args = arguments;
275
- function delayed () {
276
- if (!execAsap) {
277
- func.apply(obj, args);
278
- }
279
- timeout = null;
280
- };
281
-
282
- if (timeout)
283
- clearTimeout(timeout);
284
- else if (execAsap)
285
- func.apply(obj, args);
286
-
287
- timeout = setTimeout(delayed, threshold || 100);
288
- };
289
-
290
- }
291
-
292
- jQuery('.ecwid-productsList').trigger('ecwidOnWindowResize');
1
+ jQuery.widget('ecwid.productsList', {
2
+
3
+ _create: function() {
4
+
5
+ this.products = {};
6
+ this.container = null;
7
+ this._prefix = 'ecwid-productsList';
8
+ this.sort = [];
9
+ this.options = {
10
+ max: 3,
11
+ debug: false
12
+ };
13
+
14
+
15
+ this.element.addClass(this._prefix);
16
+ this._removeInitialContent();
17
+ this.container = jQuery('<ul>').appendTo(this.element);
18
+ this._initFromHtmlData();
19
+ this._readSingleProducts();
20
+ this._onWindowResize();
21
+ this._render();
22
+
23
+ var self = this;
24
+ jQuery(window).resize(
25
+ ecwid_debounce(
26
+ function() {
27
+ self._onWindowResize();
28
+ }
29
+ , 200)
30
+ );
31
+
32
+ this.ajax_url = wp_ecwid_products_list_vars.ajax_url;
33
+ this.is_api_available = wp_ecwid_products_list_vars.is_api_available;
34
+ },
35
+
36
+ _render: function() {
37
+ var toShow = this._getProductsToShow();
38
+
39
+ for (var i = 0; i < toShow.length; i++) {
40
+ this._showProduct(this.products[toShow[i]]);
41
+ }
42
+
43
+ for (var id in this.products) {
44
+ if (toShow.indexOf(id) == -1) {
45
+ this._hideProduct(this.products[id]);
46
+ }
47
+ }
48
+
49
+ if (toShow.length > 0) {
50
+ jQuery('.show-if-empty', this.el).hide();
51
+ }
52
+ },
53
+
54
+ _setOption: function(key, value) {
55
+ this._super(key, value);
56
+ if (key == 'max') {
57
+ this.refresh();
58
+ }
59
+ },
60
+
61
+ _getProductClass: function(id) {
62
+ return this._prefix + '-product-' + id;
63
+ },
64
+
65
+ _getProductElement: function(id) {
66
+ return this.container.find('.' + this._getProductClass(id));
67
+ },
68
+
69
+ _showProduct: function(product) {
70
+ var existing = this._getProductElement(product.id);
71
+
72
+ if (existing.length == 0) {
73
+ this._buildProductElement(product);
74
+ }
75
+
76
+ this._fillProductElement(product);
77
+
78
+ this._getProductElement(product.id)
79
+ .addClass('show')
80
+ .removeClass('hide')
81
+ .prependTo(this.container);
82
+ },
83
+
84
+ _hideProduct: function(product) {
85
+ this._getProductElement(product.id)
86
+ .addClass('hide')
87
+ .removeClass('show');
88
+ },
89
+
90
+ _buildProductElement: function(product) {
91
+ var container = jQuery('<li class="' + this._getProductClass(product.id) + '">').appendTo(this.container);
92
+
93
+ if (product.link != '') {
94
+ container = jQuery('<a>')
95
+ .appendTo(container);
96
+ }
97
+ if (product.image) {
98
+ jQuery('<div class="' + this._prefix + '-image">').append('<img>').appendTo(container);
99
+ } else {
100
+ jQuery('<div class="' + this._prefix + '-image ecwid-noimage">').appendTo(container);
101
+ }
102
+ jQuery('<div class="' + this._prefix + '-name">').appendTo(container);
103
+ jQuery('<div class="' + this._prefix + '-price ecwid-productBrowser-price">').appendTo(container);
104
+ },
105
+
106
+ _fillProductElement: function(product) {
107
+ var container = jQuery('.'+ this._getProductClass(product.id), this.el);
108
+
109
+ if (product.link != '') {
110
+ jQuery('a', container)
111
+ .attr('href', product.link)
112
+ .attr('title', product.name);
113
+ }
114
+ if (product.image) {
115
+ jQuery('.' + this._prefix + '-image img', container).attr('src', product.image);
116
+ }
117
+
118
+ jQuery('.' + this._prefix + '-name', container).text(product.name);
119
+ jQuery('.' + this._prefix + '-price.ecwid-productBrowser-price', container).text(product.price);
120
+
121
+ },
122
+
123
+ _initFromHtmlData: function() {
124
+ for (var option_name in this.options) {
125
+ var data_name = 'ecwid-' + option_name;
126
+ if (typeof(this.element.data(data_name)) != 'undefined') {
127
+ this._setOption(option_name, this.element.data(data_name));
128
+ }
129
+ }
130
+ },
131
+
132
+ _removeInitialContent: function() {
133
+ this.originalContentContainer = jQuery('<div class="ecwid-initial-productsList-content">')
134
+ .data('generatedProductsList', this)
135
+ .append(this.element.find('>*'))
136
+ .insertAfter(this.element);
137
+ },
138
+
139
+ _readSingleProducts: function() {
140
+
141
+ var self = this;
142
+ var singleProductLoaded = function (container) {
143
+ return jQuery('.ecwid-title', container).text() != '';
144
+ }
145
+
146
+ jQuery('.ecwid-SingleProduct', this.originalContentContainer).each(function(idx, el) {
147
+ var interval = setInterval(
148
+ function() {
149
+ if (singleProductLoaded(el)) {
150
+ clearInterval(interval);
151
+ self._readSingleProduct(el);
152
+ }
153
+ },
154
+ 500
155
+ );
156
+ });
157
+ },
158
+
159
+ _readSingleProduct: function(singleProductContainer) {
160
+
161
+ var forced_image = jQuery('div[itemprop=image]', singleProductContainer).data('force-image');
162
+ var product = {
163
+ name: jQuery('.ecwid-title', singleProductContainer).text(),
164
+ image: forced_image ? forced_image : jQuery('.ecwid-SingleProduct-picture img', singleProductContainer).attr('src'),
165
+ id: jQuery(singleProductContainer).data('single-product-id'),
166
+ link: jQuery(singleProductContainer).data('single-product-link'),
167
+ }
168
+ if (jQuery('.ecwid-productBrowser-price .gwt-HTML', singleProductContainer).length > 0) {
169
+ product.price = jQuery('.ecwid-productBrowser-price .gwt-HTML', singleProductContainer).text();
170
+ } else {
171
+ product.price = jQuery('.ecwid-price', singleProductContainer).text();
172
+ }
173
+ this.addProduct(product, true);
174
+ },
175
+
176
+ _updateFromServer: function(id) {
177
+
178
+ var that = this;
179
+ if (!this.products[id]) return false;
180
+ jQuery.getJSON(
181
+ wp_ecwid_products_list_vars.ajax_url,
182
+ {
183
+ 'action': 'ecwid_get_product_info',
184
+ 'id': id
185
+ },
186
+ function(data, result) {
187
+ if (result == 'success') {
188
+ that.products[id] = jQuery.extend(
189
+ that.products[id], {
190
+ image: data.imageUrl
191
+ }
192
+ );
193
+
194
+ that._render();
195
+ }
196
+ }
197
+ );
198
+ },
199
+
200
+ _getProductsToShow: function() {
201
+ return this.sort.slice(0, this.option('max'));
202
+ },
203
+
204
+ _addToSort: function(id) {
205
+ this.sort.push(id.toString());
206
+ },
207
+
208
+ _triggerError: function(message) {
209
+ message = 'ecwid.productsList ' + message;
210
+ if (this.options.debug) {
211
+ alert(message);
212
+ }
213
+ console.log(message);
214
+ },
215
+
216
+ _destroy: function() {
217
+ this.element.removeClass('.' + this._prefix).find('>*').remove();
218
+ this.element.append(this.originalContentContainer.find('>*'));
219
+ this.originalContentContainer.data('generatedProductsList', null);
220
+ this.originalContentContainer = null;
221
+ this._superApply(arguments);
222
+ },
223
+
224
+ refresh: function() {
225
+ this._render();
226
+ },
227
+
228
+ addProduct: function(product, forceRender) {
229
+ if (typeof(product.id) == 'undefined') {
230
+ this._triggerError('addProduct error: product must have id');
231
+ }
232
+
233
+ if (typeof this.products[product.id] != 'undefined') {
234
+ return;
235
+ }
236
+
237
+ this.products[product.id] = jQuery.extend(
238
+ {}, {
239
+ id: 0,
240
+ name: 'no name',
241
+ image: '',
242
+ link: '',
243
+ price: '',
244
+ toString: function() {return this.name;}
245
+ },
246
+ product
247
+ );
248
+
249
+ this._addToSort(product.id);
250
+
251
+ if (forceRender) {
252
+ this._render();
253
+ }
254
+ },
255
+
256
+ _onWindowResize: function() {
257
+ if (this.element.width() < 150) {
258
+ this.element.addClass('width-s').removeClass('width-m width-l');
259
+ } else if (this.element.width() < 300) {
260
+ this.element.addClass('width-m').removeClass('width-s width-l');
261
+ } else {
262
+ this.element.addClass('width-l').removeClass('width-s width-m');
263
+ }
264
+ }
265
+ });
266
+
267
+
268
+ // Debounce function from http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
269
+ var ecwid_debounce = function (func, threshold, execAsap) {
270
+
271
+ var timeout;
272
+
273
+ return function debounced () {
274
+ var obj = this, args = arguments;
275
+ function delayed () {
276
+ if (!execAsap) {
277
+ func.apply(obj, args);
278
+ }
279
+ timeout = null;
280
+ };
281
+
282
+ if (timeout)
283
+ clearTimeout(timeout);
284
+ else if (execAsap)
285
+ func.apply(obj, args);
286
+
287
+ timeout = setTimeout(delayed, threshold || 100);
288
+ };
289
+
290
+ }
291
+
292
+ jQuery('.ecwid-productsList').trigger('ecwidOnWindowResize');
js/recently-viewed-common.js CHANGED
@@ -1,68 +1,68 @@
1
- (function() {
2
-
3
- if (typeof jQuery == 'undefined') {
4
- console.warn('recently-viewed-common.js requires jquery');
5
- }
6
-
7
- if (typeof Ecwid == 'undefined') {
8
- console.warn('recently-viewed-common.js must be included after Ecwid object initialization');
9
- return;
10
- }
11
-
12
- if (typeof wpCookies == 'undefined') {
13
- console.warn('recently-viewed-common.js requires utils');
14
- }
15
-
16
- if (wpCookies.get('test_ecwid_shopping_cart_recently_products_cookie') != 'test_ecwid_shopping_cart_cookie_value') {
17
- wpCookies.set('test_ecwid_shopping_cart_recently_products_cookie', 'test_ecwid_shopping_cart_cookie_value', '', '/');
18
- console.warn('recently-viewed-common.js requires enabled cookies');
19
- }
20
-
21
- Ecwid.OnPageLoaded.add(function(page) {
22
- if (page.type == 'PRODUCT') {
23
- var productInfo = fetchProductInfo(page.productId);
24
- saveProductToCookies(productInfo);
25
- }
26
- });
27
-
28
- var fetchProductInfo = function(productId) {
29
- var product = {};
30
-
31
- product.id = productId;
32
- product.link = window.location.href;
33
-
34
- return product;
35
- }
36
-
37
- var saveProductToCookies = function(product) {
38
- var cookieName = 'ecwid-shopping-cart-recently-viewed';
39
-
40
- var cookie = JSON.parse(wpCookies.get(cookieName));
41
-
42
- if (cookie == null || typeof(cookie) != 'object') {
43
- cookie = {last: 0, products: []};
44
- }
45
-
46
- var expires = new Date;
47
- expires.setMonth(expires.getMonth() + 1);
48
-
49
- var src = jQuery('script[src*="app.ecwid.com/script.js?"]').attr('src');
50
- var re = /app.ecwid.com\/script.js\?(\d*)/;
51
- cookie.store_id = src.match(re)[1];
52
-
53
- for (var i = 0; i < cookie.products.length; i++) {
54
- if (cookie.products[i].id == product.id) {
55
- cookie.products.splice(i, 1);
56
- }
57
- }
58
-
59
- cookie.products.unshift({
60
- id: product.id,
61
- link: product.link
62
- });
63
-
64
- wpCookies.set(cookieName, JSON.stringify(cookie), expires.toUTCString(), '/' );
65
-
66
- }
67
-
68
  })();
1
+ (function() {
2
+
3
+ if (typeof jQuery == 'undefined') {
4
+ console.warn('recently-viewed-common.js requires jquery');
5
+ }
6
+
7
+ if (typeof Ecwid == 'undefined') {
8
+ console.warn('recently-viewed-common.js must be included after Ecwid object initialization');
9
+ return;
10
+ }
11
+
12
+ if (typeof wpCookies == 'undefined') {
13
+ console.warn('recently-viewed-common.js requires utils');
14
+ }
15
+
16
+ if (wpCookies.get('test_ecwid_shopping_cart_recently_products_cookie') != 'test_ecwid_shopping_cart_cookie_value') {
17
+ wpCookies.set('test_ecwid_shopping_cart_recently_products_cookie', 'test_ecwid_shopping_cart_cookie_value', '', '/');
18
+ console.warn('recently-viewed-common.js requires enabled cookies');
19
+ }
20
+
21
+ Ecwid.OnPageLoaded.add(function(page) {
22
+ if (page.type == 'PRODUCT') {
23
+ var productInfo = fetchProductInfo(page.productId);
24
+ saveProductToCookies(productInfo);
25
+ }
26
+ });
27
+
28
+ var fetchProductInfo = function(productId) {
29
+ var product = {};
30
+
31
+ product.id = productId;
32
+ product.link = window.location.href;
33
+
34
+ return product;
35
+ }
36
+
37
+ var saveProductToCookies = function(product) {
38
+ var cookieName = 'ecwid-shopping-cart-recently-viewed';
39
+
40
+ var cookie = JSON.parse(wpCookies.get(cookieName));
41
+
42
+ if (cookie == null || typeof(cookie) != 'object') {
43
+ cookie = {last: 0, products: []};
44
+ }
45
+
46
+ var expires = new Date;
47
+ expires.setMonth(expires.getMonth() + 1);
48
+
49
+ var src = jQuery('script[src*="app.ecwid.com/script.js?"]').attr('src');
50
+ var re = /app.ecwid.com\/script.js\?(\d*)/;
51
+ cookie.store_id = src.match(re)[1];
52
+
53
+ for (var i = 0; i < cookie.products.length; i++) {
54
+ if (cookie.products[i].id == product.id) {
55
+ cookie.products.splice(i, 1);
56
+ }
57
+ }
58
+
59
+ cookie.products.unshift({
60
+ id: product.id,
61
+ link: product.link
62
+ });
63
+
64
+ wpCookies.set(cookieName, JSON.stringify(cookie), expires.toUTCString(), '/' );
65
+
66
+ }
67
+
68
  })();
js/recently-viewed.js CHANGED
@@ -1,81 +1,81 @@
1
- wpCookies.set('test_ecwid_shopping_cart_recently_products_cookie', 'test_ecwid_shopping_cart_cookie_value', { path: '/' });
2
- if (wpCookies.get('test_ecwid_shopping_cart_recently_products_cookie') != 'test_ecwid_shopping_cart_cookie_value') {
3
- // Cookies do not work, we do nothing
4
- exit;
5
- }
6
-
7
- jQuery.widget('ecwid.recentlyViewedProducts', jQuery.ecwid.productsList, {
8
-
9
- _create: function() {
10
- this._superApply(arguments);
11
-
12
- if (typeof Ecwid == 'undefined') return;
13
-
14
- var self = this;
15
- Ecwid.OnPageLoaded.add(
16
- function(page) {
17
-
18
- if (page.type == 'PRODUCT' && jQuery('.ecwid-productBrowser-details').length > 0) {
19
- var product = {
20
- id: page.productId.toString(),
21
- name: page.name
22
- }
23
-
24
- setTimeout(function() {
25
- self.addViewedProduct(product);
26
- }, 500);
27
- } else {
28
- self.refresh();
29
- }
30
- }
31
- );
32
- },
33
-
34
- addViewedProduct: function(product) {
35
- product.image = jQuery('.ecwid-productBrowser-gallery-image .gwt-Image').attr('src');
36
- product.link = window.location.href;
37
- product.name = jQuery('.ecwid-productBrowser-head').text();
38
- if (jQuery('.ecwid-productBrowser-price .ecwid-productBrowser-price-value').length > 0) {
39
- product.price = jQuery('.ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-price .ecwid-productBrowser-price-value').text();
40
- } else {
41
- product.price = jQuery('.ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-price').text();
42
- }
43
-
44
- if (typeof this.products[product.id] == 'undefined') {
45
- this.addProduct(product);
46
- if (this.is_api_available) {
47
- this._updateFromServer(product.id);
48
- }
49
- } else {
50
- this.sort.splice(this.sort.indexOf(product.id), 1);
51
- this._addToSort(product.id);
52
- }
53
-
54
- this._render();
55
- },
56
-
57
- render: function() {
58
- this._superApply(arguments);
59
- jQuery('.show-if-empty', this.el).hide();
60
- },
61
-
62
- _getProductsToShow: function() {
63
- // copy array using slice
64
- var sort = this.sort.slice();
65
-
66
-
67
- if (jQuery('.ecwid-productBrowser-ProductPage').length > 0) {
68
- var currentProductId = jQuery('.ecwid-productBrowser-ProductPage').attr('class').match(/ecwid-productBrowser-ProductPage-(\d+)/);
69
-
70
- if (sort.length > 1 && sort.indexOf(currentProductId[1]) != -1) {
71
- sort.splice(
72
- sort.indexOf(
73
- currentProductId[1]
74
- ), 1
75
- );
76
- }
77
- }
78
-
79
- return sort.reverse().slice(0, this.option('max')).reverse();
80
- }
81
- });
1
+ wpCookies.set('test_ecwid_shopping_cart_recently_products_cookie', 'test_ecwid_shopping_cart_cookie_value', { path: '/' });
2
+ if (wpCookies.get('test_ecwid_shopping_cart_recently_products_cookie') != 'test_ecwid_shopping_cart_cookie_value') {
3
+ // Cookies do not work, we do nothing
4
+ exit;
5
+ }
6
+
7
+ jQuery.widget('ecwid.recentlyViewedProducts', jQuery.ecwid.productsList, {
8
+
9
+ _create: function() {
10
+ this._superApply(arguments);
11
+
12
+ if (typeof Ecwid == 'undefined') return;
13
+
14
+ var self = this;
15
+ Ecwid.OnPageLoaded.add(
16
+ function(page) {
17
+
18
+ if (page.type == 'PRODUCT' && jQuery('.ecwid-productBrowser-details').length > 0) {
19
+ var product = {
20
+ id: page.productId.toString(),
21
+ name: page.name
22
+ }
23
+
24
+ setTimeout(function() {
25
+ self.addViewedProduct(product);
26
+ }, 500);
27
+ } else {
28
+ self.refresh();
29
+ }
30
+ }
31
+ );
32
+ },
33
+
34
+ addViewedProduct: function(product) {
35
+ product.image = jQuery('.ecwid-productBrowser-gallery-image .gwt-Image').attr('src');
36
+ product.link = window.location.href;
37
+ product.name = jQuery('.ecwid-productBrowser-head').text();
38
+ if (jQuery('.ecwid-productBrowser-price .ecwid-productBrowser-price-value').length > 0) {
39
+ product.price = jQuery('.ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-price .ecwid-productBrowser-price-value').text();
40
+ } else {
41
+ product.price = jQuery('.ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-price').text();
42
+ }
43
+
44
+ if (typeof this.products[product.id] == 'undefined') {
45
+ this.addProduct(product);
46
+ if (this.is_api_available) {
47
+ this._updateFromServer(product.id);
48
+ }
49
+ } else {
50
+ this.sort.splice(this.sort.indexOf(product.id), 1);
51
+ this._addToSort(product.id);
52
+ }
53
+
54
+ this._render();
55
+ },
56
+
57
+ render: function() {
58
+ this._superApply(arguments);
59
+ jQuery('.show-if-empty', this.el).hide();
60
+ },
61
+
62
+ _getProductsToShow: function() {
63
+ // copy array using slice
64
+ var sort = this.sort.slice();
65
+
66
+
67
+ if (jQuery('.ecwid-productBrowser-ProductPage').length > 0) {
68
+ var currentProductId = jQuery('.ecwid-productBrowser-ProductPage').attr('class').match(/ecwid-productBrowser-ProductPage-(\d+)/);
69
+
70
+ if (sort.length > 1 && sort.indexOf(currentProductId[1]) != -1) {
71
+ sort.splice(
72
+ sort.indexOf(
73
+ currentProductId[1]
74
+ ), 1
75
+ );
76
+ }
77
+ }
78
+
79
+ return sort.reverse().slice(0, this.option('max')).reverse();
80
+ }
81
+ });
js/store-editor-common.js CHANGED
@@ -1,27 +1,27 @@
1
- function ecwid_get_store_shortcode(content) {
2
-
3
- if (!wp.shortcode) return false;
4
- var found = false;
5
- var index = 0;
6
-
7
- while (found = wp.shortcode.next('ecwid', content, index)) {
8
-
9
- if (found && (!found.shortcode.attrs.named.widgets || found.shortcode.attrs.named.widgets.toLowerCase().indexOf('productbrowser') != -1)) {
10
- break;
11
- }
12
- index = found.index + 1;
13
- }
14
-
15
- if (typeof found == 'undefined') {
16
- found = false;
17
- }
18
-
19
- // Workaround for the caching bug that does allow to have properly parsed attributes
20
- if (found) {
21
- var tmpfound = wp.shortcode.next('ecwid', found.content.replace('[ecwid', '[ecwid timestamp="' + (new Date()).getMilliseconds() + '"'));
22
- found.shortcode.attrs = tmpfound.shortcode.attrs;
23
- delete found.shortcode.attrs.named.timestamp;
24
- }
25
-
26
- return found;
27
  }
1
+ function ecwid_get_store_shortcode(content) {
2
+
3
+ if (!wp.shortcode) return false;
4
+ var found = false;
5
+ var index = 0;
6
+
7
+ while (found = wp.shortcode.next('ecwid', content, index)) {
8
+
9
+ if (found && (!found.shortcode.attrs.named.widgets || found.shortcode.attrs.named.widgets.toLowerCase().indexOf('productbrowser') != -1)) {
10
+ break;
11
+ }
12
+ index = found.index + 1;
13
+ }
14
+
15
+ if (typeof found == 'undefined') {
16
+ found = false;
17
+ }
18
+
19
+ // Workaround for the caching bug that does allow to have properly parsed attributes
20
+ if (found) {
21
+ var tmpfound = wp.shortcode.next('ecwid', found.content.replace('[ecwid', '[ecwid timestamp="' + (new Date()).getMilliseconds() + '"'));
22
+ found.shortcode.attrs = tmpfound.shortcode.attrs;
23
+ delete found.shortcode.attrs.named.timestamp;
24
+ }
25
+
26
+ return found;
27
  }
js/store-editor-mce.js CHANGED
@@ -1,596 +1,596 @@
1
- /* global tinymce */
2
- tinymce.PluginManager.add( 'ecwid', function( editor ) {
3
- var toolbarActive = false;
4
-
5
- // function parseShortcode( content ) {
6
- // return content.replace( /(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) {
7
- // var id, cls, w, cap, img, width,
8
- // trim = tinymce.trim;
9
- //
10
- // id = b.match( /id=['"]([^'"]*)['"] ?/ );
11
- // if ( id ) {
12
- // b = b.replace( id[0], '' );
13
- // }
14
- //
15
- // cls = b.match( /align=['"]([^'"]*)['"] ?/ );
16
- // if ( cls ) {
17
- // b = b.replace( cls[0], '' );
18
- // }
19
- //
20
- // w = b.match( /width=['"]([0-9]*)['"] ?/ );
21
- // if ( w ) {
22
- // b = b.replace( w[0], '' );
23
- // }
24
- //
25
- // c = trim( c );
26
- // img = c.match( /((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i );
27
- //
28
- // if ( img && img[2] ) {
29
- // cap = trim( img[2] );
30
- // img = trim( img[1] );
31
- // } else {
32
- // // old captions shortcode style
33
- // cap = trim( b ).replace( /caption=['"]/, '' ).replace( /['"]$/, '' );
34
- // img = c;
35
- // }
36
- //
37
- // id = ( id && id[1] ) ? id[1] : '';
38
- // cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
39
- //
40
- // if ( ! w && img ) {
41
- // w = img.match( /width=['"]([0-9]*)['"]/ );
42
- // }
43
- //
44
- // if ( w && w[1] ) {
45
- // w = w[1];
46
- // }
47
- //
48
- // if ( ! w || ! cap ) {
49
- // return c;
50
- // }
51
- //
52
- // width = parseInt( w, 10 );
53
- // if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
54
- // width += 10;
55
- // }
56
- //
57
- // return '<div class="mceTemp"><dl id="'+ id +'" class="wp-caption '+ cls +'" style="width: '+ width +'px">' +
58
- // '<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ cap +'</dd></dl></div>';
59
- // });
60
- // }
61
- //
62
- // function getShortcode( content ) {
63
- // return content.replace( /<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g, function( a, b ) {
64
- // var out = '';
65
- //
66
- // if ( b.indexOf('<img ') === -1 ) {
67
- // // Broken caption. The user managed to drag the image out?
68
- // // Try to return the caption text as a paragraph.
69
- // out = b.match( /<dd [^>]+>([\s\S]+?)<\/dd>/i );
70
- //
71
- // if ( out && out[1] ) {
72
- // return '<p>' + out[1] + '</p>';
73
- // }
74
- //
75
- // return '';
76
- // }
77
- //
78
- // out = b.replace( /<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function( a, b, c, cap ) {
79
- // var id, cls, w;
80
- //
81
- // w = c.match( /width="([0-9]*)"/ );
82
- // w = ( w && w[1] ) ? w[1] : '';
83
- //
84
- // if ( ! w || ! cap ) {
85
- // return c;
86
- // }
87
- //
88
- // id = b.match( /id="([^"]*)"/ );
89
- // id = ( id && id[1] ) ? id[1] : '';
90
- //
91
- // cls = b.match( /class="([^"]*)"/ );
92
- // cls = ( cls && cls[1] ) ? cls[1] : '';
93
- // cls = cls.match( /align[a-z]+/ ) || 'alignnone';
94
- //
95
- // cap = cap.replace( /\r\n|\r/g, '\n' ).replace( /<[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
96
- // // no line breaks inside HTML tags
97
- // return a.replace( /[\r\n\t]+/, ' ' );
98
- // });
99
- //
100
- // // convert remaining line breaks to <br>
101
- // cap = cap.replace( /\s*\n\s*/g, '<br />' );
102
- //
103
- // return '[caption id="'+ id +'" align="'+ cls +'" width="'+ w +'"]'+ c +' '+ cap +'[/caption]';
104
- // });
105
- //
106
- // if ( out.indexOf('[caption') !== 0 ) {
107
- // // the caption html seems broken, try to find the image that may be wrapped in a link
108
- // // and may be followed by <p> with the caption text.
109
- // out = b.replace( /[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, '<p>$1</p>$2' );
110
- // }
111
- //
112
- // return out;
113
- // });
114
- // }
115
- //
116
- // function extractImageData( imageNode ) {
117
- // var classes, extraClasses, metadata, captionBlock, caption, link, width, height,
118
- // dom = editor.dom,
119
- // isIntRegExp = /^\d+$/;
120
- //
121
- // // default attributes
122
- // metadata = {
123
- // attachment_id: false,
124
- // size: 'custom',
125
- // caption: '',
126
- // align: 'none',
127
- // extraClasses: '',
128
- // link: false,
129
- // linkUrl: '',
130
- // linkClassName: '',
131
- // linkTargetBlank: false,
132
- // linkRel: '',
133
- // title: ''
134
- // };
135
- //
136
- // metadata.url = dom.getAttrib( imageNode, 'src' );
137
- // metadata.alt = dom.getAttrib( imageNode, 'alt' );
138
- // metadata.title = dom.getAttrib( imageNode, 'title' );
139
- //
140
- // width = dom.getAttrib( imageNode, 'width' );
141
- // height = dom.getAttrib( imageNode, 'height' );
142
- //
143
- // if ( ! isIntRegExp.test( width ) || parseInt( width, 10 ) < 1 ) {
144
- // width = imageNode.naturalWidth || imageNode.width;
145
- // }
146
- //
147
- // if ( ! isIntRegExp.test( height ) || parseInt( height, 10 ) < 1 ) {
148
- // height = imageNode.naturalHeight || imageNode.height;
149
- // }
150
- //
151
- // metadata.customWidth = metadata.width = width;
152
- // metadata.customHeight = metadata.height = height;
153
- //
154
- // classes = tinymce.explode( imageNode.className, ' ' );
155
- // extraClasses = [];
156
- //
157
- // tinymce.each( classes, function( name ) {
158
- //
159
- // if ( /^wp-image/.test( name ) ) {
160
- // metadata.attachment_id = parseInt( name.replace( 'wp-image-', '' ), 10 );
161
- // } else if ( /^align/.test( name ) ) {
162
- // metadata.align = name.replace( 'align', '' );
163
- // } else if ( /^size/.test( name ) ) {
164
- // metadata.size = name.replace( 'size-', '' );
165
- // } else {
166
- // extraClasses.push( name );
167
- // }
168
- //
169
- // } );
170
- //
171
- // metadata.extraClasses = extraClasses.join( ' ' );
172
- //
173
- // // Extract caption
174
- // captionBlock = dom.getParents( imageNode, '.wp-caption' );
175
- //
176
- // if ( captionBlock.length ) {
177
- // captionBlock = captionBlock[0];
178
- //
179
- // classes = captionBlock.className.split( ' ' );
180
- // tinymce.each( classes, function( name ) {
181
- // if ( /^align/.test( name ) ) {
182
- // metadata.align = name.replace( 'align', '' );
183
- // }
184
- // } );
185
- //
186
- // caption = dom.select( 'dd.wp-caption-dd', captionBlock );
187
- // if ( caption.length ) {
188
- // caption = caption[0];
189
- //
190
- // metadata.caption = editor.serializer.serialize( caption )
191
- // .replace( /<br[^>]*>/g, '$&\n' ).replace( /^<p>/, '' ).replace( /<\/p>$/, '' );
192
- // }
193
- // }
194
- //
195
- // // Extract linkTo
196
- // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' ) {
197
- // link = imageNode.parentNode;
198
- // metadata.linkUrl = dom.getAttrib( link, 'href' );
199
- // metadata.linkTargetBlank = dom.getAttrib( link, 'target' ) === '_blank' ? true : false;
200
- // metadata.linkRel = dom.getAttrib( link, 'rel' );
201
- // metadata.linkClassName = link.className;
202
- // }
203
- //
204
- // return metadata;
205
- // }
206
- //
207
- // function hasTextContent( node ) {
208
- // return node && !! ( node.textContent || node.innerText );
209
- // }
210
- //
211
- // function updateImage( imageNode, imageData ) {
212
- // var classes, className, node, html, parent, wrap, linkNode,
213
- // captionNode, dd, dl, id, attrs, linkAttrs, width, height,
214
- // dom = editor.dom;
215
- //
216
- // classes = tinymce.explode( imageData.extraClasses, ' ' );
217
- //
218
- // if ( ! classes ) {
219
- // classes = [];
220
- // }
221
- //
222
- // if ( ! imageData.caption ) {
223
- // classes.push( 'align' + imageData.align );
224
- // }
225
- //
226
- // if ( imageData.attachment_id ) {
227
- // classes.push( 'wp-image-' + imageData.attachment_id );
228
- // if ( imageData.size && imageData.size !== 'custom' ) {
229
- // classes.push( 'size-' + imageData.size );
230
- // }
231
- // }
232
- //
233
- // width = imageData.width;
234
- // height = imageData.height;
235
- //
236
- // if ( imageData.size === 'custom' ) {
237
- // width = imageData.customWidth;
238
- // height = imageData.customHeight;
239
- // }
240
- //
241
- // attrs = {
242
- // src: imageData.url,
243
- // width: width || null,
244
- // height: height || null,
245
- // alt: imageData.alt,
246
- // title: imageData.title || null,
247
- // 'class': classes.join( ' ' ) || null
248
- // };
249
- //
250
- // dom.setAttribs( imageNode, attrs );
251
- //
252
- // linkAttrs = {
253
- // href: imageData.linkUrl,
254
- // rel: imageData.linkRel || null,
255
- // target: imageData.linkTargetBlank ? '_blank': null,
256
- // 'class': imageData.linkClassName || null
257
- // };
258
- //
259
- // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
260
- // // Update or remove an existing link wrapped around the image
261
- // if ( imageData.linkUrl ) {
262
- // dom.setAttribs( imageNode.parentNode, linkAttrs );
263
- // } else {
264
- // dom.remove( imageNode.parentNode, true );
265
- // }
266
- // } else if ( imageData.linkUrl ) {
267
- // if ( linkNode = dom.getParent( imageNode, 'a' ) ) {
268
- // // The image is inside a link together with other nodes,
269
- // // or is nested in another node, move it out
270
- // dom.insertAfter( imageNode, linkNode );
271
- // }
272
- //
273
- // // Add link wrapped around the image
274
- // linkNode = dom.create( 'a', linkAttrs );
275
- // imageNode.parentNode.insertBefore( linkNode, imageNode );
276
- // linkNode.appendChild( imageNode );
277
- // }
278
- //
279
- // captionNode = editor.dom.getParent( imageNode, '.mceTemp' );
280
- //
281
- // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
282
- // node = imageNode.parentNode;
283
- // } else {
284
- // node = imageNode;
285
- // }
286
- //
287
- // if ( imageData.caption ) {
288
- //
289
- // id = imageData.attachment_id ? 'attachment_' + imageData.attachment_id : null;
290
- // className = 'wp-caption align' + ( imageData.align || 'none' );
291
- //
292
- // if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
293
- // width = parseInt( width, 10 );
294
- // width += 10;
295
- // }
296
- //
297
- // if ( captionNode ) {
298
- // dl = dom.select( 'dl.wp-caption', captionNode );
299
- //
300
- // if ( dl.length ) {
301
- // dom.setAttribs( dl, {
302
- // id: id,
303
- // 'class': className,
304
- // style: 'width: ' + width + 'px'
305
- // } );
306
- // }
307
- //
308
- // dd = dom.select( '.wp-caption-dd', captionNode );
309
- //
310
- // if ( dd.length ) {
311
- // dom.setHTML( dd[0], imageData.caption );
312
- // }
313
- //
314
- // } else {
315
- // id = id ? 'id="'+ id +'" ' : '';
316
- //
317
- // // should create a new function for generating the caption markup
318
- // html = '<dl ' + id + 'class="' + className +'" style="width: '+ width +'px">' +
319
- // '<dt class="wp-caption-dt">' + dom.getOuterHTML( node ) + '</dt><dd class="wp-caption-dd">'+ imageData.caption +'</dd></dl>';
320
- //
321
- // if ( parent = dom.getParent( node, 'p' ) ) {
322
- // wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );
323
- // parent.parentNode.insertBefore( wrap, parent );
324
- // dom.remove( node );
325
- //
326
- // if ( dom.isEmpty( parent ) ) {
327
- // dom.remove( parent );
328
- // }
329
- // } else {
330
- // dom.setOuterHTML( node, '<div class="mceTemp">' + html + '</div>' );
331
- // }
332
- // }
333
- // } else if ( captionNode ) {
334
- // // Remove the caption wrapper and place the image in new paragraph
335
- // parent = dom.create( 'p' );
336
- // captionNode.parentNode.insertBefore( parent, captionNode );
337
- // parent.appendChild( node );
338
- // dom.remove( captionNode );
339
- // }
340
- //
341
- // if ( wp.media.events ) {
342
- // wp.media.events.trigger( 'editor:image-update', {
343
- // editor: editor,
344
- // metadata: imageData,
345
- // image: imageNode
346
- // } );
347
- // }
348
- //
349
- // editor.nodeChanged();
350
- // // Refresh the toolbar
351
- // addToolbar( imageNode );
352
- // }
353
-
354
- function editStore( img ) {
355
- ecwid_open_store_popup();
356
- }
357
-
358
- function removeImage( node ) {
359
- var wrap;
360
-
361
- if ( node.nodeName === 'DIV' && editor.dom.hasClass( node, 'ecwid-store-wrap' ) ) {
362
- wrap = node;
363
- } else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
364
- wrap = editor.dom.getParent( node, 'div.ecwid-store-wrap' );
365
- }
366
-
367
- if ( wrap ) {
368
- if ( wrap.nextSibling ) {
369
- editor.selection.select( wrap.nextSibling );
370
- } else if ( wrap.previousSibling ) {
371
- editor.selection.select( wrap.previousSibling );
372
- } else {
373
- editor.selection.select( wrap.parentNode );
374
- }
375
-
376
- editor.selection.collapse( true );
377
- editor.nodeChanged();
378
- editor.dom.remove( wrap );
379
- } else {
380
- editor.dom.remove( node );
381
- }
382
- removeToolbar();
383
-
384
- editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
385
- }
386
-
387
- function addToolbar( node ) {
388
- var rectangle, toolbarHtml, toolbar, left,
389
- dom = editor.dom;
390
-
391
- removeToolbar(node);
392
-
393
- // Don't add to other images
394
- if ( ! node || node.nodeName !== 'IMG' || node.className.indexOf('ecwid-store-editor') == -1 ) {
395
- return;
396
- }
397
-
398
- dom.setAttrib( node, 'data-ecwid-store-select', 1 );
399
- rectangle = dom.getRect( node );
400
-
401
- toolbarHtml = '<div class="dashicons dashicons-no-alt remove" data-mce-bogus="1"></div>';
402
-
403
- toolbar = dom.create( 'div', {
404
- 'id': 'ecwid-store-toolbar',
405
- 'data-mce-bogus': '1',
406
- 'contenteditable': false
407
- }, toolbarHtml );
408
-
409
- if ( editor.rtl ) {
410
- left = rectangle.x + rectangle.w - 82;
411
- } else {
412
- left = rectangle.x;
413
- }
414
-
415
- editor.getBody().appendChild( toolbar );
416
- dom.setStyles( toolbar, {
417
- top: rectangle.y,
418
- left: left
419
- });
420
-
421
- toolbarActive = true;
422
- }
423
-
424
- this.addToolbar = function() {
425
- addToolbar(
426
- jQuery(editor.dom.doc.body).find('.ecwid-store-editor').get(0)
427
- );
428
- }
429
-
430
- function removeToolbar(parentNode) {
431
-
432
- if (parentNode && editor.dom.getAttrib( parentNode, 'class') == 'ecwid-store-editor' ) {
433
- var toolbar = editor.dom.get( 'wp-image-toolbar' );
434
- if ( toolbar ) {
435
- editor.dom.remove( toolbar );
436
- }
437
- }
438
-
439
- var toolbar = editor.dom.get( 'ecwid-store-toolbar' );
440
- if ( toolbar ) {
441
- editor.dom.remove( toolbar );
442
- }
443
-
444
- // also remove image toolbar
445
-
446
- editor.dom.setAttrib( editor.dom.select( 'img[data-ecwid-store-select]' ), 'data-ecwid-store-select', null );
447
-
448
- toolbarActive = false;
449
- }
450
-
451
- editor.onInit.add(function(editor) {
452
-
453
- dom = editor.dom;
454
- dom.bind( editor.getDoc(), 'dragstart', function( event ) {
455
- var node = editor.selection.getNode();
456
-
457
- // Prevent dragging images out of the caption elements
458
- if ( node.nodeName === 'IMG' && dom.getParent( node, '.wp-caption' ) ) {
459
- event.preventDefault();
460
- }
461
-
462
- // Remove toolbar to avoid an orphaned toolbar when dragging an image to a new location
463
- removeToolbar();
464
- });
465
- });
466
-
467
- editor.onKeyUp.add( function( editor, event ) {
468
- var node, wrap, P, spacer,
469
- selection = editor.selection,
470
- keyCode = event.keyCode,
471
- dom = editor.dom;
472
-
473
- if ( keyCode === 46 || keyCode === 8 ) {
474
- checkEcwid();
475
- }
476
- });
477
-
478
- editor.onKeyDown.add( function( editor, event ) {
479
- var node, wrap, P, spacer,
480
- selection = editor.selection,
481
- keyCode = event.keyCode,
482
- dom = editor.dom;
483
-
484
- if ( keyCode == 27 ) {
485
- jQuery('#ecwid-store-popup-content').removeClass('open');
486
- return false;
487
- }
488
-
489
- if ( keyCode === 46 || keyCode === 8 ) {
490
- node = selection.getNode();
491
-
492
- if ( node.nodeName === 'DIV' && dom.hasClass( node, 'ecwid-store-wrap' ) ) {
493
- wrap = node;
494
- } else if ( node.nodeName === 'IMG' ) {
495
- wrap = dom.getParent( node, 'div.ecwid-store-wrap' );
496
- }
497
-
498
- if ( wrap ) {
499
- dom.events.cancel( event );
500
- removeImage( node );
501
- editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
502
-
503
- return false;
504
- }
505
-
506
- removeToolbar();
507
- }
508
-
509
- // Key presses will replace the image so we need to remove the toolbar
510
- if ( toolbarActive ) {
511
- if ( event.ctrlKey || event.metaKey || event.altKey ||
512
- ( keyCode < 48 && keyCode > 90 ) || keyCode > 186 ) {
513
- return;
514
- }
515
-
516
- removeToolbar();
517
- editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
518
-
519
- }
520
-
521
- });
522
-
523
- editor.onMouseDown.add( function( editor, event ) {
524
- if ( editor.dom.getParent( event.target, '#ecwid-store-toolbar' ) ) {
525
- if ( tinymce.Env.ie ) {
526
- // Stop IE > 8 from making the wrapper resizable on mousedown
527
- event.preventDefault();
528
- }
529
- } else if ( event.target.nodeName !== 'IMG' ) {
530
- removeToolbar();
531
- }
532
- });
533
-
534
- editor.onMouseUp.add( function( editor, event ) {
535
- var image,
536
- node = event.target,
537
- dom = editor.dom;
538
-
539
- // Don't trigger on right-click
540
- if ( event.button && event.button > 1 ) {
541
- return;
542
- }
543
-
544
- if ( node.nodeName === 'DIV' && dom.getParent( node, '#ecwid-store-toolbar' ) ) {
545
- image = dom.select( 'img[data-ecwid-store-select]' )[0];
546
-
547
- if ( image ) {
548
- editor.selection.select( image );
549
-
550
- if ( dom.hasClass( node, 'remove' ) ) {
551
- removeImage( image );
552
- } else if ( dom.hasClass( node, 'edit' ) ) {
553
- editStore( image );
554
- }
555
- }
556
- } else if ( node.nodeName === 'IMG' && ! editor.dom.getAttrib( node, 'data-ecwid-store-select' ) ) {
557
- addToolbar( node );
558
- } else if ( node.nodeName !== 'IMG' ) {
559
- removeToolbar();
560
- }
561
- });
562
-
563
- // Replace Read More/Next Page tags with images
564
- editor.onBeforeSetContent.add( function( editor, e ) {
565
- if ( e.content ) {
566
-
567
- found = ecwid_get_store_shortcode(e.content);
568
-
569
- if (!found) return;
570
-
571
- var content = e.content;
572
-
573
- var store = '<img height="200" width="100%" data-ecwid-shortcode="' + window.encodeURIComponent(found.content) + '" src="' + ecwid_store_svg + '" data-mce-placeholder="true" data-mce-resize="false" class="ecwid-store-editor mceItem">';
574
-
575
- e.content = e.content.substr(0, found.index) + store + e.content.substr(found.index + found.content.length);
576
- }
577
- });
578
-
579
- // Replace images with tags
580
- editor.onPostProcess.add( function( editor, e ) {
581
-
582
- if ( e.get ) {
583
-
584
- return e.content = e.content.replace( /(<img [^>]*data-ecwid-shortcode=[^>]+>)/g, function( match, image ) {
585
-
586
- var data = window.decodeURIComponent(jQuery(image).attr('data-ecwid-shortcode'));
587
-
588
- if ( data ) {
589
- return data;
590
- }
591
-
592
- return match;
593
- });
594
- }
595
- });
596
  });
1
+ /* global tinymce */
2
+ tinymce.PluginManager.add( 'ecwid', function( editor ) {
3
+ var toolbarActive = false;
4
+
5
+ // function parseShortcode( content ) {
6
+ // return content.replace( /(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) {
7
+ // var id, cls, w, cap, img, width,
8
+ // trim = tinymce.trim;
9
+ //
10
+ // id = b.match( /id=['"]([^'"]*)['"] ?/ );
11
+ // if ( id ) {
12
+ // b = b.replace( id[0], '' );
13
+ // }
14
+ //
15
+ // cls = b.match( /align=['"]([^'"]*)['"] ?/ );
16
+ // if ( cls ) {
17
+ // b = b.replace( cls[0], '' );
18
+ // }
19
+ //
20
+ // w = b.match( /width=['"]([0-9]*)['"] ?/ );
21
+ // if ( w ) {
22
+ // b = b.replace( w[0], '' );
23
+ // }
24
+ //
25
+ // c = trim( c );
26
+ // img = c.match( /((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i );
27
+ //
28
+ // if ( img && img[2] ) {
29
+ // cap = trim( img[2] );
30
+ // img = trim( img[1] );
31
+ // } else {
32
+ // // old captions shortcode style
33
+ // cap = trim( b ).replace( /caption=['"]/, '' ).replace( /['"]$/, '' );
34
+ // img = c;
35
+ // }
36
+ //
37
+ // id = ( id && id[1] ) ? id[1] : '';
38
+ // cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
39
+ //
40
+ // if ( ! w && img ) {
41
+ // w = img.match( /width=['"]([0-9]*)['"]/ );
42
+ // }
43
+ //
44
+ // if ( w && w[1] ) {
45
+ // w = w[1];
46
+ // }
47
+ //
48
+ // if ( ! w || ! cap ) {
49
+ // return c;
50
+ // }
51
+ //
52
+ // width = parseInt( w, 10 );
53
+ // if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
54
+ // width += 10;
55
+ // }
56
+ //
57
+ // return '<div class="mceTemp"><dl id="'+ id +'" class="wp-caption '+ cls +'" style="width: '+ width +'px">' +
58
+ // '<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ cap +'</dd></dl></div>';
59
+ // });
60
+ // }
61
+ //
62
+ // function getShortcode( content ) {
63
+ // return content.replace( /<div (?:id="attachment_|class="mceTemp)[^>]*>([\s\S]+?)<\/div>/g, function( a, b ) {
64
+ // var out = '';
65
+ //
66
+ // if ( b.indexOf('<img ') === -1 ) {
67
+ // // Broken caption. The user managed to drag the image out?
68
+ // // Try to return the caption text as a paragraph.
69
+ // out = b.match( /<dd [^>]+>([\s\S]+?)<\/dd>/i );
70
+ //
71
+ // if ( out && out[1] ) {
72
+ // return '<p>' + out[1] + '</p>';
73
+ // }
74
+ //
75
+ // return '';
76
+ // }
77
+ //
78
+ // out = b.replace( /<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function( a, b, c, cap ) {
79
+ // var id, cls, w;
80
+ //
81
+ // w = c.match( /width="([0-9]*)"/ );
82
+ // w = ( w && w[1] ) ? w[1] : '';
83
+ //
84
+ // if ( ! w || ! cap ) {
85
+ // return c;
86
+ // }
87
+ //
88
+ // id = b.match( /id="([^"]*)"/ );
89
+ // id = ( id && id[1] ) ? id[1] : '';
90
+ //
91
+ // cls = b.match( /class="([^"]*)"/ );
92
+ // cls = ( cls && cls[1] ) ? cls[1] : '';
93
+ // cls = cls.match( /align[a-z]+/ ) || 'alignnone';
94
+ //
95
+ // cap = cap.replace( /\r\n|\r/g, '\n' ).replace( /<[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
96
+ // // no line breaks inside HTML tags
97
+ // return a.replace( /[\r\n\t]+/, ' ' );
98
+ // });
99
+ //
100
+ // // convert remaining line breaks to <br>
101
+ // cap = cap.replace( /\s*\n\s*/g, '<br />' );
102
+ //
103
+ // return '[caption id="'+ id +'" align="'+ cls +'" width="'+ w +'"]'+ c +' '+ cap +'[/caption]';
104
+ // });
105
+ //
106
+ // if ( out.indexOf('[caption') !== 0 ) {
107
+ // // the caption html seems broken, try to find the image that may be wrapped in a link
108
+ // // and may be followed by <p> with the caption text.
109
+ // out = b.replace( /[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, '<p>$1</p>$2' );
110
+ // }
111
+ //
112
+ // return out;
113
+ // });
114
+ // }
115
+ //
116
+ // function extractImageData( imageNode ) {
117
+ // var classes, extraClasses, metadata, captionBlock, caption, link, width, height,
118
+ // dom = editor.dom,
119
+ // isIntRegExp = /^\d+$/;
120
+ //
121
+ // // default attributes
122
+ // metadata = {
123
+ // attachment_id: false,
124
+ // size: 'custom',
125
+ // caption: '',
126
+ // align: 'none',
127
+ // extraClasses: '',
128
+ // link: false,
129
+ // linkUrl: '',
130
+ // linkClassName: '',
131
+ // linkTargetBlank: false,
132
+ // linkRel: '',
133
+ // title: ''
134
+ // };
135
+ //
136
+ // metadata.url = dom.getAttrib( imageNode, 'src' );
137
+ // metadata.alt = dom.getAttrib( imageNode, 'alt' );
138
+ // metadata.title = dom.getAttrib( imageNode, 'title' );
139
+ //
140
+ // width = dom.getAttrib( imageNode, 'width' );
141
+ // height = dom.getAttrib( imageNode, 'height' );
142
+ //
143
+ // if ( ! isIntRegExp.test( width ) || parseInt( width, 10 ) < 1 ) {
144
+ // width = imageNode.naturalWidth || imageNode.width;
145
+ // }
146
+ //
147
+ // if ( ! isIntRegExp.test( height ) || parseInt( height, 10 ) < 1 ) {
148
+ // height = imageNode.naturalHeight || imageNode.height;
149
+ // }
150
+ //
151
+ // metadata.customWidth = metadata.width = width;
152
+ // metadata.customHeight = metadata.height = height;
153
+ //
154
+ // classes = tinymce.explode( imageNode.className, ' ' );
155
+ // extraClasses = [];
156
+ //
157
+ // tinymce.each( classes, function( name ) {
158
+ //
159
+ // if ( /^wp-image/.test( name ) ) {
160
+ // metadata.attachment_id = parseInt( name.replace( 'wp-image-', '' ), 10 );
161
+ // } else if ( /^align/.test( name ) ) {
162
+ // metadata.align = name.replace( 'align', '' );
163
+ // } else if ( /^size/.test( name ) ) {
164
+ // metadata.size = name.replace( 'size-', '' );
165
+ // } else {
166
+ // extraClasses.push( name );
167
+ // }
168
+ //
169
+ // } );
170
+ //
171
+ // metadata.extraClasses = extraClasses.join( ' ' );
172
+ //
173
+ // // Extract caption
174
+ // captionBlock = dom.getParents( imageNode, '.wp-caption' );
175
+ //
176
+ // if ( captionBlock.length ) {
177
+ // captionBlock = captionBlock[0];
178
+ //
179
+ // classes = captionBlock.className.split( ' ' );
180
+ // tinymce.each( classes, function( name ) {
181
+ // if ( /^align/.test( name ) ) {
182
+ // metadata.align = name.replace( 'align', '' );
183
+ // }
184
+ // } );
185
+ //
186
+ // caption = dom.select( 'dd.wp-caption-dd', captionBlock );
187
+ // if ( caption.length ) {
188
+ // caption = caption[0];
189
+ //
190
+ // metadata.caption = editor.serializer.serialize( caption )
191
+ // .replace( /<br[^>]*>/g, '$&\n' ).replace( /^<p>/, '' ).replace( /<\/p>$/, '' );
192
+ // }
193
+ // }
194
+ //
195
+ // // Extract linkTo
196
+ // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' ) {
197
+ // link = imageNode.parentNode;
198
+ // metadata.linkUrl = dom.getAttrib( link, 'href' );
199
+ // metadata.linkTargetBlank = dom.getAttrib( link, 'target' ) === '_blank' ? true : false;
200
+ // metadata.linkRel = dom.getAttrib( link, 'rel' );
201
+ // metadata.linkClassName = link.className;
202
+ // }
203
+ //
204
+ // return metadata;
205
+ // }
206
+ //
207
+ // function hasTextContent( node ) {
208
+ // return node && !! ( node.textContent || node.innerText );
209
+ // }
210
+ //
211
+ // function updateImage( imageNode, imageData ) {
212
+ // var classes, className, node, html, parent, wrap, linkNode,
213
+ // captionNode, dd, dl, id, attrs, linkAttrs, width, height,
214
+ // dom = editor.dom;
215
+ //
216
+ // classes = tinymce.explode( imageData.extraClasses, ' ' );
217
+ //
218
+ // if ( ! classes ) {
219
+ // classes = [];
220
+ // }
221
+ //
222
+ // if ( ! imageData.caption ) {
223
+ // classes.push( 'align' + imageData.align );
224
+ // }
225
+ //
226
+ // if ( imageData.attachment_id ) {
227
+ // classes.push( 'wp-image-' + imageData.attachment_id );
228
+ // if ( imageData.size && imageData.size !== 'custom' ) {
229
+ // classes.push( 'size-' + imageData.size );
230
+ // }
231
+ // }
232
+ //
233
+ // width = imageData.width;
234
+ // height = imageData.height;
235
+ //
236
+ // if ( imageData.size === 'custom' ) {
237
+ // width = imageData.customWidth;
238
+ // height = imageData.customHeight;
239
+ // }
240
+ //
241
+ // attrs = {
242
+ // src: imageData.url,
243
+ // width: width || null,
244
+ // height: height || null,
245
+ // alt: imageData.alt,
246
+ // title: imageData.title || null,
247
+ // 'class': classes.join( ' ' ) || null
248
+ // };
249
+ //
250
+ // dom.setAttribs( imageNode, attrs );
251
+ //
252
+ // linkAttrs = {
253
+ // href: imageData.linkUrl,
254
+ // rel: imageData.linkRel || null,
255
+ // target: imageData.linkTargetBlank ? '_blank': null,
256
+ // 'class': imageData.linkClassName || null
257
+ // };
258
+ //
259
+ // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
260
+ // // Update or remove an existing link wrapped around the image
261
+ // if ( imageData.linkUrl ) {
262
+ // dom.setAttribs( imageNode.parentNode, linkAttrs );
263
+ // } else {
264
+ // dom.remove( imageNode.parentNode, true );
265
+ // }
266
+ // } else if ( imageData.linkUrl ) {
267
+ // if ( linkNode = dom.getParent( imageNode, 'a' ) ) {
268
+ // // The image is inside a link together with other nodes,
269
+ // // or is nested in another node, move it out
270
+ // dom.insertAfter( imageNode, linkNode );
271
+ // }
272
+ //
273
+ // // Add link wrapped around the image
274
+ // linkNode = dom.create( 'a', linkAttrs );
275
+ // imageNode.parentNode.insertBefore( linkNode, imageNode );
276
+ // linkNode.appendChild( imageNode );
277
+ // }
278
+ //
279
+ // captionNode = editor.dom.getParent( imageNode, '.mceTemp' );
280
+ //
281
+ // if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
282
+ // node = imageNode.parentNode;
283
+ // } else {
284
+ // node = imageNode;
285
+ // }
286
+ //
287
+ // if ( imageData.caption ) {
288
+ //
289
+ // id = imageData.attachment_id ? 'attachment_' + imageData.attachment_id : null;
290
+ // className = 'wp-caption align' + ( imageData.align || 'none' );
291
+ //
292
+ // if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
293
+ // width = parseInt( width, 10 );
294
+ // width += 10;
295
+ // }
296
+ //
297
+ // if ( captionNode ) {
298
+ // dl = dom.select( 'dl.wp-caption', captionNode );
299
+ //
300
+ // if ( dl.length ) {
301
+ // dom.setAttribs( dl, {
302
+ // id: id,
303
+ // 'class': className,
304
+ // style: 'width: ' + width + 'px'
305
+ // } );
306
+ // }
307
+ //
308
+ // dd = dom.select( '.wp-caption-dd', captionNode );
309
+ //
310
+ // if ( dd.length ) {
311
+ // dom.setHTML( dd[0], imageData.caption );
312
+ // }
313
+ //
314
+ // } else {
315
+ // id = id ? 'id="'+ id +'" ' : '';
316
+ //
317
+ // // should create a new function for generating the caption markup
318
+ // html = '<dl ' + id + 'class="' + className +'" style="width: '+ width +'px">' +
319
+ // '<dt class="wp-caption-dt">' + dom.getOuterHTML( node ) + '</dt><dd class="wp-caption-dd">'+ imageData.caption +'</dd></dl>';
320
+ //
321
+ // if ( parent = dom.getParent( node, 'p' ) ) {
322
+ // wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );
323
+ // parent.parentNode.insertBefore( wrap, parent );
324
+ // dom.remove( node );
325
+ //
326
+ // if ( dom.isEmpty( parent ) ) {
327
+ // dom.remove( parent );
328
+ // }
329
+ // } else {
330
+ // dom.setOuterHTML( node, '<div class="mceTemp">' + html + '</div>' );
331
+ // }
332
+ // }
333
+ // } else if ( captionNode ) {
334
+ // // Remove the caption wrapper and place the image in new paragraph
335
+ // parent = dom.create( 'p' );
336
+ // captionNode.parentNode.insertBefore( parent, captionNode );
337
+ // parent.appendChild( node );
338
+ // dom.remove( captionNode );
339
+ // }
340
+ //
341
+ // if ( wp.media.events ) {
342
+ // wp.media.events.trigger( 'editor:image-update', {
343
+ // editor: editor,
344
+ // metadata: imageData,
345
+ // image: imageNode
346
+ // } );
347
+ // }
348
+ //
349
+ // editor.nodeChanged();
350
+ // // Refresh the toolbar
351
+ // addToolbar( imageNode );
352
+ // }
353
+
354
+ function editStore( img ) {
355
+ ecwid_open_store_popup();
356
+ }
357
+
358
+ function removeImage( node ) {
359
+ var wrap;
360
+
361
+ if ( node.nodeName === 'DIV' && editor.dom.hasClass( node, 'ecwid-store-wrap' ) ) {
362
+ wrap = node;
363
+ } else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
364
+ wrap = editor.dom.getParent( node, 'div.ecwid-store-wrap' );
365
+ }
366
+
367
+ if ( wrap ) {
368
+ if ( wrap.nextSibling ) {
369
+ editor.selection.select( wrap.nextSibling );
370
+ } else if ( wrap.previousSibling ) {
371
+ editor.selection.select( wrap.previousSibling );
372
+ } else {
373
+ editor.selection.select( wrap.parentNode );
374
+ }
375
+
376
+ editor.selection.collapse( true );
377
+ editor.nodeChanged();
378
+ editor.dom.remove( wrap );
379
+ } else {
380
+ editor.dom.remove( node );
381
+ }
382
+ removeToolbar();
383
+
384
+ editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
385
+ }
386
+
387
+ function addToolbar( node ) {
388
+ var rectangle, toolbarHtml, toolbar, left,
389
+ dom = editor.dom;
390
+
391
+ removeToolbar(node);
392
+
393
+ // Don't add to other images
394
+ if ( ! node || node.nodeName !== 'IMG' || node.className.indexOf('ecwid-store-editor') == -1 ) {
395
+ return;
396
+ }
397
+
398
+ dom.setAttrib( node, 'data-ecwid-store-select', 1 );
399
+ rectangle = dom.getRect( node );
400
+
401
+ toolbarHtml = '<div class="dashicons dashicons-no-alt remove" data-mce-bogus="1"></div>';
402
+
403
+ toolbar = dom.create( 'div', {
404
+ 'id': 'ecwid-store-toolbar',
405
+ 'data-mce-bogus': '1',
406
+ 'contenteditable': false
407
+ }, toolbarHtml );
408
+
409
+ if ( editor.rtl ) {
410
+ left = rectangle.x + rectangle.w - 82;
411
+ } else {
412
+ left = rectangle.x;
413
+ }
414
+
415
+ editor.getBody().appendChild( toolbar );
416
+ dom.setStyles( toolbar, {
417
+ top: rectangle.y,
418
+ left: left
419
+ });
420
+
421
+ toolbarActive = true;
422
+ }
423
+
424
+ this.addToolbar = function() {
425
+ addToolbar(
426
+ jQuery(editor.dom.doc.body).find('.ecwid-store-editor').get(0)
427
+ );
428
+ }
429
+
430
+ function removeToolbar(parentNode) {
431
+
432
+ if (parentNode && editor.dom.getAttrib( parentNode, 'class') == 'ecwid-store-editor' ) {
433
+ var toolbar = editor.dom.get( 'wp-image-toolbar' );
434
+ if ( toolbar ) {
435
+ editor.dom.remove( toolbar );
436
+ }
437
+ }
438
+
439
+ var toolbar = editor.dom.get( 'ecwid-store-toolbar' );
440
+ if ( toolbar ) {
441
+ editor.dom.remove( toolbar );
442
+ }
443
+
444
+ // also remove image toolbar
445
+
446
+ editor.dom.setAttrib( editor.dom.select( 'img[data-ecwid-store-select]' ), 'data-ecwid-store-select', null );
447
+
448
+ toolbarActive = false;
449
+ }
450
+
451
+ editor.onInit.add(function(editor) {
452
+
453
+ dom = editor.dom;
454
+ dom.bind( editor.getDoc(), 'dragstart', function( event ) {
455
+ var node = editor.selection.getNode();
456
+
457
+ // Prevent dragging images out of the caption elements
458
+ if ( node.nodeName === 'IMG' && dom.getParent( node, '.wp-caption' ) ) {
459
+ event.preventDefault();
460
+ }
461
+
462
+ // Remove toolbar to avoid an orphaned toolbar when dragging an image to a new location
463
+ removeToolbar();
464
+ });
465
+ });
466
+
467
+ editor.onKeyUp.add( function( editor, event ) {
468
+ var node, wrap, P, spacer,
469
+ selection = editor.selection,
470
+ keyCode = event.keyCode,
471
+ dom = editor.dom;
472
+
473
+ if ( keyCode === 46 || keyCode === 8 ) {
474
+ checkEcwid();
475
+ }
476
+ });
477
+
478
+ editor.onKeyDown.add( function( editor, event ) {
479
+ var node, wrap, P, spacer,
480
+ selection = editor.selection,
481
+ keyCode = event.keyCode,
482
+ dom = editor.dom;
483
+
484
+ if ( keyCode == 27 ) {
485
+ jQuery('#ecwid-store-popup-content').removeClass('open');
486
+ return false;
487
+ }
488
+
489
+ if ( keyCode === 46 || keyCode === 8 ) {
490
+ node = selection.getNode();
491
+
492
+ if ( node.nodeName === 'DIV' && dom.hasClass( node, 'ecwid-store-wrap' ) ) {
493
+ wrap = node;
494
+ } else if ( node.nodeName === 'IMG' ) {
495
+ wrap = dom.getParent( node, 'div.ecwid-store-wrap' );
496
+ }
497
+
498
+ if ( wrap ) {
499
+ dom.events.cancel( event );
500
+ removeImage( node );
501
+ editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
502
+
503
+ return false;
504
+ }
505
+
506
+ removeToolbar();
507
+ }
508
+
509
+ // Key presses will replace the image so we need to remove the toolbar
510
+ if ( toolbarActive ) {
511
+ if ( event.ctrlKey || event.metaKey || event.altKey ||
512
+ ( keyCode < 48 && keyCode > 90 ) || keyCode > 186 ) {
513
+ return;
514
+ }
515
+
516
+ removeToolbar();
517
+ editor.dom.remove(editor.dom.select('#ecwid-edit-store-button'));
518
+
519
+ }
520
+
521
+ });
522
+
523
+ editor.onMouseDown.add( function( editor, event ) {
524
+ if ( editor.dom.getParent( event.target, '#ecwid-store-toolbar' ) ) {
525
+ if ( tinymce.Env.ie ) {
526
+ // Stop IE > 8 from making the wrapper resizable on mousedown
527
+ event.preventDefault();
528
+ }
529
+ } else if ( event.target.nodeName !== 'IMG' ) {
530
+ removeToolbar();
531
+ }
532
+ });
533
+
534
+ editor.onMouseUp.add( function( editor, event ) {
535
+ var image,
536
+ node = event.target,
537
+ dom = editor.dom;
538
+
539
+ // Don't trigger on right-click
540
+ if ( event.button && event.button > 1 ) {
541
+ return;
542
+ }
543
+
544
+ if ( node.nodeName === 'DIV' && dom.getParent( node, '#ecwid-store-toolbar' ) ) {
545
+ image = dom.select( 'img[data-ecwid-store-select]' )[0];
546
+
547
+ if ( image ) {
548
+ editor.selection.select( image );
549
+
550
+ if ( dom.hasClass( node, 'remove' ) ) {
551
+ removeImage( image );
552
+ } else if ( dom.hasClass( node, 'edit' ) ) {
553
+ editStore( image );
554
+ }
555
+ }
556
+ } else if ( node.nodeName === 'IMG' && ! editor.dom.getAttrib( node, 'data-ecwid-store-select' ) ) {
557
+ addToolbar( node );
558
+ } else if ( node.nodeName !== 'IMG' ) {
559
+ removeToolbar();
560
+ }
561
+ });
562
+
563
+ // Replace Read More/Next Page tags with images
564
+ editor.onBeforeSetContent.add( function( editor, e ) {
565
+ if ( e.content ) {
566
+
567
+ found = ecwid_get_store_shortcode(e.content);
568
+
569
+ if (!found) return;
570
+
571
+ var content = e.content;
572
+
573
+ var store = '<img height="200" width="100%" data-ecwid-shortcode="' + window.encodeURIComponent(found.content) + '" src="' + ecwid_store_svg + '" data-mce-placeholder="true" data-mce-resize="false" class="ecwid-store-editor mceItem">';
574
+
575
+ e.content = e.content.substr(0, found.index) + store + e.content.substr(found.index + found.content.length);
576
+ }
577
+ });
578
+
579
+ // Replace images with tags
580
+ editor.onPostProcess.add( function( editor, e ) {
581
+
582
+ if ( e.get ) {
583
+
584
+ return e.content = e.content.replace( /(<img [^>]*data-ecwid-shortcode=[^>]+>)/g, function( match, image ) {
585
+
586
+ var data = window.decodeURIComponent(jQuery(image).attr('data-ecwid-shortcode'));
587
+
588
+ if ( data ) {
589
+ return data;
590
+ }
591
+
592
+ return match;
593
+ });
594
+ }
595
+ });
596
  });
js/store-editor-page.js CHANGED
@@ -1,358 +1,358 @@
1
- jQuery(document).ready(function() {
2
- $popup = jQuery('#ecwid-store-popup-content');
3
-
4
- /*
5
- * Media buttons handlers
6
- */
7
- jQuery('#update-ecwid-button,#insert-ecwid-button').click(ecwid_open_store_popup);
8
-
9
- /*
10
- * Close button handler
11
- */
12
- jQuery('.media-modal-close', $popup).click(function() {
13
- $popup.removeClass('open');
14
- return false;
15
- });
16
-
17
- jQuery(document).keydown(function(e) {
18
- if (e.keyCode == 27 && $popup.hasClass('open')) {
19
- $popup.removeClass('open');
20
- return false;
21
- }
22
- });
23
-
24
-
25
- /**
26
- * Builds params object from the wp.shortcode
27
- *
28
- * @param shortcode
29
- * @returns {*}
30
- */
31
- buildParams = function(shortcode) {
32
- if (!shortcode) return {};
33
-
34
- var attributes = jQuery.extend({}, shortcode.shortcode.attrs.named);
35
-
36
- if (jQuery.inArray(attributes.category_view, ['grid', 'list', 'table']) == -1) {
37
- attributes.category_view = undefined;
38
- }
39
-
40
- if (!jQuery.inArray(attributes.search_view, ['grid', 'list', 'table']) == -1) {
41
- attributes.search_view = undefined;
42
- }
43
-
44
- var defaults = getDefaultParams();
45
-
46
- if (!attributes.grid || attributes.grid.match(/^\d+,\d+$/) === null) {
47
- attributes.grid = defaults.grid_columns + ',' + defaults.grid_rows;
48
- }
49
-
50
- var grid = attributes.grid.match(/^(\d+),(\d+)/);
51
- attributes.grid_rows = grid[1];
52
- attributes.grid_columns = grid[2];
53
-
54
- for (var i in {'categories_per_row': defaults.categories_per_row, 'list': defaults.list_rows, 'table': defaults.table_rows, 'grid_rows': defaults.grid_rows, 'grid_columns': defaults.grid_columns, 'default_category_id': 0}) {
55
- parsed = parseInt(attributes[i]);
56
- if (isNaN(parsed) || parsed < 0) {
57
- attributes[i] = undefined;
58
- }
59
- }
60
-
61
- var widgets = attributes.widgets;
62
- if (typeof widgets == 'undefined') {
63
- widgets = "productbrowser search categories minicart";
64
- }
65
-
66
- widgets = widgets.split(/[^a-z^A-Z^0-9^-^_]/);
67
-
68
- return {
69
- 'show_search': jQuery.inArray('search', widgets) != -1,
70
- 'show_categories': jQuery.inArray('categories', widgets) != -1,
71
- 'show_minicart': jQuery.inArray('minicart', widgets) != -1,
72
- 'categories_per_row': attributes.categories_per_row,
73
- 'category_view': attributes.category_view,
74
- 'search_view': attributes.search_view,
75
- 'list_rows': attributes.list,
76
- 'table_rows': attributes.table,
77
- 'grid_rows': grid[1],
78
- 'grid_columns': grid[2],
79
- 'default_category_id': attributes.default_category_id,
80
- 'minicart_layout': 'attachToCategories'
81
- };
82
-
83
- }
84
-
85
-
86
- /*
87
- * Returns default parameters object
88
- */
89
- getDefaultParams = function() {
90
- return {
91
- 'show_search': true,
92
- 'show_minicart': true,
93
- 'show_categories': true,
94
- 'categories_per_row': 3,
95
- 'grid_rows': ecwid_pb_defaults.grid_rows,
96
- 'grid_columns': ecwid_pb_defaults.grid_columns,
97
- 'table_rows': ecwid_pb_defaults.table_rows,
98
- 'list_rows': ecwid_pb_defaults.list_rows,
99
- 'default_category_id': 0,
100
- 'category_view': 'grid',
101
- 'search_view': 'list',
102
- 'minicart_layout': 'MiniAttachToProductBrowser'
103
- }
104
- }
105
-
106
- /*
107
- * Tests whether there is a valid store shortcode
108
- */
109
- checkEcwid = function() {
110
-
111
- var hasEcwid = false;
112
- if (typeof tinyMCE != 'undefined' && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
113
- content = tinyMCE.activeEditor.getBody();
114
-
115
- hasEcwid = jQuery(content).find('.ecwid-store-editor').length > 0;
116
- } else {
117
- hasEcwid = ecwid_get_store_shortcode(jQuery('#content').val());
118
- }
119
-
120
- if (hasEcwid) {
121
- jQuery('.wp-media-buttons').addClass('has-ecwid');
122
- } else {
123
- jQuery('.wp-media-buttons').removeClass('has-ecwid');
124
- }
125
- if (typeof tinymce != 'undefined' && tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
126
- var body = tinymce.activeEditor.dom.doc.body;
127
- var button = tinymce.activeEditor.dom.select('#ecwid-edit-store-button');
128
-
129
- if (hasEcwid && button.length == 0) {
130
- var button = jQuery('<input type="button" id="ecwid-edit-store-button" contenteditable="false" data-mce-bogus="true" value="' + ecwid_i18n.edit_store_appearance + '" />')
131
- .appendTo(body);
132
-
133
- button.click(ecwid_open_store_popup);
134
- } else if (!hasEcwid && button.length > 0) {
135
- tinymce.activeEditor.dom.remove(button);
136
- }
137
-
138
- if (hasEcwid) {
139
- var store = jQuery(body).find('.ecwid-store-editor');
140
- var button = jQuery('#ecwid-edit-store-button', body);
141
-
142
- var width = this.buttonWidth;
143
- if (!width) {
144
- width = button.outerWidth();
145
- this.buttonWidth = width;
146
- }
147
- button.css({
148
- 'position': 'absolute',
149
- 'top': '' + (store.offset().top + 168) + 'px',
150
- 'left': '' + (store.offset().left + store.outerWidth() / 2 - width / 2 - 2) + 'px'
151
- });
152
- }
153
-
154
- jQuery('#wp_editbtns').css('display', 'none !important');
155
- }
156
-
157
- if (window.location.search.indexOf('show-ecwid=true') != -1 && typeof this.show_ecwid_processed == 'undefined') {
158
- ecwid_open_store_popup();
159
- this.show_ecwid_processed = true;
160
-
161
- if (tinymce.activeEditor) {
162
- tinymce.activeEditor.plugins.ecwid.addToolbar();
163
- }
164
- }
165
- }
166
-
167
- setInterval(checkEcwid, 1000);
168
-
169
- jQuery('#content-tmce').click(function() {
170
- checkEcwid()
171
- });
172
- /*
173
- * Handles media modal menus
174
- */
175
- jQuery('.media-menu-item', $popup).click(function() {
176
- jQuery('.media-menu .media-menu-item', $popup).removeClass('active');
177
- jQuery(this).addClass('active');
178
-
179
- jQuery('.media-modal-content', $popup).attr('data-active-dialog', jQuery(this).attr('data-content'));
180
- jQuery('.media-menu').removeClass('visible');
181
- return false;
182
- });
183
-
184
- jQuery('h1', $popup).click(function() {
185
- jQuery('.media-menu').toggleClass('visible');
186
- })
187
-
188
- /*
189
- * Main button click
190
- */
191
- jQuery('.button-primary', $popup).click(function() {
192
-
193
- var result = {}, defaults = getDefaultParams();
194
-
195
- result.widgets = 'productbrowser';
196
- for (var i in {search:1, categories:1, minicart:1}) {
197
- if (jQuery('input[name=show_' + i + ']').prop('checked')) {
198
- result.widgets += ' ' + i;
199
- }
200
- }
201
-
202
- getNumber = function(name, fallback) {
203
- var value = parseInt(jQuery('[name=' + name + ']', $popup).val());
204
-
205
- if (isNaN(value) || value < 0) {
206
- value = fallback;
207
- }
208
-
209
- return value;
210
- }
211
-
212
- getString = function(name, values, fallback) {
213
- var value = jQuery('[name=' + name + ']', $popup).val();
214
-
215
- if (jQuery.inArray(value, values) == -1) {
216
- value = fallback;
217
- }
218
-
219
- return value;
220
- }
221
-
222
- result.categories_per_row = getNumber('categories_per_row', defaults.categories_per_row);
223
- result.grid = getNumber('grid_rows', defaults.grid_rows) + ',' + getNumber('grid_columns', defaults.grid_columns);
224
- result.list = getNumber('list_rows', defaults.list_rows);
225
- result.table = getNumber('table_rows', defaults.table_rows);
226
- result.default_category_id = getNumber('default_category_id', defaults.default_category_id);
227
- result.category_view = getString('category_view', ['list', 'grid', 'table'], defaults.category_view);
228
- result.search_view = getString('search_view', ['list', 'grid', 'table'], defaults.search_view);
229
- result.minicart_layout = defaults.minicart_layout;
230
-
231
-
232
- var existingShortcode = ecwid_get_store_shortcode(jQuery('#content').val());
233
- var shortcode = {};
234
- if (!existingShortcode) {
235
- shortcode.shortcode = new wp.shortcode();
236
- shortcode.shortcode.tag = 'ecwid';
237
- shortcode.shortcode.type = 'single';
238
- } else {
239
- shortcode = existingShortcode;
240
- }
241
-
242
- for (var i in result) {
243
- shortcode.shortcode.attrs.named[i] = result[i];
244
- }
245
-
246
- if (existingShortcode) {
247
- jQuery('#content').val(
248
- jQuery('#content').val().replace(existingShortcode.content, shortcode.shortcode.string())
249
- );
250
- if (tinyMCE.activeEditor) {
251
- jQuery(tinymce.activeEditor.getBody()).find('.ecwid-store-editor').attr('data-ecwid-shortcode', shortcode.shortcode.string());
252
- }
253
- } else {
254
-
255
- if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
256
- tinymce.activeEditor.execCommand('mceInsertContent', false, shortcode.shortcode.string());
257
- tinymce.activeEditor.execCommand('mceSetContent', false, tinymce.activeEditor.getBody().innerHTML);
258
- } else {
259
-
260
- getCursorPosition = function(el) {
261
- var pos = 0;
262
- if('selectionStart' in el) {
263
- pos = el.selectionStart;
264
- } else if('selection' in document) {
265
- el.focus();
266
- var Sel = document.selection.createRange();
267
- var SelLength = document.selection.createRange().text.length;
268
- Sel.moveStart('character', -el.value.length);
269
- pos = Sel.text.length - SelLength;
270
- }
271
- return pos;
272
- }
273
-
274
- var el = jQuery('#content');
275
- var cursorPosition = getCursorPosition(el.get(0));
276
-
277
- el.val(el.val().substr(0, cursorPosition) + shortcode.shortcode.string() + el.val().substr(cursorPosition));
278
-
279
- }
280
- }
281
-
282
-
283
- jQuery('#ecwid-store-popup-content').removeClass('open');
284
- });
285
-
286
- updatePreview = function() {
287
- jQuery('.store-settings input[type=checkbox]', $popup).each(function(idx, el) {
288
- var widget = jQuery(el).parent().attr('data-ecwid-widget');
289
- var preview = jQuery('.store-settings-preview svg path.' + widget, $popup);
290
- if (jQuery(el).prop('checked')) {
291
- jQuery('.store-settings-wrapper').addClass('ecwid-' + widget);
292
- } else {
293
- jQuery('.store-settings-wrapper').removeClass('ecwid-' + widget);
294
- }
295
- });
296
- }
297
-
298
- jQuery('.store-settings-wrapper label', $popup).hover(
299
- function() {
300
- jQuery('.store-settings-wrapper').attr('data-ecwid-widget-hover', jQuery(this).attr('data-ecwid-widget'));
301
- },
302
- function() {
303
- jQuery('.store-settings-wrapper').attr('data-ecwid-widget-hover', '');
304
- }
305
- );
306
-
307
- jQuery('.store-settings input[type=checkbox]', $popup).change(updatePreview);
308
- });
309
-
310
- ecwid_open_store_popup = function() {
311
-
312
- var shortcode;
313
-
314
- if (tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
315
- tinyMCE.activeEditor.save();
316
-
317
- var content = jQuery(tinyMCE.activeEditor.getBody())
318
- .find('.ecwid-store-editor')
319
- .attr('data-ecwid-shortcode');
320
-
321
- var shortcode = ecwid_get_store_shortcode(window.decodeURIComponent(content));
322
- } else {
323
- shortcode = ecwid_get_store_shortcode(jQuery('#content').val());
324
- }
325
-
326
- $popup.addClass('open');
327
-
328
- params = {};
329
- jQuery.extend(params, getDefaultParams(), buildParams(shortcode));
330
-
331
- for (var i in params) {
332
- var el = jQuery('[name=' + i + ']', $popup);
333
- if (el.attr('type') == 'checkbox') {
334
- el.prop('checked', params[i]);
335
- } else {
336
- el.val(params[i]);
337
- }
338
- }
339
-
340
- // mode determines whether it is a new store or not, and active dialog is the current tab
341
- // in other words, mode = [add-store,store-settings] and active dialog is [add-store|store-settings, appearance]
342
- // buttons and menu items are for mode, current title and content are for dialog
343
- var current = !shortcode ? 'add-store' : 'store-settings';
344
- jQuer