Ecwid Ecommerce Shopping Cart - Version 6.2

Version Description

  • Jun 25, 2018 =
  • New! Revamped floating cart icon. We added a new floating cart widget that allows to display a cart icon along with items count and subtotal in the corner of the screen. This way, it's always visible and your customers can click it to check their cart contents and proceed with checkout. The new floating shopping cart icon looks better and provides a lot of layout customization options. You can enable it in the Customizer menu under "Ecwid" section in your WordPress admin backend: (Appearance Customize Ecwid).
  • Fixed a "Call to undefined function mb_strtolower" error message that appeared on some hosts. If you saw such an error message, this should be fixed now.
  • Fixed a minor issue with the way Ecwid clean URLs work with Divi theme. If you're using Divi theme on your site, you might notice that product page links gave you a 404 error in some rare cases. It' fixed now.
  • Minor fixes and improvements.
Download this release

Release Info

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

Code changes from version 6.1.1 to 6.2

css/minicart-customize-admin.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ #customize-control-ec_store_cart_widget_show_empty_cart .customize-inside-control-row {
2
+ margin-top: -1em;
3
+ margin-bottom: 1em;
4
+ }
ecwid-shopping-cart.php CHANGED
@@ -5,8 +5,8 @@ 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: 6.1.1
9
- Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
12
  register_activation_hook( __FILE__, 'ecwid_store_activate' );
@@ -135,6 +135,12 @@ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-html-meta.php';
135
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-wp-dashboard-feed.php';
136
  require_once ECWID_PLUGIN_DIR . 'includes/importer/importer.php';
137
 
 
 
 
 
 
 
138
  $ecwid_script_rendered = false; // controls single script.js on page
139
 
140
 
@@ -289,8 +295,8 @@ function ecwid_redirect_canonical2($redir, $req) {
289
  $adds_slash = $req . '/' == $redir;
290
  $adds_slash |= urldecode($req . '/') == urldecode($redir);
291
 
292
- if ($wp_query->get('page_id') == Ecwid_Store_Page::get_current_store_page_id() && $adds_slash) {
293
- return false;
294
  }
295
 
296
  return $redir;
@@ -655,6 +661,10 @@ function ecwid_check_version()
655
  // Since 6.0.x
656
  add_option( 'ecwid_hide_prefetch', 'off' );
657
 
 
 
 
 
658
  Ecwid_Config::load_from_ini();
659
 
660
  add_option( 'force_scriptjs_render', false );
@@ -695,6 +705,11 @@ function ecwid_get_woocommerce_status() {
695
  return $woo;
696
  }
697
 
 
 
 
 
 
698
  function ecwid_migrations_is_original_plugin_version_older_than($version)
699
  {
700
  $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
@@ -1631,7 +1646,7 @@ function ecwid_store_activate() {
1631
  $shortcode = Ecwid_Shortcode_Base::get_current_store_shortcode_name();
1632
 
1633
  $content = <<<EOT
1634
- [$shortcode widgets="productbrowser minicart search" grid="$defaults[grid_rows],$defaults[grid_columns]" list="$defaults[list_rows]" table="$defaults[table_rows]" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]
1635
  EOT;
1636
  add_option("ecwid_store_page_id", '', '', 'yes');
1637
 
@@ -2847,9 +2862,16 @@ function ecwid_get_product_browser_url_script()
2847
  $str = '';
2848
  if (ecwid_is_store_page_available() && !Ecwid_Store_Page::is_store_page()) {
2849
 
2850
- $url = Ecwid_Store_Page::get_store_url();
2851
 
2852
- $str = '<script data-cfasync="false" type="text/javascript">var ecwid_ProductBrowserURL = "' . esc_js($url) . '";</script>';
 
 
 
 
 
 
 
2853
  }
2854
 
2855
  return $str;
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: 6.2
9
+ Author URI: https://ecwid.to/ecwid-site
10
  */
11
 
12
  register_activation_hook( __FILE__, 'ecwid_store_activate' );
135
  require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-wp-dashboard-feed.php';
136
  require_once ECWID_PLUGIN_DIR . 'includes/importer/importer.php';
137
 
138
+ $version = get_bloginfo('version');
139
+ if (version_compare($version, '4.0') >= 0) {
140
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-customizer.php';
141
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-floating-minicart.php';
142
+ }
143
+
144
  $ecwid_script_rendered = false; // controls single script.js on page
145
 
146
 
295
  $adds_slash = $req . '/' == $redir;
296
  $adds_slash |= urldecode($req . '/') == urldecode($redir);
297
 
298
+ if (Ecwid_Store_Page::is_store_page() && $adds_slash) {
299
+ return $req;
300
  }
301
 
302
  return $redir;
661
  // Since 6.0.x
662
  add_option( 'ecwid_hide_prefetch', 'off' );
663
 
664
+ // Since 6.1.x
665
+ Ecwid_Floating_Minicart::create_default_options();
666
+ add_option( 'ecwid_hide_old_minicart', ecwid_is_recent_installation() );
667
+
668
  Ecwid_Config::load_from_ini();
669
 
670
  add_option( 'force_scriptjs_render', false );
705
  return $woo;
706
  }
707
 
708
+ function ecwid_is_recent_installation()
709
+ {
710
+ return get_option( 'ecwid_plugin_migration_since_version' ) == get_option('ecwid_plugin_version' );
711
+ }
712
+
713
  function ecwid_migrations_is_original_plugin_version_older_than($version)
714
  {
715
  $migration_since_version = get_option('ecwid_plugin_migration_since_version', null);
1646
  $shortcode = Ecwid_Shortcode_Base::get_current_store_shortcode_name();
1647
 
1648
  $content = <<<EOT
1649
+ [$shortcode widgets="productbrowser search" grid="$defaults[grid_rows],$defaults[grid_columns]" list="$defaults[list_rows]" table="$defaults[table_rows]" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]
1650
  EOT;
1651
  add_option("ecwid_store_page_id", '', '', 'yes');
1652
 
2862
  $str = '';
2863
  if (ecwid_is_store_page_available() && !Ecwid_Store_Page::is_store_page()) {
2864
 
2865
+ $url = esc_js( Ecwid_Store_Page::get_store_url() );
2866
 
2867
+
2868
+ $str = <<<HTML
2869
+ <script data-cfasync="false" type="text/javascript">
2870
+ window.ec = window.ec || Object();
2871
+ window.ec.config = window.ec.config || Object();
2872
+ window.ec.config.store_main_page_url = '$url';
2873
+ </script>
2874
+ HTML;
2875
  }
2876
 
2877
  return $str;
includes/class-ecwid-admin.php CHANGED
@@ -290,7 +290,11 @@ class Ecwid_Admin {
290
  } else {
291
  $match = array();
292
 
293
- $slug = mb_strtolower( $title );
 
 
 
 
294
  $result = preg_match_all( '#[\p{L}0-9\-_]+#u', $slug, $match );
295
 
296
  if ( $result && count( @$match[0] ) > 0 ) {
290
  } else {
291
  $match = array();
292
 
293
+ if ( function_exists( 'mb_strtolower' ) ) {
294
+ $slug = mb_strtolower( $title );
295
+ } else {
296
+ $slug = strtolower( $title );
297
+ }
298
  $result = preg_match_all( '#[\p{L}0-9\-_]+#u', $slug, $match );
299
 
300
  if ( $result && count( @$match[0] ) > 0 ) {
includes/class-ecwid-customizer.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-floating-minicart.php';
4
+
5
+ class Ecwid_Customizer
6
+ {
7
+ public function __construct()
8
+ {
9
+ add_action( 'customize_register', array( $this, 'customize_register' ) );
10
+
11
+ add_action( 'customize_preview_init', array( $this, 'preview_init' ) );
12
+ add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_customize_scripts' ) );
13
+ }
14
+
15
+ public function enqueue_customize_scripts()
16
+ {
17
+ EcwidPlatform::enqueue_script( 'minicart-customize-admin', array(), true );
18
+ EcwidPlatform::enqueue_style( 'minicart-customize-admin', array(), true );
19
+ }
20
+
21
+ public function customize_register( $wp_customize )
22
+ {
23
+ $panel = 'ec-store';
24
+ $section = 'ec-store-minicart';
25
+
26
+ $wp_customize->add_panel( $panel, array(
27
+ 'title' => Ecwid_Config::get_brand(),
28
+ 'capability' => Ecwid_Admin::get_capability()
29
+ ) );
30
+
31
+ $wp_customize->add_section( $section, array(
32
+ 'title' => __( 'Shopping Cart Widget', 'ecwid-shopping-cart' ),
33
+ 'priority' => 50,
34
+ 'capability' => Ecwid_Admin::get_capability(),
35
+ 'panel' => $panel
36
+ ) );
37
+
38
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_WIDGET_DISPLAY, array(
39
+ 'type' => 'option',
40
+ 'transport' => 'postMessage'
41
+ ) );
42
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_WIDGET_DISPLAY, array(
43
+ 'type' => 'select',
44
+ 'label' => __( 'Display shopping cart', 'ecwid-shopping-cart' ),
45
+ 'section' => $section,
46
+ 'description' => __( 'Note: when enabled, the cart widget is always displayed in preview to make it easier to customize it. The "Show on store pages" and "Show when empty" options will apply to the cart widget on site when published', 'ecwid-shopping-cart' ),
47
+ 'settings' => Ecwid_Floating_Minicart::OPTION_WIDGET_DISPLAY,
48
+ 'choices' => Ecwid_Floating_Minicart::get_display_options()
49
+ ) ) );
50
+
51
+
52
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_SHOW_EMPTY_CART, array(
53
+ 'type' => 'option',
54
+ 'transport' => 'postMessage'
55
+ ) );
56
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_SHOW_EMPTY_CART, array(
57
+ 'type' => 'checkbox',
58
+ 'label' => __( 'Show when empty', 'ecwid-shopping-cart' ),
59
+ 'section' => $section,
60
+ 'settings' => Ecwid_Floating_Minicart::OPTION_SHOW_EMPTY_CART,
61
+ ) ) );
62
+
63
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_LAYOUT, array(
64
+ 'type' => 'option',
65
+ 'transport' => 'postMessage'
66
+ ) );
67
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_LAYOUT, array(
68
+ 'type' => 'select',
69
+ 'label' => __( 'Layout', 'ecwid-shopping-cart' ),
70
+ 'section' => $section,
71
+ 'settings' => Ecwid_Floating_Minicart::OPTION_LAYOUT,
72
+ 'choices' => Ecwid_Floating_Minicart::get_layouts()
73
+ ) ) );
74
+
75
+
76
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_FIXED_SHAPE, array(
77
+ 'type' => 'option',
78
+ 'transport' => 'postMessage'
79
+ ) );
80
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_FIXED_SHAPE, array(
81
+ 'type' => 'select',
82
+ 'label' => __( 'Border', 'ecwid-shopping-cart' ),
83
+ 'section' => $section,
84
+ 'settings' => Ecwid_Floating_Minicart::OPTION_FIXED_SHAPE,
85
+ 'choices' => Ecwid_Floating_Minicart::get_fixed_shapes()
86
+ ) ) );
87
+
88
+
89
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_ICON, array(
90
+ 'type' => 'option',
91
+ 'transport' => 'postMessage'
92
+ ) );
93
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_ICON, array(
94
+ 'type' => 'select',
95
+ 'label' => __( 'Icon', 'ecwid-shopping-cart' ),
96
+ 'section' => $section,
97
+ 'settings' => Ecwid_Floating_Minicart::OPTION_ICON,
98
+ 'choices' => Ecwid_Floating_Minicart::get_icons()
99
+ ) ) );
100
+
101
+
102
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_FIXED_POSITION, array(
103
+ 'type' => 'option',
104
+ 'transport' => 'postMessage'
105
+ ) );
106
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_FIXED_POSITION, array(
107
+ 'type' => 'select',
108
+ 'label' => __( 'Position', 'ecwid-shopping-cart' ),
109
+ 'section' => $section,
110
+ 'settings' => Ecwid_Floating_Minicart::OPTION_FIXED_POSITION,
111
+ 'choices' => Ecwid_Floating_Minicart::get_fixed_positions()
112
+ ) ) );
113
+
114
+
115
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_HORIZONTAL_INDENT, array(
116
+ 'type' => 'option',
117
+ 'transport' => 'postMessage'
118
+ ) );
119
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_HORIZONTAL_INDENT, array(
120
+ 'type' => 'number',
121
+ 'label' => __( 'Horizontal indent', 'ecwid-shopping-cart' ),
122
+ 'section' => $section,
123
+ 'settings' => Ecwid_Floating_Minicart::OPTION_HORIZONTAL_INDENT,
124
+ ) ) );
125
+
126
+ $wp_customize->add_setting( Ecwid_Floating_Minicart::OPTION_VERTICAL_INDENT, array(
127
+ 'type' => 'option',
128
+ 'transport' => 'postMessage'
129
+ ) );
130
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, Ecwid_Floating_Minicart::OPTION_VERTICAL_INDENT, array(
131
+ 'type' => 'number',
132
+ 'label' => __( 'Vertical indent', 'ecwid-shopping-cart' ),
133
+ 'section' => $section,
134
+ 'settings' => Ecwid_Floating_Minicart::OPTION_VERTICAL_INDENT,
135
+ ) ) );
136
+ }
137
+
138
+ public function preview_init() {
139
+ EcwidPlatform::enqueue_script( 'minicart-customize', array(), true );
140
+ }
141
+ }
142
+
143
+ new Ecwid_Customizer();
includes/class-ecwid-floating-minicart.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ if ( version_compare( get_bloginfo('version'), '4.0' ) >= 0 ) {
5
+
6
+ class Ecwid_Floating_Minicart
7
+ {
8
+ const OPTION_WIDGET_DISPLAY = 'ec_show_floating_cart_widget';
9
+ const OPTION_FIXED_POSITION = 'ec_store_cart_widget_fixed_position';
10
+ const OPTION_ICON = 'ec_store_cart_widget_icon';
11
+ const OPTION_FIXED_SHAPE = 'ec_store_cart_widget_fixed_shape';
12
+ const OPTION_LAYOUT = 'ec_store_cart_widget_layout';
13
+ const OPTION_SHOW_EMPTY_CART = 'ec_store_cart_widget_show_empty_cart';
14
+ const OPTION_HORIZONTAL_INDENT = 'ec_store_cart_widget_horizontal_indent';
15
+ const OPTION_VERTICAL_INDENT = 'ec_store_cart_widget_vertical_indent';
16
+
17
+ const DISPLAY_NONE = 'do_not_show';
18
+ const DISPLAY_STORE = 'show_on_store_pages';
19
+ const DISPLAY_ALL = 'show_on_all_pages';
20
+
21
+ const CUSTOMIZE_ID = 'ec-customize-cart';
22
+
23
+ public function __construct()
24
+ {
25
+ add_action('wp_footer', array($this, 'display'));
26
+ }
27
+
28
+ public function display()
29
+ {
30
+ $display = get_option(self::OPTION_WIDGET_DISPLAY);
31
+
32
+ if (!array_key_exists($display, self::get_display_options())) {
33
+ $display = self::DISPLAY_NONE;
34
+ }
35
+
36
+ if ($display == self::DISPLAY_NONE && !is_customize_preview()) {
37
+ return;
38
+ }
39
+
40
+ if ($display == self::DISPLAY_STORE && !Ecwid_Store_Page::is_store_page() && !is_customize_preview()) {
41
+ return;
42
+ }
43
+
44
+ echo ecwid_get_scriptjs_code();
45
+
46
+ $position = esc_attr(get_option(self::OPTION_FIXED_POSITION));
47
+ $shape = esc_attr(get_option(self::OPTION_FIXED_SHAPE));
48
+ $layout = esc_attr(get_option(self::OPTION_LAYOUT));
49
+ $show_empty = esc_attr(get_option(self::OPTION_SHOW_EMPTY_CART) ? 'TRUE' : 'FALSE');
50
+ $icon = esc_attr(get_option(self::OPTION_ICON));
51
+
52
+ $hindent = esc_attr(get_option(self::OPTION_HORIZONTAL_INDENT));
53
+ $vindent = esc_attr(get_option(self::OPTION_VERTICAL_INDENT));
54
+
55
+ $customize_id = is_customize_preview() ? 'id="' . self::CUSTOMIZE_ID . '"' : '';
56
+ $customize_hide = is_customize_preview() && $display == self::DISPLAY_NONE ? 'style="display:none"' : '';
57
+
58
+ echo <<<HTML
59
+ <div $customize_id $customize_hide class='ec-cart-widget'
60
+ data-fixed='true'
61
+ data-fixed-position='$position'
62
+ data-fixed-shape='$shape'
63
+ data-horizontal-indent="$hindent"
64
+ data-vertical-indent="$vindent"
65
+ data-layout='$layout'
66
+ data-show-empty-cart='$show_empty'
67
+ data-show-buy-animation='true'
68
+ data-icon='$icon'
69
+ ></div>
70
+
71
+ <script>
72
+ Ecwid.init();
73
+ </script>
74
+ HTML;
75
+ }
76
+
77
+ public static function create_default_options()
78
+ {
79
+
80
+ $options = self::_get_default_options();
81
+ if (!ecwid_is_recent_installation()) {
82
+ $options[self::OPTION_WIDGET_DISPLAY] = self::DISPLAY_NONE;
83
+ }
84
+
85
+ foreach ($options as $name => $value) {
86
+ add_option($name, $value);
87
+ }
88
+ }
89
+
90
+ protected static function _get_default_options()
91
+ {
92
+ return array(
93
+ self::OPTION_WIDGET_DISPLAY => self::DISPLAY_STORE,
94
+ self::OPTION_SHOW_EMPTY_CART => true,
95
+ self::OPTION_LAYOUT => 'MEDIUM_ICON_COUNTER',
96
+ self::OPTION_FIXED_SHAPE => 'PILL',
97
+ self::OPTION_FIXED_POSITION => 'BOTTOM_RIGHT',
98
+ self::OPTION_ICON => 'BAG',
99
+ self::OPTION_HORIZONTAL_INDENT => '30',
100
+ self::OPTION_VERTICAL_INDENT => '30',
101
+ );
102
+ }
103
+
104
+ public static function get_display_options()
105
+ {
106
+ return array(
107
+ self::DISPLAY_NONE => __('Do not show', 'ecwid-shopping-cart'),
108
+ self::DISPLAY_STORE => __('Show on store pages', 'ecwid-shopping-cart'),
109
+ self::DISPLAY_ALL => __('Show on all pages', 'ecwid-shopping-cart')
110
+ );
111
+ }
112
+
113
+ public static function get_layouts()
114
+ {
115
+ return array(
116
+ 'SMALL_ICON' => __('Small icon', 'ecwid-shopping-cart'),
117
+ 'SMALL_ICON_COUNTER' => __('Small icon and item count', 'ecwid-shopping-cart'),
118
+ 'COUNTER_ONLY' => __('Item count only', 'ecwid-shopping-cart'),
119
+ 'TITLE_COUNTER' => __('Label and item count', 'ecwid-shopping-cart'),
120
+ 'MEDIUM_ICON_COUNTER' => __('Icon and item count', 'ecwid-shopping-cart'),
121
+ 'MEDIUM_ICON_TITLE_COUNTER' => __('Icon, label and item count', 'ecwid-shopping-cart'),
122
+ 'BIG_ICON_TITLE_SUBTOTAL' => __('Icon, label, item count and subtotal', 'ecwid-shopping-cart'),
123
+ 'BIG_ICON_DETAILS_SUBTOTAL' => __('Icon, label, item count, subtotal and link', 'ecwid-shopping-cart')
124
+ );
125
+ }
126
+
127
+ public static function get_icons()
128
+ {
129
+ return array(
130
+ 'BAG' => __('Bag', 'ecwid-shopping-cart'),
131
+ 'CART' => __('Cart', 'ecwid-shopping-cart'),
132
+ 'BASKET' => __('Basket', 'ecwid-shopping-cart')
133
+ );
134
+ }
135
+
136
+ public static function get_fixed_shapes()
137
+ {
138
+ return array(
139
+ 'RECT' => __('Rectangle', 'ecwid-shopping-cart'),
140
+ 'PILL' => __('Pill', 'ecwid-shopping-cart'),
141
+ '' => __('No border', 'ecwid-shopping-cart')
142
+ );
143
+ }
144
+
145
+ public static function get_fixed_positions()
146
+ {
147
+ return array(
148
+ 'BOTTOM_RIGHT' => __('Bottom right', 'ecwid-shopping-cart'),
149
+ 'TOP_RIGHT' => __('Top right', 'ecwid-shopping-cart'),
150
+ 'TOP_LEFT' => __('Top left', 'ecwid-shopping-cart'),
151
+ 'BOTTOM_LEFT' => __('Bottom left', 'ecwid-shopping-cart')
152
+ );
153
+ }
154
+ }
155
+
156
+ $minicart = new Ecwid_Floating_Minicart();
157
+
158
+ }
includes/class-ecwid-html-meta.php CHANGED
@@ -118,7 +118,12 @@ abstract class Ecwid_HTML_Meta
118
 
119
  $description = preg_replace( '![\p{Z}\s]{1,}!u', ' ', $description );
120
  $description = trim( $description, " \t\xA0\n\r" ); // Space, tab, non-breaking space, newline, carriage return
121
- $description = mb_substr( $description, 0, $length ? $length : ECWID_TRIMMED_DESCRIPTION_LENGTH, 'UTF-8' );
 
 
 
 
 
122
  $description = htmlspecialchars( $description, ENT_COMPAT, 'UTF-8' );
123
 
124
  return $description;
118
 
119
  $description = preg_replace( '![\p{Z}\s]{1,}!u', ' ', $description );
120
  $description = trim( $description, " \t\xA0\n\r" ); // Space, tab, non-breaking space, newline, carriage return
121
+
122
+ if ( function_exists( 'mb_substr' ) ) {
123
+ $description = mb_substr( $description, 0, $length ? $length : ECWID_TRIMMED_DESCRIPTION_LENGTH, 'UTF-8' );
124
+ } else {
125
+ $description = substr( $description, 0, $length ? $length : ECWID_TRIMMED_DESCRIPTION_LENGTH );
126
+ }
127
  $description = htmlspecialchars( $description, ENT_COMPAT, 'UTF-8' );
128
 
129
  return $description;
includes/class-ecwid-message-manager.php CHANGED
@@ -309,7 +309,7 @@ TXT
309
  && !ecwid_is_demo_store()
310
  && !get_option( Ecwid_Importer::OPTION_WOO_CATALOG_IMPORTED, false )
311
  && wp_count_posts( 'product' )->publish > 0
312
- && get_option( 'ecwid_plugin_migration_since_version' ) == get_option('ecwid_plugin_version' );
313
 
314
  case 'please_vote':
315
 
309
  && !ecwid_is_demo_store()
310
  && !get_option( Ecwid_Importer::OPTION_WOO_CATALOG_IMPORTED, false )
311
  && wp_count_posts( 'product' )->publish > 0
312
+ && ecwid_is_recent_installation();
313
 
314
  case 'please_vote':
315
 
includes/class-ecwid-nav-menus.php CHANGED
@@ -212,8 +212,6 @@ class Ecwid_Nav_Menus {
212
  $api = new Ecwid_Api_V3();
213
  $result = $api->get_categories( array( 'parent' => 0 ) );
214
 
215
-
216
-
217
  if ( $result && $result->count > 0 ) {
218
 
219
  $categories = $result->items;
@@ -233,7 +231,7 @@ class Ecwid_Nav_Menus {
233
  $post->to_ping = '';
234
  $post->pinged = '';
235
  $post->post_parent = 0;
236
- $post->url = $category->link;
237
  $post->classes = '';
238
  $post->type = 'post';
239
  $post->db_id = 0;
@@ -273,7 +271,11 @@ class Ecwid_Nav_Menus {
273
  return $attributes;
274
  }
275
 
276
- $attributes['data-ecwid-page'] = $item->ecwid_page_type;
 
 
 
 
277
 
278
  if ( $item->ecwid_page_type == 'category' ) {
279
  $attributes['data-ecwid-category-id'] = $item->ecwid_category_id;
212
  $api = new Ecwid_Api_V3();
213
  $result = $api->get_categories( array( 'parent' => 0 ) );
214
 
 
 
215
  if ( $result && $result->count > 0 ) {
216
 
217
  $categories = $result->items;
231
  $post->to_ping = '';
232
  $post->pinged = '';
233
  $post->post_parent = 0;
234
+ $post->url = $category->get_link( Ecwid_Store_Page::get_store_url() );
235
  $post->classes = '';
236
  $post->type = 'post';
237
  $post->db_id = 0;
271
  return $attributes;
272
  }
273
 
274
+ if ( Ecwid_Store_Page::get_current_store_page_id() != get_the_ID() ) {
275
+ return $attributes;
276
+ }
277
+
278
+ $attributes['data-ecwid-page'] = $item->ecwid_page_type;
279
 
280
  if ( $item->ecwid_page_type == 'category' ) {
281
  $attributes['data-ecwid-category-id'] = $item->ecwid_category_id;
includes/class-ecwid-seo-links.php CHANGED
@@ -254,23 +254,25 @@ JS;
254
 
255
  $all_base_urls = $this->_build_all_base_urls();
256
 
257
- if ( $this->is_store_on_home_page() ) {
258
- $patterns = $this->get_seo_links_patterns();
259
- foreach ( $patterns as $pattern ) {
260
- add_rewrite_rule( '^' . $pattern . '$', 'index.php?page_id=' . get_option( 'page_on_front' ), 'top' );
261
- }
262
- }
263
-
264
  foreach ( $all_base_urls as $page_id => $links ) {
265
  $patterns = $this->get_seo_links_patterns();
266
 
 
 
267
  foreach ( $links as $link ) {
268
  foreach ( $patterns as $pattern ) {
269
  add_rewrite_rule( '^' . $link . '/' . $pattern . '.*', 'index.php?page_id=' . $page_id, 'top' );
270
  }
271
  }
272
  }
273
-
 
 
 
 
 
 
 
274
  update_option( self::OPTION_ALL_BASE_URLS, array_merge( $all_base_urls, array( 'home' => $this->is_store_on_home_page() ) ) );
275
  }
276
 
254
 
255
  $all_base_urls = $this->_build_all_base_urls();
256
 
 
 
 
 
 
 
 
257
  foreach ( $all_base_urls as $page_id => $links ) {
258
  $patterns = $this->get_seo_links_patterns();
259
 
260
+ if ( !in_array( get_post( $page_id )->post_type, array( 'page', 'post' ) ) ) continue;
261
+
262
  foreach ( $links as $link ) {
263
  foreach ( $patterns as $pattern ) {
264
  add_rewrite_rule( '^' . $link . '/' . $pattern . '.*', 'index.php?page_id=' . $page_id, 'top' );
265
  }
266
  }
267
  }
268
+
269
+ if ( $this->is_store_on_home_page() ) {
270
+ $patterns = $this->get_seo_links_patterns();
271
+ foreach ( $patterns as $pattern ) {
272
+ add_rewrite_rule( '^' . $pattern . '$', 'index.php?page_id=' . get_option( 'page_on_front' ), 'top' );
273
+ }
274
+ }
275
+
276
  update_option( self::OPTION_ALL_BASE_URLS, array_merge( $all_base_urls, array( 'home' => $this->is_store_on_home_page() ) ) );
277
  }
278
 
includes/class-ecwid-store-page.php CHANGED
@@ -110,7 +110,7 @@ class Ecwid_Store_Page {
110
 
111
  $link = get_permalink( $id );
112
  }
113
-
114
  return $link;
115
  }
116
 
@@ -130,7 +130,7 @@ class Ecwid_Store_Page {
130
 
131
  $post = get_post( $id );
132
  $changed = false;
133
-
134
  while ( is_null( $post ) ) {
135
 
136
  $changed = true;
110
 
111
  $link = get_permalink( $id );
112
  }
113
+
114
  return $link;
115
  }
116
 
130
 
131
  $post = get_post( $id );
132
  $changed = false;
133
+
134
  while ( is_null( $post ) ) {
135
 
136
  $changed = true;
includes/oembed.php CHANGED
@@ -68,7 +68,10 @@ function ecwid_get_embed_content()
68
  $trimmed = ecwid_trim_description($category->description);
69
  $result .= '<div>' . ecwid_trim_description($category->description);
70
 
71
- if (mb_strlen($trimmed) < mb_strlen($category->description) && mb_strlen($trimmed) == ECWID_TRIMMED_DESCRIPTION_LENGTH) {
 
 
 
72
  $result .= '... <a class="wp-embed-more" href="' . get_permalink() . '">' . __('See more', 'ecwid-shopping-cart') . '</a>';
73
  }
74
  $result .= '</div>';
68
  $trimmed = ecwid_trim_description($category->description);
69
  $result .= '<div>' . ecwid_trim_description($category->description);
70
 
71
+ $descr_length = function_exists( 'mb_strlen' ) ? mb_strlen( $category->description ) : strlen( $category->description );
72
+ $trimmed_length = function_exists( 'mb_strlen' ) ? mb_strlen( $trimmed ) : strlen( $trimmed );
73
+
74
+ if ( $trimmed_length < $descr_length && $trimmed_length == ECWID_TRIMMED_DESCRIPTION_LENGTH ) {
75
  $result .= '... <a class="wp-embed-more" href="' . get_permalink() . '">' . __('See more', 'ecwid-shopping-cart') . '</a>';
76
  }
77
  $result .= '</div>';
includes/widgets.php CHANGED
@@ -32,7 +32,9 @@ function ecwid_sidebar_widgets_init() {
32
 
33
  register_widget('Ecwid_Widget_Search');
34
 
35
- register_widget('Ecwid_Widget_NSF_Minicart');
 
 
36
 
37
  $old_minicarts = array(
38
  'ecwidminicart_miniview' => 'Ecwid_Widget_Minicart_Miniview',
@@ -40,7 +42,7 @@ function ecwid_sidebar_widgets_init() {
40
  'ecwidfloatingshoppingcart' => 'Ecwid_Widget_Floating_Shopping_Cart' );
41
 
42
  foreach ( $old_minicarts as $idbase => $widget_class ) {
43
- if ( is_active_widget( false, false, $idbase ) ) {
44
  register_widget( $widget_class );
45
  }
46
  }
32
 
33
  register_widget('Ecwid_Widget_Search');
34
 
35
+ if ( version_compare( get_bloginfo('version'), '4.0' ) >= 0 ) {
36
+ register_widget('Ecwid_Widget_NSF_Minicart');
37
+ }
38
 
39
  $old_minicarts = array(
40
  'ecwidminicart_miniview' => 'Ecwid_Widget_Minicart_Miniview',
42
  'ecwidfloatingshoppingcart' => 'Ecwid_Widget_Floating_Shopping_Cart' );
43
 
44
  foreach ( $old_minicarts as $idbase => $widget_class ) {
45
+ if ( is_active_widget( false, false, $idbase ) || version_compare( get_bloginfo('version'), '4.0' ) < 0 ) {
46
  register_widget( $widget_class );
47
  }
48
  }
includes/widgets/class-ecwid-widget-nsf-minicart.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  // nsf stands for new storefront I guess
3
  class Ecwid_Widget_NSF_Minicart extends WP_Widget {
4
 
@@ -20,6 +21,14 @@ class Ecwid_Widget_NSF_Minicart extends WP_Widget {
20
 
21
  function widget($args, $instance) {
22
  extract($args);
 
 
 
 
 
 
 
 
23
  $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
24
 
25
  echo $before_widget;
@@ -60,34 +69,4 @@ class Ecwid_Widget_NSF_Minicart extends WP_Widget {
60
 
61
  require 'nsf-minicart-editor.tpl.php';
62
  }
63
-
64
- protected function _get_layouts() {
65
- return array(
66
- 'SMALL_ICON' => __( 'Small icon', 'ecwid-shopping-cart' ),
67
- 'SMALL_ICON_COUNTER' => __( 'Small icon and item count', 'ecwid-shopping-cart' ),
68
- 'COUNTER_ONLY' => __( 'Item count only', 'ecwid-shopping-cart' ),
69
- 'TITLE_COUNTER' => __( 'Label and item count', 'ecwid-shopping-cart' ),
70
- 'MEDIUM_ICON_COUNTER' => __( 'Icon and item count', 'ecwid-shopping-cart' ),
71
- 'MEDIUM_ICON_TITLE_COUNTER' => __( 'Icon, label and item count', 'ecwid-shopping-cart' ),
72
- 'BIG_ICON_TITLE_SUBTOTAL' => __( 'Icon, label, item count and subtotal', 'ecwid-shopping-cart' ),
73
- 'BIG_ICON_DETAILS_SUBTOTAL' => __( 'Icon, label, item count, subtotal and link', 'ecwid-shopping-cart' )
74
- );
75
- }
76
-
77
- protected function _get_icons() {
78
- return array(
79
- 'BAG' => __( 'Bag', 'ecwid-shopping-cart' ),
80
- 'CART' => __( 'Cart', 'ecwid-shopping-cart' ),
81
- 'BASKET' => __( 'Basket', 'ecwid-shopping-cart' )
82
- );
83
- }
84
-
85
- protected function _get_fixed_shapes() {
86
- return array(
87
- 'RECT' => __( 'Rectangle', 'ecwid-shopping-cart' ),
88
- 'PILL' => __( 'Pill', 'ecwid-shopping-cart' ),
89
- '' => __( 'No border', 'ecwid-shopping-cart' )
90
- );
91
- }
92
-
93
  }
1
  <?php
2
+
3
  // nsf stands for new storefront I guess
4
  class Ecwid_Widget_NSF_Minicart extends WP_Widget {
5
 
21
 
22
  function widget($args, $instance) {
23
  extract($args);
24
+
25
+ $instance = wp_parse_args( (array) $instance, array(
26
+ self::FIELD_TITLE => '',
27
+ self::FIELD_LAYOUT => 'BIG_ICON_TITLE_SUBTOTAL',
28
+ self::FIELD_ICON => 'BAG',
29
+ self::FIELD_FIXED_SHAPE => 'RECT'
30
+ ) );
31
+
32
  $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
33
 
34
  echo $before_widget;
69
 
70
  require 'nsf-minicart-editor.tpl.php';
71
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
includes/widgets/nsf-minicart-editor.tpl.php CHANGED
@@ -5,7 +5,7 @@
5
  name="<?php echo $this->get_field_name( self::FIELD_LAYOUT ); ?>"
6
  id="<?php echo $this->get_field_id( self::FIELD_LAYOUT ); ?>"
7
  >
8
- <?php foreach( $this->_get_layouts() as $value => $label ) : ?>
9
  <option value="<?php echo $value; ?>"<?php if ( $instance[self::FIELD_LAYOUT] == $value ): ?> selected="selected"<?php endif; ?>>
10
  <?php echo $label; ?>
11
  </option>
@@ -21,7 +21,7 @@
21
  name="<?php echo $this->get_field_name( self::FIELD_ICON ); ?>"
22
  id="<?php echo $this->get_field_id( self::FIELD_ICON ); ?>"
23
  >
24
- <?php foreach( $this->_get_icons() as $value => $label ) : ?>
25
  <option value="<?php echo $value; ?>"<?php if ( $instance[self::FIELD_ICON] == $value ): ?> selected="selected"<?php endif; ?>>
26
  <?php echo $label; ?>
27
  </option>
@@ -37,7 +37,7 @@
37
  name="<?php echo $this->get_field_name( self::FIELD_FIXED_SHAPE ); ?>"
38
  id="<?php echo $this->get_field_id( self::FIELD_FIXED_SHAPE ); ?>"
39
  >
40
- <?php foreach( $this->_get_fixed_shapes() as $value => $label ) : ?>
41
  <option value="<?php echo $value; ?>" <?php if ( $instance[self::FIELD_FIXED_SHAPE] == $value ): ?> selected="selected"<?php endif; ?>>
42
  <?php echo $label; ?>
43
  </option>
5
  name="<?php echo $this->get_field_name( self::FIELD_LAYOUT ); ?>"
6
  id="<?php echo $this->get_field_id( self::FIELD_LAYOUT ); ?>"
7
  >
8
+ <?php foreach( Ecwid_Floating_Minicart::get_layouts() as $value => $label ) : ?>
9
  <option value="<?php echo $value; ?>"<?php if ( $instance[self::FIELD_LAYOUT] == $value ): ?> selected="selected"<?php endif; ?>>
10
  <?php echo $label; ?>
11
  </option>
21
  name="<?php echo $this->get_field_name( self::FIELD_ICON ); ?>"
22
  id="<?php echo $this->get_field_id( self::FIELD_ICON ); ?>"
23
  >
24
+ <?php foreach( Ecwid_Floating_Minicart::get_icons() as $value => $label ) : ?>
25
  <option value="<?php echo $value; ?>"<?php if ( $instance[self::FIELD_ICON] == $value ): ?> selected="selected"<?php endif; ?>>
26
  <?php echo $label; ?>
27
  </option>
37
  name="<?php echo $this->get_field_name( self::FIELD_FIXED_SHAPE ); ?>"
38
  id="<?php echo $this->get_field_id( self::FIELD_FIXED_SHAPE ); ?>"
39
  >
40
+ <?php foreach( Ecwid_Floating_Minicart::get_fixed_shapes() as $value => $label ) : ?>
41
  <option value="<?php echo $value; ?>" <?php if ( $instance[self::FIELD_FIXED_SHAPE] == $value ): ?> selected="selected"<?php endif; ?>>
42
  <?php echo $label; ?>
43
  </option>
js/minicart-customize-admin.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery('#customize-control-ec_show_floating_cart_widget select').change(function() {
3
+ if ( jQuery(this).val() == 'do_not_show' ) {
4
+ jQuery('[id^="customize-control-ec_store_cart"]:not(#customize-control-ec_show_floating_cart_widget)').hide();
5
+ } else {
6
+ jQuery('[id^="customize-control-ec_store_cart"]:not(#customize-control-ec_show_floating_cart_widget)').show();
7
+ }
8
+ }).trigger('change');
9
+ })
js/minicart-customize.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $ ) {
2
+
3
+ props = [
4
+ 'ec_store_cart_widget_layout',
5
+ 'ec_store_cart_widget_icon',
6
+ 'ec_store_cart_widget_fixed_shape',
7
+ 'ec_store_cart_widget_fixed_position',
8
+ 'ec_store_cart_widget_horizontal_indent',
9
+ 'ec_store_cart_widget_vertical_indent'
10
+ ];
11
+
12
+ propsmap = {
13
+ 'ec_store_cart_widget_layout': 'layout',
14
+ 'ec_store_cart_widget_icon': 'icon',
15
+ 'ec_store_cart_widget_fixed_shape': 'fixed-shape',
16
+ 'ec_store_cart_widget_fixed_position': 'fixed-position',
17
+ 'ec_store_cart_widget_horizontal_indent': 'horizontal-indent',
18
+ 'ec_store_cart_widget_vertical_indent': 'vertical-indent'
19
+ };
20
+
21
+ for (var i = 0; i < props.length; i++) {
22
+ wp.customize(props[i], function( value ) {
23
+
24
+ value.bind( function(newval) {
25
+ var name = 'data-' + propsmap[this.id];
26
+
27
+ jQuery('#ec-customize-cart').attr(name, newval).attr('data-ec-widget-loaded', null);
28
+
29
+ Ecwid.renderCartWidget(document.getElementById('ec-customize-cart'));
30
+ });
31
+ });
32
+ }
33
+
34
+ wp.customize( 'ec_show_floating_cart_widget', function( value ) {
35
+ value.bind( function( newval ) {
36
+ jQuery('#ec-customize-cart').css('display', newval != 'do_not_show' ? 'block' : 'none');
37
+ } );
38
+ } );
39
+
40
+ } )( jQuery );
js/store-editor-gutenberg.js CHANGED
@@ -40,7 +40,7 @@ jQuery(document).ready(function() {
40
  getDefaultParams = function() {
41
  return {
42
  'show_search': true,
43
- 'show_minicart': true,
44
  'show_categories': false,
45
  'categories_per_row': 3,
46
  'grid_rows': ecwid_pb_defaults.grid_rows,
40
  getDefaultParams = function() {
41
  return {
42
  'show_search': true,
43
+ 'show_minicart': false,
44
  'show_categories': false,
45
  'categories_per_row': 3,
46
  'grid_rows': ecwid_pb_defaults.grid_rows,
js/store-editor-page.js CHANGED
@@ -62,7 +62,7 @@ jQuery(document).ready(function() {
62
 
63
  var widgets = attributes.widgets;
64
  if (typeof widgets == 'undefined') {
65
- widgets = "productbrowser search categories minicart";
66
  }
67
 
68
  widgets = widgets.split(/[^a-z^A-Z^0-9^-^_]/);
@@ -92,7 +92,7 @@ jQuery(document).ready(function() {
92
  getDefaultParams = function() {
93
  return {
94
  'show_search': true,
95
- 'show_minicart': true,
96
  'show_categories': false,
97
  'categories_per_row': 3,
98
  'grid_rows': ecwid_pb_defaults.grid_rows,
62
 
63
  var widgets = attributes.widgets;
64
  if (typeof widgets == 'undefined') {
65
+ widgets = "productbrowser search";
66
  }
67
 
68
  widgets = widgets.split(/[^a-z^A-Z^0-9^-^_]/);
92
  getDefaultParams = function() {
93
  return {
94
  'show_search': true,
95
+ 'show_minicart': false,
96
  'show_categories': false,
97
  'categories_per_row': 3,
98
  'grid_rows': ecwid_pb_defaults.grid_rows,
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.9
6
- Stable tag: 6.1.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
 
@@ -47,22 +47,22 @@ With Ecwid, you can include your online shop on multiple websites, blogs, social
47
 
48
  = Mobile Responsive Design =
49
 
50
- Ecwid works great on any Wordpress site, especially those running on mobile-optimized themes. Your online store looks perfect on smartphones and automatically adapts to your customer’s screen size: laptops, tablets, smart TVs or smart watches. Check out this [demo](http://www.ecwid.com/demo?source=wporg-plugin-site)
51
 
52
 
53
  = Your Favorite Free Plugin =
54
 
55
- Ecwid offers a free plan that’s always available with no hidden setup charges or transaction fees. Get your online store up and running at zero cost. As your online shop grows, Ecwid grows with you. When the time is right, consider upgrading to one of our premium plans to get more robust features and preferred support. See also: [Ecwid plan and pricing](http://www.ecwid.com/pricing?source=wporg-plugin-site)
56
 
57
 
58
  = See Ecwid In Action =
59
 
60
- * [Demo Store](http://www.ecwid.com/demo?source=wporg-plugin-site "Ecwid demo")
61
- * [Ecwid Ecommerce Control panel](https://my.ecwid.com/?source=wporg-plugin-site "Ecwid Control Panel") (you will be able to create a free Ecwid account)
62
 
63
  = Ecwid Site =
64
 
65
- * [www.ecwid.com](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid site")
66
 
67
 
68
 
@@ -118,7 +118,7 @@ Ecwid shopping cart plans vary by number of products, types of ecommerce functio
118
  * Venture - $15/month
119
  * Business - $35/month
120
  * Unlimited - $99/month
121
- Pro Tip: you can save money by enrolling in our annual plans. For more information, check out our [pricing page](https://www.ecwid.com/pricing).
122
 
123
 
124
  = How can I manage my online shop from a mobile device? =
@@ -151,6 +151,13 @@ You can use Ecwid’s built-in import tools to copy your store products from any
151
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
152
 
153
  == Changelog ==
 
 
 
 
 
 
 
154
  = 6.1.1 - May 30, 2018 =
155
  - **Compatibility with Gutenberg: buy now buttons in the page editor.** Gutenberg editor is getting more and more popular and will soon be the default WordPress editor. To make sure Ecwid users are ready for it, we are adding Gutenberg support to our plugin. In the previous update, we added a “Store” block to the Gutenberg editor toolbar. This update brings another button to the editor toolbar — “Ecwid product”. Use this one to add product widgets and buy now buttons to the pages and posts of your site.
156
  - **Revamped cart widget for sidebar.** We added a new sidebar widget that allows to display a cart icon along with items count and subtotal in the sidebar. The new shopping cart icon widget looks better and provides a lot of layout customization options — don’t forget to play with its settings when adding it to your sidebar. You can find the new widget under Appearance → Widgets in your Wordpress admin backend.
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.9
6
+ Stable tag: 6.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
 
47
 
48
  = Mobile Responsive Design =
49
 
50
+ Ecwid works great on any Wordpress site, especially those running on mobile-optimized themes. Your online store looks perfect on smartphones and automatically adapts to your customer’s screen size: laptops, tablets, smart TVs or smart watches. Check out this [demo](https://ecwid.to/ecwid-demo-store)
51
 
52
 
53
  = Your Favorite Free Plugin =
54
 
55
+ Ecwid offers a free plan that’s always available with no hidden setup charges or transaction fees. Get your online store up and running at zero cost. As your online shop grows, Ecwid grows with you. When the time is right, consider upgrading to one of our premium plans to get more robust features and preferred support. See also: [Ecwid plan and pricing](https://ecwid.to/ecwid-pricing)
56
 
57
 
58
  = See Ecwid In Action =
59
 
60
+ * [Demo Store](https://ecwid.to/ecwid-demo-store "Ecwid demo")
61
+ * [Ecwid Ecommerce Control panel](https://ecwid.to/ecwid-store-control-panel "Ecwid Control Panel") (you will be able to create a free Ecwid account)
62
 
63
  = Ecwid Site =
64
 
65
+ * [www.ecwid.com](https://ecwid.to/ecwid-site "Ecwid site")
66
 
67
 
68
 
118
  * Venture - $15/month
119
  * Business - $35/month
120
  * Unlimited - $99/month
121
+ Pro Tip: you can save money by enrolling in our annual plans. For more information, check out our [pricing page](https://ecwid.to/ecwid-pricing).
122
 
123
 
124
  = How can I manage my online shop from a mobile device? =
151
  * [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
152
 
153
  == Changelog ==
154
+ = 6.2 - Jun 25, 2018 =
155
+ - **New! Revamped floating cart icon.** We added a new floating cart widget that allows to display a cart icon along with items count and subtotal in the corner of the screen. This way, it's always visible and your customers can click it to check their cart contents and proceed with checkout. The new floating shopping cart icon looks better and provides a lot of layout customization options. You can enable it in the Customizer menu under "Ecwid" section in your WordPress admin backend: (Appearance → Customize → Ecwid).
156
+ - **Fixed a "Call to undefined function mb_strtolower" error message that appeared on some hosts.** If you saw such an error message, this should be fixed now.
157
+ - **Fixed a minor issue with the way Ecwid clean URLs work with Divi theme.** If you're using Divi theme on your site, you might notice that product page links gave you a 404 error in some rare cases. It' fixed now.
158
+ - Minor fixes and improvements.
159
+
160
+
161
  = 6.1.1 - May 30, 2018 =
162
  - **Compatibility with Gutenberg: buy now buttons in the page editor.** Gutenberg editor is getting more and more popular and will soon be the default WordPress editor. To make sure Ecwid users are ready for it, we are adding Gutenberg support to our plugin. In the previous update, we added a “Store” block to the Gutenberg editor toolbar. This update brings another button to the editor toolbar — “Ecwid product”. Use this one to add product widgets and buy now buttons to the pages and posts of your site.
163
  - **Revamped cart widget for sidebar.** We added a new sidebar widget that allows to display a cart icon along with items count and subtotal in the sidebar. The new shopping cart icon widget looks better and provides a lot of layout customization options — don’t forget to play with its settings when adding it to your sidebar. You can find the new widget under Appearance → Widgets in your Wordpress admin backend.
screenshot-1.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
templates/store-popup.php CHANGED
@@ -43,7 +43,9 @@
43
  <?php ecwid_embed_svg('add-store'); ?>
44
  <label for="show_search" class="ecwid-search" data-ecwid-widget="search"></label>
45
  <label for="show_categories" class="ecwid-categories" data-ecwid-widget="categories"></label>
 
46
  <label for="show_minicart" class="ecwid-minicart" data-ecwid-widget="minicart"></label>
 
47
  </div>
48
 
49
  <div class="store-settings">
@@ -56,13 +58,15 @@
56
  <?php _e('Show search', 'ecwid-shopping-cart'); ?>
57
  </label>
58
  </div>
59
-
 
60
  <div class="pure-control-group">
61
  <label data-ecwid-widget="minicart">
62
  <input type="checkbox" name="show_minicart" id="show_minicart" />
63
  <?php _e('Show minicart', 'ecwid-shopping-cart'); ?>
64
  </label>
65
  </div>
 
66
 
67
  <div class="pure-control-group">
68
  <label data-ecwid-widget="categories">
@@ -257,3 +261,8 @@
257
  </div>
258
  <div class="media-modal-backdrop"></div>
259
  </div>
 
 
 
 
 
43
  <?php ecwid_embed_svg('add-store'); ?>
44
  <label for="show_search" class="ecwid-search" data-ecwid-widget="search"></label>
45
  <label for="show_categories" class="ecwid-categories" data-ecwid-widget="categories"></label>
46
+ <?php if ( !get_option( 'ecwid_hide_old_minicart' ) ): ?>
47
  <label for="show_minicart" class="ecwid-minicart" data-ecwid-widget="minicart"></label>
48
+ <?php endif; ?>
49
  </div>
50
 
51
  <div class="store-settings">
58
  <?php _e('Show search', 'ecwid-shopping-cart'); ?>
59
  </label>
60
  </div>
61
+
62
+ <?php if ( !get_option( 'ecwid_hide_old_minicart' ) ): ?>
63
  <div class="pure-control-group">
64
  <label data-ecwid-widget="minicart">
65
  <input type="checkbox" name="show_minicart" id="show_minicart" />
66
  <?php _e('Show minicart', 'ecwid-shopping-cart'); ?>
67
  </label>
68
  </div>
69
+ <?php endif; ?>
70
 
71
  <div class="pure-control-group">
72
  <label data-ecwid-widget="categories">
261
  </div>
262
  <div class="media-modal-backdrop"></div>
263
  </div>
264
+ <?php if ( get_option( 'ecwid_hide_old_minicart' ) ): ?>
265
+ <script>
266
+ jQuery('.ecwid-store-editor path.minicart').hide();
267
+ </script>
268
+ <?php endif; ?>