Version Description
- Oct 25, 2017 =
- Fixed an issue with custom store menu links. You can add store pages to the site menu under Appearance Menu in your WordPress site settings. Previously, these links might not work if you added them in the recent weeks. We now fixed it, they should work fine.
- Fixed an issue with the browser back button and the customer cart content. In some rare cases (when the Single Sign On tool is enabled), when a logged in store visitor clicked the back button in their browser, the cart content might be refreshed. We fixed that whether you have the customer Single Sign On enabled or not, the storefront, cart and checkout should work properly.
- Added compatibility with the Above The Fold Optimization plugin. You can use that plugin along with the Ecwid shopping cart, everything should work fine with no issues.
- Fixed a slight layout issue with the Optimizer theme. Product thumbnail pictures displayed improperly in that theme. Now they look OK.
- Added slight improvements and fixes for the admin backend layout.
- Ecwid is constantly updated with new cool ecommerce features and improvements. To see more updates and learn something new about selling online, see our blog.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 5.6.2 |
Comparing to | |
See all releases |
Code changes from version 5.6.1 to 5.6.2
- css/admin.css +3 -0
- css/optimizer.css +3 -0
- ecwid-shopping-cart.php +44 -28
- includes/class-ecwid-admin.php +1 -1
- includes/class-ecwid-ajax-defer-renderer.php +4 -1
- includes/class-ecwid-config.php +77 -8
- includes/class-ecwid-integration-above-the-fold.php +20 -0
- includes/class-ecwid-message-manager.php +16 -9
- includes/class-ecwid-nav-menus.php +4 -3
- includes/class-ecwid-oauth.php +9 -4
- includes/class-ecwid-seo-links.php +12 -1
- includes/class-ecwid-store-page.php +3 -1
- includes/themes.php +2 -1
- includes/themes/class-ecwid-theme-trend.php +4 -1
- js/products-list.js +0 -1
- languages/ecwid-shopping-cart-ru_RU.mo +0 -0
- languages/ecwid-shopping-cart-ru_RU.po +14 -10
- lib/ecwid_api_v3.php +6 -3
- lib/ecwid_platform.php +1 -1
- lib/ecwid_product_api.php +2 -2
- readme.txt +11 -3
- templates/admin-head.php +5 -0
- templates/advanced-settings.php +5 -5
- templates/connect.php +16 -8
- templates/dashboard.php +1 -1
- templates/landing.php +2 -2
- templates/reconnect-sso.php +1 -5
- templates/reconnect.php +2 -5
css/admin.css
CHANGED
@@ -27,6 +27,9 @@
|
|
27 |
margin-bottom: 30px;
|
28 |
}
|
29 |
|
|
|
|
|
|
|
30 |
#hide-vote-message {
|
31 |
text-decoration: underline;
|
32 |
cursor: pointer;
|
27 |
margin-bottom: 30px;
|
28 |
}
|
29 |
|
30 |
+
#ecwid-frame {
|
31 |
+
max-width: 1440px;
|
32 |
+
}
|
33 |
#hide-vote-message {
|
34 |
text-decoration: underline;
|
35 |
cursor: pointer;
|
css/optimizer.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
div.ecwid-productBrowser-productsList-thumbnail.ecwid-imgLoaded img {
|
2 |
+
max-width: none !important;
|
3 |
+
}
|
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: 5.6.
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
@@ -13,7 +13,6 @@ register_activation_hook( __FILE__, 'ecwid_store_activate' );
|
|
13 |
register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
|
14 |
register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
|
15 |
|
16 |
-
define("APP_ECWID_COM", 'app.ecwid.com');
|
17 |
define("ECWID_DEMO_STORE_ID", 1003);
|
18 |
define('ECWID_API_AVAILABILITY_CHECK_TIME', 60*60*3);
|
19 |
|
@@ -48,7 +47,6 @@ require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-product-popup.php';
|
|
48 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-oauth.php';
|
49 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-products.php';
|
50 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-config.php';
|
51 |
-
|
52 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-admin.php';
|
53 |
|
54 |
if ( is_admin() ) {
|
@@ -159,7 +157,8 @@ function ecwid_init_integrations()
|
|
159 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
160 |
'wpseo' => 'wordpress-seo/wp-seo.php',
|
161 |
'divibuilder' => 'divi-builder/divi-builder.php',
|
162 |
-
'autoptimize' => 'autoptimize/autoptimize.php'
|
|
|
163 |
);
|
164 |
|
165 |
foreach ($integrations as $key => $plugin) {
|
@@ -181,21 +180,6 @@ function ecwid_estimate_sync() {
|
|
181 |
|
182 |
$version = get_bloginfo('version');
|
183 |
|
184 |
-
function ecwid_add_breadcrumbs_navxt($trail)
|
185 |
-
{
|
186 |
-
$breadcrumb = new bcn_breadcrumb('Ecwid', '', '', 'http://ecwid.com');
|
187 |
-
$trail->add($breadcrumb);
|
188 |
-
}
|
189 |
-
|
190 |
-
function ecwid_add_breadcrumb_links_wpseo($links)
|
191 |
-
{
|
192 |
-
return array_merge((array)$links, array(
|
193 |
-
array(
|
194 |
-
'text' => 'ecwid.com',
|
195 |
-
'url' => 'http://ecwid.com'
|
196 |
-
)
|
197 |
-
));
|
198 |
-
}
|
199 |
if (version_compare($version, '3.6') < 0) {
|
200 |
/**
|
201 |
* A copy of has_shortcode functionality from wordpress 3.6
|
@@ -555,7 +539,7 @@ function ecwid_minifier_compatibility()
|
|
555 |
global $wp_minify;
|
556 |
|
557 |
if (is_object($wp_minify) && array_key_exists('default_exclude', get_object_vars($wp_minify)) && is_array($wp_minify->default_exclude)) {
|
558 |
-
$wp_minify->default_exclude[] = '
|
559 |
}
|
560 |
}
|
561 |
}
|
@@ -971,7 +955,7 @@ function ecwid_meta() {
|
|
971 |
echo '<meta http-equiv="x-dns-prefetch-control" content="on">' . PHP_EOL;
|
972 |
echo '<link rel="dns-prefetch" href="//images-cdn.ecwid.com/">' . PHP_EOL;
|
973 |
echo '<link rel="dns-prefetch" href="//images.ecwid.com/">' . PHP_EOL;
|
974 |
-
echo '<link rel="dns-prefetch" href="//
|
975 |
echo '<link rel="dns-prefetch" href="//ecwid-static-ru.r.worldssl.net">' . PHP_EOL;
|
976 |
echo '<link rel="dns-prefetch" href="//ecwid-images-ru.r.worldssl.net">' . PHP_EOL;
|
977 |
|
@@ -982,7 +966,7 @@ function ecwid_meta() {
|
|
982 |
} else {
|
983 |
$store_id = get_ecwid_store_id();
|
984 |
$params = ecwid_get_scriptjs_params();
|
985 |
-
echo '<link rel="preload" href="https://
|
986 |
. $store_id . $params . '" as="script">' . PHP_EOL;
|
987 |
}
|
988 |
}
|
@@ -1328,7 +1312,7 @@ function ecwid_get_scriptjs_code($force_lang = null) {
|
|
1328 |
$store_id = get_ecwid_store_id();
|
1329 |
$params = ecwid_get_scriptjs_params( $force_lang );
|
1330 |
|
1331 |
-
$s = '<script data-cfasync="false" type="text/javascript" src="https://' .
|
1332 |
$s = $s . ecwid_sso();
|
1333 |
$s .= '<script type="text/javascript">if (jQuery && jQuery.mobile) { jQuery.mobile.hashListeningEnabled = false; jQuery.mobile.pushStateEnabled=false; }</script>';
|
1334 |
$ecwid_script_rendered = true;
|
@@ -1574,6 +1558,17 @@ EOT;
|
|
1574 |
if (!empty($id) and ($id > 0)) {
|
1575 |
$_tmp_page = get_post($id);
|
1576 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1577 |
if (is_null($_tmp_page)) {
|
1578 |
$id = get_option('ecwid_store_page_id_auto');
|
1579 |
|
@@ -1617,6 +1612,8 @@ EOT;
|
|
1617 |
$p->enable_all_products();
|
1618 |
|
1619 |
Ecwid_Message_Manager::enable_message('on_activate');
|
|
|
|
|
1620 |
}
|
1621 |
|
1622 |
add_action('in_admin_header', 'ecwid_disable_other_notices');
|
@@ -1663,6 +1660,7 @@ function ecwid_store_deactivate() {
|
|
1663 |
$my_post = array();
|
1664 |
$my_post['ID'] = $ecwid_page_id;
|
1665 |
$my_post['post_status'] = 'draft';
|
|
|
1666 |
wp_update_post( $my_post );
|
1667 |
} else {
|
1668 |
update_option('ecwid_store_page_id', '');
|
@@ -1944,14 +1942,18 @@ function ecwid_general_settings_do_page() {
|
|
1944 |
|
1945 |
$connection_error = isset( $_GET['connection_error'] );
|
1946 |
|
1947 |
-
if ( $store_id == ECWID_DEMO_STORE_ID ) {
|
1948 |
$no_oauth = @$_GET['oauth'] == 'no';
|
1949 |
|
1950 |
$there_was_oauth_error = isset( $connection_error ) && $no_oauth;
|
1951 |
$customer_returned_from_creating_store_at_ecwid =
|
1952 |
EcwidPlatform::cache_get( 'user_was_redirected_to_ecwid_site_to_create_account' );
|
1953 |
|
1954 |
-
|
|
|
|
|
|
|
|
|
1955 |
EcwidPlatform::cache_reset( 'user_was_redirected_to_ecwid_site_to_create_account' );
|
1956 |
require_once ECWID_PLUGIN_DIR . 'templates/connect.php';
|
1957 |
} else {
|
@@ -2008,7 +2010,7 @@ function ecwid_get_iframe_src($time, $page) {
|
|
2008 |
}
|
2009 |
|
2010 |
return sprintf(
|
2011 |
-
'https://
|
2012 |
get_ecwid_store_id(),
|
2013 |
Ecwid_Api_V3::get_token(),
|
2014 |
$time,
|
@@ -2299,6 +2301,13 @@ function ecwid_get_debug_file() {
|
|
2299 |
}
|
2300 |
|
2301 |
function get_ecwid_store_id() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2302 |
$store_id = get_option('ecwid_store_id');
|
2303 |
if (empty($store_id)) {
|
2304 |
$store_id = ECWID_DEMO_STORE_ID;
|
@@ -2518,7 +2527,7 @@ function ecwid_get_product_browser_url_script()
|
|
2518 |
}
|
2519 |
|
2520 |
$str = '';
|
2521 |
-
if (ecwid_is_store_page_available()) {
|
2522 |
|
2523 |
$url = Ecwid_Store_Page::get_store_url();
|
2524 |
|
@@ -2578,6 +2587,13 @@ function ecwid_is_sso_enabled() {
|
|
2578 |
return $is_sso_enabled;
|
2579 |
}
|
2580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2581 |
function ecwid_sso() {
|
2582 |
|
2583 |
if (!ecwid_is_sso_enabled()) return;
|
@@ -2762,7 +2778,7 @@ function ecwid_embed_svg($name) {
|
|
2762 |
|
2763 |
function ecwid_get_categories_js_url($callback = null) {
|
2764 |
|
2765 |
-
$url = 'https://
|
2766 |
|
2767 |
if ($callback) {
|
2768 |
$url .= '&callback=' . $callback;
|
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: 5.6.2
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
13 |
register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
|
14 |
register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
|
15 |
|
|
|
16 |
define("ECWID_DEMO_STORE_ID", 1003);
|
17 |
define('ECWID_API_AVAILABILITY_CHECK_TIME', 60*60*3);
|
18 |
|
47 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-oauth.php';
|
48 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-products.php';
|
49 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-config.php';
|
|
|
50 |
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-admin.php';
|
51 |
|
52 |
if ( is_admin() ) {
|
157 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
158 |
'wpseo' => 'wordpress-seo/wp-seo.php',
|
159 |
'divibuilder' => 'divi-builder/divi-builder.php',
|
160 |
+
'autoptimize' => 'autoptimize/autoptimize.php',
|
161 |
+
'above-the-fold' => 'above-the-fold-optimization/abovethefold.php'
|
162 |
);
|
163 |
|
164 |
foreach ($integrations as $key => $plugin) {
|
180 |
|
181 |
$version = get_bloginfo('version');
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
if (version_compare($version, '3.6') < 0) {
|
184 |
/**
|
185 |
* A copy of has_shortcode functionality from wordpress 3.6
|
539 |
global $wp_minify;
|
540 |
|
541 |
if (is_object($wp_minify) && array_key_exists('default_exclude', get_object_vars($wp_minify)) && is_array($wp_minify->default_exclude)) {
|
542 |
+
$wp_minify->default_exclude[] = Ecwid_Config::get_scriptjs_domain() . '/script.js';
|
543 |
}
|
544 |
}
|
545 |
}
|
955 |
echo '<meta http-equiv="x-dns-prefetch-control" content="on">' . PHP_EOL;
|
956 |
echo '<link rel="dns-prefetch" href="//images-cdn.ecwid.com/">' . PHP_EOL;
|
957 |
echo '<link rel="dns-prefetch" href="//images.ecwid.com/">' . PHP_EOL;
|
958 |
+
echo '<link rel="dns-prefetch" href="//' . Ecwid_Config::get_scriptjs_domain() . '/">' . PHP_EOL;
|
959 |
echo '<link rel="dns-prefetch" href="//ecwid-static-ru.r.worldssl.net">' . PHP_EOL;
|
960 |
echo '<link rel="dns-prefetch" href="//ecwid-images-ru.r.worldssl.net">' . PHP_EOL;
|
961 |
|
966 |
} else {
|
967 |
$store_id = get_ecwid_store_id();
|
968 |
$params = ecwid_get_scriptjs_params();
|
969 |
+
echo '<link rel="preload" href="https://' . Ecwid_Config::get_scriptjs_domain() . '/script.js?'
|
970 |
. $store_id . $params . '" as="script">' . PHP_EOL;
|
971 |
}
|
972 |
}
|
1312 |
$store_id = get_ecwid_store_id();
|
1313 |
$params = ecwid_get_scriptjs_params( $force_lang );
|
1314 |
|
1315 |
+
$s = '<script data-cfasync="false" type="text/javascript" src="https://' . Ecwid_Config::get_scriptjs_domain() . '/script.js?' . $store_id . $params . '"></script>';
|
1316 |
$s = $s . ecwid_sso();
|
1317 |
$s .= '<script type="text/javascript">if (jQuery && jQuery.mobile) { jQuery.mobile.hashListeningEnabled = false; jQuery.mobile.pushStateEnabled=false; }</script>';
|
1318 |
$ecwid_script_rendered = true;
|
1558 |
if (!empty($id) and ($id > 0)) {
|
1559 |
$_tmp_page = get_post($id);
|
1560 |
}
|
1561 |
+
|
1562 |
+
if ( is_null( $_tmp_page ) && get_option( Ecwid_Store_Page::OPTION_LAST_STORE_PAGE_ID ) ) {
|
1563 |
+
$id = get_option( Ecwid_Store_Page::OPTION_LAST_STORE_PAGE_ID );
|
1564 |
+
|
1565 |
+
if (
|
1566 |
+
Ecwid_Store_Page::post_content_has_productbrowser($id)
|
1567 |
+
&& get_post_status($id) == 'draft') {
|
1568 |
+
$_tmp_page = get_post($id);
|
1569 |
+
}
|
1570 |
+
}
|
1571 |
+
|
1572 |
if (is_null($_tmp_page)) {
|
1573 |
$id = get_option('ecwid_store_page_id_auto');
|
1574 |
|
1612 |
$p->enable_all_products();
|
1613 |
|
1614 |
Ecwid_Message_Manager::enable_message('on_activate');
|
1615 |
+
|
1616 |
+
Ecwid_Config::load_from_ini();
|
1617 |
}
|
1618 |
|
1619 |
add_action('in_admin_header', 'ecwid_disable_other_notices');
|
1660 |
$my_post = array();
|
1661 |
$my_post['ID'] = $ecwid_page_id;
|
1662 |
$my_post['post_status'] = 'draft';
|
1663 |
+
update_option(Ecwid_Store_Page::OPTION_LAST_STORE_PAGE_ID, $ecwid_page_id);
|
1664 |
wp_update_post( $my_post );
|
1665 |
} else {
|
1666 |
update_option('ecwid_store_page_id', '');
|
1942 |
|
1943 |
$connection_error = isset( $_GET['connection_error'] );
|
1944 |
|
1945 |
+
if ( $store_id == ECWID_DEMO_STORE_ID && !Ecwid_Config::overrides_token() ) {
|
1946 |
$no_oauth = @$_GET['oauth'] == 'no';
|
1947 |
|
1948 |
$there_was_oauth_error = isset( $connection_error ) && $no_oauth;
|
1949 |
$customer_returned_from_creating_store_at_ecwid =
|
1950 |
EcwidPlatform::cache_get( 'user_was_redirected_to_ecwid_site_to_create_account' );
|
1951 |
|
1952 |
+
$no_reg_wl = Ecwid_Config::is_no_reg_wl();
|
1953 |
+
|
1954 |
+
global $ecwid_oauth;
|
1955 |
+
|
1956 |
+
if ( $there_was_oauth_error || $customer_returned_from_creating_store_at_ecwid || $no_reg_wl) {
|
1957 |
EcwidPlatform::cache_reset( 'user_was_redirected_to_ecwid_site_to_create_account' );
|
1958 |
require_once ECWID_PLUGIN_DIR . 'templates/connect.php';
|
1959 |
} else {
|
2010 |
}
|
2011 |
|
2012 |
return sprintf(
|
2013 |
+
'https://' . Ecwid_Config::get_cpanel_domain() . '/api/v3/%s/sso?token=%s×tamp=%s&signature=%s&place=%s&inline&lang=%s&min-height=700',
|
2014 |
get_ecwid_store_id(),
|
2015 |
Ecwid_Api_V3::get_token(),
|
2016 |
$time,
|
2301 |
}
|
2302 |
|
2303 |
function get_ecwid_store_id() {
|
2304 |
+
|
2305 |
+
require_once ECWID_PLUGIN_DIR . 'includes/class-ecwid-config.php';
|
2306 |
+
|
2307 |
+
$config_value = Ecwid_Config::get_store_id();
|
2308 |
+
|
2309 |
+
if ($config_value) return $config_value;
|
2310 |
+
|
2311 |
$store_id = get_option('ecwid_store_id');
|
2312 |
if (empty($store_id)) {
|
2313 |
$store_id = ECWID_DEMO_STORE_ID;
|
2527 |
}
|
2528 |
|
2529 |
$str = '';
|
2530 |
+
if (ecwid_is_store_page_available() && !Ecwid_Store_Page::is_store_page()) {
|
2531 |
|
2532 |
$url = Ecwid_Store_Page::get_store_url();
|
2533 |
|
2587 |
return $is_sso_enabled;
|
2588 |
}
|
2589 |
|
2590 |
+
add_action( 'send_headers', 'ecwid_add_headers' );
|
2591 |
+
function ecwid_add_headers() {
|
2592 |
+
if ( wp_get_current_user()->ID && ecwid_is_sso_enabled() ) {
|
2593 |
+
header("Cache-Control: private, must-revalidate, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
|
2594 |
+
}
|
2595 |
+
}
|
2596 |
+
|
2597 |
function ecwid_sso() {
|
2598 |
|
2599 |
if (!ecwid_is_sso_enabled()) return;
|
2778 |
|
2779 |
function ecwid_get_categories_js_url($callback = null) {
|
2780 |
|
2781 |
+
$url = 'https://' . Ecwid_Config::get_scriptjs_domain() . '/categories.js?ownerid=' . get_ecwid_store_id();
|
2782 |
|
2783 |
if ($callback) {
|
2784 |
$url .= '&callback=' . $callback;
|
includes/class-ecwid-admin.php
CHANGED
@@ -19,7 +19,7 @@ class Ecwid_Admin {
|
|
19 |
|
20 |
add_menu_page(
|
21 |
sprintf(__('%s shopping cart settings', 'ecwid-shopping-cart'), Ecwid_Config::get_brand()),
|
22 |
-
sprintf(__('%s
|
23 |
'manage_options',
|
24 |
self::ADMIN_SLUG,
|
25 |
'ecwid_general_settings_do_page',
|
19 |
|
20 |
add_menu_page(
|
21 |
sprintf(__('%s shopping cart settings', 'ecwid-shopping-cart'), Ecwid_Config::get_brand()),
|
22 |
+
sprintf(__('%s', 'ecwid-shopping-cart'), Ecwid_Config::get_brand()),
|
23 |
'manage_options',
|
24 |
self::ADMIN_SLUG,
|
25 |
'ecwid_general_settings_do_page',
|
includes/class-ecwid-ajax-defer-renderer.php
CHANGED
@@ -90,6 +90,9 @@ class Ecwid_Ajax_Defer_Renderer {
|
|
90 |
ecwid_shortcodes = [];
|
91 |
</script>
|
92 |
HTML;
|
|
|
|
|
|
|
93 |
$after = <<<HTML
|
94 |
<script>
|
95 |
window.ecwid_script_defer = true;
|
@@ -104,7 +107,7 @@ HTML;
|
|
104 |
var script = document.createElement('script');
|
105 |
script.charset = 'utf-8';
|
106 |
script.type = 'text/javascript';
|
107 |
-
script.src = 'https
|
108 |
script.id = 'ecwid-script'
|
109 |
|
110 |
document.body.appendChild(script);
|
90 |
ecwid_shortcodes = [];
|
91 |
</script>
|
92 |
HTML;
|
93 |
+
|
94 |
+
$app_ecwid_com = Ecwid_Config::get_scriptjs_domain();
|
95 |
+
|
96 |
$after = <<<HTML
|
97 |
<script>
|
98 |
window.ecwid_script_defer = true;
|
107 |
var script = document.createElement('script');
|
108 |
script.charset = 'utf-8';
|
109 |
script.type = 'text/javascript';
|
110 |
+
script.src = 'https://$app_ecwid_com/script.js?$ecwid_store_id';
|
111 |
script.id = 'ecwid-script'
|
112 |
|
113 |
document.body.appendChild(script);
|
includes/class-ecwid-config.php
CHANGED
@@ -11,6 +11,11 @@ class Ecwid_Config {
|
|
11 |
const OAUTH_APPSECRET = 'whitelabel_oauth_appsecret';
|
12 |
const OAUTH_TOKEN_URL = 'whitelabel_oauth_token_url';
|
13 |
const OAUTH_AUTH_URL = 'whitelabel_oauth_auth_url';
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
public static function is_wl() {
|
16 |
return EcwidPlatform::get( self::IS_WL, false );
|
@@ -29,7 +34,12 @@ class Ecwid_Config {
|
|
29 |
}
|
30 |
|
31 |
public static function get_registration_url() {
|
32 |
-
return EcwidPlatform::get( self::REGISTRATION_URL
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
public static function get_channel_id() {
|
@@ -37,11 +47,11 @@ class Ecwid_Config {
|
|
37 |
}
|
38 |
|
39 |
public static function get_oauth_token_url() {
|
40 |
-
return EcwidPlatform::get( self::OAUTH_TOKEN_URL,
|
41 |
}
|
42 |
|
43 |
public static function get_oauth_auth_url() {
|
44 |
-
return EcwidPlatform::get( self::OAUTH_AUTH_URL, 'https://
|
45 |
}
|
46 |
|
47 |
public static function get_oauth_appid() {
|
@@ -51,6 +61,30 @@ class Ecwid_Config {
|
|
51 |
public static function get_oauth_appsecret() {
|
52 |
return EcwidPlatform::get( self::OAUTH_APPSECRET, Ecwid_Api_V3::CLIENT_SECRET );
|
53 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
public static function load_from_ini() {
|
56 |
|
@@ -64,7 +98,7 @@ class Ecwid_Config {
|
|
64 |
return;
|
65 |
}
|
66 |
|
67 |
-
$
|
68 |
self::IS_WL => 'wl_mode',
|
69 |
self::BRAND => 'brand',
|
70 |
self::CONTACT_US_URL => 'contact_us_url',
|
@@ -74,20 +108,54 @@ class Ecwid_Config {
|
|
74 |
self::OAUTH_APPID => 'oauth_appid',
|
75 |
self::OAUTH_APPSECRET => 'oauth_appsecret',
|
76 |
self::OAUTH_TOKEN_URL => 'oauth_token_url',
|
77 |
-
self::OAUTH_AUTH_URL => 'oauth_authorize_url'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
);
|
79 |
|
80 |
-
$
|
81 |
|
82 |
-
foreach ( $
|
83 |
|
84 |
$value = @$result[$ini_name];
|
85 |
-
if ( $
|
86 |
EcwidPlatform::set($name, @$result[$ini_name]);
|
87 |
} else {
|
88 |
EcwidPlatform::reset($name);
|
89 |
}
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
public static function enqueue_styles() {
|
93 |
if ( !self::is_wl() ) {
|
@@ -97,4 +165,5 @@ class Ecwid_Config {
|
|
97 |
wp_enqueue_style( 'ecwid-wl', ECWID_PLUGIN_URL . 'css/wl.css', array( 'ecwid-admin-css' ), get_option( 'ecwid_plugin_version' ) );
|
98 |
}
|
99 |
}
|
|
|
100 |
add_action( 'admin_enqueue_scripts', array( 'Ecwid_Config', 'enqueue_styles' ) );
|
11 |
const OAUTH_APPSECRET = 'whitelabel_oauth_appsecret';
|
12 |
const OAUTH_TOKEN_URL = 'whitelabel_oauth_token_url';
|
13 |
const OAUTH_AUTH_URL = 'whitelabel_oauth_auth_url';
|
14 |
+
const TOKEN = 'config_token';
|
15 |
+
const STORE_ID = 'config_store_id';
|
16 |
+
const API_DOMAIN = 'config_api_domain';
|
17 |
+
const FRONTEND_DOMAIN = 'config_frontend_domain';
|
18 |
+
const CPANEL_DOMAIN = 'config_cpanel_domain';
|
19 |
|
20 |
public static function is_wl() {
|
21 |
return EcwidPlatform::get( self::IS_WL, false );
|
34 |
}
|
35 |
|
36 |
public static function get_registration_url() {
|
37 |
+
return EcwidPlatform::get( self::REGISTRATION_URL );
|
38 |
+
}
|
39 |
+
|
40 |
+
// Whether it is in WL mode with no registration
|
41 |
+
public static function is_no_reg_wl() {
|
42 |
+
return self::is_wl() && !self::get_registration_url();
|
43 |
}
|
44 |
|
45 |
public static function get_channel_id() {
|
47 |
}
|
48 |
|
49 |
public static function get_oauth_token_url() {
|
50 |
+
return EcwidPlatform::get( self::OAUTH_TOKEN_URL, 'https://' . self::get_cpanel_domain() . '/api/oauth/token' );
|
51 |
}
|
52 |
|
53 |
public static function get_oauth_auth_url() {
|
54 |
+
return EcwidPlatform::get( self::OAUTH_AUTH_URL, 'https://' . self::get_cpanel_domain() . '/api/oauth/authorize' );
|
55 |
}
|
56 |
|
57 |
public static function get_oauth_appid() {
|
61 |
public static function get_oauth_appsecret() {
|
62 |
return EcwidPlatform::get( self::OAUTH_APPSECRET, Ecwid_Api_V3::CLIENT_SECRET );
|
63 |
}
|
64 |
+
|
65 |
+
public static function get_store_id() {
|
66 |
+
return EcwidPlatform::get( self::STORE_ID, null );
|
67 |
+
}
|
68 |
+
|
69 |
+
public static function get_token() {
|
70 |
+
return EcwidPlatform::get( self::TOKEN, null );
|
71 |
+
}
|
72 |
+
|
73 |
+
public static function overrides_token() {
|
74 |
+
return (bool)self::get_token();
|
75 |
+
}
|
76 |
+
|
77 |
+
public static function get_api_domain() {
|
78 |
+
return EcwidPlatform::get( self::API_DOMAIN, 'app.ecwid.com' );
|
79 |
+
}
|
80 |
+
|
81 |
+
public static function get_scriptjs_domain() {
|
82 |
+
return EcwidPlatform::get( self::FRONTEND_DOMAIN, 'app.ecwid.com' );
|
83 |
+
}
|
84 |
+
|
85 |
+
public static function get_cpanel_domain() {
|
86 |
+
return EcwidPlatform::get( self::CPANEL_DOMAIN, 'my.ecwid.com' );
|
87 |
+
}
|
88 |
|
89 |
public static function load_from_ini() {
|
90 |
|
98 |
return;
|
99 |
}
|
100 |
|
101 |
+
$wl_config = array(
|
102 |
self::IS_WL => 'wl_mode',
|
103 |
self::BRAND => 'brand',
|
104 |
self::CONTACT_US_URL => 'contact_us_url',
|
108 |
self::OAUTH_APPID => 'oauth_appid',
|
109 |
self::OAUTH_APPSECRET => 'oauth_appsecret',
|
110 |
self::OAUTH_TOKEN_URL => 'oauth_token_url',
|
111 |
+
self::OAUTH_AUTH_URL => 'oauth_authorize_url',
|
112 |
+
);
|
113 |
+
|
114 |
+
$common_config = array(
|
115 |
+
self::TOKEN => 'oauth_token',
|
116 |
+
self::STORE_ID => 'store_id',
|
117 |
+
self::API_DOMAIN => 'api_domain',
|
118 |
+
self::FRONTEND_DOMAIN => 'scriptjs_domain',
|
119 |
+
self::CPANEL_DOMAIN => 'cp_domain'
|
120 |
+
);
|
121 |
+
|
122 |
+
$empty_is_allowed = array(
|
123 |
+
self::REGISTRATION_URL
|
124 |
);
|
125 |
|
126 |
+
$is_wl_enabled = @$result['wl_mode'];
|
127 |
|
128 |
+
foreach ( $wl_config as $name => $ini_name ) {
|
129 |
|
130 |
$value = @$result[$ini_name];
|
131 |
+
if ( $is_wl_enabled && ( $value || in_array( $value, $empty_is_allowed ) ) ) {
|
132 |
EcwidPlatform::set($name, @$result[$ini_name]);
|
133 |
} else {
|
134 |
EcwidPlatform::reset($name);
|
135 |
}
|
136 |
}
|
137 |
+
|
138 |
+
if ( $is_wl_enabled ) {
|
139 |
+
if (
|
140 |
+
isset( $result[self::TOKEN] ) && !isset( $result[self::STORE_ID] )
|
141 |
+
||
|
142 |
+
!isset( $result[self::TOKEN] ) && isset( $result[self::STORE_ID] )
|
143 |
+
) {
|
144 |
+
unset( $result[self::TOKEN] );
|
145 |
+
unset( $result[self::STORE_ID] );
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
foreach ( $common_config as $name => $ini_name ) {
|
150 |
+
$value = @$result[$ini_name];
|
151 |
+
if ( $value ) {
|
152 |
+
EcwidPlatform::set( $name, $value );
|
153 |
+
} else {
|
154 |
+
EcwidPlatform::reset( $name );
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
ecwid_invalidate_cache( true );
|
159 |
}
|
160 |
public static function enqueue_styles() {
|
161 |
if ( !self::is_wl() ) {
|
165 |
wp_enqueue_style( 'ecwid-wl', ECWID_PLUGIN_URL . 'css/wl.css', array( 'ecwid-admin-css' ), get_option( 'ecwid_plugin_version' ) );
|
166 |
}
|
167 |
}
|
168 |
+
|
169 |
add_action( 'admin_enqueue_scripts', array( 'Ecwid_Config', 'enqueue_styles' ) );
|
includes/class-ecwid-integration-above-the-fold.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ecwid_Integration_Above_The_Fold
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
add_filter( 'abtf_jsfile_pre', array( $this, 'filter_optimized_js' ) );
|
8 |
+
}
|
9 |
+
|
10 |
+
public function filter_optimized_js($file)
|
11 |
+
{
|
12 |
+
if ( strpos( $file, 'ecwid.com' ) !== false ) {
|
13 |
+
return '';
|
14 |
+
}
|
15 |
+
|
16 |
+
return $file;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
$ecwid_integration_abtv = new Ecwid_Integration_Above_The_Fold();
|
includes/class-ecwid-message-manager.php
CHANGED
@@ -193,7 +193,7 @@ TXT
|
|
193 |
'on_activate' => array(
|
194 |
'title' => sprintf( __( 'Greetings! Your %s plugin is now active.', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ),
|
195 |
'message' => __('Take a few simple steps to complete store setup', 'ecwid-shopping-cart'),
|
196 |
-
'primary_title' => sprintf( __( 'Set up %s
|
197 |
'primary_url' => 'admin.php?page=ecwid',
|
198 |
'hideable' => true,
|
199 |
'default' => 'disabled'
|
@@ -250,21 +250,16 @@ TXT
|
|
250 |
if ($admin_page == 'toplevel_page_ec-store' && isset($_GET['reconnect'])) {
|
251 |
return false;
|
252 |
}
|
253 |
-
|
254 |
switch ($name) {
|
255 |
case 'on_activate':
|
256 |
-
return $admin_page != 'toplevel_page_ec-store' && get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
|
257 |
|
258 |
case 'on_storeid_set':
|
259 |
return get_ecwid_store_id() != ECWID_DEMO_STORE_ID && @$_GET['settings-updated'] == 'true' && $admin_page == 'toplevel_page_ec-store';
|
260 |
|
261 |
case 'on_no_storeid_on_setup_pages':
|
262 |
-
$
|
263 |
-
|
264 |
-
$is_ecwid_settings = in_array($admin_page, array('ecwid-store_page_ecwid-advanced', 'ecwid-store_page_ecwid-appearance'));
|
265 |
-
$is_store_page = $admin_page == 'post' && isset($_GET['post']) && $_GET['post'] == Ecwid_Store_Page::get_current_store_page_id();
|
266 |
-
|
267 |
-
return $is_newbie && ($is_ecwid_settings || $is_store_page);
|
268 |
|
269 |
case 'on_appearance_widgets':
|
270 |
return isset($_GET['from-ec-store']) && $_GET['from-ec-store'] != 'true' && $admin_page == 'widgets';
|
@@ -292,4 +287,16 @@ TXT
|
|
292 |
}
|
293 |
}
|
294 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
193 |
'on_activate' => array(
|
194 |
'title' => sprintf( __( 'Greetings! Your %s plugin is now active.', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ),
|
195 |
'message' => __('Take a few simple steps to complete store setup', 'ecwid-shopping-cart'),
|
196 |
+
'primary_title' => sprintf( __( 'Set up %s', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ),
|
197 |
'primary_url' => 'admin.php?page=ecwid',
|
198 |
'hideable' => true,
|
199 |
'default' => 'disabled'
|
250 |
if ($admin_page == 'toplevel_page_ec-store' && isset($_GET['reconnect'])) {
|
251 |
return false;
|
252 |
}
|
253 |
+
|
254 |
switch ($name) {
|
255 |
case 'on_activate':
|
256 |
+
return !$this->should_display_on_no_storeid_on_setup_pages() && $admin_page != 'toplevel_page_ec-store' && get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
|
257 |
|
258 |
case 'on_storeid_set':
|
259 |
return get_ecwid_store_id() != ECWID_DEMO_STORE_ID && @$_GET['settings-updated'] == 'true' && $admin_page == 'toplevel_page_ec-store';
|
260 |
|
261 |
case 'on_no_storeid_on_setup_pages':
|
262 |
+
return $this->should_display_on_no_storeid_on_setup_pages();
|
|
|
|
|
|
|
|
|
|
|
263 |
|
264 |
case 'on_appearance_widgets':
|
265 |
return isset($_GET['from-ec-store']) && $_GET['from-ec-store'] != 'true' && $admin_page == 'widgets';
|
287 |
}
|
288 |
}
|
289 |
|
290 |
+
protected function should_display_on_no_storeid_on_setup_pages() {
|
291 |
+
$screen = get_current_screen();
|
292 |
+
|
293 |
+
$admin_page = $screen->base;
|
294 |
+
|
295 |
+
$is_newbie = get_ecwid_store_id() == ECWID_DEMO_STORE_ID;
|
296 |
+
|
297 |
+
$is_ecwid_settings = in_array($admin_page, array('ecwid-store_page_ecwid-advanced', 'ecwid-store_page_ecwid-appearance'));
|
298 |
+
$is_store_page = $admin_page == 'post' && isset($_GET['post']) && $_GET['post'] == Ecwid_Store_Page::get_current_store_page_id();
|
299 |
+
|
300 |
+
return $is_newbie && ($is_ecwid_settings || $is_store_page);
|
301 |
+
}
|
302 |
}
|
includes/class-ecwid-nav-menus.php
CHANGED
@@ -172,14 +172,15 @@ class Ecwid_Nav_Menus {
|
|
172 |
|
173 |
$ecwid_menu_type = isset($types[$item->object]) ? $types[$item->object] : null;
|
174 |
|
175 |
-
if ( $ecwid_menu_type && isset( $ecwid_menu_type['
|
176 |
$item->url = Ecwid_Store_Page::get_menu_item_url($ecwid_menu_type);
|
177 |
-
$item->ecwid_page_type = $ecwid_menu_type['
|
178 |
}
|
179 |
|
180 |
if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
|
181 |
$item->url = Ecwid_Store_Page::get_store_url();
|
182 |
}
|
|
|
183 |
if ($item->object == 'ecwid-store-with-categories') {
|
184 |
$posts = EcwidPlatform::cache_get( 'nav_categories_posts' );
|
185 |
|
@@ -227,7 +228,7 @@ class Ecwid_Nav_Menus {
|
|
227 |
$counter++;
|
228 |
}
|
229 |
}
|
230 |
-
|
231 |
return $items;
|
232 |
}
|
233 |
|
172 |
|
173 |
$ecwid_menu_type = isset($types[$item->object]) ? $types[$item->object] : null;
|
174 |
|
175 |
+
if ( $ecwid_menu_type && isset( $ecwid_menu_type['clean-url'] ) ) {
|
176 |
$item->url = Ecwid_Store_Page::get_menu_item_url($ecwid_menu_type);
|
177 |
+
$item->ecwid_page_type = $ecwid_menu_type['clean-url'];
|
178 |
}
|
179 |
|
180 |
if ($item->object == 'ecwid-store-with-categories' || $item->object == 'ecwid-store') {
|
181 |
$item->url = Ecwid_Store_Page::get_store_url();
|
182 |
}
|
183 |
+
|
184 |
if ($item->object == 'ecwid-store-with-categories') {
|
185 |
$posts = EcwidPlatform::cache_get( 'nav_categories_posts' );
|
186 |
|
228 |
$counter++;
|
229 |
}
|
230 |
}
|
231 |
+
|
232 |
return $items;
|
233 |
}
|
234 |
|
includes/class-ecwid-oauth.php
CHANGED
@@ -177,9 +177,14 @@ class Ecwid_OAuth {
|
|
177 |
}
|
178 |
|
179 |
public function has_scope( $scope ) {
|
180 |
-
|
181 |
-
if (
|
182 |
-
$stored_scope = '
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|
184 |
|
185 |
return in_array( $scope, explode(' ', $stored_scope) );
|
@@ -237,7 +242,7 @@ class Ecwid_OAuth {
|
|
237 |
}
|
238 |
|
239 |
public function get_sso_admin_link() {
|
240 |
-
$url = 'https://
|
241 |
|
242 |
$store_id = get_ecwid_store_id();
|
243 |
|
177 |
}
|
178 |
|
179 |
public function has_scope( $scope ) {
|
180 |
+
|
181 |
+
if (Ecwid_Config::overrides_token()) {
|
182 |
+
$stored_scope = implode(' ', $this->_get_default_scopes_array());
|
183 |
+
} else {
|
184 |
+
$stored_scope = get_option( 'ecwid_oauth_scope' );
|
185 |
+
if (empty($stored_scope)) {
|
186 |
+
$stored_scope = 'read_store_profile read_catalog';
|
187 |
+
}
|
188 |
}
|
189 |
|
190 |
return in_array( $scope, explode(' ', $stored_scope) );
|
242 |
}
|
243 |
|
244 |
public function get_sso_admin_link() {
|
245 |
+
$url = 'https://' . Ecwid_Config::get_cpanel_domain() . '/api/v3/%s/sso?token=%s×tamp=%s&signature=%s&inline=true';
|
246 |
|
247 |
$store_id = get_ecwid_store_id();
|
248 |
|
includes/class-ecwid-seo-links.php
CHANGED
@@ -121,7 +121,18 @@ class Ecwid_Seo_Links {
|
|
121 |
'pages\/shipping-payment',
|
122 |
'pages\/returns',
|
123 |
'pages\/terms',
|
124 |
-
'pages\/privacy-policy'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
);
|
126 |
}
|
127 |
|
121 |
'pages\/shipping-payment',
|
122 |
'pages\/returns',
|
123 |
'pages\/terms',
|
124 |
+
'pages\/privacy-policy',
|
125 |
+
'signIn.*',
|
126 |
+
'resetPassword.*',
|
127 |
+
'checkoutAB.*',
|
128 |
+
'downloadError.*',
|
129 |
+
'checkoutResult.*',
|
130 |
+
'checkoutWait.*',
|
131 |
+
'orderFailure.*',
|
132 |
+
'checkoutCC.*',
|
133 |
+
'checkoutEC.*',
|
134 |
+
'checkoutAC.*',
|
135 |
+
'FBAutofillCheckout.*'
|
136 |
);
|
137 |
}
|
138 |
|
includes/class-ecwid-store-page.php
CHANGED
@@ -4,6 +4,7 @@ class Ecwid_Store_Page {
|
|
4 |
|
5 |
const OPTION_STORE_PAGES = 'ecwid_store_pages';
|
6 |
const OPTION_MAIN_STORE_PAGE_ID = 'ecwid_store_page_id';
|
|
|
7 |
const OPTION_FLUSH_REWRITES = 'ecwid_flush_rewrites';
|
8 |
const WARMUP_ACTION = 'ecwid_warmup_store';
|
9 |
|
@@ -293,13 +294,14 @@ class Ecwid_Store_Page {
|
|
293 |
if ( $has_pb && in_array( get_post_status( $post_id ), self::_get_allowed_post_statuses() ) ) {
|
294 |
self::add_store_page( $post_id );
|
295 |
} else if ( get_option( self::OPTION_MAIN_STORE_PAGE_ID ) == $post_id ) {
|
|
|
296 |
update_option( self::OPTION_MAIN_STORE_PAGE_ID, '' );
|
297 |
}
|
298 |
}
|
299 |
|
300 |
protected static function _get_allowed_post_statuses()
|
301 |
{
|
302 |
-
return array('publish', 'private'
|
303 |
}
|
304 |
|
305 |
public static function warmup_store()
|
4 |
|
5 |
const OPTION_STORE_PAGES = 'ecwid_store_pages';
|
6 |
const OPTION_MAIN_STORE_PAGE_ID = 'ecwid_store_page_id';
|
7 |
+
const OPTION_LAST_STORE_PAGE_ID = 'ecwid_last_store_page_id';
|
8 |
const OPTION_FLUSH_REWRITES = 'ecwid_flush_rewrites';
|
9 |
const WARMUP_ACTION = 'ecwid_warmup_store';
|
10 |
|
294 |
if ( $has_pb && in_array( get_post_status( $post_id ), self::_get_allowed_post_statuses() ) ) {
|
295 |
self::add_store_page( $post_id );
|
296 |
} else if ( get_option( self::OPTION_MAIN_STORE_PAGE_ID ) == $post_id ) {
|
297 |
+
update_option( self::OPTION_LAST_STORE_PAGE_ID, $post_id );
|
298 |
update_option( self::OPTION_MAIN_STORE_PAGE_ID, '' );
|
299 |
}
|
300 |
}
|
301 |
|
302 |
protected static function _get_allowed_post_statuses()
|
303 |
{
|
304 |
+
return array('publish', 'private');
|
305 |
}
|
306 |
|
307 |
public static function warmup_store()
|
includes/themes.php
CHANGED
@@ -61,7 +61,8 @@ function ecwid_apply_theme($theme_name = null)
|
|
61 |
'ribosome' => array( 'css' ),
|
62 |
'optimizepress' => array( 'css' ),
|
63 |
'edge' => array( 'js', 'scroll' ),
|
64 |
-
'newsmag' => array( 'css-no-parent')
|
|
|
65 |
);
|
66 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
67 |
|
61 |
'ribosome' => array( 'css' ),
|
62 |
'optimizepress' => array( 'css' ),
|
63 |
'edge' => array( 'js', 'scroll' ),
|
64 |
+
'newsmag' => array( 'css-no-parent'),
|
65 |
+
'optimizer' => array( 'css' )
|
66 |
);
|
67 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
68 |
|
includes/themes/class-ecwid-theme-trend.php
CHANGED
@@ -48,6 +48,9 @@ class Ecwid_Theme_Trend extends Ecwid_Theme_Base
|
|
48 |
ecwid_shortcodes = [];
|
49 |
</script>
|
50 |
HTML;
|
|
|
|
|
|
|
51 |
$after = <<<HTML
|
52 |
<script>
|
53 |
window.ecwid_script_defer = true;
|
@@ -62,7 +65,7 @@ if (typeof ecwid_shortcodes != 'undefined') {
|
|
62 |
var script = document.createElement('script');
|
63 |
script.charset = 'utf-8';
|
64 |
script.type = 'text/javascript';
|
65 |
-
script.src = 'https
|
66 |
script.id = 'ecwid-script'
|
67 |
|
68 |
document.body.appendChild(script);
|
48 |
ecwid_shortcodes = [];
|
49 |
</script>
|
50 |
HTML;
|
51 |
+
|
52 |
+
$app_ecwid_com = Ecwid_Config::get_scriptjs_domain();
|
53 |
+
|
54 |
$after = <<<HTML
|
55 |
<script>
|
56 |
window.ecwid_script_defer = true;
|
65 |
var script = document.createElement('script');
|
66 |
script.charset = 'utf-8';
|
67 |
script.type = 'text/javascript';
|
68 |
+
script.src = 'https://$app_ecwid_com/script.js?$ecwid_store_id';
|
69 |
script.id = 'ecwid-script'
|
70 |
|
71 |
document.body.appendChild(script);
|
js/products-list.js
CHANGED
@@ -123,7 +123,6 @@ jQuery.widget('ecwid.productsList', {
|
|
123 |
}
|
124 |
}
|
125 |
|
126 |
-
console.log(product.link);
|
127 |
jQuery('a', container)
|
128 |
.attr('href', product.link)
|
129 |
.attr('title', product.name);
|
123 |
}
|
124 |
}
|
125 |
|
|
|
126 |
jQuery('a', container)
|
127 |
.attr('href', product.link)
|
128 |
.attr('title', product.name);
|
languages/ecwid-shopping-cart-ru_RU.mo
CHANGED
Binary file
|
languages/ecwid-shopping-cart-ru_RU.po
CHANGED
@@ -54,6 +54,10 @@ msgstr "<a %s>Интернет магазин построен на Эквиде
|
|
54 |
msgid "Store"
|
55 |
msgstr "Магазин"
|
56 |
|
|
|
|
|
|
|
|
|
57 |
#: ecwid-shopping-cart.php:1723 includes/class-ecwid-admin.php:31
|
58 |
msgid "Setup"
|
59 |
msgstr "Установка"
|
@@ -91,7 +95,7 @@ msgstr "Корневые категории добавляются в выпад
|
|
91 |
#: ecwid-shopping-cart.php:1916 includes/class-ecwid-oauth.php:336
|
92 |
msgid ""
|
93 |
"To be able to choose a product to insert to your posts and pages, you will "
|
94 |
-
"need to re-connect your site to your %s
|
95 |
"accept permissions request – so that the plugin will be able to list your "
|
96 |
"products in the \"Add product\" dialog."
|
97 |
msgstr ""
|
@@ -205,9 +209,9 @@ msgstr "Добро пожаловать в %s!"
|
|
205 |
msgid "Take a few simple steps to complete store setup"
|
206 |
msgstr "Магазин почти готов — осталось несколько простых шагов"
|
207 |
|
208 |
-
#: includes/class-ecwid-message-manager.php:
|
209 |
-
msgid "Set up %s
|
210 |
-
msgstr "Настроить
|
211 |
|
212 |
#: includes/class-ecwid-message-manager.php:204
|
213 |
msgid "Your store is almost ready!"
|
@@ -702,8 +706,8 @@ msgstr ""
|
|
702 |
"\"https://help.ecwid.com/customer/portal/emails/new\">свяжитесь с нами</a>."
|
703 |
|
704 |
#: templates/advanced-settings.php:1
|
705 |
-
msgid "%s
|
706 |
-
msgstr "
|
707 |
|
708 |
#: templates/advanced-settings.php:29
|
709 |
msgid "SEO friendly clean URLs"
|
@@ -772,12 +776,12 @@ msgstr "Единый вход для покупателей"
|
|
772 |
#: templates/advanced-settings.php:102
|
773 |
msgid ""
|
774 |
"Single Sign-On allows your customers to have a single login for your "
|
775 |
-
"WordPress site and your %s
|
776 |
"will automatically be logged in to their customer account in your store as "
|
777 |
"well with no need to enter their email/password again."
|
778 |
msgstr ""
|
779 |
"Объединяет учетную запись покупателя на сайте с его учетной записью в "
|
780 |
-
"
|
781 |
"дважды – на сайте и в магазине. После входа в свой аккаунт на сайте "
|
782 |
"покупатель может смотреть историю своих заказов и оформлять новый заказ с "
|
783 |
"предзаполненным email и адресом доставки."
|
@@ -1190,8 +1194,8 @@ msgstr ""
|
|
1190 |
"ваш сайт за несколько простых шагов."
|
1191 |
|
1192 |
#: templates/landing.php:15 templates/landing.php:132
|
1193 |
-
msgid "Create Free %s
|
1194 |
-
msgstr "Создать %s
|
1195 |
|
1196 |
#: templates/landing.php:31 templates/landing.php:148
|
1197 |
msgid "Store is created"
|
54 |
msgid "Store"
|
55 |
msgstr "Магазин"
|
56 |
|
57 |
+
#: ecwid-shopping-cart.php:1555
|
58 |
+
msgid "%s settings"
|
59 |
+
msgstr "Настройки %s"
|
60 |
+
|
61 |
#: ecwid-shopping-cart.php:1723 includes/class-ecwid-admin.php:31
|
62 |
msgid "Setup"
|
63 |
msgstr "Установка"
|
95 |
#: ecwid-shopping-cart.php:1916 includes/class-ecwid-oauth.php:336
|
96 |
msgid ""
|
97 |
"To be able to choose a product to insert to your posts and pages, you will "
|
98 |
+
"need to re-connect your site to your %s. This will only require you to "
|
99 |
"accept permissions request – so that the plugin will be able to list your "
|
100 |
"products in the \"Add product\" dialog."
|
101 |
msgstr ""
|
209 |
msgid "Take a few simple steps to complete store setup"
|
210 |
msgstr "Магазин почти готов — осталось несколько простых шагов"
|
211 |
|
212 |
+
#: includes/class-ecwid-message-manager.php:205
|
213 |
+
msgid "Set up %s"
|
214 |
+
msgstr "Настроить %s"
|
215 |
|
216 |
#: includes/class-ecwid-message-manager.php:204
|
217 |
msgid "Your store is almost ready!"
|
706 |
"\"https://help.ecwid.com/customer/portal/emails/new\">свяжитесь с нами</a>."
|
707 |
|
708 |
#: templates/advanced-settings.php:1
|
709 |
+
msgid "%s — Advanced settings"
|
710 |
+
msgstr "%s — Дополнительные настройки"
|
711 |
|
712 |
#: templates/advanced-settings.php:29
|
713 |
msgid "SEO friendly clean URLs"
|
776 |
#: templates/advanced-settings.php:102
|
777 |
msgid ""
|
778 |
"Single Sign-On allows your customers to have a single login for your "
|
779 |
+
"WordPress site and your %s. When someone logs in to your site, they "
|
780 |
"will automatically be logged in to their customer account in your store as "
|
781 |
"well with no need to enter their email/password again."
|
782 |
msgstr ""
|
783 |
"Объединяет учетную запись покупателя на сайте с его учетной записью в "
|
784 |
+
"%s. Когда единый вход включен, покупателю не нужно логиниться "
|
785 |
"дважды – на сайте и в магазине. После входа в свой аккаунт на сайте "
|
786 |
"покупатель может смотреть историю своих заказов и оформлять новый заказ с "
|
787 |
"предзаполненным email и адресом доставки."
|
1194 |
"ваш сайт за несколько простых шагов."
|
1195 |
|
1196 |
#: templates/landing.php:15 templates/landing.php:132
|
1197 |
+
msgid "Create Free %s"
|
1198 |
+
msgstr "Создать %s"
|
1199 |
|
1200 |
#: templates/landing.php:31 templates/landing.php:148
|
1201 |
msgid "Store is created"
|
lib/ecwid_api_v3.php
CHANGED
@@ -6,7 +6,6 @@ class Ecwid_Api_V3
|
|
6 |
{
|
7 |
const CLIENT_ID = 'RD4o2KQimiGUrFZc';
|
8 |
const CLIENT_SECRET = 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8';
|
9 |
-
const OAUTH_URL = 'https://my.ecwid.com/api/oauth/token';
|
10 |
|
11 |
const TOKEN_OPTION_NAME = 'ecwid_oauth_token';
|
12 |
|
@@ -19,7 +18,7 @@ class Ecwid_Api_V3
|
|
19 |
public function __construct() {
|
20 |
|
21 |
$this->store_id = EcwidPlatform::get_store_id();
|
22 |
-
$this->_api_url = 'https://
|
23 |
$this->_stores_api_url = $this->_api_url . 'stores';
|
24 |
|
25 |
$this->_categories_api_url = $this->_api_url . $this->store_id . '/categories';
|
@@ -72,7 +71,7 @@ class Ecwid_Api_V3
|
|
72 |
$this->_categories_api_url,
|
73 |
$params
|
74 |
);
|
75 |
-
|
76 |
$result = EcwidPlatform::get_from_categories_cache($url);
|
77 |
if ( !$result ) {
|
78 |
$result = EcwidPlatform::fetch_url( $url );
|
@@ -304,6 +303,10 @@ class Ecwid_Api_V3
|
|
304 |
|
305 |
public static function get_token()
|
306 |
{
|
|
|
|
|
|
|
|
|
307 |
return self::_load_token();
|
308 |
}
|
309 |
|
6 |
{
|
7 |
const CLIENT_ID = 'RD4o2KQimiGUrFZc';
|
8 |
const CLIENT_SECRET = 'jEPVdcA3KbzKVrG8FZDgNnsY3wKHDTF8';
|
|
|
9 |
|
10 |
const TOKEN_OPTION_NAME = 'ecwid_oauth_token';
|
11 |
|
18 |
public function __construct() {
|
19 |
|
20 |
$this->store_id = EcwidPlatform::get_store_id();
|
21 |
+
$this->_api_url = 'https://' . Ecwid_Config::get_api_domain() . '/api/v3/';
|
22 |
$this->_stores_api_url = $this->_api_url . 'stores';
|
23 |
|
24 |
$this->_categories_api_url = $this->_api_url . $this->store_id . '/categories';
|
71 |
$this->_categories_api_url,
|
72 |
$params
|
73 |
);
|
74 |
+
|
75 |
$result = EcwidPlatform::get_from_categories_cache($url);
|
76 |
if ( !$result ) {
|
77 |
$result = EcwidPlatform::fetch_url( $url );
|
303 |
|
304 |
public static function get_token()
|
305 |
{
|
306 |
+
$config_value = Ecwid_Config::get_token();
|
307 |
+
|
308 |
+
if ($config_value) return $config_value;
|
309 |
+
|
310 |
return self::_load_token();
|
311 |
}
|
312 |
|
lib/ecwid_platform.php
CHANGED
@@ -162,7 +162,7 @@ class EcwidPlatform {
|
|
162 |
|
163 |
if ( ( empty($return['data']) || $return['code'] != 200 ) && !isset($options['self_call']) ) {
|
164 |
|
165 |
-
$log_url = 'http://' .
|
166 |
$log_url .= '&data_url=' . urlencode(get_bloginfo('url'));
|
167 |
$log_url .= '&data_target_url=' . urlencode($url);
|
168 |
if (get_option('ecwid_http_use_stream', false)) {
|
162 |
|
163 |
if ( ( empty($return['data']) || $return['code'] != 200 ) && !isset($options['self_call']) ) {
|
164 |
|
165 |
+
$log_url = 'http://' . Ecwid_Config::get_scriptjs_domain() . '/script.js?805056&data_platform=wporg&data_wporg_error=remote_get_fails';
|
166 |
$log_url .= '&data_url=' . urlencode(get_bloginfo('url'));
|
167 |
$log_url .= '&data_target_url=' . urlencode($url);
|
168 |
if (get_option('ecwid_http_use_stream', false)) {
|
lib/ecwid_product_api.php
CHANGED
@@ -14,8 +14,8 @@ class EcwidProductApi {
|
|
14 |
|
15 |
function __construct($store_id) {
|
16 |
|
17 |
-
$this->ECWID_PRODUCT_API_ENDPOINT = 'http://
|
18 |
-
$this->ECWID_PRODUCT_API_ENDPOINT_HTTPS = 'https://
|
19 |
$this->store_id = intval($store_id);
|
20 |
}
|
21 |
|
14 |
|
15 |
function __construct($store_id) {
|
16 |
|
17 |
+
$this->ECWID_PRODUCT_API_ENDPOINT = 'http://' . Ecwid_Config::get_api_domain() . '/api/v1';
|
18 |
+
$this->ECWID_PRODUCT_API_ENDPOINT_HTTPS = 'https://' . Ecwid_Config::get_api_domain() . '/api/v1';
|
19 |
$this->store_id = intval($store_id);
|
20 |
}
|
21 |
|
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.8
|
6 |
-
Stable tag: 5.6.
|
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,7 +149,15 @@ 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 |
-
= 5.6.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
- Fixed incompatibility of the plugin v5.6 with the servers running PHP 5.2.x
|
154 |
|
155 |
= 5.6 — Sep 27, 2017 =
|
@@ -158,7 +166,7 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
158 |
- **Slightly optimized loading speed.** The Ecwid Online Store plugin now loads less CSS/JS files on your site to decrease number of resources the visitor browser should process and to increase loading speed.
|
159 |
- **Fixed an issue with SEO friendly clean URLs.** On some sites in rare occasions, product URLs responded with 404 errors. If you encounter such behavior on your site, this update should fix that. All shop URLs should work fine now — they are available for visitors and are well indexed by search engines.
|
160 |
- **Various minor fixes and improvements** in random product widget, SEO functionality, store dashboard and other areas.
|
161 |
-
- Ecwid is constantly updated with new cool features and improvements. To see more updates and learn something new about selling online, see our blog
|
162 |
|
163 |
= 5.5 =
|
164 |
- **New random product widget.** A new sidebar widget allows you add a random product block to the site sidebar. Each time your customer opens or refreshes a page on your site, they will see one of your store products in the sidebar. Enable the new random product widget under Appearance→Widgets section in your Wordpress admin backend. Do not forget to add pictures to your products to bring site visitors’ attention to your store.
|
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.8
|
6 |
+
Stable tag: 5.6.2
|
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 |
+
= 5.6.2 - Oct 25, 2017 =
|
153 |
+
- **Fixed an issue with custom store menu links.** You can add store pages to the site menu under “Appearance → Menu” in your WordPress site settings. Previously, these links might not work if you added them in the recent weeks. We now fixed it, they should work fine.
|
154 |
+
- **Fixed an issue with the browser back button and the customer cart content.** In some rare cases (when the Single Sign On tool is enabled), when a logged in store visitor clicked the back button in their browser, the cart content might be refreshed. We fixed that — whether you have the customer Single Sign On enabled or not, the storefront, cart and checkout should work properly.
|
155 |
+
- **Added compatibility with the “Above The Fold Optimization” plugin.** You can use that plugin along with the Ecwid shopping cart, everything should work fine with no issues.
|
156 |
+
- **Fixed a slight layout issue with the “Optimizer” theme.** Product thumbnail pictures displayed improperly in that theme. Now they look OK.
|
157 |
+
- **Added slight improvements and fixes for the admin backend layout.**
|
158 |
+
- Ecwid is constantly updated with new cool ecommerce features and improvements. To see more updates and learn something new about selling online, see [our blog](https://www.ecwid.com/blog/ecwid-updates).
|
159 |
+
|
160 |
+
= 5.6.1 - Sep 29, 2017 =
|
161 |
- Fixed incompatibility of the plugin v5.6 with the servers running PHP 5.2.x
|
162 |
|
163 |
= 5.6 — Sep 27, 2017 =
|
166 |
- **Slightly optimized loading speed.** The Ecwid Online Store plugin now loads less CSS/JS files on your site to decrease number of resources the visitor browser should process and to increase loading speed.
|
167 |
- **Fixed an issue with SEO friendly clean URLs.** On some sites in rare occasions, product URLs responded with 404 errors. If you encounter such behavior on your site, this update should fix that. All shop URLs should work fine now — they are available for visitors and are well indexed by search engines.
|
168 |
- **Various minor fixes and improvements** in random product widget, SEO functionality, store dashboard and other areas.
|
169 |
+
- Ecwid is constantly updated with new cool features and improvements. To see more updates and learn something new about selling online, see [our blog](https://www.ecwid.com/blog/ecwid-updates).
|
170 |
|
171 |
= 5.5 =
|
172 |
- **New random product widget.** A new sidebar widget allows you add a random product block to the site sidebar. Each time your customer opens or refreshes a page on your site, they will see one of your store products in the sidebar. Enable the new random product widget under Appearance→Widgets section in your Wordpress admin backend. Do not forget to add pictures to your products to bring site visitors’ attention to your store.
|
templates/admin-head.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="head"><?php ecwid_embed_svg('ecwid_logo_symbol_RGB');?>
|
2 |
+
<h3>
|
3 |
+
<?php printf( __( '%s', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
4 |
+
</h3>
|
5 |
+
</div>
|
templates/advanced-settings.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<h2><?php printf( __( '%s
|
2 |
|
3 |
<div class="wrap">
|
4 |
<form class="pure-form pure-form-aligned ecwid-settings advanced-settings" method="POST" action="options.php">
|
@@ -41,7 +41,7 @@
|
|
41 |
|
42 |
|
43 |
<div class="note grayed-links">
|
44 |
-
<?php echo sprintf(__('Note: the new URLs will be automatically enabled for every store in one of upcoming updates so please make sure to check how the new URLs work in your store and <a %s>let us know</a> if you face any trouble with them', 'ecwid-shopping-cart'), ' target="_blank" href="' .
|
45 |
</div>
|
46 |
</div>
|
47 |
</div>
|
@@ -69,13 +69,13 @@
|
|
69 |
</label>
|
70 |
|
71 |
<div class="note">
|
72 |
-
<?php printf( __( 'Single Sign-On allows your customers to have a single login for your WordPress site and your %s
|
73 |
</div>
|
74 |
<?php if (!ecwid_is_paid_account()): ?>
|
75 |
<div class="upgrade-note">
|
76 |
<a
|
77 |
class="button ecwid-button button-green" target="_blank"
|
78 |
-
href="<?php echo Ecwid_Admin::get_dashboard_url();
|
79 |
<?php _e( 'Upgrade to get this feature', 'ecwid-shopping-cart' ); ?>
|
80 |
</a>
|
81 |
<div class="note grayed-links">
|
@@ -155,7 +155,7 @@
|
|
155 |
<?php ecwid_sync_do_page(); ?>
|
156 |
|
157 |
<div class="note grayed-links">
|
158 |
-
<?php echo sprintf(__('Please note this functionality is in beta. So if you run into difficulties or find problems with it, please <a %s>let us know</a>.', 'ecwid-shopping-cart'), ' target="_blank" href="' .
|
159 |
</div>
|
160 |
|
161 |
</fieldset>
|
1 |
+
<h2><?php printf( __( '%s — Advanced settings', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?></h2>
|
2 |
|
3 |
<div class="wrap">
|
4 |
<form class="pure-form pure-form-aligned ecwid-settings advanced-settings" method="POST" action="options.php">
|
41 |
|
42 |
|
43 |
<div class="note grayed-links">
|
44 |
+
<?php echo sprintf(__('Note: the new URLs will be automatically enabled for every store in one of upcoming updates so please make sure to check how the new URLs work in your store and <a %s>let us know</a> if you face any trouble with them', 'ecwid-shopping-cart'), ' target="_blank" href="' . Ecwid_Config::get_contact_us_url() . '"'); ?>
|
45 |
</div>
|
46 |
</div>
|
47 |
</div>
|
69 |
</label>
|
70 |
|
71 |
<div class="note">
|
72 |
+
<?php printf( __( 'Single Sign-On allows your customers to have a single login for your WordPress site and your %s. When someone logs in to your site, they will automatically be logged in to their customer account in your store as well with no need to enter their email/password again.', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ); ?>
|
73 |
</div>
|
74 |
<?php if (!ecwid_is_paid_account()): ?>
|
75 |
<div class="upgrade-note">
|
76 |
<a
|
77 |
class="button ecwid-button button-green" target="_blank"
|
78 |
+
href="<?php echo Ecwid_Admin::get_dashboard_url(); ?>&ecwid_page=<?php echo urlencode(ecwid_get_admin_iframe_upgrade_page()); ?>">
|
79 |
<?php _e( 'Upgrade to get this feature', 'ecwid-shopping-cart' ); ?>
|
80 |
</a>
|
81 |
<div class="note grayed-links">
|
155 |
<?php ecwid_sync_do_page(); ?>
|
156 |
|
157 |
<div class="note grayed-links">
|
158 |
+
<?php echo sprintf(__('Please note this functionality is in beta. So if you run into difficulties or find problems with it, please <a %s>let us know</a>.', 'ecwid-shopping-cart'), ' target="_blank" href="' . Ecwid_Config::get_contact_us_url() . '"'); ?>
|
159 |
</div>
|
160 |
|
161 |
</fieldset>
|
templates/connect.php
CHANGED
@@ -1,10 +1,7 @@
|
|
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 |
-
|
4 |
-
|
5 |
-
<?php printf( __( '%s Shopping Cart', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
6 |
-
</h3>
|
7 |
-
</div>
|
8 |
<div class="greeting-image">
|
9 |
<img src="<?php echo(esc_attr(ECWID_PLUGIN_URL)); ?>/images/store_inprogress.png" width="142" />
|
10 |
</div>
|
@@ -27,18 +24,29 @@
|
|
27 |
<?php printf( __( 'To sell using %1$s, you must allow WordPress to access the %1$s plugin. The connect button will direct you to your %1$s account where you can provide permission.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
28 |
</div>
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
<?php endif; ?>
|
31 |
|
|
|
32 |
<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>
|
33 |
<div class="note no-oauth">
|
34 |
-
<?php printf( __( 'Store ID is a unique identifier of your %1$s account. You can find it in your %1$s control panel: open the <a %2$s>Dashboard page</a> and find the "<b>Store ID: NNNNNNN</b>" text, where <b>NNNNNNN</b> is your Store ID.', 'ecwid-shopping-cart'), Ecwid_Config::get_brand(), 'href="https://
|
35 |
</div>
|
36 |
-
|
|
|
|
|
37 |
<div class="create-account-link">
|
38 |
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
|
39 |
<?php printf( __( "Don't have an %s account? Create one now.", 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
40 |
</a>
|
41 |
</div>
|
|
|
42 |
</div>
|
43 |
-
<?php
|
44 |
</div>
|
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 |
+
<?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
|
4 |
+
|
|
|
|
|
|
|
5 |
<div class="greeting-image">
|
6 |
<img src="<?php echo(esc_attr(ECWID_PLUGIN_URL)); ?>/images/store_inprogress.png" width="142" />
|
7 |
</div>
|
24 |
<?php printf( __( 'To sell using %1$s, you must allow WordPress to access the %1$s plugin. The connect button will direct you to your %1$s account where you can provide permission.', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
25 |
</div>
|
26 |
|
27 |
+
<?php else: ?>
|
28 |
+
|
29 |
+
<div class="note auth-error">
|
30 |
+
<span>
|
31 |
+
<?php _e( 'Connection error - after clicking button you need to login and accept permissions to use our plugin. Please, try again.', 'ecwid-shopping-cart' ); ?>
|
32 |
+
</span>
|
33 |
+
</div>
|
34 |
<?php endif; ?>
|
35 |
|
36 |
+
<?php if ($no_oauth): ?>
|
37 |
<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>
|
38 |
<div class="note no-oauth">
|
39 |
+
<?php printf( __( 'Store ID is a unique identifier of your %1$s account. You can find it in your %1$s control panel: open the <a %2$s>Dashboard page</a> and find the "<b>Store ID: NNNNNNN</b>" text, where <b>NNNNNNN</b> is your Store ID.', 'ecwid-shopping-cart'), Ecwid_Config::get_brand(), 'href="https://' . Ecwid_Config::get_cpanel_domain() . '/cp/CP.html?source=wporg#dashboard" target="_blank"' ); ?>
|
40 |
</div>
|
41 |
+
<?php endif; ?>
|
42 |
+
|
43 |
+
<?php if ( !Ecwid_Config::is_no_reg_wl() ): ?>
|
44 |
<div class="create-account-link">
|
45 |
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
|
46 |
<?php printf( __( "Don't have an %s account? Create one now.", 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
47 |
</a>
|
48 |
</div>
|
49 |
+
<?php endif; ?>
|
50 |
</div>
|
51 |
+
<?php require ECWID_PLUGIN_DIR . 'templates/admin-footer.php'; ?>
|
52 |
</div>
|
templates/dashboard.php
CHANGED
@@ -44,7 +44,7 @@
|
|
44 |
<a target="_blank" href="<?php echo Ecwid_Store_Page::get_store_url(); ?>"><?php _e('Visit storefront', 'ecwid-shopping-cart'); ?></a>
|
45 |
</li>
|
46 |
<li>
|
47 |
-
<a target="_blank" href="
|
48 |
</li>
|
49 |
</ul>
|
50 |
|
44 |
<a target="_blank" href="<?php echo Ecwid_Store_Page::get_store_url(); ?>"><?php _e('Visit storefront', 'ecwid-shopping-cart'); ?></a>
|
45 |
</li>
|
46 |
<li>
|
47 |
+
<a target="_blank" href="//<?php echo Ecwid_Config::get_cpanel_domain(); ?>/cp?source=wporg"><?php _e('Open control panel', 'ecwid-shopping-cart'); ?></a>
|
48 |
</li>
|
49 |
</ul>
|
50 |
|
templates/landing.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<div class="ecwid-button">
|
13 |
|
14 |
<button class="create-store-button btn btn-primary btn-large">
|
15 |
-
<?php printf( __( 'Create Free %s
|
16 |
</button>
|
17 |
<button class="create-store-loading btn btn-primary btn-large btn-loading">
|
18 |
<div class="loader">
|
@@ -129,7 +129,7 @@
|
|
129 |
</h2>
|
130 |
<div class="ecwid-button">
|
131 |
<button class="create-store-button btn btn-primary btn-large">
|
132 |
-
<?php printf( __( 'Create Free %s
|
133 |
</button>
|
134 |
<button class="create-store-loading btn btn-primary btn-large btn-loading">
|
135 |
<div class="loader">
|
12 |
<div class="ecwid-button">
|
13 |
|
14 |
<button class="create-store-button btn btn-primary btn-large">
|
15 |
+
<?php printf( __( 'Create Free %s', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ); ?>
|
16 |
</button>
|
17 |
<button class="create-store-loading btn btn-primary btn-large btn-loading">
|
18 |
<div class="loader">
|
129 |
</h2>
|
130 |
<div class="ecwid-button">
|
131 |
<button class="create-store-button btn btn-primary btn-large">
|
132 |
+
<?php printf( __( 'Create Free %s', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ); ?>
|
133 |
</button>
|
134 |
<button class="create-store-loading btn btn-primary btn-large btn-loading">
|
135 |
<div class="loader">
|
templates/reconnect-sso.php
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
<div class="wrap ecwid-admin ecwid-connect ecwid-reconnect-allow-sso">
|
2 |
<div class="box">
|
3 |
-
|
4 |
-
<h3>
|
5 |
-
<?php printf( __( '%s Shopping Cart', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
6 |
-
</h3>
|
7 |
-
</div>
|
8 |
|
9 |
<div class="main-wrap">
|
10 |
<div class="column">
|
1 |
<div class="wrap ecwid-admin ecwid-connect ecwid-reconnect-allow-sso">
|
2 |
<div class="box">
|
3 |
+
<?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
|
|
|
|
|
|
|
|
|
4 |
|
5 |
<div class="main-wrap">
|
6 |
<div class="column">
|
templates/reconnect.php
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
<div class="wrap ecwid-admin ecwid-connect ecwid-reconnect">
|
2 |
<div class="box">
|
3 |
-
|
4 |
-
|
5 |
-
<?php printf( __( '%s Shopping Cart', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
6 |
-
</h3>
|
7 |
-
</div>
|
8 |
<div class="greeting-image">
|
9 |
<img src="<?php echo(esc_attr(ECWID_PLUGIN_URL)); ?>/images/store_inprogress.png" width="142" />
|
10 |
</div>
|
1 |
<div class="wrap ecwid-admin ecwid-connect ecwid-reconnect">
|
2 |
<div class="box">
|
3 |
+
<?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
|
4 |
+
|
|
|
|
|
|
|
5 |
<div class="greeting-image">
|
6 |
<img src="<?php echo(esc_attr(ECWID_PLUGIN_URL)); ?>/images/store_inprogress.png" width="142" />
|
7 |
</div>
|