Ecwid Ecommerce Shopping Cart - Version 4.7.2

Version Description

  • Added support for the Ecwids 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.
  • 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.
Download this release

Release Info

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

Code changes from version 4.7.1 to 4.7.2

css/frontend.css CHANGED
@@ -31,3 +31,7 @@ html#ecwid_html body#ecwid_body .ecwid tr:hover td {
31
  html#ecwid_html body#ecwid_body .ecwid table {
32
  line-height: inherit;
33
  }
 
 
 
 
31
  html#ecwid_html body#ecwid_body .ecwid table {
32
  line-height: inherit;
33
  }
34
+
35
+ .ecwid-SingleProduct-v2 {
36
+ box-sizing: content-box;
37
+ }
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.1
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -74,7 +74,6 @@ if ( is_admin() ){
74
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
75
  add_shortcode('ecwid_searchbox', 'ecwid_searchbox_shortcode');
76
  add_shortcode('ecwid_categories', 'ecwid_categories_shortcode');
77
- add_shortcode('ecwid_product', 'ecwid_product_shortcode');
78
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
79
  add_shortcode('ecwid_product', 'ecwid_product_shortcode');
80
  add_action('init', 'ecwid_backward_compatibility');
@@ -1030,8 +1029,13 @@ function ecwid_wrap_shortcode_content($content, $name, $attrs)
1030
  {
1031
  $version = get_option('ecwid_plugin_version');
1032
 
1033
- $shortcode_content = ecwid_get_scriptjs_code(@$attrs['lang'])
1034
- . "<div class=\"ecwid-shopping-cart-$name\">$content</div>";
 
 
 
 
 
1035
 
1036
  $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
1037
  . $shortcode_content
@@ -1277,8 +1281,9 @@ function ecwid_product_shortcode($shortcode_attributes) {
1277
  array(
1278
  'id' => null,
1279
  'display' => 'picture title price options addtobag',
1280
- 'link' => 'yes'
1281
- ),
 
1282
  $shortcode_attributes
1283
  );
1284
 
@@ -1290,23 +1295,22 @@ function ecwid_product_shortcode($shortcode_attributes) {
1290
  $attributes['link'] = 'no';
1291
  }
1292
 
1293
- $display_items = array(
1294
- 'picture' => '<div itemprop="picture"></div>',
1295
- 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1296
- 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1297
- . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
1298
- . '</div>',
1299
- 'options' => '<div itemprop="options"></div>',
1300
- 'qty' => '<div itemprop="qty"></div>',
1301
- 'addtobag' => '<div itemprop="addtobag"></div>'
1302
- );
1303
-
1304
- $result = sprintf(
1305
- '<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
1306
- . 'itemscope itemtype="http://schema.org/Product" '
1307
- . 'data-single-product-id="%d">',
1308
- $id, $id
1309
- );
1310
 
1311
  $items = preg_split('![^0-9^a-z^A-Z^\-^_]!', $attributes['display']);
1312
 
@@ -1324,13 +1328,55 @@ function ecwid_product_shortcode($shortcode_attributes) {
1324
  $result .= '</div>';
1325
 
1326
  $result .= ecwid_get_product_browser_url_script();
1327
- $result .= '<script data-cfasync="false" type="text/javascript">xSingleProduct()</script>';
1328
 
1329
  update_option('ecwid_single_product_used', time());
1330
 
1331
- return ecwid_wrap_shortcode_content($result, 'product', $shortcode_attributes);
 
 
1332
  }
1333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1334
  function ecwid_install_theme() {
1335
  if ( ! class_exists( 'Theme_Upgrader', false ) ) {
1336
  require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
@@ -2119,9 +2165,6 @@ function ecwid_admin_do_page( $page ) {
2119
 
2120
  if ($page == 'dashboard') {
2121
  $show_reconnect = true;
2122
- if (isset($_GET['just-created'])) {
2123
- $page = 'dashboard:wizard=ADD_PRODUCTS';
2124
- }
2125
  }
2126
 
2127
  $time = time() - get_option('ecwid_time_correction', 0);
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
 
74
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
75
  add_shortcode('ecwid_searchbox', 'ecwid_searchbox_shortcode');
76
  add_shortcode('ecwid_categories', 'ecwid_categories_shortcode');
 
77
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
78
  add_shortcode('ecwid_product', 'ecwid_product_shortcode');
79
  add_action('init', 'ecwid_backward_compatibility');
1029
  {
1030
  $version = get_option('ecwid_plugin_version');
1031
 
1032
+ $shortcode_content = ecwid_get_scriptjs_code(@$attrs['lang']);
1033
+
1034
+ if ($name == 'product2') {
1035
+ $shortcode_content .= $content;
1036
+ } else {
1037
+ $shortcode_content .= "<div class=\"ecwid-shopping-cart-$name\">$content</div>";
1038
+ }
1039
 
1040
  $shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
1041
  . $shortcode_content
1281
  array(
1282
  'id' => null,
1283
  'display' => 'picture title price options addtobag',
1284
+ 'link' => 'yes',
1285
+ 'version' => '1'
1286
+ ),
1287
  $shortcode_attributes
1288
  );
1289
 
1295
  $attributes['link'] = 'no';
1296
  }
1297
 
1298
+
1299
+ $version = $attributes['version'];
1300
+ if (!in_array($version, array('1', '2'))) {
1301
+ $version = 1;
1302
+ }
1303
+
1304
+ $widget_parts = array();
1305
+ if ($version == 1) {
1306
+ $widget_parts = _ecwid_get_single_product_widget_parts_v1($attributes);
1307
+ } else if ($version == 2) {
1308
+ $widget_parts = _ecwid_get_single_product_widget_parts_v2($attributes);
1309
+ }
1310
+
1311
+ $display_items = $widget_parts['display_items'];
1312
+
1313
+ $result = $widget_parts['opening_div'];
 
1314
 
1315
  $items = preg_split('![^0-9^a-z^A-Z^\-^_]!', $attributes['display']);
1316
 
1328
  $result .= '</div>';
1329
 
1330
  $result .= ecwid_get_product_browser_url_script();
1331
+ $result .= $widget_parts['widget_call'];
1332
 
1333
  update_option('ecwid_single_product_used', time());
1334
 
1335
+ $name = 'product' . $version;
1336
+
1337
+ return ecwid_wrap_shortcode_content($result, $name, $shortcode_attributes);
1338
  }
1339
 
1340
+ function _ecwid_get_single_product_widget_parts_v1($attributes) {
1341
+ return array(
1342
+ 'display_items' => array(
1343
+ 'picture' => '<div itemprop="picture"></div>',
1344
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
1345
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
1346
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
1347
+ . '</div>',
1348
+ 'options' => '<div itemprop="options"></div>',
1349
+ 'qty' => '<div itemprop="qty"></div>',
1350
+ 'addtobag' => '<div itemprop="addtobag"></div>'
1351
+ ),
1352
+ 'opening_div' => sprintf('<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
1353
+ . 'itemscope itemtype="http://schema.org/Product" '
1354
+ . 'data-single-product-id="%d">', $attributes['id'], $attributes['id']),
1355
+ 'widget_call' => '<script data-cfasync="false" type="text/javascript">xSingleProduct()</script>'
1356
+ );
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>',
1369
+ 'options' => '<div customprop="options"></div>',
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
+ );
1377
+ }
1378
+
1379
+
1380
  function ecwid_install_theme() {
1381
  if ( ! class_exists( 'Theme_Upgrader', false ) ) {
1382
  require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
2165
 
2166
  if ($page == 'dashboard') {
2167
  $show_reconnect = true;
 
 
 
2168
  }
2169
 
2170
  $time = time() - get_option('ecwid_time_correction', 0);
includes/themes/class-ecwid-theme-trend.php CHANGED
@@ -13,7 +13,7 @@ class Ecwid_Theme_Trend extends Ecwid_Theme_Base
13
  parent::__construct();
14
 
15
  // That actually means that ajax loading is disabled. Really ambigious naming
16
- if (!BW::get_option('disable_ajax_loading')) {
17
  return;
18
  }
19
 
13
  parent::__construct();
14
 
15
  // That actually means that ajax loading is disabled. Really ambigious naming
16
+ if (class_exists('BW') && method_exists('BW', 'get_option') && !@BW::get_option('disable_ajax_loading')) {
17
  return;
18
  }
19
 
js/landing.js CHANGED
@@ -35,7 +35,7 @@ jQuery(document).ready(function(){
35
 
36
  jQuery(show_on_success, $context).fadeIn(300);
37
  setTimeout(function() {
38
- location.href="admin.php?page=ecwid&just-created";
39
  }, 1000);
40
  })
41
  },
35
 
36
  jQuery(show_on_success, $context).fadeIn(300);
37
  setTimeout(function() {
38
+ location.href="admin.php?page=ecwid";
39
  }, 1000);
40
  })
41
  },
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.1
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,10 @@ 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.1 =
153
  - Fixed a few warning messages appearing on some sites with the new version of the plugin.
154
 
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
  * [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.
155
+
156
  = 4.7.1 =
157
  - Fixed a few warning messages appearing on some sites with the new version of the plugin.
158