Version Description
- Updates and bug fixes for the new horizontal categories widget.
- Fixed a layout issue in the "Categories" block on the store page management in the Wordpress admin backend.
- Improved store connect functionality for the servers, which may have troubles connecting with the Ecwid API.
- A few minor bug fixes and improvements to make the plugin more stable.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 3.4.5 |
Comparing to | |
See all releases |
Code changes from version 3.4.4 to 3.4.5
- css/admin.css +31 -0
- css/settings.css +5 -0
- ecwid-shopping-cart.php +60 -36
- includes/class-ecwid-oauth.php +4 -4
- js/store-editor-page.js +4 -4
- lib/ecwid_platform.php +44 -22
- lib/phpseclib/AES.php +2 -2
- lib/phpseclib/Base.php +2 -2
- lib/phpseclib/Rijndael.php +4 -4
- readme.txt +8 -2
- templates/advanced-settings.php +2 -5
- templates/debug.php +93 -0
css/admin.css
CHANGED
@@ -297,3 +297,34 @@ body[class*="_page_ecwid"] .ecwid-message {
|
|
297 |
#available-widgets .widget-top.ecwid-widget-recentlyviewed .widget-title:before {
|
298 |
content: "\e600";
|
299 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
#available-widgets .widget-top.ecwid-widget-recentlyviewed .widget-title:before {
|
298 |
content: "\e600";
|
299 |
}
|
300 |
+
|
301 |
+
.ecwid-debug .section {
|
302 |
+
display: table-row;
|
303 |
+
}
|
304 |
+
|
305 |
+
.ecwid-debug .section > * {
|
306 |
+
display: table-cell;
|
307 |
+
padding: 2px 5px;
|
308 |
+
}
|
309 |
+
|
310 |
+
.ecwid-debug h2.hide+div {
|
311 |
+
display: none;
|
312 |
+
}
|
313 |
+
|
314 |
+
.ecwid-debug h2 {
|
315 |
+
cursor: pointer;
|
316 |
+
}
|
317 |
+
|
318 |
+
.ecwid-debug h2:hover {
|
319 |
+
color: #00a0d2;
|
320 |
+
}
|
321 |
+
.ecwid-debug h2:before {
|
322 |
+
content: "[-]";
|
323 |
+
font-family: monospace;
|
324 |
+
position: relative;
|
325 |
+
top: -0.2em;
|
326 |
+
}
|
327 |
+
|
328 |
+
.ecwid-debug h2.hide:before {
|
329 |
+
content: "[+]";
|
330 |
+
}
|
css/settings.css
CHANGED
@@ -300,6 +300,11 @@ display: none;
|
|
300 |
color: #298CBA;
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
303 |
.ecwid-settings .note.inline-note {
|
304 |
max-width: 300px;
|
305 |
margin-left: 15px;
|
300 |
color: #298CBA;
|
301 |
}
|
302 |
|
303 |
+
.ecwid-settings.advanced-settings .pure-control-group.hidden,
|
304 |
+
.ecwid-settings.advanced-settings hr.hidden {
|
305 |
+
display: none;
|
306 |
+
}
|
307 |
+
|
308 |
.ecwid-settings .note.inline-note {
|
309 |
max-width: 300px;
|
310 |
margin-left: 15px;
|
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.4.
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
@@ -77,6 +77,7 @@ if ( is_admin() ){
|
|
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');
|
@@ -362,7 +363,6 @@ function ecwid_backward_compatibility() {
|
|
362 |
}
|
363 |
}
|
364 |
|
365 |
-
|
366 |
function ecwid_build_sitemap($callback)
|
367 |
{
|
368 |
if (!ecwid_is_paid_account() || !ecwid_is_store_page_available()) return;
|
@@ -447,6 +447,13 @@ function ecwid_check_version()
|
|
447 |
|
448 |
add_option('ecwid_use_new_horizontal_categories', '');
|
449 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
|
452 |
function ecwid_migrations_is_original_plugin_version_older_than($version)
|
@@ -684,6 +691,11 @@ function ecwid_meta() {
|
|
684 |
}
|
685 |
}
|
686 |
|
|
|
|
|
|
|
|
|
|
|
687 |
function ecwid_canonical() {
|
688 |
$allowed = ecwid_is_api_enabled() && isset($_GET['_escaped_fragment_']);
|
689 |
if (!$allowed) return;
|
@@ -858,10 +870,10 @@ function ecwid_content_started($content)
|
|
858 |
|
859 |
function ecwid_wrap_shortcode_content($content, $name, $attrs)
|
860 |
{
|
861 |
-
return "<!-- Ecwid shopping cart plugin v 3.4.
|
862 |
. ecwid_get_scriptjs_code(@$attrs['lang'])
|
863 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
864 |
-
. "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 3.4.
|
865 |
}
|
866 |
|
867 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
@@ -981,7 +993,7 @@ function ecwid_categories_shortcode($attributes) {
|
|
981 |
$store_id = get_ecwid_store_id();
|
982 |
$result = <<<HTML
|
983 |
<div id="horizontal-menu" data-storeid="$store_id"></div>
|
984 |
-
<script src="https://djqizrxa6f10j.cloudfront.net/horizontal-category-widget/v1/horizontal-widget.js"></script>
|
985 |
HTML;
|
986 |
} else {
|
987 |
$result = <<<EOT
|
@@ -1253,7 +1265,7 @@ function ecwid_ajax_get_product_info() {
|
|
1253 |
echo json_encode($product);
|
1254 |
}
|
1255 |
|
1256 |
-
|
1257 |
}
|
1258 |
|
1259 |
add_filter('autoptimize_filter_js_exclude','ecwid_override_jsexclude',10,1);
|
@@ -1452,6 +1464,8 @@ function ecwid_options_add_page() {
|
|
1452 |
'ecwid_advanced_settings_do_page'
|
1453 |
);
|
1454 |
}
|
|
|
|
|
1455 |
}
|
1456 |
|
1457 |
function ecwid_register_admin_styles($hook_suffix) {
|
@@ -1480,7 +1494,6 @@ function ecwid_register_settings_styles($hook_suffix) {
|
|
1480 |
|
1481 |
if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
|
1482 |
|
1483 |
-
wp_enqueue_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1484 |
wp_enqueue_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1485 |
|
1486 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
@@ -1761,6 +1774,18 @@ function ecwid_appearance_settings_do_page() {
|
|
1761 |
require_once ECWID_PLUGIN_DIR . 'templates/appearance-settings.php';
|
1762 |
}
|
1763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1764 |
function get_ecwid_store_id() {
|
1765 |
static $store_id = null;
|
1766 |
if (is_null($store_id)) {
|
@@ -2434,7 +2459,7 @@ function ecwid_gather_stats()
|
|
2434 |
|
2435 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2436 |
|
2437 |
-
$
|
2438 |
'paid',
|
2439 |
'display_search',
|
2440 |
'horizontal_categories_enabled',
|
@@ -2455,48 +2480,28 @@ function ecwid_gather_stats()
|
|
2455 |
'avalanche_used',
|
2456 |
'chameleon_used',
|
2457 |
'http_post_fails',
|
2458 |
-
'ecwid_use_new_horizontal_categories'
|
|
|
|
|
2459 |
);
|
2460 |
|
2461 |
$usage_stats = ecwid_gather_usage_stats();
|
2462 |
$stats['usage'] = '';
|
2463 |
|
2464 |
$usage = '';
|
2465 |
-
foreach ($
|
2466 |
-
$usage[$index] = (int)$usage_stats[$item];
|
2467 |
}
|
2468 |
-
|
2469 |
$stats['usage'] = $usage_version . '_' . implode('', $usage);
|
2470 |
|
|
|
|
|
|
|
2471 |
return $stats;
|
2472 |
}
|
2473 |
|
2474 |
function ecwid_gather_usage_stats()
|
2475 |
{
|
2476 |
-
$usage_params = array(
|
2477 |
-
'paid',
|
2478 |
-
'display_search',
|
2479 |
-
'horizontal_categories_enabled',
|
2480 |
-
'minicart_enabled',
|
2481 |
-
'search_widget',
|
2482 |
-
'vcategories_widget',
|
2483 |
-
'minicart_normal_widget',
|
2484 |
-
'minicart_mini_widget',
|
2485 |
-
'badge_widget',
|
2486 |
-
'sso_enabled',
|
2487 |
-
'default_category',
|
2488 |
-
'google_xml_sitemaps_used',
|
2489 |
-
'ecwid_product_advisor_used',
|
2490 |
-
'ecwid_single_product_used',
|
2491 |
-
'ecwid_store_shortcode_used',
|
2492 |
-
'store_link_widget',
|
2493 |
-
'recently_viewed_widget',
|
2494 |
-
'avalanche_used',
|
2495 |
-
'chameleon_used',
|
2496 |
-
'http_post_fails',
|
2497 |
-
'ecwid_use_new_horizontal_categories'
|
2498 |
-
);
|
2499 |
-
|
2500 |
$usage_stats = array();
|
2501 |
$usage_stats['paid'] = ecwid_is_paid_account();
|
2502 |
$usage_stats['display_search'] = (bool) get_option('ecwid_show_search_box');
|
@@ -2519,7 +2524,26 @@ function ecwid_gather_usage_stats()
|
|
2519 |
$usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
|
2520 |
$usage_stats['http_post_fails'] = get_option('ecwid_last_oauth_fail_time') > 0;
|
2521 |
$usage_stats['ecwid_use_new_horizontal_categories'] = (bool) get_option('ecwid_use_new_horizontal_categories');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2522 |
|
|
|
2523 |
|
2524 |
return $usage_stats;
|
2525 |
}
|
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.4.5
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
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_action('wp_head', 'ecwid_product_browser_url_in_head');
|
81 |
add_filter( 'widget_meta_poweredby', 'ecwid_add_credits');
|
82 |
add_filter('the_content', 'ecwid_content_started', 0);
|
83 |
add_filter('body_class', 'ecwid_body_class');
|
363 |
}
|
364 |
}
|
365 |
|
|
|
366 |
function ecwid_build_sitemap($callback)
|
367 |
{
|
368 |
if (!ecwid_is_paid_account() || !ecwid_is_store_page_available()) return;
|
447 |
|
448 |
add_option('ecwid_use_new_horizontal_categories', '');
|
449 |
}
|
450 |
+
|
451 |
+
if (1 || $fresh_install || $upgrade) {
|
452 |
+
if (ecwid_migrations_is_original_plugin_version_older_than('4.4')) {
|
453 |
+
add_option('ecwid_fetch_url_use_file_get_contents', '');
|
454 |
+
add_option('ecwid_remote_get_timeout', '5');
|
455 |
+
}
|
456 |
+
}
|
457 |
}
|
458 |
|
459 |
function ecwid_migrations_is_original_plugin_version_older_than($version)
|
691 |
}
|
692 |
}
|
693 |
|
694 |
+
function ecwid_product_browser_url_in_head() {
|
695 |
+
echo ecwid_get_product_browser_url_script();
|
696 |
+
}
|
697 |
+
|
698 |
+
|
699 |
function ecwid_canonical() {
|
700 |
$allowed = ecwid_is_api_enabled() && isset($_GET['_escaped_fragment_']);
|
701 |
if (!$allowed) return;
|
870 |
|
871 |
function ecwid_wrap_shortcode_content($content, $name, $attrs)
|
872 |
{
|
873 |
+
return "<!-- Ecwid shopping cart plugin v 3.4.5 --><!-- noptimize -->"
|
874 |
. ecwid_get_scriptjs_code(@$attrs['lang'])
|
875 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
876 |
+
. "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 3.4.5 -->";
|
877 |
}
|
878 |
|
879 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
993 |
$store_id = get_ecwid_store_id();
|
994 |
$result = <<<HTML
|
995 |
<div id="horizontal-menu" data-storeid="$store_id"></div>
|
996 |
+
<script src="https://djqizrxa6f10j.cloudfront.net/horizontal-category-widget/v1.1/horizontal-widget.js"></script>
|
997 |
HTML;
|
998 |
} else {
|
999 |
$result = <<<EOT
|
1265 |
echo json_encode($product);
|
1266 |
}
|
1267 |
|
1268 |
+
exit();
|
1269 |
}
|
1270 |
|
1271 |
add_filter('autoptimize_filter_js_exclude','ecwid_override_jsexclude',10,1);
|
1464 |
'ecwid_advanced_settings_do_page'
|
1465 |
);
|
1466 |
}
|
1467 |
+
|
1468 |
+
add_submenu_page('', 'Ecwid debug', '', 'manage_options', 'ecwid-debug', 'ecwid_debug_do_page');
|
1469 |
}
|
1470 |
|
1471 |
function ecwid_register_admin_styles($hook_suffix) {
|
1494 |
|
1495 |
if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
|
1496 |
|
|
|
1497 |
wp_enqueue_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1498 |
|
1499 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
1774 |
require_once ECWID_PLUGIN_DIR . 'templates/appearance-settings.php';
|
1775 |
}
|
1776 |
|
1777 |
+
function ecwid_debug_do_page() {
|
1778 |
+
|
1779 |
+
if (ecwid_is_api_enabled()) {
|
1780 |
+
$remote_get_results = wp_remote_get( 'http://app.ecwid.com/api/v1/' . get_ecwid_store_id() . '/profile' );
|
1781 |
+
|
1782 |
+
global $ecwid_oauth;
|
1783 |
+
$api_v3_profile_results = wp_remote_get( 'https://app.ecwid.com/api/v3/' . get_ecwid_store_id() . '/profile?token=' . $ecwid_oauth->get_oauth_token() );
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
require_once ECWID_PLUGIN_DIR . 'templates/debug.php';
|
1787 |
+
}
|
1788 |
+
|
1789 |
function get_ecwid_store_id() {
|
1790 |
static $store_id = null;
|
1791 |
if (is_null($store_id)) {
|
2459 |
|
2460 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
2461 |
|
2462 |
+
$vector_contents = array(
|
2463 |
'paid',
|
2464 |
'display_search',
|
2465 |
'horizontal_categories_enabled',
|
2480 |
'avalanche_used',
|
2481 |
'chameleon_used',
|
2482 |
'http_post_fails',
|
2483 |
+
'ecwid_use_new_horizontal_categories',
|
2484 |
+
'is_wp_newbie',
|
2485 |
+
'ecwid_remote_get_fails'
|
2486 |
);
|
2487 |
|
2488 |
$usage_stats = ecwid_gather_usage_stats();
|
2489 |
$stats['usage'] = '';
|
2490 |
|
2491 |
$usage = '';
|
2492 |
+
foreach ($vector_contents as $index => $item) {
|
2493 |
+
$usage[$index] = is_string($usage_stats[$item]) ? $usage_stats[$item] : (int)$usage_stats[$item];
|
2494 |
}
|
|
|
2495 |
$stats['usage'] = $usage_version . '_' . implode('', $usage);
|
2496 |
|
2497 |
+
$stats['wp_install_date'] = $usage_stats['wp_install_date'];
|
2498 |
+
$stats['plugin_install_date'] = $usage_stats['wp_install_date'];
|
2499 |
+
|
2500 |
return $stats;
|
2501 |
}
|
2502 |
|
2503 |
function ecwid_gather_usage_stats()
|
2504 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2505 |
$usage_stats = array();
|
2506 |
$usage_stats['paid'] = ecwid_is_paid_account();
|
2507 |
$usage_stats['display_search'] = (bool) get_option('ecwid_show_search_box');
|
2524 |
$usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
|
2525 |
$usage_stats['http_post_fails'] = get_option('ecwid_last_oauth_fail_time') > 0;
|
2526 |
$usage_stats['ecwid_use_new_horizontal_categories'] = (bool) get_option('ecwid_use_new_horizontal_categories');
|
2527 |
+
$usage_stats['ecwid_remote_get_fails'] = (bool) get_option('ecwid_fetch_url_use_file_get_contents');
|
2528 |
+
|
2529 |
+
|
2530 |
+
$wp_date = get_option('ecwid_wp_install_date');
|
2531 |
+
if (!$wp_date) {
|
2532 |
+
global $wpdb;
|
2533 |
+
$oldest_user = strtotime($wpdb->get_var("SELECT min(`user_registered`) FROM {$wpdb->users}"));
|
2534 |
+
$oldest_post = strtotime($wpdb->get_var("SELECT min(`post_date`) FROM {$wpdb->posts}"));
|
2535 |
+
$wpconfig_create = filectime(ABSPATH . '/wp-config.php');
|
2536 |
+
|
2537 |
+
$wp_date = min($oldest_user, $oldest_post, $wpconfig_create);
|
2538 |
+
update_option('ecwid_wp_install_date', $wp_date);
|
2539 |
+
}
|
2540 |
+
|
2541 |
+
$ecwid_date = get_option('ecwid_installation_date');
|
2542 |
+
|
2543 |
+
$usage_stats['wp_install_date'] = $wp_date;
|
2544 |
+
$usage_stats['plugin_install_date'] = $ecwid_date;
|
2545 |
|
2546 |
+
$usage_stats['is_wp_newbie'] = ($ecwid_date - $wp_date) / 60 / 60 / 24 <= 30;
|
2547 |
|
2548 |
return $usage_stats;
|
2549 |
}
|
includes/class-ecwid-oauth.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
include ECWID_PLUGIN_DIR . "lib/phpseclib/AES.php";
|
5 |
|
6 |
class Ecwid_OAuth {
|
@@ -24,7 +23,7 @@ class Ecwid_OAuth {
|
|
24 |
add_action('admin_post_ecwid_disconnect', array($this, 'disconnect_store'));
|
25 |
add_action('admin_post_ecwid_show_reconnect', array($this, 'show_reconnect'));
|
26 |
|
27 |
-
$this->crypt = new
|
28 |
$this->_init_crypt();
|
29 |
|
30 |
$this->_load_state();
|
@@ -261,13 +260,14 @@ class Ecwid_OAuth {
|
|
261 |
|
262 |
protected function _load_state() {
|
263 |
if (isset($_COOKIE['ecwid_oauth_state'])) {
|
264 |
-
$this->state = unserialize( $_COOKIE['ecwid_oauth_state'] );
|
265 |
} else {
|
266 |
$this->state = new stdClass();
|
267 |
$this->state->reconnect_scopes = array();
|
268 |
$this->state->reconnect_error = '';
|
269 |
$this->state->return_url = '';
|
270 |
$this->state->reason = '';
|
|
|
271 |
}
|
272 |
|
273 |
$this->state->create_store_clicked = @$_COOKIE['ecwid_create_store_clicked'];
|
@@ -342,7 +342,7 @@ class Ecwid_OAuth {
|
|
342 |
}
|
343 |
|
344 |
protected function _is_reconnect() {
|
345 |
-
return
|
346 |
}
|
347 |
}
|
348 |
|
1 |
<?php
|
2 |
|
|
|
3 |
include ECWID_PLUGIN_DIR . "lib/phpseclib/AES.php";
|
4 |
|
5 |
class Ecwid_OAuth {
|
23 |
add_action('admin_post_ecwid_disconnect', array($this, 'disconnect_store'));
|
24 |
add_action('admin_post_ecwid_show_reconnect', array($this, 'show_reconnect'));
|
25 |
|
26 |
+
$this->crypt = new Ecwid_Crypt_AES();
|
27 |
$this->_init_crypt();
|
28 |
|
29 |
$this->_load_state();
|
260 |
|
261 |
protected function _load_state() {
|
262 |
if (isset($_COOKIE['ecwid_oauth_state'])) {
|
263 |
+
$this->state = @unserialize( $_COOKIE['ecwid_oauth_state'] );
|
264 |
} else {
|
265 |
$this->state = new stdClass();
|
266 |
$this->state->reconnect_scopes = array();
|
267 |
$this->state->reconnect_error = '';
|
268 |
$this->state->return_url = '';
|
269 |
$this->state->reason = '';
|
270 |
+
$this->state->mode = self::MODE_CONNECT;
|
271 |
}
|
272 |
|
273 |
$this->state->create_store_clicked = @$_COOKIE['ecwid_create_store_clicked'];
|
342 |
}
|
343 |
|
344 |
protected function _is_reconnect() {
|
345 |
+
return @$this->state->mode == self::MODE_RECONNECT;
|
346 |
}
|
347 |
}
|
348 |
|
js/store-editor-page.js
CHANGED
@@ -81,9 +81,9 @@ jQuery(document).ready(function() {
|
|
81 |
*/
|
82 |
getDefaultParams = function() {
|
83 |
return {
|
84 |
-
'show_search':
|
85 |
'show_minicart': true,
|
86 |
-
'show_categories':
|
87 |
'categories_per_row': 3,
|
88 |
'grid_rows': 3,
|
89 |
'grid_columns': 3,
|
@@ -92,7 +92,7 @@ jQuery(document).ready(function() {
|
|
92 |
'default_category_id': 0,
|
93 |
'category_view': 'grid',
|
94 |
'search_view': 'list',
|
95 |
-
'minicart_layout': '
|
96 |
}
|
97 |
}
|
98 |
|
@@ -219,7 +219,7 @@ jQuery(document).ready(function() {
|
|
219 |
result.default_category_id = getNumber('default_category_id', defaults.default_category_id);
|
220 |
result.category_view = getString('category_view', ['list', 'grid', 'table'], defaults.category_view);
|
221 |
result.search_view = getString('search_view', ['list', 'grid', 'table'], defaults.search_view);
|
222 |
-
result.minicart_layout =
|
223 |
|
224 |
|
225 |
var existingShortcode = ecwid_get_store_shortcode(jQuery('#content').val());
|
81 |
*/
|
82 |
getDefaultParams = function() {
|
83 |
return {
|
84 |
+
'show_search': true,
|
85 |
'show_minicart': true,
|
86 |
+
'show_categories': true,
|
87 |
'categories_per_row': 3,
|
88 |
'grid_rows': 3,
|
89 |
'grid_columns': 3,
|
92 |
'default_category_id': 0,
|
93 |
'category_view': 'grid',
|
94 |
'search_view': 'list',
|
95 |
+
'minicart_layout': 'MiniAttachToProductBrowser'
|
96 |
}
|
97 |
}
|
98 |
|
219 |
result.default_category_id = getNumber('default_category_id', defaults.default_category_id);
|
220 |
result.category_view = getString('category_view', ['list', 'grid', 'table'], defaults.category_view);
|
221 |
result.search_view = getString('search_view', ['list', 'grid', 'table'], defaults.search_view);
|
222 |
+
result.minicart_layout = defaults.minicart_layout;
|
223 |
|
224 |
|
225 |
var existingShortcode = ecwid_get_store_shortcode(jQuery('#content').val());
|
lib/ecwid_platform.php
CHANGED
@@ -19,28 +19,50 @@ class EcwidPlatform {
|
|
19 |
|
20 |
static public function fetch_url($url)
|
21 |
{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
}
|
46 |
}
|
19 |
|
20 |
static public function fetch_url($url)
|
21 |
{
|
22 |
+
$use_file_get_contents = get_option('ecwid_fetch_url_use_file_get_contents', false);
|
23 |
+
|
24 |
+
if ($use_file_get_contents == 'Y') {
|
25 |
+
$result = file_get_contents($url);
|
26 |
+
} else {
|
27 |
+
$result = wp_remote_get( $url, array( 'timeout' => get_option( 'ecwid_remote_get_timeout', 5 ) ) );
|
28 |
+
if (!is_array($result)) {
|
29 |
+
$result = file_get_contents($url);
|
30 |
+
if (!empty($result)) {
|
31 |
+
update_option('ecwid_fetch_url_use_file_get_contents', true);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
$return = array(
|
37 |
+
'code' => '',
|
38 |
+
'data' => '',
|
39 |
+
'message' => ''
|
40 |
+
);
|
41 |
+
|
42 |
+
if (is_array($result)) {
|
43 |
+
$return = array(
|
44 |
+
'code' => $result['response']['code'],
|
45 |
+
'data' => $result['body']
|
46 |
+
);
|
47 |
+
} elseif (is_object($result)) {
|
48 |
+
|
49 |
+
$return = array(
|
50 |
+
'code' => $result->get_error_code(),
|
51 |
+
'data' => $result->get_error_data(),
|
52 |
+
'message' => $result->get_error_message()
|
53 |
+
);
|
54 |
+
|
55 |
+
$get_contents = file_get_contents($url);
|
56 |
+
if ($get_contents !== false) {
|
57 |
+
$return = array(
|
58 |
+
'code' => 200,
|
59 |
+
'data' => $get_contents,
|
60 |
+
'is_file_get_contents' => true
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
return $return;
|
66 |
|
67 |
}
|
68 |
}
|
lib/phpseclib/AES.php
CHANGED
@@ -68,7 +68,7 @@
|
|
68 |
/**
|
69 |
* Include Crypt_Rijndael
|
70 |
*/
|
71 |
-
if (!class_exists('
|
72 |
include_once 'Rijndael.php';
|
73 |
}
|
74 |
|
@@ -118,7 +118,7 @@ define('CRYPT_AES_MODE_OFB', CRYPT_MODE_OFB);
|
|
118 |
* @author Jim Wigginton <terrafrost@php.net>
|
119 |
* @access public
|
120 |
*/
|
121 |
-
class
|
122 |
{
|
123 |
/**
|
124 |
* The namespace used by the cipher for its constants.
|
68 |
/**
|
69 |
* Include Crypt_Rijndael
|
70 |
*/
|
71 |
+
if (!class_exists('Ecwid_Crypt_Rijndael')) {
|
72 |
include_once 'Rijndael.php';
|
73 |
}
|
74 |
|
118 |
* @author Jim Wigginton <terrafrost@php.net>
|
119 |
* @access public
|
120 |
*/
|
121 |
+
class Ecwid_Crypt_AES extends Ecwid_Crypt_Rijndael
|
122 |
{
|
123 |
/**
|
124 |
* The namespace used by the cipher for its constants.
|
lib/phpseclib/Base.php
CHANGED
@@ -122,7 +122,7 @@ define('CRYPT_ENGINE_OPENSSL', 3);
|
|
122 |
* @author Hans-Juergen Petrich <petrich@tronic-media.com>
|
123 |
* @access public
|
124 |
*/
|
125 |
-
class
|
126 |
{
|
127 |
/**
|
128 |
* The Encryption Mode
|
@@ -503,7 +503,7 @@ class Crypt_Base
|
|
503 |
* @param int $mode
|
504 |
* @access public
|
505 |
*/
|
506 |
-
function
|
507 |
{
|
508 |
// $mode dependent settings
|
509 |
switch ($mode) {
|
122 |
* @author Hans-Juergen Petrich <petrich@tronic-media.com>
|
123 |
* @access public
|
124 |
*/
|
125 |
+
class Ecwid_Crypt_Base
|
126 |
{
|
127 |
/**
|
128 |
* The Encryption Mode
|
503 |
* @param int $mode
|
504 |
* @access public
|
505 |
*/
|
506 |
+
function Ecwid_Crypt_Base($mode = CRYPT_MODE_CBC)
|
507 |
{
|
508 |
// $mode dependent settings
|
509 |
switch ($mode) {
|
lib/phpseclib/Rijndael.php
CHANGED
@@ -75,7 +75,7 @@
|
|
75 |
*
|
76 |
* Base cipher class
|
77 |
*/
|
78 |
-
if (!class_exists('
|
79 |
include_once 'Base.php';
|
80 |
}
|
81 |
|
@@ -125,7 +125,7 @@ define('CRYPT_RIJNDAEL_MODE_OFB', CRYPT_MODE_OFB);
|
|
125 |
* @author Jim Wigginton <terrafrost@php.net>
|
126 |
* @access public
|
127 |
*/
|
128 |
-
class
|
129 |
{
|
130 |
/**
|
131 |
* The namespace used by the cipher for its constants.
|
@@ -264,9 +264,9 @@ class Crypt_Rijndael extends Crypt_Base
|
|
264 |
* @param int $mode
|
265 |
* @access public
|
266 |
*/
|
267 |
-
function
|
268 |
{
|
269 |
-
parent::
|
270 |
}
|
271 |
|
272 |
/**
|
75 |
*
|
76 |
* Base cipher class
|
77 |
*/
|
78 |
+
if (!class_exists('Ecwid_Crypt_Base')) {
|
79 |
include_once 'Base.php';
|
80 |
}
|
81 |
|
125 |
* @author Jim Wigginton <terrafrost@php.net>
|
126 |
* @access public
|
127 |
*/
|
128 |
+
class Ecwid_Crypt_Rijndael extends Ecwid_Crypt_Base
|
129 |
{
|
130 |
/**
|
131 |
* The namespace used by the cipher for its constants.
|
264 |
* @param int $mode
|
265 |
* @access public
|
266 |
*/
|
267 |
+
function Ecwid_Crypt_Rijndael($mode = CRYPT_RIJNDAEL_MODE_CBC)
|
268 |
{
|
269 |
+
parent::Ecwid_Crypt_Base($mode);
|
270 |
}
|
271 |
|
272 |
/**
|
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.
|
6 |
-
Stable tag: 3.4.
|
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,6 +107,12 @@ 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.4.4 =
|
111 |
- **Added compatibility with the "Add Meta Tags" plugin.** The "Add Meta Tags" plugin is a popular tool to set SEO meta tags on site pages. Previously it rewrote the titles and description that Ecwid generated for search engines on your site. It's now fixed so if you use the plugin, everything should work fine and Google will index your products pages properly.
|
112 |
- **Fixed a problem in the recently viewed products widget caused by Autoptimize plugin.** Previously, if Autoptimize plugin is used on the site, the recently viewed products widget reset the displayed products when page reloads. We fixed that.
|
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.4
|
6 |
+
Stable tag: 3.4.5
|
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.4.5 =
|
111 |
+
- Updates and bug fixes for the new horizontal categories widget.
|
112 |
+
- Fixed a layout issue in the "Categories" block on the store page management in the Wordpress admin backend.
|
113 |
+
- Improved store connect functionality for the servers, which may have troubles connecting with the Ecwid API.
|
114 |
+
- A few minor bug fixes and improvements to make the plugin more stable.
|
115 |
+
|
116 |
= 3.4.4 =
|
117 |
- **Added compatibility with the "Add Meta Tags" plugin.** The "Add Meta Tags" plugin is a popular tool to set SEO meta tags on site pages. Previously it rewrote the titles and description that Ecwid generated for search engines on your site. It's now fixed so if you use the plugin, everything should work fine and Google will index your products pages properly.
|
118 |
- **Fixed a problem in the recently viewed products widget caused by Autoptimize plugin.** Previously, if Autoptimize plugin is used on the site, the recently viewed products widget reset the displayed products when page reloads. We fixed that.
|
templates/advanced-settings.php
CHANGED
@@ -108,11 +108,9 @@
|
|
108 |
</div>
|
109 |
</div>
|
110 |
|
|
|
111 |
|
112 |
-
|
113 |
-
<hr />
|
114 |
-
|
115 |
-
<div class="pure-control-group checkbox">
|
116 |
<div class="label">
|
117 |
<label for="ecwid_use_new_horizontal_categories">
|
118 |
|
@@ -136,7 +134,6 @@
|
|
136 |
</div>
|
137 |
</div>
|
138 |
</div>
|
139 |
-
<?php endif; ?>
|
140 |
|
141 |
</fieldset>
|
142 |
|
108 |
</div>
|
109 |
</div>
|
110 |
|
111 |
+
<hr <?php echo ecwid_migrations_is_original_plugin_version_older_than('3.3') ? '' : ' hidden'; ?> />
|
112 |
|
113 |
+
<div class="pure-control-group checkbox<?php echo ecwid_migrations_is_original_plugin_version_older_than('3.3') ? '' : ' hidden'; ?>">
|
|
|
|
|
|
|
114 |
<div class="label">
|
115 |
<label for="ecwid_use_new_horizontal_categories">
|
116 |
|
134 |
</div>
|
135 |
</div>
|
136 |
</div>
|
|
|
137 |
|
138 |
</fieldset>
|
139 |
|
templates/debug.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ecwid-debug">
|
2 |
+
<?php
|
3 |
+
|
4 |
+
|
5 |
+
$all_plugins = get_plugins();
|
6 |
+
|
7 |
+
$active_plugins = get_option('active_plugins');
|
8 |
+
|
9 |
+
$theme = wp_get_theme();
|
10 |
+
|
11 |
+
$all_options = wp_load_alloptions();
|
12 |
+
?>
|
13 |
+
|
14 |
+
<h2>Active plugins</h2>
|
15 |
+
|
16 |
+
<div>
|
17 |
+
<?php foreach($active_plugins as $path): ?>
|
18 |
+
<div class="section">
|
19 |
+
<div>
|
20 |
+
<?php echo $all_plugins[$path]['Name']; ?>
|
21 |
+
</div>
|
22 |
+
<div>
|
23 |
+
<?php echo $all_plugins[$path]['PluginURI']; ?>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
<?php endforeach; ?>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<h2>All plugins</h2>
|
30 |
+
|
31 |
+
<div>
|
32 |
+
<?php foreach($all_plugins as $key => $item): ?>
|
33 |
+
<div class="section">
|
34 |
+
<div>
|
35 |
+
<?php echo $item['Name']; ?>
|
36 |
+
</div>
|
37 |
+
<div>
|
38 |
+
<?php echo $item['PluginURI']; ?>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<h2>Theme</h2>
|
45 |
+
|
46 |
+
<div class="section">
|
47 |
+
<div><?php echo $theme->get('Name'); ?></div>
|
48 |
+
<div><?php echo $theme->get('ThemeURI'); ?></div>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
<h2>Remote get test</h2>
|
52 |
+
<div><?php var_export($remote_get_results); ?></div>
|
53 |
+
|
54 |
+
<h2>Api V3 profile test</h2>
|
55 |
+
<div><?php var_export($api_v3_profile_results); ?></div>
|
56 |
+
|
57 |
+
<h2>Error log</h2>
|
58 |
+
<div>
|
59 |
+
<?php foreach (json_decode($all_options['ecwid_error_log'], true) as $key => $item): ?>
|
60 |
+
<div class="section"><?php echo $item['message']; ?></div>
|
61 |
+
<?php endforeach; ?>
|
62 |
+
</div>
|
63 |
+
|
64 |
+
<h2>Options</h2>
|
65 |
+
|
66 |
+
<div>
|
67 |
+
<?php foreach($all_options as $key => $option): ?>
|
68 |
+
<?php if (strpos($key, 'ecwid') !== false): ?>
|
69 |
+
<div class="section">
|
70 |
+
<div>
|
71 |
+
<?php echo $key; ?>
|
72 |
+
</div>
|
73 |
+
<div>
|
74 |
+
<?php echo $option; ?>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
<?php endif; ?>
|
78 |
+
<?php endforeach; ?>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
<h2>PhpInfo</h2>
|
82 |
+
|
83 |
+
<div>
|
84 |
+
<iframe width="80%" height="500px" srcdoc="<?php ob_start(); phpinfo(); $contents = ob_get_contents(); ob_end_clean(); echo esc_attr($contents); ?>"></iframe>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
</div>
|
88 |
+
|
89 |
+
<script>
|
90 |
+
jQuery('h2').click(function() {
|
91 |
+
jQuery(this).toggleClass('hide');
|
92 |
+
})
|
93 |
+
</script>
|