Ecwid Ecommerce Shopping Cart - Version 3.3.1

Version Description

  • Small improvement for "Twenty Twelve" WordPress theme. The default drop down menu stayed open after clicking Ecwid links sometimes. We adjusted our plugin to work around this issue.
  • Fixes of PHP notices. In some cases the plugin caused some PHP notices or warnings to appear on screen if the site was run in debug mode. Although it did not cause any malfunction in plugin operation, these messages could be quite annoying. We fixed it.
Download this release

Release Info

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

Code changes from version 3.2.2 to 3.3.1

css/settings.css CHANGED
@@ -319,6 +319,7 @@ display: none;
319
  .ecwid-admin .box {
320
  position: relative;
321
  margin-top: 25px;
 
322
 
323
  border: 1px solid #E5E5E5;
324
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
@@ -356,6 +357,7 @@ display: none;
356
 
357
  .ecwid-admin .box .head {
358
  text-align: left;
 
359
  }
360
 
361
  .ecwid-admin .head svg {
@@ -386,14 +388,21 @@ display: none;
386
  .ecwid-connect .box .greeting-message {
387
  margin-top: 11px;
388
  line-height: 1.3em;
 
389
  }
390
 
391
  .ecwid-connect .box .connect-button {
392
- margin-top: 38px;
 
 
 
 
393
  }
394
 
395
  .ecwid-connect .box .note {
396
- margin-top: 15px;
 
 
397
  }
398
 
399
  .ecwid-connect .box .create-account-link {
@@ -411,6 +420,8 @@ display: none;
411
  padding: 14px 40px;
412
  border: 0px none;
413
  border-radius: 4px;
 
 
414
 
415
  background: #59bb00;
416
  color: white;
@@ -429,10 +440,10 @@ display: none;
429
  .ecwid-connect .box .note {
430
  color: #A0A0A0;
431
  line-height: 18px;
 
432
  }
433
 
434
  .ecwid-connect .box .note.initial {
435
- max-width: 250px;
436
  }
437
 
438
  .ecwid-connect .box .note.auth-error {
@@ -440,6 +451,27 @@ display: none;
440
  color: red;
441
  }
442
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  .ecwid-connect .box .create-account-link a {
444
  text-decoration: none;
445
  font-size: 14px;
319
  .ecwid-admin .box {
320
  position: relative;
321
  margin-top: 25px;
322
+ padding: 0 15px;
323
 
324
  border: 1px solid #E5E5E5;
325
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
357
 
358
  .ecwid-admin .box .head {
359
  text-align: left;
360
+ margin-bottom: 20px;
361
  }
362
 
363
  .ecwid-admin .head svg {
388
  .ecwid-connect .box .greeting-message {
389
  margin-top: 11px;
390
  line-height: 1.3em;
391
+ margin-bottom: 38px;
392
  }
393
 
394
  .ecwid-connect .box .connect-button {
395
+ margin-top: 8px;
396
+ }
397
+ .ecwid-connect .where-to-find-store-id {
398
+ margin-top: 25px;
399
+ margin-bottom: 0;
400
  }
401
 
402
  .ecwid-connect .box .note {
403
+ margin-top: 6px;
404
+ max-width: 760px;
405
+ font-size: 13px;
406
  }
407
 
408
  .ecwid-connect .box .create-account-link {
420
  padding: 14px 40px;
421
  border: 0px none;
422
  border-radius: 4px;
423
+ box-sizing: border-box;
424
+ width: 260px;
425
 
426
  background: #59bb00;
427
  color: white;
440
  .ecwid-connect .box .note {
441
  color: #A0A0A0;
442
  line-height: 18px;
443
+ max-width: 400px;
444
  }
445
 
446
  .ecwid-connect .box .note.initial {
 
447
  }
448
 
449
  .ecwid-connect .box .note.auth-error {
451
  color: red;
452
  }
453
 
454
+ /* wpcontent to stress the rule without using !mportant */
455
+ #wpcontent .ecwid-connect.no-oauth .with-oauth,
456
+ #wpcontent .ecwid-connect.with-oauth .no-oauth
457
+ {
458
+ display: none;
459
+ }
460
+
461
+ .ecwid-connect .connect-store-id {
462
+
463
+ }
464
+
465
+ .ecwid-connect #ecwid-store-id {
466
+ line-height: 38px;
467
+ width: 260px;
468
+ border-radius: 4px;
469
+ font-size: 16px;
470
+ font-weight: lighter;
471
+ padding-left: 10px;
472
+ font-family: 'Open Sans';
473
+ }
474
+
475
  .ecwid-connect .box .create-account-link a {
476
  text-decoration: none;
477
  font-size: 14px;
css/themes/evolve.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ecwid-shopping-cart-product-browser table,
2
+ .ecwid-shopping-cart-categories table,
3
+ .ecwid-popup table,
4
+ .ecwid-MessageBox table {
5
+ border: 0px none !important;
6
+ }
7
+
8
+ .ecwid-shopping-cart-product-browser button,
9
+ .ecwid-popup button,
10
+ .ecwid-MessageBox button {
11
+ color: inherit !important;
12
+ }
13
+
14
+ .ecwid-shopping-cart-search button {
15
+ padding: 0.15em 0.3em !important;
16
+ }
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: 3.2.2
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
@@ -35,6 +35,7 @@ add_shortcode('ecwid_productbrowser', 'ecwid_productbrowser_shortcode');
35
  add_shortcode('ecwid', 'ecwid_shortcode');
36
 
37
  add_action( 'plugins_loaded', 'ecwid_init_integrations' );
 
38
 
39
  if ( is_admin() ){
40
  add_action('admin_init', 'ecwid_settings_api_init');
@@ -47,13 +48,13 @@ if ( is_admin() ){
47
  add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
48
  add_action('wp_ajax_ecwid_hide_vote_message', 'ecwid_hide_vote_message');
49
  add_action('wp_ajax_ecwid_hide_message', 'ecwid_ajax_hide_message');
50
- add_filter('plugins_loaded', 'ecwid_load_textdomain');
51
  add_filter('plugin_action_links_ecwid-shopping-cart/ecwid-shopping-cart.php', 'ecwid_plugin_actions');
52
  add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
53
  add_action('admin_head', 'ecwid_send_stats');
54
  add_action('save_post', 'ecwid_save_post');
55
  add_action('init', 'ecwid_apply_theme');
56
  add_action('get_footer', 'ecwid_admin_get_footer');
 
57
  } else {
58
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
59
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
@@ -75,12 +76,16 @@ if ( is_admin() ){
75
  add_action('wp_head', 'ecwid_meta');
76
  add_action('wp_head', 'ecwid_canonical');
77
  add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
 
78
  add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
79
  add_filter('the_content', 'ecwid_content_started', 0);
80
  add_filter('body_class', 'ecwid_body_class');
81
  $ecwid_seo_title = '';
82
  }
83
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
 
 
 
84
 
85
  $ecwid_script_rendered = false; // controls single script.js on page
86
 
@@ -463,18 +468,7 @@ function ecwid_log_error($message)
463
 
464
  function ecwid_get_last_logged_error()
465
  {
466
- $logs = get_option('ecwid_error_log');
467
-
468
- if ($logs) {
469
- $logs = json_decode($logs);
470
- }
471
 
472
- if (count($logs) > 0) {
473
- $entry = $logs[count($logs) - 1];
474
- if (isset($entry->message)) {
475
- return $entry->message;
476
- }
477
- }
478
 
479
  return '';
480
  }
@@ -837,12 +831,12 @@ function ecwid_content_started($content)
837
  return $content;
838
  }
839
 
840
- function ecwid_wrap_shortcode_content($content, $name)
841
  {
842
- return "<!-- Ecwid shopping cart plugin v 3.2.2 -->"
843
- . ecwid_get_scriptjs_code()
844
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
845
- . "<!-- END Ecwid Shopping Cart v 3.2.2 -->";
846
  }
847
 
848
  function ecwid_get_scriptjs_code($force_lang = null) {
@@ -850,7 +844,7 @@ function ecwid_get_scriptjs_code($force_lang = null) {
850
 
851
  if (!$ecwid_script_rendered) {
852
  $store_id = get_ecwid_store_id();
853
- $force_lang_str = !is_null($force_lang) ? "&lang=$force_lang" : '';
854
  $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
855
  $s = $s . ecwid_sso();
856
  $ecwid_script_rendered = true;
@@ -862,6 +856,7 @@ function ecwid_get_scriptjs_code($force_lang = null) {
862
  }
863
 
864
  function ecwid_script_shortcode($params) {
 
865
  $attributes = shortcode_atts(
866
  array(
867
  'lang' => null
@@ -873,7 +868,7 @@ function ecwid_script_shortcode($params) {
873
  $content = ecwid_get_scriptjs_code($attributes['lang']);
874
  }
875
 
876
- return ecwid_wrap_shortcode_content($content, 'script');
877
  }
878
 
879
  function ecwid_minicart_shortcode($attributes) {
@@ -881,7 +876,8 @@ function ecwid_minicart_shortcode($attributes) {
881
  $params = shortcode_atts(
882
  array(
883
  'layout' => null,
884
- 'is_ecwid_shortcode' => false
 
885
  ), $attributes
886
  );
887
 
@@ -910,7 +906,7 @@ EOT;
910
  $result = apply_filters('ecwid_minicart_shortcode_content', $result);
911
 
912
  if (!empty($result)) {
913
- $result = ecwid_wrap_shortcode_content($result, 'minicart');
914
  }
915
 
916
  return $result;
@@ -920,7 +916,8 @@ function ecwid_searchbox_shortcode($attributes) {
920
 
921
  $params = shortcode_atts(
922
  array(
923
- 'is_ecwid_shortcode' => false
 
924
  ), $attributes
925
  );
926
 
@@ -936,7 +933,7 @@ EOT;
936
  $result = apply_filters('ecwid_search_shortcode_content', $result);
937
 
938
  if (!empty($result)) {
939
- $result = ecwid_wrap_shortcode_content($result, 'search');
940
  }
941
 
942
  return $result;
@@ -946,7 +943,8 @@ function ecwid_categories_shortcode($attributes) {
946
 
947
  $params = shortcode_atts(
948
  array(
949
- 'is_ecwid_shortcode' => false
 
950
  ), $attributes
951
  );
952
 
@@ -962,7 +960,7 @@ EOT;
962
  $result = apply_filters('ecwid_categories_shortcode_content', $result);
963
 
964
  if (!empty($result)) {
965
- $result = ecwid_wrap_shortcode_content($result, 'categories');
966
  }
967
 
968
  return $result;
@@ -975,7 +973,7 @@ function ecwid_product_shortcode($shortcode_attributes) {
975
  'id' => null,
976
  'display' => 'picture title price options addtobag',
977
  'link' => 'yes'
978
- ),
979
  $shortcode_attributes
980
  );
981
 
@@ -1025,7 +1023,7 @@ function ecwid_product_shortcode($shortcode_attributes) {
1025
 
1026
  update_option('ecwid_single_product_used', time());
1027
 
1028
- return ecwid_wrap_shortcode_content($result, 'product');
1029
  }
1030
 
1031
  function ecwid_shortcode($attributes)
@@ -1040,7 +1038,8 @@ function ecwid_shortcode($attributes)
1040
  'list' => '10',
1041
  'table' => '20',
1042
  'minicart_layout' => 'attachToCategories',
1043
- 'default_category_id' => 0
 
1044
  )
1045
  , $attributes
1046
  );
@@ -1188,7 +1187,7 @@ function ecwid_productbrowser_shortcode($shortcode_params) {
1188
  </div>
1189
  <script data-cfasync="false" 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>
1190
  EOT;
1191
- return ecwid_wrap_shortcode_content($s, 'product-browser');
1192
  }
1193
 
1194
 
@@ -1216,7 +1215,7 @@ function ecwid_ajax_get_product_info() {
1216
 
1217
  if (ecwid_is_api_enabled()) {
1218
  $api = ecwid_new_product_api();
1219
- $product = $api->get_product($id);
1220
 
1221
  echo json_encode($product);
1222
  }
@@ -1224,6 +1223,12 @@ function ecwid_ajax_get_product_info() {
1224
  die();
1225
  }
1226
 
 
 
 
 
 
 
1227
  function ecwid_store_activate() {
1228
  $my_post = array();
1229
  $content = <<<EOT
@@ -1260,9 +1265,9 @@ EOT;
1260
 
1261
  add_option("ecwid_installation_date", time());
1262
 
1263
- add_option('ecwid_hide_appearance_menu', get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', 'yes');
1264
  // Does not affect updates, automatically turned on for new users only
1265
- add_option("ecwid_advanced_theme_layout", get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', 'yes');
1266
 
1267
  add_option('ecwid_chameleon_primary', '');
1268
  add_option('ecwid_chameleon_background', '');
@@ -1495,6 +1500,7 @@ function ecwid_settings_api_init() {
1495
  if (isset($_POST['ecwid_store_id'])) {
1496
  update_option('ecwid_is_api_enabled', 'off');
1497
  update_option('ecwid_api_check_time', 0);
 
1498
  }
1499
  }
1500
 
@@ -1515,11 +1521,18 @@ function ecwid_get_register_link()
1515
  if ($current_user->ID && function_exists('get_user_meta')) {
1516
  $meta = get_user_meta($current_user->ID);
1517
 
1518
- $user_data = '&' . build_query(array(
1519
  'name' => get_user_meta($current_user->ID, 'first_name', true) . ' ' . get_user_meta($current_user->ID, 'last_name', true),
1520
  'nickname' => $current_user->display_name,
1521
  'email' => $current_user->user_email
1522
- ));
 
 
 
 
 
 
 
1523
  }
1524
 
1525
  $link = sprintf($link, $user_data);
@@ -1530,11 +1543,20 @@ function ecwid_get_register_link()
1530
  function ecwid_general_settings_do_page() {
1531
 
1532
  $connection_error = isset($_GET['connection_error']);
1533
- if ($connection_error) {
1534
- $last_error = ecwid_get_last_logged_error();
 
 
 
 
 
 
 
 
 
1535
  }
1536
 
1537
- if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
1538
  global $ecwid_oauth;
1539
 
1540
  $register = !$connection_error && !isset($_GET['connect']) && !@$_COOKIE['ecwid_create_store_clicked'];
@@ -1552,6 +1574,42 @@ function ecwid_general_settings_do_page() {
1552
  }
1553
  }
1554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1555
  function ecwid_get_categories_for_selector() {
1556
  $categories = false;
1557
  if (ecwid_is_paid_account()) {
@@ -2106,7 +2164,7 @@ class EcwidRecentlyViewedWidget extends WP_Widget {
2106
  $recently_viewed = json_decode(stripslashes(@$_COOKIE['ecwid-shopping-cart-recently-viewed']));
2107
 
2108
  if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id()) {
2109
- setcookie('ecwid-shopping-cart-recently-viewed', null, strftime('-1 day'));
2110
  }
2111
  }
2112
 
@@ -2126,8 +2184,6 @@ class EcwidRecentlyViewedWidget extends WP_Widget {
2126
 
2127
  echo ecwid_get_scriptjs_code();
2128
 
2129
- $store_link_title = empty($instance['store_link_title']) ? __('View Products', 'ecwid-shopping-cart') : $instance['store_link_title'];
2130
-
2131
  $recently_viewed = false;
2132
  if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
2133
  $recently_viewed = json_decode($_COOKIE['ecwid-shopping-cart-recently-viewed']);
@@ -2140,19 +2196,31 @@ class EcwidRecentlyViewedWidget extends WP_Widget {
2140
 
2141
  echo '<div class="ecwid-recently-viewed-products" data-ecwid-max="' . $instance['number_of_products'] . '">';
2142
 
 
 
 
 
 
 
2143
  $ids = array();
2144
  if ($recently_viewed && isset($recently_viewed->products)) {
2145
 
2146
  for ($i = count($recently_viewed->products) - 1; $i >= 0; $i--) {
2147
  $product = $recently_viewed->products[$i];
 
2148
  $counter++;
2149
  if (isset($product->id) && isset($product->link)) {
2150
  $ids[] = $product->id;
2151
  $hide = $counter > $instance['number_of_products'] ? ' hidden' : '';
 
 
 
 
 
2152
  echo <<<HTML
2153
  <a class="product$hide" href="$product->link" alt="$product->name" title="$product->name">
2154
  <div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-$product->id" data-single-product-link="$product->link" itemscope itemtype="http://schema.org/Product" data-single-product-id="$product->id">
2155
- <div itemprop="image"></div>
2156
  <div class="ecwid-title" itemprop="name"></div>
2157
  <div itemtype="http://schema.org/Offer" itemscope itemprop="offers"><div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div></div>
2158
  </div>
@@ -2188,8 +2256,13 @@ HTML;
2188
 
2189
  echo "</div>";
2190
 
 
 
 
 
 
2191
  if (empty($recently_viewed->products)) {
2192
- echo '<a class="show-if-empty" href="' . ecwid_get_store_page_url() . '">' . $store_link_title . '</a>';
2193
  }
2194
 
2195
  echo $after_widget;
@@ -2209,10 +2282,11 @@ HTML;
2209
  }
2210
 
2211
  function form($instance){
 
2212
  $instance = wp_parse_args( (array) $instance,
2213
  array(
2214
  'title' => __('Recently Viewed Products', 'ecwid-shopping-cart'),
2215
- 'store_link_title' => __('View Products', 'ecwid-shopping-cart'),
2216
  'number_of_products' => 3
2217
  )
2218
  );
@@ -2296,7 +2370,8 @@ function ecwid_gather_stats()
2296
  'store_link_widget',
2297
  'recently_viewed_widget',
2298
  'avalanche_used',
2299
- 'chameleon_used'
 
2300
  );
2301
 
2302
  $usage_stats = ecwid_gather_usage_stats();
@@ -2333,7 +2408,8 @@ function ecwid_gather_usage_stats()
2333
  'store_link_widget',
2334
  'recently_viewed_widget',
2335
  'avalanche_used',
2336
- 'chameleon_used'
 
2337
  );
2338
 
2339
  $usage_stats = array();
@@ -2356,6 +2432,7 @@ function ecwid_gather_usage_stats()
2356
  $usage_stats['recently_viewed_widget'] = (bool) is_active_widget(false, false, 'ecwidrecentlyviewed');
2357
  $usage_stats['avalanche_used'] = (bool) is_plugin_active('ecwid-widgets-avalanche/ecwid_widgets_avalanche.php');
2358
  $usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
 
2359
 
2360
  return $usage_stats;
2361
  }
@@ -2381,32 +2458,80 @@ function ecwid_sso() {
2381
  global $current_user;
2382
  get_currentuserinfo();
2383
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2384
 
2385
 
 
 
 
2386
  if ($current_user->ID) {
2387
  $meta = get_user_meta($current_user->ID);
2388
 
2389
 
2390
- $user_data = array(
2391
  'appId' => "wp_" . get_ecwid_store_id(),
2392
  'userId' => "{$current_user->ID}",
2393
  'profile' => array(
2394
  'email' => $current_user->user_email,
2395
  'billingPerson' => array(
2396
- 'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
2397
- )
2398
  )
2399
  );
2400
- $user_data = base64_encode(json_encode($user_data));
2401
- $time = time();
2402
- $hmac = ecwid_hmacsha1("$user_data $time", $key);
2403
- return "<script data-cfasync='false' type='text/javascript'> var ecwid_sso_profile='$user_data $hmac $time' </script>";
2404
- }
2405
- else {
2406
- return "<script data-cfasync='false' type='text/javascript'> var ecwid_sso_profile='' </script>";
2407
  }
2408
 
2409
-
 
 
 
 
 
 
2410
  }
2411
 
2412
  // from: http://www.php.net/manual/en/function.sha1.php#39492
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: 3.3.1
9
  Author URI: http://www.ecwid.com?source=wporg
10
  */
11
 
35
  add_shortcode('ecwid', 'ecwid_shortcode');
36
 
37
  add_action( 'plugins_loaded', 'ecwid_init_integrations' );
38
+ add_filter('plugins_loaded', 'ecwid_load_textdomain');
39
 
40
  if ( is_admin() ){
41
  add_action('admin_init', 'ecwid_settings_api_init');
48
  add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
49
  add_action('wp_ajax_ecwid_hide_vote_message', 'ecwid_hide_vote_message');
50
  add_action('wp_ajax_ecwid_hide_message', 'ecwid_ajax_hide_message');
 
51
  add_filter('plugin_action_links_ecwid-shopping-cart/ecwid-shopping-cart.php', 'ecwid_plugin_actions');
52
  add_action('admin_head', 'ecwid_ie8_fonts_inclusion');
53
  add_action('admin_head', 'ecwid_send_stats');
54
  add_action('save_post', 'ecwid_save_post');
55
  add_action('init', 'ecwid_apply_theme');
56
  add_action('get_footer', 'ecwid_admin_get_footer');
57
+ add_action('admin_post_ecwid_connect', 'ecwid_admin_post_connect');
58
  } else {
59
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
60
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
76
  add_action('wp_head', 'ecwid_meta');
77
  add_action('wp_head', 'ecwid_canonical');
78
  add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
79
+ add_action('wp_head', 'ecwid_send_stats');
80
  add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
81
  add_filter('the_content', 'ecwid_content_started', 0);
82
  add_filter('body_class', 'ecwid_body_class');
83
  $ecwid_seo_title = '';
84
  }
85
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
86
+ if (get_option('ecwid_last_oauth_fail_time') > 0) {
87
+ add_action('plugins_loaded', 'ecwid_test_oauth');
88
+ }
89
 
90
  $ecwid_script_rendered = false; // controls single script.js on page
91
 
468
 
469
  function ecwid_get_last_logged_error()
470
  {
 
 
 
 
 
471
 
 
 
 
 
 
 
472
 
473
  return '';
474
  }
831
  return $content;
832
  }
833
 
834
+ function ecwid_wrap_shortcode_content($content, $name, $attrs)
835
  {
836
+ return "<!-- Ecwid shopping cart plugin v 3.3.1 --><!-- noptimize -->"
837
+ . ecwid_get_scriptjs_code(@$attrs['lang'])
838
  . "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
839
+ . "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 3.3.1 -->";
840
  }
841
 
842
  function ecwid_get_scriptjs_code($force_lang = null) {
844
 
845
  if (!$ecwid_script_rendered) {
846
  $store_id = get_ecwid_store_id();
847
+ $force_lang_str = !empty($force_lang) ? "&lang=$force_lang" : '';
848
  $s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
849
  $s = $s . ecwid_sso();
850
  $ecwid_script_rendered = true;
856
  }
857
 
858
  function ecwid_script_shortcode($params) {
859
+
860
  $attributes = shortcode_atts(
861
  array(
862
  'lang' => null
868
  $content = ecwid_get_scriptjs_code($attributes['lang']);
869
  }
870
 
871
+ return ecwid_wrap_shortcode_content($content, 'script', $params);
872
  }
873
 
874
  function ecwid_minicart_shortcode($attributes) {
876
  $params = shortcode_atts(
877
  array(
878
  'layout' => null,
879
+ 'is_ecwid_shortcode' => false,
880
+ 'lang' => null
881
  ), $attributes
882
  );
883
 
906
  $result = apply_filters('ecwid_minicart_shortcode_content', $result);
907
 
908
  if (!empty($result)) {
909
+ $result = ecwid_wrap_shortcode_content($result, 'minicart', $params);
910
  }
911
 
912
  return $result;
916
 
917
  $params = shortcode_atts(
918
  array(
919
+ 'is_ecwid_shortcode' => false,
920
+ 'lang' => null
921
  ), $attributes
922
  );
923
 
933
  $result = apply_filters('ecwid_search_shortcode_content', $result);
934
 
935
  if (!empty($result)) {
936
+ $result = ecwid_wrap_shortcode_content($result, 'search', $params);
937
  }
938
 
939
  return $result;
943
 
944
  $params = shortcode_atts(
945
  array(
946
+ 'is_ecwid_shortcode' => false,
947
+ 'lang' => null
948
  ), $attributes
949
  );
950
 
960
  $result = apply_filters('ecwid_categories_shortcode_content', $result);
961
 
962
  if (!empty($result)) {
963
+ $result = ecwid_wrap_shortcode_content($result, 'categories', $params);
964
  }
965
 
966
  return $result;
973
  'id' => null,
974
  'display' => 'picture title price options addtobag',
975
  'link' => 'yes'
976
+ ),
977
  $shortcode_attributes
978
  );
979
 
1023
 
1024
  update_option('ecwid_single_product_used', time());
1025
 
1026
+ return ecwid_wrap_shortcode_content($result, 'product', $shortcode_attributes);
1027
  }
1028
 
1029
  function ecwid_shortcode($attributes)
1038
  'list' => '10',
1039
  'table' => '20',
1040
  'minicart_layout' => 'attachToCategories',
1041
+ 'default_category_id' => 0,
1042
+ 'lang' => ''
1043
  )
1044
  , $attributes
1045
  );
1187
  </div>
1188
  <script data-cfasync="false" 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>
1189
  EOT;
1190
+ return ecwid_wrap_shortcode_content($s, 'product-browser', $shortcode_params);
1191
  }
1192
 
1193
 
1215
 
1216
  if (ecwid_is_api_enabled()) {
1217
  $api = ecwid_new_product_api();
1218
+ $product = $api->get_product_https($id);
1219
 
1220
  echo json_encode($product);
1221
  }
1223
  die();
1224
  }
1225
 
1226
+ add_filter('autoptimize_filter_js_exclude','ecwid_override_jsexclude',10,1);
1227
+ function ecwid_override_jsexclude($exclude)
1228
+ {
1229
+ return $exclude . ', xSearchPanel("style=")';
1230
+ }
1231
+
1232
  function ecwid_store_activate() {
1233
  $my_post = array();
1234
  $content = <<<EOT
1265
 
1266
  add_option("ecwid_installation_date", time());
1267
 
1268
+ add_option('ecwid_hide_appearance_menu', get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', '', 'yes');
1269
  // Does not affect updates, automatically turned on for new users only
1270
+ add_option("ecwid_advanced_theme_layout", get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID ? 'Y' : 'N', '', 'yes');
1271
 
1272
  add_option('ecwid_chameleon_primary', '');
1273
  add_option('ecwid_chameleon_background', '');
1500
  if (isset($_POST['ecwid_store_id'])) {
1501
  update_option('ecwid_is_api_enabled', 'off');
1502
  update_option('ecwid_api_check_time', 0);
1503
+ update_option('ecwid_last_oauth_fail_time', 0);
1504
  }
1505
  }
1506
 
1521
  if ($current_user->ID && function_exists('get_user_meta')) {
1522
  $meta = get_user_meta($current_user->ID);
1523
 
1524
+ $data = array(
1525
  'name' => get_user_meta($current_user->ID, 'first_name', true) . ' ' . get_user_meta($current_user->ID, 'last_name', true),
1526
  'nickname' => $current_user->display_name,
1527
  'email' => $current_user->user_email
1528
+ );
1529
+
1530
+ foreach ($data as $key => $value) {
1531
+ if (trim($value) == '') {
1532
+ unset($data[$key]);
1533
+ }
1534
+ }
1535
+ $user_data = '&' . build_query($data);
1536
  }
1537
 
1538
  $link = sprintf($link, $user_data);
1543
  function ecwid_general_settings_do_page() {
1544
 
1545
  $connection_error = isset($_GET['connection_error']);
1546
+
1547
+ $no_oauth = isset($_GET['oauth']) && @$_GET['oauth'] == 'no';
1548
+
1549
+ if (!$no_oauth) {
1550
+ $last_check = get_option('ecwid_last_oauth_fail_time');
1551
+
1552
+ // if something was not right last time
1553
+ if ($last_check > 0) {
1554
+ // then we consider it not working
1555
+ $no_oauth = ecwid_test_oauth();
1556
+ }
1557
  }
1558
 
1559
+ if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID && !$no_oauth) {
1560
  global $ecwid_oauth;
1561
 
1562
  $register = !$connection_error && !isset($_GET['connect']) && !@$_COOKIE['ecwid_create_store_clicked'];
1574
  }
1575
  }
1576
 
1577
+ function ecwid_admin_post_connect()
1578
+ {
1579
+ if (isset($_GET['force_store_id'])) {
1580
+ update_option('ecwid_store_id', $_GET['force_store_id']);
1581
+ update_option('ecwid_is_api_enabled', 'off');
1582
+ update_option('ecwid_api_check_time', 0);
1583
+ update_option('ecwid_last_oauth_fail_time', 1);
1584
+ wp_redirect('admin.php?page=ecwid');
1585
+ }
1586
+ global $ecwid_oauth;
1587
+
1588
+ if (ecwid_test_oauth(true)) {
1589
+ wp_redirect($ecwid_oauth->get_auth_dialog_url());
1590
+ } else {
1591
+ wp_redirect('admin.php?page=ecwid&oauth=no');
1592
+ }
1593
+ }
1594
+
1595
+ function ecwid_test_oauth($force = false)
1596
+ {
1597
+ global $ecwid_oauth;
1598
+
1599
+ $last_fail = get_option('ecwid_last_oauth_fail_time');
1600
+
1601
+ if ($last_fail < time() + 60*60*24 || $force) {
1602
+ $result = $ecwid_oauth->test_post();
1603
+ if ($result) {
1604
+ update_option('ecwid_last_oauth_fail_time', $last_fail = 0);
1605
+ } else {
1606
+ update_option('ecwid_last_oauth_fail_time', $last_fail = time());
1607
+ }
1608
+ }
1609
+
1610
+ return $last_fail == 0;
1611
+ }
1612
+
1613
  function ecwid_get_categories_for_selector() {
1614
  $categories = false;
1615
  if (ecwid_is_paid_account()) {
2164
  $recently_viewed = json_decode(stripslashes(@$_COOKIE['ecwid-shopping-cart-recently-viewed']));
2165
 
2166
  if ($recently_viewed && $recently_viewed->store_id != get_ecwid_store_id()) {
2167
+ setcookie('ecwid-shopping-cart-recently-viewed', null, strtotime('-1 day'));
2168
  }
2169
  }
2170
 
2184
 
2185
  echo ecwid_get_scriptjs_code();
2186
 
 
 
2187
  $recently_viewed = false;
2188
  if (isset($_COOKIE['ecwid-shopping-cart-recently-viewed'])) {
2189
  $recently_viewed = json_decode($_COOKIE['ecwid-shopping-cart-recently-viewed']);
2196
 
2197
  echo '<div class="ecwid-recently-viewed-products" data-ecwid-max="' . $instance['number_of_products'] . '">';
2198
 
2199
+
2200
+ $api = false;
2201
+ if (ecwid_is_api_enabled()) {
2202
+ $api = ecwid_new_product_api();
2203
+ }
2204
+
2205
  $ids = array();
2206
  if ($recently_viewed && isset($recently_viewed->products)) {
2207
 
2208
  for ($i = count($recently_viewed->products) - 1; $i >= 0; $i--) {
2209
  $product = $recently_viewed->products[$i];
2210
+
2211
  $counter++;
2212
  if (isset($product->id) && isset($product->link)) {
2213
  $ids[] = $product->id;
2214
  $hide = $counter > $instance['number_of_products'] ? ' hidden' : '';
2215
+
2216
+ if ($api) {
2217
+ $product_https = $api->get_product_https($product->id);
2218
+ }
2219
+
2220
  echo <<<HTML
2221
  <a class="product$hide" href="$product->link" alt="$product->name" title="$product->name">
2222
  <div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-$product->id" data-single-product-link="$product->link" itemscope itemtype="http://schema.org/Product" data-single-product-id="$product->id">
2223
+ <div itemprop="image" data-force-image="$product_https[imageUrl]"></div>
2224
  <div class="ecwid-title" itemprop="name"></div>
2225
  <div itemtype="http://schema.org/Offer" itemscope itemprop="offers"><div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div></div>
2226
  </div>
2256
 
2257
  echo "</div>";
2258
 
2259
+ $store_link_message = empty($instance['store_link_title']) ? __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart') : $instance['store_link_title'];
2260
+
2261
+ $page_id = ecwid_get_current_store_page_id();
2262
+ $post = get_post($page_id);
2263
+
2264
  if (empty($recently_viewed->products)) {
2265
+ echo '<a class="show-if-empty" href="' . ecwid_get_store_page_url() . '">' . $store_link_message . '</a>';
2266
  }
2267
 
2268
  echo $after_widget;
2282
  }
2283
 
2284
  function form($instance){
2285
+
2286
  $instance = wp_parse_args( (array) $instance,
2287
  array(
2288
  'title' => __('Recently Viewed Products', 'ecwid-shopping-cart'),
2289
+ 'store_link_title' => __('You have not viewed any product yet. Open store.', 'ecwid-shopping-cart'),
2290
  'number_of_products' => 3
2291
  )
2292
  );
2370
  'store_link_widget',
2371
  'recently_viewed_widget',
2372
  'avalanche_used',
2373
+ 'chameleon_used',
2374
+ 'http_post_fails'
2375
  );
2376
 
2377
  $usage_stats = ecwid_gather_usage_stats();
2408
  'store_link_widget',
2409
  'recently_viewed_widget',
2410
  'avalanche_used',
2411
+ 'chameleon_used',
2412
+ 'http_post_fails'
2413
  );
2414
 
2415
  $usage_stats = array();
2432
  $usage_stats['recently_viewed_widget'] = (bool) is_active_widget(false, false, 'ecwidrecentlyviewed');
2433
  $usage_stats['avalanche_used'] = (bool) is_plugin_active('ecwid-widgets-avalanche/ecwid_widgets_avalanche.php');
2434
  $usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
2435
+ $usage_stats['http_post_fails'] = get_option('ecwid_last_oauth_fail_time') > 0;
2436
 
2437
  return $usage_stats;
2438
  }
2458
  global $current_user;
2459
  get_currentuserinfo();
2460
 
2461
+ $signin_url = wp_login_url(ecwid_get_store_page_url());
2462
+ $signout_url = wp_logout_url(ecwid_get_store_page_url());
2463
+ $sign_in_out_urls = <<<JS
2464
+ window.EcwidSignInUrl = '$signin_url';
2465
+ window.EcwidSignOutUrl = '$signout_url';
2466
+ window.Ecwid.OnAPILoaded.add(function() {
2467
+
2468
+ window.Ecwid.setSignInUrls({
2469
+ signInUrl: '$signin_url',
2470
+ signOutUrl: '$signout_url'
2471
+ });
2472
+ });
2473
+ JS;
2474
+
2475
+ /*
2476
+ $signin_url = wp_login_url("URL_TO_REDIRECT");
2477
+ $signout_url = wp_logout_url('URL_TO_REDIRECT');
2478
+ $sign_in_out_urls = <<<JS
2479
+ window.EcwidSignInUrl = '$signin_url';
2480
+ window.EcwidSignOutUrl = '$signout_url';
2481
+ window.Ecwid.OnAPILoaded.add(function() {
2482
+
2483
+ window.Ecwid.setSignInUrls({
2484
+ signInUrl: '$signin_url',
2485
+ signOutUrl: '$signout_url'
2486
+ });
2487
+
2488
+
2489
+ window.Ecwid.setSignInProvider({
2490
+ addSignInLinkToPB: function() { return true; },
2491
+ signIn: function() {
2492
+ location.href = window.EcwidSignInUrl.replace('URL_TO_REDIRECT', encodeURIComponent(location.href));
2493
+ },
2494
+ signOut: function() {
2495
+ location.href = window.EcwidSignOutUrl.replace('URL_TO_REDIRECT', encodeURIComponent(location.href));
2496
+ },
2497
+ canSignOut: true,
2498
+ canSignIn: true
2499
+ });
2500
+
2501
+ });
2502
 
2503
 
2504
+ JS;
2505
+ */
2506
+ $ecwid_sso_profile = '';
2507
  if ($current_user->ID) {
2508
  $meta = get_user_meta($current_user->ID);
2509
 
2510
 
2511
+ $user_data = array(
2512
  'appId' => "wp_" . get_ecwid_store_id(),
2513
  'userId' => "{$current_user->ID}",
2514
  'profile' => array(
2515
  'email' => $current_user->user_email,
2516
  'billingPerson' => array(
2517
+ 'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
2518
+ )
2519
  )
2520
  );
2521
+ $user_data = base64_encode(json_encode($user_data));
2522
+ $time = time();
2523
+ $hmac = ecwid_hmacsha1("$user_data $time", $key);
2524
+
2525
+ $ecwid_sso_profile ="$user_data $hmac $time";
 
 
2526
  }
2527
 
2528
+ return <<<HTML
2529
+ <script data-cfasync="false" type="text/javascript">
2530
+
2531
+ var ecwid_sso_profile='$ecwid_sso_profile';
2532
+ $sign_in_out_urls
2533
+ </script>
2534
+ HTML;
2535
  }
2536
 
2537
  // from: http://www.php.net/manual/en/function.sha1.php#39492
includes/class-ecwid-oauth.php CHANGED
@@ -15,6 +15,13 @@ class Ecwid_OAuth {
15
  require_once(ECWID_PLUGIN_DIR . '/templates/reconnect.php');
16
  }
17
 
 
 
 
 
 
 
 
18
  public function get_auth_dialog_url( $scopes = array( 'read_store_profile', 'read_catalog' ) )
19
  {
20
  if ( !is_array( $scopes ) ) {
@@ -27,7 +34,7 @@ class Ecwid_OAuth {
27
  $params['client_id'] = get_option( 'ecwid_oauth_client_id' );
28
  $params['redirect_uri'] = admin_url( 'admin-post.php?action=ecwid_oauth' );
29
  $params['response_type'] = 'code';
30
- $params['scope'] = implode( ' ', $scopes );
31
 
32
  return $url . '?' . build_query( $params );
33
  }
@@ -81,8 +88,29 @@ class Ecwid_OAuth {
81
 
82
  protected function trigger_auth_error()
83
  {
84
- wp_redirect('admin.php?page=ecwid&connection_error=true');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
 
 
 
 
 
86
  }
87
  }
88
 
15
  require_once(ECWID_PLUGIN_DIR . '/templates/reconnect.php');
16
  }
17
 
18
+ public function test_post()
19
+ {
20
+ $return = wp_remote_post('https://my.ecwid.com/api/oauth/token');
21
+
22
+ return is_array($return);
23
+ }
24
+
25
  public function get_auth_dialog_url( $scopes = array( 'read_store_profile', 'read_catalog' ) )
26
  {
27
  if ( !is_array( $scopes ) ) {
34
  $params['client_id'] = get_option( 'ecwid_oauth_client_id' );
35
  $params['redirect_uri'] = admin_url( 'admin-post.php?action=ecwid_oauth' );
36
  $params['response_type'] = 'code';
37
+ $params['scope'] = implode( ',', $scopes );
38
 
39
  return $url . '?' . build_query( $params );
40
  }
88
 
89
  protected function trigger_auth_error()
90
  {
91
+ update_option('ecwid_last_oauth_fail_time', time());
92
+
93
+ $logs = get_option('ecwid_error_log');
94
+
95
+ if ($logs) {
96
+ $logs = json_decode($logs);
97
+ }
98
+
99
+ if (count($logs) > 0) {
100
+ $entry = $logs[count($logs) - 1];
101
+ if (isset($entry->message)) {
102
+ $last_error = $entry->message;
103
+ }
104
+ }
105
+ if (!$last_error) {
106
+ return;
107
+ }
108
 
109
+ $url = 'http://' . APP_ECWID_COM . '/script.js?805056&data_platform=wporg&data_wporg_error=' . urlencode($last_error) . '&url=' . urlencode(get_bloginfo('url'));
110
+
111
+ wp_remote_get($url);
112
+
113
+ wp_redirect('admin.php?page=ecwid&connection_error=true');
114
  }
115
  }
116
 
includes/class-ecwid-store-editor.php CHANGED
@@ -53,7 +53,7 @@ HTML;
53
  </a>
54
  HTML;
55
 
56
- return $button;
57
  }
58
 
59
  public function add_scripts() {
53
  </a>
54
  HTML;
55
 
56
+ return $context . $button;
57
  }
58
 
59
  public function add_scripts() {
includes/themes.php CHANGED
@@ -35,7 +35,7 @@ function ecwid_get_theme_identification()
35
 
36
  function ecwid_apply_theme($theme_name = null)
37
  {
38
- $themes = array('bretheon', 'responsive', 'twentyfourteen', 'pagelines', 'envision', 'twentyfifteen', 'customizr');
39
 
40
  if (empty($theme_name)) {
41
  $theme_name = ecwid_get_theme_identification();
@@ -44,7 +44,6 @@ function ecwid_apply_theme($theme_name = null)
44
  $theme_file = '';
45
 
46
  if (in_array($theme_name, $themes)) {
47
-
48
  $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
49
  }
50
 
35
 
36
  function ecwid_apply_theme($theme_name = null)
37
  {
38
+ $themes = array('bretheon', 'responsive', 'twentyfourteen', 'pagelines', 'envision', 'twentyfifteen', 'customizr', 'evolve', 'twentytwelve');
39
 
40
  if (empty($theme_name)) {
41
  $theme_name = ecwid_get_theme_identification();
44
  $theme_file = '';
45
 
46
  if (in_array($theme_name, $themes)) {
 
47
  $theme_file = ECWID_THEMES_DIR . '/class-ecwid-theme-' . $theme_name . '.php';
48
  }
49
 
includes/themes/class-ecwid-theme-evolve.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_Evolve extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Evolve';
8
+
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+
13
+ wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/evolve.css' ), array(), get_option('ecwid_plugin_version'), 'all' );
14
+ }
15
+ }
16
+
17
+ $ecwid_current_theme = new Ecwid_Theme_Evolve();
includes/themes/class-ecwid-theme-twentytwelve.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
4
+
5
+ class Ecwid_Theme_2012 extends Ecwid_Theme_Base
6
+ {
7
+ protected $name = 'Twenty Twelve';
8
+
9
+ protected $adjust_pb_scroll = true;
10
+
11
+ public function __construct()
12
+ {
13
+ parent::__construct();
14
+
15
+ if (ecwid_page_has_productbrowser()) {
16
+ wp_enqueue_script( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/js/themes/2012.js' ), array( 'jquery' ), get_option('ecwid_plugin_version'), true );
17
+ }
18
+ }
19
+ }
20
+
21
+ $ecwid_current_theme = new Ecwid_Theme_2012();
js/admin.js CHANGED
@@ -61,4 +61,12 @@
61
  });
62
  })
63
  });
 
 
 
 
 
 
 
 
64
  });
61
  });
62
  })
63
  });
64
+
65
+ jQuery('#ecwid-connect-no-oauth').click(function() {
66
+ debugger;
67
+ if (jQuery('#ecwid-store-id').val()) {
68
+ location.href = this.href + '&force_store_id=' + jQuery('#ecwid-store-id').val();
69
+ }
70
+ return false;
71
+ });
72
  });
js/ecwid-chameleon.js CHANGED
@@ -1,251 +1,253 @@
1
- if (typeof(Ecwid) == 'object') {
2
- Ecwid.OnAPILoaded.add(function() {
3
-
4
- var html_id = document.getElementsByTagName("html")[0].id;
5
- var body_id = document.getElementsByTagName("body")[0].id;;
6
- var css_prefix = 'html#'+html_id+' body#'+body_id+'.chameleon';
7
-
8
- var css = '';
9
- var parent = document.querySelector('.ecwid').parentNode;
10
- var computedStyle = getComputedStyle(parent, null);
11
-
12
- var primary_color = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_color !== 'undefined') ? ecwidChameleon.primary_color : computedStyle.color );
13
- var primary_background = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') ? ecwidChameleon.primary_background : getBackground(parent) );
14
-
15
- if (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') {
16
- var primary_link = tinycolor( ecwidChameleon.primary_link );
17
- }
18
- else {
19
- var a = document.createElement('a');
20
- a.href = a.textContent = url = '';
21
- parent.appendChild(a);
22
- var primary_link = tinycolor( document.defaultView.getComputedStyle(a, null).color );
23
- parent.removeChild(a);
24
- }
25
-
26
- if (tinycolor.equals(primary_background, 'transparent')) {
27
- primary_background = tinycolor('#fff');
28
- }
29
-
30
- var accent_color = tinycolor(primary_link.toString()).darken(15).brighten();
31
- var muted_accent_color = tinycolor(primary_link.toString()).darken(15).setAlpha(.6);
32
-
33
- var hover_link = tinycolor(primary_link.toString()).lighten(20);
34
- var muted_color = (primary_color.isLight()) ? tinycolor(primary_color.toString()).darken(15) : tinycolor(primary_color.toString()).lighten(20);
35
- var muted_link = tinycolor(primary_color.toString()).lighten(20);
36
- var secondary_link = tinycolor(primary_link.toString()).darken(20);
37
-
38
- var border_color = tinycolor(primary_color.toString()).setAlpha(.1);
39
-
40
- var muted_background = tinycolor(primary_background.toString());
41
- var muted_background = (muted_background.isLight()) ? muted_background.darken(5) : muted_background.lighten(15);
42
- var muted_soft_background = tinycolor(primary_background.toString());
43
- var muted_soft_background = (muted_soft_background.isLight()) ? muted_soft_background.darken(10) : muted_soft_background.lighten(20);
44
- var hover_background = tinycolor(primary_link.toString()).lighten(20).setAlpha(.2);
45
-
46
- var button_border_color = tinycolor(hover_link.toString()).darken(5);
47
- var button_hover_top = tinycolor(hover_link.toString()).lighten(5);
48
- var button_hover_bottom = tinycolor(primary_link.toString()).lighten(5);
49
- var button_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.3);
50
- var button_hover_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.4);
51
- var button_border_hover_color = tinycolor(hover_link.toString());
52
-
53
- // Additional rules
54
- if (!tinycolor.isReadable(accent_color, muted_soft_background)) {
55
- accent_color = tinycolor(secondary_link.toString()).brighten(20);
56
- muted_accent_color = tinycolor(secondary_link.toString()).lighten(20);
57
- }
58
- if (!tinycolor.isReadable(secondary_link, '#F0F0F0')) {
59
- secondary_link = (secondary_link.isLight()) ? tinycolor(secondary_link.toString()).darken() : tinycolor(secondary_link.toString()).lighten();
60
- }
61
- var button_color = tinycolor('#fff');
62
- if (!tinycolor.isReadable(button_color, primary_link)) {
63
- button_color = tinycolor(primary_background.toString());
64
- }
65
-
66
- // Font family
67
- css+= css_prefix + ' .ecwid, ' + css_prefix + ' .ecwid * { font-family: inherit !important; }\n';
68
-
69
- // Primary colors
70
- css+= css_prefix + ' div.ecwid-productBrowser-head{ color: '+ primary_color.toString() +'; }\n';
71
- css+= css_prefix + ' div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:visited{ color: '+ muted_color.toString() +'; }\n';
72
- css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:visited{ font-size: 17px; color: '+ primary_color.toString() +'; }\n';
73
- css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:visited{ color: '+ primary_color.toString() +'; }\n';
74
- css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-price{ color: '+ primary_color.toString() +'; }\n';
75
- css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmountMinus, ' + css_prefix + ' div.ecwid-productBrowser-cart-shippingAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-taxAmount{ color: '+ primary_color.toString() +'; }\n';
76
- css+= css_prefix + ' div.ecwid-productBrowser-cart-totalLabel{ color: '+ primary_color.toString() +'; }\n';
77
- css+= css_prefix + ' table.ecwid-productBrowser-productsTable-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsList-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsGrid-v2 div.ecwid-productBrowser-productNameLink:hover a { color: '+ primary_color.toString() +'; }\n';
78
- css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price, ' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ primary_color.toString() +'; }\n';
79
-
80
- // Muted colors
81
- css+= css_prefix + ' .ecwid{ color: '+ muted_color.toString() +'; }\n';
82
- css+= css_prefix + ' div.ecwid-productBrowser-categoryPath{ color: '+ muted_color.toString() +'; }\n';
83
- css+= css_prefix + ' div.ecwid-productBrowser-subcategories-categoryName{ color: '+ muted_color.toString() +'; }\n';
84
- css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-itemsCountLabel{ color: '+ muted_color.toString() +'; }\n';
85
- css+= css_prefix + ' div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
86
- css+= css_prefix + ' div.ecwid-results-topPanel div{ color: '+ muted_color.toString() +'; }\n';
87
- css+= css_prefix + ' div.ecwid-productBrowser-details-optionPanel label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
88
- css+= css_prefix + ' div.ecwid-productBrowser-details-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
89
- css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
90
- css+= css_prefix + ' span.ecwid-productBrowser-cart-weight{ color: '+ muted_color.toString() +'; }\n';
91
- css+= css_prefix + ' div.ecwid-productBrowser-cart-optionsList{ color: '+ muted_color.toString() +'; }\n';
92
- css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-shippingLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-taxLabel{ color: '+ muted_color.toString() +'; }\n';
93
- css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote{ color: '+ muted_color.toString() +'; }\n';
94
- css+= css_prefix + ' label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
95
- css+= css_prefix + ' div.ecwid-FormPopup-fieldWrapper label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
96
- css+= css_prefix + ' div.ecwid-Checkout-PasswordBlock-tip{ color: '+ muted_color.toString() +'; }\n';
97
- css+= css_prefix + ' div.ecwid-pager{ color: '+ muted_color.toString() +'; }\n';
98
- css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-disabled{ color: '+ muted_color.toString() +'; }\n';
99
- css+= css_prefix + ' div.ecwid-productBrowser-details-inTheBag div{ color: '+ muted_color.toString() +'; }\n';
100
- css+= css_prefix + ' div.ecwid-productBrowser-productsList-descr{ color: '+ muted_color.toString() +'; }\n';
101
- css+= css_prefix + ' div.ecwid-productBrowser-productsTable div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
102
- css+= css_prefix + ' div.ecwid-productBrowser-extraFields-side{ color: '+ muted_color.toString() +'; }\n';
103
- css+= css_prefix + ' div.ecwid-Invoice-block{ color: '+ muted_color.toString() +'; }\n';
104
- css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
105
- css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-optionsList{ color: '+ muted_color.toString() +'; }\n';
106
- css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price,' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
107
- css+= css_prefix + ' div.ecwid-Invoice-Summary-label,' + css_prefix + ' div.ecwid-Invoice-Summary-value{ color: '+ muted_color.toString() +'; }\n';
108
- css+= css_prefix + ' div.ecwid-Invoice-header-placeOrder div.gwt-Label,' + css_prefix + ' div.ecwid-Invoice-footer-placeOrder div.gwt-Label,' + css_prefix + ' td.ecwid-Invoice-header-orderConfirmation-text,' + css_prefix + ' td.ecwid-Invoice-footer-orderConfirmation-text{ color: '+ muted_color.toString() +'; }\n';
109
- css+= css_prefix + ' div.ecwid-productBrowser-details-outOfStockLabel{ color: '+ muted_color.toString() +'; }\n';
110
-
111
- // Borders
112
- css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productTopFragment-mouseover,' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productBottomFragment-mouseover{ border-color: '+ border_color.toString() +'; }\n';
113
- css+= css_prefix + ' .ecwid-productBrowser-productsGrid-v2 td.ecwid-productBrowser-productsGrid-productInside.ecwid-productBrowser-productsGrid-hover{ border-color: '+ border_color.toString() +'; }\n';
114
- css+= css_prefix + ' td.ecwid-productBrowser-productsList-mouseover{ border-color: '+ border_color.toString() +'; }\n';
115
- css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-top-hover{ border-color: '+ border_color.toString() +'; }\n';
116
- css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-bottom-hover{ border-color: '+ border_color.toString() +'; }\n';
117
- css+= css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarFirst,' + css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarRest,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem,' + css_prefix + ' div.ecwid-categories-horizontal-menuBarContainer,' + css_prefix + ' td.ecwid-categories-vertical-table-cell,' + css_prefix + ' div.ecwid-categories-MenuBarPopup div.menuSeparatorInner{ border-color: '+ border_color.toString() +'; }\n';
118
-
119
- // Accents
120
- css+= css_prefix + ' div.ecwid-productBrowser-price{ color: '+ accent_color.toString() +'; }\n';
121
- css+= css_prefix + ' div.ecwid-productBrowser-details-inStockLabel{ color: '+ muted_accent_color.toString() +'; }\n';
122
- css+= css_prefix + ' div.ecwid-Checkout-blockTitle,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-Label,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-HTML{ color: '+ muted_accent_color.toString() +'; }\n';
123
- css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-visited{ color: '+ muted_accent_color.toString() +'; }\n';
124
- css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-current{ color: '+ muted_accent_color.toString() +'; border-color: '+ muted_accent_color.toString() +'; }\n';
125
- css+= css_prefix + ' div.ecwid-fieldEnvelope-label{ color: '+ accent_color.toString() +'; }\n';
126
- css+= css_prefix + ' input.gwt-PasswordTextBox,' + css_prefix + ' textarea.gwt-TextArea,' + css_prefix + ' input.gwt-DateBox{ color: '+ accent_color.toString() +'; }\n';
127
- css+= css_prefix + ' .ecwid div.ecwid-AccentedContinueButton-label{ color: '+ accent_color.toString() +'; }\n';
128
- css+= css_prefix + ' div.ecwid-productBrowser-cart-termsCheckbox-rollover{ background-color: '+ hover_background.toString() +'; }\n';
129
- css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote span{ color: '+ muted_accent_color.toString() +'; }\n';
130
- css+= css_prefix + ' div.ecwid-productBrowser-cart-asterisk{ color: '+ muted_accent_color.toString() +'; }\n';
131
- css+= css_prefix + ' div.ecwid-productBrowser-cart-totalAmount{ color: '+ accent_color.toString() +'; }\n';
132
-
133
- // Primary links
134
- css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:active,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:visited{ color: '+ primary_link.toString() +'; }\n';
135
- css+= css_prefix + ' .ecwid a,' + css_prefix + ' .ecwid a:active, ' + css_prefix + ' .ecwid a:visited{ color: '+ primary_link.toString() +'; }\n';
136
- css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link{ color: '+ primary_link.toString() +'; }\n';
137
- css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-enabled{ color: '+ primary_link.toString() +'; }\n';
138
- css+= css_prefix + ' div.ecwid-productBrowser-productsTable-addToBagLink{ color: '+ primary_link.toString() +'; }\n';
139
-
140
- // Hover links
141
- css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a:hover{ color: '+ hover_link.toString() +'; }\n';
142
- css+= css_prefix + ' .ecwid a:hover{ color: '+ hover_link.toString() +'; }\n';
143
- css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link:hover{ color: '+ hover_link.toString() +'; }\n';
144
-
145
- // Backgrounds
146
- css+= css_prefix + ' .ecwid .ecwid-ProductDetails-gray-panel-bottom,' + css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
147
- css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel div.ecwid-productBrowser-sharePanel-header{ background-color: '+ muted_background.toString() +'; }\n';
148
- css+= css_prefix + ' a.ecwid-productBrowser-nav-left,' + css_prefix + ' a.ecwid-productBrowser-nav-right{ background-color: '+ muted_background.toString() +'; }\n';
149
- css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
150
- css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel .ecwid-productBrowser-ask-advice-panel-icon{ background-color: '+ muted_background.toString() +'; }\n';
151
- css+= css_prefix + ' div.ecwid-productBrowser-backgroundedPanel{ background-color: '+ muted_soft_background.toString() +'; }\n';
152
- css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-sharePanel-buttonsContainer{ background-color: '+ muted_soft_background.toString() +'; border-color: '+ tinycolor(muted_color.toString()).setAlpha(.2).toString() +'}\n';
153
- css+= css_prefix + ' tr.ecwid-productBrowser-cart-itemsTable-row-selected,' + css_prefix + ' td.ecwid-productBrowser-cart-itemsTable-cell-selected{ background-color: '+ muted_background.toString() +'; }\n';
154
- css+= css_prefix + ' div.ecwid-productBrowser-cart-EnterCouponBox{ background-color: '+ muted_background.toString() +'; border-color: transparent; }\n';
155
- css+= css_prefix + ' div.ecwid-form{ background-color: '+ muted_background.toString() +'; }\n';
156
- css+= css_prefix + ' .ecwid input.ecwid-productBrowser-details-qtyTextField{ color: '+ primary_color.toString() +'; }\n';
157
- css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cell{ background-color: '+ primary_background.toString() +'; }\n';
158
- css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cellOdd{ background-color: '+ muted_background.toString() +'; }\n';
159
-
160
- css+= css_prefix + ' div.ecwid-Invoice-cell-title{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
161
- css+= css_prefix + ' div.ecwid-Invoice-blockTitle{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
162
- css+= css_prefix + ' td.ecwid-Invoice-cell{ background-color: '+ muted_background.toString() +'; }\n';
163
- css+= css_prefix + ' td.ecwid-Invoice-edgeCell{ background-color: '+ muted_background.toString() +'; }\n';
164
-
165
- // Buttons
166
- css+= css_prefix + ' div.ecwid-AddToBagButton::after { content: "' + msg('TableProductsContainer.add_to_bag', 'Add To Bag') + '"; white-space: nowrap; }\n';
167
- css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after { content: "' + msg('ShoppingCartView.continue', 'Continue Shopping') + '"; white-space: nowrap; }\n';
168
- css+= css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton:after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Checkout') + '"; white-space: nowrap; }\n';
169
- css+= css_prefix + ' div.ecwid-Checkout-placeOrderButton::after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Place Order') + '"; white-space: nowrap; }\n';
170
-
171
- css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after, ' + css_prefix + ' div.ecwid-AddToBagButton::after, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton::after, ' + css_prefix + ' button.ecwid-AccentedButton span, ' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after{ color: '+ button_color +'; }\n';
172
-
173
- css+= css_prefix + ' button.ecwid-AccentedButton,' + css_prefix + ' div.ecwid-AddToBagButton-up, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up,' + css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-AddToBagButton-down-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-down-hovering,' + css_prefix + ' button.ecwid-AccentedButton:hover { -webkit-box-sizing: border-box; box-sizing: border-box; width: auto; min-width: 160px; height: auto; padding: 11px 40px; background-color: '+primary_link+'; background-image: -webkit-gradient(linear, left top, left bottom, from('+hover_link+'), to('+primary_link+')); background-image: -webkit-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -moz-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -ms-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -o-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: linear-gradient(to bottom, '+hover_link+', '+primary_link+'); border: 1px solid '+button_border_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_shadow+'; box-shadow: inset 0 1px 0 '+button_shadow+'; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,0.1); border-radius: 3px; padding-left: 20px; padding-right: 20px; }\n';
174
-
175
- css+= css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering { background-image: -webkit-gradient(linear, left top, left bottom, from('+button_hover_top+'), to('+button_hover_bottom+')); background-image: -webkit-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -moz-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -ms-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -o-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: linear-gradient(to bottom, '+button_hover_top+', '+button_hover_bottom+'); border: 1px solid '+button_border_hover_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_hover_shadow+'; box-shadow: inset 0 1px 0 '+button_hover_shadow+'; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,0.2); } \n';
176
-
177
-
178
- css+= css_prefix + ' button.gwt-Button,' + css_prefix + ' #wrapper button.gwt-Button{ color: '+ secondary_link +'; }\n';
179
- css+= css_prefix + ' button.ecwid-AccentedButton{ line-height: 1; }\n';
180
-
181
- // Search
182
- css+= css_prefix + ' .ecwid-SearchPanel-button { background-color: '+ muted_background.toString() +'; border: 1px solid '+ border_color +'; border-radius: 2px; color: '+ primary_color +'; cursor: pointer; font-size: 12px; height: 26px; outline: medium none; padding: 2px 5px; text-decoration: none; vertical-align: baseline; white-space: nowrap; }\n';
183
-
184
- // Categories
185
- css+= css_prefix + ' span.ecwid-categories-category{ color: '+ muted_color.toString() +'; }\n';
186
- css+= css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-selected span.ecwid-categories-category,' + css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-current span.ecwid-categories-category,' + css_prefix + ' td.ecwid-categories-vertical-table-cell-selected span.ecwid-categories-category,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected span.ecwid-categories-category{ color: '+ primary_link.toString() +'; }\n';
187
-
188
- css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected td { background: none !important; }\n';
189
- css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected { border: 1px solid; border-bottom: 0px; border-color: '+ border_color.toString() +'; }\n';
190
- css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel { min-height: 18px; height: auto; }\n';
191
-
192
- head = document.getElementsByTagName('head')[0],
193
- style = document.createElement('style');
194
- style.type = 'text/css';
195
- if (style.styleSheet) {
196
- style.styleSheet.cssText = css;
197
- } else {
198
- style.appendChild(document.createTextNode(css));
199
- }
200
- head.appendChild(style);
201
- document.getElementsByTagName("body")[0].className += ' chameleon';
202
- });
203
- }
204
-
205
- function getLinkColor(url) {
206
- var a = document.createElement('a');
207
- a.href = a.textContent = url;
208
- document.body.appendChild(a);
209
- return document.defaultView.getComputedStyle(a, null).color;
210
- }
211
-
212
- function toCamelCase(s){
213
- for(var exp=/-([a-z])/; exp.test(s); s=s.replace(exp,RegExp.$1.toUpperCase()));
214
- return s;
215
- }
216
-
217
- function getStyle(e,a){
218
- var v=null;
219
- if(document.defaultView && document.defaultView.getComputedStyle){
220
- var cs = document.defaultView.getComputedStyle(e, null);
221
- if(cs && cs.getPropertyValue)
222
- v = cs.getPropertyValue(a);
223
- }
224
- if(!v && e.currentStyle)
225
- v = e.currentStyle[toCamelCase(a)];
226
- return v;
227
- }
228
-
229
- function getBackground(e){
230
- var v = getStyle(e,'background-color');
231
- while (!v || v=='transparent' || v=='#000000' || v=='rgba(0, 0, 0, 0)'){
232
- if( e == document.body )
233
- v = '#fff';
234
- else {
235
- e = e.parentNode;
236
- v = getStyle(e, 'background-color');
237
- }
238
- }
239
- return v;
240
- }
241
-
242
- function msg(label, defaultValue) {
243
- var messageBundles = (window.Ecwid && window.Ecwid.MessageBundles) ? window.Ecwid.MessageBundles : {};
244
- var bundle = messageBundles['ru.cdev.xnext.client'] ? messageBundles['ru.cdev.xnext.client'] : {};
245
- return bundle[label] || defaultValue;
246
- }
247
-
248
- // TinyColor v1.1.2
249
- // https://github.com/bgrins/TinyColor
250
- // Brian Grinstead, MIT License
251
- !function(){function t(r,n){if(r=r?r:"",n=n||{},r instanceof t)return r;if(!(this instanceof t))return new t(r,n);var a=e(r);this._originalInput=r,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=j(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.gradientType,this._r<1&&(this._r=j(this._r)),this._g<1&&(this._g=j(this._g)),this._b<1&&(this._b=j(this._b)),this._ok=a.ok,this._tc_id=I++}function e(t){var e={r:0,g:0,b:0},n=1,i=!1,o=!1;return"string"==typeof t&&(t=q(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=r(t.r,t.g,t.b),i=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=O(t.s),t.v=O(t.v),e=s(t.h,t.s,t.v),i=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=O(t.s),t.l=O(t.l),e=a(t.h,t.s,t.l),i=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=k(n),{ok:i,format:t.format||o,r:T(255,$(e.r,0)),g:T(255,$(e.g,0)),b:T(255,$(e.b,0)),a:n}}function r(t,e,r){return{r:255*A(t,255),g:255*A(e,255),b:255*A(r,255)}}function n(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=(i+s)/2;if(i==s)n=a=0;else{var f=i-s;switch(a=o>.5?f/(2-i-s):f/(i+s),i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,l:o}}function a(t,e,r){function n(t,e,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?t+6*(e-t)*r:.5>r?e:2/3>r?t+(e-t)*(2/3-r)*6:t}var a,i,s;if(t=A(t,360),e=A(e,100),r=A(r,100),0===e)a=i=s=r;else{var o=.5>r?r*(1+e):r+e-r*e,f=2*r-o;a=n(f,o,t+1/3),i=n(f,o,t),s=n(f,o,t-1/3)}return{r:255*a,g:255*i,b:255*s}}function i(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=i,f=i-s;if(a=0===i?0:f/i,i==s)n=0;else{switch(i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,v:o}}function s(t,e,r){t=6*A(t,360),e=A(e,100),r=A(r,100);var n=N.floor(t),a=t-n,i=r*(1-e),s=r*(1-a*e),o=r*(1-(1-a)*e),f=n%6,h=[r,s,i,i,o,r][f],u=[o,r,r,s,i,i][f],l=[i,i,o,r,r,s][f];return{r:255*h,g:255*u,b:255*l}}function o(t,e,r,n){var a=[M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(t,e,r,n){var a=[M(P(n)),M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return a.join("")}function h(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s-=r/100,n.s=H(n.s),t(n)}function u(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s+=r/100,n.s=H(n.s),t(n)}function l(e){return t(e).desaturate(100)}function c(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l+=r/100,n.l=H(n.l),t(n)}function g(e,r){r=0===r?0:r||10;var n=t(e).toRgb();return n.r=$(0,T(255,n.r-j(255*-(r/100)))),n.g=$(0,T(255,n.g-j(255*-(r/100)))),n.b=$(0,T(255,n.b-j(255*-(r/100)))),t(n)}function d(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l-=r/100,n.l=H(n.l),t(n)}function b(e,r){var n=t(e).toHsl(),a=(j(n.h)+r)%360;return n.h=0>a?360+a:a,t(n)}function p(e){var r=t(e).toHsl();return r.h=(r.h+180)%360,t(r)}function m(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+120)%360,s:r.s,l:r.l}),t({h:(n+240)%360,s:r.s,l:r.l})]}function _(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+90)%360,s:r.s,l:r.l}),t({h:(n+180)%360,s:r.s,l:r.l}),t({h:(n+270)%360,s:r.s,l:r.l})]}function v(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+72)%360,s:r.s,l:r.l}),t({h:(n+216)%360,s:r.s,l:r.l})]}function y(e,r,n){r=r||6,n=n||30;var a=t(e).toHsl(),i=360/n,s=[t(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,s.push(t(a));return s}function w(e,r){r=r||6;for(var n=t(e).toHsv(),a=n.h,i=n.s,s=n.v,o=[],f=1/r;r--;)o.push(t({h:a,s:i,v:s})),s=(s+f)%1;return o}function x(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function k(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function A(t,e){R(t)&&(t="100%");var r=F(t);return t=T(e,$(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),N.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return T(1,$(0,t))}function S(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function F(t){return"string"==typeof t&&-1!=t.indexOf("%")}function M(t){return 1==t.length?"0"+t:""+t}function O(t){return 1>=t&&(t=100*t+"%"),t}function P(t){return Math.round(255*parseFloat(t)).toString(16)}function C(t){return S(t)/255}function q(t){t=t.replace(z,"").replace(E,"").toLowerCase();var e=!1;if(B[t])t=B[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=U.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=U.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=U.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=U.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=U.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=U.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=U.hex8.exec(t))?{a:C(r[1]),r:S(r[2]),g:S(r[3]),b:S(r[4]),format:e?"name":"hex8"}:(r=U.hex6.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),format:e?"name":"hex"}:(r=U.hex3.exec(t))?{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function L(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var z=/^[\s,#]+/,E=/\s+$/,I=0,N=Math,j=N.round,T=N.min,$=N.max,D=N.random;t.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n,a,i,s=this.toRgb();return t=s.r/255,e=s.g/255,r=s.b/255,n=.03928>=t?t/12.92:Math.pow((t+.055)/1.055,2.4),a=.03928>=e?e/12.92:Math.pow((e+.055)/1.055,2.4),i=.03928>=r?r/12.92:Math.pow((r+.055)/1.055,2.4),.2126*n+.7152*a+.0722*i},setAlpha:function(t){return this._a=k(t),this._roundA=j(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),n=j(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),a=j(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return f(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:j(this._r),g:j(this._g),b:j(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+j(this._r)+", "+j(this._g)+", "+j(this._b)+")":"rgba("+j(this._r)+", "+j(this._g)+", "+j(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:j(100*A(this._r,255))+"%",g:j(100*A(this._g,255))+"%",b:j(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%)":"rgba("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:G[o(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+f(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var i=t(e);n=i.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,a=!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return a?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(c,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},t.fromRatio=function(e,r){if("object"==typeof e){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[a]="a"===a?e[a]:O(e[a]));e=n}return t(e,r)},t.equals=function(e,r){return e&&r?t(e).toRgbString()==t(r).toRgbString():!1},t.random=function(){return t.fromRatio({r:D(),g:D(),b:D()})},t.mix=function(e,r,n){n=0===n?0:n||50;var a,i=t(e).toRgb(),s=t(r).toRgb(),o=n/100,f=2*o-1,h=s.a-i.a;a=f*h==-1?f:(f+h)/(1+f*h),a=(a+1)/2;var u=1-a,l={r:s.r*a+i.r*u,g:s.g*a+i.g*u,b:s.b*a+i.b*u,a:s.a*o+i.a*(1-o)};return t(l)},t.readability=function(e,r){var n=t(e),a=t(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)},t.isReadable=function(e,r,n){var a,i,s=t.readability(e,r);switch(i=!1,a=L(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},t.mostReadable=function(e,r,n){var a,i,s,o,f=null,h=0;n=n||{},i=n.includeFallbackColors,s=n.level,o=n.size;for(var u=0;u<r.length;u++)a=t.readability(e,r[u]),a>h&&(h=a,f=t(r[u]));return t.isReadable(e,f,{level:s,size:o})||!i?f:(n.includeFallbackColors=!1,t.mostReadable(e,["#fff","#000"],n))};var B=t.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=t.hexNames=x(B),U=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd?define(function(){return t}):window.tinycolor=t}();
 
 
1
+ if (typeof(Ecwid) == 'object') {
2
+ Ecwid.OnAPILoaded.add(function() {
3
+
4
+ var html_id = document.getElementsByTagName("html")[0].id;
5
+ var body_id = document.getElementsByTagName("body")[0].id;;
6
+ var css_prefix = 'html#'+html_id+' body#'+body_id+'.chameleon';
7
+
8
+ var css = '';
9
+ var parent = document.querySelector('.ecwid-shopping-cart-product-browser').parentNode;
10
+ var computedStyle = getComputedStyle(parent, null);
11
+
12
+ var primary_color = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_color !== 'undefined') ? ecwidChameleon.primary_color : computedStyle.color );
13
+ var primary_background = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') ? ecwidChameleon.primary_background : getBackground(parent) );
14
+
15
+ if (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') {
16
+ var primary_link = tinycolor( ecwidChameleon.primary_link );
17
+ }
18
+ else {
19
+ var a = document.createElement('a');
20
+ a.href = a.textContent = url = '';
21
+ parent.appendChild(a);
22
+ var primary_link = tinycolor( document.defaultView.getComputedStyle(a, null).color );
23
+ parent.removeChild(a);
24
+ }
25
+
26
+ if (tinycolor.equals(primary_background, 'transparent')) {
27
+ primary_background = tinycolor('#fff');
28
+ }
29
+
30
+ var accent_color = tinycolor(primary_link.toString()).darken(15).brighten();
31
+ var muted_accent_color = tinycolor(primary_link.toString()).darken(15).setAlpha(.6);
32
+
33
+ var hover_link = tinycolor(primary_link.toString()).lighten(20);
34
+ var muted_color = (primary_color.isLight()) ? tinycolor(primary_color.toString()).darken(15) : tinycolor(primary_color.toString()).lighten(20);
35
+ var muted_link = tinycolor(primary_color.toString()).lighten(20);
36
+ var secondary_link = tinycolor(primary_link.toString()).darken(20);
37
+
38
+ var border_color = tinycolor(primary_color.toString()).setAlpha(.1);
39
+
40
+ var muted_background = tinycolor(primary_background.toString());
41
+ var muted_background = (muted_background.isLight()) ? muted_background.darken(5) : muted_background.lighten(15);
42
+ var muted_soft_background = tinycolor(primary_background.toString());
43
+ var muted_soft_background = (muted_soft_background.isLight()) ? muted_soft_background.darken(10) : muted_soft_background.lighten(20);
44
+ var hover_background = tinycolor(primary_link.toString()).lighten(20).setAlpha(.2);
45
+
46
+ var button_border_color = tinycolor(hover_link.toString()).darken(5);
47
+ var button_hover_top = tinycolor(hover_link.toString()).lighten(5);
48
+ var button_hover_bottom = tinycolor(primary_link.toString()).lighten(5);
49
+ var button_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.3);
50
+ var button_hover_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.4);
51
+ var button_border_hover_color = tinycolor(hover_link.toString());
52
+
53
+ // Additional rules
54
+ if (!tinycolor.isReadable(accent_color, muted_soft_background)) {
55
+ accent_color = tinycolor(secondary_link.toString()).brighten(20);
56
+ muted_accent_color = tinycolor(secondary_link.toString()).lighten(20);
57
+ }
58
+ if (!tinycolor.isReadable(secondary_link, '#F0F0F0')) {
59
+ secondary_link = (secondary_link.isLight()) ? tinycolor(secondary_link.toString()).darken() : tinycolor(secondary_link.toString()).lighten();
60
+ }
61
+ var button_color = tinycolor('#fff');
62
+ if (!tinycolor.isReadable(button_color, primary_link)) {
63
+ button_color = tinycolor(primary_background.toString());
64
+ }
65
+
66
+ // Font family
67
+ css+= css_prefix + ' .ecwid, ' + css_prefix + ' .ecwid * '+ css_prefix + ' .ecwid-minicart *, ' + css_prefix + ' .ecwid-SearchPanel * { font-family: inherit !important; }\n';
68
+
69
+
70
+ // Primary colors
71
+ css+= css_prefix + ' div.ecwid-productBrowser-head{ color: '+ primary_color.toString() +'; }\n';
72
+ css+= css_prefix + ' div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:visited{ color: '+ muted_color.toString() +'; }\n';
73
+ css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:visited{ font-size: 17px; color: '+ primary_color.toString() +'; }\n';
74
+ css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:visited{ color: '+ primary_color.toString() +'; }\n';
75
+ css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-price{ color: '+ primary_color.toString() +'; }\n';
76
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmountMinus, ' + css_prefix + ' div.ecwid-productBrowser-cart-shippingAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-taxAmount{ color: '+ primary_color.toString() +'; }\n';
77
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-totalLabel{ color: '+ primary_color.toString() +'; }\n';
78
+ css+= css_prefix + ' table.ecwid-productBrowser-productsTable-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsList-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsGrid-v2 div.ecwid-productBrowser-productNameLink:hover a { color: '+ primary_color.toString() +'; }\n';
79
+ css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price, ' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ primary_color.toString() +'; }\n';
80
+ css+= css_prefix + ' .ecwid-minicart-mini-count{ color: '+ primary_link.toString() +'; }\n';
81
+
82
+ // Muted colors
83
+ css+= css_prefix + ' .ecwid{ color: '+ muted_color.toString() +'; }\n';
84
+ css+= css_prefix + ' div.ecwid-productBrowser-categoryPath{ color: '+ muted_color.toString() +'; }\n';
85
+ css+= css_prefix + ' div.ecwid-productBrowser-subcategories-categoryName{ color: '+ muted_color.toString() +'; }\n';
86
+ css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-itemsCountLabel{ color: '+ muted_color.toString() +'; }\n';
87
+ css+= css_prefix + ' div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
88
+ css+= css_prefix + ' div.ecwid-results-topPanel div{ color: '+ muted_color.toString() +'; }\n';
89
+ css+= css_prefix + ' div.ecwid-productBrowser-details-optionPanel label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
90
+ css+= css_prefix + ' div.ecwid-productBrowser-details-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
91
+ css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
92
+ css+= css_prefix + ' span.ecwid-productBrowser-cart-weight{ color: '+ muted_color.toString() +'; }\n';
93
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-optionsList{ color: '+ muted_color.toString() +'; }\n';
94
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-shippingLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-taxLabel{ color: '+ muted_color.toString() +'; }\n';
95
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote{ color: '+ muted_color.toString() +'; }\n';
96
+ css+= css_prefix + ' label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
97
+ css+= css_prefix + ' div.ecwid-FormPopup-fieldWrapper label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
98
+ css+= css_prefix + ' div.ecwid-Checkout-PasswordBlock-tip{ color: '+ muted_color.toString() +'; }\n';
99
+ css+= css_prefix + ' div.ecwid-pager{ color: '+ muted_color.toString() +'; }\n';
100
+ css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-disabled{ color: '+ muted_color.toString() +'; }\n';
101
+ css+= css_prefix + ' div.ecwid-productBrowser-details-inTheBag div{ color: '+ muted_color.toString() +'; }\n';
102
+ css+= css_prefix + ' div.ecwid-productBrowser-productsList-descr{ color: '+ muted_color.toString() +'; }\n';
103
+ css+= css_prefix + ' div.ecwid-productBrowser-productsTable div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
104
+ css+= css_prefix + ' div.ecwid-productBrowser-extraFields-side{ color: '+ muted_color.toString() +'; }\n';
105
+ css+= css_prefix + ' div.ecwid-Invoice-block{ color: '+ muted_color.toString() +'; }\n';
106
+ css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
107
+ css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-optionsList{ color: '+ muted_color.toString() +'; }\n';
108
+ css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price,' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
109
+ css+= css_prefix + ' div.ecwid-Invoice-Summary-label,' + css_prefix + ' div.ecwid-Invoice-Summary-value{ color: '+ muted_color.toString() +'; }\n';
110
+ css+= css_prefix + ' div.ecwid-Invoice-header-placeOrder div.gwt-Label,' + css_prefix + ' div.ecwid-Invoice-footer-placeOrder div.gwt-Label,' + css_prefix + ' td.ecwid-Invoice-header-orderConfirmation-text,' + css_prefix + ' td.ecwid-Invoice-footer-orderConfirmation-text{ color: '+ muted_color.toString() +'; }\n';
111
+ css+= css_prefix + ' div.ecwid-productBrowser-details-outOfStockLabel{ color: '+ muted_color.toString() +'; }\n';
112
+
113
+ // Borders
114
+ css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productTopFragment-mouseover,' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productBottomFragment-mouseover{ border-color: '+ border_color.toString() +'; }\n';
115
+ css+= css_prefix + ' .ecwid-productBrowser-productsGrid-v2 td.ecwid-productBrowser-productsGrid-productInside.ecwid-productBrowser-productsGrid-hover{ border-color: '+ border_color.toString() +'; }\n';
116
+ css+= css_prefix + ' td.ecwid-productBrowser-productsList-mouseover{ border-color: '+ border_color.toString() +'; }\n';
117
+ css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-top-hover{ border-color: '+ border_color.toString() +'; }\n';
118
+ css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-bottom-hover{ border-color: '+ border_color.toString() +'; }\n';
119
+ css+= css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarFirst,' + css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarRest,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem,' + css_prefix + ' div.ecwid-categories-horizontal-menuBarContainer,' + css_prefix + ' td.ecwid-categories-vertical-table-cell,' + css_prefix + ' div.ecwid-categories-MenuBarPopup div.menuSeparatorInner{ border-color: '+ border_color.toString() +'; }\n';
120
+
121
+ // Accents
122
+ css+= css_prefix + ' div.ecwid-productBrowser-price{ color: '+ accent_color.toString() +'; }\n';
123
+ css+= css_prefix + ' div.ecwid-productBrowser-details-inStockLabel{ color: '+ muted_accent_color.toString() +'; }\n';
124
+ css+= css_prefix + ' div.ecwid-Checkout-blockTitle,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-Label,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-HTML{ color: '+ muted_accent_color.toString() +'; }\n';
125
+ css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-visited{ color: '+ muted_accent_color.toString() +'; }\n';
126
+ css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-current{ color: '+ muted_accent_color.toString() +'; border-color: '+ muted_accent_color.toString() +'; }\n';
127
+ css+= css_prefix + ' div.ecwid-fieldEnvelope-label{ color: '+ accent_color.toString() +'; }\n';
128
+ css+= css_prefix + ' input.gwt-PasswordTextBox,' + css_prefix + ' textarea.gwt-TextArea,' + css_prefix + ' input.gwt-DateBox{ color: '+ accent_color.toString() +'; }\n';
129
+ css+= css_prefix + ' .ecwid div.ecwid-AccentedContinueButton-label{ color: '+ accent_color.toString() +'; }\n';
130
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-termsCheckbox-rollover{ background-color: '+ hover_background.toString() +'; }\n';
131
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote span{ color: '+ muted_accent_color.toString() +'; }\n';
132
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-asterisk{ color: '+ muted_accent_color.toString() +'; }\n';
133
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-totalAmount{ color: '+ accent_color.toString() +'; }\n';
134
+
135
+ // Primary links
136
+ css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:active,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:visited{ color: '+ primary_link.toString() +'; }\n';
137
+ css+= css_prefix + ' .ecwid a,' + css_prefix + ' .ecwid a:active, ' + css_prefix + ' .ecwid a:visited{ color: '+ primary_link.toString() +'; }\n';
138
+ css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link{ color: '+ primary_link.toString() +'; }\n';
139
+ css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-enabled{ color: '+ primary_link.toString() +'; }\n';
140
+ css+= css_prefix + ' div.ecwid-productBrowser-productsTable-addToBagLink{ color: '+ primary_link.toString() +'; }\n';
141
+
142
+ // Hover links
143
+ css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a:hover{ color: '+ hover_link.toString() +'; }\n';
144
+ css+= css_prefix + ' .ecwid a:hover{ color: '+ hover_link.toString() +'; }\n';
145
+ css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link:hover{ color: '+ hover_link.toString() +'; }\n';
146
+
147
+ // Backgrounds
148
+ css+= css_prefix + ' .ecwid .ecwid-ProductDetails-gray-panel-bottom,' + css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
149
+ css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel div.ecwid-productBrowser-sharePanel-header{ background-color: '+ muted_background.toString() +'; }\n';
150
+ css+= css_prefix + ' a.ecwid-productBrowser-nav-left,' + css_prefix + ' a.ecwid-productBrowser-nav-right{ background-color: '+ muted_background.toString() +'; }\n';
151
+ css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
152
+ css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel .ecwid-productBrowser-ask-advice-panel-icon{ background-color: '+ muted_background.toString() +'; }\n';
153
+ css+= css_prefix + ' div.ecwid-productBrowser-backgroundedPanel{ background-color: '+ muted_soft_background.toString() +'; }\n';
154
+ css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-sharePanel-buttonsContainer{ background-color: '+ muted_soft_background.toString() +'; border-color: '+ tinycolor(muted_color.toString()).setAlpha(.2).toString() +'}\n';
155
+ css+= css_prefix + ' tr.ecwid-productBrowser-cart-itemsTable-row-selected,' + css_prefix + ' td.ecwid-productBrowser-cart-itemsTable-cell-selected{ background-color: '+ muted_background.toString() +'; }\n';
156
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-EnterCouponBox{ background-color: '+ muted_background.toString() +'; border-color: transparent; }\n';
157
+ css+= css_prefix + ' div.ecwid-form{ background-color: '+ muted_background.toString() +'; }\n';
158
+ css+= css_prefix + ' .ecwid input.ecwid-productBrowser-details-qtyTextField{ color: '+ primary_color.toString() +'; }\n';
159
+ css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cell{ background-color: '+ primary_background.toString() +'; }\n';
160
+ css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cellOdd{ background-color: '+ muted_background.toString() +'; }\n';
161
+ css+= css_prefix + ' input.gwt-TextBox, ' + css_prefix + ' input.gwt-PasswordTextBox, ' + css_prefix + ' textarea.gwt-TextArea, ' + css_prefix + ' input.gwt-DateBox, ' + css_prefix + ' .ecwid-SearchPanel-field{ background-color: '+ primary_background.toString() +'; }\n';
162
+ css+= css_prefix + ' div.ecwid-Invoice-cell-title{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
163
+ css+= css_prefix + ' div.ecwid-Invoice-blockTitle{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
164
+ css+= css_prefix + ' td.ecwid-Invoice-cell{ background-color: '+ muted_background.toString() +'; }\n';
165
+ css+= css_prefix + ' td.ecwid-Invoice-edgeCell{ background-color: '+ muted_background.toString() +'; }\n';
166
+
167
+ // Buttons
168
+ css+= css_prefix + ' div.ecwid-AddToBagButton::after { content: "' + msg('TableProductsContainer.add_to_bag', 'Add To Bag') + '"; white-space: nowrap; }\n';
169
+ css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after { content: "' + msg('ShoppingCartView.continue', 'Continue Shopping') + '"; white-space: nowrap; }\n';
170
+ css+= css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton:after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Checkout') + '"; white-space: nowrap; }\n';
171
+ css+= css_prefix + ' div.ecwid-Checkout-placeOrderButton::after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Place Order') + '"; white-space: nowrap; }\n';
172
+
173
+ css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after, ' + css_prefix + ' div.ecwid-AddToBagButton::after, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton::after, ' + css_prefix + ' button.ecwid-AccentedButton span, ' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after{ color: '+ button_color +'; }\n';
174
+
175
+ css+= css_prefix + ' button.ecwid-AccentedButton,' + css_prefix + ' div.ecwid-AddToBagButton-up, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up,' + css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-AddToBagButton-down-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-down-hovering,' + css_prefix + ' button.ecwid-AccentedButton:hover { -webkit-box-sizing: border-box; box-sizing: border-box; width: auto; min-width: 160px; height: auto; padding: 11px 40px; background-color: '+primary_link+'; background-image: -webkit-gradient(linear, left top, left bottom, from('+hover_link+'), to('+primary_link+')); background-image: -webkit-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -moz-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -ms-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -o-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: linear-gradient(to bottom, '+hover_link+', '+primary_link+'); border: 1px solid '+button_border_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_shadow+'; box-shadow: inset 0 1px 0 '+button_shadow+'; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,0.1); border-radius: 3px; padding-left: 20px; padding-right: 20px; }\n';
176
+
177
+ css+= css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering { background-image: -webkit-gradient(linear, left top, left bottom, from('+button_hover_top+'), to('+button_hover_bottom+')); background-image: -webkit-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -moz-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -ms-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -o-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: linear-gradient(to bottom, '+button_hover_top+', '+button_hover_bottom+'); border: 1px solid '+button_border_hover_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_hover_shadow+'; box-shadow: inset 0 1px 0 '+button_hover_shadow+'; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,0.2); } \n';
178
+
179
+
180
+ css+= css_prefix + ' button.gwt-Button,' + css_prefix + ' #wrapper button.gwt-Button{ color: '+ secondary_link +'; }\n';
181
+ css+= css_prefix + ' button.ecwid-AccentedButton{ line-height: 1; }\n';
182
+
183
+ // Search
184
+ css+= css_prefix + ' .ecwid-SearchPanel-button { background-color: '+ muted_background.toString() +'; border: 1px solid '+ border_color +'; border-radius: 2px; color: '+ primary_color +'; cursor: pointer; font-size: 12px; height: 26px; outline: medium none; padding: 2px 5px; text-decoration: none; vertical-align: baseline; white-space: nowrap; }\n';
185
+
186
+ // Categories
187
+ css+= css_prefix + ' span.ecwid-categories-category{ color: '+ muted_color.toString() +'; }\n';
188
+ css+= css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-selected span.ecwid-categories-category,' + css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-current span.ecwid-categories-category,' + css_prefix + ' td.ecwid-categories-vertical-table-cell-selected span.ecwid-categories-category,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected span.ecwid-categories-category{ color: '+ primary_link.toString() +'; }\n';
189
+
190
+ css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected td { background: none !important; }\n';
191
+ css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected { border: 1px solid; border-bottom: 0px; border-color: '+ border_color.toString() +'; }\n';
192
+ css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel { min-height: 18px; height: auto; }\n';
193
+
194
+ head = document.getElementsByTagName('head')[0],
195
+ style = document.createElement('style');
196
+ style.type = 'text/css';
197
+ if (style.styleSheet) {
198
+ style.styleSheet.cssText = css;
199
+ } else {
200
+ style.appendChild(document.createTextNode(css));
201
+ }
202
+ head.appendChild(style);
203
+ document.getElementsByTagName("body")[0].className += ' chameleon';
204
+ });
205
+ }
206
+
207
+ function getLinkColor(url) {
208
+ var a = document.createElement('a');
209
+ a.href = a.textContent = url;
210
+ document.body.appendChild(a);
211
+ return document.defaultView.getComputedStyle(a, null).color;
212
+ }
213
+
214
+ function toCamelCase(s){
215
+ for(var exp=/-([a-z])/; exp.test(s); s=s.replace(exp,RegExp.$1.toUpperCase()));
216
+ return s;
217
+ }
218
+
219
+ function getStyle(e,a){
220
+ var v=null;
221
+ if(document.defaultView && document.defaultView.getComputedStyle){
222
+ var cs = document.defaultView.getComputedStyle(e, null);
223
+ if(cs && cs.getPropertyValue)
224
+ v = cs.getPropertyValue(a);
225
+ }
226
+ if(!v && e.currentStyle)
227
+ v = e.currentStyle[toCamelCase(a)];
228
+ return v;
229
+ }
230
+
231
+ function getBackground(e){
232
+ var v = getStyle(e,'background-color');
233
+ while (!v || v=='transparent' || v=='#000000' || v=='rgba(0, 0, 0, 0)'){
234
+ if( e == document.body )
235
+ v = '#fff';
236
+ else {
237
+ e = e.parentNode;
238
+ v = getStyle(e, 'background-color');
239
+ }
240
+ }
241
+ return v;
242
+ }
243
+
244
+ function msg(label, defaultValue) {
245
+ var messageBundles = (window.Ecwid && window.Ecwid.MessageBundles) ? window.Ecwid.MessageBundles : {};
246
+ var bundle = messageBundles['ru.cdev.xnext.client'] ? messageBundles['ru.cdev.xnext.client'] : {};
247
+ return bundle[label] || defaultValue;
248
+ }
249
+
250
+ // TinyColor v1.1.2
251
+ // https://github.com/bgrins/TinyColor
252
+ // Brian Grinstead, MIT License
253
+ !function(){function t(r,n){if(r=r?r:"",n=n||{},r instanceof t)return r;if(!(this instanceof t))return new t(r,n);var a=e(r);this._originalInput=r,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=j(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.gradientType,this._r<1&&(this._r=j(this._r)),this._g<1&&(this._g=j(this._g)),this._b<1&&(this._b=j(this._b)),this._ok=a.ok,this._tc_id=I++}function e(t){var e={r:0,g:0,b:0},n=1,i=!1,o=!1;return"string"==typeof t&&(t=q(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=r(t.r,t.g,t.b),i=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=O(t.s),t.v=O(t.v),e=s(t.h,t.s,t.v),i=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=O(t.s),t.l=O(t.l),e=a(t.h,t.s,t.l),i=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=k(n),{ok:i,format:t.format||o,r:T(255,$(e.r,0)),g:T(255,$(e.g,0)),b:T(255,$(e.b,0)),a:n}}function r(t,e,r){return{r:255*A(t,255),g:255*A(e,255),b:255*A(r,255)}}function n(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=(i+s)/2;if(i==s)n=a=0;else{var f=i-s;switch(a=o>.5?f/(2-i-s):f/(i+s),i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,l:o}}function a(t,e,r){function n(t,e,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?t+6*(e-t)*r:.5>r?e:2/3>r?t+(e-t)*(2/3-r)*6:t}var a,i,s;if(t=A(t,360),e=A(e,100),r=A(r,100),0===e)a=i=s=r;else{var o=.5>r?r*(1+e):r+e-r*e,f=2*r-o;a=n(f,o,t+1/3),i=n(f,o,t),s=n(f,o,t-1/3)}return{r:255*a,g:255*i,b:255*s}}function i(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=i,f=i-s;if(a=0===i?0:f/i,i==s)n=0;else{switch(i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,v:o}}function s(t,e,r){t=6*A(t,360),e=A(e,100),r=A(r,100);var n=N.floor(t),a=t-n,i=r*(1-e),s=r*(1-a*e),o=r*(1-(1-a)*e),f=n%6,h=[r,s,i,i,o,r][f],u=[o,r,r,s,i,i][f],l=[i,i,o,r,r,s][f];return{r:255*h,g:255*u,b:255*l}}function o(t,e,r,n){var a=[M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(t,e,r,n){var a=[M(P(n)),M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return a.join("")}function h(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s-=r/100,n.s=H(n.s),t(n)}function u(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s+=r/100,n.s=H(n.s),t(n)}function l(e){return t(e).desaturate(100)}function c(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l+=r/100,n.l=H(n.l),t(n)}function g(e,r){r=0===r?0:r||10;var n=t(e).toRgb();return n.r=$(0,T(255,n.r-j(255*-(r/100)))),n.g=$(0,T(255,n.g-j(255*-(r/100)))),n.b=$(0,T(255,n.b-j(255*-(r/100)))),t(n)}function d(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l-=r/100,n.l=H(n.l),t(n)}function b(e,r){var n=t(e).toHsl(),a=(j(n.h)+r)%360;return n.h=0>a?360+a:a,t(n)}function p(e){var r=t(e).toHsl();return r.h=(r.h+180)%360,t(r)}function m(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+120)%360,s:r.s,l:r.l}),t({h:(n+240)%360,s:r.s,l:r.l})]}function _(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+90)%360,s:r.s,l:r.l}),t({h:(n+180)%360,s:r.s,l:r.l}),t({h:(n+270)%360,s:r.s,l:r.l})]}function v(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+72)%360,s:r.s,l:r.l}),t({h:(n+216)%360,s:r.s,l:r.l})]}function y(e,r,n){r=r||6,n=n||30;var a=t(e).toHsl(),i=360/n,s=[t(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,s.push(t(a));return s}function w(e,r){r=r||6;for(var n=t(e).toHsv(),a=n.h,i=n.s,s=n.v,o=[],f=1/r;r--;)o.push(t({h:a,s:i,v:s})),s=(s+f)%1;return o}function x(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function k(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function A(t,e){R(t)&&(t="100%");var r=F(t);return t=T(e,$(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),N.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return T(1,$(0,t))}function S(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function F(t){return"string"==typeof t&&-1!=t.indexOf("%")}function M(t){return 1==t.length?"0"+t:""+t}function O(t){return 1>=t&&(t=100*t+"%"),t}function P(t){return Math.round(255*parseFloat(t)).toString(16)}function C(t){return S(t)/255}function q(t){t=t.replace(z,"").replace(E,"").toLowerCase();var e=!1;if(B[t])t=B[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=U.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=U.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=U.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=U.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=U.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=U.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=U.hex8.exec(t))?{a:C(r[1]),r:S(r[2]),g:S(r[3]),b:S(r[4]),format:e?"name":"hex8"}:(r=U.hex6.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),format:e?"name":"hex"}:(r=U.hex3.exec(t))?{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function L(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var z=/^[\s,#]+/,E=/\s+$/,I=0,N=Math,j=N.round,T=N.min,$=N.max,D=N.random;t.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n,a,i,s=this.toRgb();return t=s.r/255,e=s.g/255,r=s.b/255,n=.03928>=t?t/12.92:Math.pow((t+.055)/1.055,2.4),a=.03928>=e?e/12.92:Math.pow((e+.055)/1.055,2.4),i=.03928>=r?r/12.92:Math.pow((r+.055)/1.055,2.4),.2126*n+.7152*a+.0722*i},setAlpha:function(t){return this._a=k(t),this._roundA=j(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),n=j(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),a=j(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return f(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:j(this._r),g:j(this._g),b:j(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+j(this._r)+", "+j(this._g)+", "+j(this._b)+")":"rgba("+j(this._r)+", "+j(this._g)+", "+j(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:j(100*A(this._r,255))+"%",g:j(100*A(this._g,255))+"%",b:j(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%)":"rgba("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:G[o(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+f(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var i=t(e);n=i.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,a=!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return a?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(c,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},t.fromRatio=function(e,r){if("object"==typeof e){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[a]="a"===a?e[a]:O(e[a]));e=n}return t(e,r)},t.equals=function(e,r){return e&&r?t(e).toRgbString()==t(r).toRgbString():!1},t.random=function(){return t.fromRatio({r:D(),g:D(),b:D()})},t.mix=function(e,r,n){n=0===n?0:n||50;var a,i=t(e).toRgb(),s=t(r).toRgb(),o=n/100,f=2*o-1,h=s.a-i.a;a=f*h==-1?f:(f+h)/(1+f*h),a=(a+1)/2;var u=1-a,l={r:s.r*a+i.r*u,g:s.g*a+i.g*u,b:s.b*a+i.b*u,a:s.a*o+i.a*(1-o)};return t(l)},t.readability=function(e,r){var n=t(e),a=t(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)},t.isReadable=function(e,r,n){var a,i,s=t.readability(e,r);switch(i=!1,a=L(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},t.mostReadable=function(e,r,n){var a,i,s,o,f=null,h=0;n=n||{},i=n.includeFallbackColors,s=n.level,o=n.size;for(var u=0;u<r.length;u++)a=t.readability(e,r[u]),a>h&&(h=a,f=t(r[u]));return t.isReadable(e,f,{level:s,size:o})||!i?f:(n.includeFallbackColors=!1,t.mostReadable(e,["#fff","#000"],n))};var B=t.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=t.hexNames=x(B),U=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd?define(function(){return t}):window.tinycolor=t}();
js/products-list.js CHANGED
@@ -46,6 +46,9 @@ jQuery.widget('ecwid.productsList', {
46
  }
47
  }
48
 
 
 
 
49
  },
50
 
51
  _setOption: function(key, value) {
@@ -154,9 +157,11 @@ jQuery.widget('ecwid.productsList', {
154
  },
155
 
156
  _readSingleProduct: function(singleProductContainer) {
 
 
157
  var product = {
158
  name: jQuery('.ecwid-title', singleProductContainer).text(),
159
- image: jQuery('.ecwid-SingleProduct-picture img', singleProductContainer).attr('src'),
160
  id: jQuery(singleProductContainer).data('single-product-id'),
161
  link: jQuery(singleProductContainer).data('single-product-link'),
162
  }
46
  }
47
  }
48
 
49
+ if (toShow.length > 0) {
50
+ jQuery('.show-if-empty', this.el).hide();
51
+ }
52
  },
53
 
54
  _setOption: function(key, value) {
157
  },
158
 
159
  _readSingleProduct: function(singleProductContainer) {
160
+
161
+ var forced_image = jQuery('div[itemprop=image]', singleProductContainer).data('force-image');
162
  var product = {
163
  name: jQuery('.ecwid-title', singleProductContainer).text(),
164
+ image: forced_image ? forced_image : jQuery('.ecwid-SingleProduct-picture img', singleProductContainer).attr('src'),
165
  id: jQuery(singleProductContainer).data('single-product-id'),
166
  link: jQuery(singleProductContainer).data('single-product-link'),
167
  }
js/themes/2012.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ Ecwid.OnPageLoaded.add(function() {
3
+ jQuery('.ecwid a').first().focus();
4
+ });
5
+ });
languages/ecwid-shopping-cart-ru_RU.mo CHANGED
Binary file
languages/ecwid-shopping-cart-ru_RU.po CHANGED
@@ -400,8 +400,8 @@ msgstr "Эквид сертифицирован по стандарту Level 1
400
  msgid "Global Reach"
401
  msgstr "Глобальное решение"
402
 
403
- msgid "More than 700,000 merchants in 175 countries"
404
- msgstr "Эквид уже используют 700,000 продавцов из 175 стран"
405
 
406
  msgid "Start selling <br>on your WordPress <nobr>site for free</nobr>"
407
  msgstr "Начните продавать<br>на своём Wordpress <nobr>сайте бесплатно</nobr>"
@@ -464,4 +464,19 @@ msgid "Automatic adjustment of your store design to your Wordpress theme. Whatev
464
  msgstr "Автоматическая подстройка внешнего вида магазина под стили темы сайта. Включите эту опцию, чтобы Эквид определял цвета и шрифты сайта и исопльзовал их в каталоге товаров."
465
 
466
  msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
467
- msgstr "Мы добавили этот инструмент недавно, и он сейчас работает в бета-режиме. Если вы обнаружите какие-либо проблемы в его работе, пожалуйста, <a %s>сообщите нам</a>."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  msgid "Global Reach"
401
  msgstr "Глобальное решение"
402
 
403
+ msgid "More than 800,000 merchants in 175 countries"
404
+ msgstr "Эквид уже используют 800,000 продавцов из 175 стран"
405
 
406
  msgid "Start selling <br>on your WordPress <nobr>site for free</nobr>"
407
  msgstr "Начните продавать<br>на своём Wordpress <nobr>сайте бесплатно</nobr>"
464
  msgstr "Автоматическая подстройка внешнего вида магазина под стили темы сайта. Включите эту опцию, чтобы Эквид определял цвета и шрифты сайта и исопльзовал их в каталоге товаров."
465
 
466
  msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
467
+ msgstr "Мы добавили этот инструмент недавно, и он сейчас работает в бета-режиме. Если вы обнаружите какие-либо проблемы в его работе, пожалуйста, <a %s>сообщите нам</a>."
468
+
469
+ msgid "Enter your Store ID"
470
+ msgstr "Введите ваш ID Магазина"
471
+
472
+ msgid "Where to find your Store ID:"
473
+ msgstr "Где найти ID Магазина:"
474
+
475
+ msgid "You will also get your Store ID by email."
476
+ msgstr "Также вы получите ID вашего магазина на ваш e-mail."
477
+
478
+ msgid "You have not viewed any product yet. Open store."
479
+ msgstr "Вы пока что не просмотрели ни одного товара. Перейти в магазин."
480
+
481
+ msgid "Store ID is a unique identifier of your Ecwid account. You can find it in your Ecwid control panel: open the <a %s>Dashboard page</a> and find the \"<b>Store ID: NNNNNNN</b>\" text, where <b>NNNNNNN</b> is your Store&nbsp;ID."
482
+ msgstr "ID магазина – это уникальный номер аккаунта в Эквиде. Вы можете его найти в панели управления Эквид-магазина: откройте страницу \"<a %s>Консоль</a>\" и найдите текст \"<b>ID&nbsp;Магазина&nbsp;NNNNNNN</b>\". "
languages/ecwid-shopping-cart.pot CHANGED
@@ -1,495 +1,507 @@
1
- msgid "Ecwid Shopping Cart"
2
- msgstr ""
3
-
4
- msgid "Ecwid Team"
5
- msgstr ""
6
-
7
- 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."
8
- msgstr ""
9
-
10
- msgid "Get help"
11
- msgstr ""
12
-
13
- msgid "Go to Ecwid site"
14
- msgstr ""
15
-
16
- msgid "Visit storefront"
17
- msgstr ""
18
-
19
- msgid "Manage my store"
20
- msgstr ""
21
-
22
- msgid "Manage plugin settings"
23
- msgstr ""
24
-
25
- msgid "→ Sell on Facebook"
26
- msgstr ""
27
-
28
- msgid "<a %s>Online store powered by Ecwid</a>"
29
- msgstr ""
30
-
31
- msgid "Store"
32
- msgstr ""
33
-
34
- msgid "Ecwid shopping cart settings"
35
- msgstr ""
36
-
37
- msgid "Ecwid Store"
38
- msgstr ""
39
-
40
- msgid "Setup"
41
- msgstr ""
42
-
43
- msgid "Dashboard"
44
- msgstr ""
45
-
46
- msgid "Appearance settings"
47
- msgstr ""
48
-
49
- msgid "Appearance"
50
- msgstr ""
51
-
52
- msgid "Advanced settings"
53
- msgstr ""
54
-
55
- msgid "Advanced"
56
- msgstr ""
57
-
58
- msgid "Hidden category"
59
- msgstr ""
60
-
61
- msgid "Recommendations for Your Online Store"
62
- msgstr ""
63
-
64
- msgid "If you like Ecwid and want to help it grow and become the most popular e-commerce solution, you can now add a fancy 'Powered by Ecwid' badge on your site to show your visitors that you're a proud user of Ecwid."
65
- msgstr ""
66
-
67
- msgid "Ecwid Badge"
68
- msgstr ""
69
-
70
- msgid "Ecwid shopping cart widget"
71
- msgstr ""
72
-
73
- msgid "Ecwid ecommerce solution"
74
- msgstr ""
75
-
76
- msgid "Ecwid free shopping cart"
77
- msgstr ""
78
-
79
- msgid "Ecwid shopping cart"
80
- msgstr ""
81
-
82
- msgid "Ecwid e-commerce widgets"
83
- msgstr ""
84
-
85
- msgid "Your store's minicart"
86
- msgstr ""
87
-
88
- msgid "Ecwid Shopping Bag (Normal)"
89
- msgstr ""
90
-
91
- msgid "Ecwid Shopping Bag (Mini view)"
92
- msgstr ""
93
-
94
- msgid "Your store's search box"
95
- msgstr ""
96
-
97
- msgid "Ecwid Search Box"
98
- msgstr ""
99
-
100
- msgid "Vertical menu of categories"
101
- msgstr ""
102
-
103
- msgid "Ecwid Vertical Categories"
104
- msgstr ""
105
-
106
- msgid "A link to your store page"
107
- msgstr ""
108
-
109
- msgid "Ecwid Store Page Link"
110
- msgstr ""
111
-
112
- msgid "Shop"
113
- msgstr ""
114
-
115
- msgid "A list of products recently viewed by a customer. Add this widget to the sidebar to let them later return to the products they saw in your shop."
116
- msgstr ""
117
-
118
- msgid "Recently Viewed Products"
119
- msgstr ""
120
-
121
- msgid "View Products"
122
- msgstr ""
123
-
124
- msgid "Store Link Title"
125
- msgstr ""
126
-
127
- msgid "Number of products to show"
128
- msgstr ""
129
-
130
- msgid "Greetings! Your Ecwid store is now active."
131
- msgstr ""
132
-
133
- msgid "Take a few simple steps to complete store setup"
134
- msgstr ""
135
-
136
- msgid "Set up Ecwid Store"
137
- msgstr ""
138
-
139
- msgid "Good job! Your store is set up and you're ready to sell."
140
- msgstr ""
141
-
142
- msgid "Now you can fine-tune your store's appearance"
143
- msgstr ""
144
-
145
- msgid "Visit Storefront"
146
- msgstr ""
147
-
148
- msgid "Configure Appearance"
149
- msgstr ""
150
-
151
- msgid "Your store is almost ready!"
152
- msgstr ""
153
-
154
- msgid "Connect your Ecwid account with this site to complete setup and start selling"
155
- msgstr ""
156
-
157
- msgid "Connect Your Ecwid Store"
158
- msgstr ""
159
-
160
- msgid "To add extra functions to your store, drag and drop Ecwid store elements on your site. When you're done, you can get back to modifying your settings."
161
- msgstr ""
162
-
163
- msgid "Back to Store Settings"
164
- msgstr ""
165
-
166
- msgid "Do you like your Ecwid online store? We'd appreciate it if you add your review and vote for the plugin on Wordpress site."
167
- msgstr ""
168
-
169
- msgid "Rate Ecwid at WordPress.org"
170
- msgstr ""
171
-
172
- msgid "Add Store"
173
- msgstr ""
174
-
175
- msgid "Edit Store"
176
- msgstr ""
177
-
178
- msgid "Edit Appearance"
179
- msgstr ""
180
-
181
- msgid "Price"
182
- msgstr ""
183
-
184
- msgid "Never show this message again"
185
- msgstr ""
186
-
187
- msgid "Ecwid Shopping Cart — Advanced settings"
188
- msgstr ""
189
-
190
- msgid "Category shown by default"
191
- msgstr ""
192
-
193
- msgid "Store root category"
194
- msgstr ""
195
-
196
- msgid "Default category ID"
197
- msgstr ""
198
-
199
- 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."
200
- msgstr ""
201
-
202
- msgid "In order to set this option, <a %s>find an ID of the necessary category</a> and save it here."
203
- msgstr ""
204
-
205
- msgid "Single Sign-On Secret Key"
206
- msgstr ""
207
-
208
- 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."
209
- msgstr ""
210
-
211
- 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 > Apps > Legacy API Keys > Single Sign-On Secret Key\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
212
- msgstr ""
213
-
214
- msgid "Chameleon skin <sup>beta</sup>"
215
- msgstr ""
216
-
217
- msgid "Automatic adjustment of your store design to your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog."
218
- msgstr ""
219
-
220
- msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
221
- msgstr ""
222
-
223
- msgid "Save changes"
224
- msgstr ""
225
-
226
- msgid "Ecwid Shopping Cart — Appearance settings"
227
- msgstr ""
228
-
229
- msgid "Display search box above products"
230
- msgstr ""
231
-
232
- msgid "Or you can add search box to your website's toolbar using <a href=\"%s\">WordPress native widgets</a>"
233
- msgstr ""
234
-
235
- msgid "Display horizontal categories above products"
236
- msgstr ""
237
-
238
- msgid "Or you can add vertical categories to your website's toolbar using <a href=\"%s\">WordPress native widgets</a>"
239
- msgstr ""
240
-
241
- msgid "Enable minicart attached to horizontal categories"
242
- msgstr ""
243
-
244
- msgid "You should disable this option, if you added minicart to your website's&nbsp;sidebar"
245
- msgstr ""
246
-
247
- msgid "Number of categories per row"
248
- msgstr ""
249
-
250
- msgid "Number of products per page"
251
- msgstr ""
252
-
253
- msgid "Grid view"
254
- msgstr ""
255
-
256
- msgid "List view"
257
- msgstr ""
258
-
259
- msgid "Table view"
260
- msgstr ""
261
-
262
- 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."
263
- msgstr ""
264
-
265
- msgid "Default view mode on product pages"
266
- msgstr ""
267
-
268
- msgid "Grid"
269
- msgstr ""
270
-
271
- msgid "List"
272
- msgstr ""
273
-
274
- msgid "Table"
275
- msgstr ""
276
-
277
- msgid "Default view mode on search results"
278
- msgstr ""
279
-
280
- msgid "Connect your store<br /> to this WordPress site"
281
- msgstr ""
282
-
283
- msgid "Connect Ecwid store"
284
- msgstr ""
285
-
286
- msgid "After clicking button you need to login and accept permissions to use our plugin"
287
- msgstr ""
288
-
289
- msgid "Connection error - after clicking button you need to login and accept permissions to use our plugin. Please, try again."
290
- msgstr ""
291
-
292
- msgid "Don't have Ecwid account? Create it here"
293
- msgstr ""
294
-
295
- msgid "Questions? Visit <a %s>Ecwid support center</a>"
296
- msgstr ""
297
-
298
- msgid "Store ID"
299
- msgstr ""
300
-
301
- msgid "Disconnect store"
302
- msgstr ""
303
-
304
- msgid "Congratulations!"
305
- msgstr ""
306
-
307
- msgid "Your Ecwid store is now connected<br /> to your WordPress website"
308
- msgstr ""
309
-
310
- msgid "Greetings!"
311
- msgstr ""
312
-
313
- msgid "Your Ecwid store is connected<br /> to your WordPress website"
314
- msgstr ""
315
-
316
- msgid "Open control panel"
317
- msgstr ""
318
-
319
- msgid "Plugin is installed successfully!"
320
- msgstr ""
321
-
322
- msgid "There are just a few steps left to start selling<br /> on your WordPress site"
323
- msgstr ""
324
-
325
- msgid "There are few little steps left to start selling<br /> on your WordPress site"
326
- msgstr ""
327
-
328
- msgid "Register"
329
- msgstr ""
330
-
331
- msgid "Create a free Ecwid account to manage your store and inventory.<br /> No credit card required"
332
- msgstr ""
333
-
334
- msgid "Connect"
335
- msgstr ""
336
-
337
- msgid "Add your Ecwid store to your site <nobr>in two clicks</nobr>"
338
- msgstr ""
339
-
340
- msgid "Connect your Ecwid store to this site <nobr>in two clicks</nobr>"
341
- msgstr ""
342
-
343
- msgid "Start selling"
344
- msgstr ""
345
-
346
- msgid "Your storefront is ready"
347
- msgstr ""
348
-
349
- msgid "Create Ecwid store"
350
- msgstr ""
351
-
352
- msgid "Connect your store"
353
- msgstr ""
354
-
355
- msgid "Free registration, No credit card required"
356
- msgstr ""
357
-
358
- msgid "Connection error: please click the button again and give permissions for this plugin<br /> to show your Ecwid store on this site."
359
- msgstr ""
360
-
361
- msgid "You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site"
362
- msgstr ""
363
-
364
- msgid "Already have Ecwid account?"
365
- msgstr ""
366
-
367
- msgid "Connect your store to Wordpress site"
368
- msgstr ""
369
-
370
- msgid "Don't have an Ecwid account?"
371
- msgstr ""
372
-
373
- msgid "Register at Ecwid for free"
374
- msgstr ""
375
-
376
- msgid "No credit card required"
377
- msgstr ""
378
-
379
- msgid "Get ready to sell online"
380
- msgstr ""
381
-
382
- msgid "Sell Everywhere<br>with your Ecwid store"
383
- msgstr ""
384
-
385
- msgid "Start selling on your WordPress site. Then mirror your shop on your Facebook page, blog and marketplaces like Google Shopping, Yahoo and Shopping.com."
386
- msgstr ""
387
-
388
- msgid "Use Ecwid's mobile-POS to swipe credit cards and sell on the go. Your orders and inventory are always synchronized with your online store."
389
- msgstr ""
390
-
391
- msgid "Features"
392
- msgstr ""
393
-
394
- msgid "Compatible with your theme"
395
- msgstr ""
396
-
397
- msgid "Ecwid is compatible with your<br>“%s” WordPress theme<br>out of the box."
398
- msgstr ""
399
-
400
- msgid "Free and always up to date"
401
- msgstr ""
402
-
403
- msgid "Free plan always available with tons of features<br>at no additional cost. Updates are seamless, automatic<br>and free of charge."
404
- msgstr ""
405
-
406
- msgid "Responsive design"
407
- msgstr ""
408
-
409
- msgid "Your store looks perfect<br />on all devices"
410
- msgstr ""
411
-
412
- msgid "PCI-DSS Certified"
413
- msgstr ""
414
-
415
- msgid "Secure checkout with over 40<br />payment options"
416
- msgstr ""
417
-
418
- msgid "Global Reach"
419
- msgstr ""
420
-
421
- msgid "More than 700,000 merchants in 175 countries"
422
- msgstr ""
423
-
424
- msgid "Start selling <br>on your WordPress <nobr>site for free</nobr>"
425
- msgstr ""
426
-
427
- msgid "Get Started, Create Ecwid Account"
428
- msgstr ""
429
-
430
- msgid "Connect your store to this site"
431
- msgstr ""
432
-
433
- msgid "Reconnect your store<br /> to this WordPress site"
434
- msgstr ""
435
-
436
- msgid "Reconnect Ecwid store"
437
- msgstr ""
438
-
439
- msgid "New features available, reconnect to be in touch with our updates"
440
- msgstr ""
441
-
442
- msgid "Questions? Visit <a href=\"http://help.ecwid.com/?source=wporg\">Ecwid support center</a>"
443
- msgstr ""
444
-
445
- msgid "Store settings"
446
- msgstr ""
447
-
448
- msgid "Choose widgets to show"
449
- msgstr ""
450
-
451
- msgid "Product catalog will be shown automatically"
452
- msgstr ""
453
-
454
- msgid "Show search"
455
- msgstr ""
456
-
457
- msgid "Show minicart"
458
- msgstr ""
459
-
460
- msgid "Show horizontal categories"
461
- msgstr ""
462
-
463
- msgid "Additionally, you can add store controls to your website's toolbar using <a %s>WordPress native widgets</a>"
464
- msgstr ""
465
-
466
- msgid "Demo store"
467
- msgstr ""
468
-
469
- msgid "Ecwid plugin settings"
470
- msgstr ""
471
-
472
- msgid "Your store will be shown here!"
473
- msgstr ""
474
-
475
- msgid "Demo Store"
476
- msgstr ""
477
-
478
- msgid "Sell On The Go with Ecwid iOS Application"
479
- msgstr ""
480
-
481
- msgid "Ecwid iOS app allows you to manage your online store, sell your products on the go, and accept payments with your phone. Just download the Ecwid app, connect it to your Ecwid shop and have your sales at your fingertips!"
482
- msgstr ""
483
-
484
- msgid "Get Your Products Found on Google using XML Sitemap"
485
- msgstr ""
486
-
487
- msgid "Free Google XML Sitemaps plugin creates a sitemap that includes your store product links. This makes your product pages more visible to search engines and appear in the search results."
488
- msgstr ""
489
-
490
- msgid "Add Product Slider to Your Store"
491
- msgstr ""
492
-
493
- msgid "Add a fancy product slider to your site using a free WP Widgets Avalanche plugin which works perfectly with Ecwid"
494
- msgstr ""
495
-
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid "Ecwid Shopping Cart"
2
+ msgstr ""
3
+
4
+ msgid "Ecwid Team"
5
+ msgstr ""
6
+
7
+ 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."
8
+ msgstr ""
9
+
10
+ msgid "Get help"
11
+ msgstr ""
12
+
13
+ msgid "Go to Ecwid site"
14
+ msgstr ""
15
+
16
+ msgid "Visit storefront"
17
+ msgstr ""
18
+
19
+ msgid "Manage my store"
20
+ msgstr ""
21
+
22
+ msgid "Manage plugin settings"
23
+ msgstr ""
24
+
25
+ msgid "→ Sell on Facebook"
26
+ msgstr ""
27
+
28
+ msgid "<a %s>Online store powered by Ecwid</a>"
29
+ msgstr ""
30
+
31
+ msgid "Store"
32
+ msgstr ""
33
+
34
+ msgid "Ecwid shopping cart settings"
35
+ msgstr ""
36
+
37
+ msgid "Ecwid Store"
38
+ msgstr ""
39
+
40
+ msgid "Setup"
41
+ msgstr ""
42
+
43
+ msgid "Dashboard"
44
+ msgstr ""
45
+
46
+ msgid "Appearance settings"
47
+ msgstr ""
48
+
49
+ msgid "Appearance"
50
+ msgstr ""
51
+
52
+ msgid "Advanced settings"
53
+ msgstr ""
54
+
55
+ msgid "Advanced"
56
+ msgstr ""
57
+
58
+ msgid "Hidden category"
59
+ msgstr ""
60
+
61
+ msgid "Recommendations for Your Online Store"
62
+ msgstr ""
63
+
64
+ msgid "If you like Ecwid and want to help it grow and become the most popular e-commerce solution, you can now add a fancy 'Powered by Ecwid' badge on your site to show your visitors that you're a proud user of Ecwid."
65
+ msgstr ""
66
+
67
+ msgid "Ecwid Badge"
68
+ msgstr ""
69
+
70
+ msgid "Ecwid shopping cart widget"
71
+ msgstr ""
72
+
73
+ msgid "Ecwid ecommerce solution"
74
+ msgstr ""
75
+
76
+ msgid "Ecwid free shopping cart"
77
+ msgstr ""
78
+
79
+ msgid "Ecwid shopping cart"
80
+ msgstr ""
81
+
82
+ msgid "Ecwid e-commerce widgets"
83
+ msgstr ""
84
+
85
+ msgid "Your store's minicart"
86
+ msgstr ""
87
+
88
+ msgid "Ecwid Shopping Bag (Normal)"
89
+ msgstr ""
90
+
91
+ msgid "Ecwid Shopping Bag (Mini view)"
92
+ msgstr ""
93
+
94
+ msgid "Your store's search box"
95
+ msgstr ""
96
+
97
+ msgid "Ecwid Search Box"
98
+ msgstr ""
99
+
100
+ msgid "Vertical menu of categories"
101
+ msgstr ""
102
+
103
+ msgid "Ecwid Vertical Categories"
104
+ msgstr ""
105
+
106
+ msgid "A link to your store page"
107
+ msgstr ""
108
+
109
+ msgid "Ecwid Store Page Link"
110
+ msgstr ""
111
+
112
+ msgid "Shop"
113
+ msgstr ""
114
+
115
+ msgid "A list of products recently viewed by a customer. Add this widget to the sidebar to let them later return to the products they saw in your shop."
116
+ msgstr ""
117
+
118
+ msgid "Recently Viewed Products"
119
+ msgstr ""
120
+
121
+ msgid "You have not viewed any product yet. Open store."
122
+ msgstr ""
123
+
124
+ msgid "Store Link Title"
125
+ msgstr ""
126
+
127
+ msgid "Number of products to show"
128
+ msgstr ""
129
+
130
+ msgid "Greetings! Your Ecwid store is now active."
131
+ msgstr ""
132
+
133
+ msgid "Take a few simple steps to complete store setup"
134
+ msgstr ""
135
+
136
+ msgid "Set up Ecwid Store"
137
+ msgstr ""
138
+
139
+ msgid "Good job! Your store is set up and you're ready to sell."
140
+ msgstr ""
141
+
142
+ msgid "Now you can fine-tune your store's appearance"
143
+ msgstr ""
144
+
145
+ msgid "Visit Storefront"
146
+ msgstr ""
147
+
148
+ msgid "Configure Appearance"
149
+ msgstr ""
150
+
151
+ msgid "Your store is almost ready!"
152
+ msgstr ""
153
+
154
+ msgid "Connect your Ecwid account with this site to complete setup and start selling"
155
+ msgstr ""
156
+
157
+ msgid "Connect Your Ecwid Store"
158
+ msgstr ""
159
+
160
+ msgid "To add extra functions to your store, drag and drop Ecwid store elements on your site. When you're done, you can get back to modifying your settings."
161
+ msgstr ""
162
+
163
+ msgid "Back to Store Settings"
164
+ msgstr ""
165
+
166
+ msgid "Do you like your Ecwid online store? We'd appreciate it if you add your review and vote for the plugin on Wordpress site."
167
+ msgstr ""
168
+
169
+ msgid "Rate Ecwid at WordPress.org"
170
+ msgstr ""
171
+
172
+ msgid "Add Store"
173
+ msgstr ""
174
+
175
+ msgid "Edit Store"
176
+ msgstr ""
177
+
178
+ msgid "Edit Appearance"
179
+ msgstr ""
180
+
181
+ msgid "Price"
182
+ msgstr ""
183
+
184
+ msgid "Never show this message again"
185
+ msgstr ""
186
+
187
+ msgid "Ecwid Shopping Cart — Advanced settings"
188
+ msgstr ""
189
+
190
+ msgid "Category shown by default"
191
+ msgstr ""
192
+
193
+ msgid "Store root category"
194
+ msgstr ""
195
+
196
+ msgid "Default category ID"
197
+ msgstr ""
198
+
199
+ 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."
200
+ msgstr ""
201
+
202
+ msgid "In order to set this option, <a %s>find an ID of the necessary category</a> and save it here."
203
+ msgstr ""
204
+
205
+ msgid "Single Sign-On Secret Key"
206
+ msgstr ""
207
+
208
+ 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."
209
+ msgstr ""
210
+
211
+ 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 > Apps > Legacy API Keys > Single Sign-On Secret Key\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
212
+ msgstr ""
213
+
214
+ msgid "Chameleon skin <sup>beta</sup>"
215
+ msgstr ""
216
+
217
+ msgid "Automatic adjustment of your store design to your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog."
218
+ msgstr ""
219
+
220
+ msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
221
+ msgstr ""
222
+
223
+ msgid "Save changes"
224
+ msgstr ""
225
+
226
+ msgid "Ecwid Shopping Cart — Appearance settings"
227
+ msgstr ""
228
+
229
+ msgid "Display search box above products"
230
+ msgstr ""
231
+
232
+ msgid "Or you can add search box to your website's toolbar using <a href=\"%s\">WordPress native widgets</a>"
233
+ msgstr ""
234
+
235
+ msgid "Display horizontal categories above products"
236
+ msgstr ""
237
+
238
+ msgid "Or you can add vertical categories to your website's toolbar using <a href=\"%s\">WordPress native widgets</a>"
239
+ msgstr ""
240
+
241
+ msgid "Enable minicart attached to horizontal categories"
242
+ msgstr ""
243
+
244
+ msgid "You should disable this option, if you added minicart to your website's&nbsp;sidebar"
245
+ msgstr ""
246
+
247
+ msgid "Number of categories per row"
248
+ msgstr ""
249
+
250
+ msgid "Number of products per page"
251
+ msgstr ""
252
+
253
+ msgid "Grid view"
254
+ msgstr ""
255
+
256
+ msgid "List view"
257
+ msgstr ""
258
+
259
+ msgid "Table view"
260
+ msgstr ""
261
+
262
+ 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."
263
+ msgstr ""
264
+
265
+ msgid "Default view mode on product pages"
266
+ msgstr ""
267
+
268
+ msgid "Grid"
269
+ msgstr ""
270
+
271
+ msgid "List"
272
+ msgstr ""
273
+
274
+ msgid "Table"
275
+ msgstr ""
276
+
277
+ msgid "Default view mode on search results"
278
+ msgstr ""
279
+
280
+ msgid "Connect your store<br /> to this WordPress site"
281
+ msgstr ""
282
+
283
+ msgid "Enter your Store ID"
284
+ msgstr ""
285
+
286
+ msgid "Connect Ecwid store"
287
+ msgstr ""
288
+
289
+ msgid "Save and connect"
290
+ msgstr ""
291
+
292
+ msgid "After clicking button you need to login and accept permissions to use our plugin"
293
+ msgstr ""
294
+
295
+ msgid "Connection error - after clicking button you need to login and accept permissions to use our plugin. Please, try again."
296
+ msgstr ""
297
+
298
+ msgid "Where to find your Store ID:"
299
+ msgstr ""
300
+
301
+ msgid "Store ID is a unique identifier of your Ecwid account. You can find it in your Ecwid control panel: open the <a %s>Dashboard page</a> and find the \"<b>Store ID: NNNNNNN</b>\" text, where <b>NNNNNNN</b> is your Store&nbsp;ID."
302
+ msgstr ""
303
+
304
+ msgid "Don't have Ecwid account? Create it here"
305
+ msgstr ""
306
+
307
+ msgid "Questions? Visit <a %s>Ecwid support center</a>"
308
+ msgstr ""
309
+
310
+ msgid "Store ID"
311
+ msgstr ""
312
+
313
+ msgid "Disconnect store"
314
+ msgstr ""
315
+
316
+ msgid "Congratulations!"
317
+ msgstr ""
318
+
319
+ msgid "Your Ecwid store is now connected<br /> to your WordPress website"
320
+ msgstr ""
321
+
322
+ msgid "Greetings!"
323
+ msgstr ""
324
+
325
+ msgid "Your Ecwid store is connected<br /> to your WordPress website"
326
+ msgstr ""
327
+
328
+ msgid "Open control panel"
329
+ msgstr ""
330
+
331
+ msgid "Plugin is installed successfully!"
332
+ msgstr ""
333
+
334
+ msgid "There are just a few steps left to start selling<br /> on your WordPress site"
335
+ msgstr ""
336
+
337
+ msgid "There are few little steps left to start selling<br /> on your WordPress site"
338
+ msgstr ""
339
+
340
+ msgid "Register"
341
+ msgstr ""
342
+
343
+ msgid "Create a free Ecwid account to manage your store and inventory.<br /> No credit card required"
344
+ msgstr ""
345
+
346
+ msgid "Connect"
347
+ msgstr ""
348
+
349
+ msgid "Add your Ecwid store to your site <nobr>in two clicks</nobr>"
350
+ msgstr ""
351
+
352
+ msgid "Connect your Ecwid store to this site <nobr>in two clicks</nobr>"
353
+ msgstr ""
354
+
355
+ msgid "Start selling"
356
+ msgstr ""
357
+
358
+ msgid "Your storefront is ready"
359
+ msgstr ""
360
+
361
+ msgid "Create Ecwid store"
362
+ msgstr ""
363
+
364
+ msgid "Connect your store"
365
+ msgstr ""
366
+
367
+ msgid "Free registration, No credit card required"
368
+ msgstr ""
369
+
370
+ msgid "Connection error: please click the button again and give permissions for this plugin<br /> to show your Ecwid store on this site."
371
+ msgstr ""
372
+
373
+ msgid "You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site"
374
+ msgstr ""
375
+
376
+ msgid "Already have Ecwid account?"
377
+ msgstr ""
378
+
379
+ msgid "Connect your store to Wordpress site"
380
+ msgstr ""
381
+
382
+ msgid "Don't have an Ecwid account?"
383
+ msgstr ""
384
+
385
+ msgid "Register at Ecwid for free"
386
+ msgstr ""
387
+
388
+ msgid "No credit card required"
389
+ msgstr ""
390
+
391
+ msgid "Get ready to sell online"
392
+ msgstr ""
393
+
394
+ msgid "Sell Everywhere<br>with your Ecwid store"
395
+ msgstr ""
396
+
397
+ msgid "Start selling on your WordPress site. Then mirror your shop on your Facebook page, blog and marketplaces like Google Shopping, Yahoo and Shopping.com."
398
+ msgstr ""
399
+
400
+ msgid "Use Ecwid's mobile-POS to swipe credit cards and sell on the go. Your orders and inventory are always synchronized with your online store."
401
+ msgstr ""
402
+
403
+ msgid "Features"
404
+ msgstr ""
405
+
406
+ msgid "Compatible with your theme"
407
+ msgstr ""
408
+
409
+ msgid "Ecwid is compatible with your<br>“%s” WordPress theme<br>out of the box."
410
+ msgstr ""
411
+
412
+ msgid "Free and always up to date"
413
+ msgstr ""
414
+
415
+ msgid "Free plan always available with tons of features<br>at no additional cost. Updates are seamless, automatic<br>and free of charge."
416
+ msgstr ""
417
+
418
+ msgid "Responsive design"
419
+ msgstr ""
420
+
421
+ msgid "Your store looks perfect<br />on all devices"
422
+ msgstr ""
423
+
424
+ msgid "PCI-DSS Certified"
425
+ msgstr ""
426
+
427
+ msgid "Secure checkout with over 40<br />payment options"
428
+ msgstr ""
429
+
430
+ msgid "Global Reach"
431
+ msgstr ""
432
+
433
+ msgid "More than 800,000 merchants in 175 countries"
434
+ msgstr ""
435
+
436
+ msgid "Start selling <br>on your WordPress <nobr>site for free</nobr>"
437
+ msgstr ""
438
+
439
+ msgid "Get Started, Create Ecwid Account"
440
+ msgstr ""
441
+
442
+ msgid "Connect your store to this site"
443
+ msgstr ""
444
+
445
+ msgid "Reconnect your store<br /> to this WordPress site"
446
+ msgstr ""
447
+
448
+ msgid "Reconnect Ecwid store"
449
+ msgstr ""
450
+
451
+ msgid "New features available, reconnect to be in touch with our updates"
452
+ msgstr ""
453
+
454
+ msgid "Questions? Visit <a href=\"http://help.ecwid.com/?source=wporg\">Ecwid support center</a>"
455
+ msgstr ""
456
+
457
+ msgid "Store settings"
458
+ msgstr ""
459
+
460
+ msgid "Choose widgets to show"
461
+ msgstr ""
462
+
463
+ msgid "Product catalog will be shown automatically"
464
+ msgstr ""
465
+
466
+ msgid "Show search"
467
+ msgstr ""
468
+
469
+ msgid "Show minicart"
470
+ msgstr ""
471
+
472
+ msgid "Show horizontal categories"
473
+ msgstr ""
474
+
475
+ msgid "Additionally, you can add store controls to your website's toolbar using <a %s>WordPress native widgets</a>"
476
+ msgstr ""
477
+
478
+ msgid "Demo store"
479
+ msgstr ""
480
+
481
+ msgid "Ecwid plugin settings"
482
+ msgstr ""
483
+
484
+ msgid "Your store will be shown here!"
485
+ msgstr ""
486
+
487
+ msgid "Demo Store"
488
+ msgstr ""
489
+
490
+ msgid "Sell On The Go with Ecwid iOS Application"
491
+ msgstr ""
492
+
493
+ msgid "Ecwid iOS app allows you to manage your online store, sell your products on the go, and accept payments with your phone. Just download the Ecwid app, connect it to your Ecwid shop and have your sales at your fingertips!"
494
+ msgstr ""
495
+
496
+ msgid "Get Your Products Found on Google using XML Sitemap"
497
+ msgstr ""
498
+
499
+ msgid "Free Google XML Sitemaps plugin creates a sitemap that includes your store product links. This makes your product pages more visible to search engines and appear in the search results."
500
+ msgstr ""
501
+
502
+ msgid "Add Product Slider to Your Store"
503
+ msgstr ""
504
+
505
+ msgid "Add a fancy product slider to your site using a free WP Widgets Avalanche plugin which works perfectly with Ecwid"
506
+ msgstr ""
507
+
lib/ecwid_product_api.php CHANGED
@@ -15,6 +15,7 @@ class EcwidProductApi {
15
  function __construct($store_id) {
16
 
17
  $this->ECWID_PRODUCT_API_ENDPOINT = 'http://app.ecwid.com/api/v1';
 
18
  $this->store_id = intval($store_id);
19
  }
20
 
@@ -87,6 +88,23 @@ class EcwidProductApi {
87
  return $cached[$product_id];
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  function get_category($category_id) {
91
 
92
  static $cached = array();
15
  function __construct($store_id) {
16
 
17
  $this->ECWID_PRODUCT_API_ENDPOINT = 'http://app.ecwid.com/api/v1';
18
+ $this->ECWID_PRODUCT_API_ENDPOINT_HTTPS = 'https://app.ecwid.com/api/v1';
19
  $this->store_id = intval($store_id);
20
  }
21
 
88
  return $cached[$product_id];
89
  }
90
 
91
+ function get_product_https($product_id) {
92
+
93
+ static $cached;
94
+
95
+ $product_id = intval($product_id);
96
+
97
+ if (isset($cached[$product_id])) {
98
+ return $cached[$product_id];
99
+ }
100
+
101
+ $api_url = $this->ECWID_PRODUCT_API_ENDPOINT_HTTPS . "/" . $this->store_id . "/product?id=" . $product_id;
102
+ $cached[$product_id] = $this->process_request($api_url);
103
+
104
+ return $cached[$product_id];
105
+ }
106
+
107
+
108
  function get_category($category_id) {
109
 
110
  static $cached = array();
readme.txt CHANGED
@@ -2,8 +2,8 @@
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: 4.2
6
- Stable tag: 3.2.2
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
@@ -107,7 +107,19 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
107
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
108
 
109
  == Changelog ==
110
- = 3.2.2=
 
 
 
 
 
 
 
 
 
 
 
 
111
  - Fixed a few minor bugs in the Chameleon skin feature
112
 
113
  = 3.2.1 =
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: 4.3
6
+ Stable tag: 3.3.1
7
 
8
  Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
9
 
107
  * [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
108
 
109
  == Changelog ==
110
+ = 3.3.1 =
111
+ - **Small improvement for "Twenty Twelve" WordPress theme.** The default drop down menu stayed open after clicking Ecwid links sometimes. We adjusted our plugin to work around this issue.
112
+ - **Fixes of PHP notices.** In some cases the plugin caused some PHP notices or warnings to appear on screen if the site was run in debug mode. Although it did not cause any malfunction in plugin operation, these messages could be quite annoying. We fixed it.
113
+
114
+ = 3.3 =
115
+ - **Improved Single Sign On functionality.** Single Sign On module has been available in Ecwid Wordpress plugin for a while – it makes it possible for your customers to sign into your Wordpress site and fully use the Ecwid store installed on the site without having to sign in to Ecwid. Now we added a few improvements that should make the feature more useful. In particular, the Ecwid's "Sign in" link was usually hidden when Single Sign On is used, supposing a customer should use the Wordpress login functionality. Now, we made the link visible and redirecting to the Wordpress login form to avoid confusing the user who otherwise has to look for the area to login.
116
+ - **Storefront layout improvements for the "Evolve" WordPress theme.** We adjusted Ecwid plugin to better integrate with a popular and beautiful free Wordpress theme – Evolve. In particular, we fixed the borders appearing around every storefront element in this theme. Ecwid stores now look a way better on WordPress sites with Evolve theme to provide better customer experience on any device and to generate more sales in your store.
117
+ - **Compatibility with Autoptimize plugin.** One of Ecwid users recently reported an issue – the plugin doesn't work well on the sites with Autoptimize plugin installed. We fixed this in our plugin – it is now working well with Autoptimize. Feel free to use it on your site.
118
+ - **Improvements for Recently Viewed Products.** We included a few improvements and bug fixes for the recently viewed products widget in this release.
119
+ - **Fixed a bug in the "Add store" button in Wordpress editor.** The authors of Easy Image Collage plugin recently discovered a problem in the way Ecwid "Add store" button interacts with the other custom button in the Wordpress WYSIWYG editor. It's fixed now. Thanks to Easy Image Collage team.
120
+ - A few improvements in the Chameleon skin tool.
121
+
122
+ = 3.2.2 =
123
  - Fixed a few minor bugs in the Chameleon skin feature
124
 
125
  = 3.2.1 =
templates/connect.php CHANGED
@@ -1,7 +1,4 @@
1
- <?php if ($connection_error): ?>
2
- <script src="//app.ecwid.com/script.js?805056&data_wporg_error=<?php echo urlencode($last_error); ?>&url=<?php echo urlencode(get_bloginfo('url')); ?>"></script>
3
- <?php endif; ?>
4
- <div class="wrap ecwid-admin ecwid-connect">
5
  <div class="box">
6
  <div class="head"><?php ecwid_embed_svg('ecwid_logo_symbol_RGB');?>
7
  <h3>
@@ -16,13 +13,17 @@
16
  <?php _e( 'Connect your store<br /> to this WordPress site', 'ecwid-shopping-cart' ); ?>
17
  </div>
18
 
 
 
 
19
  <div class="connect-button">
20
- <a href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>"><?php _e( 'Connect Ecwid store', 'ecwid-shopping-cart' ); ?></a>
 
21
  </div>
22
 
23
  <?php if (!$connection_error): ?>
24
 
25
- <div class="note initial">
26
  <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
27
  </div>
28
 
@@ -36,6 +37,11 @@
36
 
37
  <?php endif; ?>
38
 
 
 
 
 
 
39
  <div class="create-account-link">
40
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
41
  <?php _e( "Don't have Ecwid account? Create it here", 'ecwid-shopping-cart' ); ?>
1
+ <div class="wrap ecwid-admin ecwid-connect<?php if ($no_oauth): ?> no-oauth<?php else: ?> with-oauth<?php endif; ?>">
 
 
 
2
  <div class="box">
3
  <div class="head"><?php ecwid_embed_svg('ecwid_logo_symbol_RGB');?>
4
  <h3>
13
  <?php _e( 'Connect your store<br /> to this WordPress site', 'ecwid-shopping-cart' ); ?>
14
  </div>
15
 
16
+ <div class="connect-store-id no-oauth">
17
+ <input type="text" id="ecwid-store-id" placeholder="<?php _e('Enter your Store ID', 'ecwid-shopping-cart'); ?>" />
18
+ </div>
19
  <div class="connect-button">
20
+ <a href="admin-post.php?action=ecwid_connect" class="with-oauth"><?php _e( 'Connect Ecwid store', 'ecwid-shopping-cart' ); ?></a>
21
+ <a id="ecwid-connect-no-oauth" href="admin-post.php?action=ecwid_connect" class="no-oauth"><?php _e( 'Save and connect', 'ecwid-shopping-cart' ); ?></a>
22
  </div>
23
 
24
  <?php if (!$connection_error): ?>
25
 
26
+ <div class="note initial with-oauth">
27
  <?php _e( 'After clicking button you need to login and accept permissions to use our plugin', 'ecwid-shopping-cart' ); ?>
28
  </div>
29
 
37
 
38
  <?php endif; ?>
39
 
40
+ <h4 class="no-oauth where-to-find-store-id" style="text-align: center"><?php _e('Where to find your Store ID:', 'ecwid-shopping-cart'); ?></h4>
41
+ <div class="note no-oauth">
42
+ <?php echo sprintf( __('Store ID is a unique identifier of your Ecwid account. You can find it in your Ecwid control panel: open the <a %s>Dashboard page</a> and find the "<b>Store ID: NNNNNNN</b>" text, where <b>NNNNNNN</b> is your Store&nbsp;ID.', 'ecwid-shopping-cart'), 'href="https://my.ecwid.com/cp/CP.html?source=wporg#dashboard" target="_blank"'); ?>
43
+ </div>
44
+
45
  <div class="create-account-link">
46
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
47
  <?php _e( "Don't have Ecwid account? Create it here", 'ecwid-shopping-cart' ); ?>
templates/landing.php CHANGED
@@ -1,6 +1,3 @@
1
- <?php if ($connection_error): ?>
2
- <script src="//app.ecwid.com/script.js?805056&data_wporg_error=<?php echo urlencode($last_error); ?>&url=<?php echo urlencode(get_bloginfo('url')); ?>"></script>
3
- <?php endif; ?>
4
  <div class="ecwid-landing <?php echo $register ? 'register' : 'connect'; echo $connection_error ? ' conn-error': ''; ?>">
5
  <div class="ecwid-thank">
6
  <h1 class="on-register">
@@ -44,9 +41,9 @@
44
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect()">
45
  <?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
46
  </a>
47
- <button class="button button--green on-connect" onclick="javascript:location.href='<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
48
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
49
- </button>
50
  <div class="button-description-mobile on-register">
51
  <?php _e('Free registration, No credit card required', 'ecwid-shopping-cart'); ?>
52
  </div>
@@ -58,7 +55,7 @@
58
  </div>
59
  <div class="ecwid-button-description on-register">
60
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
61
- <a href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
62
  </div>
63
  <div class="ecwid-button-description on-connect">
64
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
@@ -136,7 +133,7 @@
136
  </div>
137
  <div class="ecwid-features-bottom-item-text">
138
  <h3><?php _e('Global Reach', 'ecwid-shopping-cart'); ?></h3>
139
- <p><?php _e('More than 700,000 merchants in 175 countries', 'ecwid-shopping-cart'); ?></p>
140
  </div>
141
  </div>
142
  </div>
@@ -149,12 +146,12 @@
149
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();">
150
  <?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
151
  </a>
152
- <a class="button button--green on-connect" href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
153
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
154
  </a>
155
  <div class="ecwid-button-description on-register">
156
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
157
- <a href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>"><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
158
  </div>
159
  <div class="ecwid-button-description on-connect">
160
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
 
 
 
1
  <div class="ecwid-landing <?php echo $register ? 'register' : 'connect'; echo $connection_error ? ' conn-error': ''; ?>">
2
  <div class="ecwid-thank">
3
  <h1 class="on-register">
41
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect()">
42
  <?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
43
  </a>
44
+ <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect">
45
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
46
+ </a>
47
  <div class="button-description-mobile on-register">
48
  <?php _e('Free registration, No credit card required', 'ecwid-shopping-cart'); ?>
49
  </div>
55
  </div>
56
  <div class="ecwid-button-description on-register">
57
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
58
+ <a href="admin-post.php?action=ecwid_connect"><?php _e('Connect your store to Wordpress site', 'ecwid-shopping-cart'); ?></a>
59
  </div>
60
  <div class="ecwid-button-description on-connect">
61
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
133
  </div>
134
  <div class="ecwid-features-bottom-item-text">
135
  <h3><?php _e('Global Reach', 'ecwid-shopping-cart'); ?></h3>
136
+ <p><?php _e('More than 800,000 merchants in 175 countries', 'ecwid-shopping-cart'); ?></p>
137
  </div>
138
  </div>
139
  </div>
146
  <a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();">
147
  <?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
148
  </a>
149
+ <a class="button button--green on-connect" href="admin-post.php?action=ecwid_connect">
150
  <?php _e('Connect your store', 'ecwid-shopping-cart'); ?>
151
  </a>
152
  <div class="ecwid-button-description on-register">
153
  <?php _e('Already have Ecwid account?', 'ecwid-shopping-cart'); ?>
154
+ <a href="admin-post.php?action=ecwid_connect"><?php _e('Connect your store to this site', 'ecwid-shopping-cart'); ?></a>
155
  </div>
156
  <div class="ecwid-button-description on-connect">
157
  <?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>