Ecwid Ecommerce Shopping Cart - Version 2.4

Version Description

  • Ability to add a single product to a page or post on your site using new [ecwid_product] shortcode. In addition to embedding a whole product catalog on your Wordpress site, you can also feature a single product on a separate page or blog post of your site and allow your customers to purchase the product right from that page. To embed a product on a page or post, add [ecwid_product id="12345"] shortcode to the page/post in your Wordpress backend. Do not forget to replace 12345 in this example with the actual product ID.

  • Better SEO for store pages. Ecwid plug-in now automatically adds product attributes to SEO-optimized versions of product pages on your site to let the search engines index attributes like UPC, brand and others along with the other product properties. Also, some improvements were applied to the format of product HTML snippets to meet the Google recommendations on how to better organize product information (title, descriptions, price etc) on the product details pages. These improvements will help search engines to better index your products and optimize their appearance in search results.

  • Slight improvements of store layout for mobile devices. All Ecwid stores are mobile-friendly by design, i.e. they adapt themselves to the given layout and look good on mobile devices, so if your site is mobile-optimized, your Ecwid store will be as well. Earlier, if you use horizontal categories widget on your Wordpress site, you might notice that it didn't fit the given width on narrow screens, e.g. when opened on a mobile device. Now, the plugin automatically hides horizontal categories widget on narrow screens to ensure better look on mobile-optimized sites.

  • Several improvements and bug fixes for plugin settings pages, store appearance and SEO.

Download this release

Release Info

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

Code changes from version 2.3.2 to 2.4

css/frontend.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ html#ecwid_html body#ecwid_body div#mini-cart-attached-to-categories.ecwid-cart-narrow-screen, div.ecwid-categories-horizontal.ecwid-categories-narrow-screen {
2
+ display: none;
3
+ }
4
+
5
+ html#ecwid_html body#ecwid_body .ecwid.ecwid-SingleProduct a ,
6
+ .ecwid-SingleProduct a div.ecwid-title {
7
+ text-decoration: none;
8
+ color: #000000;
9
+ }
css/themes/2014.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta {
2
+ max-width: none;
3
+ }
4
+
5
+ #ecwid_product_browser_scroller.ecwid-scroller-adjustment {
6
+ position: relative;
7
+ top: -48px;
8
+ }
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.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -36,15 +36,19 @@ if ( is_admin() ){
36
  add_filter('plugin_action_links_ecwid-shopping-cart/ecwid-shopping-cart.php', 'ecwid_plugin_actions');
37
  add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
38
  add_action('sm_buildmap', 'ecwid_build_sitemap_pages');
 
39
  } else {
40
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
41
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
42
  add_shortcode('ecwid_searchbox', 'ecwid_searchbox_shortcode');
43
  add_shortcode('ecwid_categories', 'ecwid_categories_shortcode');
44
  add_shortcode('ecwid_productbrowser', 'ecwid_productbrowser_shortcode');
 
45
  add_action('init', 'ecwid_backward_compatibility');
46
  add_action('send_headers', 'ecwid_503_on_store_closed');
 
47
  add_action('template_redirect', 'ecwid_404_on_broken_escaped_fragment');
 
48
  add_action('wp', 'ecwid_seo_ultimate_compatibility', 0);
49
  add_action('wp_title', 'ecwid_seo_compatibility_init', 0);
50
  add_filter('wp_title', 'ecwid_seo_title', 20);
@@ -62,6 +66,8 @@ add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
62
 
63
  $ecwid_script_rendered = false; // controls single script.js on page
64
 
 
 
65
  $version = get_bloginfo('version');
66
 
67
  function ecwid_add_breadcrumbs_navxt($trail)
@@ -79,7 +85,6 @@ function ecwid_add_breadcrumb_links_wpseo($links)
79
  )
80
  ));
81
  }
82
-
83
  if (version_compare($version, '3.6') < 0) {
84
  /**
85
  * A copy of has_shortcode functionality from wordpress 3.6
@@ -111,24 +116,6 @@ if (version_compare($version, '3.6') < 0) {
111
  }
112
  }
113
 
114
- $theme_name = '';
115
- if (version_compare($version, '3.4') < 0) {
116
- $theme_name = get_current_theme();
117
- } else {
118
- $theme = wp_get_theme();
119
- $theme_name = $theme->get('Name');
120
- }
121
- if ($theme_name == 'Twenty Fourteen') {
122
- add_action('wp_enqueue_scripts', 'ecwid_adjust_theme2014');
123
-
124
- function ecwid_adjust_theme2014() {
125
- if (ecwid_page_has_productbrowser()) {
126
- wp_register_style('ecwid_theme2014', plugins_url('ecwid-shopping-cart/css/2014adjustments.css'), array('twentyfourteen-style'), '', 'all');
127
- wp_enqueue_style('ecwid_theme2014');
128
- }
129
- }
130
- }
131
-
132
  if (is_admin()) {
133
  $main_button_class = "";
134
  if (version_compare($version, '3.8-beta') > 0) {
@@ -140,6 +127,14 @@ if (is_admin()) {
140
  define('ECWID_MAIN_BUTTON_CLASS', $main_button_class);
141
  }
142
 
 
 
 
 
 
 
 
 
143
  function ecwid_ie8_fonts_inclusion()
144
  {
145
  if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
@@ -158,6 +153,10 @@ HTML;
158
 
159
  }
160
 
 
 
 
 
161
  function ecwid_load_textdomain() {
162
  load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
163
 
@@ -228,7 +227,7 @@ function ecwid_backward_compatibility() {
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
 
@@ -409,6 +408,21 @@ function ecwid_page_has_productbrowser()
409
  $result = has_shortcode($post_content, 'ecwid_productbrowser');
410
  }
411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  return $result;
413
  }
414
 
@@ -469,7 +483,7 @@ function ecwid_meta_description() {
469
  $description = preg_replace("![\\s]+!", " ", $description);
470
  $description = trim($description, " \t\xA0\n\r"); // Space, tab, non-breaking space, newline, carriage return
471
  $description = mb_substr($description, 0, 160);
472
- $description = htmlspecialchars($description, ENT_COMPAT | ENT_HTML401, 'UTF-8');
473
 
474
  echo <<<HTML
475
  <meta name="description" content="$description" />
@@ -581,10 +595,10 @@ function ecwid_content_started($content)
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) {
@@ -655,6 +669,64 @@ EOT;
655
  }
656
  }
657
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  function ecwid_parse_escaped_fragment($escaped_fragment) {
659
  $fragment = urldecode($escaped_fragment);
660
  $return = array();
@@ -746,15 +818,24 @@ function ecwid_productbrowser_shortcode($shortcode_params) {
746
  $plain_content = '<noscript>Your browser does not support JavaScript.<a href="' . $ecwid_mobile_catalog_link .'">HTML version of this store</a></noscript>';
747
  }
748
 
749
- $s = <<<EOT
750
- <div id="ecwid-store-$store_id"></div>
751
- <script type="text/javascript"> xProductBrowser("categoriesPerRow=$ecwid_pb_categoriesperrow","views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)","categoryView=$ecwid_pb_defaultview","searchView=$ecwid_pb_searchview","style="$ecwid_default_category_str, "id=ecwid-store-$store_id");</script>
752
- {$plain_content}
 
 
 
753
  EOT;
754
  return ecwid_wrap_shortcode_content($s);
755
  }
756
 
 
 
 
 
 
757
 
 
758
 
759
  function ecwid_store_activate() {
760
  $my_post = array();
@@ -807,6 +888,7 @@ EOT;
807
  $my_post['post_status'] = 'publish';
808
  $my_post['post_author'] = 1;
809
  $my_post['post_type'] = 'page';
 
810
  $id = wp_insert_post( $my_post );
811
  update_option('ecwid_store_page_id', $id);
812
  }
@@ -910,25 +992,20 @@ function ecwid_options_add_page() {
910
 
911
  function ecwid_register_admin_styles() {
912
 
913
- wp_register_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'), array(), '', 'all');
914
- wp_enqueue_style('ecwid-admin-css');
915
 
916
  if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
917
- wp_register_style('ecwid-admin38-css', plugins_url('ecwid-shopping-cart/css/admin.3.8.css'), array('ecwid-admin-css'), '', 'all');
918
- wp_enqueue_style('ecwid-admin38-css');
919
  }
920
  }
921
 
922
  function ecwid_register_settings_styles() {
923
 
924
- wp_register_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), '', 'all');
925
- wp_enqueue_style('ecwid-settings-pure-css');
926
- wp_register_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), '', 'all');
927
- wp_enqueue_style('ecwid-settings-css');
928
 
929
  if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
930
- wp_register_style('ecwid-settings38-css', plugins_url('ecwid-shopping-cart/css/settings.3.8.css'), array('ecwid-settings-css'), '', 'all');
931
- wp_enqueue_style('ecwid-settings38-css');
932
  }}
933
 
934
  function ecwid_plugin_actions($links) {
@@ -964,7 +1041,7 @@ function ecwid_settings_api_init() {
964
  break;
965
 
966
  case 'advanced':
967
- register_setting('ecwid_options_page', 'ecwid_default_category_id');
968
  register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
969
  break;
970
 
@@ -1009,9 +1086,15 @@ function ecwid_advanced_settings_do_page() {
1009
 
1010
  foreach ($by_id as $id => $category) {
1011
  $name_path = array($category['name']);
1012
- while (isset($category['parentId'])) {
1013
- $category = $by_id[$category['parentId']];
1014
- $name_path[] = $category['name'];
 
 
 
 
 
 
1015
  }
1016
 
1017
  $by_id[$id]['path'] = array_reverse($name_path);
@@ -1058,6 +1141,7 @@ function get_ecwid_store_id() {
1058
  if (empty($store_id))
1059
  $store_id = ECWID_DEMO_STORE_ID;
1060
  }
 
1061
  return $store_id;
1062
  }
1063
 
@@ -1401,6 +1485,92 @@ echo $after_widget;
1401
 
1402
  }
1403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1404
 
1405
  function ecwid_sidebar_widgets_init() {
1406
  register_widget('EcwidMinicartWidget');
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.4
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
36
  add_filter('plugin_action_links_ecwid-shopping-cart/ecwid-shopping-cart.php', 'ecwid_plugin_actions');
37
  add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
38
  add_action('sm_buildmap', 'ecwid_build_sitemap_pages');
39
+ add_action('admin_head', 'ecwid_send_stats');
40
  } else {
41
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
42
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
43
  add_shortcode('ecwid_searchbox', 'ecwid_searchbox_shortcode');
44
  add_shortcode('ecwid_categories', 'ecwid_categories_shortcode');
45
  add_shortcode('ecwid_productbrowser', 'ecwid_productbrowser_shortcode');
46
+ add_shortcode('ecwid_product', 'ecwid_product_shortcode');
47
  add_action('init', 'ecwid_backward_compatibility');
48
  add_action('send_headers', 'ecwid_503_on_store_closed');
49
+ add_action('template_redirect', 'ecwid_apply_theme_adjustments');
50
  add_action('template_redirect', 'ecwid_404_on_broken_escaped_fragment');
51
+ add_action('wp_enqueue_scripts', 'ecwid_add_frontend_styles');
52
  add_action('wp', 'ecwid_seo_ultimate_compatibility', 0);
53
  add_action('wp_title', 'ecwid_seo_compatibility_init', 0);
54
  add_filter('wp_title', 'ecwid_seo_title', 20);
66
 
67
  $ecwid_script_rendered = false; // controls single script.js on page
68
 
69
+ require_once plugin_dir_path(__FILE__) . '/lib/class-ecwid-theme-manager.php';
70
+
71
  $version = get_bloginfo('version');
72
 
73
  function ecwid_add_breadcrumbs_navxt($trail)
85
  )
86
  ));
87
  }
 
88
  if (version_compare($version, '3.6') < 0) {
89
  /**
90
  * A copy of has_shortcode functionality from wordpress 3.6
116
  }
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  if (is_admin()) {
120
  $main_button_class = "";
121
  if (version_compare($version, '3.8-beta') > 0) {
127
  define('ECWID_MAIN_BUTTON_CLASS', $main_button_class);
128
  }
129
 
130
+ function ecwid_apply_theme_adjustments()
131
+ {
132
+ if (ecwid_page_has_productbrowser()) {
133
+ $ecwid_theme_manager = Ecwid_Theme_Manager::get_instance();
134
+ $ecwid_theme_manager->apply_adjustments();
135
+ }
136
+ }
137
+
138
  function ecwid_ie8_fonts_inclusion()
139
  {
140
  if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') === false) return;
153
 
154
  }
155
 
156
+ function ecwid_add_frontend_styles() {
157
+ wp_enqueue_style('ecwid-css', plugins_url('ecwid-shopping-cart/css/frontend.css'));
158
+ }
159
+
160
  function ecwid_load_textdomain() {
161
  load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
162
 
227
 
228
  function ecwid_build_sitemap_pages()
229
  {
230
+ if (!ecwid_is_paid_account() || !ecwid_store_page_available()) return;
231
 
232
  $page_url = get_page_link(get_option("ecwid_store_page_id"));
233
 
408
  $result = has_shortcode($post_content, 'ecwid_productbrowser');
409
  }
410
 
411
+ if (!$result) {
412
+ $theme = Ecwid_Theme_Manager::get_instance();
413
+ if ($theme->get_theme_name() == 'Bretheon') {
414
+ $meta = get_post_meta(get_the_ID(), 'mfn-page-items');
415
+ if (is_array($meta)) {
416
+ $meta = base64_decode($meta[0]);
417
+
418
+ // not exactly the intended usage, but quite simple and still works
419
+ // $meta is a serialized array that has the actual content
420
+ // a right way is to walk through the structure and run has_shortcode against all fields
421
+ $result = has_shortcode($meta, 'ecwid_productbrowser');
422
+ }
423
+ }
424
+ }
425
+
426
  return $result;
427
  }
428
 
483
  $description = preg_replace("![\\s]+!", " ", $description);
484
  $description = trim($description, " \t\xA0\n\r"); // Space, tab, non-breaking space, newline, carriage return
485
  $description = mb_substr($description, 0, 160);
486
+ $description = htmlspecialchars($description, ENT_COMPAT, 'UTF-8');
487
 
488
  echo <<<HTML
489
  <meta name="description" content="$description" />
595
 
596
  function ecwid_wrap_shortcode_content($content)
597
  {
598
+ return "<!-- Ecwid shopping cart plugin v 2.4 -->"
599
  . ecwid_get_scriptjs_code()
600
  . "<div>$content</div>"
601
+ . "<!-- END Ecwid Shopping Cart v 2.4 -->";
602
  }
603
 
604
  function ecwid_get_scriptjs_code($force_lang = null) {
669
  }
670
  }
671
 
672
+ function ecwid_product_shortcode($shortcode_attributes) {
673
+
674
+ $attributes = shortcode_atts(
675
+ array(
676
+ 'id' => null,
677
+ 'display' => 'picture title price options addtobag',
678
+ 'link' => 'yes'
679
+ ),
680
+ $shortcode_attributes
681
+ );
682
+
683
+ $id = $attributes['id'];
684
+
685
+ if (is_null($id) || !is_numeric($id) || $id <= 0) return;
686
+
687
+ if ($attributes['link'] == 'yes' && !ecwid_store_page_available()) {
688
+ $attributes['link'] = 'no';
689
+ }
690
+
691
+ $display_items = array(
692
+ 'picture' => '<div itemprop="picture"></div>',
693
+ 'title' => '<div class="ecwid-title" itemprop="title"></div>',
694
+ 'price' => '<div itemtype="http://schema.org/Offer" itemscope itemprop="offers">'
695
+ . '<div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div>'
696
+ . '</div>',
697
+ 'options' => '<div itemprop="options"></div>',
698
+ 'qty' => '<div itemprop="qty"></div>',
699
+ 'addtobag' => '<div itemprop="addtobag"></div>'
700
+ );
701
+
702
+ $result = sprintf(
703
+ '<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-%d" '
704
+ . 'itemscope itemtype="http://schema.org/Product" '
705
+ . 'data-single-product-id="%d">',
706
+ $id, $id
707
+ );
708
+
709
+ $items = preg_split('![^0-9^a-z^A-Z^\-^_]!', $attributes['display']);
710
+
711
+ if (is_array($items) && count($items) > 0) foreach ($items as $item) {
712
+ if (array_key_exists($item, $display_items)) {
713
+ if ($attributes['link'] == 'yes' && in_array($item, array('title', 'picture'))) {
714
+ $page_url = get_page_link(get_option("ecwid_store_page_id"));
715
+ $product_link = $page_url . '#!/~/product/id=' . $id;
716
+ $result .= '<a href="' . esc_url($product_link) . '">' . $display_items[$item] . '</a>';
717
+ } else {
718
+ $result .= $display_items[$item];
719
+ }
720
+ }
721
+ }
722
+
723
+ $result .= '</div>';
724
+
725
+ $result .= '<script type="text/javascript">xSingleProduct()</script>';
726
+
727
+ return ecwid_wrap_shortcode_content($result);
728
+ }
729
+
730
  function ecwid_parse_escaped_fragment($escaped_fragment) {
731
  $fragment = urldecode($escaped_fragment);
732
  $return = array();
818
  $plain_content = '<noscript>Your browser does not support JavaScript.<a href="' . $ecwid_mobile_catalog_link .'">HTML version of this store</a></noscript>';
819
  }
820
 
821
+ $s = '';
822
+
823
+ $s = <<<EOT
824
+ <div id="ecwid-store-$store_id">
825
+ {$plain_content}
826
+ </div>
827
+ <script type="text/javascript"> xProductBrowser("categoriesPerRow=$ecwid_pb_categoriesperrow","views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)","categoryView=$ecwid_pb_defaultview","searchView=$ecwid_pb_searchview","style="$ecwid_default_category_str, "id=ecwid-store-$store_id");</script>
828
  EOT;
829
  return ecwid_wrap_shortcode_content($s);
830
  }
831
 
832
+ function ecwid_store_page_available()
833
+ {
834
+ $status = get_post_status(get_option('ecwid_store_page_id'));
835
+
836
+ return $status == 'publish';
837
 
838
+ }
839
 
840
  function ecwid_store_activate() {
841
  $my_post = array();
888
  $my_post['post_status'] = 'publish';
889
  $my_post['post_author'] = 1;
890
  $my_post['post_type'] = 'page';
891
+ $my_post['comment_status'] = 'closed';
892
  $id = wp_insert_post( $my_post );
893
  update_option('ecwid_store_page_id', $id);
894
  }
992
 
993
  function ecwid_register_admin_styles() {
994
 
995
+ wp_enqueue_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'));
 
996
 
997
  if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
998
+ wp_enqueue_style('ecwid-admin38-css', plugins_url('ecwid-shopping-cart/css/admin.3.8.css'), array('ecwid-admin-css'), '', 'all');
 
999
  }
1000
  }
1001
 
1002
  function ecwid_register_settings_styles() {
1003
 
1004
+ wp_enqueue_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), '', 'all');
1005
+ wp_enqueue_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), '', 'all');
 
 
1006
 
1007
  if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
1008
+ wp_enqueue_style('ecwid-settings38-css', plugins_url('ecwid-shopping-cart/css/settings.3.8.css'), array('ecwid-settings-css'), '', 'all');
 
1009
  }}
1010
 
1011
  function ecwid_plugin_actions($links) {
1041
  break;
1042
 
1043
  case 'advanced':
1044
+ register_setting('ecwid_options_page', 'ecwid_default_category_id', 'ecwid_abs_intval');
1045
  register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
1046
  break;
1047
 
1086
 
1087
  foreach ($by_id as $id => $category) {
1088
  $name_path = array($category['name']);
1089
+ while (is_array($category) && isset($category['parentId'])) {
1090
+ $name = '';
1091
+ if (isset($by_id[$category['parentId']])) {
1092
+ $name = $by_id[$category['parentId']]['name'];
1093
+ } else {
1094
+ $name = __('Hidden category', 'ecwid-shopping-cart');
1095
+ }
1096
+ $name_path[] = $name;
1097
+ $category = isset($by_id[$category['parentId']]) ? $by_id[$category['parentId']] : false;
1098
  }
1099
 
1100
  $by_id[$id]['path'] = array_reverse($name_path);
1141
  if (empty($store_id))
1142
  $store_id = ECWID_DEMO_STORE_ID;
1143
  }
1144
+
1145
  return $store_id;
1146
  }
1147
 
1485
 
1486
  }
1487
 
1488
+ function ecwid_send_stats()
1489
+ {
1490
+ $storeid = get_ecwid_store_id();
1491
+
1492
+ if ($storeid == ECWID_DEMO_STORE_ID) return;
1493
+
1494
+ $last_stats_sent = get_option('ecwid_stats_sent_date');
1495
+ if (!$last_stats_sent) {
1496
+ add_option('ecwid_stats_sent_date', time());
1497
+ } else if ($last_stats_sent + 24*60*60 > time()) {
1498
+ return;
1499
+ }
1500
+
1501
+ $stats = ecwid_gather_stats();
1502
+
1503
+ $url = 'http://' . APP_ECWID_COM . '/script.js?' . $storeid . '&data_platform=wporg';
1504
+
1505
+ foreach ($stats as $name => $value) {
1506
+ $url .= '&data_wporg_' . $name . '=' . urlencode($value);
1507
+ }
1508
+
1509
+ $link = '';
1510
+ if (ecwid_store_page_available()) {
1511
+ $link = get_page_link(get_option('ecwid_store_page_id'));
1512
+ } else {
1513
+ $link = get_bloginfo('url');
1514
+ }
1515
+
1516
+ wp_remote_get($url, array('headers' => array('Referer' => $link)));
1517
+
1518
+ update_option('ecwid_stats_sent_date', time());
1519
+ }
1520
+
1521
+ function ecwid_gather_stats()
1522
+ {
1523
+ $usage_version = 1;
1524
+
1525
+ $stats = array();
1526
+
1527
+ $stats['version'] = get_bloginfo('version');
1528
+ $stats['theme'] = Ecwid_Theme_Manager::get_instance()->get_theme_name();
1529
+
1530
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1531
+
1532
+ $usage_params = array(
1533
+ 'paid',
1534
+ 'display_search',
1535
+ 'horizontal_categories_enabled',
1536
+ 'minicart_enabled',
1537
+ 'search_widget',
1538
+ 'vcategories_widget',
1539
+ 'minicart_normal_widget',
1540
+ 'minicart_mini_widget',
1541
+ 'badge_widget',
1542
+ 'sso_enabled',
1543
+ 'default_category',
1544
+ 'google_xml_sitemaps_used',
1545
+ 'ecwid_product_advisor_used'
1546
+ );
1547
+
1548
+ $usage_stats = array();
1549
+ $usage_stats['paid'] = ecwid_is_paid_account();
1550
+ $usage_stats['display_search'] = (bool) get_option('ecwid_show_search_box');
1551
+ $usage_stats['horizontal_categories_enabled'] = (bool) get_option('ecwid_show_categories');
1552
+ $usage_stats['minicart_enabled'] = (bool) get_option('ecwid_enable_minicart');
1553
+ $usage_stats['search_widget'] = (bool) is_active_widget(false, false, 'ecwidsearch');
1554
+ $usage_stats['vcategories_widget'] = (bool) is_active_widget(false, false, 'ecwidvcategories');
1555
+ $usage_stats['minicart_normal_widget'] = (bool) is_active_widget(false, false, 'ecwidminicart');
1556
+ $usage_stats['minicart_mini_widget'] = (bool) is_active_widget(false, false, 'ecwidminicart_miniview');
1557
+ $usage_stats['badge_widget'] = (bool) is_active_widget(false, false, 'ecwidbadge');
1558
+ $usage_stats['sso_enabled'] = (bool) get_option('ecwid_sso_secret_key');
1559
+ $usage_stats['default_category'] = (bool) get_option('ecwid_default_category_id');
1560
+ $usage_stats['google_xml_sitemaps_used'] = (bool) is_plugin_active('google-sitemap-generator/sitemap.php');
1561
+ $usage_stats['ecwid_product_advisor_used'] = (bool) is_plugin_active('ecwid-useful-tools/ecwid-product-advisor.php');
1562
+
1563
+ $stats['usage'] = '';
1564
+
1565
+ $usage = '';
1566
+ foreach ($usage_params as $index => $item) {
1567
+ $usage[$index] = (int)$usage_stats[$item];
1568
+ }
1569
+
1570
+ $stats['usage'] = $usage_version . '_' . implode('', $usage);
1571
+
1572
+ return $stats;
1573
+ }
1574
 
1575
  function ecwid_sidebar_widgets_init() {
1576
  register_widget('EcwidMinicartWidget');
js/create_scroller.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ if (jQuery('#ecwid_product_browser_scroller').length == 0) {
3
+ jQuery('div[id^="ecwid-store-"]').before('<div id="ecwid_product_browser_scroller" class="ecwid-scroller-adjustment"></div>');
4
+ }
5
+ });
js/themes/pagelines.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ var fixedNav = jQuery('#navbar');
3
+ if (fixedNav.css('position') == 'fixed') {
4
+ jQuery('#ecwid_product_browser_scroller').css({
5
+ 'position': 'relative',
6
+ 'top': -fixedNav.height()
7
+ });
8
+ }
9
+ });
languages/ecwid-shopping-cart-es_ES.po CHANGED
@@ -1,174 +1,174 @@
1
- msgid "Ecwid Shopping Cart"
2
- msgstr ""
3
- msgid "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."
4
- msgstr ""
5
- msgid "Ecwid Team"
6
- msgstr ""
7
- msgid "Get help"
8
- msgstr "Obtener ayuda"
9
- msgid "Go to Ecwid site"
10
- msgstr "Ir al sitio Ecwid"
11
- msgid "Visit storefront"
12
- msgstr "Visitar escaparate"
13
- msgid "Manage my store"
14
- msgstr "Gestionar mi tienda"
15
- msgid "Manage plugin settings"
16
- msgstr "Administrar la configuración de conexión"
17
- msgid "→ Sell on Facebook"
18
- msgstr "→ Vender en Facebook"
19
- msgid "Online store powered by <a %s>Ecwid</a>"
20
- msgstr ""
21
- msgid "Store"
22
- msgstr "Tienda"
23
- msgid "<strong>Ecwid shopping cart is almost ready</strong>. Please visit <a target=\"_blank\" href=\"%s\">the created page</a> to see your store with demo products. In order to finish the installation, please go to the <a href=\"admin.php?page=ecwid\"><strong>Ecwid settings</strong></a> and configure the plugin."
24
- msgstr "<strong>Ecwid la tarjeta de compras Ecwid está casi lista </strong>. Por favor visite <a target=\"_blank\" href=\"%s\">la página creada </a> para ver su tienda con productos de demostración. Para finalizar la instalación, por favor vaya a <a href=\"admin.php?page=ecwid\"><strong>ajustes Ecwid</strong></a> y configure la conexión."
25
- msgid "Do you like your Ecwid online store? We'd appreciate it if you <a %s>add your review and vote</a> for the plugin on Wordpress site. (<a id=\"hide-vote-message\">Close</a> and do not show this message anymore)"
26
- msgstr ""
27
- msgid "Ecwid shopping cart settings"
28
- msgstr ""
29
- msgid "Ecwid Store"
30
- msgstr "Tienda Ecwid"
31
- msgid "General settings"
32
- msgstr "Configuración general"
33
- msgid "General"
34
- msgstr "General"
35
- msgid "Appearance settings"
36
- msgstr "Opciones de aspecto"
37
- msgid "Appearance"
38
- msgstr "Aspecto"
39
- msgid "Advanced settings"
40
- msgstr "Opciones avanzadas"
41
- msgid "Advanced"
42
- msgstr "Avanzadas"
43
- msgid "Setup"
44
- msgstr ""
45
- msgid "Your store's minicart"
46
- msgstr "Mini carro de su tienda"
47
- msgid "Ecwid Shopping Bag (Normal)"
48
- msgstr "Bolsa de compras Ecwid (Normal)"
49
- msgid "Ecwid Shopping Bag (Mini view)"
50
- msgstr "Bolsa de compras Ecwid (Mini vista)"
51
- msgid "Your store's search box"
52
- msgstr "Caja de búsqueda de tu tienda"
53
- msgid "Ecwid Search Box"
54
- msgstr "Caja de búsqueda Ecwid"
55
- msgid "Vertical menu of categories"
56
- msgstr "Menú vertical de categorías"
57
- msgid "Ecwid Vertical Categories"
58
- msgstr "Categorías verticales Ecwid"
59
- msgid "Price"
60
- msgstr ""
61
- msgid "Ecwid Shopping Cart - Advanced settings"
62
- msgstr "Carro de compras Ecwid - Opciones avanzadas"
63
- msgid "Category shown by default"
64
- msgstr "Categoría mostrada por defecto"
65
- msgid "Store root category"
66
- msgstr "Categoría raíz de la tienda"
67
- msgid "Default category ID"
68
- msgstr "Identificación de categoría estandar"
69
- msgid "By default, the storefront shows a list of root categories. You can override this behavior and show a different category when customers open your store for the first time. This is useful if you only have one category or want to display a specific set of items (e.g. \"Featured Products\") to new visitors."
70
- msgstr "Por defecto, la entrada principal muestra una lista de categorías de raíz. Puede anular este comportamiento y mostrar una categoría diferente cuando los clientes abren su tienda por primera vez. Es útil si usted tiene una sola categoría o quiere mostrar un conjunto específico de elementos (por ejemplo, \"productos destacados\") para todos los nuevos visitantes."
71
- msgid "In order to set this option, <a %s>find an ID of the necessary category</a> and save it here."
72
- msgstr "Para fijar esta opción, <a %s> encuentre una identificación de la categoría necesaria </a> y guárdela aquí."
73
- msgid "Single Sign-On Secret Key"
74
- msgstr "Clave única secreta de registro"
75
- msgid "Single Sign-On Secret Key is an option that allows your customers access to your WordPress site as well as the Ecwid shopping cart. When customers log in to your site, they will automatically be logged in to your Ecwid store as well. It makes sense to enable this feature if your visitors actually create accounts in your WordPress website."
76
- msgstr "Esta característica opcional le permite activar la inscripción única: cuando los clientes han iniciado sesión en su página, también inician sesión automáticamente en su tienda Ecwid, incluso si antes no tenían una cuenta en la tienda. Tiene sentido activar esta característica, si sus visitantes en efecto crean cuentas en su página WordPress."
77
- msgid "In order to enable this feature, opt to use a secret key. You will find this key in your Ecwid control panel, at \"System Settings > API > Single Sign-On API\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
78
- msgstr "Para activar esta característica usted debería enviar una clave secreta. Encontrará esta clave en su panel de control Ecwid, en la página \"Configurac​ión del sistema > API > Single Sign-on API\" . Esta característica está disponible sólo para <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">utilizadores de pago</a>."
79
- msgid "Save changes"
80
- msgstr "Guardar los cambios"
81
- msgid "Ecwid Shopping Cart - Appearance settings"
82
- msgstr "Tarjeta de Compras Ecwid - Ajustes de apariencia"
83
- msgid "Display search box above products"
84
- msgstr "Mostrar caja de búsqueda de productos de arriba"
85
- msgid "Or you can add search box to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
86
- msgstr "O puede añadir una caja de búsqueda a la barra de herramientas de su página web utilizando <a href=\"widgets.php\">WordPress native widgets</a>."
87
- msgid "Display horizontal categories above products"
88
- msgstr "Mostrar categorías horizontales sobre los productos"
89
- msgid "Or you can add vertical categories to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
90
- msgstr "O puede añadir categorías verticales a la barra de herramientas de su página utilizando <a href=\"widgets.php\">WordPress native widgets</a>."
91
- msgid "Enable minicart attached to horizontal categories"
92
- msgstr "Active minicarrito unido a las categorías horizontales "
93
- msgid "You should disable this option, if you added minicart to your website's&nbsp;sidebar."
94
- msgstr "Debería desabilitar esta opción, si añade un minicarro a su página web&nbsp;barra lateral."
95
- msgid "Number of categories per row"
96
- msgstr "Número de categorías por fila"
97
- msgid "Number of products per page"
98
- msgstr "Número dde productos por página"
99
- msgid "Grid view"
100
- msgstr "Vista de cuadro"
101
- msgid "List view"
102
- msgstr "Vista de lista"
103
- msgid "Table view"
104
- msgstr "Vista de tabla"
105
- msgid "Here you can control how many products will be displayed per page. These options define maximum values. If there is not enough space to show all product columns, Ecwid will adapt the number of columns to hold all products."
106
- msgstr "Aquí usted puede controlar cuantos productos serán mostrados por página. Estas opciones definen valores maximos. Si no hay suficiente espacio para mostrar todas las cdolumnas de produtos, Ecwid adaptará el número de columnas para contener todos los productos."
107
- msgid "Default view mode on product pages"
108
- msgstr "Vista del modo predefinido en páginas de productos"
109
- msgid "Grid"
110
- msgstr "Cuadro"
111
- msgid "List"
112
- msgstr "Lista"
113
- msgid "Table"
114
- msgstr "Tabla"
115
- msgid "Default view mode on search results"
116
- msgstr "Vista del modo predefinido en búsqueda de resultados"
117
- msgid "Store powered by Ecwid"
118
- msgstr ""
119
- msgid "Ecwid Shopping Cart - General settings"
120
- msgstr "Carro de Compras Ecwid- Configuración general"
121
- msgid "Thank you for choosing Ecwid to build your online store."
122
- msgstr "Gracias por elegir Ecwid para cosntruir su tienda online."
123
- msgid "The first step towards opening your online business: <br />Let’s get started and add a store to your WordPress website in <strong>3</strong> simple steps."
124
- msgstr "El primer paso para abrir su negocio online: <br /> Vamos a empezar y añadir una tienda a su página web WordPress en <strong>3</strong> simples pasos."
125
- msgid "Register at Ecwid"
126
- msgstr "Registrarse en Ecwid"
127
- msgid "Create a new Ecwid account which you will use to manage your store and inventory. The registration is free."
128
- msgstr "Crear una nueva cuenta Ecwid que utilizará para gestionar su tienda e inventario. El registro es gratuíto."
129
- msgid "Create new Ecwid account"
130
- msgstr "Crear una nueva cuenta Ecwid"
131
- msgid "I already have Ecwid account, sign in"
132
- msgstr "Ya tengo una cuenta Ecwid, registrar"
133
- msgid "You will be able to sign up through your exising Google, Facebook or PayPal profiles as well."
134
- msgstr "Será además capaz de inscribirse a través de su perfil Google, Facebook o PayPal."
135
- msgid "Find your Store ID"
136
- msgstr "Encuentre la Identificación de su tienda"
137
- msgid "Store ID is a unique identifier of any Ecwid store, it consists of several digits. You can find it on the \"Dashboard\" page of Ecwid control panel. Also the Store ID will be sent in the Welcome email after the registration."
138
- msgstr "El Identificador de su tienda es un Identificador único de cualquier tienda Ecwid, consiste en varios dígitos. Puede encontrarlo en la página \"Dashboard\" del panel de control Ecwid. Además la Identificación de la Tienda le será enviada en el e-mail de bienvenida después del registro."
139
- msgid "Enter your Store ID"
140
- msgstr "Introduzca la Identificación de su tienda "
141
- msgid "Enter your Store ID here:"
142
- msgstr "Introduzca la Identificación de su tienda aquí:"
143
- msgid "Store ID"
144
- msgstr "Identificación de tienda"
145
- msgid "Save and connect your Ecwid store to the site"
146
- msgstr "Guarde y conecte su tienda Ecwid al site"
147
- msgid "Questions? Visit <a href=\"http://help.ecwid.com/?source=wporg\">Ecwid support center</a>."
148
- msgstr "Preguntas? Visite <a href=\"http://help.ecwid.com/?source=wporg\">el centro de ayuda Ecwid</a>."
149
- msgid "Congratulations!"
150
- msgstr "Enhorabuena!"
151
- msgid "Your Ecwid store is now connected to your WordPress website."
152
- msgstr "Su tienda Ecwid está conectada a su página web WordPress."
153
- msgid "Greetings!"
154
- msgstr "Saludos!"
155
- msgid "Your Ecwid store is connected to your WordPress website."
156
- msgstr "Su tienda Ecwid está conectadaa su página web WordPress."
157
- msgid "Control panel"
158
- msgstr "Panel de control"
159
- msgid "Account status"
160
- msgstr "Estado de cuenta"
161
- msgid "Paid"
162
- msgstr "Pagado"
163
- msgid "Free"
164
- msgstr "Gratis"
165
- msgid "Thank you for supporting Ecwid!"
166
- msgstr "Gracias por apoyar a Ecwid!"
167
- msgid "Upgrade to get access to cool premium features."
168
- msgstr "Actualice para obtener acceso a interesantes funciones avanzadas."
169
- msgid "Billing and plans"
170
- msgstr ""
171
- msgid "Upgrade"
172
- msgstr ""
173
- msgid "If you want to connect another Ecwid store, you can <a %s>disconnect the current one and change Store ID</a>."
174
- msgstr ""
1
+ msgid "Ecwid Shopping Cart"
2
+ msgstr ""
3
+ msgid "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."
4
+ msgstr ""
5
+ msgid "Ecwid Team"
6
+ msgstr ""
7
+ msgid "Get help"
8
+ msgstr "Obtener ayuda"
9
+ msgid "Go to Ecwid site"
10
+ msgstr "Ir al sitio Ecwid"
11
+ msgid "Visit storefront"
12
+ msgstr "Visitar escaparate"
13
+ msgid "Manage my store"
14
+ msgstr "Gestionar mi tienda"
15
+ msgid "Manage plugin settings"
16
+ msgstr "Administrar la configuración de conexión"
17
+ msgid "→ Sell on Facebook"
18
+ msgstr "→ Vender en Facebook"
19
+ msgid "Online store powered by <a %s>Ecwid</a>"
20
+ msgstr ""
21
+ msgid "Store"
22
+ msgstr "Tienda"
23
+ msgid "<strong>Ecwid shopping cart is almost ready</strong>. Please visit <a target=\"_blank\" href=\"%s\">the created page</a> to see your store with demo products. In order to finish the installation, please go to the <a href=\"admin.php?page=ecwid\"><strong>Ecwid settings</strong></a> and configure the plugin."
24
+ msgstr "<strong>Ecwid la tarjeta de compras Ecwid está casi lista </strong>. Por favor visite <a target=\"_blank\" href=\"%s\">la página creada </a> para ver su tienda con productos de demostración. Para finalizar la instalación, por favor vaya a <a href=\"admin.php?page=ecwid\"><strong>ajustes Ecwid</strong></a> y configure la conexión."
25
+ msgid "Do you like your Ecwid online store? We'd appreciate it if you <a %s>add your review and vote</a> for the plugin on Wordpress site. (<a id=\"hide-vote-message\">Close</a> and do not show this message anymore)"
26
+ msgstr ""
27
+ msgid "Ecwid shopping cart settings"
28
+ msgstr ""
29
+ msgid "Ecwid Store"
30
+ msgstr "Tienda Ecwid"
31
+ msgid "General settings"
32
+ msgstr "Configuración general"
33
+ msgid "General"
34
+ msgstr "General"
35
+ msgid "Appearance settings"
36
+ msgstr "Opciones de aspecto"
37
+ msgid "Appearance"
38
+ msgstr "Aspecto"
39
+ msgid "Advanced settings"
40
+ msgstr "Opciones avanzadas"
41
+ msgid "Advanced"
42
+ msgstr "Avanzadas"
43
+ msgid "Setup"
44
+ msgstr ""
45
+ msgid "Your store's minicart"
46
+ msgstr "Mini carro de su tienda"
47
+ msgid "Ecwid Shopping Bag (Normal)"
48
+ msgstr "Bolsa de compras Ecwid (Normal)"
49
+ msgid "Ecwid Shopping Bag (Mini view)"
50
+ msgstr "Bolsa de compras Ecwid (Mini vista)"
51
+ msgid "Your store's search box"
52
+ msgstr "Caja de búsqueda de tu tienda"
53
+ msgid "Ecwid Search Box"
54
+ msgstr "Caja de búsqueda Ecwid"
55
+ msgid "Vertical menu of categories"
56
+ msgstr "Menú vertical de categorías"
57
+ msgid "Ecwid Vertical Categories"
58
+ msgstr "Categorías verticales Ecwid"
59
+ msgid "Price"
60
+ msgstr ""
61
+ msgid "Ecwid Shopping Cart - Advanced settings"
62
+ msgstr "Carro de compras Ecwid - Opciones avanzadas"
63
+ msgid "Category shown by default"
64
+ msgstr "Categoría mostrada por defecto"
65
+ msgid "Store root category"
66
+ msgstr "Categoría raíz de la tienda"
67
+ msgid "Default category ID"
68
+ msgstr "Identificación de categoría estandar"
69
+ msgid "By default, the storefront shows a list of root categories. You can override this behavior and show a different category when customers open your store for the first time. This is useful if you only have one category or want to display a specific set of items (e.g. \"Featured Products\") to new visitors."
70
+ msgstr "Por defecto, la entrada principal muestra una lista de categorías de raíz. Puede anular este comportamiento y mostrar una categoría diferente cuando los clientes abren su tienda por primera vez. Es útil si usted tiene una sola categoría o quiere mostrar un conjunto específico de elementos (por ejemplo, \"productos destacados\") para todos los nuevos visitantes."
71
+ msgid "In order to set this option, <a %s>find an ID of the necessary category</a> and save it here."
72
+ msgstr "Para fijar esta opción, <a %s> encuentre una identificación de la categoría necesaria </a> y guárdela aquí."
73
+ msgid "Single Sign-On Secret Key"
74
+ msgstr "Clave única secreta de registro"
75
+ msgid "Single Sign-On Secret Key is an option that allows your customers access to your WordPress site as well as the Ecwid shopping cart. When customers log in to your site, they will automatically be logged in to your Ecwid store as well. It makes sense to enable this feature if your visitors actually create accounts in your WordPress website."
76
+ msgstr "Esta característica opcional le permite activar la inscripción única: cuando los clientes han iniciado sesión en su página, también inician sesión automáticamente en su tienda Ecwid, incluso si antes no tenían una cuenta en la tienda. Tiene sentido activar esta característica, si sus visitantes en efecto crean cuentas en su página WordPress."
77
+ msgid "In order to enable this feature, opt to use a secret key. You will find this key in your Ecwid control panel, at \"System Settings > API > Single Sign-On API\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
78
+ msgstr "Para activar esta característica usted debería enviar una clave secreta. Encontrará esta clave en su panel de control Ecwid, en la página \"Configurac​ión del sistema > API > Single Sign-on API\" . Esta característica está disponible sólo para <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">utilizadores de pago</a>."
79
+ msgid "Save changes"
80
+ msgstr "Guardar los cambios"
81
+ msgid "Ecwid Shopping Cart - Appearance settings"
82
+ msgstr "Tarjeta de Compras Ecwid - Ajustes de apariencia"
83
+ msgid "Display search box above products"
84
+ msgstr "Mostrar caja de búsqueda de productos de arriba"
85
+ msgid "Or you can add search box to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
86
+ msgstr "O puede añadir una caja de búsqueda a la barra de herramientas de su página web utilizando <a href=\"widgets.php\">WordPress native widgets</a>."
87
+ msgid "Display horizontal categories above products"
88
+ msgstr "Mostrar categorías horizontales sobre los productos"
89
+ msgid "Or you can add vertical categories to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
90
+ msgstr "O puede añadir categorías verticales a la barra de herramientas de su página utilizando <a href=\"widgets.php\">WordPress native widgets</a>."
91
+ msgid "Enable minicart attached to horizontal categories"
92
+ msgstr "Active minicarrito unido a las categorías horizontales "
93
+ msgid "You should disable this option, if you added minicart to your website's&nbsp;sidebar."
94
+ msgstr "Debería desabilitar esta opción, si añade un minicarro a su página web&nbsp;barra lateral."
95
+ msgid "Number of categories per row"
96
+ msgstr "Número de categorías por fila"
97
+ msgid "Number of products per page"
98
+ msgstr "Número dde productos por página"
99
+ msgid "Grid view"
100
+ msgstr "Vista de cuadro"
101
+ msgid "List view"
102
+ msgstr "Vista de lista"
103
+ msgid "Table view"
104
+ msgstr "Vista de tabla"
105
+ msgid "Here you can control how many products will be displayed per page. These options define maximum values. If there is not enough space to show all product columns, Ecwid will adapt the number of columns to hold all products."
106
+ msgstr "Aquí usted puede controlar cuantos productos serán mostrados por página. Estas opciones definen valores maximos. Si no hay suficiente espacio para mostrar todas las cdolumnas de produtos, Ecwid adaptará el número de columnas para contener todos los productos."
107
+ msgid "Default view mode on product pages"
108
+ msgstr "Vista del modo predefinido en páginas de productos"
109
+ msgid "Grid"
110
+ msgstr "Cuadro"
111
+ msgid "List"
112
+ msgstr "Lista"
113
+ msgid "Table"
114
+ msgstr "Tabla"
115
+ msgid "Default view mode on search results"
116
+ msgstr "Vista del modo predefinido en búsqueda de resultados"
117
+ msgid "Store powered by Ecwid"
118
+ msgstr ""
119
+ msgid "Ecwid Shopping Cart - General settings"
120
+ msgstr "Carro de Compras Ecwid- Configuración general"
121
+ msgid "Thank you for choosing Ecwid to build your online store."
122
+ msgstr "Gracias por elegir Ecwid para cosntruir su tienda online."
123
+ msgid "The first step towards opening your online business: <br />Let’s get started and add a store to your WordPress website in <strong>3</strong> simple steps."
124
+ msgstr "El primer paso para abrir su negocio online: <br /> Vamos a empezar y añadir una tienda a su página web WordPress en <strong>3</strong> simples pasos."
125
+ msgid "Register at Ecwid"
126
+ msgstr "Registrarse en Ecwid"
127
+ msgid "Create a new Ecwid account which you will use to manage your store and inventory. The registration is free."
128
+ msgstr "Crear una nueva cuenta Ecwid que utilizará para gestionar su tienda e inventario. El registro es gratuíto."
129
+ msgid "Create new Ecwid account"
130
+ msgstr "Crear una nueva cuenta Ecwid"
131
+ msgid "I already have Ecwid account, sign in"
132
+ msgstr "Ya tengo una cuenta Ecwid, registrar"
133
+ msgid "You will be able to sign up through your exising Google, Facebook or PayPal profiles as well."
134
+ msgstr "Será además capaz de inscribirse a través de su perfil Google, Facebook o PayPal."
135
+ msgid "Find your Store ID"
136
+ msgstr "Encuentre la Identificación de su tienda"
137
+ msgid "Store ID is a unique identifier of any Ecwid store, it consists of several digits. You can find it on the \"Dashboard\" page of Ecwid control panel. Also the Store ID will be sent in the Welcome email after the registration."
138
+ msgstr "El Identificador de su tienda es un Identificador único de cualquier tienda Ecwid, consiste en varios dígitos. Puede encontrarlo en la página \"Dashboard\" del panel de control Ecwid. Además la Identificación de la Tienda le será enviada en el e-mail de bienvenida después del registro."
139
+ msgid "Enter your Store ID"
140
+ msgstr "Introduzca la Identificación de su tienda "
141
+ msgid "Enter your Store ID here:"
142
+ msgstr "Introduzca la Identificación de su tienda aquí:"
143
+ msgid "Store ID"
144
+ msgstr "Identificación de tienda"
145
+ msgid "Save and connect your Ecwid store to the site"
146
+ msgstr "Guarde y conecte su tienda Ecwid al site"
147
+ msgid "Questions? Visit <a href=\"http://help.ecwid.com/?source=wporg\">Ecwid support center</a>."
148
+ msgstr "Preguntas? Visite <a href=\"http://help.ecwid.com/?source=wporg\">el centro de ayuda Ecwid</a>."
149
+ msgid "Congratulations!"
150
+ msgstr "Enhorabuena!"
151
+ msgid "Your Ecwid store is now connected to your WordPress website."
152
+ msgstr "Su tienda Ecwid está conectada a su página web WordPress."
153
+ msgid "Greetings!"
154
+ msgstr "Saludos!"
155
+ msgid "Your Ecwid store is connected to your WordPress website."
156
+ msgstr "Su tienda Ecwid está conectadaa su página web WordPress."
157
+ msgid "Control panel"
158
+ msgstr "Panel de control"
159
+ msgid "Account status"
160
+ msgstr "Estado de cuenta"
161
+ msgid "Paid"
162
+ msgstr "Pagado"
163
+ msgid "Free"
164
+ msgstr "Gratis"
165
+ msgid "Thank you for supporting Ecwid!"
166
+ msgstr "Gracias por apoyar a Ecwid!"
167
+ msgid "Upgrade to get access to cool premium features."
168
+ msgstr "Actualice para obtener acceso a interesantes funciones avanzadas."
169
+ msgid "Billing and plans"
170
+ msgstr ""
171
+ msgid "Upgrade"
172
+ msgstr ""
173
+ msgid "If you want to connect another Ecwid store, you can <a %s>disconnect the current one and change Store ID</a>."
174
+ msgstr ""
lib/EcwidCatalog.php CHANGED
@@ -55,30 +55,47 @@ class EcwidCatalog
55
  {
56
  if($ecwid_category["defaultCategory"] == true)
57
  {
58
- $return .= '<div class="ecwid_catalog_product_category" itemprop="category">' . esc_html($ecwid_category['name']) . '</div>';
59
  }
60
  }
61
  }
62
 
63
  $return .= '<div class="ecwid_catalog_product_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">';
64
  $return .= __('Price', 'ecwid-shopping-cart') . ': <span itemprop="price">' . esc_html($product["price"]) . '</span>&nbsp;';
65
- $return .= '<span itemprop="priceCurrency">' . esc_html($profile['currency']) . '</span></div>';
66
-
67
  if (!isset($product['quantity']) || (isset($product['quantity']) && $product['quantity'] > 0))
68
  {
69
  $return .= '<div class="ecwid_catalog_quantity" itemprop="availability" itemscope itemtype="http://schema.org/InStock"><span>In Stock</span></div>';
70
  }
 
 
 
71
  $return .= '<div class="ecwid_catalog_product_description" itemprop="description">'
72
  . $product['description']
73
  . '</div>';
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  if (is_array($product["options"]))
76
  {
77
  $allowed_types = array('TEXTFIELD', 'DATE', 'TEXTAREA', 'SELECT', 'RADIO', 'CHECKBOX');
78
  foreach($product["options"] as $product_options)
79
  {
80
  if (in_array($product_options['type'], $allowed_types)) {
81
- $return .= '<div class="ecwid_catalog_product_options" itemprop="offers"><span itemprop="condition">'
82
  . esc_html($product_options["name"])
83
  . '</span></div>';
84
  } else {
@@ -169,13 +186,17 @@ class EcwidCatalog
169
 
170
  $batch_result = $this->ecwid_api->get_batch_request($params);
171
 
172
- $category = $batch_result["category"];
173
  $categories = $batch_result["c"];
174
  $products = $batch_result["p"];
175
  $profile = $batch_result["pf"];
176
 
177
- $return = '<h2>' . esc_html($category['name']) . '</h2>';
178
- $return .= '<div>' . $category['description'] . '</div';
 
 
 
 
179
 
180
  if (is_array($categories))
181
  {
55
  {
56
  if($ecwid_category["defaultCategory"] == true)
57
  {
58
+ $return .= '<div class="ecwid_catalog_product_category">' . esc_html($ecwid_category['name']) . '</div>';
59
  }
60
  }
61
  }
62
 
63
  $return .= '<div class="ecwid_catalog_product_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">';
64
  $return .= __('Price', 'ecwid-shopping-cart') . ': <span itemprop="price">' . esc_html($product["price"]) . '</span>&nbsp;';
65
+
 
66
  if (!isset($product['quantity']) || (isset($product['quantity']) && $product['quantity'] > 0))
67
  {
68
  $return .= '<div class="ecwid_catalog_quantity" itemprop="availability" itemscope itemtype="http://schema.org/InStock"><span>In Stock</span></div>';
69
  }
70
+
71
+ $return .= '<span itemprop="priceCurrency">' . esc_html($profile['currency']) . '</span></div>';
72
+
73
  $return .= '<div class="ecwid_catalog_product_description" itemprop="description">'
74
  . $product['description']
75
  . '</div>';
76
 
77
+ if (is_array($product['attributes']) && !empty($product['attributes'])) {
78
+
79
+ foreach ($product['attributes'] as $attribute) {
80
+ if (trim($attribute['value']) != '') {
81
+ $return .= '<div class="ecwid_catalog_product_attribute">' . $attribute['name'] . ':';
82
+ if (isset($attribute['internalName']) && $attribute['internalName'] == 'Brand') {
83
+ $return .= '<span itemprop="brand">' . $attribute['value'] . '</span>';
84
+ } else {
85
+ $return .= $attribute['value'];
86
+ }
87
+ $return .= '</div>';
88
+ }
89
+ }
90
+ }
91
+
92
  if (is_array($product["options"]))
93
  {
94
  $allowed_types = array('TEXTFIELD', 'DATE', 'TEXTAREA', 'SELECT', 'RADIO', 'CHECKBOX');
95
  foreach($product["options"] as $product_options)
96
  {
97
  if (in_array($product_options['type'], $allowed_types)) {
98
+ $return .= '<div class="ecwid_catalog_product_options"><span>'
99
  . esc_html($product_options["name"])
100
  . '</span></div>';
101
  } else {
186
 
187
  $batch_result = $this->ecwid_api->get_batch_request($params);
188
 
189
+ $category = $id > 0 ? $batch_result['category'] : null;
190
  $categories = $batch_result["c"];
191
  $products = $batch_result["p"];
192
  $profile = $batch_result["pf"];
193
 
194
+ $return = '';
195
+
196
+ if (!is_null($category)) {
197
+ $return .= '<h2>' . esc_html($category['name']) . '</h2>';
198
+ $return .= '<div>' . $category['description'] . '</div>';
199
+ }
200
 
201
  if (is_array($categories))
202
  {
lib/class-ecwid-theme-manager.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ecwid_Theme_Manager
4
+ {
5
+ protected $themes_map = array();
6
+
7
+ protected $current_theme = '';
8
+
9
+ protected $theme_name = '';
10
+
11
+ public function Ecwid_Theme_Manager()
12
+ {
13
+ $this->init_themes_map();
14
+ $this->detect_current_theme();
15
+ }
16
+
17
+ public static function get_instance()
18
+ {
19
+ static $instance = null;
20
+
21
+ if (is_null($instance)) {
22
+ $instance = new Ecwid_Theme_Manager();
23
+ }
24
+
25
+ return $instance;
26
+ }
27
+
28
+ public function get_theme_name()
29
+ {
30
+ return $this->theme_name;
31
+ }
32
+
33
+ public function apply_adjustments()
34
+ {
35
+ if ( empty( $this->themes ) ) {
36
+ return;
37
+ }
38
+
39
+ if ($this->theme_needs_scrolling_adjustment()) {
40
+ wp_enqueue_script(
41
+ 'ecwid-scroller',
42
+ plugins_url( 'ecwid-shopping-cart/js/create_scroller.js' ),
43
+ array( 'jquery' )
44
+ );
45
+ }
46
+
47
+ if ( !array_key_exists( $this->current_theme, $this->themes ) ) {
48
+ return;
49
+ }
50
+
51
+ $theme_data = $this->themes[$this->current_theme];
52
+
53
+ wp_enqueue_style(
54
+ 'ecwid-theme-css',
55
+ plugins_url( 'ecwid-shopping-cart/css/themes/' . $this->current_theme . '.css' ),
56
+ array( $theme_data['base_css'] ),
57
+ false,
58
+ 'all'
59
+ );
60
+
61
+ if ( $theme_data['js'] ) {
62
+ wp_enqueue_script(
63
+ 'ecwid-theme-js',
64
+ plugins_url( 'ecwid-shopping-cart/js/themes/' . $this->current_theme . '.js' ),
65
+ array( 'jquery' )
66
+ );
67
+ }
68
+ }
69
+
70
+ protected function detect_current_theme()
71
+ {
72
+ $version = get_bloginfo('version');
73
+
74
+ if (version_compare( $version, '3.4' ) < 0) {
75
+ $this->theme_name = get_current_theme();
76
+ } else {
77
+ $theme = wp_get_theme();
78
+ $this->theme_name = $theme->get('Name');
79
+ }
80
+
81
+ foreach ( $this->themes as $internal_name => $theme ) {
82
+ if ( $this->theme_name == $theme['name'] ) {
83
+ $this->current_theme = $internal_name;
84
+ break;
85
+ }
86
+ }
87
+ }
88
+
89
+ protected function init_themes_map()
90
+ {
91
+ $this->themes = array(
92
+
93
+ '2014' => array(
94
+ 'name' => 'Twenty Fourteen',
95
+ 'base_css' => 'twentyfourteen-style',
96
+ 'js' => false,
97
+ ),
98
+ 'pagelines' => array(
99
+ 'name' => 'PageLines',
100
+ 'base_css' => '',
101
+ 'js' => true,
102
+ )
103
+ );
104
+ }
105
+
106
+ protected function theme_needs_scrolling_adjustment() {
107
+ return in_array( $this->current_theme, array( '2014', 'pagelines' ) );
108
+ }
109
+ }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Ecwid Shopping Cart ===
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,6 +78,15 @@ 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.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
 
1
  === Ecwid Shopping Cart ===
2
+ 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: 2.8
5
+ Tested up to: 3.9
6
+ Stable tag: 2.4
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.4 =
82
+ - **Ability to add a single product to a page or post on your site using new [ecwid\_product] shortcode.** In addition to embedding a whole product catalog on your Wordpress site, you can also feature a single product on a separate page or blog post of your site and allow your customers to purchase the product right from that page. To embed a product on a page or post, add [ecwid\_product id="12345"] shortcode to the page/post in your Wordpress backend. Do not forget to replace 12345 in this example with the actual product ID.
83
+
84
+ - **Better SEO for store pages.** Ecwid plug-in now automatically adds product attributes to SEO-optimized versions of product pages on your site to let the search engines index attributes like UPC, brand and others along with the other product properties. Also, some improvements were applied to the format of product HTML snippets to meet the Google recommendations on how to better organize product information (title, descriptions, price etc) on the product details pages. These improvements will help search engines to better index your products and optimize their appearance in search results.
85
+
86
+ - **Slight improvements of store layout for mobile devices.** All Ecwid stores are mobile-friendly by design, i.e. they adapt themselves to the given layout and look good on mobile devices, so if your site is mobile-optimized, your Ecwid store will be as well. Earlier, if you use horizontal categories widget on your Wordpress site, you might notice that it didn't fit the given width on narrow screens, e.g. when opened on a mobile device. Now, the plugin automatically hides horizontal categories widget on narrow screens to ensure better look on mobile-optimized sites.
87
+
88
+ - **Several improvements and bug fixes for plugin settings pages, store appearance and SEO.**
89
+
90
  = 2.3.2 =
91
  - **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.
92
 
templates/general-settings.php CHANGED
@@ -29,7 +29,7 @@
29
  <div class="section">
30
  <div class="left">
31
  <span class="main-info">
32
- <?php _e('Store ID', 'ecwid-shopping-cart'); ?>: <strong><? echo esc_attr(get_ecwid_store_id()); ?></strong>
33
  </span>
34
  </div>
35
  <div class="right two-buttons">
29
  <div class="section">
30
  <div class="left">
31
  <span class="main-info">
32
+ <?php _e('Store ID', 'ecwid-shopping-cart'); ?>: <strong><?php echo esc_attr(get_ecwid_store_id()); ?></strong>
33
  </span>
34
  </div>
35
  <div class="right two-buttons">