Ecwid Ecommerce Shopping Cart - Version 4.3

Version Description

  • New Minicart Widget. We added a new floating minicart widget. You can enable it on the "Appearance -> Widgets" page in you Wordpress backend. The new search widget appears as soon as a customer adds something to the cart and resides at the top right or bottom right position on the screen so that the customer always sees it and can easily proceed to checkout. The minicart widget also contains a counter displaying the number of products in the cart. Feel free to add it to your site it's free!
  • Look and feel improvements and minor layout fixes in the themes Zerif-lite, Storefront, Pixova-lite and Accesspress Mag. Thanks to the Chameleon skin feature we released a few months ago, Ecwid looks good with every Wordpress theme. Now it became even better in these four popular themes.
  • Fixed a bug on the category pages in mobile view. In some Wordpress themes, click on category icon returned an error and got customer back to the category listing page, when the store was opened from a mobile device. We fixed that and now there shouldn't be any troubles with viewing your shop on mobile devices.
  • Fixed a bug preventing Ecwid plugin working well with the Envira Galleries plugin. Those of you using Envira Galleries on the site might notice it doesn't work properly on the pages containing Ecwid. We fixed that, you can now use the both plugins, they should work fine together.
  • Improved the plugin settings page footer. It now includes a link to the mobile app page inside Ecwid Control Panel, which significantly simplified the Ecwid mobile apps installation.
  • Fixed a few more minor bugs on the plugin settings pages. We're constantly improving the plugin settings pages to make store managements as convenient as possible. If you find any trouble working with your store in the plugin, please let us know.
Download this release

Release Info

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

Code changes from version 4.2.1.3 to 4.3

css/admin.css CHANGED
@@ -257,7 +257,8 @@ body[class*="_page_ecwid"] .ecwid-message {
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
  {
262
  content: "\e601";
263
  }
@@ -359,6 +360,7 @@ body[class*="_page_ecwid"] .ecwid-message {
359
 
360
  #ecwid-frame {
361
  border: 1px solid #e5e5e5;
 
362
  }
363
 
364
  /* Remove left padding for integrated admin */
@@ -479,4 +481,52 @@ body[class*="_page_ecwid"] .ecwid-message {
479
  .ecwid-admin-footer-block {
480
  display: block;
481
  }
482
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
  }
360
 
361
  #ecwid-frame {
362
  border: 1px solid #e5e5e5;
363
+ max-width: 1440px;
364
  }
365
 
366
  /* Remove left padding for integrated admin */
481
  .ecwid-admin-footer-block {
482
  display: block;
483
  }
484
+ }
485
+
486
+ .ecwid-admin-timeout .box {
487
+ margin: 20px auto;
488
+ border: 2px solid #ed917d;
489
+ min-width: 290px;
490
+ max-width: 600px;
491
+ padding: 45px 85px 30px 85px;
492
+ box-sizing: border-box;
493
+ background: #f5ffef;
494
+ font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
495
+ }
496
+
497
+ .ecwid-admin-timeout .box .logo {
498
+ width: auto;
499
+ height: 65px;
500
+ }
501
+ .ecwid-admin-timeout .box .logo svg {
502
+ max-height: 65px;
503
+ }
504
+
505
+ .ecwid-admin-timeout .box .logo svg path {
506
+ fill: #ed917d;
507
+ }
508
+
509
+ .ecwid-admin-timeout .box .title {
510
+ text-align: center;
511
+ font-size: 18px;
512
+ padding: 15px 0 5px;
513
+ }
514
+
515
+ .ecwid-admin-timeout .box .text {
516
+ text-align: center;
517
+ font-size: 14px;
518
+ line-height: 24px;
519
+ padding: 5px 0;
520
+ }
521
+
522
+ .ecwid-admin-timeout a {
523
+ color: #04a2ca;
524
+ text-decoration: none;
525
+ -webkit-transition: color 0.1s linear;
526
+ transition: color 0.1s linear;
527
+ }
528
+
529
+ .ecwid-admin-timeout a:hover {
530
+ color: #006995;
531
+ }
532
+
css/floating-shopping-cart.css ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html#ecwid_html body#ecwid_body .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
+ html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
11
+ bottom: auto;
12
+ top: 25px;
13
+ right: 25px;
14
+ left: auto;
15
+ }
16
+
17
+ html#ecwid_html body#ecwid_body .ecwid-float-icons.position-bottomright {
18
+ top: auto;
19
+ bottom: 25px;
20
+ right: 25px;
21
+ left: auto;
22
+ }
23
+
24
+ @media (max-width: 600px) {
25
+ html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
26
+ right: -8px;
27
+ }
28
+ }
29
+
30
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div {
31
+ height: 48px;
32
+ padding-top: 20px;
33
+ -webkit-transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
34
+ transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
35
+ box-sizing: content-box;
36
+ }
37
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off {
38
+ height: 0;
39
+ padding-top: 0;
40
+ -webkit-transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
41
+ transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
42
+ }
43
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off a {
44
+ -webkit-transform: translate3D(80px, 0, 0);
45
+ transform: translate3D(80px, 0, 0);
46
+ -webkit-transition: -webkit-transform .3s ease-in-out .1s;
47
+ transition: transform .3s ease-in-out .1s;
48
+ }
49
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off a svg {
50
+ -webkit-transform: rotate(270deg);
51
+ transform: rotate(270deg);
52
+ -webkit-transition: -webkit-transform .3s ease-in-out .1s;
53
+ transition: transform .3s ease-in-out .1s;
54
+ }
55
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.search-icon a svg {
56
+ width: 24px;
57
+ height: 24px;
58
+ margin: 11px 0 0 11px;
59
+ }
60
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon.off a::after {
61
+ opacity: 0;
62
+ -webkit-transition: opacity .2s ease-in-out 0s;
63
+ transition: opacity .2s ease-in-out 0s;
64
+ }
65
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon a::after {
66
+ display: block;
67
+ min-width: 24px;
68
+ height: 24px;
69
+ padding: 0 5px;
70
+ background-color: #EA836E;
71
+ content: attr(data-count);
72
+ font-size: 12px;
73
+ line-height: 24px;
74
+ font-weight: 600;
75
+ color: #fff;
76
+ text-align: center;
77
+ position: absolute;
78
+ top: -8px;
79
+ right: 28px;
80
+ border-radius: 12px;
81
+ opacity: 1;
82
+ box-sizing: border-box;
83
+ -webkit-transition: opacity .15s ease-in-out .2s;
84
+ transition: opacity .15s ease-in-out .2s;
85
+ }
86
+ @media (min-width: 600px) {
87
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon a::after {
88
+ right: -8px;
89
+ }
90
+ }
91
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid {
92
+ position: relative;
93
+ top: -100%;
94
+ left: 0;
95
+ width: 100%;
96
+ height: 100%;
97
+ }
98
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart {
99
+ background-color: transparent !important;
100
+ width: 100% !important;
101
+ height: 100% !important;
102
+ border: 0 none !important;
103
+ opacity: 0 !important;
104
+ }
105
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart * {
106
+ display: none;
107
+ }
108
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a {
109
+ display: block;
110
+ width: 46px;
111
+ height: 46px;
112
+ background-color: #fff;
113
+ border: 1px solid #439CA0;
114
+ border-radius: 50%;
115
+ box-sizing: border-box;
116
+ position: relative;
117
+ -webkit-transform: translate3D(0, 0, 0);
118
+ transform: translate3D(0, 0, 0);
119
+ -webkit-transition: -webkit-transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
120
+ transition: transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
121
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
122
+ }
123
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover {
124
+ border-color: #34797c;
125
+ }
126
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover svg path[stroke] {
127
+ stroke: #34797c;
128
+ }
129
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover svg path[fill] {
130
+ fill: #34797c;
131
+ }
132
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active {
133
+ border-color: #6dbec2;
134
+ }
135
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active svg path[stroke] {
136
+ stroke: #6dbec2;
137
+ }
138
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active svg path[fill] {
139
+ fill: #6dbec2;
140
+ }
141
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg {
142
+ width: 20px;
143
+ height: 26px;
144
+ margin: 9px 12px;
145
+ display: block;
146
+ -webkit-transform: rotate(0deg);
147
+ transform: rotate(0deg);
148
+ -webkit-transition: -webkit-transform .3s ease-in-out 0s;
149
+ transition: transform .3s ease-in-out 0s;
150
+ }
151
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path {
152
+ -webkit-transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
153
+ transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
154
+ }
155
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[stroke] {
156
+ stroke: #439CA0;
157
+ }
158
+ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[fill] {
159
+ fill: #439CA0;
160
+ }
css/themes/accesspress-mag.css CHANGED
@@ -4,4 +4,8 @@ html#ecwid_html body#ecwid_body .ecwid-SearchPanel-button {
4
  }
5
  html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary:hover {
6
  color: #fff !important;
 
 
 
 
7
  }
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--secondary {
10
+ font-size: 13px;
11
  }
css/themes/storefront.css ADDED
@@ -0,0 +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
+ }
css/themes/zerif-lite.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ html#ecwid_html body#ecwid_body div.ecwid-search-widget {
2
+ font-size: 16px;
3
+ }
4
+
5
+ html#ecwid_html body#ecwid_body .ecwid table {
6
+ line-height: inherit;
7
+ }
ecwid-shopping-cart.php CHANGED
@@ -5,7 +5,7 @@ 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.2.1.3
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -18,6 +18,7 @@ define("ECWID_DEMO_STORE_ID", 1003);
18
 
19
  define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
20
 
 
21
 
22
  if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
23
  define( 'ECWID_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
@@ -112,6 +113,7 @@ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-kissmetrics.php';
112
  if (is_admin()) {
113
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-help-page.php';
114
  }
 
115
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
116
 
117
  require_once ECWID_PLUGIN_DIR . 'lib/ecwid_platform.php';
@@ -238,28 +240,11 @@ function ecwid_enqueue_frontend() {
238
  wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
239
 
240
  if ((bool)get_option('ecwid_use_chameleon')) {
241
- wp_enqueue_script('ecwid-chameleon-js', 'https://dj925myfyz5v.cloudfront.net/widgets/chameleon/v1/ecwid-chameleon.js', array(), get_option('ecwid_plugin_version'), true);
242
-
243
- $primary = get_option('ecwid_chameleon_primary');
244
- $background = get_option('ecwid_chameleon_background');
245
- $links = get_option('ecwid_chameleon_links');
246
-
247
- $localize = array();
248
-
249
- if (get_option('ecwid_chameleon_primary')) {
250
- $localize['primary_color'] = get_option('ecwid_chameleon_primary');
251
- }
252
- if (get_option('ecwid_chameleon_background')) {
253
- $localize['primary_background'] = get_option('ecwid_chameleon_background');
254
- }
255
- if (get_option('ecwid_chameleon_links')) {
256
- $localize['primary_link'] = get_option('ecwid_chameleon_links');
257
- }
258
-
259
- if (!empty($localize)) {
260
- wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', $localize);
261
  }
262
-
263
  }
264
 
265
  if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
@@ -276,6 +261,50 @@ function ecwid_enqueue_frontend() {
276
  }
277
  }
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  function ecwid_load_textdomain() {
280
  load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
281
 
@@ -427,7 +456,7 @@ function ecwid_check_version()
427
  }
428
 
429
  if ($fresh_install || $upgrade || @$_GET['ecwid_reinit']) {
430
- if (ecwid_migrations_is_original_plugin_version_older_than('4.4')) {
431
  add_option('ecwid_fetch_url_use_file_get_contents', '');
432
  add_option('ecwid_remote_get_timeout', '5');
433
  }
@@ -436,6 +465,15 @@ function ecwid_check_version()
436
  add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
437
  }
438
 
 
 
 
 
 
 
 
 
 
439
  $all_plugins = get_plugins();
440
  $has_woo = ecwid_get_woocommerce_status();
441
 
@@ -818,7 +856,7 @@ function ecwid_trim_description($description)
818
 
819
  function ecwid_ajax_hide_message($params)
820
  {
821
- if (!current_user_can('administrator')) {
822
  return;
823
  }
824
 
@@ -980,6 +1018,7 @@ function ecwid_get_scriptjs_code($force_lang = null) {
980
  $force_lang_str = !empty($force_lang) ? "&lang=$force_lang" : '';
981
  $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
982
  $s = $s . ecwid_sso();
 
983
  $ecwid_script_rendered = true;
984
 
985
  return $s;
@@ -1230,7 +1269,7 @@ function ecwid_shortcode($attributes)
1230
 
1231
  function ecwid_productbrowser_shortcode($shortcode_params) {
1232
 
1233
- if (current_user_can('administrator')) {
1234
  Ecwid_Kissmetrics::record('storefrontIsOpened');
1235
  }
1236
 
@@ -1461,6 +1500,10 @@ EOT;
1461
  }
1462
  }
1463
 
 
 
 
 
1464
  Ecwid_Message_Manager::enable_message('on_activate');
1465
  Ecwid_Kissmetrics::record('wpPluginActivated');
1466
 
@@ -1620,6 +1663,7 @@ function ecwid_build_menu() {
1620
  }
1621
 
1622
  add_submenu_page('', 'Ecwid debug', '', 'manage_options', 'ecwid-debug', 'ecwid_debug_do_page');
 
1623
  add_submenu_page(
1624
  'ecwid',
1625
  __('Help', 'ecwid-shopping-cart'),
@@ -1650,18 +1694,13 @@ function ecwid_get_categories() {
1650
 
1651
  function ecwid_reset_categories_cache()
1652
  {
1653
- if (!current_user_can('administrator')) {
1654
  return;
1655
  }
1656
 
1657
  wp_cache_delete('all_categories', 'ecwid');
1658
  }
1659
 
1660
-
1661
- function ecwid_add_meta_boxes()
1662
- {
1663
- }
1664
-
1665
  function ecwid_register_admin_styles($hook_suffix) {
1666
 
1667
  wp_enqueue_style('ecwid-admin-css', ECWID_PLUGIN_URL . 'css/admin.css', array(), get_option('ecwid_plugin_version'));
@@ -1935,6 +1974,10 @@ function ecwid_general_settings_do_page() {
1935
 
1936
  function ecwid_admin_do_page( $page ) {
1937
 
 
 
 
 
1938
  global $ecwid_oauth;
1939
 
1940
  if ($page == 'dashboard') {
@@ -1957,8 +2000,10 @@ function ecwid_admin_do_page( $page ) {
1957
  );
1958
 
1959
  $result = EcwidPlatform::fetch_url($iframe_src);
1960
- if ($result['code'] != 200) {
1961
 
 
 
 
1962
  if (ecwid_test_oauth(true)) {
1963
  require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
1964
  } else {
@@ -1978,6 +2023,11 @@ function ecwid_admin_orders_do_page() {
1978
  ecwid_admin_do_page('orders');
1979
  }
1980
 
 
 
 
 
 
1981
  function ecwid_help_do_page() {
1982
 
1983
  $help = new Ecwid_Help_Page();
@@ -2024,7 +2074,7 @@ function ecwid_process_oauth_params() {
2024
 
2025
  function ecwid_admin_post_connect()
2026
  {
2027
- if (!current_user_can('administrator')) {
2028
  return;
2029
  }
2030
 
@@ -2131,7 +2181,7 @@ function ecwid_debug_do_page() {
2131
  }
2132
 
2133
  function ecwid_get_debug_file() {
2134
- if (!current_user_can('administrator')) {
2135
  return;
2136
  }
2137
 
@@ -2158,7 +2208,7 @@ function ecwid_dashboard_widget_function() {
2158
  }
2159
 
2160
  function ecwid_add_dashboard_widgets() {
2161
- if (current_user_can('administrator')) {
2162
  wp_add_dashboard_widget('ecwid_dashboard_widget', __('Recommendations for Your Online Store', 'ecwid-shopping-cart'), 'ecwid_dashboard_widget_function');
2163
  }
2164
  }
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.3
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
18
 
19
  define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
20
 
21
+ define ( 'ECWID_VERSION_BUILTIN_CHAMELEON', '10' );
22
 
23
  if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
24
  define( 'ECWID_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
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';
240
  wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
241
 
242
  if ((bool)get_option('ecwid_use_chameleon')) {
243
+ if (ecwid_migrations_is_original_plugin_version_older_than( ECWID_VERSION_BUILTIN_CHAMELEON )) {
244
+ ecwid_enqueue_external_chameleon();
245
+ } else {
246
+ ecwid_enqueue_builtin_chameleon();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  }
 
248
  }
249
 
250
  if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
261
  }
262
  }
263
 
264
+ function ecwid_enqueue_external_chameleon() {
265
+ wp_enqueue_script('ecwid-chameleon-js', 'https://dj925myfyz5v.cloudfront.net/widgets/chameleon/v1/ecwid-chameleon.js', array(), get_option('ecwid_plugin_version'), true);
266
+
267
+ $primary = get_option('ecwid_chameleon_primary');
268
+ $background = get_option('ecwid_chameleon_background');
269
+ $links = get_option('ecwid_chameleon_links');
270
+
271
+ $localize = array();
272
+
273
+ if (get_option('ecwid_chameleon_primary')) {
274
+ $localize['primary_color'] = get_option('ecwid_chameleon_primary');
275
+ }
276
+ if (get_option('ecwid_chameleon_background')) {
277
+ $localize['primary_background'] = get_option('ecwid_chameleon_background');
278
+ }
279
+ if (get_option('ecwid_chameleon_links')) {
280
+ $localize['primary_link'] = get_option('ecwid_chameleon_links');
281
+ }
282
+
283
+ if (!empty( $localize )) {
284
+ wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', $localize);
285
+ }
286
+ }
287
+
288
+ function ecwid_enqueue_builtin_chameleon() {
289
+ wp_enqueue_script('ecwid-chameleon-js', ECWID_PLUGIN_URL . '/js/chameleon.js', array(), get_option('ecwid_plugin_version'), true);
290
+
291
+ $colors = array();
292
+
293
+ foreach (array('foreground', 'background', 'link', 'price', 'button') as $kind) {
294
+ $color = get_option( 'ecwid_chameleon_colors_' . $kind );
295
+ if ( $color ) {
296
+ $colors['color-' . $kind] = $color;
297
+ }
298
+ }
299
+
300
+ if (empty($colors)) {
301
+ $colors = 'auto';
302
+ }
303
+ wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', array(
304
+ 'colors' => $colors
305
+ ));
306
+ }
307
+
308
  function ecwid_load_textdomain() {
309
  load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
310
 
456
  }
457
 
458
  if ($fresh_install || $upgrade || @$_GET['ecwid_reinit']) {
459
+ if (ecwid_migrations_is_original_plugin_version_older_than('4.3')) {
460
  add_option('ecwid_fetch_url_use_file_get_contents', '');
461
  add_option('ecwid_remote_get_timeout', '5');
462
  }
465
  add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
466
  }
467
 
468
+
469
+ if (!ecwid_migrations_is_original_plugin_version_older_than( ECWID_VERSION_BUILTIN_CHAMELEON )) {
470
+ add_option('ecwid_chameleon_colors_foreground', '');
471
+ add_option('ecwid_chameleon_colors_background', '');
472
+ add_option('ecwid_chameleon_colors_link', '');
473
+ add_option('ecwid_chameleon_colors_button', '');
474
+ add_option('ecwid_chameleon_colors_price', '');
475
+ }
476
+
477
  $all_plugins = get_plugins();
478
  $has_woo = ecwid_get_woocommerce_status();
479
 
856
 
857
  function ecwid_ajax_hide_message($params)
858
  {
859
+ if (!current_user_can('manage_options')) {
860
  return;
861
  }
862
 
1018
  $force_lang_str = !empty($force_lang) ? "&lang=$force_lang" : '';
1019
  $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
1020
  $s = $s . ecwid_sso();
1021
+ $s .= '<script type="text/javascript">if (jQuery && jQuery.mobile) { jQuery.mobile.hashListeningEnabled = false; jQuery.mobile.pushStateEnabled=false; }</script>';
1022
  $ecwid_script_rendered = true;
1023
 
1024
  return $s;
1269
 
1270
  function ecwid_productbrowser_shortcode($shortcode_params) {
1271
 
1272
+ if (current_user_can('manage_options')) {
1273
  Ecwid_Kissmetrics::record('storefrontIsOpened');
1274
  }
1275
 
1500
  }
1501
  }
1502
 
1503
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-nav-menus.php';
1504
+
1505
+ Ecwid_Nav_Menus::add_menu_on_activate();
1506
+
1507
  Ecwid_Message_Manager::enable_message('on_activate');
1508
  Ecwid_Kissmetrics::record('wpPluginActivated');
1509
 
1663
  }
1664
 
1665
  add_submenu_page('', 'Ecwid debug', '', 'manage_options', 'ecwid-debug', 'ecwid_debug_do_page');
1666
+ add_submenu_page('', 'Ecwid get mobile app', '', 'manage_options', 'ecwid-admin-mobile', 'ecwid_admin_mobile_do_page');
1667
  add_submenu_page(
1668
  'ecwid',
1669
  __('Help', 'ecwid-shopping-cart'),
1694
 
1695
  function ecwid_reset_categories_cache()
1696
  {
1697
+ if (!current_user_can('manage_options')) {
1698
  return;
1699
  }
1700
 
1701
  wp_cache_delete('all_categories', 'ecwid');
1702
  }
1703
 
 
 
 
 
 
1704
  function ecwid_register_admin_styles($hook_suffix) {
1705
 
1706
  wp_enqueue_style('ecwid-admin-css', ECWID_PLUGIN_URL . 'css/admin.css', array(), get_option('ecwid_plugin_version'));
1974
 
1975
  function ecwid_admin_do_page( $page ) {
1976
 
1977
+ if ($_GET['show_timeout'] == '1') {
1978
+ require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
1979
+ die();
1980
+ }
1981
  global $ecwid_oauth;
1982
 
1983
  if ($page == 'dashboard') {
2000
  );
2001
 
2002
  $result = EcwidPlatform::fetch_url($iframe_src);
 
2003
 
2004
+ if (empty($result['code']) && empty($result['data'])) {
2005
+ require_once ECWID_PLUGIN_DIR . 'templates/admin-timeout.php';
2006
+ } else if ($result['code'] != 200) {
2007
  if (ecwid_test_oauth(true)) {
2008
  require_once ECWID_PLUGIN_DIR . 'templates/reconnect-sso.php';
2009
  } else {
2023
  ecwid_admin_do_page('orders');
2024
  }
2025
 
2026
+
2027
+ function ecwid_admin_mobile_do_page() {
2028
+ ecwid_admin_do_page('mobile');
2029
+ }
2030
+
2031
  function ecwid_help_do_page() {
2032
 
2033
  $help = new Ecwid_Help_Page();
2074
 
2075
  function ecwid_admin_post_connect()
2076
  {
2077
+ if (!current_user_can('manage_options')) {
2078
  return;
2079
  }
2080
 
2181
  }
2182
 
2183
  function ecwid_get_debug_file() {
2184
+ if (!current_user_can('manage_options')) {
2185
  return;
2186
  }
2187
 
2208
  }
2209
 
2210
  function ecwid_add_dashboard_widgets() {
2211
+ if (current_user_can('manage_options')) {
2212
  wp_add_dashboard_widget('ecwid_dashboard_widget', __('Recommendations for Your Online Store', 'ecwid-shopping-cart'), 'ecwid_dashboard_widget_function');
2213
  }
2214
  }
includes/class-ecwid-nav-menus.php CHANGED
@@ -38,16 +38,47 @@ class Ecwid_Nav_Menus {
38
  );
39
  }
40
 
41
- public function add_meta_box() {
42
- /* $locations = get_nav_menu_locations();
 
 
 
43
 
44
- $nav = wp_get_nav_menu_object(11);
45
- wp_update_nav_menu_item(11, 0, array(
 
 
 
 
 
 
 
 
 
 
 
46
  'menu-item-title' => 'Store',
47
  'menu-item-object' => 'ecwid-store-with-categories',
48
  'menu-item-type' => 'ecwid_menu_item',
49
  'menu-item-status' => 'publish')
50
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  */
52
  add_meta_box('ecwid_nav_links', __('Store', 'ecwid-shopping-cart'), array( $this, 'create_menu_items'), 'nav-menus', 'side');
53
  }
@@ -236,4 +267,4 @@ class Ecwid_Nav_Menus {
236
  return $this->item_types;
237
  }
238
  }
239
- $ecwid_menus = new Ecwid_Nav_Menus();
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 protected function _find_existing_store_page_menu($menu_id) {
68
+ $items = wp_get_nav_menu_items($menu_id);
69
+
70
+ if (empty($items)) return null;
71
+
72
+ foreach ($items as $item) {
73
+ if ( $item->object == 'page' && $item->object_id == ecwid_get_current_store_page_id() )
74
+ return $item;
75
+ }
76
+
77
+ return null;
78
+ }
79
+
80
+ public function add_meta_box() {
81
+ /*
82
  */
83
  add_meta_box('ecwid_nav_links', __('Store', 'ecwid-shopping-cart'), array( $this, 'create_menu_items'), 'nav-menus', 'side');
84
  }
267
  return $this->item_types;
268
  }
269
  }
270
+ $ecwid_menus = new Ecwid_Nav_Menus();
includes/class-ecwid-oauth.php CHANGED
@@ -249,7 +249,9 @@ class Ecwid_OAuth {
249
  $this->state->mode = self::MODE_CONNECT;
250
  }
251
 
252
- $this->state->create_store_clicked = @$_COOKIE['ecwid_create_store_clicked'];
 
 
253
  }
254
 
255
  public function get_state() {
249
  $this->state->mode = self::MODE_CONNECT;
250
  }
251
 
252
+ if (isset($_COOKIE['ecwid_create_store_clicked'])) {
253
+ $this->state->create_store_clicked = $_COOKIE['ecwid_create_store_clicked'];
254
+ }
255
  }
256
 
257
  public function get_state() {
includes/themes.php CHANGED
@@ -49,7 +49,9 @@ function ecwid_apply_theme($theme_name = null)
49
  'responsiveboat' => array( 'css' ),
50
  'twentyfourteen' => array( 'css', 'scroll' ),
51
  'twentytwelve' => array( 'js', 'scroll' ),
52
- 'sliding-door' => array( 'css-no-parent' )
 
 
53
  );
54
  $generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
55
 
@@ -71,7 +73,7 @@ function ecwid_apply_theme($theme_name = null)
71
 
72
  $theme_file = '';
73
 
74
- if ($theme_name == 'zerif-lite' && function_exists('wp_get_theme') && wp_get_theme()->Name == 'ResponsiveBoat') {
75
  $theme_name = 'responsiveboat';
76
  }
77
 
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
  );
56
  $generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
57
 
73
 
74
  $theme_file = '';
75
 
76
+ if (function_exists('wp_get_theme') && wp_get_theme()->Name == 'ResponsiveBoat') {
77
  $theme_name = 'responsiveboat';
78
  }
79
 
includes/widgets.php CHANGED
@@ -7,7 +7,7 @@ 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-vcategories.php";
10
-
11
 
12
  function ecwid_sidebar_widgets_init() {
13
  register_widget('Ecwid_Widget_Badge');
@@ -17,6 +17,7 @@ function ecwid_sidebar_widgets_init() {
17
  register_widget('Ecwid_Widget_Minicart');
18
  register_widget('Ecwid_Widget_Store_Link');
19
  register_widget('Ecwid_Widget_Recently_Viewed');
 
20
  }
21
 
22
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
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-vcategories.php";
10
+ include_once "widgets/class-ecwid-widget-floating-shopping-cart.php";
11
 
12
  function ecwid_sidebar_widgets_init() {
13
  register_widget('Ecwid_Widget_Badge');
17
  register_widget('Ecwid_Widget_Minicart');
18
  register_widget('Ecwid_Widget_Store_Link');
19
  register_widget('Ecwid_Widget_Recently_Viewed');
20
+ register_widget('Ecwid_Widget_Floating_Shopping_Cart');
21
  }
22
 
23
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
includes/widgets/class-ecwid-widget-floating-shopping-cart.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
17
+ }
18
+
19
+ public function enqueue_scripts() {
20
+ if (self::$was_enqueued) return;
21
+
22
+ wp_enqueue_script('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . '/js/floating-shopping-cart.js', array('jquery'), get_option('ecwid_plugin_version'), true);
23
+ wp_enqueue_style('ecwid-floating-shopping-cart', ECWID_PLUGIN_URL . 'css/floating-shopping-cart.css', array(), get_option('ecwid_plugin_version'));
24
+ }
25
+
26
+ public function widget($args, $instance) {
27
+
28
+ $position = $instance['position'];
29
+ if (!in_array($position, self::$positions)) {
30
+ $position = self::$default_position;
31
+ }
32
+ echo '<!-- noptimize -->';
33
+ echo ecwid_get_scriptjs_code();
34
+ echo
35
+ <<<HTML
36
+ <div class="ecwid-float-icons position-$position" ondragstart="return false">
37
+ <div class="ecwid-cart-icon off">
38
+ <a href="#!/~/cart" data-count="0">
39
+ <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>
40
+ <div id="ecwid-cart"><script type="text/javascript"> xMinicart("style="); </script></div>
41
+ </a>
42
+ </div>
43
+ </div>
44
+ HTML;
45
+ echo '<!-- /noptimize -->';
46
+ }
47
+
48
+ public function update( $new_instance, $old_instance ) {
49
+ $instance = $old_instance;
50
+
51
+ $instance['position'] = in_array( $new_instance['position'], self::$positions )
52
+ ? $new_instance['position']
53
+ : self::$default_position;
54
+
55
+ return $instance;
56
+ }
57
+
58
+ public function form( $instance ) {
59
+ $instance = wp_parse_args( (array) $instance, array('position' => self::$default_position ) );
60
+
61
+ $position = $instance['position'];
62
+
63
+ echo '<p>' . __('Position', 'ecwid-shopping-cart') . ':</p>';
64
+ echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="bottomright"'
65
+ . ($position == 'bottomright' ? ' checked="checked"' : '') . '/>'
66
+ . __('Bottom right', 'ecwid-shopping-cart')
67
+ . '</label></p>';
68
+
69
+ echo '<p><label><input type="radio" name="' . $this->get_field_name('position') . '" value="topright"'
70
+ . ($position == 'topright' ? ' checked="checked"' : '') . '/>'
71
+ . __('Top right', 'ecwid-shopping-cart')
72
+ . '</label></p>';
73
+
74
+ }
75
+
76
+ }
includes/widgets/class-ecwid-widget-recently-viewed.php CHANGED
@@ -8,7 +8,10 @@ class Ecwid_Widget_Recently_Viewed extends WP_Widget {
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 = json_decode(stripslashes(@$_COOKIE['ecwid-shopping-cart-recently-viewed']));
 
 
 
12
 
13
  if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id() && !is_admin()) {
14
  setcookie('ecwid-shopping-cart-recently-viewed', null, strtotime('-1 day'));
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'));
js/admin.js CHANGED
@@ -1,4 +1,13 @@
1
- jQuery(document).ready(function() {
 
 
 
 
 
 
 
 
 
2
  jQuery('#hide-vote-message').click(function() {
3
  jQuery('#hide-vote-message').addClass('hiding');
4
  jQuery.getJSON(
@@ -58,7 +67,8 @@
58
  'ecwid-widget-minicart': 'shoppingCart',
59
  'ecwid-widget-minicart_miniview': 'miniShoppingCart',
60
  'ecwid-widget-vcategories': 'storeCategories',
61
- 'ecwid-widget-storelink': 'storePageLink'
 
62
  };
63
  }
64
 
@@ -111,7 +121,7 @@
111
  title: ecwid_l10n.orders,
112
  place: 'orders',
113
  km: 'Sales'
114
- },
115
  ];
116
 
117
  if (jQuery('#ecwid-frame').length > 0) {
@@ -125,12 +135,8 @@
125
  var ecwidMenu = jQuery(this).data('ecwid-menu');
126
  jQuery('.toplevel_page_ecwid *.current').removeClass('current');
127
  jQuery(this).addClass('current').closest('li').addClass('current');
128
- jQuery('#ecwid-frame')[0].contentWindow.postMessage(JSON.stringify({
129
- ecwidAppNs: "ecwid-wp-plugin",
130
- method: "openPage",
131
- data: ecwidMenu.place
132
- }), "*")
133
 
 
134
  ecwid_kissmetrics_record(ecwidMenu.km + ' Page Viewed');
135
 
136
  return false;
@@ -138,7 +144,17 @@
138
  }
139
  }
140
 
141
- jQuery('#wp-admin-bar-ecwid-main-default a').click(function() {
142
- ecwid_kissmetrics_record('Top Menu Clicked');
143
- });
 
 
 
 
 
 
 
 
 
 
144
  });
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(
67
  'ecwid-widget-minicart': 'shoppingCart',
68
  'ecwid-widget-minicart_miniview': 'miniShoppingCart',
69
  'ecwid-widget-vcategories': 'storeCategories',
70
+ 'ecwid-widget-storelink': 'storePageLink',
71
+ 'ecwid-widget-floatingshoppingcart': 'floatingShoppingCart'
72
  };
73
  }
74
 
121
  title: ecwid_l10n.orders,
122
  place: 'orders',
123
  km: 'Sales'
124
+ }
125
  ];
126
 
127
  if (jQuery('#ecwid-frame').length > 0) {
135
  var ecwidMenu = jQuery(this).data('ecwid-menu');
136
  jQuery('.toplevel_page_ecwid *.current').removeClass('current');
137
  jQuery(this).addClass('current').closest('li').addClass('current');
 
 
 
 
 
138
 
139
+ ecwidOpenAdminPage(ecwidMenu.place);
140
  ecwid_kissmetrics_record(ecwidMenu.km + ' Page Viewed');
141
 
142
  return false;
144
  }
145
  }
146
 
147
+ jQuery('#wp-admin-bar-ecwid-main-default a').click(function() {
148
+ ecwid_kissmetrics_record('Top Menu Clicked');
149
+ });
150
+
151
+ jQuery('#ecwid-get-mobile-app').click(function() {
152
+ ecwidOpenAdminPage('mobile');
153
+
154
+ return false;
155
+ });
156
+
157
+ if (document.location.hash == 'mobile') {
158
+ ecwidOpenAdminPage('mobile');
159
+ }
160
  });
js/chameleon.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ document.cookie = 'enable_chameleon=true';
2
+
3
+ window.ec = {
4
+ config: {
5
+ chameleon: ecwidChameleon
6
+ }
7
+ }
js/dashboard.js CHANGED
@@ -23,4 +23,33 @@ show_reconnect = function() {
23
  }
24
  ).appendTo('body');
25
 
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +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
+ }
js/nav-menu-frontend.js CHANGED
@@ -1,7 +1,8 @@
1
  jQuery(document).ready(function() {
2
 
3
- refreshEcwidMenuItemsSelection();
4
 
 
5
 
6
  Ecwid.OnPageLoaded.add(function(page) {
7
  if (page.type == 'CART') {
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') {
js/nav-menu.js CHANGED
@@ -108,4 +108,4 @@ jQuery(document).ready(function() {
108
  trackAddedMenuItems(e.srcElement);
109
  });
110
 
111
- });
108
  trackAddedMenuItems(e.srcElement);
109
  });
110
 
111
+ });
js/recently-viewed.js CHANGED
@@ -9,6 +9,8 @@ jQuery.widget('ecwid.recentlyViewedProducts', jQuery.ecwid.productsList, {
9
  _create: function() {
10
  this._superApply(arguments);
11
 
 
 
12
  var self = this;
13
  Ecwid.OnPageLoaded.add(
14
  function(page) {
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) {
js/store-editor-common.js CHANGED
@@ -1,4 +1,6 @@
1
  function ecwid_get_store_shortcode(content) {
 
 
2
  var found = false;
3
  var index = 0;
4
 
1
  function ecwid_get_store_shortcode(content) {
2
+
3
+ if (!wp.shortcode) return false;
4
  var found = false;
5
  var index = 0;
6
 
js/store-editor-page.js CHANGED
@@ -102,7 +102,7 @@ jQuery(document).ready(function() {
102
  checkEcwid = function() {
103
 
104
  var hasEcwid = false;
105
- if (tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
106
  content = tinyMCE.activeEditor.getBody();
107
 
108
  hasEcwid = jQuery(content).find('.ecwid-store-editor').length > 0;
@@ -115,7 +115,7 @@ jQuery(document).ready(function() {
115
  } else {
116
  jQuery('.wp-media-buttons').removeClass('has-ecwid');
117
  }
118
- if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
119
  var body = tinymce.activeEditor.dom.doc.body;
120
  var button = tinymce.activeEditor.dom.select('#ecwid-edit-store-button');
121
 
102
  checkEcwid = function() {
103
 
104
  var hasEcwid = false;
105
+ if (typeof tinyMCE != 'undefined' && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
106
  content = tinyMCE.activeEditor.getBody();
107
 
108
  hasEcwid = jQuery(content).find('.ecwid-store-editor').length > 0;
115
  } else {
116
  jQuery('.wp-media-buttons').removeClass('has-ecwid');
117
  }
118
+ if (typeof tinymce != 'undefined' && tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
119
  var body = tinymce.activeEditor.dom.doc.body;
120
  var button = tinymce.activeEditor.dom.select('#ecwid-edit-store-button');
121
 
js/themes/twentytwelve.js CHANGED
@@ -1,5 +1,7 @@
1
  jQuery(document).ready(function() {
2
- Ecwid.OnPageLoaded.add(function() {
 
 
3
  document.activeElement.blur();
4
  jQuery('.nav-menu,.nav-menu *.focus').removeClass('focus');
5
  });
1
  jQuery(document).ready(function() {
2
+ if (typeof Ecwid == 'undefined') return;
3
+
4
+ Ecwid.OnPageLoaded.add(function () {
5
  document.activeElement.blur();
6
  jQuery('.nav-menu,.nav-menu *.focus').removeClass('focus');
7
  });
languages/ecwid-shopping-cart-ru_RU.mo CHANGED
Binary file
languages/ecwid-shopping-cart-ru_RU.po CHANGED
@@ -556,7 +556,7 @@ msgstr "https://help.ecwid.com/customer/ru/portal/articles/1085017-wordpress-org
556
  msgid "Questions?"
557
  msgstr "Есть вопросы?"
558
 
559
- msgid "<a target=\"_blank\" href=\"https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable\">Read FAQ</a> or contact support at <a %s>wordpress@ecwid.com</a>"
560
  msgstr "Посетите <a target=\"_blank\" href=\"https://help.ecwid.com/customer/ru/portal/articles/1085017-wordpress-org\">Центр поддержки Эквида</a> или напишите нам на <a %s>wordpress@ecwid.com</a>"
561
 
562
  msgid "Want to connect another Ecwid store?"
@@ -579,3 +579,6 @@ msgstr "Новый виджет поиска лучше адаптируется
579
 
580
  msgid "Help"
581
  msgstr "Помощь"
 
 
 
556
  msgid "Questions?"
557
  msgstr "Есть вопросы?"
558
 
559
+ msgid "<a href=\"admin.php?page=ecwid-help\">Read FAQ</a> or contact support at <a %s>wordpress@ecwid.com</a>"
560
  msgstr "Посетите <a target=\"_blank\" href=\"https://help.ecwid.com/customer/ru/portal/articles/1085017-wordpress-org\">Центр поддержки Эквида</a> или напишите нам на <a %s>wordpress@ecwid.com</a>"
561
 
562
  msgid "Want to connect another Ecwid store?"
579
 
580
  msgid "Help"
581
  msgstr "Помощь"
582
+
583
+ msgid "Get Ecwid mobile app"
584
+ msgstr "Установить мобильное приложение"
lib/ecwid_api_v3.php CHANGED
@@ -14,7 +14,7 @@ class Ecwid_Api_V3
14
  public function __construct() {
15
 
16
  $this->store_id = EcwidPlatform::get_store_id();
17
- $this->_api_url = ' https://app.ecwid.com/api/v3/';
18
  $this->_stores_api_url = $this->_api_url . 'stores';
19
 
20
  $this->_categories_api_url = $this->_api_url . $this->store_id . '/categories';
14
  public function __construct() {
15
 
16
  $this->store_id = EcwidPlatform::get_store_id();
17
+ $this->_api_url = 'https://app.ecwid.com/api/v3/';
18
  $this->_stores_api_url = $this->_api_url . 'stores';
19
 
20
  $this->_categories_api_url = $this->_api_url . $this->store_id . '/categories';
lib/ecwid_platform.php CHANGED
@@ -69,23 +69,39 @@ class EcwidPlatform {
69
  return wp_parse_args($args, $defaults);
70
  }
71
 
72
- static public function fetch_url($url)
73
  {
 
 
 
 
 
 
 
 
 
 
74
  $use_file_get_contents = get_option('ecwid_fetch_url_use_file_get_contents', false);
75
 
76
- if ($use_file_get_contents == 'Y') {
77
- $result = @file_get_contents($url);
78
  } else {
79
  if (get_option('ecwid_http_use_stream', false)) {
80
  self::$http_use_streams = true;
81
  }
82
- $result = wp_remote_get( $url, array( 'timeout' => get_option( 'ecwid_remote_get_timeout', 5 ) ) );
 
 
 
 
 
 
83
 
84
  if (get_option('ecwid_http_use_stream', false)) {
85
  self::$http_use_streams = false;
86
  }
87
  if (!is_array($result)) {
88
- $result = @file_get_contents($url);
89
  if (!empty($result)) {
90
  update_option('ecwid_fetch_url_use_file_get_contents', true);
91
  }
@@ -116,7 +132,7 @@ class EcwidPlatform {
116
  'message' => $result->get_error_message()
117
  );
118
 
119
- $get_contents = file_get_contents($url);
120
  if ($get_contents !== false) {
121
  $return = array(
122
  'code' => 200,
@@ -127,6 +143,21 @@ class EcwidPlatform {
127
  }
128
 
129
  if ( empty($return['data']) || $return['code'] != 200 ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  update_option('ecwid_remote_get_fails', 1);
131
  }
132
 
69
  return wp_parse_args($args, $defaults);
70
  }
71
 
72
+ static public function fetch_url($url, $options = array())
73
  {
74
+ $default_timeout = 10;
75
+
76
+ $ctx = stream_context_create(
77
+ array(
78
+ 'http'=> array(
79
+ 'timeout' => $default_timeout
80
+ )
81
+ )
82
+ );
83
+
84
  $use_file_get_contents = get_option('ecwid_fetch_url_use_file_get_contents', false);
85
 
86
+ if ($use_file_get_contents) {
87
+ $result = @file_get_contents($url, null, $ctx);
88
  } else {
89
  if (get_option('ecwid_http_use_stream', false)) {
90
  self::$http_use_streams = true;
91
  }
92
+ $result = wp_remote_get( $url, array_merge(
93
+ $options,
94
+ array(
95
+ 'timeout' => get_option( 'ecwid_remote_get_timeout', $default_timeout )
96
+ )
97
+ )
98
+ );
99
 
100
  if (get_option('ecwid_http_use_stream', false)) {
101
  self::$http_use_streams = false;
102
  }
103
  if (!is_array($result)) {
104
+ $result = @file_get_contents($url, null, $ctx);
105
  if (!empty($result)) {
106
  update_option('ecwid_fetch_url_use_file_get_contents', true);
107
  }
132
  'message' => $result->get_error_message()
133
  );
134
 
135
+ $get_contents = @file_get_contents($url, null, $ctx);
136
  if ($get_contents !== false) {
137
  $return = array(
138
  'code' => 200,
143
  }
144
 
145
  if ( empty($return['data']) || $return['code'] != 200 ) {
146
+
147
+ /*
148
+ $log_url = 'http://' . APP_ECWID_COM . '/script.js?805056&data_platform=wporg&data_wporg_error=remote_get_fails';
149
+ $log_url .= '&url=' . urlencode(get_bloginfo('url'));
150
+ $log_url .= '&target_url=' . urlencode($url);
151
+ if (get_option('ecwid_http_use_stream', false)) {
152
+ $log_url .= '&method=stream';
153
+ } elseif (get_option('ecwid_fetch_url_use_file_get_contents')) {
154
+ $log_url .= '&method=filegetcontents';
155
+ }
156
+
157
+ $log_url .= '&code=' . $return['code'];
158
+ $log_url .= '&message=' . urlencode($return['message']);
159
+
160
+ EcwidPlatform::fetch_url($log_url); */
161
  update_option('ecwid_remote_get_fails', 1);
162
  }
163
 
readme.txt CHANGED
@@ -1,54 +1,54 @@
1
  === Ecwid Ecommerce Shopping Cart ===
2
  Contributors: ecwid
3
- Tags: ecommerce cart, ecommerce, downloadable products, e-commerce, Facebook ecommerce, online store, paypal ecommerce, product catalog, shop, shopping cart, store, woocommerce, wordpress ecommerce
4
  Requires at least: 3.5
5
  Tested up to: 4.5
6
- Stable tag: 4.2.1.3
7
 
8
  Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
9
 
10
  == Description ==
11
- Ecwid Ecommerce Shopping Cart is a powerful, secure and easy-to-use online store solution that gives you a full-functioned online store on your WordPress website. Join over *900,000* sellers in *175* countries and sell globally with over *40* international payment options, real-time shipping integrations and support of *45* languages.
12
 
13
  = PCI DSS validated Level 1 Service Provider =
14
 
15
- Ecwid Ecommerce Shopping Cart is PCI DSS Level 1 certified, which is the gold standard for e-commerce solutions worldwide. This means that when selling online with the Ecwid ecommerce plugin, you won’t have any problems with the bank you do business with. With 40+ payment options and secure HTTPS checkout, your Ecwid shopping cart is PCI DSS compliant from the beginning.
16
 
17
  = Free Ecommerce Support =
18
 
19
- Friendly and knowledgeable ecommerce support experts available 24/5 so you can get immediate help when you need it. Free email support and ecommerce community forums. Unlimited chat and phone support available in premium plans.
20
 
21
 
22
  = Merchant Mobile Apps =
23
 
24
- Ecwid Ecommerce Shopping Cart provides free mobile applications for iOS and Android to manage your ecommerce store and sell on the go. Scan products, track inventory, manage sales and accept payments using your mobile device as a POS station. Your ecommerce data is automatically synchronized with your Wordpress shopping cart, Facebook store and other online storefronts.
25
 
26
  = Unlimited Storage, Automatic Backups and Seamless Upgrades =
27
 
28
- With the Ecwid Ecommerce Shopping Cart, your online store data is fully hosted on our secure servers. Regardless of the WordPress hosting service you use, your Ecwid online store includes:
29
 
30
  * unlimited storage
31
  * regular backups
32
  * seamless upgrades and security updates
33
 
34
- So you don't need to worry about ecommerce software updates, security patches and server maintenance – we do that for you. Your online store gets all the new ecommerce features and bug fixes automatically.
35
 
36
  = Facebook Ecommerce =
37
 
38
- Add your online store to Facebook and sell to millions of Facebook users. No addons needed. Ecwid Ecommerce Shopping Cart will automatically synchronize your products, customers, orders and inventory between your WordPress and Facebook storefronts. Ecwid is the **#1 e-commerce app on Facebook**. Join!
39
 
40
  = Sell Everywhere =
41
 
42
- With the Ecwid Ecommerce Shopping Cart, you can include your online shop on multiple websites, blogs, social sites and ecommerce marketplaces like *Google Shopping* and *eBay* and sell simultaneously everywhere. Add your online store to as many sites as you want, manage it from one place.
43
 
44
  = Mobile Responsive Design =
45
 
46
- Ecwid Ecommerce Shopping Cart works great on any Wordpress site, especially those running on mobile-optimized themes. Your online store looks perfect on smartphones and automatically adapts to your customer’s screen size: laptops, tablets, smart TVs or smart watches. Check out this [demo](http://www.ecwid.com/demo?source=wporg-plugin-site)
47
 
48
 
49
  = Your Favorite Free Plugin =
50
 
51
- Ecwid Ecommerce Shopping Cart offers a free plan that’s always available with no hidden setup charges or transaction fees. Get your online store up and running at zero cost. As your online shop grows, Ecwid grows with you. When the time is right, consider upgrading to one of our premium plans to get more robust ecommerce features and preferred support. See also: [Ecwid plan and pricing](http://www.ecwid.com/pricing?source=wporg-plugin-site)
52
 
53
 
54
  = See Ecwid In Action =
@@ -77,14 +77,14 @@ Ecwid Ecommerce Shopping Cart offers a free plan that’s always available with
77
 
78
  **Uploading the plugin zip archive in Wordpress admin backend**
79
 
80
- 1. Download Ecwid Ecommerce plugin from this page (click *Download* button)
81
  1. In your Wordpress admin backend, navigate to *Plugins → Add new*
82
  1. Click *Upload* link and choose the saved zip file in the appeared dialog window.
83
  1. Click *Install*
84
 
85
  **Uploading plugin folder to Wordpress directory on your server**
86
 
87
- 1. Download Ecwid ecommerce plugin from this page (click *Download* button)
88
  1. Unpack the downloaded zip archive
89
  1. Upload ecwid-shopping-cart directory from the archive to the `/wp-content/plugins/` directory on your server
90
 
@@ -93,58 +93,66 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
93
 
94
  == Screenshots ==
95
 
96
- 1.
97
- 2.
98
- 3.
99
- 4.
100
- 5.
101
 
102
  == Frequently Asked Questions ==
103
 
104
- = How secure is this ecommerce plugin? Is my store PCI DSS compliant? =
105
 
106
  Ecwid is PCI DSS Level 1 certified shopping cart plugin – the gold standard for e-commerce solutions worldwide. This means you won’t have any banking compliance issues when selling online with Ecwid. [More details](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#secureplugin).
107
 
108
- = How much does Ecwid cost? =
109
 
110
- Ecwid shopping cart plans vary by number of products, types of ecommerce functionality, and level of support.
111
- * Free - Up to 10 products
112
- * Venture - $15/month
113
- * Business - $35/month
114
- * Unlimited - $99/month
115
- Pro Tip: you can save money by enrolling in our annual plans. For more information, check out our [pricing page](https://www.ecwid.com/pricing).
116
 
117
 
118
- = How can I manage my online shop from a mobile device? =
119
 
120
- Ecwid shopping cart provides mobile ecommerce applications for iOS and Android to manage your online store and sell on the go. Scan products, track inventory, manage sales and accept payments using your mobile device as a POS station. [More details on Ecwid ecommerce mobile apps](https://www.ecwid.com/ecwid-mobile).
121
 
122
- = How do I set up a storefront on Facebook with Ecwid shopping cart? =
123
 
124
- You can add your online shop to any web presence, including your Facebook business page. Ecwid e-commerce plugin will automatically synchronize products, customers, orders and inventory between your WordPress and Facebook storefronts. [More details](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#How%20to%20add%20my%20store%20to%20Facebook).
125
 
126
- = How can I add a shopping cart widget to my site sidebar? =
127
 
128
- You can add a product search box, shopping cart widget and other tools on the Appearance/Widgets page here in your site admin. [Read more about Ecwid ecommerce sidebar widgets](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#Sidebar%20widgets).
129
 
130
- = How do I add my store products to a sitemap? =
131
 
132
  To create a sitemap for your WordPress shop, we recommend using the fully compatible [Google XML Sitemaps](https://wordpress.org/plugins/google-sitemap-generator/) or [Yoast WordPress SEO](https://wordpress.org/plugins/wordpress-seo/) plugins. Generating a sitemap that contains links to store categories and product pages will help index your pages faster. Please note that the store sitemap option is only available to paid Ecwid users.
133
 
134
 
135
- = How do I add store categories to the site menu? =
136
 
137
  You can add the store categories menu to your site menu to help your customers easily navigate your online shop. 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.
138
 
139
- = How do I migrate my shop from Shopify or Woocommerce? =
140
 
141
- You can use Ecwid’s built-in ecommerce import tools to copy your store products from any other shopping cart to Ecwid. Find more details in the [Import-Export article in the Ecwid shopping cart help center]( https://help.ecwid.com/customer/portal/articles/1169671).
142
 
143
 
144
  * [Ecwid Help Center](http://help.ecwid.com/?source=wporg-plugin-site "Ecwid Help")
145
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
146
 
147
  == Changelog ==
 
 
 
 
 
 
 
 
148
  = 4.2.1.3 =
149
  - Fixes for the perfomance issues on some sites.
150
 
1
  === Ecwid Ecommerce Shopping Cart ===
2
  Contributors: ecwid
3
+ Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
4
  Requires at least: 3.5
5
  Tested up to: 4.5
6
+ Stable tag: 4.3
7
 
8
  Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
9
 
10
  == Description ==
11
+ Ecwid Ecommerce Shopping Cart is a powerful, secure and easy-to-use online store solution that gives you a full-functioned shop on your WordPress website. Join over *900,000* sellers in *175* countries and sell globally with over *40* international payment options, real-time shipping integrations and support of *45* languages.
12
 
13
  = PCI DSS validated Level 1 Service Provider =
14
 
15
+ Ecwid Shopping Cart is PCI DSS Level 1 certified, which is the gold standard for e-commerce solutions worldwide. This means that when selling online with the Ecwid plugin, you won’t have any problems with the bank you do business with. With 40+ payment options and secure HTTPS checkout, your Ecwid shopping cart is PCI DSS compliant from the beginning.
16
 
17
  = Free Ecommerce Support =
18
 
19
+ Friendly and knowledgeable support experts available 24/5 so you can get immediate help when you need it. Free email support and ecommerce community forums. Unlimited chat and phone support available in premium plans.
20
 
21
 
22
  = Merchant Mobile Apps =
23
 
24
+ Ecwid Shopping Cart 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. Your ecommerce data is automatically synchronized with your Wordpress shopping cart, Facebook store and other online storefronts.
25
 
26
  = Unlimited Storage, Automatic Backups and Seamless Upgrades =
27
 
28
+ With the Ecwid Shopping Cart, your online store data is fully hosted on our secure servers. Regardless of the WordPress hosting service you use, your Ecwid online store includes:
29
 
30
  * unlimited storage
31
  * regular backups
32
  * seamless upgrades and security updates
33
 
34
+ So you don't need to worry about software updates, security patches and server maintenance – we do that for you. Your online store gets all the new ecommerce features and bug fixes automatically.
35
 
36
  = Facebook Ecommerce =
37
 
38
+ Add your online store to Facebook and sell to millions of Facebook users. No addons needed. Ecwid will automatically synchronize your products, customers, orders and inventory between your WordPress and Facebook storefronts. Ecwid is the **#1 e-commerce app on Facebook**. Join!
39
 
40
  = Sell Everywhere =
41
 
42
+ With Ecwid, you can include your online shop on multiple websites, blogs, social sites and ecommerce marketplaces like *Google Shopping* and *eBay* and sell simultaneously everywhere. Add your online store to as many sites as you want, manage it from one place.
43
 
44
  = Mobile Responsive Design =
45
 
46
+ Ecwid works great on any Wordpress site, especially those running on mobile-optimized themes. Your online store looks perfect on smartphones and automatically adapts to your customer’s screen size: laptops, tablets, smart TVs or smart watches. Check out this [demo](http://www.ecwid.com/demo?source=wporg-plugin-site)
47
 
48
 
49
  = Your Favorite Free Plugin =
50
 
51
+ Ecwid offers a free plan that’s always available with no hidden setup charges or transaction fees. Get your online store up and running at zero cost. As your online shop grows, Ecwid grows with you. When the time is right, consider upgrading to one of our premium plans to get more robust features and preferred support. See also: [Ecwid plan and pricing](http://www.ecwid.com/pricing?source=wporg-plugin-site)
52
 
53
 
54
  = See Ecwid In Action =
77
 
78
  **Uploading the plugin zip archive in Wordpress admin backend**
79
 
80
+ 1. Download Ecwid plugin from this page (click *Download* button)
81
  1. In your Wordpress admin backend, navigate to *Plugins → Add new*
82
  1. Click *Upload* link and choose the saved zip file in the appeared dialog window.
83
  1. Click *Install*
84
 
85
  **Uploading plugin folder to Wordpress directory on your server**
86
 
87
+ 1. Download Ecwid plugin from this page (click *Download* button)
88
  1. Unpack the downloaded zip archive
89
  1. Upload ecwid-shopping-cart directory from the archive to the `/wp-content/plugins/` directory on your server
90
 
93
 
94
  == Screenshots ==
95
 
96
+ 1.
97
+ 2.
98
+ 3.
99
+ 4.
100
+ 5.
101
 
102
  == Frequently Asked Questions ==
103
 
104
+ = How secure is this plugin? Is my store PCI DSS compliant? =
105
 
106
  Ecwid is PCI DSS Level 1 certified shopping cart plugin – the gold standard for e-commerce solutions worldwide. This means you won’t have any banking compliance issues when selling online with Ecwid. [More details](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#secureplugin).
107
 
108
+ = How much does Ecwid cost? =
109
 
110
+ Ecwid shopping cart plans vary by number of products, types of ecommerce functionality, and level of support.
111
+ * Free - Up to 10 products
112
+ * Venture - $15/month
113
+ * Business - $35/month
114
+ * Unlimited - $99/month
115
+ Pro Tip: you can save money by enrolling in our annual plans. For more information, check out our [pricing page](https://www.ecwid.com/pricing).
116
 
117
 
118
+ = How can I manage my online shop from a mobile device? =
119
 
120
+ Ecwid shopping cart provides mobile applications for iOS and Android to manage your online store and sell on the go. Scan products, track inventory, manage sales and accept payments using your mobile device as a POS station. [More details on Ecwid mobile apps](https://www.ecwid.com/ecwid-mobile).
121
 
122
+ = How do I set up a storefront on Facebook with Ecwid shopping cart? =
123
 
124
+ You can add your online shop to any web presence, including your Facebook business page. Ecwid plugin will automatically synchronize products, customers, orders and inventory between your WordPress and Facebook storefronts. [More details](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#How%20to%20add%20my%20store%20to%20Facebook).
125
 
126
+ = How can I add a shopping cart widget to my site sidebar? =
127
 
128
+ You can add a product search box, shopping cart widget and other tools on the Appearance/Widgets page here in your site admin. [Read more about Ecwid sidebar widgets](https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable#Sidebar%20widgets).
129
 
130
+ = How do I add my store products to a sitemap? =
131
 
132
  To create a sitemap for your WordPress shop, we recommend using the fully compatible [Google XML Sitemaps](https://wordpress.org/plugins/google-sitemap-generator/) or [Yoast WordPress SEO](https://wordpress.org/plugins/wordpress-seo/) plugins. Generating a sitemap that contains links to store categories and product pages will help index your pages faster. Please note that the store sitemap option is only available to paid Ecwid users.
133
 
134
 
135
+ = How do I add store categories to the site menu? =
136
 
137
  You can add the store categories menu to your site menu to help your customers easily navigate your online shop. 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.
138
 
139
+ = How do I migrate my shop from Shopify or Woocommerce? =
140
 
141
+ You can use Ecwid’s built-in import tools to copy your store products from any other shopping cart to Ecwid. Find more details in the [Import-Export article in the Ecwid shopping cart help center]( https://help.ecwid.com/customer/portal/articles/1169671).
142
 
143
 
144
  * [Ecwid Help Center](http://help.ecwid.com/?source=wporg-plugin-site "Ecwid Help")
145
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
146
 
147
  == Changelog ==
148
+ = 4.3 =
149
+ - **New Minicart Widget.** We added a new floating minicart widget. You can enable it on the "Appearance -> Widgets" page in you Wordpress backend. The new search widget appears as soon as a customer adds something to the cart and resides at the top right or bottom right position on the screen so that the customer always sees it and can easily proceed to checkout. The minicart widget also contains a counter displaying the number of products in the cart. Feel free to add it to your site – it's free!
150
+ - **Look and feel improvements and minor layout fixes in the themes Zerif-lite, Storefront, Pixova-lite and Accesspress Mag.** Thanks to the Chameleon skin feature we released a few months ago, Ecwid looks good with every Wordpress theme. Now it became even better in these four popular themes.
151
+ - **Fixed a bug on the category pages in mobile view.** In some Wordpress themes, click on category icon returned an error and got customer back to the category listing page, when the store was opened from a mobile device. We fixed that and now there shouldn't be any troubles with viewing your shop on mobile devices.
152
+ - **Fixed a bug preventing Ecwid plugin working well with the Envira Galleries plugin.** Those of you using Envira Galleries on the site might notice it doesn't work properly on the pages containing Ecwid. We fixed that, you can now use the both plugins, they should work fine together.
153
+ - **Improved the plugin settings page footer.** It now includes a link to the mobile app page inside Ecwid Control Panel, which significantly simplified the Ecwid mobile apps installation.
154
+ - **Fixed a few more minor bugs on the plugin settings pages.** We're constantly improving the plugin settings pages to make store managements as convenient as possible. If you find any trouble working with your store in the plugin, please let us know.
155
+
156
  = 4.2.1.3 =
157
  - Fixes for the perfomance issues on some sites.
158
 
templates/admin-footer.php CHANGED
@@ -1,19 +1,16 @@
1
  <div class="ecwid-admin-footer">
2
  <div class="ecwid-admin-footer-block ecwid-app-badges-block">
3
  <h4 class="ecwid-admin-footer-title"><?php _e('Manage Store on iPhone, iPad or Android', 'ecwid-shopping-cart'); ?></h4>
4
- <div class="ecwid-app-badges">
5
- <a href="https://itunes.apple.com/en/app/ecwid/id626731456?mt=8"target="_blank" rel="nofollow">
6
- <?php ecwid_embed_svg('black-app-store'); ?>
7
- </a>
8
- <a href="https://play.google.com/store/apps/details?id=com.ecwid.android">
9
- <?php ecwid_embed_svg('black-google'); ?>
10
  </a>
11
  </div>
12
  </div>
13
  <div class="ecwid-admin-footer-block">
14
  <h4 class="ecwid-admin-footer-title"><?php _e('Questions?', 'ecwid-shopping-cart'); ?></h4>
15
  <div class="ecwid-admin-footer-text">
16
- <?php echo sprintf(__('<a target="_blank" href="https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable">Read FAQ</a> or contact support at <a %s>wordpress@ecwid.com</a>', 'ecwid-shopping-cart'), 'href="mailto:wordpress@ecwid.com"'); ?>
17
  </div>
18
  </div>
19
  <?php if (@$show_reconnect): ?>
1
  <div class="ecwid-admin-footer">
2
  <div class="ecwid-admin-footer-block ecwid-app-badges-block">
3
  <h4 class="ecwid-admin-footer-title"><?php _e('Manage Store on iPhone, iPad or Android', 'ecwid-shopping-cart'); ?></h4>
4
+ <div class="ecwid-admin-footer-text">
5
+ <a target="_blank" id="ecwid-get-mobile-app" href="admin.php?page=ecwid-admin-mobile">
6
+ <?php _e( 'Get Ecwid mobile app', 'ecwid-shopping-cart' ); ?>
 
 
 
7
  </a>
8
  </div>
9
  </div>
10
  <div class="ecwid-admin-footer-block">
11
  <h4 class="ecwid-admin-footer-title"><?php _e('Questions?', 'ecwid-shopping-cart'); ?></h4>
12
  <div class="ecwid-admin-footer-text">
13
+ <?php echo sprintf(__('<a href="admin.php?page=ecwid-help">Read FAQ</a> or contact support at <a %s>wordpress@ecwid.com</a>', 'ecwid-shopping-cart'), 'href="mailto:wordpress@ecwid.com"'); ?>
14
  </div>
15
  </div>
16
  <?php if (@$show_reconnect): ?>
templates/admin-timeout.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ecwid-admin-timeout">
2
+ <div class="box">
3
+ <div class="logo">
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70">
5
+ <path d="M34.5 67C16.58 67 2 52.42 2 34.5S16.58 2 34.5 2 67 16.58 67 34.5 52.42 67 34.5 67zm0-62C18.23 5 5 18.23 5 34.5S18.23 64 34.5 64 64 50.77 64 34.5 50.77 5 34.5 5z"></path>
6
+ <path d="M34.5 49c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM35.5 38.57h-2l-1-14c0-1.17.89-2.07 2-2.07s2 .9 2 2l-1 14.07z"></path>
7
+ </svg>
8
+ </div>
9
+ <h3 class="title"><?php _e("Sorry we're having technical difficulties.", 'ecwid-shopping-cart'); ?></h3>
10
+ <div class="text">
11
+ <?php _e('Our team is already working on this issue. Please refresh the page in a few minutes. If the issue persists, please contact <a target="_blank" href="https://help.ecwid.com/customer/portal/emails/new">our customer support team</a>.', 'ecwid-shopping-cart'); ?>
12
+ </div>
13
+ </div>
templates/connect.php CHANGED
@@ -17,14 +17,14 @@
17
  <input type="text" id="ecwid-store-id" placeholder="<?php _e('Enter your Store ID', 'ecwid-shopping-cart'); ?>" />
18
  </div>
19
  <div class="connect-button">
20
- <a href="admin-post.php?action=ecwid_connect" class="with-oauth"><?php _e( 'Connect Ecwid store', 'ecwid-shopping-cart' ); ?></a>
21
  <a id="ecwid-connect-no-oauth" href="admin-post.php?action=ecwid_connect" class="no-oauth" style="white-space: nowrap; width:auto"><?php _e( 'Save and connect', 'ecwid-shopping-cart' ); ?></a>
22
  </div>
23
 
24
  <?php if (!$connection_error): ?>
25
 
26
  <div class="note initial with-oauth">
27
- <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
28
  </div>
29
 
30
  <?php endif; ?>
@@ -36,7 +36,7 @@
36
 
37
  <div class="create-account-link">
38
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
39
- <?php _e( "Don't have Ecwid account? Create it here", 'ecwid-shopping-cart' ); ?>
40
  </a>
41
  </div>
42
  </div>
17
  <input type="text" id="ecwid-store-id" placeholder="<?php _e('Enter your Store ID', 'ecwid-shopping-cart'); ?>" />
18
  </div>
19
  <div class="connect-button">
20
+ <a href="admin-post.php?action=ecwid_connect" class="with-oauth"><?php _e( 'Connect', 'ecwid-shopping-cart' ); ?></a>
21
  <a id="ecwid-connect-no-oauth" href="admin-post.php?action=ecwid_connect" class="no-oauth" style="white-space: nowrap; width:auto"><?php _e( 'Save and connect', 'ecwid-shopping-cart' ); ?></a>
22
  </div>
23
 
24
  <?php if (!$connection_error): ?>
25
 
26
  <div class="note initial with-oauth">
27
+ <?php _e( 'To sell using Ecwid, you must allow WordPress to access the Ecwid plugin. The connect button will direct you to your Ecwid account where you can provide permission.', 'ecwid-shopping-cart' ); ?>
28
  </div>
29
 
30
  <?php endif; ?>
36
 
37
  <div class="create-account-link">
38
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
39
+ <?php _e( "Don't have an Ecwid account? Create one now.", 'ecwid-shopping-cart' ); ?>
40
  </a>
41
  </div>
42
  </div>
templates/ecwid-admin.php CHANGED
@@ -13,6 +13,7 @@
13
  },false);
14
 
15
  $('#ecwid-frame').attr('src', '<?php echo $iframe_src; ?>');
 
16
  });
17
  //]]>
18
 
13
  },false);
14
 
15
  $('#ecwid-frame').attr('src', '<?php echo $iframe_src; ?>');
16
+ ecwidSetPopupCentering('#ecwid-frame');
17
  });
18
  //]]>
19
 
templates/reconnect.php CHANGED
@@ -20,7 +20,7 @@
20
  <?php endif; ?>
21
 
22
  <div class="connect-button">
23
- <a href="admin-post.php?action=ecwid_connect&reconnect"><?php _e( 'Connect Ecwid store', 'ecwid-shopping-cart' ); ?></a>
24
  </div>
25
 
26
  <?php if ($connection_error && $ecwid_oauth->get_error() == 'cancelled'): ?>
@@ -43,7 +43,7 @@
43
  <?php else: ?>
44
 
45
  <div class="note">
46
- <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
47
  </div>
48
  <?php endif; ?>
49
  </div>
20
  <?php endif; ?>
21
 
22
  <div class="connect-button">
23
+ <a href="admin-post.php?action=ecwid_connect&reconnect"><?php _e( 'Connect', 'ecwid-shopping-cart' ); ?></a>
24
  </div>
25
 
26
  <?php if ($connection_error && $ecwid_oauth->get_error() == 'cancelled'): ?>
43
  <?php else: ?>
44
 
45
  <div class="note">
46
+ <?php _e( 'To sell using Ecwid, you must allow WordPress to access the Ecwid plugin. The connect button will direct you to your Ecwid account where you can provide permission.', 'ecwid-shopping-cart' ); ?>
47
  </div>
48
  <?php endif; ?>
49
  </div>