Ecwid Ecommerce Shopping Cart - Version 4.7.3

Version Description

  • Improvements for the new Ecwids single product widget. Now it's possible to use the "show_price_on_button=0" and show_border=0 parameters in the shortcode to disable the price on buy now button and widget border respectively. If you want to hide the widget border, for example, the resulting code will like this: [ecwid_product id="12345" version=2 show_border=0]. Do not forget to replace 12345 in this example with the actual product ID.

  • Fixed a bug with the floating shopping cart: the floating cart widget didn't appear on some rare Wordpress themes, we fixed that. Now it should work fine.

Download this release

Release Info

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

Code changes from version 4.7.2 to 4.7.3

css/floating-shopping-cart.css CHANGED
@@ -1,4 +1,4 @@
1
- html#ecwid_html body#ecwid_body .ecwid-float-icons {
2
  position: fixed;
3
  bottom: 50px;
4
  right: -8px;
@@ -7,69 +7,71 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons {
7
  box-sizing: content-box;
8
  }
9
 
10
- html#ecwid_html body#ecwid_body .ecwid-float-icons {
11
  left: auto;
12
  right: 0px;
13
  padding-right: 25px;
14
  }
15
 
16
- html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
17
  bottom: auto;
18
  top: 25px;
19
  }
20
 
21
- html#ecwid_html body#ecwid_body .ecwid-float-icons.position-bottomright {
22
  top: auto;
23
  bottom: 25px;
24
  }
25
 
26
  @media (max-width: 600px) {
27
- html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
28
  right: -8px;
29
  }
30
 
31
- html#ecwid_html body#ecwid_body .ecwid-float-icons {
32
  padding-left: 25px;
33
  }
34
 
35
  }
36
 
37
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div {
38
  height: 48px;
 
 
39
  padding-top: 20px;
40
  -webkit-transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
41
  transition: height .15s ease-in-out 0s, padding .15s ease-in-out 0s;
42
  box-sizing: content-box;
43
  }
44
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off {
45
  height: 0;
46
  padding-top: 0;
47
  -webkit-transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
48
  transition: height .15s ease-in-out .3s, padding .15s ease-in-out .3s;
49
  }
50
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off a {
51
  -webkit-transform: translate3D(80px, 0, 0);
52
  transform: translate3D(80px, 0, 0);
53
  -webkit-transition: -webkit-transform .3s ease-in-out .1s;
54
  transition: transform .3s ease-in-out .1s;
55
  }
56
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.off a svg {
57
  -webkit-transform: rotate(270deg);
58
  transform: rotate(270deg);
59
  -webkit-transition: -webkit-transform .3s ease-in-out .1s;
60
  transition: transform .3s ease-in-out .1s;
61
  }
62
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.search-icon a svg {
63
  width: 24px;
64
  height: 24px;
65
  margin: 11px 0 0 11px;
66
  }
67
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon.off a::after {
68
  opacity: 0;
69
  -webkit-transition: opacity .2s ease-in-out 0s;
70
  transition: opacity .2s ease-in-out 0s;
71
  }
72
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon a::after {
73
  display: block;
74
  min-width: 24px;
75
  height: 24px;
@@ -91,28 +93,28 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon a::afte
91
  transition: opacity .15s ease-in-out .2s;
92
  }
93
  @media (min-width: 600px) {
94
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon a::after {
95
  right: -8px;
96
  }
97
  }
98
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid {
99
  position: relative;
100
  top: -100%;
101
  left: 0;
102
  width: 100%;
103
  height: 100%;
104
  }
105
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart {
106
  background-color: transparent !important;
107
  width: 100% !important;
108
  height: 100% !important;
109
  border: 0 none !important;
110
  opacity: 0 !important;
111
  }
112
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div.ecwid-cart-icon .ecwid .ecwid-minicart * {
113
  display: none;
114
  }
115
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a {
116
  display: block;
117
  width: 46px;
118
  height: 46px;
@@ -127,25 +129,25 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a {
127
  transition: transform .3s ease-in-out 0s, border-color .1s ease-in-out 0s;
128
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
129
  }
130
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover {
131
  border-color: #34797c;
132
  }
133
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover svg path[stroke] {
134
  stroke: #34797c;
135
  }
136
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:hover svg path[fill] {
137
  fill: #34797c;
138
  }
139
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active {
140
  border-color: #6dbec2;
141
  }
142
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active svg path[stroke] {
143
  stroke: #6dbec2;
144
  }
145
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a:active svg path[fill] {
146
  fill: #6dbec2;
147
  }
148
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg {
149
  width: 20px;
150
  height: 26px;
151
  margin: 9px 12px;
@@ -155,14 +157,14 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg {
155
  -webkit-transition: -webkit-transform .3s ease-in-out 0s;
156
  transition: transform .3s ease-in-out 0s;
157
  }
158
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path {
159
  -webkit-transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
160
  transition: fill .1s ease-in-out 0s, stroke .1s ease-in-out 0s;
161
  }
162
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[stroke] {
163
  stroke: #439CA0;
164
  }
165
- html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[fill] {
166
  fill: #439CA0;
167
  }
168
 
1
+ body.ecwid-floating-shopping-cart .ecwid-float-icons {
2
  position: fixed;
3
  bottom: 50px;
4
  right: -8px;
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;
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;
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;
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
 
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.7.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -62,7 +62,6 @@ if ( is_admin() ){
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('admin_head', 'ecwid_send_stats');
66
  add_action('save_post', 'ecwid_save_post');
67
  add_action('init', 'ecwid_apply_theme', 0);
68
  add_action('get_footer', 'ecwid_admin_get_footer');
@@ -92,7 +91,7 @@ if ( is_admin() ){
92
  add_action('wp_head', 'ecwid_meta');
93
  add_action('wp_head', 'ecwid_canonical');
94
  add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
95
- add_action('wp_head', 'ecwid_send_stats');
96
  add_action('wp_head', 'ecwid_product_browser_url_in_head');
97
  add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
98
  add_filter('the_content', 'ecwid_content_started', 0);
@@ -115,7 +114,6 @@ require_once ECWID_PLUGIN_DIR . 'includes/shortcodes.php';
115
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-message-manager.php';
116
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-store-editor.php';
117
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-oauth.php';
118
- require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-kissmetrics.php';
119
 
120
  if (is_admin()) {
121
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-help-page.php';
@@ -277,10 +275,6 @@ function ecwid_enqueue_frontend() {
277
 
278
  wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
279
 
280
- if ((bool)get_option('ecwid_use_chameleon')) {
281
- ecwid_enqueue_builtin_chameleon();
282
- }
283
-
284
  if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
285
  wp_enqueue_script('ecwid-recently-viewed', ECWID_PLUGIN_URL . 'js/recently-viewed-common.js', array('jquery', 'utils'), get_option('ecwid_plugin_version'), true);
286
 
@@ -299,8 +293,10 @@ function ecwid_enqueue_frontend() {
299
  }
300
  }
301
 
302
- function ecwid_enqueue_builtin_chameleon() {
303
- wp_enqueue_script('ecwid-chameleon-js', ECWID_PLUGIN_URL . '/js/chameleon.js', array(), get_option('ecwid_plugin_version'), true);
 
 
304
 
305
  $colors = array();
306
 
@@ -314,10 +310,22 @@ function ecwid_enqueue_builtin_chameleon() {
314
  if (empty($colors)) {
315
  $colors = 'auto';
316
  }
317
- wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', array(
 
318
  'colors' => $colors,
319
  'font' => 'auto'
320
  ));
 
 
 
 
 
 
 
 
 
 
 
321
  }
322
 
323
  function ecwid_load_textdomain() {
@@ -1174,9 +1182,6 @@ EOT;
1174
 
1175
 
1176
  function ecwid_productbrowser_shortcode($shortcode_params) {
1177
- if (current_user_can('manage_options')) {
1178
- Ecwid_Kissmetrics::record('storefrontIsOpened');
1179
- }
1180
 
1181
  $atts = shortcode_atts(
1182
  array(
@@ -1282,7 +1287,9 @@ function ecwid_product_shortcode($shortcode_attributes) {
1282
  'id' => null,
1283
  'display' => 'picture title price options addtobag',
1284
  'link' => 'yes',
1285
- 'version' => '1'
 
 
1286
  ),
1287
  $shortcode_attributes
1288
  );
@@ -1357,12 +1364,23 @@ function _ecwid_get_single_product_widget_parts_v1($attributes) {
1357
  }
1358
 
1359
  function _ecwid_get_single_product_widget_parts_v2($attributes) {
 
 
 
 
 
 
 
 
 
 
 
1360
  return array(
1361
  'display_items' => array(
1362
  'picture' => '<div itemprop="picture"></div>',
1363
  'title' => '<div class="ecwid-title" itemprop="title"></div>',
1364
  'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1365
- . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price" data-spw-price-location="button">'
1366
  . '<div itemprop="priceCurrency"></div>'
1367
  . '</div>'
1368
  . '</div>',
@@ -1370,7 +1388,7 @@ function _ecwid_get_single_product_widget_parts_v2($attributes) {
1370
  'qty' => '<div customprop="qty"></div>',
1371
  'addtobag' => '<div customprop="addtobag"></div>'
1372
  ),
1373
- 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct-v2 ecwid-SingleProduct-v2-bordered ecwid-Product ecwid-Product-%d"'
1374
  . 'itemscope itemtype="http://schema.org/Product" data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1375
  'widget_call' => '<script data-cfasync="false" type="text/javascript">xProduct()</script>'
1376
  );
@@ -1503,9 +1521,6 @@ function ecwid_ajax_get_product_info() {
1503
 
1504
  function ecwid_store_activate() {
1505
 
1506
- if (get_option('ecwid_store_id', null) === null) {
1507
- Ecwid_Kissmetrics::record('firstactivated');
1508
- }
1509
  $my_post = array();
1510
  $defaults = ecwid_get_default_pb_size();
1511
  $content = <<<EOT
@@ -1593,8 +1608,6 @@ EOT;
1593
  Ecwid_Nav_Menus::add_menu_on_activate();
1594
 
1595
  Ecwid_Message_Manager::enable_message('on_activate');
1596
- Ecwid_Kissmetrics::record('wpPluginActivated');
1597
-
1598
  }
1599
 
1600
  add_action('in_admin_header', 'ecwid_disable_other_notices');
@@ -1643,7 +1656,6 @@ function ecwid_store_deactivate() {
1643
  }
1644
 
1645
  Ecwid_Message_Manager::reset_hidden_messages();
1646
- Ecwid_Kissmetrics::record('wpPluginDeactivated');
1647
  }
1648
 
1649
  function ecwid_uninstall() {
@@ -1670,8 +1682,6 @@ function ecwid_uninstall() {
1670
 
1671
  delete_option("ecwid_plugin_version");
1672
  delete_option("ecwid_use_chameleon");
1673
-
1674
- Ecwid_Kissmetrics::record('wpPluginUninstalled');
1675
  }
1676
 
1677
  function ecwid_is_old_search_widget_used()
@@ -1947,12 +1957,6 @@ function ecwid_settings_api_init() {
1947
  break;
1948
  }
1949
 
1950
- if (get_option('ecwid_use_chameleon') && !@$_POST['ecwid_use_chameleon']) {
1951
- Ecwid_Kissmetrics::record('chameleonSkinOff');
1952
- } else if (!get_option('ecwid_use_chameleon') && @$_POST['ecwid_use_chameleon']) {
1953
- Ecwid_Kissmetrics::record('chameleonSkinOn');
1954
- }
1955
-
1956
  if ($_POST['settings_section'] == 'advanced' && !@$_POST['ecwid_is_sso_enabled']) {
1957
  update_option('ecwid_sso_secret_key', '');
1958
  }
@@ -2023,22 +2027,12 @@ function ecwid_create_store() {
2023
  $api->save_token($data->token);
2024
  update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
2025
 
2026
- Ecwid_Kissmetrics::record('Signed Up');
2027
- Ecwid_Kissmetrics::set( 'plan_id', 'WPORG_SKINNY_FREE-1' );
2028
- Ecwid_Kissmetrics::set( 'plan_period', '1' );
2029
- Ecwid_Kissmetrics::set( 'plan_name', 'WPORG_SKINNY_FREE' );
2030
- Ecwid_Kissmetrics::set( 'is_paid', 'false' );
2031
- Ecwid_Kissmetrics::set( 'channelid', 'wporg' );
2032
- Ecwid_Kissmetrics::set( 'registered_via_api', 'true' );
2033
- Ecwid_Kissmetrics::record('accountConnected');
2034
-
2035
  header( 'HTTP/1.1 200 OK' );
2036
 
2037
  } else {
2038
 
2039
 
2040
  header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
2041
- Ecwid_Kissmetrics::record( 'Create Store Failed' );
2042
  }
2043
  }
2044
 
@@ -2067,8 +2061,6 @@ function ecwid_general_settings_do_page() {
2067
  if ( ecwid_use_old_landing() ) {
2068
  require_once( ECWID_PLUGIN_DIR . '/templates/landing_old.php' );
2069
  } else if ($api->does_store_exist($current_user->user_email)) {
2070
- Ecwid_Kissmetrics::set( 'existing account on install', true );
2071
- Ecwid_Kissmetrics::record( 'account is found connect page viewed' );
2072
  require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
2073
  } else {
2074
  require_once( ECWID_PLUGIN_DIR . '/templates/landing.php' );
@@ -2500,147 +2492,6 @@ function ecwid_get_product_browser_url_script()
2500
 
2501
  }
2502
 
2503
- function ecwid_send_stats()
2504
- {
2505
- $storeid = get_ecwid_store_id();
2506
-
2507
- if ($storeid == ECWID_DEMO_STORE_ID) {
2508
- $storeid = 805056;
2509
- }
2510
-
2511
- $last_stats_sent = get_option('ecwid_stats_sent_date');
2512
- if (!$last_stats_sent) {
2513
- add_option('ecwid_stats_sent_date', time());
2514
- } else if ($last_stats_sent + 24*60*60 > time()) {
2515
- return;
2516
- }
2517
-
2518
- $stats = ecwid_gather_stats();
2519
-
2520
- $url = 'http://' . APP_ECWID_COM . '/script.js?' . $storeid . '&data_platform=wporg';
2521
-
2522
-
2523
- foreach ($stats as $name => $value) {
2524
- $url .= '&data_wporg_' . $name . '=' . urlencode($value);
2525
- }
2526
-
2527
- $link = '';
2528
- if (ecwid_is_store_page_available()) {
2529
- $link = ecwid_get_store_page_url();
2530
- } else {
2531
- $link = get_bloginfo('url');
2532
- }
2533
-
2534
- wp_remote_get($url, array('headers' => array('Referer' => $link)));
2535
-
2536
- update_option('ecwid_stats_sent_date', time());
2537
- }
2538
-
2539
- function ecwid_gather_stats()
2540
- {
2541
- $usage_version = 1;
2542
-
2543
- $stats = array();
2544
-
2545
- $stats['version'] = get_bloginfo('version');
2546
- $stats['theme'] = ecwid_get_theme_identification();
2547
-
2548
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
2549
-
2550
- $vector_contents = array(
2551
- 'paid',
2552
- 'display_search',
2553
- 'horizontal_categories_enabled',
2554
- 'minicart_enabled',
2555
- 'search_widget',
2556
- 'vcategories_widget',
2557
- 'minicart_normal_widget',
2558
- 'minicart_mini_widget',
2559
- 'badge_widget',
2560
- 'sso_enabled',
2561
- 'default_category',
2562
- 'google_xml_sitemaps_used',
2563
- 'ecwid_product_advisor_used',
2564
- 'ecwid_single_product_used',
2565
- 'ecwid_store_shortcode_used',
2566
- 'store_link_widget',
2567
- 'recently_viewed_widget',
2568
- 'avalanche_used',
2569
- 'chameleon_used',
2570
- 'http_post_fails',
2571
- 'ecwid_use_new_horizontal_categories',
2572
- 'is_wp_newbie',
2573
- 'ecwid_remote_get_fails',
2574
- 'has_woocommerce',
2575
- 'store_root_cats_widget'
2576
- );
2577
-
2578
- $usage_stats = ecwid_gather_usage_stats();
2579
- $stats['usage'] = '';
2580
-
2581
- $usage = '';
2582
- foreach ($vector_contents as $index => $item) {
2583
- $usage[$index] = is_string($usage_stats[$item]) ? $usage_stats[$item] : (int)$usage_stats[$item];
2584
- }
2585
- $stats['usage'] = $usage_version . '_' . implode('', $usage);
2586
-
2587
- $stats['wp_install_date'] = $usage_stats['wp_install_date'];
2588
- $stats['plugin_install_date'] = $usage_stats['wp_install_date'];
2589
-
2590
- $checked = get_option('ecwid_checked_for_remote_connection_errors', null);
2591
- if (is_null($checked) || $usage_stats['ecwid_remote_get_fails'] || $usage_stats['http_post_fails']) {
2592
- $results = ecwid_check_for_remote_connection_errors();
2593
- if (!empty($results)) {
2594
- $stats = array_merge($stats, $results);
2595
- }
2596
- update_option('ecwid_checked_for_remote_connection_errors', empty($results));
2597
- }
2598
-
2599
- return $stats;
2600
- }
2601
-
2602
- function ecwid_gather_usage_stats()
2603
- {
2604
- $usage_stats = array();
2605
- $usage_stats['paid'] = ecwid_is_paid_account();
2606
- $usage_stats['display_search'] = (bool) get_option('ecwid_show_search_box');
2607
- $usage_stats['horizontal_categories_enabled'] = (bool) get_option('ecwid_show_categories');
2608
- $usage_stats['minicart_enabled'] = (bool) get_option('ecwid_enable_minicart');
2609
- $usage_stats['search_widget'] = (bool) is_active_widget(false, false, 'ecwidsearch');
2610
- $usage_stats['vcategories_widget'] = (bool) is_active_widget(false, false, 'ecwidvcategories');
2611
- $usage_stats['minicart_normal_widget'] = (bool) is_active_widget(false, false, 'ecwidminicart');
2612
- $usage_stats['minicart_mini_widget'] = (bool) is_active_widget(false, false, 'ecwidminicart_miniview');
2613
- $usage_stats['badge_widget'] = (bool) is_active_widget(false, false, 'ecwidbadge');
2614
- $usage_stats['sso_enabled'] = (bool) get_option('ecwid_sso_secret_key');
2615
- $usage_stats['default_category'] = (bool) get_option('ecwid_default_category_id');
2616
- $usage_stats['google_xml_sitemaps_used'] = (bool) is_plugin_active('google-sitemap-generator/sitemap.php');
2617
- $usage_stats['ecwid_product_advisor_used'] = (bool) is_plugin_active('ecwid-useful-tools/ecwid-product-advisor.php');
2618
- $usage_stats['ecwid_single_product_used'] = (bool) (get_option('ecwid_single_product_used') + 60*60*24*14 > time());
2619
- $usage_stats['ecwid_store_shortcode_used'] = (bool) (get_option('ecwid_store_shortcode_used') + 60*60*24*14 > time());
2620
- $usage_stats['store_link_widget'] = (bool) is_active_widget(false, false, 'ecwidstorelink');
2621
- $usage_stats['recently_viewed_widget'] = (bool) is_active_widget(false, false, 'ecwidrecentlyviewed');
2622
- $usage_stats['avalanche_used'] = (bool) is_plugin_active('ecwid-widgets-avalanche/ecwid_widgets_avalanche.php');
2623
- $usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
2624
- $usage_stats['http_post_fails'] = get_option('ecwid_last_oauth_fail_time') > 0;
2625
- $usage_stats['ecwid_use_new_horizontal_categories'] = (bool) get_option('ecwid_use_new_horizontal_categories');
2626
-
2627
- $wp_date = ecwid_get_wp_install_date();
2628
-
2629
- $ecwid_date = get_option('ecwid_installation_date');
2630
-
2631
- $usage_stats['wp_install_date'] = $wp_date;
2632
- $usage_stats['plugin_install_date'] = $ecwid_date;
2633
-
2634
- $usage_stats['is_wp_newbie'] = (bool) (($ecwid_date - $wp_date) / 60 / 60 / 24 <= 30);
2635
-
2636
- $usage_stats['ecwid_remote_get_fails'] = (bool) get_option('ecwid_remote_get_fails');
2637
-
2638
- $usage_stats['has_woocommerce'] = ecwid_get_woocommerce_status();
2639
- $usage_stats['store_root_cats_widget'] = (bool) is_active_widget(false, false, 'ecwidvcategorieslist');
2640
-
2641
- return $usage_stats;
2642
- }
2643
-
2644
  function ecwid_get_wp_install_date( ) {
2645
  global $wpdb;
2646
 
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.3
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
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');
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);
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';
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
 
293
  }
294
  }
295
 
296
+ function ecwid_add_chameleon() {
297
+ if (!get_option('ecwid_use_chameleon')) {
298
+ return;
299
+ }
300
 
301
  $colors = array();
302
 
310
  if (empty($colors)) {
311
  $colors = 'auto';
312
  }
313
+
314
+ $chameleon = json_encode(array(
315
  'colors' => $colors,
316
  'font' => 'auto'
317
  ));
318
+
319
+ echo <<<HTML
320
+ <script type="text/javascript">
321
+ window.ec = {
322
+ config: {
323
+ chameleon: $chameleon
324
+ }
325
+ }
326
+ </script>
327
+ HTML;
328
+
329
  }
330
 
331
  function ecwid_load_textdomain() {
1182
 
1183
 
1184
  function ecwid_productbrowser_shortcode($shortcode_params) {
 
 
 
1185
 
1186
  $atts = shortcode_atts(
1187
  array(
1287
  'id' => null,
1288
  'display' => 'picture title price options addtobag',
1289
  'link' => 'yes',
1290
+ 'version' => '1',
1291
+ 'show_border' => '1',
1292
+ 'show_price_on_button' => '1'
1293
  ),
1294
  $shortcode_attributes
1295
  );
1364
  }
1365
 
1366
  function _ecwid_get_single_product_widget_parts_v2($attributes) {
1367
+
1368
+ $price_location_attributes = ' data-spw-price-location="button"';
1369
+ $bordered_class = ' ecwid-SingleProduct-v2-bordered';
1370
+ if ($attributes['show_border'] == 0) {
1371
+ $bordered_class = '';
1372
+ }
1373
+
1374
+ if ($attributes['show_price_on_button'] == 0) {
1375
+ $price_location_attributes = '';
1376
+ }
1377
+
1378
  return array(
1379
  'display_items' => array(
1380
  'picture' => '<div itemprop="picture"></div>',
1381
  'title' => '<div class="ecwid-title" itemprop="title"></div>',
1382
  'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1383
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"' . $price_location_attributes . '>'
1384
  . '<div itemprop="priceCurrency"></div>'
1385
  . '</div>'
1386
  . '</div>',
1388
  'qty' => '<div customprop="qty"></div>',
1389
  'addtobag' => '<div customprop="addtobag"></div>'
1390
  ),
1391
+ 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct-v2' . $bordered_class . ' ecwid-Product ecwid-Product-%d"'
1392
  . 'itemscope itemtype="http://schema.org/Product" data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1393
  'widget_call' => '<script data-cfasync="false" type="text/javascript">xProduct()</script>'
1394
  );
1521
 
1522
  function ecwid_store_activate() {
1523
 
 
 
 
1524
  $my_post = array();
1525
  $defaults = ecwid_get_default_pb_size();
1526
  $content = <<<EOT
1608
  Ecwid_Nav_Menus::add_menu_on_activate();
1609
 
1610
  Ecwid_Message_Manager::enable_message('on_activate');
 
 
1611
  }
1612
 
1613
  add_action('in_admin_header', 'ecwid_disable_other_notices');
1656
  }
1657
 
1658
  Ecwid_Message_Manager::reset_hidden_messages();
 
1659
  }
1660
 
1661
  function ecwid_uninstall() {
1682
 
1683
  delete_option("ecwid_plugin_version");
1684
  delete_option("ecwid_use_chameleon");
 
 
1685
  }
1686
 
1687
  function ecwid_is_old_search_widget_used()
1957
  break;
1958
  }
1959
 
 
 
 
 
 
 
1960
  if ($_POST['settings_section'] == 'advanced' && !@$_POST['ecwid_is_sso_enabled']) {
1961
  update_option('ecwid_sso_secret_key', '');
1962
  }
2027
  $api->save_token($data->token);
2028
  update_option('ecwid_oauth_scope', 'read_profile read_catalog allow_sso');
2029
 
 
 
 
 
 
 
 
 
 
2030
  header( 'HTTP/1.1 200 OK' );
2031
 
2032
  } else {
2033
 
2034
 
2035
  header( 'HTTP/1.1 ' . $result['response']['code'] . ' ' . $result['response']['message'] );
 
2036
  }
2037
  }
2038
 
2061
  if ( ecwid_use_old_landing() ) {
2062
  require_once( ECWID_PLUGIN_DIR . '/templates/landing_old.php' );
2063
  } else if ($api->does_store_exist($current_user->user_email)) {
 
 
2064
  require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
2065
  } else {
2066
  require_once( ECWID_PLUGIN_DIR . '/templates/landing.php' );
2492
 
2493
  }
2494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2495
  function ecwid_get_wp_install_date( ) {
2496
  global $wpdb;
2497
 
includes/class-ecwid-nav-menus.php CHANGED
@@ -263,35 +263,35 @@ class Ecwid_Nav_Menus {
263
  'classes' => 'ecwid-cart',
264
  'url' => 'cart',
265
  'label' => __('Shopping Cart', 'ecwid-shopping-cart'),
266
- 'km' => '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
- 'km' => '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
- 'km' => '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
- 'km' => '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
- 'km' => 'store-with-categories'
295
  )
296
  );
297
 
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
 
includes/class-ecwid-oauth.php CHANGED
@@ -119,7 +119,6 @@ class Ecwid_OAuth {
119
  return $this->trigger_auth_error($reconnect ? 'reconnect' : 'default');
120
  }
121
 
122
- Ecwid_Kissmetrics::record( $reconnect ? 'accountReconnected' : 'accountConnected' );
123
  update_option( 'ecwid_store_id', $result->store_id );
124
  update_option( 'ecwid_oauth_scope', $result->scope );
125
  update_option( 'ecwid_api_check_time', 0 );
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 );
includes/shortcodes/class-ecwid-shortcode-productbrowser.php CHANGED
@@ -21,10 +21,6 @@ class Ecwid_Shortcode_ProductBrowser extends Ecwid_Shortcode_Base {
21
  }
22
 
23
  public function render() {
24
- if (current_user_can('manage_options')) {
25
- Ecwid_Kissmetrics::record('storefrontIsOpened');
26
- }
27
-
28
  return parent::render();
29
  }
30
 
21
  }
22
 
23
  public function render() {
 
 
 
 
24
  return parent::render();
25
  }
26
 
includes/widgets/class-ecwid-widget-floating-shopping-cart.php CHANGED
@@ -13,7 +13,14 @@ class Ecwid_Widget_Floating_Shopping_Cart extends WP_Widget {
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() {
@@ -23,6 +30,12 @@ class Ecwid_Widget_Floating_Shopping_Cart extends WP_Widget {
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'];
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() {
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'];
js/admin.js CHANGED
@@ -45,7 +45,6 @@ jQuery(document).ready(function() {
45
  jQuery(el).prependTo(jQuery('#widget-list'));
46
  }
47
  jQuery('.widget-top', el).addClass('ecwid-widget-highlighted');
48
- ecwid_kissmetrics_record('Ecwid-widgets Page Viewed');
49
  }
50
 
51
  var classname = el.id.match(/ecwid(.*)-__i__/);
@@ -73,14 +72,6 @@ jQuery(document).ready(function() {
73
  };
74
  }
75
 
76
- for (var i in this.widgets) {
77
- if (widgetElement.find('.' + i).length > 0) {
78
- ecwid_kissmetrics_record('sb-widget ' + this.widgets[i] + 'Added');
79
- ecwid_kissmetrics_record('sb-widget-added');
80
- break;
81
- }
82
- }
83
-
84
  jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
85
  prepareVerticalCategoriesWidget(el);
86
  });
@@ -117,20 +108,17 @@ jQuery(document).ready(function() {
117
  {
118
  url: ecwid_l10n.dashboard_url,
119
  title: ecwid_l10n.dashboard,
120
- place: 'dashboard',
121
- km: 'Dashboard'
122
  },
123
  {
124
  url: ecwid_l10n.products_url,
125
  title: ecwid_l10n.products,
126
- place: 'products',
127
- km: 'Products'
128
  },
129
  {
130
  url: ecwid_l10n.orders_url,
131
  title: ecwid_l10n.orders,
132
- place: 'orders',
133
- km: 'Sales'
134
  }
135
  ];
136
 
@@ -147,17 +135,12 @@ jQuery(document).ready(function() {
147
  jQuery(this).addClass('current').closest('li').addClass('current');
148
 
149
  ecwidOpenAdminPage(ecwidMenu.place);
150
- ecwid_kissmetrics_record(ecwidMenu.km + ' Page Viewed');
151
 
152
  return false;
153
  });
154
  }
155
  }
156
 
157
- jQuery('#wp-admin-bar-ecwid-main-default a').click(function() {
158
- ecwid_kissmetrics_record('Top Menu Clicked');
159
- });
160
-
161
  jQuery('#ecwid-get-mobile-app').click(function() {
162
  ecwidOpenAdminPage('mobile');
163
 
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__/);
72
  };
73
  }
74
 
 
 
 
 
 
 
 
 
75
  jQuery('input[value=ecwidvcategorieslist]').closest('.widget').each(function(idx, el) {
76
  prepareVerticalCategoriesWidget(el);
77
  });
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
 
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
 
js/landing.js CHANGED
@@ -16,8 +16,6 @@ jQuery(document).ready(function(){
16
 
17
  jQuery('.create-store-button').click(function() {
18
 
19
- ecwid_kissmetrics_record('createAccountButtonClick');
20
-
21
  var $context = jQuery(this).closest('.ecwid-button');
22
  jQuery(hide_on_loading + ', ' + invisible_on_loading, $context).fadeTo(150, .01).promise().done(function() {
23
  jQuery(hide_on_loading, $context).hide();
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();
js/nav-menu.js CHANGED
@@ -2,7 +2,7 @@ jQuery(document).ready(function() {
2
 
3
  var ecwidClasses = {};
4
  for (var i in ecwid_params.items) {
5
- ecwidClasses[i] = ecwid_params.items[i].km;
6
  }
7
 
8
  if (ecwid_params.first_run && jQuery('#ecwid_nav_links-hide:checked').length == 0) {
@@ -59,14 +59,6 @@ jQuery(document).ready(function() {
59
  }
60
  }
61
 
62
- trackAddedMenuItems = function(element) {
63
- var ecwidLink = findEcwidLink(element);
64
- if (!findEcwidLink(element)) return;
65
-
66
- ecwid_kissmetrics_record('menu-items ' + ecwidClasses[ecwidLink] + 'Added');
67
- ecwid_kissmetrics_record('menu-items-added');
68
- }
69
-
70
  findEcwidLink = function(element) {
71
 
72
  for (var i in ecwidClasses) {
@@ -104,8 +96,6 @@ jQuery(document).ready(function() {
104
  if (!jQuery(e.srcElement).hasClass('menu-item')) return;
105
 
106
  processEcwidLinks(e.srcElement);
107
-
108
- trackAddedMenuItems(e.srcElement);
109
  });
110
 
111
  });
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) {
59
  }
60
  }
61
 
 
 
 
 
 
 
 
 
62
  findEcwidLink = function(element) {
63
 
64
  for (var i in ecwidClasses) {
96
  if (!jQuery(e.srcElement).hasClass('menu-item')) return;
97
 
98
  processEcwidLinks(e.srcElement);
 
 
99
  });
100
 
101
  });
js/store-editor-page.js CHANGED
@@ -347,8 +347,6 @@ ecwid_open_store_popup = function() {
347
  .removeClass('active')
348
  .filter('[data-content=' + current + ']').addClass('active');
349
 
350
- ecwid_kissmetrics_record(shortcode ? 'editStoreButtonClick' : 'addStoreButtonClick');
351
-
352
  updatePreview();
353
 
354
  if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
347
  .removeClass('active')
348
  .filter('[data-content=' + current + ']').addClass('active');
349
 
 
 
350
  updatePreview();
351
 
352
  if (tinymce.activeEditor && !tinymce.activeEditor.isHidden()) {
lib/ecwid_platform.php CHANGED
@@ -76,8 +76,7 @@ class EcwidPlatform {
76
  }
77
 
78
  static public function report_error($error) {
79
- $request = Ecwid_HTTP::create_error_report($error);
80
- $request->do_request();
81
  }
82
 
83
  static public function fetch_url($url, $options = array())
76
  }
77
 
78
  static public function report_error($error) {
79
+ ecwid_log_error(json_encode($error));
 
80
  }
81
 
82
  static public function fetch_url($url, $options = array())
lib/ecwid_requests.php CHANGED
@@ -73,17 +73,6 @@ abstract class Ecwid_Http {
73
  return $this->processed_data;
74
  }
75
 
76
- public static function create_error_report($message) {
77
- $error_url = 'http://' . APP_ECWID_COM . '/script.js?805056&data_platform=wporg&data_wporg_error=' . urlencode($message) . '&url=' . urlencode(get_bloginfo('url'));
78
- return self::create_get(
79
- 'error_report',
80
- $error_url,
81
- array(
82
- self::POLICY_IGNORE_ERRORS
83
- )
84
- );
85
- }
86
-
87
  public static function create_get($name, $url, $params) {
88
 
89
  $transport_class = self::_get_transport($name, $url, $params);
@@ -282,11 +271,7 @@ abstract class Ecwid_HTTP_Get extends Ecwid_Http {
282
  }
283
  update_option('ecwid_remote_get_fails', 1);
284
 
285
- $report = $this->create_error_report($this->message);
286
-
287
- if (!is_null($report)) {
288
- $report->do_request();
289
- }
290
  }
291
  }
292
 
73
  return $this->processed_data;
74
  }
75
 
 
 
 
 
 
 
 
 
 
 
 
76
  public static function create_get($name, $url, $params) {
77
 
78
  $transport_class = self::_get_transport($name, $url, $params);
271
  }
272
  update_option('ecwid_remote_get_fails', 1);
273
 
274
+ ecwid_log_error($this->message);
 
 
 
 
275
  }
276
  }
277
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
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.6
6
- Stable tag: 4.7.2
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
 
@@ -149,6 +149,11 @@ You can use Ecwid’s built-in import tools to copy your store products from any
149
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
150
 
151
  == Changelog ==
 
 
 
 
 
152
  = 4.7.2 =
153
  - **Added support for the Ecwid’s improved single product widgets.** To feature a single product on a separate page or blog post of your ecommerce site, you can use the [ecwid_product] shortcode. We improved the look and feel of the single product widgets in Ecwid and added those improvements to the single product shortcode version #2. You can use it like this: [ecwid_product id="12345" version=2]. Do not forget to replace 12345 in this example with the actual product ID.
154
  - **Fixed error messages appearing on some Wordpress sites with the "Trend" theme installed.** If you use Ecwid shopping cart with Trend theme and recently noticed an error message in your site admin backend, please use this update this update – it should fix that issue.
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.6
6
+ Stable tag: 4.7.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
 
149
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
150
 
151
  == Changelog ==
152
+ = 4.7.3 =
153
+ - **Improvements for the new Ecwid’s single product widget.** Now it's possible to use the "show_price_on_button=0" and “show_border=0” parameters in the shortcode to disable the price on buy now button and widget border respectively. If you want to hide the widget border, for example, the resulting code will like this: [ecwid_product id="12345" version=2 show_border=0]. Do not forget to replace 12345 in this example with the actual product ID.
154
+
155
+ - Fixed a bug with the floating shopping cart: the floating cart widget didn't appear on some rare Wordpress themes, we fixed that. Now it should work fine.
156
+
157
  = 4.7.2 =
158
  - **Added support for the Ecwid’s improved single product widgets.** To feature a single product on a separate page or blog post of your ecommerce site, you can use the [ecwid_product] shortcode. We improved the look and feel of the single product widgets in Ecwid and added those improvements to the single product shortcode version #2. You can use it like this: [ecwid_product id="12345" version=2]. Do not forget to replace 12345 in this example with the actual product ID.
159
  - **Fixed error messages appearing on some Wordpress sites with the "Trend" theme installed.** If you use Ecwid shopping cart with Trend theme and recently noticed an error message in your site admin backend, please use this update this update – it should fix that issue.
templates/advanced-settings.php CHANGED
@@ -182,9 +182,4 @@
182
  </div>
183
  </fieldset>
184
  </form>
185
- </div>
186
-
187
-
188
- <script type="text/javascript">
189
- ecwid_kissmetrics_record('Advanced Page Viewed');
190
- </script>
182
  </div>
183
  </fieldset>
184
  </form>
185
+ </div>
 
 
 
 
 
templates/appearance-settings.php CHANGED
@@ -219,8 +219,4 @@
219
  </fieldset>
220
  </form>
221
 
222
- </div>
223
-
224
- <script type="text/javascript">
225
- ecwid_kissmetrics_record('Appearance Page Viewed');
226
- </script>
219
  </fieldset>
220
  </form>
221
 
222
+ </div>
 
 
 
 
templates/ecwid-admin.php CHANGED
@@ -22,9 +22,4 @@
22
 
23
  <iframe seamless id="ecwid-frame" frameborder="0" width="100%" height="700" scrolling="no"></iframe>
24
 
25
- <?php require_once ECWID_PLUGIN_DIR . 'templates/admin-footer.php'; ?>
26
-
27
-
28
- <script type="text/javascript">
29
- ecwid_kissmetrics_record('<?php echo $page; ?> Page Viewed');
30
- </script>
22
 
23
  <iframe seamless id="ecwid-frame" frameborder="0" width="100%" height="700" scrolling="no"></iframe>
24
 
25
+ <?php require_once ECWID_PLUGIN_DIR . 'templates/admin-footer.php'; ?>
 
 
 
 
 
templates/help.php CHANGED
@@ -221,7 +221,7 @@
221
  <h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
222
 
223
  <div class="contact-form">
224
- <form action="admin-post.php" enctype="multipart/form-data" class="new_email" id="new_email" method="post" novalidate="novalidate" onsubmit="javascript:ecwid_kissmetrics_record('help-page email-contact-form submitted');">
225
  <input type="hidden" name="action" value="ecwid_contact_us" />
226
  <input type="hidden" name="wp-nonce" id="wp-nonce" value="<?php echo wp_create_nonce( Ecwid_Help_Page::CONTACT_US_ACTION_NAME ); ?>" />
227
  <input id="email_subject" maxlength="100" name="email[subject]" type="text" class="form-control" value="" placeholder="<?php _e( 'Subject', 'ecwid-shopping-cart' ); ?> ">
@@ -327,6 +327,4 @@
327
  jQuery('.block-contact').show();
328
  return false;
329
  });
330
-
331
- ecwid_kissmetrics_record('help-page viewed');
332
  </script>
221
  <h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
222
 
223
  <div class="contact-form">
224
+ <form action="admin-post.php" enctype="multipart/form-data" class="new_email" id="new_email" method="post" novalidate="novalidate">
225
  <input type="hidden" name="action" value="ecwid_contact_us" />
226
  <input type="hidden" name="wp-nonce" id="wp-nonce" value="<?php echo wp_create_nonce( Ecwid_Help_Page::CONTACT_US_ACTION_NAME ); ?>" />
227
  <input id="email_subject" maxlength="100" name="email[subject]" type="text" class="form-control" value="" placeholder="<?php _e( 'Subject', 'ecwid-shopping-cart' ); ?> ">
327
  jQuery('.block-contact').show();
328
  return false;
329
  });
 
 
330
  </script>
templates/landing.php CHANGED
@@ -47,7 +47,7 @@
47
  </div>
48
  <div class="create-store-have-account ecwid-button-description">
49
  <span class="create-store-have-account-question"><?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?></span>
50
- <a class="create-store-have-account-link" href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
51
  </div>
52
  <div class="button-description-mobile">
53
  <?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
@@ -158,12 +158,8 @@
158
 
159
  <div class="ecwid-button-description">
160
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
161
- <a href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');"><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
162
  </div>
163
  </div>
164
  </div>
165
- </div>
166
-
167
- <script type="text/javascript">
168
- ecwid_kissmetrics_record('Welcome Page Viewed');
169
- </script>
47
  </div>
48
  <div class="create-store-have-account ecwid-button-description">
49
  <span class="create-store-have-account-question"><?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?></span>
50
+ <a class="create-store-have-account-link" href="admin-post.php?action=ecwid_connect"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
51
  </div>
52
  <div class="button-description-mobile">
53
  <?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
158
 
159
  <div class="ecwid-button-description">
160
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
161
+ <a href="admin-post.php?action=ecwid_connect"><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
162
  </div>
163
  </div>
164
  </div>
165
+ </div>
 
 
 
 
templates/landing_old.php CHANGED
@@ -42,10 +42,10 @@
42
  </div>
43
  </div>
44
  <div class="ecwid-button">
45
- <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();ecwid_kissmetrics_record('createAccountButtonClick');">
46
  <?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
47
  </a>
48
- <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');">
49
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
50
  </a>
51
  <div class="button-description-mobile on-register">
@@ -59,11 +59,11 @@
59
  </div>
60
  <div class="ecwid-button-description on-register">
61
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
62
- <a href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
63
  </div>
64
  <div class="ecwid-button-description on-connect">
65
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
66
- <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect();ecwid_kissmetrics_record('createAccountButtonClick');"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
67
  </div>
68
  <div class="button-description-mobile on-register">
69
  <?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
@@ -147,25 +147,21 @@
147
  <h2><?php _e('Start selling <br>on your WordPress <nobr>site for free</nobr>', 'ecwid-shopping-cart'); ?>
148
  </h2>
149
  <div class="ecwid-button">
150
- <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect(); ecwid_kissmetrics_record('createAccountButtonClick');">
151
  <?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
152
  </a>
153
- <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');">
154
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
155
  </a>
156
  <div class="ecwid-button-description on-register">
157
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
158
- <a href="admin-post.php?action=ecwid_connect" onclick="javascript:ecwid_kissmetrics_record('connectStoreButtonClick');"><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
159
  </div>
160
  <div class="ecwid-button-description on-connect">
161
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
162
- <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect();ecwid_kissmetrics_record('createAccountButtonClick');"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
163
  </div>
164
 
165
  </div>
166
  </div>
167
- </div>
168
-
169
- <script type="text/javascript">
170
- ecwid_kissmetrics_record('Welcome Page Viewed');
171
- </script>
42
  </div>
43
  </div>
44
  <div class="ecwid-button">
45
+ <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();">
46
  <?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
47
  </a>
48
+ <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect">
49
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
50
  </a>
51
  <div class="button-description-mobile on-register">
59
  </div>
60
  <div class="ecwid-button-description on-register">
61
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
62
+ <a href="admin-post.php?action=ecwid_connect"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
63
  </div>
64
  <div class="ecwid-button-description on-connect">
65
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
66
+ <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect();"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
67
  </div>
68
  <div class="button-description-mobile on-register">
69
  <?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
147
  <h2><?php _e('Start selling <br>on your WordPress <nobr>site for free</nobr>', 'ecwid-shopping-cart'); ?>
148
  </h2>
149
  <div class="ecwid-button">
150
+ <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();>
151
  <?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
152
  </a>
153
+ <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect">
154
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
155
  </a>
156
  <div class="ecwid-button-description on-register">
157
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
158
+ <a href="admin-post.php?action=ecwid_connect""><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
159
  </div>
160
  <div class="ecwid-button-description on-connect">
161
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
162
+ <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect();"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
163
  </div>
164
 
165
  </div>
166
  </div>
167
+ </div>