Version Description
- Sep 11, 2019 =
- Improvements for the "Store page speedup" feature.
- Fixed update date synchronization of goods for the "Integrate with the site search" tool.
- Minor fixes and improvements.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 6.8.6 |
Comparing to | |
See all releases |
Code changes from version 6.8.5 to 6.8.6
- ecwid-shopping-cart.php +7 -2
- includes/class-ecwid-message-manager.php +1 -1
- includes/class-ecwid-seo-links.php +5 -0
- includes/class-ecwid-static-page.php +1 -1
- includes/gutenberg/class-ecwid-gutenberg-block-store.php +7 -3
- includes/shortcodes/class-ecwid-shortcode-minicart.php +2 -1
- js/static-page.js +49 -5
- languages/ecwid-shopping-cart-ru_RU-ecwid-gutenberg-store.json +1 -1
- lib/ecwid_product_api.php +73 -0
- readme.txt +6 -1
- templates/sync.php +1 -0
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 Ecommerce
|
8 |
-
Version: 6.8.
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
@@ -971,7 +971,12 @@ function ecwid_admin_check_api_cache()
|
|
971 |
|
972 |
$last_cache = get_option( 'ecwid_last_api_cache_check' );
|
973 |
|
974 |
-
if
|
|
|
|
|
|
|
|
|
|
|
975 |
Ecwid_Api_V3::reset_api_status();
|
976 |
}
|
977 |
|
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 Ecommerce
|
8 |
+
Version: 6.8.6
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
971 |
|
972 |
$last_cache = get_option( 'ecwid_last_api_cache_check' );
|
973 |
|
974 |
+
if( Ecwid_Api_V3::get_api_status() == Ecwid_Api_V3::API_STATUS_OK )
|
975 |
+
$check_time_period = 5 * MINUTE_IN_SECONDS;
|
976 |
+
else
|
977 |
+
$check_time_period = MINUTE_IN_SECONDS;
|
978 |
+
|
979 |
+
if ( time() - $last_cache > $check_time_period ) {
|
980 |
Ecwid_Api_V3::reset_api_status();
|
981 |
}
|
982 |
|
includes/class-ecwid-message-manager.php
CHANGED
@@ -278,7 +278,7 @@ HTML
|
|
278 |
<<<HTML
|
279 |
<b>What happened:</b> This WordPress site doesn't seem to be able to connect to the %1\$s servers. Your store is working and your products can be purchased from your site, but some features are disabled, including SEO, product sidebar widgets, advanced site menu and store navigation. The %1\$s plugin tries to reach the %1\$s APIs at our servers and cannot do that as your server blocks those requests for some reason.
|
280 |
<br /><br />
|
281 |
-
<b>How to fix:</b>
|
282 |
HTML
|
283 |
, 'ecwid-shopping-cart' ),
|
284 |
Ecwid_Config::get_brand(),
|
278 |
<<<HTML
|
279 |
<b>What happened:</b> This WordPress site doesn't seem to be able to connect to the %1\$s servers. Your store is working and your products can be purchased from your site, but some features are disabled, including SEO, product sidebar widgets, advanced site menu and store navigation. The %1\$s plugin tries to reach the %1\$s APIs at our servers and cannot do that as your server blocks those requests for some reason.
|
280 |
<br /><br />
|
281 |
+
<b>How to fix:</b> Refresh this page after a few minutes. If this message does not disappear, then the problem is likely caused by your server misconfiguration and can be fixed by your hosting provider. In particular, the CURL module can be disabled in your PHP config or a firewall might block requests to our servers. Please send this message to your hosting provider and ask them to check it for you. If this doesn't help, please contact us at <a target="_blank" href="%2\$s">%2\$s</a>.
|
282 |
HTML
|
283 |
, 'ecwid-shopping-cart' ),
|
284 |
Ecwid_Config::get_brand(),
|
includes/class-ecwid-seo-links.php
CHANGED
@@ -210,6 +210,11 @@ class Ecwid_Seo_Links {
|
|
210 |
|
211 |
$url = esc_js( get_permalink( $page_id ) );
|
212 |
|
|
|
|
|
|
|
|
|
|
|
213 |
$result = <<<JS
|
214 |
window.ec.config.storefrontUrls = window.ec.config.storefrontUrls || {};
|
215 |
window.ec.config.storefrontUrls.cleanUrls = true;
|
210 |
|
211 |
$url = esc_js( get_permalink( $page_id ) );
|
212 |
|
213 |
+
|
214 |
+
if( parse_url($url, PHP_URL_SCHEME) == 'https' && parse_url($url, PHP_URL_PORT) == '443' ) {
|
215 |
+
$url = str_replace( ':443', '', $url );
|
216 |
+
}
|
217 |
+
|
218 |
$result = <<<JS
|
219 |
window.ec.config.storefrontUrls = window.ec.config.storefrontUrls || {};
|
220 |
window.ec.config.storefrontUrls.cleanUrls = true;
|
includes/class-ecwid-static-page.php
CHANGED
@@ -297,7 +297,7 @@ class Ecwid_Static_Page {
|
|
297 |
return false;
|
298 |
}
|
299 |
|
300 |
-
if ( get_option( self::OPTION_IS_ENABLED ) == ''
|
301 |
return true;
|
302 |
}
|
303 |
|
297 |
return false;
|
298 |
}
|
299 |
|
300 |
+
if ( get_option( self::OPTION_IS_ENABLED ) == '' ) {
|
301 |
return true;
|
302 |
}
|
303 |
|
includes/gutenberg/class-ecwid-gutenberg-block-store.php
CHANGED
@@ -106,9 +106,13 @@ HTML;
|
|
106 |
$attribute['is_storefront_api'] = true;
|
107 |
|
108 |
$api = new Ecwid_Api_V3();
|
109 |
-
$settings = $api->get_store_profile()
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
}
|
114 |
|
106 |
$attribute['is_storefront_api'] = true;
|
107 |
|
108 |
$api = new Ecwid_Api_V3();
|
109 |
+
$settings = $api->get_store_profile();
|
110 |
+
|
111 |
+
if( $settings ){
|
112 |
+
$design_settings = $settings->designSettings;
|
113 |
+
$value = isset( $params['show_description_under_image'] ) ? !$params['show_description_under_image'] : $design_settings->$name;
|
114 |
+
$attribute['profile_default'] = $design_settings->$name;
|
115 |
+
}
|
116 |
}
|
117 |
}
|
118 |
|
includes/shortcodes/class-ecwid-shortcode-minicart.php
CHANGED
@@ -57,7 +57,8 @@ class Ecwid_Shortcode_Minicart extends Ecwid_Shortcode_Base {
|
|
57 |
return $default_render;
|
58 |
}
|
59 |
|
60 |
-
|
|
|
61 |
$default_render .= '<style>#static-ec-store { padding-top: 40px; }</style>';
|
62 |
}
|
63 |
|
57 |
return $default_render;
|
58 |
}
|
59 |
|
60 |
+
$has_minicart = (strpos($default_render, 'xMinicart') !== false);
|
61 |
+
if ( $has_minicart && Ecwid_Static_Page::is_enabled_static_home_page() && Ecwid_Static_Page::is_feature_available() ) {
|
62 |
$default_render .= '<style>#static-ec-store { padding-top: 40px; }</style>';
|
63 |
}
|
64 |
|
js/static-page.js
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
var autoSwitchStaticToDynamicWhenReadyDefault = false;
|
9 |
var invisibleDynamicContainerStyle = "display: block !important; height: 0 !important; max-height: 0 !important; min-height: 0 !important; overflow-y: auto !important;";
|
10 |
var mainCategoryId = 0;
|
|
|
11 |
|
12 |
function find(selector) {
|
13 |
return document.querySelector(selector);
|
@@ -78,6 +79,10 @@
|
|
78 |
autoSwitchStaticToDynamicWhenReady = autoSwitchStaticToDynamicWhenReadyDefault;
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
81 |
hideStorefront();
|
82 |
showStaticHtml();
|
83 |
|
@@ -99,8 +104,8 @@
|
|
99 |
|
100 |
function setupAfterEcwidLoaded() {
|
101 |
|
102 |
-
//
|
103 |
-
//
|
104 |
Ecwid.OnAPILoaded.add(function () {
|
105 |
var storeClosed = window.ecwid_initial_data.data.storeClosed;
|
106 |
var storeClosedWrapper = document.querySelectorAll('.ecwid-maintenance-wrapper');
|
@@ -137,14 +142,14 @@
|
|
137 |
}
|
138 |
|
139 |
if (autoSwitchStaticToDynamicWhenReady) {
|
140 |
-
|
141 |
return;
|
142 |
}
|
143 |
|
144 |
if (!ecwidPageOpened
|
145 |
&& openedPage.type === "CATEGORY"
|
146 |
&& openedPage.categoryId === mainCategoryId
|
147 |
-
&& openedPage.offset ===
|
148 |
|
149 |
// we don't need to dispatch root category loading,
|
150 |
// since our static contents covers it for the first time
|
@@ -156,6 +161,44 @@
|
|
156 |
});
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
function ecwidLoaded() {
|
160 |
return !!Ecwid && !!Ecwid.OnAPILoaded && !!Ecwid.OnAPILoaded.add;
|
161 |
}
|
@@ -247,9 +290,10 @@
|
|
247 |
});
|
248 |
|
249 |
addClickHandlers('#' + staticId + ' .pager__button', function (element) {
|
|
|
250 |
addStaticClickEvent(element, openEcwidPage('category', {
|
251 |
'id': mainCategoryId,
|
252 |
-
'page':
|
253 |
}));
|
254 |
});
|
255 |
|
8 |
var autoSwitchStaticToDynamicWhenReadyDefault = false;
|
9 |
var invisibleDynamicContainerStyle = "display: block !important; height: 0 !important; max-height: 0 !important; min-height: 0 !important; overflow-y: auto !important;";
|
10 |
var mainCategoryId = 0;
|
11 |
+
var initialCategoryOffset = 0;
|
12 |
|
13 |
function find(selector) {
|
14 |
return document.querySelector(selector);
|
79 |
autoSwitchStaticToDynamicWhenReady = autoSwitchStaticToDynamicWhenReadyDefault;
|
80 |
}
|
81 |
|
82 |
+
if (ec.storefront.staticPages.initialCategoryOffset) {
|
83 |
+
initialCategoryOffset = ec.storefront.staticPages.initialCategoryOffset;
|
84 |
+
}
|
85 |
+
|
86 |
hideStorefront();
|
87 |
showStaticHtml();
|
88 |
|
104 |
|
105 |
function setupAfterEcwidLoaded() {
|
106 |
|
107 |
+
// еÑли магазин не закрыт Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð°, то в storeClosed не будет true
|
108 |
+
// еÑли магазин не закрыт Ð´Ð»Ñ ÐºÐ»Ð¸ÐµÐ½Ñ‚Ð° и мы загрузили закрытую плашку проверим Ñто в динамике
|
109 |
Ecwid.OnAPILoaded.add(function () {
|
110 |
var storeClosed = window.ecwid_initial_data.data.storeClosed;
|
111 |
var storeClosedWrapper = document.querySelectorAll('.ecwid-maintenance-wrapper');
|
142 |
}
|
143 |
|
144 |
if (autoSwitchStaticToDynamicWhenReady) {
|
145 |
+
switchToDynamicWhenReadyWithRetries(10);
|
146 |
return;
|
147 |
}
|
148 |
|
149 |
if (!ecwidPageOpened
|
150 |
&& openedPage.type === "CATEGORY"
|
151 |
&& openedPage.categoryId === mainCategoryId
|
152 |
+
&& openedPage.offset === initialCategoryOffset) {
|
153 |
|
154 |
// we don't need to dispatch root category loading,
|
155 |
// since our static contents covers it for the first time
|
161 |
});
|
162 |
}
|
163 |
|
164 |
+
function switchToDynamicWhenReadyWithRetries(retry) {
|
165 |
+
if (retry <= 0) {
|
166 |
+
switchToDynamicMode();
|
167 |
+
return;
|
168 |
+
}
|
169 |
+
|
170 |
+
var allImagesLoaded = allImagesLoadedInDynamicMarkup();
|
171 |
+
if (!allImagesLoaded) {
|
172 |
+
setTimeout(function () {
|
173 |
+
switchToDynamicWhenReadyWithRetries(retry - 1);
|
174 |
+
}, 100);
|
175 |
+
return
|
176 |
+
}
|
177 |
+
|
178 |
+
switchToDynamicMode();
|
179 |
+
}
|
180 |
+
|
181 |
+
function allImagesLoadedInDynamicMarkup() {
|
182 |
+
if (!dynamicId) {
|
183 |
+
return true;
|
184 |
+
}
|
185 |
+
|
186 |
+
try {
|
187 |
+
var firstNotLoadedCategory = document.querySelector('#' + dynamicId + ' .grid-category--loading');
|
188 |
+
if (firstNotLoadedCategory != null) {
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
var firstNotLoadedProduct = document.querySelector('#' + dynamicId + ' .grid-product--loading');
|
193 |
+
if (firstNotLoadedProduct != null) {
|
194 |
+
return false;
|
195 |
+
}
|
196 |
+
} catch (e) {
|
197 |
+
}
|
198 |
+
|
199 |
+
return true;
|
200 |
+
}
|
201 |
+
|
202 |
function ecwidLoaded() {
|
203 |
return !!Ecwid && !!Ecwid.OnAPILoaded && !!Ecwid.OnAPILoaded.add;
|
204 |
}
|
290 |
});
|
291 |
|
292 |
addClickHandlers('#' + staticId + ' .pager__button', function (element) {
|
293 |
+
var pageNumber = element.getAttribute('data-page-number') || 2;
|
294 |
addStaticClickEvent(element, openEcwidPage('category', {
|
295 |
'id': mainCategoryId,
|
296 |
+
'page': pageNumber
|
297 |
}));
|
298 |
});
|
299 |
|
languages/ecwid-shopping-cart-ru_RU-ecwid-gutenberg-store.json
CHANGED
@@ -41,7 +41,7 @@
|
|
41 |
"Set manually": ["Выставить вручную"],
|
42 |
"Shopping Cart Icon": ["Иконка корзины"],
|
43 |
"Display shopping bag link and summary": ["Ссылка на корзину и количество товаров в корзине"],
|
44 |
-
"Product
|
45 |
"Display product with a buy button": ["Товар с кнопкой \"Купить\""],
|
46 |
"Displayed product": ["Выбранный товар"],
|
47 |
"gutenberg-product-block\u0004Content": ["Элементы виджета"],
|
41 |
"Set manually": ["Выставить вручную"],
|
42 |
"Shopping Cart Icon": ["Иконка корзины"],
|
43 |
"Display shopping bag link and summary": ["Ссылка на корзину и количество товаров в корзине"],
|
44 |
+
"Product card small": ["Карточка товара"],
|
45 |
"Display product with a buy button": ["Товар с кнопкой \"Купить\""],
|
46 |
"Displayed product": ["Выбранный товар"],
|
47 |
"gutenberg-product-block\u0004Content": ["Элементы виджета"],
|
lib/ecwid_product_api.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* This API is deprecated. Please use the official Ecwid API to extend your plugin functionality:
|
4 |
+
* https://developers.ecwid.com/api-documentation
|
5 |
+
* If you have any feedback on the Ecwid WordPress plugin or the Ecwid API, please contact us at plugins-feedback@ecwid.com
|
6 |
+
*/
|
7 |
+
|
8 |
+
_deprecated_file( basename( __FILE__ ), '6.8.1', 'the official API (https://developers.ecwid.com/api-documentation)' );
|
9 |
+
|
10 |
+
class EcwidProductApi {
|
11 |
+
|
12 |
+
function __construct($store_id) {
|
13 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
14 |
+
}
|
15 |
+
|
16 |
+
function get_request($url) {
|
17 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
18 |
+
}
|
19 |
+
|
20 |
+
function process_request($url) {
|
21 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
22 |
+
}
|
23 |
+
|
24 |
+
function get_all_categories() {
|
25 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
26 |
+
}
|
27 |
+
|
28 |
+
function get_subcategories_by_id($parent_category_id = 0) {
|
29 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
30 |
+
}
|
31 |
+
|
32 |
+
function get_all_products() {
|
33 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
34 |
+
}
|
35 |
+
|
36 |
+
function get_products_by_category_id($category_id = 0) {
|
37 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
38 |
+
}
|
39 |
+
|
40 |
+
function get_product($product_id) {
|
41 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
42 |
+
}
|
43 |
+
|
44 |
+
function get_product_https($product_id) {
|
45 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
46 |
+
}
|
47 |
+
|
48 |
+
function get_category($category_id) {
|
49 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
50 |
+
}
|
51 |
+
|
52 |
+
function get_batch_request($params) {
|
53 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
54 |
+
}
|
55 |
+
|
56 |
+
function get_random_products($count) {
|
57 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
58 |
+
}
|
59 |
+
|
60 |
+
function get_profile() {
|
61 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
62 |
+
}
|
63 |
+
|
64 |
+
function is_api_enabled() {
|
65 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
66 |
+
}
|
67 |
+
|
68 |
+
function get_method_response_stream($method) {
|
69 |
+
_deprecated_function( __FUNCTION__, '6.8.1' );
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ecwid
|
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.2
|
6 |
-
Stable tag: 6.8.
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
@@ -153,6 +153,11 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
153 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
154 |
|
155 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
156 |
= 6.8.5 - Jul 25, 2019 =
|
157 |
- **Improvements for the "Store page speedup" feature.** If you haven’t tried the store speedup tool yet, please feel free to do so on the Ecwid/Advanced setting page in your WordPress admin backend.
|
158 |
- **Several fixes and improvements for the "Import from WooCommerce" tool.**
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.2
|
6 |
+
Stable tag: 6.8.6
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
153 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
154 |
|
155 |
== Changelog ==
|
156 |
+
= 6.8.6 - Sep 11, 2019 =
|
157 |
+
- Improvements for the "Store page speedup" feature.
|
158 |
+
- Fixed update date synchronization of goods for the "Integrate with the site search" tool.
|
159 |
+
- Minor fixes and improvements.
|
160 |
+
|
161 |
= 6.8.5 - Jul 25, 2019 =
|
162 |
- **Improvements for the "Store page speedup" feature.** If you haven’t tried the store speedup tool yet, please feel free to do so on the Ecwid/Advanced setting page in your WordPress admin backend.
|
163 |
- **Several fixes and improvements for the "Import from WooCommerce" tool.**
|
templates/sync.php
CHANGED
@@ -32,6 +32,7 @@ function process_no_sse_sync(data) {
|
|
32 |
var processed_deletes = data.deleted + data.skipped_deleted;
|
33 |
|
34 |
if ( processed_updates + processed_deletes == 0 ) {
|
|
|
35 |
return do_no_sse_over();
|
36 |
}
|
37 |
|
32 |
var processed_deletes = data.deleted + data.skipped_deleted;
|
33 |
|
34 |
if ( processed_updates + processed_deletes == 0 ) {
|
35 |
+
jQuery('#sync-date').text( data.last_update );
|
36 |
return do_no_sse_over();
|
37 |
}
|
38 |
|