Ecwid Ecommerce Shopping Cart - Version 2.3.2

Version Description

  • Fixed an issue in sitemap functionality. Ecwid uses third party plugin to generate an XML sitemap (Google XML Sitemaps) for store products and categories. The current integration had a bug which caused an error message in Wordpress admin backend for users on Free Ecwid plan. Now it's fixed and everything should work OK.
Download this release

Release Info

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

Code changes from version 2.3.1 to 2.3.2

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: 2.3.1
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -228,6 +228,8 @@ function ecwid_backward_compatibility() {
228
 
229
  function ecwid_build_sitemap_pages()
230
  {
 
 
231
  $page_url = get_page_link(get_option("ecwid_store_page_id"));
232
 
233
  include ECWID_PLUGIN_DIR . '/lib/EcwidSitemapBuilder.php';
@@ -579,10 +581,10 @@ function ecwid_content_started($content)
579
 
580
  function ecwid_wrap_shortcode_content($content)
581
  {
582
- return "<!-- Ecwid shopping cart plugin v 2.3.1 -->"
583
  . ecwid_get_scriptjs_code()
584
  . "<div>$content</div>"
585
- . "<!-- END Ecwid Shopping Cart v 2.3.1 -->";
586
  }
587
 
588
  function ecwid_get_scriptjs_code($force_lang = null) {
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: 2.3.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
228
 
229
  function ecwid_build_sitemap_pages()
230
  {
231
+ if (!ecwid_is_paid_account()) return;
232
+
233
  $page_url = get_page_link(get_option("ecwid_store_page_id"));
234
 
235
  include ECWID_PLUGIN_DIR . '/lib/EcwidSitemapBuilder.php';
581
 
582
  function ecwid_wrap_shortcode_content($content)
583
  {
584
+ return "<!-- Ecwid shopping cart plugin v 2.3.2 -->"
585
  . ecwid_get_scriptjs_code()
586
  . "<div>$content</div>"
587
+ . "<!-- END Ecwid Shopping Cart v 2.3.2 -->";
588
  }
589
 
590
  function ecwid_get_scriptjs_code($force_lang = null) {
lib/EcwidSitemapBuilder.php CHANGED
@@ -29,7 +29,6 @@ class EcwidSitemapBuilder implements JsonStreamingParser_Listener {
29
  $parser->parse();
30
  } catch (Exception $e) {
31
  fclose($stream);
32
- throw $e;
33
  }
34
  }
35
  }
29
  $parser->parse();
30
  } catch (Exception $e) {
31
  fclose($stream);
 
32
  }
33
  }
34
  }
lib/ecwid_product_api.php CHANGED
@@ -201,24 +201,29 @@ class EcwidProductApi {
201
  }
202
 
203
  $stream = null;
204
- if (ini_get('allow_url_fopen')) {
205
- $stream = fopen($request_url, 'r');
206
- } elseif (version_compare(PHP_VERSION, '5.1.0')) {
207
-
208
- $body = '';
209
-
210
- if (defined('WP_CONTENT_DIR') && function_exists('get_temp_dir') && function_exists('wp_remote_get')) {
211
- // we are in wordpress
212
- $response = wp_remote_get($request_url);
213
- $body = $response['body'];
214
- } else {
215
- $response = internal_fetch_url_libcurl($request_url);
216
- $body = $response['data'];
217
- }
218
 
219
- $stream = fopen('php://temp', 'rw');
220
- fwrite($stream, $body);
221
- rewind($stream);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  }
223
 
224
  return $stream;
201
  }
202
 
203
  $stream = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
 
205
+ try {
206
+ if (ini_get('allow_url_fopen')) {
207
+ $stream = fopen($request_url, 'r');
208
+ } elseif (version_compare(PHP_VERSION, '5.1.0')) {
209
+
210
+ $body = '';
211
+
212
+ if (defined('WP_CONTENT_DIR') && function_exists('get_temp_dir') && function_exists('wp_remote_get')) {
213
+ // we are in wordpress
214
+ $response = wp_remote_get($request_url);
215
+ $body = $response['body'];
216
+ } else {
217
+ $response = internal_fetch_url_libcurl($request_url);
218
+ $body = $response['data'];
219
+ }
220
+
221
+ $stream = fopen('php://temp', 'rw');
222
+ fwrite($stream, $body);
223
+ rewind($stream);
224
+ }
225
+ } catch (Exception $e) {
226
+ $stream = null;
227
  }
228
 
229
  return $stream;
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: Ecwid Team
3
  Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
4
  Requires at least: 2.8
5
- Tested up to: 3.8
6
- Stable tag: 2.3.1
7
 
8
  Ecwid is a free full-featured shopping cart that can easily be added to any blog
9
  and takes less than 5 minutes to set up.
@@ -78,6 +78,9 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
78
  - Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
79
 
80
  == Changelog ==
 
 
 
81
  = 2.3.1 =
82
  - Automatic generation of the rel="canonical" links for SEO. Canonical links are aimed to specify the preferred (canonical) URL of the web page for search engines to prevent possible duplicate content issues. Ecwid plugin now generates such links automatically for product and categories pages in your store to provide search crawlers with well-structured content and help them better index your store.
83
  - Improved compatibility with CloudFlare Rocket Loader. The merchants who use CloudFlare Rocket Loader extensions on their sites might previously experience issues with loading of their Ecwid stores. We've further improved the plugin code to prevent such issues in the future. Now Ecwid plugin should perfectly work with CloudFlare extensions.
2
  Contributors: Ecwid Team
3
  Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
4
  Requires at least: 2.8
5
+ Tested up to: 3.8.1
6
+ Stable tag: 2.3.2
7
 
8
  Ecwid is a free full-featured shopping cart that can easily be added to any blog
9
  and takes less than 5 minutes to set up.
78
  - Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
79
 
80
  == Changelog ==
81
+ = 2.3.2 =
82
+ - **Fixed an issue in sitemap functionality**. Ecwid uses third party plugin to generate an XML sitemap (Google XML Sitemaps) for store products and categories. The current integration had a bug which caused an error message in Wordpress admin backend for users on Free Ecwid plan. Now it's fixed and everything should work OK.
83
+
84
  = 2.3.1 =
85
  - Automatic generation of the rel="canonical" links for SEO. Canonical links are aimed to specify the preferred (canonical) URL of the web page for search engines to prevent possible duplicate content issues. Ecwid plugin now generates such links automatically for product and categories pages in your store to provide search crawlers with well-structured content and help them better index your store.
86
  - Improved compatibility with CloudFlare Rocket Loader. The merchants who use CloudFlare Rocket Loader extensions on their sites might previously experience issues with loading of their Ecwid stores. We've further improved the plugin code to prevent such issues in the future. Now Ecwid plugin should perfectly work with CloudFlare extensions.