Ecwid Ecommerce Shopping Cart - Version 4.1

Version Description

  • Product images are included in the sitemap generated by the Yoast SEO plugin. Ecwid is integrated with popular SEO plugins: Yoast SEO and Google XML Sitemaps, which allows merchants to generate a sitemap containing the links to their products and categories. Now, the sitemaps generated by Yoast SEO will also automatically include links to the product images. This will make Google better index your products pictures and list them in the search results.
  • Ecwid plugin now supports oEmbed discovery. As of version 4.4, WordPress supports oEmbed. In short, that's a tool which makes a link to a post or a page of your site looks nice when pasted on another site supporting this. Ecwid now supports it too, so if you paste a link to your store page on any other oEmbed-empowered site (e.g. another Wordpress site), it will automatically displays a nice widget with the page title and a list of your store categories.
  • Fixes and improvements for the storefront widgets and for the plugins admin pages.
Download this release

Release Info

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

Code changes from version 4.1.1 to 4.1

css/themes/accesspress-mag.css DELETED
@@ -1,7 +0,0 @@
1
- html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary,
2
- html#ecwid_html body#ecwid_body .ecwid-SearchPanel-button {
3
- color: #333 !important;
4
- }
5
- html#ecwid_html body#ecwid_body .ecwid .ecwid-btn--secondary:hover {
6
- color: #fff !important;
7
- }
 
 
 
 
 
 
 
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.1.1
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -621,48 +621,60 @@ TEXT;
621
  $body = __($body, 'ecwid-shopping-cart');
622
  $body = sprintf($body, $theme, $store_url);
623
 
624
- $wp_admin_bar->add_menu( array(
625
- 'id' => 'ecwid-main',
626
- 'title' => '<span class="ab-icon ecwid-top-menu-item"></span>',
627
- 'href' => 'admin.php?page=ecwid',
628
- ));
629
-
630
  $wp_admin_bar->add_menu(array(
631
- "id" => "ecwid-go-to-page",
632
- "title" => __("Visit storefront", 'ecwid-shopping-cart'),
633
- "parent" => "ecwid-main",
634
- 'href' => ecwid_get_store_page_url()
635
- )
636
- );
637
-
638
- $wp_admin_bar->add_menu(array(
639
- "id" => "ecwid-control-panel",
640
- "title" => __("Manage my store", 'ecwid-shopping-cart'),
641
- "parent" => "ecwid-main",
642
- 'href' => admin_url('admin.php?page=ecwid')
643
  )
644
- );
645
 
 
 
 
 
 
646
  $wp_admin_bar->add_menu(array(
647
  "id" => "ecwid-help",
648
- "title" => __("Read FAQ", 'ecwid-shopping-cart'),
649
  "parent" => "ecwid-main",
650
- 'href' => __('https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable', 'ecwid-shopping-cart'),
651
  'meta' => array(
652
  'target' => '_blank'
653
  )
654
  )
655
  );
656
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
  $wp_admin_bar->add_menu(array(
658
- 'id' => 'ecwid-report-problem',
659
- 'title' => __( 'Report a problem with the store', 'ecwid-shopping-cart' ),
660
- 'parent' => 'ecwid-main',
661
- 'href' => 'mailto:wordpress@ecwid.com?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($body),
662
- 'meta' => array(
663
- 'target' => '_blank'
664
- )
665
- ));
666
  }
667
 
668
  function ecwid_content_has_productbrowser($content) {
@@ -879,7 +891,6 @@ function ecwid_seo_title_parts($parts)
879
  function ecwid_ajax_seo_title()
880
  {
881
  $title = _ecwid_get_seo_title();
882
- echo $title;
883
  $template = $_GET['title_template'];
884
 
885
  $result = str_replace('ECWID_SEO_TITLE', $title, $template);
@@ -966,10 +977,10 @@ function ecwid_content_started($content)
966
 
967
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
968
  {
969
- return "<!-- Ecwid shopping cart plugin v 4.1.1 --><!-- noptimize -->"
970
  . ecwid_get_scriptjs_code(@$attrs['lang'])
971
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
972
- . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.1.1 -->";
973
  }
974
 
975
  function ecwid_get_scriptjs_code($force_lang = null) {
@@ -1749,6 +1760,9 @@ function ecwid_admin_orders_do_page() {
1749
 
1750
  function ecwid_register_admin_styles($hook_suffix) {
1751
 
 
 
 
1752
  wp_enqueue_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'), array(), get_option('ecwid_plugin_version'));
1753
  wp_enqueue_style('ecwid-fonts-css', plugins_url('ecwid-shopping-cart/css/fonts.css'), array(), get_option('ecwid_plugin_version'));
1754
 
@@ -1856,7 +1870,6 @@ function ecwid_common_admin_scripts() {
1856
  EcwidPlatform::set('nav-menus-opened-once', null);
1857
 
1858
  $first_run = false;
1859
- // It opens the page twice on the very first run of that page
1860
  if (EcwidPlatform::get('nav-menus-opened-once', false) < 2) {
1861
  EcwidPlatform::set('nav-menus-opened-once', EcwidPlatform::get('nav-menus-opened-once') + 1);
1862
  $first_run = EcwidPlatform::get('nav-menus-opened-once') <= 2;
@@ -2134,26 +2147,48 @@ function ecwid_test_oauth($force = false)
2134
  }
2135
 
2136
  function ecwid_get_categories_for_selector() {
 
 
 
 
 
 
 
2137
 
2138
- function walk_through_categories($categories, $parent_prefix) {
2139
- if (empty($categories)) {
2140
- return array();
 
2141
  }
2142
- $result = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
2143
 
2144
- foreach ($categories as $category) {
2145
- $result[$category->id] = $category;
2146
- $result[$category->id]->path = $parent_prefix . $category->name;
2147
- $result = array_merge($result, walk_through_categories($category->sub, $category->name . ' > '));
2148
- unset($result[$category->id]->sub);
2149
  }
2150
 
2151
- return $result;
2152
- }
 
2153
 
2154
- $result = walk_through_categories(ecwid_get_categories(), "");
2155
 
2156
- return $result;
 
 
 
2157
  }
2158
 
2159
  function ecwid_advanced_settings_do_page() {
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.1
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
621
  $body = __($body, 'ecwid-shopping-cart');
622
  $body = sprintf($body, $theme, $store_url);
623
 
 
 
 
 
 
 
624
  $wp_admin_bar->add_menu(array(
625
+ 'id' => 'ecwid-report-problem',
626
+ 'title' => __( 'Report a problem with the store', 'ecwid-shopping-cart' ),
627
+ 'parent' => 'ecwid-main',
628
+ 'href' => 'mailto:wordpress@ecwid.com?subject=' . rawurlencode($subject) . '&body=' . rawurlencode($body),
629
+ 'meta' => array(
630
+ 'target' => '_blank'
 
 
 
 
 
 
631
  )
632
+ ));
633
 
634
+ $wp_admin_bar->add_menu( array(
635
+ 'id' => 'ecwid-main',
636
+ 'title' => '<span class="ab-icon ecwid-top-menu-item"></span>',
637
+ 'href' => 'admin.php?page=ecwid',
638
+ ));
639
  $wp_admin_bar->add_menu(array(
640
  "id" => "ecwid-help",
641
+ "title" => __("Get help", 'ecwid-shopping-cart'),
642
  "parent" => "ecwid-main",
643
+ 'href' => __('https://help.ecwid.com', 'ecwid-shopping-cart'),
644
  'meta' => array(
645
  'target' => '_blank'
646
  )
647
  )
648
  );
649
+ $wp_admin_bar->add_menu(array(
650
+ "id" => "ecwid-home",
651
+ "title" => __("Go to Ecwid site", 'ecwid-shopping-cart'),
652
+ "parent" => "ecwid-main",
653
+ 'href' => 'http://www.ecwid.com?source=wporg'
654
+ )
655
+ );
656
+ $wp_admin_bar->add_menu(array(
657
+ "id" => "ecwid-go-to-page",
658
+ "title" => __("Visit storefront", 'ecwid-shopping-cart'),
659
+ "parent" => "ecwid-main",
660
+ 'href' => ecwid_get_store_page_url()
661
+ )
662
+ );
663
+ $wp_admin_bar->add_menu(array(
664
+ "id" => "ecwid-control-panel",
665
+ "title" => __("Manage my store", 'ecwid-shopping-cart'),
666
+ "parent" => "ecwid-main",
667
+ 'href' => admin_url('admin.php?page=ecwid')
668
+ )
669
+ );
670
  $wp_admin_bar->add_menu(array(
671
+ "id" => "ecwid-fb-app",
672
+ "title" => __("→ Sell on Facebook", 'ecwid-shopping-cart'),
673
+ "parent" => "ecwid-main",
674
+ 'href' => 'http://apps.facebook.com/ecwid-shop/?fb_source=wp'
675
+ )
676
+ );
677
+
 
678
  }
679
 
680
  function ecwid_content_has_productbrowser($content) {
891
  function ecwid_ajax_seo_title()
892
  {
893
  $title = _ecwid_get_seo_title();
 
894
  $template = $_GET['title_template'];
895
 
896
  $result = str_replace('ECWID_SEO_TITLE', $title, $template);
977
 
978
  function ecwid_wrap_shortcode_content($content, $name, $attrs)
979
  {
980
+ return "<!-- Ecwid shopping cart plugin v 4.1 --><!-- noptimize -->"
981
  . ecwid_get_scriptjs_code(@$attrs['lang'])
982
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
983
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.1 -->";
984
  }
985
 
986
  function ecwid_get_scriptjs_code($force_lang = null) {
1760
 
1761
  function ecwid_register_admin_styles($hook_suffix) {
1762
 
1763
+ $api = new Ecwid_Api_V3(get_ecwid_store_id());
1764
+ $api->get_category(array('categoryId' => 82007));
1765
+
1766
  wp_enqueue_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'), array(), get_option('ecwid_plugin_version'));
1767
  wp_enqueue_style('ecwid-fonts-css', plugins_url('ecwid-shopping-cart/css/fonts.css'), array(), get_option('ecwid_plugin_version'));
1768
 
1870
  EcwidPlatform::set('nav-menus-opened-once', null);
1871
 
1872
  $first_run = false;
 
1873
  if (EcwidPlatform::get('nav-menus-opened-once', false) < 2) {
1874
  EcwidPlatform::set('nav-menus-opened-once', EcwidPlatform::get('nav-menus-opened-once') + 1);
1875
  $first_run = EcwidPlatform::get('nav-menus-opened-once') <= 2;
2147
  }
2148
 
2149
  function ecwid_get_categories_for_selector() {
2150
+ $categories = false;
2151
+ if (ecwid_is_paid_account()) {
2152
+ $api = ecwid_new_product_api();
2153
+ $categories = $api->get_all_categories();
2154
+ $by_id = array();
2155
+
2156
+ if (empty($categories)) return array();
2157
 
2158
+ if (is_array($categories)) {
2159
+ foreach ($categories as $key => $category) {
2160
+ $by_id[$category['id']] = $category;
2161
+ }
2162
  }
2163
+ unset($categories);
2164
+
2165
+ foreach ($by_id as $id => $category) {
2166
+ $name_path = array($category['name']);
2167
+ while (is_array($category) && isset($category['parentId'])) {
2168
+ $name = '';
2169
+ if (isset($by_id[$category['parentId']])) {
2170
+ $name = $by_id[$category['parentId']]['name'];
2171
+ } else {
2172
+ $name = __('Hidden category', 'ecwid-shopping-cart');
2173
+ }
2174
+ $name_path[] = $name;
2175
+ $category = isset($by_id[$category['parentId']]) ? $by_id[$category['parentId']] : false;
2176
+ }
2177
 
2178
+ $by_id[$id]['path'] = array_reverse($name_path);
2179
+ $by_id[$id]['path_str'] = implode(" > ", $by_id[$id]['path']);
 
 
 
2180
  }
2181
 
2182
+ function sort_by_path($a, $b) {
2183
+ return strcmp($a['path_str'], $b['path_str']);
2184
+ }
2185
 
2186
+ uasort($by_id, 'sort_by_path');
2187
 
2188
+ $categories = $by_id;
2189
+ }
2190
+
2191
+ return $categories;
2192
  }
2193
 
2194
  function ecwid_advanced_settings_do_page() {
includes/class-ecwid-kissmetrics.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class Ecwid_Kissmetrics {
4
 
5
- const API_KEY = '12a19b058a28c5db7b722584d59e60e4f080e142';
6
  const STORAGE_OPTION_NAME = 'ecwid_kissmetrics';
7
  const EVENT_PREFIX = 'wp-plugin ';
8
 
2
 
3
  class Ecwid_Kissmetrics {
4
 
5
+ const API_KEY = '73a63d56f0a933d42635f7a79e540db8cdab1fba';//'12a19b058a28c5db7b722584d59e60e4f080e142';
6
  const STORAGE_OPTION_NAME = 'ecwid_kissmetrics';
7
  const EVENT_PREFIX = 'wp-plugin ';
8
 
includes/themes.php CHANGED
@@ -51,8 +51,7 @@ function ecwid_apply_theme($theme_name = null)
51
  'attitude',
52
  'responsiveboat',
53
  'central',
54
- 'edin',
55
- 'accesspress-mag'
56
  );
57
 
58
 
51
  'attitude',
52
  'responsiveboat',
53
  'central',
54
+ 'edin'
 
55
  );
56
 
57
 
includes/themes/class-ecwid-theme-accesspress-mag.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
2
-
3
- require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
-
5
- class Ecwid_Theme_AccessPressMag extends Ecwid_Theme_Base
6
- {
7
- protected $name = 'AccessPress Mag';
8
-
9
- public function __construct()
10
- {
11
- parent::__construct();
12
-
13
- wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/accesspress-mag.css' ), array('accesspress-mag-style'), get_option('ecwid_plugin_version'), 'all' );
14
- }
15
- }
16
-
17
- $ecwid_current_theme = new Ecwid_Theme_AccessPressMag();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/admin.js CHANGED
@@ -136,8 +136,4 @@
136
  });
137
  }
138
  }
139
-
140
- jQuery('#wp-admin-bar-ecwid-main-default a').click(function() {
141
- ecwid_kissmetrics_record('Top Menu Clicked');
142
- });
143
  });
136
  });
137
  }
138
  }
 
 
 
 
139
  });
languages/ecwid-shopping-cart-ru_RU.mo CHANGED
Binary file
languages/ecwid-shopping-cart-ru_RU.po CHANGED
@@ -533,10 +533,4 @@ msgid "Download log file"
533
  msgstr "Скачать лог-файл"
534
 
535
  msgid "See more"
536
- msgstr "Посмотреть все"
537
-
538
- msgid "Read FAQ"
539
- msgstr "Посмотреть FAQ"
540
-
541
- msgid "https://help.ecwid.com/customer/portal/articles/1085017-wordpress-downloadable"
542
- msgstr "https://help.ecwid.com/customer/ru/portal/articles/1085017-wordpress-org"
533
  msgstr "Скачать лог-файл"
534
 
535
  msgid "See more"
536
+ msgstr "Посмотреть все"
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ecwid
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: 3.5
5
  Tested up to: 4.4
6
- Stable tag: 4.1.1
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
@@ -104,12 +104,8 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
104
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
105
 
106
  == Changelog ==
107
- = 4.1.1 =
108
- - **Layout improvements for the Accesspress-mag theme.** Accesspress-mag theme users might notice slight glitches in the store buttons. We fixed those.
109
- - **Added the page default category dropdown for free users.** When you add a store on your site page, you can set the store category to be displayed on that page. This "default category" tool was previously just a text input where you were supposed to put the category ID, if you're on free Ecwid plan. Now it's a dropdown menu so you can easily select a store category for each page. It's very useful if you want to display different categories on different pages of your site.
110
- - Minor bug fixes and improvements
111
-
112
  = 4.1 =
 
113
  - **Product images are included in the sitemap generated by the Yoast SEO plugin.** Ecwid is integrated with popular SEO plugins: Yoast SEO and Google XML Sitemaps, which allows merchants to generate a sitemap containing the links to their products and categories. Now, the sitemaps generated by Yoast SEO will also automatically include links to the product images. This will make Google better index your products pictures and list them in the search results.
114
  - **Ecwid plugin now supports oEmbed discovery.** As of version 4.4, WordPress supports oEmbed. In short, that's a tool which makes a link to a post or a page of your site looks nice when pasted on another site supporting this. Ecwid now supports it too, so if you paste a link to your store page on any other oEmbed-empowered site (e.g. another Wordpress site), it will automatically displays a nice widget with the page title and a list of your store categories.
115
  - Fixes and improvements for the storefront widgets and for the plugins admin pages.
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: 3.5
5
  Tested up to: 4.4
6
+ Stable tag: 4.0.7
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
104
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
105
 
106
  == Changelog ==
 
 
 
 
 
107
  = 4.1 =
108
+
109
  - **Product images are included in the sitemap generated by the Yoast SEO plugin.** Ecwid is integrated with popular SEO plugins: Yoast SEO and Google XML Sitemaps, which allows merchants to generate a sitemap containing the links to their products and categories. Now, the sitemaps generated by Yoast SEO will also automatically include links to the product images. This will make Google better index your products pictures and list them in the search results.
110
  - **Ecwid plugin now supports oEmbed discovery.** As of version 4.4, WordPress supports oEmbed. In short, that's a tool which makes a link to a post or a page of your site looks nice when pasted on another site supporting this. Ecwid now supports it too, so if you paste a link to your store page on any other oEmbed-empowered site (e.g. another Wordpress site), it will automatically displays a nice widget with the page title and a list of your store categories.
111
  - Fixes and improvements for the storefront widgets and for the plugins admin pages.
templates/store-popup.php CHANGED
@@ -149,30 +149,46 @@
149
 
150
  <div class="pure-control-group params-list default-category-id">
151
 
152
- <?php if ($categories): ?>
153
- <label for="ecwid_default_category_id">
154
- <?php _e('Category shown by default', 'ecwid-shopping-cart'); ?>
155
- </label>
156
-
157
-
158
- <div class="value">
159
-
160
- <select name="default_category_id" id="ecwid_default_category_id">
161
- <option value=""><?php _e('Store root category', 'ecwid-shopping-cart'); ?></option>
162
- <?php foreach ($categories as $category): ?>
163
- <option
164
- value="<?php echo esc_attr($category->id); ?>"
165
- <?php if ($category->id == get_option('ecwid_default_category_id')): ?>
166
- selected="selected"
167
- <?php endif; ?>
168
- >
169
- <?php echo esc_html($category->path); ?>
170
- </option>
171
- <?php endforeach; ?>
172
- </select>
173
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
- <?php endif; ?>
176
  </div>
177
 
178
  <div class="pure-control-group params-list">
149
 
150
  <div class="pure-control-group params-list default-category-id">
151
 
152
+ <?php if (ecwid_is_paid_account()): ?>
153
+ <?php if ($categories): ?>
154
+ <label for="ecwid_default_category_id">
155
+ <?php _e('Category shown by default', 'ecwid-shopping-cart'); ?>
156
+ </label>
157
+
158
+
159
+ <div class="value">
160
+
161
+ <select name="default_category_id" id="ecwid_default_category_id">
162
+ <option value=""><?php _e('Store root category', 'ecwid-shopping-cart'); ?></option>
163
+ <?php foreach ($categories as $category): ?>
164
+ <option
165
+ value="<?php echo esc_attr($category['id']); ?>"
166
+ <?php if ($category['id'] == get_option('ecwid_default_category_id')): ?>
167
+ selected="selected"
168
+ <?php endif; ?>
169
+ >
170
+ <?php echo esc_html($category['path_str']); ?>
171
+ </option>
172
+ <?php endforeach; ?>
173
+ </select>
174
+ </div>
175
+
176
+ <?php endif; ?>
177
+ <?php else: ?>
178
+
179
+ <label for="ecwid_default_category_id">
180
+ <?php _e('Default category ID', 'ecwid-shopping-cart'); ?>
181
+ </label>
182
+
183
+ <input
184
+ id="ecwid_default_category_id"
185
+ name="ecwid_default_category_id"
186
+ type="text"
187
+ placeholder="<?php _e('Default category ID', 'ecwid-shopping-cart'); ?>"
188
+ value="<?php echo esc_attr(get_option('ecwid_default_category_id')) ?>"
189
+ />
190
+ <?php endif; ?>
191
 
 
192
  </div>
193
 
194
  <div class="pure-control-group params-list">