Version Description
- Fixed a layout issue in the floating cart widget in the "Mobius" WordPress theme.
- Fixed a few issues with the Single Sign On functionality in the plugin.
- Improvements for compatibility with GravityView plugin. You can use that plugin and Ecwid ecommerce shopping cart together they should work with no issues.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 4.7 |
Comparing to | |
See all releases |
Code changes from version 4.6.3 to 4.7
- css/floating-shopping-cart.css +16 -5
- css/fonts.css +5 -5
- ecwid-shopping-cart.php +73 -66
- includes/class-ecwid-integration-autoptimize.php +31 -0
- includes/class-ecwid-message-manager.php +30 -3
- includes/class-ecwid-store-editor.php +2 -2
- includes/shortcodes/class-ecwid-shortcode-base.php +8 -4
- includes/shortcodes/class-ecwid-shortcode-productbrowser.php +2 -2
- includes/themes.php +4 -3
- includes/themes/class-ecwid-theme-boundless.php +37 -0
- includes/themes/class-ecwid-theme-trend.php +5 -0
- includes/widgets/class-ecwid-widget-search.php +4 -0
- js/chameleon.js +0 -2
- languages/ecwid-shopping-cart-ru_RU.mo +0 -0
- languages/ecwid-shopping-cart-ru_RU.po +14 -0
- readme.txt +6 -1
- templates/advanced-settings.php +6 -3
- templates/appearance-settings.php +2 -2
css/floating-shopping-cart.css
CHANGED
@@ -7,25 +7,32 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons {
|
|
7 |
box-sizing: content-box;
|
8 |
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
|
11 |
bottom: auto;
|
12 |
top: 25px;
|
13 |
-
right: 25px;
|
14 |
-
left: auto;
|
15 |
}
|
16 |
|
17 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-bottomright {
|
18 |
top: auto;
|
19 |
bottom: 25px;
|
20 |
-
right: 25px;
|
21 |
-
left: auto;
|
22 |
}
|
23 |
|
24 |
@media (max-width: 600px) {
|
25 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
|
26 |
right: -8px;
|
27 |
}
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
html#ecwid_html body#ecwid_body .ecwid-float-icons > div {
|
31 |
height: 48px;
|
@@ -157,4 +164,8 @@ html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[stroke] {
|
|
157 |
}
|
158 |
html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[fill] {
|
159 |
fill: #439CA0;
|
|
|
|
|
|
|
|
|
160 |
}
|
7 |
box-sizing: content-box;
|
8 |
}
|
9 |
|
10 |
+
html#ecwid_html body#ecwid_body .ecwid-float-icons {
|
11 |
+
left: auto;
|
12 |
+
right: 0px;
|
13 |
+
padding-right: 25px;
|
14 |
+
}
|
15 |
+
|
16 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
|
17 |
bottom: auto;
|
18 |
top: 25px;
|
|
|
|
|
19 |
}
|
20 |
|
21 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-bottomright {
|
22 |
top: auto;
|
23 |
bottom: 25px;
|
|
|
|
|
24 |
}
|
25 |
|
26 |
@media (max-width: 600px) {
|
27 |
html#ecwid_html body#ecwid_body .ecwid-float-icons.position-topright {
|
28 |
right: -8px;
|
29 |
}
|
30 |
+
|
31 |
+
html#ecwid_html body#ecwid_body .ecwid-float-icons {
|
32 |
+
padding-left: 25px;
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
|
37 |
html#ecwid_html body#ecwid_body .ecwid-float-icons > div {
|
38 |
height: 48px;
|
164 |
}
|
165 |
html#ecwid_html body#ecwid_body .ecwid-float-icons > div a svg path[fill] {
|
166 |
fill: #439CA0;
|
167 |
+
}
|
168 |
+
|
169 |
+
.ecwid-float-icons {
|
170 |
+
overflow: hidden;
|
171 |
}
|
css/fonts.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
@font-face {
|
2 |
font-family: 'ecwid-plugin-icons';
|
3 |
-
src:url('../fonts/ecwid-icons.eot
|
4 |
-
src:url('../fonts/ecwid-icons.eot?#
|
5 |
-
url('../fonts/ecwid-icons.woff
|
6 |
-
url('../fonts/ecwid-icons.ttf
|
7 |
-
url('../fonts/ecwid-icons.svg
|
8 |
font-weight: normal;
|
9 |
font-style: normal;
|
10 |
}
|
1 |
@font-face {
|
2 |
font-family: 'ecwid-plugin-icons';
|
3 |
+
src:url('../fonts/ecwid-icons.eot?ecwid-b8sbws');
|
4 |
+
src:url('../fonts/ecwid-icons.eot?#iefixecwid-b8sbws') format('embedded-opentype'),
|
5 |
+
url('../fonts/ecwid-icons.woff?ecwid-b8sbws') format('woff'),
|
6 |
+
url('../fonts/ecwid-icons.ttf?ecwid-b8sbws') format('truetype'),
|
7 |
+
url('../fonts/ecwid-icons.svg?ecwid-b8sbws#ecwid-icons') format('svg');
|
8 |
font-weight: normal;
|
9 |
font-style: normal;
|
10 |
}
|
ecwid-shopping-cart.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?source=wporg
|
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Team
|
8 |
-
Version: 4.
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
@@ -52,7 +52,6 @@ if ( is_admin() ){
|
|
52 |
add_action('admin_init', 'ecwid_process_oauth_params');
|
53 |
add_action('admin_notices', 'ecwid_show_admin_messages');
|
54 |
add_action('admin_menu', 'ecwid_build_menu');
|
55 |
-
add_action('wp_dashboard_setup', 'ecwid_add_dashboard_widgets' );
|
56 |
add_action('admin_enqueue_scripts', 'ecwid_common_admin_scripts');
|
57 |
add_action('admin_enqueue_scripts', 'ecwid_register_admin_styles');
|
58 |
add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
|
@@ -135,7 +134,8 @@ function ecwid_init_integrations()
|
|
135 |
$integrations = array(
|
136 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
137 |
'wpseo' => 'wordpress-seo/wp-seo.php',
|
138 |
-
'divibuilder' => 'divi-builder/divi-builder.php'
|
|
|
139 |
);
|
140 |
|
141 |
foreach ($integrations as $key => $plugin) {
|
@@ -279,11 +279,7 @@ function ecwid_enqueue_frontend() {
|
|
279 |
wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
|
280 |
|
281 |
if ((bool)get_option('ecwid_use_chameleon')) {
|
282 |
-
|
283 |
-
ecwid_enqueue_external_chameleon();
|
284 |
-
} else {
|
285 |
-
ecwid_enqueue_builtin_chameleon();
|
286 |
-
}
|
287 |
}
|
288 |
|
289 |
if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
|
@@ -304,32 +300,6 @@ function ecwid_enqueue_frontend() {
|
|
304 |
}
|
305 |
}
|
306 |
|
307 |
-
function ecwid_enqueue_external_chameleon() {
|
308 |
-
wp_enqueue_script('ecwid-chameleon-js', 'https://dj925myfyz5v.cloudfront.net/widgets/chameleon/v1/ecwid-chameleon.js', array(), get_option('ecwid_plugin_version'), true);
|
309 |
-
|
310 |
-
$primary = get_option('ecwid_chameleon_primary');
|
311 |
-
$background = get_option('ecwid_chameleon_background');
|
312 |
-
$links = get_option('ecwid_chameleon_links');
|
313 |
-
|
314 |
-
$localize = array();
|
315 |
-
|
316 |
-
if (get_option('ecwid_chameleon_primary')) {
|
317 |
-
$localize['primary_color'] = get_option('ecwid_chameleon_primary');
|
318 |
-
}
|
319 |
-
if (get_option('ecwid_chameleon_background')) {
|
320 |
-
$localize['primary_background'] = get_option('ecwid_chameleon_background');
|
321 |
-
}
|
322 |
-
if (get_option('ecwid_chameleon_links')) {
|
323 |
-
$localize['primary_link'] = get_option('ecwid_chameleon_links');
|
324 |
-
}
|
325 |
-
|
326 |
-
$localize['font'] = 'auto';
|
327 |
-
|
328 |
-
if (!empty( $localize )) {
|
329 |
-
wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', $localize);
|
330 |
-
}
|
331 |
-
}
|
332 |
-
|
333 |
function ecwid_enqueue_builtin_chameleon() {
|
334 |
wp_enqueue_script('ecwid-chameleon-js', ECWID_PLUGIN_URL . '/js/chameleon.js', array(), get_option('ecwid_plugin_version'), true);
|
335 |
|
@@ -490,6 +460,7 @@ function ecwid_check_version()
|
|
490 |
|
491 |
add_option('ecwid_use_new_horizontal_categories', 'Y');
|
492 |
add_option('ecwid_use_new_search', 'Y');
|
|
|
493 |
} elseif ($upgrade) {
|
494 |
|
495 |
ecwid_plugin_add_oauth();
|
@@ -514,18 +485,16 @@ function ecwid_check_version()
|
|
514 |
add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
|
515 |
}
|
516 |
|
517 |
-
|
518 |
-
if (!ecwid_migrations_is_original_plugin_version_older_than( ECWID_VERSION_BUILTIN_CHAMELEON )) {
|
519 |
-
add_option('ecwid_chameleon_colors_foreground', '');
|
520 |
-
add_option('ecwid_chameleon_colors_background', '');
|
521 |
-
add_option('ecwid_chameleon_colors_link', '');
|
522 |
-
add_option('ecwid_chameleon_colors_button', '');
|
523 |
-
add_option('ecwid_chameleon_colors_price', '');
|
524 |
-
}
|
525 |
-
|
526 |
if (ecwid_migrations_is_original_plugin_version_older_than('4.4.5')) {
|
527 |
add_option('ecwid_enable_sso');
|
528 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
}
|
530 |
}
|
531 |
|
@@ -1065,10 +1034,14 @@ function ecwid_wrap_shortcode_content($content, $name, $attrs)
|
|
1065 |
{
|
1066 |
$version = get_option('ecwid_plugin_version');
|
1067 |
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
|
|
|
|
|
|
|
|
1072 |
}
|
1073 |
|
1074 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
@@ -1486,13 +1459,6 @@ function ecwid_ajax_get_product_info() {
|
|
1486 |
exit();
|
1487 |
}
|
1488 |
|
1489 |
-
add_filter('autoptimize_filter_js_exclude','ecwid_override_jsexclude',10,1);
|
1490 |
-
function ecwid_override_jsexclude($exclude)
|
1491 |
-
{
|
1492 |
-
$code = ecwid_get_search_js_code();
|
1493 |
-
return $exclude . ", $code";
|
1494 |
-
}
|
1495 |
-
|
1496 |
function ecwid_store_activate() {
|
1497 |
|
1498 |
if (get_option('ecwid_store_id', null) === null) {
|
@@ -1670,6 +1636,59 @@ function ecwid_uninstall() {
|
|
1670 |
Ecwid_Kissmetrics::record('wpPluginUninstalled');
|
1671 |
}
|
1672 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1673 |
function ecwid_abs_intval($value) {
|
1674 |
if (!is_null($value))
|
1675 |
return abs(intval($value));
|
@@ -2326,18 +2345,6 @@ function get_ecwid_store_id() {
|
|
2326 |
return $store_id;
|
2327 |
}
|
2328 |
|
2329 |
-
function ecwid_dashboard_widget_function() {
|
2330 |
-
if (!is_ssl()) {
|
2331 |
-
require_once ECWID_PLUGIN_DIR . 'templates/wp-dashboard-widget.php';
|
2332 |
-
}
|
2333 |
-
}
|
2334 |
-
|
2335 |
-
function ecwid_add_dashboard_widgets() {
|
2336 |
-
if (current_user_can('manage_options')) {
|
2337 |
-
wp_add_dashboard_widget('ecwid_dashboard_widget', __('Recommendations for Your Online Store', 'ecwid-shopping-cart'), 'ecwid_dashboard_widget_function');
|
2338 |
-
}
|
2339 |
-
}
|
2340 |
-
|
2341 |
function ecwid_save_post($post_id)
|
2342 |
{
|
2343 |
// If primary or auto store page gets updated
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Team
|
8 |
+
Version: 4.7
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
52 |
add_action('admin_init', 'ecwid_process_oauth_params');
|
53 |
add_action('admin_notices', 'ecwid_show_admin_messages');
|
54 |
add_action('admin_menu', 'ecwid_build_menu');
|
|
|
55 |
add_action('admin_enqueue_scripts', 'ecwid_common_admin_scripts');
|
56 |
add_action('admin_enqueue_scripts', 'ecwid_register_admin_styles');
|
57 |
add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
|
134 |
$integrations = array(
|
135 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
136 |
'wpseo' => 'wordpress-seo/wp-seo.php',
|
137 |
+
'divibuilder' => 'divi-builder/divi-builder.php',
|
138 |
+
'autoptimize' => 'autoptimize/autoptimize.php'
|
139 |
);
|
140 |
|
141 |
foreach ($integrations as $key => $plugin) {
|
279 |
wp_enqueue_script( 'ecwid-frontend-js', ECWID_PLUGIN_URL . 'js/frontend.js', array( 'jquery' ), get_option( 'ecwid_plugin_version' ) );
|
280 |
|
281 |
if ((bool)get_option('ecwid_use_chameleon')) {
|
282 |
+
ecwid_enqueue_builtin_chameleon();
|
|
|
|
|
|
|
|
|
283 |
}
|
284 |
|
285 |
if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
|
300 |
}
|
301 |
}
|
302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
function ecwid_enqueue_builtin_chameleon() {
|
304 |
wp_enqueue_script('ecwid-chameleon-js', ECWID_PLUGIN_URL . '/js/chameleon.js', array(), get_option('ecwid_plugin_version'), true);
|
305 |
|
460 |
|
461 |
add_option('ecwid_use_new_horizontal_categories', 'Y');
|
462 |
add_option('ecwid_use_new_search', 'Y');
|
463 |
+
|
464 |
} elseif ($upgrade) {
|
465 |
|
466 |
ecwid_plugin_add_oauth();
|
485 |
add_option( 'ecwid_support_email', 'wordpress@ecwid.com' );
|
486 |
}
|
487 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
if (ecwid_migrations_is_original_plugin_version_older_than('4.4.5')) {
|
489 |
add_option('ecwid_enable_sso');
|
490 |
}
|
491 |
+
|
492 |
+
|
493 |
+
add_option('ecwid_chameleon_colors_foreground', '');
|
494 |
+
add_option('ecwid_chameleon_colors_background', '');
|
495 |
+
add_option('ecwid_chameleon_colors_link', '');
|
496 |
+
add_option('ecwid_chameleon_colors_button', '');
|
497 |
+
add_option('ecwid_chameleon_colors_price', '');
|
498 |
}
|
499 |
}
|
500 |
|
1034 |
{
|
1035 |
$version = get_option('ecwid_plugin_version');
|
1036 |
|
1037 |
+
$shortcode_content = ecwid_get_scriptjs_code(@$attrs['lang'])
|
1038 |
+
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>";
|
1039 |
+
|
1040 |
+
$shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
|
1041 |
+
. $shortcode_content
|
1042 |
+
. "<!-- END Ecwid Shopping Cart v $version -->";
|
1043 |
+
|
1044 |
+
return apply_filters('ecwid_shortcode_content', $shortcode_content);
|
1045 |
}
|
1046 |
|
1047 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
1459 |
exit();
|
1460 |
}
|
1461 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1462 |
function ecwid_store_activate() {
|
1463 |
|
1464 |
if (get_option('ecwid_store_id', null) === null) {
|
1636 |
Ecwid_Kissmetrics::record('wpPluginUninstalled');
|
1637 |
}
|
1638 |
|
1639 |
+
function ecwid_is_old_search_widget_used()
|
1640 |
+
{
|
1641 |
+
if (get_option('ecwid_use_new_search')) {
|
1642 |
+
return false;
|
1643 |
+
}
|
1644 |
+
|
1645 |
+
if (Ecwid_Widget_Search::is_active_widget()) {
|
1646 |
+
return true;
|
1647 |
+
}
|
1648 |
+
|
1649 |
+
$widgets = ecwid_get_store_shortcode_widgets();
|
1650 |
+
if (in_array('search', $widgets)) {
|
1651 |
+
return true;
|
1652 |
+
}
|
1653 |
+
|
1654 |
+
return false;
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
function ecwid_is_old_cats_widget_used()
|
1658 |
+
{
|
1659 |
+
if (get_option('ecwid_use_new_horizontal_categories')) {
|
1660 |
+
return false;
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
$widgets = ecwid_get_store_shortcode_widgets();
|
1664 |
+
if (in_array('categories', $widgets)) {
|
1665 |
+
return true;
|
1666 |
+
}
|
1667 |
+
|
1668 |
+
return false;
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
|
1672 |
+
function ecwid_get_store_shortcode_widgets()
|
1673 |
+
{
|
1674 |
+
if (get_option('ecwid_use_new_horizontal_categories') && get_option('ecwid_use_new_search')) return false;
|
1675 |
+
|
1676 |
+
$page_contents = get_post(ecwid_get_current_store_page_id())->post_content;
|
1677 |
+
$shortcodes = ecwid_find_shortcodes($page_contents, 'ecwid');
|
1678 |
+
if (!$shortcodes) {
|
1679 |
+
return null;
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
$shortcode = $shortcodes[0];
|
1683 |
+
$attributes = shortcode_parse_atts($shortcode[3]);
|
1684 |
+
|
1685 |
+
if (!isset($attributes['widgets'])) {
|
1686 |
+
return null;
|
1687 |
+
}
|
1688 |
+
|
1689 |
+
return explode(' ', $attributes['widgets']);
|
1690 |
+
}
|
1691 |
+
|
1692 |
function ecwid_abs_intval($value) {
|
1693 |
if (!is_null($value))
|
1694 |
return abs(intval($value));
|
2345 |
return $store_id;
|
2346 |
}
|
2347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2348 |
function ecwid_save_post($post_id)
|
2349 |
{
|
2350 |
// If primary or auto store page gets updated
|
includes/class-ecwid-integration-autoptimize.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ecwid_Integration_Autoptimize
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
|
8 |
+
|
9 |
+
add_filter( 'autoptimize_filter_js_movelast', array( $this, 'hook_js_movelast' ) );
|
10 |
+
add_filter( 'autoptimize_filter_js_exclude', array( $this, 'hook_js_exclude' ) );
|
11 |
+
}
|
12 |
+
|
13 |
+
public function ecwid_shortcode_content($content) {
|
14 |
+
return '<!-- noptimize -->' . $content . '<!-- /noptimize -->';
|
15 |
+
}
|
16 |
+
|
17 |
+
public function hook_js_movelast($scripts) {
|
18 |
+
if ((bool)get_option('ecwid_use_chameleon')) {
|
19 |
+
$scripts[] = 'chameleon.js';
|
20 |
+
}
|
21 |
+
|
22 |
+
return $scripts;
|
23 |
+
}
|
24 |
+
|
25 |
+
public function hook_js_exclude($exclude) {
|
26 |
+
$code = ecwid_get_search_js_code();
|
27 |
+
return $exclude . ", $code";
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
$ecwid_integration_autoptimize = new Ecwid_Integration_Autoptimize();
|
includes/class-ecwid-message-manager.php
CHANGED
@@ -54,6 +54,24 @@ TXT
|
|
54 |
return $message;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
public static function show_message($name, $params = array())
|
58 |
{
|
59 |
$mm = self::get_instance();
|
@@ -238,6 +256,13 @@ TXT
|
|
238 |
'primary_title' => __( 'Install the Ecwid theme', 'ecwid-shopping-cart' ),
|
239 |
'primary_url' => 'admin.php?page=ecwid-install-theme',
|
240 |
'hideable' => true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
)
|
242 |
);
|
243 |
}
|
@@ -294,9 +319,11 @@ TXT
|
|
294 |
|
295 |
return $result;
|
296 |
|
297 |
-
case "
|
298 |
-
return
|
299 |
|
|
|
|
|
300 |
$install_date = ecwid_get_wp_install_date();
|
301 |
$theme = ecwid_get_theme_identification();
|
302 |
|
@@ -330,4 +357,4 @@ TXT
|
|
330 |
}
|
331 |
}
|
332 |
|
333 |
-
}
|
54 |
return $message;
|
55 |
}
|
56 |
|
57 |
+
public static function get_upgrade_search_and_cats_message() {
|
58 |
+
$is_old_search = ecwid_is_old_search_widget_used();
|
59 |
+
$is_old_categories = ecwid_is_old_cats_widget_used();
|
60 |
+
|
61 |
+
$main_message = __( 'Updated %s widgets are available for your Ecwid store. They are more mobile friendly and look better. Please enable them on the plugin settings page and check how they work in your store. The new widgets will be enabled automatically for all users in one of the upcoming plugin versions. ', 'ecwid-shopping-cart' );
|
62 |
+
|
63 |
+
$widgets = '';
|
64 |
+
if ($is_old_search && $is_old_categories) {
|
65 |
+
$widgets = _x( 'Search and Categories', 'upgrade widgets_message', 'ecwid-shopping-cart' );
|
66 |
+
} else if ( $is_old_search ) {
|
67 |
+
$widgets = _x( 'Search', 'upgrade widgets_message', 'ecwid-shopping-cart' );
|
68 |
+
} else if ( $is_old_categories ) {
|
69 |
+
$widgets = _x( 'Categories', 'upgrade widgets_message', 'ecwid-shopping-cart' );
|
70 |
+
}
|
71 |
+
|
72 |
+
return sprintf($main_message, $widgets);
|
73 |
+
}
|
74 |
+
|
75 |
public static function show_message($name, $params = array())
|
76 |
{
|
77 |
$mm = self::get_instance();
|
256 |
'primary_title' => __( 'Install the Ecwid theme', 'ecwid-shopping-cart' ),
|
257 |
'primary_url' => 'admin.php?page=ecwid-install-theme',
|
258 |
'hideable' => true
|
259 |
+
),
|
260 |
+
|
261 |
+
'upgrade_search_and_cats' => array(
|
262 |
+
'message' => Ecwid_Message_Manager::get_upgrade_search_and_cats_message(),
|
263 |
+
'hideable' => true,
|
264 |
+
'primary_title' => __ ( 'Open Ecwid store settings', 'ecwid-shopping-cart' ),
|
265 |
+
'primary_url' => 'admin.php?page=ecwid-advanced'
|
266 |
)
|
267 |
);
|
268 |
}
|
319 |
|
320 |
return $result;
|
321 |
|
322 |
+
case "upgrade_search_and_cats":
|
323 |
+
return ecwid_is_old_cats_widget_used() || ecwid_is_old_search_widget_used();
|
324 |
|
325 |
+
case "install_ecwid_theme":
|
326 |
+
return false;
|
327 |
$install_date = ecwid_get_wp_install_date();
|
328 |
$theme = ecwid_get_theme_identification();
|
329 |
|
357 |
}
|
358 |
}
|
359 |
|
360 |
+
}
|
includes/class-ecwid-store-editor.php
CHANGED
@@ -16,8 +16,8 @@ class Ecwid_Store_Editor {
|
|
16 |
public function init()
|
17 |
{
|
18 |
$current_screen = get_current_screen();
|
19 |
-
|
20 |
-
if ($current_screen->base != 'post') {
|
21 |
return;
|
22 |
}
|
23 |
|
16 |
public function init()
|
17 |
{
|
18 |
$current_screen = get_current_screen();
|
19 |
+
|
20 |
+
if ( $current_screen->base != 'post' || !in_array($current_screen->post_type, array('post', 'page')) ) {
|
21 |
return;
|
22 |
}
|
23 |
|
includes/shortcodes/class-ecwid-shortcode-base.php
CHANGED
@@ -29,10 +29,14 @@ abstract class Ecwid_Shortcode_Base {
|
|
29 |
public function wrap_code($code) {
|
30 |
|
31 |
$version = get_option('ecwid_plugin_version');
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
public function render() {
|
29 |
public function wrap_code($code) {
|
30 |
|
31 |
$version = get_option('ecwid_plugin_version');
|
32 |
+
|
33 |
+
$shortcode_content = ecwid_get_scriptjs_code($this->_lang) . $code;
|
34 |
+
|
35 |
+
$shortcode_content = "<!-- Ecwid shopping cart plugin v $version -->"
|
36 |
+
. $shortcode_content
|
37 |
+
. "<!-- END Ecwid Shopping Cart v $version -->";
|
38 |
+
|
39 |
+
return apply_filters('ecwid_shortcode_content', $shortcode_content);
|
40 |
}
|
41 |
|
42 |
public function render() {
|
includes/shortcodes/class-ecwid-shortcode-productbrowser.php
CHANGED
@@ -56,7 +56,7 @@ class Ecwid_Shortcode_ProductBrowser extends Ecwid_Shortcode_Base {
|
|
56 |
|
57 |
} else {
|
58 |
$id = intval($this->_get_param_default_category_id($params));
|
59 |
-
$plain_content = $catalog->get_category();
|
60 |
if (empty($plain_content)) {
|
61 |
$plain_content = $catalog->get_category(0);
|
62 |
} else {
|
@@ -166,4 +166,4 @@ HTML;
|
|
166 |
|
167 |
return $ecwid_default_category_id;
|
168 |
}
|
169 |
-
}
|
56 |
|
57 |
} else {
|
58 |
$id = intval($this->_get_param_default_category_id($params));
|
59 |
+
$plain_content = $catalog->get_category($id);
|
60 |
if (empty($plain_content)) {
|
61 |
$plain_content = $catalog->get_category(0);
|
62 |
} else {
|
166 |
|
167 |
return $ecwid_default_category_id;
|
168 |
}
|
169 |
+
}
|
includes/themes.php
CHANGED
@@ -53,7 +53,7 @@ function ecwid_apply_theme($theme_name = null)
|
|
53 |
'zerif-lite' => array( 'css-no-parent' ),
|
54 |
'storefront' => array( 'css' ),
|
55 |
'salient' => array( 'css-no-parent'),
|
56 |
-
'flora' => array('js')
|
57 |
);
|
58 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
59 |
|
@@ -66,10 +66,11 @@ function ecwid_apply_theme($theme_name = null)
|
|
66 |
'twentysixteen',
|
67 |
'central',
|
68 |
'mfupdate',
|
69 |
-
'trend'
|
|
|
70 |
);
|
71 |
-
$custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
|
72 |
|
|
|
73 |
|
74 |
if (empty($theme_name)) {
|
75 |
$theme_name = ecwid_get_theme_identification();
|
53 |
'zerif-lite' => array( 'css-no-parent' ),
|
54 |
'storefront' => array( 'css' ),
|
55 |
'salient' => array( 'css-no-parent'),
|
56 |
+
'flora' => array('js'),
|
57 |
);
|
58 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
59 |
|
66 |
'twentysixteen',
|
67 |
'central',
|
68 |
'mfupdate',
|
69 |
+
'trend',
|
70 |
+
'Boundless'
|
71 |
);
|
|
|
72 |
|
73 |
+
$custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
|
74 |
|
75 |
if (empty($theme_name)) {
|
76 |
$theme_name = ecwid_get_theme_identification();
|
includes/themes/class-ecwid-theme-boundless.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
|
4 |
+
|
5 |
+
class Ecwid_Theme_Boundless extends Ecwid_Theme_Base
|
6 |
+
{
|
7 |
+
protected $name = 'Boundless';
|
8 |
+
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
parent::__construct();
|
12 |
+
|
13 |
+
add_filter( 'ecwid_page_has_product_browser', array( $this, 'has_product_browser' ) );
|
14 |
+
}
|
15 |
+
|
16 |
+
public function has_product_browser( $value )
|
17 |
+
{
|
18 |
+
if ( $value ) {
|
19 |
+
return $value;
|
20 |
+
}
|
21 |
+
|
22 |
+
$meta = get_post_meta( get_the_ID(), '_witty_builder_data' );
|
23 |
+
|
24 |
+
if ( is_array( $meta ) ) {
|
25 |
+
$meta = serialize( $meta );
|
26 |
+
|
27 |
+
// not exactly the intended usage, but quite simple and still works
|
28 |
+
// $meta is a serialized array that has the actual content
|
29 |
+
// a right way is to walk through the structure and run has_shortcode against all fields
|
30 |
+
$result = ecwid_content_has_productbrowser($meta);
|
31 |
+
}
|
32 |
+
|
33 |
+
return $result;
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
$ecwid_current_theme = new Ecwid_Theme_Boundless();
|
includes/themes/class-ecwid-theme-trend.php
CHANGED
@@ -12,6 +12,11 @@ class Ecwid_Theme_Trend extends Ecwid_Theme_Base
|
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
add_filter('ecwid_disable_widgets', '__return_true');
|
16 |
add_filter('ecwid_shortcode_custom_renderer', array($this, 'get_custom_renderer'));
|
17 |
add_filter('the_content', array($this, 'add_shortcodes'));
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
15 |
+
// That actually means that ajax loading is disabled. Really ambigious naming
|
16 |
+
if (!BW::get_option('disable_ajax_loading')) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
add_filter('ecwid_disable_widgets', '__return_true');
|
21 |
add_filter('ecwid_shortcode_custom_renderer', array($this, 'get_custom_renderer'));
|
22 |
add_filter('the_content', array($this, 'add_shortcodes'));
|
includes/widgets/class-ecwid-widget-search.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
class Ecwid_Widget_Search extends WP_Widget {
|
3 |
|
|
|
|
|
|
|
|
|
4 |
function __construct() {
|
5 |
$widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __("Displays a simple search box for your customers to find a product in your storex", 'ecwid-shopping-cart'));
|
6 |
parent::__construct('ecwidsearch', __('Product Search', 'ecwid-shopping-cart'), $widget_ops);
|
1 |
<?php
|
2 |
class Ecwid_Widget_Search extends WP_Widget {
|
3 |
|
4 |
+
static public function is_active_widget() {
|
5 |
+
return is_active_widget(false, false, 'ecwidsearch');
|
6 |
+
}
|
7 |
+
|
8 |
function __construct() {
|
9 |
$widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __("Displays a simple search box for your customers to find a product in your storex", 'ecwid-shopping-cart'));
|
10 |
parent::__construct('ecwidsearch', __('Product Search', 'ecwid-shopping-cart'), $widget_ops);
|
js/chameleon.js
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
document.cookie = 'enable_chameleon=true';
|
2 |
-
|
3 |
window.ec = {
|
4 |
config: {
|
5 |
chameleon: ecwidChameleon
|
|
|
|
|
1 |
window.ec = {
|
2 |
config: {
|
3 |
chameleon: ecwidChameleon
|
languages/ecwid-shopping-cart-ru_RU.mo
CHANGED
Binary file
|
languages/ecwid-shopping-cart-ru_RU.po
CHANGED
@@ -712,6 +712,20 @@ msgstr "Чтобы плагин автоматически объединял у
|
|
712 |
msgid "To make sure your customer can actually log in to your site and store, enable registration in the <a %s>site settings</a>"
|
713 |
msgstr "Чтобы покупатели смогли регистрироваться, убедитесь, что регистрация включена в <a %s>настройках сайта</a>"
|
714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
715 |
msgid "https://www.ecwid.com/forums"
|
716 |
msgstr "https://www.ecwid.com/forums/forumdisplay.php?f=10"
|
717 |
|
712 |
msgid "To make sure your customer can actually log in to your site and store, enable registration in the <a %s>site settings</a>"
|
713 |
msgstr "Чтобы покупатели смогли регистрироваться, убедитесь, что регистрация включена в <a %s>настройках сайта</a>"
|
714 |
|
715 |
+
msgid "Updated %s widgets are available for your Ecwid store. They are more mobile friendly and look better. Please enable them on the plugin settings page and check how they work in your store. The new widgets will be enabled automatically for all users in one of the upcoming plugin versions."
|
716 |
+
msgstr "Блоки %s в вашем Эквид-магазине обновлены – теперь они выглядят приятнее и лучше работают на мобильных. Пожалуйста, включите новый вид блоков поиска и категорий на странице настроек плагина. В одном следующих обновлений плагина они будут включены автоматически для всех пользователей."
|
717 |
+
|
718 |
+
msgctxt "upgrade widgets message"
|
719 |
+
msgid "Search"
|
720 |
+
msgstr "Поиска"
|
721 |
+
|
722 |
+
msgctxt "upgrade widgets message"
|
723 |
+
msgid "Categories"
|
724 |
+
msgstr "Категорий"
|
725 |
+
|
726 |
+
msgid "Search and Categories"
|
727 |
+
msgstr "Поиска и Категорий"
|
728 |
+
|
729 |
msgid "https://www.ecwid.com/forums"
|
730 |
msgstr "https://www.ecwid.com/forums/forumdisplay.php?f=10"
|
731 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ecwid
|
|
3 |
Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 4.
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
@@ -149,6 +149,11 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
149 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
150 |
|
151 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
152 |
= 4.6.3 =
|
153 |
- Fixes infinite loading issue that occurred under certain store configurations.
|
154 |
|
3 |
Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 4.7
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Bank level PCI DSS Level 1 security. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
149 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
150 |
|
151 |
== Changelog ==
|
152 |
+
= 4.7 =
|
153 |
+
- Fixed a layout issue in the floating cart widget in the "Mobius" WordPress theme.
|
154 |
+
- Fixed a few issues with the Single Sign On functionality in the plugin.
|
155 |
+
- Improvements for compatibility with GravityView plugin. You can use that plugin and Ecwid ecommerce shopping cart together – they should work with no issues.
|
156 |
+
|
157 |
= 4.6.3 =
|
158 |
- Fixes infinite loading issue that occurred under certain store configurations.
|
159 |
|
templates/advanced-settings.php
CHANGED
@@ -1,7 +1,8 @@
|
|
|
|
|
|
1 |
<div class="wrap">
|
2 |
<form class="pure-form pure-form-aligned ecwid-settings advanced-settings" method="POST" action="options.php">
|
3 |
|
4 |
-
<h2><?php _e('Ecwid Shopping Cart — Advanced settings', 'ecwid-shopping-cart'); ?></h2>
|
5 |
|
6 |
<?php settings_fields('ecwid_options_page'); ?>
|
7 |
<input type="hidden" name="settings_section" value="advanced" />
|
@@ -140,9 +141,10 @@
|
|
140 |
</div>
|
141 |
</div>
|
142 |
|
143 |
-
|
|
|
144 |
|
145 |
-
<div class="pure-control-group checkbox
|
146 |
<div class="label">
|
147 |
<label for="ecwid_use_new_search">
|
148 |
|
@@ -167,6 +169,7 @@
|
|
167 |
</div>
|
168 |
</div>
|
169 |
</div>
|
|
|
170 |
|
171 |
</fieldset>
|
172 |
|
1 |
+
<h2><?php _e('Ecwid Shopping Cart — Advanced settings', 'ecwid-shopping-cart'); ?></h2>
|
2 |
+
|
3 |
<div class="wrap">
|
4 |
<form class="pure-form pure-form-aligned ecwid-settings advanced-settings" method="POST" action="options.php">
|
5 |
|
|
|
6 |
|
7 |
<?php settings_fields('ecwid_options_page'); ?>
|
8 |
<input type="hidden" name="settings_section" value="advanced" />
|
141 |
</div>
|
142 |
</div>
|
143 |
|
144 |
+
<?php if (ecwid_migrations_is_original_plugin_version_older_than('4.1.3.1') || get_option('ecwid_use_new_horizontal_categories') != 'Y'): ?>
|
145 |
+
<hr />
|
146 |
|
147 |
+
<div class="pure-control-group checkbox">
|
148 |
<div class="label">
|
149 |
<label for="ecwid_use_new_search">
|
150 |
|
169 |
</div>
|
170 |
</div>
|
171 |
</div>
|
172 |
+
<?php endif; ?>
|
173 |
|
174 |
</fieldset>
|
175 |
|
templates/appearance-settings.php
CHANGED
@@ -1,8 +1,8 @@
|
|
|
|
|
|
1 |
<div class="wrap">
|
2 |
<form class="pure-form pure-form-aligned ecwid-settings appearance-settings" method="POST" action="options.php">
|
3 |
|
4 |
-
<h2><?php _e('Ecwid Shopping Cart — Appearance settings', 'ecwid-shopping-cart'); ?></h2>
|
5 |
-
|
6 |
<?php settings_fields('ecwid_options_page'); ?>
|
7 |
<input type="hidden" name="settings_section" value="appearance" />
|
8 |
|
1 |
+
<h2><?php _e('Ecwid Shopping Cart — Appearance settings', 'ecwid-shopping-cart'); ?></h2>
|
2 |
+
|
3 |
<div class="wrap">
|
4 |
<form class="pure-form pure-form-aligned ecwid-settings appearance-settings" method="POST" action="options.php">
|
5 |
|
|
|
|
|
6 |
<?php settings_fields('ecwid_options_page'); ?>
|
7 |
<input type="hidden" name="settings_section" value="appearance" />
|
8 |
|