Version Description
- Update in the Single Sign On Module (Ecwid SSO). Single Sign-On allows your customers to have a single login for your WordPress site and your Ecwid store. We updated it to use the latest Ecwid ecommerce APIs to make it more convenient for you. Now the module doesn't require a separate API key it works seamlessly with no extra setup.
- Compatibility with Divi builder editor. Divi builder adds a nice WYSIWYG editor to the Wordpress admin. Ecwid shopping cart now is compatible with that editor so you can add Ecwid store shortcode right from the Divi builder editor, no need to switch back to the default Wordpress editor if you prefer to use the Divi's one.
- Fix for a bug in the store appearance popup. The store widgets settings were hidden when the "widgets" part was manually removed from the Ecwid shortcode in the page editor in Wordpress admin. We fixed that, now the settings popup should work fine.
- Slight improvements in Chameleon. The "Chameleon skin" option in the plugin Advanced settings automatically adjusts the store texts and styles to match those of your site. We continue improving it so that it works better with all sites.
- Fixed a bug with store pages duplicates. Previously, an extra Store page was created each time you deactivated and re-activated the plugin. It's fixed now the Ecwid plugin remembers the store page and use it however often you deactivate/activate the plugin.
- Slight layout improvements for the stores embedded into sites with Salient theme installed.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 4.5 |
Comparing to | |
See all releases |
Code changes from version 4.4.5 to 4.5
- css/divibuilder.css +6 -0
- css/settings.3.8.css +6 -0
- css/settings.css +23 -0
- css/themes/salient.css +3 -0
- ecwid-shopping-cart.php +133 -80
- images/star.svg +10 -0
- includes/class-ecwid-integration-divibuilder.php +91 -0
- includes/class-ecwid-oauth.php +19 -2
- includes/class-ecwid-store-editor.php +1 -0
- includes/themes.php +3 -1
- includes/themes/class-ecwid-theme-mfupdate.php +32 -0
- js/store-editor-page.js +14 -7
- languages/ecwid-shopping-cart-ru_RU.mo +0 -0
- languages/ecwid-shopping-cart-ru_RU.po +20 -12
- readme.txt +9 -1
- templates/admin-footer.php +1 -1
- templates/advanced-settings.php +42 -16
- templates/help.php +0 -2
css/divibuilder.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
.et-pb-all-modules .et_pb_ecwid:before,
|
3 |
+
.et_pb_saved_layouts_list .et_pb_ecwid:before{
|
4 |
+
font-family: ecwid-plugin-icons;
|
5 |
+
content: "\e603";
|
6 |
+
}
|
css/settings.3.8.css
CHANGED
@@ -51,6 +51,11 @@
|
|
51 |
background: #cacaca;
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
54 |
@media screen and (max-width: 782px) {
|
55 |
.ecwid-settings.general-settings,
|
56 |
.ecwid-settings.appearance-settings,
|
@@ -224,5 +229,6 @@
|
|
224 |
.ecwid-settings .pure-control-group.checkbox label {
|
225 |
display: inline-block;
|
226 |
}
|
|
|
227 |
}
|
228 |
|
51 |
background: #cacaca;
|
52 |
}
|
53 |
|
54 |
+
|
55 |
+
.ecwid-settings .pure-control-group.checkbox label.disabled {
|
56 |
+
color: #999;
|
57 |
+
}
|
58 |
+
|
59 |
@media screen and (max-width: 782px) {
|
60 |
.ecwid-settings.general-settings,
|
61 |
.ecwid-settings.appearance-settings,
|
229 |
.ecwid-settings .pure-control-group.checkbox label {
|
230 |
display: inline-block;
|
231 |
}
|
232 |
+
|
233 |
}
|
234 |
|
css/settings.css
CHANGED
@@ -729,6 +729,29 @@ display: none;
|
|
729 |
font-size: 36px;
|
730 |
}
|
731 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
|
733 |
@media screen and (max-width: 960px) {
|
734 |
.ecwid-popup {
|
729 |
font-size: 36px;
|
730 |
}
|
731 |
|
732 |
+
.ecwid-button.button-green {
|
733 |
+
background: #29b80a;
|
734 |
+
color: white;
|
735 |
+
border-color: #199806;
|
736 |
+
padding: 0 10px;
|
737 |
+
margin-top: 10px;
|
738 |
+
}
|
739 |
+
|
740 |
+
.ecwid-button.button-green:hover {
|
741 |
+
background: #2cc40b;
|
742 |
+
color: white;
|
743 |
+
}
|
744 |
+
|
745 |
+
label.premium-feature svg {
|
746 |
+
height: 10px;
|
747 |
+
width: 10px;
|
748 |
+
display:inline-block;
|
749 |
+
}
|
750 |
+
|
751 |
+
label.premium-feature svg path {
|
752 |
+
fill: #f9af17;
|
753 |
+
}
|
754 |
+
|
755 |
|
756 |
@media screen and (max-width: 960px) {
|
757 |
.ecwid-popup {
|
css/themes/salient.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
label span.ecwid-productBrowser-details-optionRadioButton-name {
|
2 |
+
color: inherit !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: 4.
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
@@ -15,6 +15,7 @@ register_uninstall_hook( __FILE__, 'ecwid_uninstall' );
|
|
15 |
|
16 |
define("APP_ECWID_COM", 'app.ecwid.com');
|
17 |
define("ECWID_DEMO_STORE_ID", 1003);
|
|
|
18 |
|
19 |
define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
|
20 |
|
@@ -126,7 +127,8 @@ function ecwid_init_integrations()
|
|
126 |
|
127 |
$integrations = array(
|
128 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
129 |
-
'wpseo' => 'wordpress-seo/wp-seo.php'
|
|
|
130 |
);
|
131 |
|
132 |
foreach ($integrations as $key => $plugin) {
|
@@ -305,6 +307,8 @@ function ecwid_enqueue_external_chameleon() {
|
|
305 |
$localize['primary_link'] = get_option('ecwid_chameleon_links');
|
306 |
}
|
307 |
|
|
|
|
|
308 |
if (!empty( $localize )) {
|
309 |
wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', $localize);
|
310 |
}
|
@@ -326,7 +330,8 @@ function ecwid_enqueue_builtin_chameleon() {
|
|
326 |
$colors = 'auto';
|
327 |
}
|
328 |
wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', array(
|
329 |
-
'colors' => $colors
|
|
|
330 |
));
|
331 |
}
|
332 |
|
@@ -501,11 +506,8 @@ function ecwid_check_version()
|
|
501 |
add_option('ecwid_chameleon_colors_price', '');
|
502 |
}
|
503 |
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
if ($has_woo) {
|
508 |
-
add_option('ecwid_extended_help', true);
|
509 |
}
|
510 |
}
|
511 |
}
|
@@ -1044,10 +1046,10 @@ function ecwid_content_started($content)
|
|
1044 |
|
1045 |
function ecwid_wrap_shortcode_content($content, $name, $attrs)
|
1046 |
{
|
1047 |
-
return "<!-- Ecwid shopping cart plugin v 4.
|
1048 |
. ecwid_get_scriptjs_code(@$attrs['lang'])
|
1049 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
1050 |
-
. "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.
|
1051 |
}
|
1052 |
|
1053 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
@@ -1284,15 +1286,17 @@ function ecwid_install_theme() {
|
|
1284 |
|
1285 |
function ecwid_shortcode($attributes)
|
1286 |
{
|
|
|
|
|
1287 |
$attributes = shortcode_atts(
|
1288 |
array(
|
1289 |
'widgets' => 'productbrowser',
|
1290 |
'categories_per_row' => '3',
|
1291 |
'category_view' => 'grid',
|
1292 |
'search_view' => 'grid',
|
1293 |
-
'grid' => '
|
1294 |
-
'list' => '
|
1295 |
-
'table' => '
|
1296 |
'minicart_layout' => 'MiniAttachToProductBrowser',
|
1297 |
'default_category_id' => 0,
|
1298 |
'lang' => ''
|
@@ -1330,6 +1334,8 @@ function ecwid_shortcode($attributes)
|
|
1330 |
|
1331 |
update_option('ecwid_store_shortcode_used', time());
|
1332 |
|
|
|
|
|
1333 |
return $result;
|
1334 |
}
|
1335 |
|
@@ -1375,20 +1381,22 @@ function ecwid_productbrowser_shortcode($shortcode_params) {
|
|
1375 |
? $shortcode_params['default_category_id']
|
1376 |
: get_option('ecwid_default_category_id');
|
1377 |
|
|
|
|
|
1378 |
if (empty($ecwid_pb_categoriesperrow)) {
|
1379 |
$ecwid_pb_categoriesperrow = 3;
|
1380 |
}
|
1381 |
if (empty($ecwid_pb_productspercolumn_grid)) {
|
1382 |
-
$ecwid_pb_productspercolumn_grid =
|
1383 |
}
|
1384 |
if (empty($ecwid_pb_productsperrow_grid)) {
|
1385 |
-
$ecwid_pb_productsperrow_grid =
|
1386 |
}
|
1387 |
if (empty($ecwid_pb_productsperpage_list)) {
|
1388 |
-
$ecwid_pb_productsperpage_list =
|
1389 |
}
|
1390 |
if (empty($ecwid_pb_productsperpage_table)) {
|
1391 |
-
$ecwid_pb_productsperpage_table =
|
1392 |
}
|
1393 |
|
1394 |
if (empty($ecwid_pb_defaultview) || !in_array($ecwid_pb_defaultview, $list_of_views)) {
|
@@ -1503,8 +1511,9 @@ function ecwid_store_activate() {
|
|
1503 |
Ecwid_Kissmetrics::record('firstactivated');
|
1504 |
}
|
1505 |
$my_post = array();
|
|
|
1506 |
$content = <<<EOT
|
1507 |
-
[ecwid widgets="productbrowser minicart categories search" grid="
|
1508 |
EOT;
|
1509 |
add_option("ecwid_store_page_id", '', '', 'yes');
|
1510 |
add_option("ecwid_store_page_id_auto", '', '', 'yes');
|
@@ -1517,10 +1526,10 @@ EOT;
|
|
1517 |
|
1518 |
add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
|
1519 |
|
1520 |
-
add_option("ecwid_pb_productspercolumn_grid", '
|
1521 |
-
add_option("ecwid_pb_productsperrow_grid", '
|
1522 |
-
add_option("ecwid_pb_productsperpage_list", '
|
1523 |
-
add_option("ecwid_pb_productsperpage_table", '
|
1524 |
|
1525 |
add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
|
1526 |
add_option("ecwid_pb_searchview", 'list', '', 'yes');
|
@@ -1550,12 +1559,23 @@ EOT;
|
|
1550 |
if (!empty($id) and ($id > 0)) {
|
1551 |
$_tmp_page = get_post($id);
|
1552 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1553 |
if ($_tmp_page !== null) {
|
1554 |
$my_post = array();
|
1555 |
$my_post['ID'] = $id;
|
1556 |
$my_post['post_status'] = 'publish';
|
1557 |
wp_update_post( $my_post );
|
1558 |
|
|
|
|
|
|
|
|
|
1559 |
} else {
|
1560 |
ecwid_load_textdomain();
|
1561 |
$my_post['post_title'] = __('Store', 'ecwid-shopping-cart');
|
@@ -1653,8 +1673,8 @@ function ecwid_uninstall() {
|
|
1653 |
delete_option("ecwid_installation_date");
|
1654 |
delete_option('ecwid_hide_appearance_menu');
|
1655 |
|
1656 |
-
|
1657 |
-
|
1658 |
|
1659 |
Ecwid_Kissmetrics::record('wpPluginUninstalled');
|
1660 |
}
|
@@ -1859,6 +1879,7 @@ function ecwid_settings_api_init() {
|
|
1859 |
register_setting( 'ecwid_options_page', 'ecwid_use_chameleon' );
|
1860 |
register_setting( 'ecwid_options_page', 'ecwid_use_new_horizontal_categories' );
|
1861 |
register_setting( 'ecwid_options_page', 'ecwid_use_new_search' );
|
|
|
1862 |
break;
|
1863 |
}
|
1864 |
|
@@ -1867,6 +1888,10 @@ function ecwid_settings_api_init() {
|
|
1867 |
} else if (!get_option('ecwid_use_chameleon') && @$_POST['ecwid_use_chameleon']) {
|
1868 |
Ecwid_Kissmetrics::record('chameleonSkinOn');
|
1869 |
}
|
|
|
|
|
|
|
|
|
1870 |
}
|
1871 |
|
1872 |
if (isset($_POST['ecwid_store_id'])) {
|
@@ -1874,7 +1899,6 @@ function ecwid_settings_api_init() {
|
|
1874 |
update_option('ecwid_api_check_time', 0);
|
1875 |
update_option('ecwid_last_oauth_fail_time', 0);
|
1876 |
}
|
1877 |
-
|
1878 |
}
|
1879 |
|
1880 |
function ecwid_common_admin_scripts() {
|
@@ -2066,6 +2090,14 @@ function ecwid_admin_do_page( $page ) {
|
|
2066 |
}
|
2067 |
global $ecwid_oauth;
|
2068 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2069 |
if ($page == 'dashboard') {
|
2070 |
$show_reconnect = true;
|
2071 |
if (isset($_GET['just-created'])) {
|
@@ -2146,7 +2178,7 @@ function ecwid_process_oauth_params() {
|
|
2146 |
$ecwid_oauth->update_state( array( 'mode' => 'connect' ) );
|
2147 |
}
|
2148 |
|
2149 |
-
if ($is_reconnect) {
|
2150 |
$ecwid_oauth->update_state( array(
|
2151 |
'mode' => 'reconnect',
|
2152 |
// explicitly set to empty array if not available to reset current state
|
@@ -2176,7 +2208,12 @@ function ecwid_admin_post_connect()
|
|
2176 |
|
2177 |
if (ecwid_test_oauth(true)) {
|
2178 |
|
2179 |
-
|
|
|
|
|
|
|
|
|
|
|
2180 |
} else if (!isset($_GET['reconnect'])) {
|
2181 |
wp_redirect('admin.php?page=ecwid&oauth=no&connection_error');
|
2182 |
} else {
|
@@ -2231,9 +2268,26 @@ function ecwid_get_categories_for_selector() {
|
|
2231 |
function ecwid_advanced_settings_do_page() {
|
2232 |
$categories = ecwid_get_categories_for_selector();
|
2233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2234 |
require_once ECWID_PLUGIN_DIR . 'templates/advanced-settings.php';
|
2235 |
}
|
2236 |
|
|
|
|
|
|
|
|
|
2237 |
function ecwid_appearance_settings_do_page() {
|
2238 |
|
2239 |
wp_register_script('ecwid-appearance-js', ECWID_PLUGIN_URL . 'js/appearance.js', array(), get_option('ecwid_plugin_version'), true);
|
@@ -2551,7 +2605,7 @@ function ecwid_get_wp_install_date( ) {
|
|
2551 |
global $wpdb;
|
2552 |
$oldest_user = strtotime( $wpdb->get_var( "SELECT min(`user_registered`) FROM {$wpdb->users}" ) );
|
2553 |
$oldest_post = strtotime( $wpdb->get_var( "SELECT min(`post_date`) FROM {$wpdb->posts}" ) );
|
2554 |
-
$wpconfig_create = filectime( ABSPATH . '/wp-config.php' );
|
2555 |
|
2556 |
$wp_date = min( $oldest_user, $oldest_post, $wpconfig_create );
|
2557 |
update_option( 'ecwid_wp_install_date', $wp_date );
|
@@ -2579,14 +2633,24 @@ function ecwid_check_for_remote_connection_errors()
|
|
2579 |
return $results;
|
2580 |
}
|
2581 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2582 |
function ecwid_sso() {
|
2583 |
-
$key = get_option('ecwid_sso_secret_key');
|
2584 |
-
if (empty($key)) {
|
2585 |
-
return "";
|
2586 |
-
}
|
2587 |
|
2588 |
-
|
2589 |
|
|
|
2590 |
|
2591 |
$signin_url = wp_login_url(ecwid_get_store_page_url());
|
2592 |
$signout_url = wp_logout_url(ecwid_get_store_page_url());
|
@@ -2602,59 +2666,40 @@ window.Ecwid.OnAPILoaded.add(function() {
|
|
2602 |
});
|
2603 |
JS;
|
2604 |
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
$sign_in_out_urls = <<<JS
|
2609 |
-
window.EcwidSignInUrl = '$signin_url';
|
2610 |
-
window.EcwidSignOutUrl = '$signout_url';
|
2611 |
-
window.Ecwid.OnAPILoaded.add(function() {
|
2612 |
-
|
2613 |
-
window.Ecwid.setSignInUrls({
|
2614 |
-
signInUrl: '$signin_url',
|
2615 |
-
signOutUrl: '$signout_url'
|
2616 |
-
});
|
2617 |
-
|
2618 |
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
canSignIn: true
|
2629 |
-
});
|
2630 |
|
2631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2632 |
|
|
|
|
|
|
|
2633 |
|
2634 |
-
|
2635 |
-
*/
|
2636 |
-
$ecwid_sso_profile = '';
|
2637 |
-
if ($current_user->ID) {
|
2638 |
-
$meta = get_user_meta($current_user->ID);
|
2639 |
|
2640 |
|
2641 |
-
|
2642 |
-
'appId' => "wp_" . get_ecwid_store_id(),
|
2643 |
-
'userId' => "{$current_user->ID}",
|
2644 |
-
'profile' => array(
|
2645 |
-
'email' => $current_user->user_email,
|
2646 |
-
'billingPerson' => array(
|
2647 |
-
'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
|
2648 |
-
)
|
2649 |
-
)
|
2650 |
-
);
|
2651 |
-
$user_data = base64_encode(json_encode($user_data));
|
2652 |
-
$time = time();
|
2653 |
-
$hmac = ecwid_hmacsha1("$user_data $time", $key);
|
2654 |
-
|
2655 |
-
$ecwid_sso_profile ="$user_data $hmac $time";
|
2656 |
}
|
2657 |
|
|
|
2658 |
return <<<HTML
|
2659 |
<script data-cfasync="false" type="text/javascript">
|
2660 |
|
@@ -2702,6 +2747,15 @@ function ecwid_can_display_html_catalog()
|
|
2702 |
return $profile['closed'] != true;
|
2703 |
}
|
2704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2705 |
function ecwid_is_paid_account()
|
2706 |
{
|
2707 |
return ecwid_is_api_enabled() && get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
|
@@ -2713,8 +2767,7 @@ function ecwid_is_api_enabled()
|
|
2713 |
$ecwid_api_check_time = get_option('ecwid_api_check_time');
|
2714 |
$now = time();
|
2715 |
|
2716 |
-
if ( $now > ($ecwid_api_check_time +
|
2717 |
-
// check whether API is available once in 3 hours
|
2718 |
$ecwid = ecwid_new_product_api();
|
2719 |
|
2720 |
$ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
|
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.5
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
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 |
|
20 |
define ('ECWID_TRIMMED_DESCRIPTION_LENGTH', 160);
|
21 |
|
127 |
|
128 |
$integrations = array(
|
129 |
'aiosp' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
|
130 |
+
'wpseo' => 'wordpress-seo/wp-seo.php',
|
131 |
+
'divibuilder' => 'divi-builder/divi-builder.php'
|
132 |
);
|
133 |
|
134 |
foreach ($integrations as $key => $plugin) {
|
307 |
$localize['primary_link'] = get_option('ecwid_chameleon_links');
|
308 |
}
|
309 |
|
310 |
+
$localize['font'] = 'auto';
|
311 |
+
|
312 |
if (!empty( $localize )) {
|
313 |
wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', $localize);
|
314 |
}
|
330 |
$colors = 'auto';
|
331 |
}
|
332 |
wp_localize_script('ecwid-chameleon-js', 'ecwidChameleon', array(
|
333 |
+
'colors' => $colors,
|
334 |
+
'font' => 'auto'
|
335 |
));
|
336 |
}
|
337 |
|
506 |
add_option('ecwid_chameleon_colors_price', '');
|
507 |
}
|
508 |
|
509 |
+
if (ecwid_migrations_is_original_plugin_version_older_than('4.4.5')) {
|
510 |
+
add_option('ecwid_enable_sso');
|
|
|
|
|
|
|
511 |
}
|
512 |
}
|
513 |
}
|
1046 |
|
1047 |
function ecwid_wrap_shortcode_content($content, $name, $attrs)
|
1048 |
{
|
1049 |
+
return "<!-- Ecwid shopping cart plugin v 4.5 --><!-- noptimize -->"
|
1050 |
. ecwid_get_scriptjs_code(@$attrs['lang'])
|
1051 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
1052 |
+
. "<!-- /noptimize --><!-- END Ecwid Shopping Cart v 4.5 -->";
|
1053 |
}
|
1054 |
|
1055 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
1286 |
|
1287 |
function ecwid_shortcode($attributes)
|
1288 |
{
|
1289 |
+
$defaults = ecwid_get_default_pb_size();
|
1290 |
+
|
1291 |
$attributes = shortcode_atts(
|
1292 |
array(
|
1293 |
'widgets' => 'productbrowser',
|
1294 |
'categories_per_row' => '3',
|
1295 |
'category_view' => 'grid',
|
1296 |
'search_view' => 'grid',
|
1297 |
+
'grid' => $defaults['grid_rows'] . ',' . $defaults['grid_columns'],
|
1298 |
+
'list' => $defaults['list_rows'],
|
1299 |
+
'table' => $defaults['table_rows'],
|
1300 |
'minicart_layout' => 'MiniAttachToProductBrowser',
|
1301 |
'default_category_id' => 0,
|
1302 |
'lang' => ''
|
1334 |
|
1335 |
update_option('ecwid_store_shortcode_used', time());
|
1336 |
|
1337 |
+
$result = apply_filters('ecwid_shortcode_content', $result);
|
1338 |
+
|
1339 |
return $result;
|
1340 |
}
|
1341 |
|
1381 |
? $shortcode_params['default_category_id']
|
1382 |
: get_option('ecwid_default_category_id');
|
1383 |
|
1384 |
+
$defaults = ecwid_get_default_pb_size();
|
1385 |
+
|
1386 |
if (empty($ecwid_pb_categoriesperrow)) {
|
1387 |
$ecwid_pb_categoriesperrow = 3;
|
1388 |
}
|
1389 |
if (empty($ecwid_pb_productspercolumn_grid)) {
|
1390 |
+
$ecwid_pb_productspercolumn_grid = $defaults['grid_rows'];
|
1391 |
}
|
1392 |
if (empty($ecwid_pb_productsperrow_grid)) {
|
1393 |
+
$ecwid_pb_productsperrow_grid = $defaults['grid_columns'];
|
1394 |
}
|
1395 |
if (empty($ecwid_pb_productsperpage_list)) {
|
1396 |
+
$ecwid_pb_productsperpage_list = $defaults['list_rows'];
|
1397 |
}
|
1398 |
if (empty($ecwid_pb_productsperpage_table)) {
|
1399 |
+
$ecwid_pb_productsperpage_table = $defaults['list_rows'];
|
1400 |
}
|
1401 |
|
1402 |
if (empty($ecwid_pb_defaultview) || !in_array($ecwid_pb_defaultview, $list_of_views)) {
|
1511 |
Ecwid_Kissmetrics::record('firstactivated');
|
1512 |
}
|
1513 |
$my_post = array();
|
1514 |
+
$defaults = ecwid_get_default_pb_size();
|
1515 |
$content = <<<EOT
|
1516 |
+
[ecwid widgets="productbrowser minicart categories search" grid="$defaults[grid_rows],$defaults[grid_columns]" list="$defaults[list_rows]" table="$defaults[table_rows]" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]
|
1517 |
EOT;
|
1518 |
add_option("ecwid_store_page_id", '', '', 'yes');
|
1519 |
add_option("ecwid_store_page_id_auto", '', '', 'yes');
|
1526 |
|
1527 |
add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
|
1528 |
|
1529 |
+
add_option("ecwid_pb_productspercolumn_grid", $defaults['grid_rows'], '', 'yes');
|
1530 |
+
add_option("ecwid_pb_productsperrow_grid", $defaults['grid_columns'], '', 'yes');
|
1531 |
+
add_option("ecwid_pb_productsperpage_list", $defaults['list_rows'], '', 'yes');
|
1532 |
+
add_option("ecwid_pb_productsperpage_table", $defaults['table_rows'], '', 'yes');
|
1533 |
|
1534 |
add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
|
1535 |
add_option("ecwid_pb_searchview", 'list', '', 'yes');
|
1559 |
if (!empty($id) and ($id > 0)) {
|
1560 |
$_tmp_page = get_post($id);
|
1561 |
}
|
1562 |
+
if (is_null($_tmp_page)) {
|
1563 |
+
$id = get_option('ecwid_store_page_id_auto');
|
1564 |
+
|
1565 |
+
if (!empty($id) and ($id > 0)) {
|
1566 |
+
$_tmp_page = get_post($id);
|
1567 |
+
}
|
1568 |
+
}
|
1569 |
if ($_tmp_page !== null) {
|
1570 |
$my_post = array();
|
1571 |
$my_post['ID'] = $id;
|
1572 |
$my_post['post_status'] = 'publish';
|
1573 |
wp_update_post( $my_post );
|
1574 |
|
1575 |
+
if ($id == get_option('ecwid_store_page_id_auto')) {
|
1576 |
+
update_option('ecwid_store_page_id', $id);
|
1577 |
+
}
|
1578 |
+
|
1579 |
} else {
|
1580 |
ecwid_load_textdomain();
|
1581 |
$my_post['post_title'] = __('Store', 'ecwid-shopping-cart');
|
1673 |
delete_option("ecwid_installation_date");
|
1674 |
delete_option('ecwid_hide_appearance_menu');
|
1675 |
|
1676 |
+
delete_option("ecwid_plugin_version");
|
1677 |
+
delete_option("ecwid_use_chameleon");
|
1678 |
|
1679 |
Ecwid_Kissmetrics::record('wpPluginUninstalled');
|
1680 |
}
|
1879 |
register_setting( 'ecwid_options_page', 'ecwid_use_chameleon' );
|
1880 |
register_setting( 'ecwid_options_page', 'ecwid_use_new_horizontal_categories' );
|
1881 |
register_setting( 'ecwid_options_page', 'ecwid_use_new_search' );
|
1882 |
+
register_setting( 'ecwid_options_page', 'ecwid_is_sso_enabled' );
|
1883 |
break;
|
1884 |
}
|
1885 |
|
1888 |
} else if (!get_option('ecwid_use_chameleon') && @$_POST['ecwid_use_chameleon']) {
|
1889 |
Ecwid_Kissmetrics::record('chameleonSkinOn');
|
1890 |
}
|
1891 |
+
|
1892 |
+
if ($_POST['settings_section'] == 'advanced' && !@$_POST['ecwid_is_sso_enabled']) {
|
1893 |
+
update_option('ecwid_sso_secret_key', '');
|
1894 |
+
}
|
1895 |
}
|
1896 |
|
1897 |
if (isset($_POST['ecwid_store_id'])) {
|
1899 |
update_option('ecwid_api_check_time', 0);
|
1900 |
update_option('ecwid_last_oauth_fail_time', 0);
|
1901 |
}
|
|
|
1902 |
}
|
1903 |
|
1904 |
function ecwid_common_admin_scripts() {
|
2090 |
}
|
2091 |
global $ecwid_oauth;
|
2092 |
|
2093 |
+
if ($_GET['ecwid_page']) {
|
2094 |
+
$page = $_GET['ecwid_page'];
|
2095 |
+
}
|
2096 |
+
|
2097 |
+
if ($page == ecwid_get_admin_iframe_upgrade_page()) {
|
2098 |
+
update_option('ecwid_api_check_time', time() - ECWID_API_AVAILABILITY_CHECK_TIME + 10 * 60);
|
2099 |
+
}
|
2100 |
+
|
2101 |
if ($page == 'dashboard') {
|
2102 |
$show_reconnect = true;
|
2103 |
if (isset($_GET['just-created'])) {
|
2178 |
$ecwid_oauth->update_state( array( 'mode' => 'connect' ) );
|
2179 |
}
|
2180 |
|
2181 |
+
if ($is_reconnect && !isset($_GET['api_v3_sso'])) {
|
2182 |
$ecwid_oauth->update_state( array(
|
2183 |
'mode' => 'reconnect',
|
2184 |
// explicitly set to empty array if not available to reset current state
|
2208 |
|
2209 |
if (ecwid_test_oauth(true)) {
|
2210 |
|
2211 |
+
if (@isset($_GET['api_v3_sso'])) {
|
2212 |
+
$ecwid_oauth->update_state(array('mode' => 'reconnect', 'return_url' => 'admin.php?page=ecwid-advanced'));
|
2213 |
+
wp_redirect($ecwid_oauth->get_sso_reconnect_dialog_url());
|
2214 |
+
} else {
|
2215 |
+
wp_redirect( $ecwid_oauth->get_auth_dialog_url() );
|
2216 |
+
}
|
2217 |
} else if (!isset($_GET['reconnect'])) {
|
2218 |
wp_redirect('admin.php?page=ecwid&oauth=no&connection_error');
|
2219 |
} else {
|
2268 |
function ecwid_advanced_settings_do_page() {
|
2269 |
$categories = ecwid_get_categories_for_selector();
|
2270 |
|
2271 |
+
$is_sso_enabled = ecwid_is_sso_enabled();
|
2272 |
+
|
2273 |
+
global $ecwid_oauth;
|
2274 |
+
|
2275 |
+
$has_create_customers_scope = $ecwid_oauth->has_scope('create_customers');
|
2276 |
+
|
2277 |
+
$key = get_option('ecwid_sso_secret_key');
|
2278 |
+
|
2279 |
+
$is_sso_checkbox_disabled = !$is_sso_enabled && !$has_create_customers_scope && empty($key);
|
2280 |
+
|
2281 |
+
|
2282 |
+
$reconnect_link = admin_url('admin-post.php?action=ecwid_connect&reconnect&api_v3_sso');
|
2283 |
+
|
2284 |
require_once ECWID_PLUGIN_DIR . 'templates/advanced-settings.php';
|
2285 |
}
|
2286 |
|
2287 |
+
function ecwid_get_admin_iframe_upgrade_page() {
|
2288 |
+
return 'billing:feature=sso&plan=ecwid_venture';
|
2289 |
+
}
|
2290 |
+
|
2291 |
function ecwid_appearance_settings_do_page() {
|
2292 |
|
2293 |
wp_register_script('ecwid-appearance-js', ECWID_PLUGIN_URL . 'js/appearance.js', array(), get_option('ecwid_plugin_version'), true);
|
2605 |
global $wpdb;
|
2606 |
$oldest_user = strtotime( $wpdb->get_var( "SELECT min(`user_registered`) FROM {$wpdb->users}" ) );
|
2607 |
$oldest_post = strtotime( $wpdb->get_var( "SELECT min(`post_date`) FROM {$wpdb->posts}" ) );
|
2608 |
+
$wpconfig_create = @filectime( ABSPATH . '/wp-config.php' );
|
2609 |
|
2610 |
$wp_date = min( $oldest_user, $oldest_post, $wpconfig_create );
|
2611 |
update_option( 'ecwid_wp_install_date', $wp_date );
|
2633 |
return $results;
|
2634 |
}
|
2635 |
|
2636 |
+
function ecwid_is_sso_enabled() {
|
2637 |
+
global $ecwid_oauth;
|
2638 |
+
|
2639 |
+
$is_sso_enabled = false;
|
2640 |
+
|
2641 |
+
$is_apiv3_sso = ecwid_is_paid_account() && get_option('ecwid_is_sso_enabled') && $ecwid_oauth->has_scope('create_customers');
|
2642 |
+
$is_apiv1_sso = ecwid_is_paid_account() && get_option('ecwid_sso_secret_key');
|
2643 |
+
|
2644 |
+
$is_sso_enabled = $is_apiv3_sso || $is_apiv1_sso;
|
2645 |
+
|
2646 |
+
return $is_sso_enabled;
|
2647 |
+
}
|
2648 |
+
|
2649 |
function ecwid_sso() {
|
|
|
|
|
|
|
|
|
2650 |
|
2651 |
+
if (!ecwid_is_sso_enabled()) return;
|
2652 |
|
2653 |
+
$current_user = wp_get_current_user();
|
2654 |
|
2655 |
$signin_url = wp_login_url(ecwid_get_store_page_url());
|
2656 |
$signout_url = wp_logout_url(ecwid_get_store_page_url());
|
2666 |
});
|
2667 |
JS;
|
2668 |
|
2669 |
+
$ecwid_sso_profile = '';
|
2670 |
+
if ($current_user->ID) {
|
2671 |
+
$meta = get_user_meta($current_user->ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2672 |
|
2673 |
+
$user_data = array(
|
2674 |
+
'userId' => "{$current_user->ID}",
|
2675 |
+
'profile' => array(
|
2676 |
+
'email' => $current_user->user_email,
|
2677 |
+
'billingPerson' => array(
|
2678 |
+
'name' => $meta['first_name'][0] . ' ' . $meta['last_name'][0]
|
2679 |
+
)
|
2680 |
+
)
|
2681 |
+
);
|
|
|
|
|
2682 |
|
2683 |
+
global $ecwid_oauth;
|
2684 |
+
if ($ecwid_oauth->has_scope('create_customers')) {
|
2685 |
+
$key = Ecwid_Api_V3::CLIENT_SECRET;
|
2686 |
+
$user_data['appClientId'] = Ecwid_Api_V3::CLIENT_ID;
|
2687 |
+
} else {
|
2688 |
+
$key = get_option('ecwid_sso_secret_key');
|
2689 |
+
$user_data['appId'] = "wp_" . get_ecwid_store_id();
|
2690 |
+
}
|
2691 |
|
2692 |
+
$user_data_encoded = base64_encode(json_encode($user_data));
|
2693 |
+
$time = time();
|
2694 |
+
$hmac = ecwid_hmacsha1("$user_data_encoded $time", $key);
|
2695 |
|
2696 |
+
$ecwid_sso_profile = "$user_data_encoded $hmac $time";
|
|
|
|
|
|
|
|
|
2697 |
|
2698 |
|
2699 |
+
//die(var_dump($user_data, json_encode($user_data), $ecwid_sso_profile));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2700 |
}
|
2701 |
|
2702 |
+
|
2703 |
return <<<HTML
|
2704 |
<script data-cfasync="false" type="text/javascript">
|
2705 |
|
2747 |
return $profile['closed'] != true;
|
2748 |
}
|
2749 |
|
2750 |
+
function ecwid_get_default_pb_size() {
|
2751 |
+
return array(
|
2752 |
+
'grid_rows' => 10,
|
2753 |
+
'grid_columns' => 3,
|
2754 |
+
'list_rows' => 60,
|
2755 |
+
'table_rows' => 60
|
2756 |
+
);
|
2757 |
+
}
|
2758 |
+
|
2759 |
function ecwid_is_paid_account()
|
2760 |
{
|
2761 |
return ecwid_is_api_enabled() && get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
|
2767 |
$ecwid_api_check_time = get_option('ecwid_api_check_time');
|
2768 |
$now = time();
|
2769 |
|
2770 |
+
if ( $now > ($ecwid_api_check_time + ECWID_API_AVAILABILITY_CHECK_TIME) && get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
|
|
|
2771 |
$ecwid = ecwid_new_product_api();
|
2772 |
|
2773 |
$ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
|
images/star.svg
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
viewBox="0 0 26 26" enable-background="new 0 0 26 26" xml:space="preserve">
|
6 |
+
<path fill="#333333" d="M20.39,25c-0.17,0-0.34-0.04-0.49-0.12L13,21.37l-6.9,3.51C5.75,25.06,5.32,25.03,5,24.8
|
7 |
+
c-0.32-0.23-0.49-0.61-0.42-1l1.32-7.44l-5.58-5.27c-0.29-0.27-0.39-0.67-0.27-1.04C0.18,9.7,0.5,9.43,0.9,9.37l7.71-1.09l3.45-6.77
|
8 |
+
c0.35-0.69,1.53-0.69,1.88,0l3.45,6.77l7.71,1.08c0.4,0.06,0.72,0.32,0.85,0.69c0.12,0.37,0.02,0.77-0.27,1.04l-5.58,5.27l1.28,7.24
|
9 |
+
c0.05,0.11,0.07,0.24,0.07,0.37c0,0.56-0.47,1.02-1.05,1.02C20.4,25,20.39,25,20.39,25z"/>
|
10 |
+
</svg>
|
includes/class-ecwid-integration-divibuilder.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ecwid_Integration_Divibuilder {
|
4 |
+
public function __construct() {
|
5 |
+
if (is_admin()) {
|
6 |
+
add_action('admin_init', 'ecwid_create_divi_module' );
|
7 |
+
wp_enqueue_style('ecwid-divi', ECWID_PLUGIN_URL . '/css/divibuilder.css', array('et_pb_admin_css'));
|
8 |
+
} else {
|
9 |
+
add_action('wp', 'ecwid_create_divi_module' );
|
10 |
+
}
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
new Ecwid_Integration_Divibuilder();
|
15 |
+
|
16 |
+
function ecwid_create_divi_module() {
|
17 |
+
|
18 |
+
if ( class_exists( 'ET_Builder_Module' ) && ! class_exists( 'ET_Builder_Module_Ecwid' ) ) {
|
19 |
+
class ET_Builder_Module_Ecwid extends ET_Builder_Module {
|
20 |
+
function init() {
|
21 |
+
$this->name = __( 'Ecwid', 'et_builder' );
|
22 |
+
$this->slug = 'et_pb_ecwid';
|
23 |
+
$this->use_row_content = TRUE;
|
24 |
+
$this->decode_entities = TRUE;
|
25 |
+
|
26 |
+
$this->whitelisted_fields = array(
|
27 |
+
'raw_content',
|
28 |
+
'admin_label',
|
29 |
+
'module_id',
|
30 |
+
'module_class',
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
function get_fields() {
|
35 |
+
$fields = array(
|
36 |
+
'raw_content' => array(
|
37 |
+
'label' => __( 'Content', 'et_builder' ),
|
38 |
+
'type' => 'text',
|
39 |
+
'option_category' => 'basic_option',
|
40 |
+
'description' => __( 'Here you can create the content that will be used within the module.', 'et_builder' ),
|
41 |
+
'default' => '[ecwid widgets="productbrowser minicart categories search" grid="3,3" list="10" table="20" default_category_id="0" category_view="grid" search_view="grid" minicart_layout="MiniAttachToProductBrowser" ]'
|
42 |
+
|
43 |
+
),
|
44 |
+
'admin_label' => array(
|
45 |
+
'label' => __( 'Admin Label', 'et_builder' ),
|
46 |
+
'type' => 'text',
|
47 |
+
'description' => __( 'This will change the label of the module in the builder for easy identification.', 'et_builder' ),
|
48 |
+
),
|
49 |
+
'module_id' => array(
|
50 |
+
'label' => __( 'CSS ID', 'et_builder' ),
|
51 |
+
'type' => 'text',
|
52 |
+
'option_category' => 'configuration',
|
53 |
+
'description' => __( 'Enter an optional CSS ID to be used for this module. An ID can be used to create custom CSS styling, or to create links to particular sections of your page.', 'et_builder' ),
|
54 |
+
),
|
55 |
+
'module_class' => array(
|
56 |
+
'label' => __( 'CSS Class', 'et_builder' ),
|
57 |
+
'type' => 'text',
|
58 |
+
'option_category' => 'configuration',
|
59 |
+
'description' => __( 'Enter optional CSS classes to be used for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated with a space.', 'et_builder' ),
|
60 |
+
),
|
61 |
+
);
|
62 |
+
|
63 |
+
return $fields;
|
64 |
+
}
|
65 |
+
|
66 |
+
function shortcode_callback( $atts, $content = NULL, $function_name ) {
|
67 |
+
|
68 |
+
$module_id = $this->shortcode_atts['module_id'];
|
69 |
+
$module_class = $this->shortcode_atts['module_class'];
|
70 |
+
|
71 |
+
$module_class = ET_Builder_Element::add_module_order_class( $module_class, $function_name );
|
72 |
+
|
73 |
+
$this->shortcode_content = et_builder_replace_code_content_entities( $this->shortcode_content );
|
74 |
+
|
75 |
+
$output = sprintf(
|
76 |
+
'<div%2$s class="et_pb_ecwid et_pb_module%3$s">
|
77 |
+
%1$s
|
78 |
+
</div> <!-- .et_pb_ecwid -->',
|
79 |
+
$this->shortcode_content,
|
80 |
+
( '' !== $module_id ? sprintf( ' id="%1$s"', esc_attr( $module_id ) ) : '' ),
|
81 |
+
( '' !== $module_class ? sprintf( ' %1$s', esc_attr( $module_class ) ) : '' )
|
82 |
+
);
|
83 |
+
|
84 |
+
return $output;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
new ET_Builder_Module_Ecwid;
|
89 |
+
|
90 |
+
}
|
91 |
+
}
|
includes/class-ecwid-oauth.php
CHANGED
@@ -43,7 +43,7 @@ class Ecwid_OAuth {
|
|
43 |
}
|
44 |
|
45 |
|
46 |
-
public function get_auth_dialog_url()
|
47 |
{
|
48 |
$action = 'ecwid_oauth';
|
49 |
if ( $this->_is_reconnect() ) {
|
@@ -58,6 +58,22 @@ class Ecwid_OAuth {
|
|
58 |
);
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
public function process_authorization()
|
62 |
{
|
63 |
$reconnect = $_REQUEST['action'] == 'ecwid_oauth_reconnect';
|
@@ -102,6 +118,7 @@ class Ecwid_OAuth {
|
|
102 |
Ecwid_Kissmetrics::record( $reconnect ? 'accountReconnected' : 'accountConnected' );
|
103 |
update_option( 'ecwid_store_id', $result->store_id );
|
104 |
update_option( 'ecwid_oauth_scope', $result->scope );
|
|
|
105 |
EcwidPlatform::cache_reset( 'all_categories' );
|
106 |
$this->api->save_token($result->access_token);
|
107 |
|
@@ -163,7 +180,7 @@ class Ecwid_OAuth {
|
|
163 |
}
|
164 |
|
165 |
protected function _get_default_scopes_array() {
|
166 |
-
return array( 'read_store_profile', 'read_catalog', 'allow_sso' );
|
167 |
}
|
168 |
|
169 |
protected function trigger_auth_error($mode = 'default')
|
43 |
}
|
44 |
|
45 |
|
46 |
+
public function get_auth_dialog_url( )
|
47 |
{
|
48 |
$action = 'ecwid_oauth';
|
49 |
if ( $this->_is_reconnect() ) {
|
58 |
);
|
59 |
}
|
60 |
|
61 |
+
public function get_sso_reconnect_dialog_url()
|
62 |
+
{
|
63 |
+
$redirect_uri = 'admin-post.php?action=ecwid_oauth_reconnect';
|
64 |
+
|
65 |
+
$scope = $this->_get_scope();
|
66 |
+
|
67 |
+
if (!in_array('create_customers', $scope)) {
|
68 |
+
$scope[] = 'create_customers';
|
69 |
+
}
|
70 |
+
|
71 |
+
return $this->api->get_oauth_dialog_url(
|
72 |
+
admin_url( $redirect_uri ),
|
73 |
+
implode(' ', $scope )
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
public function process_authorization()
|
78 |
{
|
79 |
$reconnect = $_REQUEST['action'] == 'ecwid_oauth_reconnect';
|
118 |
Ecwid_Kissmetrics::record( $reconnect ? 'accountReconnected' : 'accountConnected' );
|
119 |
update_option( 'ecwid_store_id', $result->store_id );
|
120 |
update_option( 'ecwid_oauth_scope', $result->scope );
|
121 |
+
update_option( 'ecwid_api_check_time', 0 );
|
122 |
EcwidPlatform::cache_reset( 'all_categories' );
|
123 |
$this->api->save_token($result->access_token);
|
124 |
|
180 |
}
|
181 |
|
182 |
protected function _get_default_scopes_array() {
|
183 |
+
return array( 'read_store_profile', 'read_catalog', 'allow_sso', 'create_customers' );
|
184 |
}
|
185 |
|
186 |
protected function trigger_auth_error($mode = 'default')
|
includes/class-ecwid-store-editor.php
CHANGED
@@ -65,6 +65,7 @@ HTML;
|
|
65 |
wp_enqueue_script( 'ecwid-store-editor-common-js', ECWID_PLUGIN_URL . 'js/store-editor-common.js', array(), get_option('ecwid_plugin_version') );
|
66 |
wp_enqueue_script( 'ecwid-store-editor-page-js', ECWID_PLUGIN_URL . 'js/store-editor-page.js', array(), get_option('ecwid_plugin_version') );
|
67 |
wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
|
|
|
68 |
add_editor_style( ECWID_PLUGIN_URL . 'css/page-editor.css' );
|
69 |
}
|
70 |
|
65 |
wp_enqueue_script( 'ecwid-store-editor-common-js', ECWID_PLUGIN_URL . 'js/store-editor-common.js', array(), get_option('ecwid_plugin_version') );
|
66 |
wp_enqueue_script( 'ecwid-store-editor-page-js', ECWID_PLUGIN_URL . 'js/store-editor-page.js', array(), get_option('ecwid_plugin_version') );
|
67 |
wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
|
68 |
+
wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_pb_defaults', ecwid_get_default_pb_size() );
|
69 |
add_editor_style( ECWID_PLUGIN_URL . 'css/page-editor.css' );
|
70 |
}
|
71 |
|
includes/themes.php
CHANGED
@@ -51,7 +51,8 @@ function ecwid_apply_theme($theme_name = null)
|
|
51 |
'twentytwelve' => array( 'js', 'scroll' ),
|
52 |
'sliding-door' => array( 'css-no-parent' ),
|
53 |
'zerif-lite' => array( 'css-no-parent' ),
|
54 |
-
'storefront' => array( 'css' )
|
|
|
55 |
);
|
56 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
57 |
|
@@ -63,6 +64,7 @@ function ecwid_apply_theme($theme_name = null)
|
|
63 |
'genesis',
|
64 |
'twentysixteen',
|
65 |
'central',
|
|
|
66 |
);
|
67 |
$custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
|
68 |
|
51 |
'twentytwelve' => array( 'js', 'scroll' ),
|
52 |
'sliding-door' => array( 'css-no-parent' ),
|
53 |
'zerif-lite' => array( 'css-no-parent' ),
|
54 |
+
'storefront' => array( 'css' ),
|
55 |
+
'salient' => array( 'css-no-parent')
|
56 |
);
|
57 |
$generic_themes = apply_filters('ecwid_generic_themes', $generic_themes);
|
58 |
|
64 |
'genesis',
|
65 |
'twentysixteen',
|
66 |
'central',
|
67 |
+
'mfupdate'
|
68 |
);
|
69 |
$custom_themes = apply_filters( 'ecwid_custom_themes', $custom_themes );
|
70 |
|
includes/themes/class-ecwid-theme-mfupdate.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once ECWID_THEMES_DIR . '/class-ecwid-theme-base.php';
|
4 |
+
|
5 |
+
class Ecwid_Theme_MFUpdate extends Ecwid_Theme_Base
|
6 |
+
{
|
7 |
+
protected $name = 'MFUpdate';
|
8 |
+
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
parent::__construct();
|
12 |
+
|
13 |
+
add_filter( 'ecwid_shortcode_content', array( $this, 'ecwid_shortcode_content' ) );
|
14 |
+
}
|
15 |
+
|
16 |
+
public function ecwid_shortcode_content($content) {
|
17 |
+
|
18 |
+
$content .= <<<HTML
|
19 |
+
<script type="text/javascript">
|
20 |
+
Ecwid.OnPageLoaded.add( function() {
|
21 |
+
if (jQuery('#container').data() && jQuery('#container').data().isotope) {
|
22 |
+
jQuery('#container').data().isotope.reLayout();
|
23 |
+
}
|
24 |
+
}
|
25 |
+
);</script>
|
26 |
+
HTML;
|
27 |
+
|
28 |
+
return $content;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
$ecwid_current_theme = new Ecwid_Theme_MFUpdate();
|
js/store-editor-page.js
CHANGED
@@ -41,22 +41,29 @@ jQuery(document).ready(function() {
|
|
41 |
attributes.search_view = undefined;
|
42 |
}
|
43 |
|
|
|
|
|
44 |
if (!attributes.grid || attributes.grid.match(/^\d+,\d+$/) === null) {
|
45 |
-
attributes.grid = '
|
46 |
}
|
47 |
|
48 |
var grid = attributes.grid.match(/^(\d+),(\d+)/);
|
49 |
attributes.grid_rows = grid[1];
|
50 |
attributes.grid_columns = grid[2];
|
51 |
|
52 |
-
for (var i in {'categories_per_row':
|
53 |
parsed = parseInt(attributes[i]);
|
54 |
if (isNaN(parsed) || parsed < 0) {
|
55 |
attributes[i] = undefined;
|
56 |
}
|
57 |
}
|
58 |
|
59 |
-
var widgets = attributes.widgets
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
return {
|
62 |
'show_search': jQuery.inArray('search', widgets) != -1,
|
@@ -85,10 +92,10 @@ jQuery(document).ready(function() {
|
|
85 |
'show_minicart': true,
|
86 |
'show_categories': true,
|
87 |
'categories_per_row': 3,
|
88 |
-
'grid_rows':
|
89 |
-
'grid_columns':
|
90 |
-
'table_rows':
|
91 |
-
'list_rows':
|
92 |
'default_category_id': 0,
|
93 |
'category_view': 'grid',
|
94 |
'search_view': 'list',
|
41 |
attributes.search_view = undefined;
|
42 |
}
|
43 |
|
44 |
+
var defaults = getDefaultParams();
|
45 |
+
|
46 |
if (!attributes.grid || attributes.grid.match(/^\d+,\d+$/) === null) {
|
47 |
+
attributes.grid = defaults.grid_columns + ',' + defaults.grid_rows;
|
48 |
}
|
49 |
|
50 |
var grid = attributes.grid.match(/^(\d+),(\d+)/);
|
51 |
attributes.grid_rows = grid[1];
|
52 |
attributes.grid_columns = grid[2];
|
53 |
|
54 |
+
for (var i in {'categories_per_row': defaults.categories_per_row, 'list': defaults.list_rows, 'table': defaults.table_rows, 'grid_rows': defaults.grid_rows, 'grid_columns': defaults.grid_columns, 'default_category_id': 0}) {
|
55 |
parsed = parseInt(attributes[i]);
|
56 |
if (isNaN(parsed) || parsed < 0) {
|
57 |
attributes[i] = undefined;
|
58 |
}
|
59 |
}
|
60 |
|
61 |
+
var widgets = attributes.widgets;
|
62 |
+
if (typeof widgets == 'undefined') {
|
63 |
+
widgets = "productbrowser search categories minicart";
|
64 |
+
}
|
65 |
+
|
66 |
+
widgets = widgets.split(/[^a-z^A-Z^0-9^-^_]/);
|
67 |
|
68 |
return {
|
69 |
'show_search': jQuery.inArray('search', widgets) != -1,
|
92 |
'show_minicart': true,
|
93 |
'show_categories': true,
|
94 |
'categories_per_row': 3,
|
95 |
+
'grid_rows': ecwid_pb_defaults.grid_rows,
|
96 |
+
'grid_columns': ecwid_pb_defaults.grid_columns,
|
97 |
+
'table_rows': ecwid_pb_defaults.table_rows,
|
98 |
+
'list_rows': ecwid_pb_defaults.list_rows,
|
99 |
'default_category_id': 0,
|
100 |
'category_view': 'grid',
|
101 |
'search_view': 'list',
|
languages/ecwid-shopping-cart-ru_RU.mo
CHANGED
Binary file
|
languages/ecwid-shopping-cart-ru_RU.po
CHANGED
@@ -205,15 +205,6 @@ msgstr "ID категории по умолчанию"
|
|
205 |
msgid "By default, the storefront shows a list of root categories. You can override this behavior and show a different category when customers open your store for the first time. This is useful if you only have one category or want to display a specific set of items (e.g. \"Featured Products\") to new visitors."
|
206 |
msgstr "По умолчанию, магазин показывает корневые категории. Здесь можно выбрать другую категорию для отображения, когда покупатель впервые открывает ваш магазин. Это может быть полезно, если у вас есть только одна категория или вы хотите показывать определённые набор товаров (например, специальные предложения) новым пользователям."
|
207 |
|
208 |
-
msgid "Single Sign-On Secret Key"
|
209 |
-
msgstr "Секретный ключ системы единой авторизации"
|
210 |
-
|
211 |
-
msgid "Single Sign-On Secret Key is an option that allows your customers access to your WordPress site as well as the Ecwid shopping cart. When customers log in to your site, they will automatically be logged in to your Ecwid store as well. It makes sense to enable this feature if your visitors actually create accounts in your WordPress website."
|
212 |
-
msgstr "Эта функция позволяет включить систему единой авторизации: когда покупатели вошли в свой аккаунт на вашем сайте, они автоматически входят в свой Эквид-аккаунт, даже если раньше у них его не было. Эта функция может быть полезна в случае, если ваши посетители создают свои аккаунты на вашем сайте."
|
213 |
-
|
214 |
-
msgid "To enable this feature, copy the Single Sign On Secret key from the store control panel to the input above. You can find the key on the \"<a href=\"https://my.ecwid.com/cp/CP.html#legacy_api\" target=\"_blank\">Legacy API Keys</a>\" page. This feature is available for <a href=\"https://www.ecwid.com/pricing\" target=\"_blank\">paid users</a> only."
|
215 |
-
msgstr "Чтобы включить эту функцию, скопируйте секретный ключ из панели управления магазином в текстовое поле выше. Ключ можно найти на странице \"<a href=\"https://my.ecwid.com/cp/CP.html#legacy_api\" target=\"_blank\">Ключи для предыдущей версии API</a>\". Эта функция доступна только пользователям с <a href=\"https://www.ecwid.ru/pricing\" target=\"_blank\">платным аккаунтом</a>."
|
216 |
-
|
217 |
msgid "Save changes"
|
218 |
msgstr "Сохранить изменения"
|
219 |
|
@@ -553,8 +544,8 @@ msgstr "https://support.ecwid.com/hc/ru/articles/207101259-Wordpress-ORG"
|
|
553 |
msgid "Questions?"
|
554 |
msgstr "Есть вопросы?"
|
555 |
|
556 |
-
msgid "<a href=\"admin.php?page=ecwid-help\">Read FAQ
|
557 |
-
msgstr "
|
558 |
|
559 |
msgid "Want to connect another Ecwid store?"
|
560 |
msgstr "Хотите подключить другой Эквид-магазин?"
|
@@ -706,6 +697,21 @@ msgstr "Ваш вопрос"
|
|
706 |
msgid "Send Message"
|
707 |
msgstr "Отправить"
|
708 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
msgid "https://www.ecwid.com/forums"
|
710 |
msgstr "https://www.ecwid.com/forums/forumdisplay.php?f=10"
|
711 |
|
@@ -728,4 +734,6 @@ msgid "https://support.ecwid.com/hc/en-us/sections/201706799-Billing-Questions"
|
|
728 |
msgstr "https://support.ecwid.com/hc/ru/sections/201706799-%D0%9F%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BA%D0%B0"
|
729 |
|
730 |
msgid "https://support.ecwid.com/hc/en-us/sections/201702859-Technical-Reference"
|
731 |
-
msgstr "https://support.ecwid.com/hc/ru/sections/201702859-%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F-%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F"
|
|
|
|
205 |
msgid "By default, the storefront shows a list of root categories. You can override this behavior and show a different category when customers open your store for the first time. This is useful if you only have one category or want to display a specific set of items (e.g. \"Featured Products\") to new visitors."
|
206 |
msgstr "По умолчанию, магазин показывает корневые категории. Здесь можно выбрать другую категорию для отображения, когда покупатель впервые открывает ваш магазин. Это может быть полезно, если у вас есть только одна категория или вы хотите показывать определённые набор товаров (например, специальные предложения) новым пользователям."
|
207 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
msgid "Save changes"
|
209 |
msgstr "Сохранить изменения"
|
210 |
|
544 |
msgid "Questions?"
|
545 |
msgstr "Есть вопросы?"
|
546 |
|
547 |
+
msgid "<a href=\"admin.php?page=ecwid-help\">Read FAQ or contact support</a>"
|
548 |
+
msgstr "<a href=\"admin.php?page=ecwid-help\">Посетите Центр поддержки Эквида или напишите нам</a>"
|
549 |
|
550 |
msgid "Want to connect another Ecwid store?"
|
551 |
msgstr "Хотите подключить другой Эквид-магазин?"
|
697 |
msgid "Send Message"
|
698 |
msgstr "Отправить"
|
699 |
|
700 |
+
msgid "Customer Single Sign-On"
|
701 |
+
msgstr "Единый вход для покупателей"
|
702 |
+
|
703 |
+
msgid "Single Sign-On allows your customers to have a single login for your WordPress site and your Ecwid store. 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."
|
704 |
+
msgstr "Объединяет учетную запись покупателя на сайте с его учетной записью в магазине. Когда единый вход включен, покупателю не нужно логиниться дважды – на сайте и в магазине. После входа в свой аккаунт на сайте покупатель может смотреть историю своих заказов и оформлять новый заказ с предзаполненным email и адресом доставки."
|
705 |
+
|
706 |
+
msgid "This feature is available on the Ecwid's Venture plan and above. <a %s>Please upgrade to get it.</a>"
|
707 |
+
msgstr "Чтобы включить \"Единый вход\", <a %s>подпишитесь на платный план в Эквиде</a>. Доступно на плане Venture и выше."
|
708 |
+
|
709 |
+
msgid "To allow Ecwid automatically log in customers to your store, please provide it with a permission to use the customer data in the store. <a %s>Please use this link to do that</a>"
|
710 |
+
msgstr "Чтобы плагин автоматически объединял учетные записи пользователя на сайте и в магазине, нужно дать ему доступ до данных покупателей в магазине. <a %s>Перейдите по этой ссылке, чтобы предоставить доступ</a>."
|
711 |
+
|
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 |
|
734 |
msgstr "https://support.ecwid.com/hc/ru/sections/201706799-%D0%9F%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BA%D0%B0"
|
735 |
|
736 |
msgid "https://support.ecwid.com/hc/en-us/sections/201702859-Technical-Reference"
|
737 |
+
msgstr "https://support.ecwid.com/hc/ru/sections/201702859-%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F-%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F"
|
738 |
+
|
739 |
+
|
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,14 @@ 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.4.5 =
|
153 |
- **Minor fixes and improvements.**
|
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.5
|
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.5 =
|
153 |
+
- **Update in the Single Sign On Module (Ecwid SSO).** Single Sign-On allows your customers to have a single login for your WordPress site and your Ecwid store. We updated it to use the latest Ecwid ecommerce APIs to make it more convenient for you. Now the module doesn't require a separate API key – it works seamlessly with no extra setup.
|
154 |
+
- **Compatibility with Divi builder editor.** Divi builder adds a nice WYSIWYG editor to the Wordpress admin. Ecwid shopping cart now is compatible with that editor – so you can add Ecwid store shortcode right from the Divi builder editor, no need to switch back to the default Wordpress editor if you prefer to use the Divi's one.
|
155 |
+
- **Fix for a bug in the store appearance popup.** The store widgets settings were hidden when the "widgets" part was manually removed from the Ecwid shortcode in the page editor in Wordpress admin. We fixed that, now the settings popup should work fine.
|
156 |
+
- **Slight improvements in Chameleon.** The "Chameleon skin" option in the plugin Advanced settings automatically adjusts the store texts and styles to match those of your site. We continue improving it so that it works better with all sites.
|
157 |
+
- **Fixed a bug with store pages duplicates.** Previously, an extra Store page was created each time you deactivated and re-activated the plugin. It's fixed – now the Ecwid plugin remembers the store page and use it however often you deactivate/activate the plugin.
|
158 |
+
- Slight layout improvements for the stores embedded into sites with Salient theme installed.
|
159 |
+
|
160 |
= 4.4.5 =
|
161 |
- **Minor fixes and improvements.**
|
162 |
|
templates/admin-footer.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<div class="ecwid-admin-footer-block">
|
11 |
<h4 class="ecwid-admin-footer-title"><?php _e('Questions?', 'ecwid-shopping-cart'); ?></h4>
|
12 |
<div class="ecwid-admin-footer-text">
|
13 |
-
<?php
|
14 |
</div>
|
15 |
</div>
|
16 |
<?php if (@$show_reconnect): ?>
|
10 |
<div class="ecwid-admin-footer-block">
|
11 |
<h4 class="ecwid-admin-footer-title"><?php _e('Questions?', 'ecwid-shopping-cart'); ?></h4>
|
12 |
<div class="ecwid-admin-footer-text">
|
13 |
+
<?php _e('<a href="admin.php?page=ecwid-help">Read FAQ or contact support</a>', 'ecwid-shopping-cart'); ?>
|
14 |
</div>
|
15 |
</div>
|
16 |
<?php if (@$show_reconnect): ?>
|
templates/advanced-settings.php
CHANGED
@@ -37,25 +37,51 @@
|
|
37 |
|
38 |
<?php endif; ?>
|
39 |
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
<?php
|
59 |
</div>
|
60 |
</div>
|
61 |
|
37 |
|
38 |
<?php endif; ?>
|
39 |
|
40 |
+
<div class="pure-control-group checkbox">
|
41 |
+
<div class="label">
|
42 |
+
<label for="ecwid_is_sso_enabled" class="premium-feature">
|
43 |
|
44 |
+
<input
|
45 |
+
id="ecwid_is_sso_enabled"
|
46 |
+
name="ecwid_is_sso_enabled"
|
47 |
+
type="checkbox"
|
48 |
+
<?php if ( $is_sso_enabled ) : ?>
|
49 |
+
checked="checked"
|
50 |
+
<?php endif; ?>
|
51 |
+
<?php if ( $is_sso_checkbox_disabled ) : ?>
|
52 |
+
disabled="disabled"
|
53 |
+
<?php endif; ?>
|
54 |
+
/>
|
55 |
+
<?php _e('Customer Single Sign-On', 'ecwid-shopping-cart'); ?>
|
56 |
+
<?php ecwid_embed_svg('star'); ?>
|
57 |
+
</label>
|
58 |
|
59 |
+
<div class="note">
|
60 |
+
<?php _e('Single Sign-On allows your customers to have a single login for your WordPress site and your Ecwid store. 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'); ?>
|
61 |
+
</div>
|
62 |
+
<?php if (!ecwid_is_paid_account()): ?>
|
63 |
+
<div class="upgrade-note">
|
64 |
+
<a
|
65 |
+
class="button ecwid-button button-green" target="_blank"
|
66 |
+
href="admin.php?page=ecwid&ecwid_page=<?php echo urlencode(ecwid_get_admin_iframe_upgrade_page()); ?>">
|
67 |
+
<?php _e( 'Upgrade to get this feature', 'ecwid-shopping-cart' ); ?>
|
68 |
+
</a>
|
69 |
+
<div class="note grayed-links">
|
70 |
+
<?php echo sprintf(__('This feature is available on the Ecwid\'s Venture plan and above', 'ecwid-shopping-cart'), ''); ?>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
<?php endif; ?>
|
74 |
+
<?php if ( !$is_sso_enabled && ecwid_is_paid_account() && !get_option('ecwid_sso_secret_key') && !$has_create_customers_scope): ?>
|
75 |
+
<div class="note">
|
76 |
+
<?php echo sprintf(__('To allow Ecwid automatically log in customers to your store, please provide it with a permission to use the customer data in the store. <a %s>Please use this link to do that</a>', 'ecwid-shopping-cart'), 'href="' . $reconnect_link . '"'); ?>
|
77 |
+
</div>
|
78 |
+
<?php endif; ?>
|
79 |
|
80 |
+
<?php if ( !get_option('users_can_register' ) ): ?>
|
81 |
+
<div class="note">
|
82 |
+
<?php echo sprintf(__('To make sure your customer can actually log in to your site and store, enable registration in the <a %s>site settings</a>', 'ecwid-shopping-cart'), 'href="options-general.php"'); ?>
|
83 |
+
</div>
|
84 |
+
<?php endif; ?>
|
85 |
</div>
|
86 |
</div>
|
87 |
|
templates/help.php
CHANGED
@@ -216,7 +216,6 @@
|
|
216 |
</div>
|
217 |
</div>
|
218 |
|
219 |
-
<?php if ( get_option('ecwid_extended_help') ): ?>
|
220 |
<div class="block-contact">
|
221 |
<h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
|
222 |
|
@@ -250,7 +249,6 @@
|
|
250 |
<p><a id="show-ecwid-contact-again" href="#"><?php _e( 'You can send a new request here.', 'ecwid-shopping-cart'); ?></a></p>
|
251 |
|
252 |
</div>
|
253 |
-
<?php endif; ?>
|
254 |
|
255 |
</div>
|
256 |
|
216 |
</div>
|
217 |
</div>
|
218 |
|
|
|
219 |
<div class="block-contact">
|
220 |
<h2><?php _e( 'Send a message to our support team', 'ecwid-shopping-cart' ); ?> </h2>
|
221 |
|
249 |
<p><a id="show-ecwid-contact-again" href="#"><?php _e( 'You can send a new request here.', 'ecwid-shopping-cart'); ?></a></p>
|
250 |
|
251 |
</div>
|
|
|
252 |
|
253 |
</div>
|
254 |
|