Version Description
- New "Chameleon skin" tool (beta). You can use it to adjust your store styles to fit your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog. The feature is by default disabled on the existing accounts to make sure the update will not affect your storefront. To enable it on your site, open the "Advanced" page in the Ecwid plugin settings and tick the "Chameleon skin" checkbox. The feature is in beta so if you find any troubles with it, please let us know.
- Pre-populate Ecwid registration form fields with user Wordpress profile data. When a new user installs the plugin and registers an account at Ecwid, the registration form will contain the name and email prefilled to make it easy for the merchant to create a new store and install it on their site.
- Improvements of the plugin settings pages to make them look good on mobile devices. If you manage your Wordpress site from a phone or tablet, feel free to check the store settings there Ecwid plugin settings pages now work better on mobile.
- Fixed an intermittent issue with the default category option in the store appearance settings.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 3.2 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.2
- css/admin.css +14 -1
- css/settings.3.8.css +12 -17
- css/settings.css +9 -3
- ecwid-shopping-cart.php +141 -31
- includes/class-ecwid-oauth.php +4 -1
- includes/class-ecwid-store-editor.php +3 -3
- includes/themes/class-ecwid-theme-base.php +2 -1
- includes/themes/class-ecwid-theme-customizr.php +2 -2
- includes/themes/class-ecwid-theme-pagelines.php +1 -1
- includes/themes/class-ecwid-theme-responsive.php +3 -3
- includes/themes/class-ecwid-theme-twentyfifteen.php +1 -1
- includes/themes/class-ecwid-theme-twentyfourteen.php +1 -1
- js/ecwid-chameleon.js +251 -0
- js/products-list.js +1 -1
- languages/ecwid-shopping-cart-ru_RU.mo +0 -0
- languages/ecwid-shopping-cart-ru_RU.po +8 -0
- languages/ecwid-shopping-cart.pot +9 -0
- readme.txt +7 -1
- templates/admin-message.php +1 -1
- templates/advanced-settings.php +26 -1
- templates/connect.php +4 -1
- templates/landing.php +7 -4
css/admin.css
CHANGED
@@ -134,11 +134,15 @@ div.ecwid-message {
|
|
134 |
top: 6px;
|
135 |
}
|
136 |
|
137 |
-
@media screen and (max-width:
|
138 |
.ecwid-message .ecwid-message-buttons > div:last-child {
|
139 |
position: inherit;
|
140 |
}
|
141 |
|
|
|
|
|
|
|
|
|
142 |
|
143 |
.ecwid-message .ecwid-message-buttons > div:not(:first-child) {
|
144 |
padding-left: 0px;
|
@@ -153,6 +157,15 @@ div.ecwid-message {
|
|
153 |
white-space: normal;
|
154 |
width: 100%;
|
155 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
|
158 |
body[class*="_page_ecwid"] .ecwid-message {
|
134 |
top: 6px;
|
135 |
}
|
136 |
|
137 |
+
@media screen and (max-width: 768px) {
|
138 |
.ecwid-message .ecwid-message-buttons > div:last-child {
|
139 |
position: inherit;
|
140 |
}
|
141 |
|
142 |
+
div.ecwid-message,
|
143 |
+
div.ecwid-message.updated{
|
144 |
+
padding: 27px 29px 20px 30px;
|
145 |
+
}
|
146 |
|
147 |
.ecwid-message .ecwid-message-buttons > div:not(:first-child) {
|
148 |
padding-left: 0px;
|
157 |
white-space: normal;
|
158 |
width: 100%;
|
159 |
}
|
160 |
+
|
161 |
+
.ecwid-message .ecwid-message-hide:before {
|
162 |
+
font-size: 21px;
|
163 |
+
top: 5px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.ecwid-message-buttons .hide-wrapper {
|
167 |
+
margin-top: 10px;
|
168 |
+
}
|
169 |
}
|
170 |
|
171 |
body[class*="_page_ecwid"] .ecwid-message {
|
css/settings.3.8.css
CHANGED
@@ -29,15 +29,6 @@
|
|
29 |
width: 265px;
|
30 |
}
|
31 |
|
32 |
-
.ecwid-settings.advanced-settings input,
|
33 |
-
.ecwid-settings.advanced-settings select {
|
34 |
-
width: 200px;
|
35 |
-
height: 30px;
|
36 |
-
margin-right: 15px;
|
37 |
-
font-size: 13px;
|
38 |
-
border-color: #cacaca;
|
39 |
-
}
|
40 |
-
|
41 |
.pure-form.ecwid-settings.general-settings .pure-button-secondary,
|
42 |
.pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
|
43 |
{
|
@@ -187,11 +178,11 @@
|
|
187 |
width: 100%;
|
188 |
}
|
189 |
|
190 |
-
.advanced-settings.ecwid-settings label {
|
191 |
margin-top:35px;
|
192 |
}
|
193 |
|
194 |
-
.advanced-settings.ecwid-settings input,
|
195 |
.advanced-settings.ecwid-settings select {
|
196 |
width: 100%;
|
197 |
}
|
@@ -211,23 +202,27 @@
|
|
211 |
.ecwid-pb-view-size .bottom .ruler {
|
212 |
bottom: 15px;
|
213 |
}
|
214 |
-
.pure-control-group.small-input .input > div,
|
215 |
-
.pure-control-group.small-input .input input,
|
216 |
-
.pure-control-group.small-input .label > label {
|
217 |
position: static;
|
218 |
}
|
219 |
|
220 |
-
.pure-control-group.small-input .label,
|
221 |
-
.pure-control-group.small-input .label label {
|
222 |
width: auto;
|
223 |
margin-bottom: 0px;
|
224 |
}
|
225 |
|
226 |
-
.pure-control-group.small-input .note {
|
227 |
display: block;
|
228 |
position: relative;
|
229 |
left: 45px;
|
230 |
margin-right: 45px;
|
231 |
}
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
|
29 |
width: 265px;
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
.pure-form.ecwid-settings.general-settings .pure-button-secondary,
|
33 |
.pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover
|
34 |
{
|
178 |
width: 100%;
|
179 |
}
|
180 |
|
181 |
+
.advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) label {
|
182 |
margin-top:35px;
|
183 |
}
|
184 |
|
185 |
+
.advanced-settings.ecwid-settings .pure-control-group:not(.checkbox) input,
|
186 |
.advanced-settings.ecwid-settings select {
|
187 |
width: 100%;
|
188 |
}
|
202 |
.ecwid-pb-view-size .bottom .ruler {
|
203 |
bottom: 15px;
|
204 |
}
|
205 |
+
.ecwid-settings .pure-control-group.small-input .input > div,
|
206 |
+
.ecwid-settings .pure-control-group.small-input .input input,
|
207 |
+
.ecwid-settings .pure-control-group.small-input .label > label {
|
208 |
position: static;
|
209 |
}
|
210 |
|
211 |
+
.ecwid-settings .pure-control-group.small-input .label,
|
212 |
+
.ecwid-settings .pure-control-group.small-input .label label {
|
213 |
width: auto;
|
214 |
margin-bottom: 0px;
|
215 |
}
|
216 |
|
217 |
+
.ecwid-settings .pure-control-group.small-input .note {
|
218 |
display: block;
|
219 |
position: relative;
|
220 |
left: 45px;
|
221 |
margin-right: 45px;
|
222 |
}
|
223 |
+
|
224 |
+
.ecwid-settings .pure-control-group.checkbox label {
|
225 |
+
display: inline-block;
|
226 |
+
}
|
227 |
}
|
228 |
|
css/settings.css
CHANGED
@@ -282,18 +282,24 @@ display: none;
|
|
282 |
margin-bottom: 0px;
|
283 |
}
|
284 |
|
285 |
-
.ecwid-settings.advanced-settings input,
|
286 |
.ecwid-settings.advanced-settings select
|
287 |
{
|
288 |
-
width:
|
289 |
-
height:
|
290 |
margin-right: 15px;
|
|
|
|
|
291 |
}
|
292 |
|
293 |
.ecwid-settings.advanced-settings .note {
|
294 |
margin-top: 15px;
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
297 |
.ecwid-settings .note.inline-note {
|
298 |
max-width: 300px;
|
299 |
margin-left: 15px;
|
282 |
margin-bottom: 0px;
|
283 |
}
|
284 |
|
285 |
+
.ecwid-settings.advanced-settings .pure-control-group input:not([type=checkbox]),
|
286 |
.ecwid-settings.advanced-settings select
|
287 |
{
|
288 |
+
width: 200px;
|
289 |
+
height: 30px;
|
290 |
margin-right: 15px;
|
291 |
+
font-size: 13px;
|
292 |
+
border-color: #cacaca;
|
293 |
}
|
294 |
|
295 |
.ecwid-settings.advanced-settings .note {
|
296 |
margin-top: 15px;
|
297 |
}
|
298 |
|
299 |
+
.ecwid-settings.advanced-settings sup {
|
300 |
+
color: #298CBA;
|
301 |
+
}
|
302 |
+
|
303 |
.ecwid-settings .note.inline-note {
|
304 |
max-width: 300px;
|
305 |
margin-left: 15px;
|
ecwid-shopping-cart.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?source=wporg
|
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Team
|
8 |
-
Version: 3.
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
@@ -181,12 +181,16 @@ if (version_compare($version, '3.6') < 0) {
|
|
181 |
if (!function_exists('shortcode_exists')) {
|
182 |
function shortcode_exists( $tag ) {
|
183 |
global $shortcode_tags;
|
184 |
-
|
185 |
}
|
186 |
}
|
187 |
|
188 |
if (!function_exists('has_shortcode')) {
|
189 |
function has_shortcode( $content, $tag ) {
|
|
|
|
|
|
|
|
|
190 |
if ( shortcode_exists( $tag ) ) {
|
191 |
preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
|
192 |
if ( empty( $matches ) )
|
@@ -195,6 +199,8 @@ if (version_compare($version, '3.6') < 0) {
|
|
195 |
foreach ( $matches as $shortcode ) {
|
196 |
if ( $tag === $shortcode[2] ) {
|
197 |
return true;
|
|
|
|
|
198 |
}
|
199 |
}
|
200 |
}
|
@@ -245,11 +251,15 @@ add_action('wp_ajax_nopriv_ecwid_get_product_info', 'ecwid_ajax_get_product_info
|
|
245 |
|
246 |
function ecwid_add_frontend_styles() {
|
247 |
wp_register_script('ecwid-products-list-js', plugins_url('ecwid-shopping-cart/js/products-list.js'), array('jquery-ui-widget'));
|
248 |
-
wp_register_style('ecwid-products-list-css', plugins_url('ecwid-shopping-cart/css/products-list.css'));
|
249 |
-
wp_enqueue_style('ecwid-css', plugins_url('ecwid-shopping-cart/css/frontend.css'));
|
|
|
|
|
|
|
|
|
250 |
|
251 |
if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
|
252 |
-
wp_enqueue_script('ecwid-recently-viewed', plugins_url('ecwid-shopping-cart/js/recently-viewed-common.js'), array('jquery', 'utils'),
|
253 |
|
254 |
wp_localize_script(
|
255 |
'ecwid-products-list-js',
|
@@ -390,6 +400,10 @@ function ecwid_check_version()
|
|
390 |
do_action('ecwid_plugin_installed', $current_version);
|
391 |
add_option('ecwid_plugin_version', $current_version);
|
392 |
|
|
|
|
|
|
|
|
|
393 |
} elseif ($upgrade) {
|
394 |
|
395 |
ecwid_plugin_add_oauth();
|
@@ -423,6 +437,24 @@ function ecwid_log_error($message)
|
|
423 |
update_option('ecwid_error_log', json_encode($errors));
|
424 |
}
|
425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
function ecwid_plugin_add_oauth()
|
427 |
{
|
428 |
add_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
|
@@ -783,10 +815,10 @@ function ecwid_content_started($content)
|
|
783 |
|
784 |
function ecwid_wrap_shortcode_content($content, $name)
|
785 |
{
|
786 |
-
return "<!-- Ecwid shopping cart plugin v 3.
|
787 |
. ecwid_get_scriptjs_code()
|
788 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
789 |
-
. "<!-- END Ecwid Shopping Cart v 3.
|
790 |
}
|
791 |
|
792 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
@@ -795,7 +827,7 @@ function ecwid_get_scriptjs_code($force_lang = null) {
|
|
795 |
if (!$ecwid_script_rendered) {
|
796 |
$store_id = get_ecwid_store_id();
|
797 |
$force_lang_str = !is_null($force_lang) ? "&lang=$force_lang" : '';
|
798 |
-
$s = '<script data-cfasync="false" type="text/javascript" src="
|
799 |
$s = $s . ecwid_sso();
|
800 |
$ecwid_script_rendered = true;
|
801 |
|
@@ -1295,6 +1327,8 @@ function ecwid_uninstall() {
|
|
1295 |
delete_option("ecwid_installation_date");
|
1296 |
delete_option('ecwid_hide_appearance_menu');
|
1297 |
delete_option("ecwid_advanced_theme_layout");
|
|
|
|
|
1298 |
}
|
1299 |
|
1300 |
function ecwid_abs_intval($value) {
|
@@ -1352,27 +1386,26 @@ function ecwid_options_add_page() {
|
|
1352 |
'ecwid_advanced_settings_do_page'
|
1353 |
);
|
1354 |
}
|
1355 |
-
//add_options_page('Ecwid shopping cart settings', 'Ecwid shopping cart', 'manage_options', 'ecwid_options_page', 'ecwid_options_do_page');
|
1356 |
}
|
1357 |
|
1358 |
function ecwid_register_admin_styles($hook_suffix) {
|
1359 |
|
1360 |
-
wp_enqueue_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'));
|
1361 |
|
1362 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
1363 |
-
wp_enqueue_style('ecwid-admin38-css', plugins_url('ecwid-shopping-cart/css/admin.3.8.css'), array('ecwid-admin-css'), '', 'all');
|
1364 |
}
|
1365 |
|
1366 |
if (isset($_GET['page']) && $_GET['page'] == 'ecwid') {
|
1367 |
|
1368 |
if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
|
1369 |
// Open dashboard for the first time, ecwid store id is set to demo => need landing styles/scripts
|
1370 |
-
wp_enqueue_script('ecwid-landing-js', plugins_url('ecwid-shopping-cart/js/landing.js'));
|
1371 |
-
wp_enqueue_style('ecwid-landing-css', plugins_url('ecwid-shopping-cart/css/landing.css'), array(), '', 'all');
|
1372 |
-
wp_enqueue_style('ecwid-landing-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300');
|
1373 |
} else {
|
1374 |
// We already connected and disconnected the store, no need for fancy landing
|
1375 |
-
wp_enqueue_script('ecwid-connect-js', plugins_url('ecwid-shopping-cart/js/dashboard.js'));
|
1376 |
}
|
1377 |
}
|
1378 |
}
|
@@ -1381,8 +1414,8 @@ function ecwid_register_settings_styles($hook_suffix) {
|
|
1381 |
|
1382 |
if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
|
1383 |
|
1384 |
-
wp_enqueue_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), '', 'all');
|
1385 |
-
wp_enqueue_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), '', 'all');
|
1386 |
|
1387 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
1388 |
wp_enqueue_style('ecwid-settings38-css', plugins_url('ecwid-shopping-cart/css/settings.3.8.css'), array('ecwid-settings-css'), '', 'all');
|
@@ -1417,7 +1450,7 @@ function ecwid_settings_api_init() {
|
|
1417 |
|
1418 |
case 'general':
|
1419 |
register_setting('ecwid_options_page', 'ecwid_store_id','ecwid_abs_intval' );
|
1420 |
-
if (isset($
|
1421 |
Ecwid_Message_Manager::reset_hidden_messages();
|
1422 |
}
|
1423 |
break;
|
@@ -1426,6 +1459,7 @@ function ecwid_settings_api_init() {
|
|
1426 |
register_setting('ecwid_options_page', 'ecwid_default_category_id', 'ecwid_abs_intval');
|
1427 |
register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
|
1428 |
register_setting('ecwid_options_page', 'ecwid_enable_advanced_theme_layout');
|
|
|
1429 |
break;
|
1430 |
}
|
1431 |
|
@@ -1437,16 +1471,43 @@ function ecwid_settings_api_init() {
|
|
1437 |
|
1438 |
function ecwid_common_admin_scripts() {
|
1439 |
|
1440 |
-
wp_enqueue_script('ecwid-admin-js', plugins_url('ecwid-shopping-cart/js/admin.js'));
|
1441 |
-
wp_enqueue_script('ecwid-modernizr-js', plugins_url('ecwid-shopping-cart/js/modernizr.js'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1442 |
}
|
1443 |
|
1444 |
function ecwid_general_settings_do_page() {
|
1445 |
|
|
|
|
|
|
|
|
|
|
|
1446 |
if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
|
1447 |
global $ecwid_oauth;
|
1448 |
|
1449 |
-
$connection_error = isset($_GET['connection_error']);
|
1450 |
$register = !$connection_error && !isset($_GET['connect']) && !@$_COOKIE['ecwid_create_store_clicked'];
|
1451 |
|
1452 |
require_once(ECWID_PLUGIN_DIR . '/templates/landing.php');
|
@@ -1454,7 +1515,6 @@ function ecwid_general_settings_do_page() {
|
|
1454 |
|
1455 |
if (get_ecwid_store_id() == ECWID_DEMO_STORE_ID) {
|
1456 |
global $ecwid_oauth;
|
1457 |
-
$connection_error = isset($_GET['connection_error']);
|
1458 |
|
1459 |
require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
|
1460 |
} else {
|
@@ -1516,7 +1576,7 @@ function ecwid_advanced_settings_do_page() {
|
|
1516 |
|
1517 |
function ecwid_appearance_settings_do_page() {
|
1518 |
|
1519 |
-
wp_register_script('ecwid-appearance-js', plugins_url('ecwid-shopping-cart/js/appearance.js'), array(), '', true);
|
1520 |
wp_enqueue_script('ecwid-appearance-js');
|
1521 |
|
1522 |
$disabled = false;
|
@@ -1661,7 +1721,7 @@ function ecwid_get_product_browser_url_script()
|
|
1661 |
|
1662 |
class EcwidBadgeWidget extends WP_Widget {
|
1663 |
|
1664 |
-
var $url_template = "
|
1665 |
var $available_badges;
|
1666 |
|
1667 |
function EcwidBadgeWidget() {
|
@@ -2023,9 +2083,9 @@ class EcwidRecentlyViewedWidget extends WP_Widget {
|
|
2023 |
|
2024 |
function widget($args, $instance) {
|
2025 |
|
2026 |
-
wp_enqueue_script('ecwid-recently-viewed-js', plugins_url('ecwid-shopping-cart/js/recently-viewed.js'), array('jquery', 'utils', 'ecwid-products-list-js'));
|
2027 |
wp_enqueue_style('ecwid-products-list-css');
|
2028 |
-
wp_enqueue_style('ecwid-recently-viewed-css', plugins_url('ecwid-shopping-cart/css/recently-viewed.css'));
|
2029 |
extract($args);
|
2030 |
|
2031 |
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']);
|
@@ -2206,7 +2266,8 @@ function ecwid_gather_stats()
|
|
2206 |
'ecwid_store_shortcode_used',
|
2207 |
'store_link_widget',
|
2208 |
'recently_viewed_widget',
|
2209 |
-
'avalanche_used'
|
|
|
2210 |
);
|
2211 |
|
2212 |
$usage_stats = ecwid_gather_usage_stats();
|
@@ -2242,7 +2303,8 @@ function ecwid_gather_usage_stats()
|
|
2242 |
'ecwid_store_shortcode_used',
|
2243 |
'store_link_widget',
|
2244 |
'recently_viewed_widget',
|
2245 |
-
'avalanche_used'
|
|
|
2246 |
);
|
2247 |
|
2248 |
$usage_stats = array();
|
@@ -2264,6 +2326,7 @@ function ecwid_gather_usage_stats()
|
|
2264 |
$usage_stats['store_link_widget'] = (bool) is_active_widget(false, false, 'ecwidstorelink');
|
2265 |
$usage_stats['recently_viewed_widget'] = (bool) is_active_widget(false, false, 'ecwidrecentlyviewed');
|
2266 |
$usage_stats['avalanche_used'] = (bool) is_plugin_active('ecwid-widgets-avalanche/ecwid_widgets_avalanche.php');
|
|
|
2267 |
|
2268 |
return $usage_stats;
|
2269 |
}
|
@@ -2364,13 +2427,14 @@ function ecwid_is_api_enabled()
|
|
2364 |
{
|
2365 |
$ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
|
2366 |
$ecwid_api_check_time = get_option('ecwid_api_check_time');
|
2367 |
-
$now = time()
|
2368 |
|
2369 |
-
if ($now > ($ecwid_api_check_time + 60 * 60 * 3)) {
|
2370 |
// check whether API is available once in 3 hours
|
2371 |
$ecwid = ecwid_new_product_api();
|
2372 |
|
2373 |
$ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
|
|
|
2374 |
update_option('ecwid_is_api_enabled', $ecwid_is_api_enabled);
|
2375 |
update_option('ecwid_api_check_time', $now);
|
2376 |
}
|
@@ -2401,8 +2465,12 @@ function ecwid_embed_svg($name) {
|
|
2401 |
*/
|
2402 |
function ecwid_find_shortcodes( $content, $tag ) {
|
2403 |
|
|
|
|
|
|
|
|
|
2404 |
if ( shortcode_exists( $tag ) ) {
|
2405 |
-
preg_match_all( '/' .
|
2406 |
if ( empty( $matches ) )
|
2407 |
return false;
|
2408 |
|
@@ -2410,6 +2478,8 @@ function ecwid_find_shortcodes( $content, $tag ) {
|
|
2410 |
foreach ( $matches as $shortcode ) {
|
2411 |
if ( $tag === $shortcode[2] ) {
|
2412 |
$result[] = $shortcode;
|
|
|
|
|
2413 |
}
|
2414 |
}
|
2415 |
|
@@ -2420,4 +2490,44 @@ function ecwid_find_shortcodes( $content, $tag ) {
|
|
2420 |
}
|
2421 |
return false;
|
2422 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2423 |
?>
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Team
|
8 |
+
Version: 3.2
|
9 |
Author URI: http://www.ecwid.com?source=wporg
|
10 |
*/
|
11 |
|
181 |
if (!function_exists('shortcode_exists')) {
|
182 |
function shortcode_exists( $tag ) {
|
183 |
global $shortcode_tags;
|
184 |
+
return array_key_exists( $tag, $shortcode_tags );
|
185 |
}
|
186 |
}
|
187 |
|
188 |
if (!function_exists('has_shortcode')) {
|
189 |
function has_shortcode( $content, $tag ) {
|
190 |
+
if ( false === strpos( $content, '[' ) ) {
|
191 |
+
return false;
|
192 |
+
}
|
193 |
+
|
194 |
if ( shortcode_exists( $tag ) ) {
|
195 |
preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
|
196 |
if ( empty( $matches ) )
|
199 |
foreach ( $matches as $shortcode ) {
|
200 |
if ( $tag === $shortcode[2] ) {
|
201 |
return true;
|
202 |
+
} elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) {
|
203 |
+
return true;
|
204 |
}
|
205 |
}
|
206 |
}
|
251 |
|
252 |
function ecwid_add_frontend_styles() {
|
253 |
wp_register_script('ecwid-products-list-js', plugins_url('ecwid-shopping-cart/js/products-list.js'), array('jquery-ui-widget'));
|
254 |
+
wp_register_style('ecwid-products-list-css', plugins_url('ecwid-shopping-cart/css/products-list.css'), array(), get_option('ecwid_plugin_version'));
|
255 |
+
wp_enqueue_style('ecwid-css', plugins_url('ecwid-shopping-cart/css/frontend.css'),array(), get_option('ecwid_plugin_version'));
|
256 |
+
|
257 |
+
if ((bool)get_option('ecwid_use_chameleon')) {
|
258 |
+
wp_enqueue_script('ecwid-chameleon-js', plugins_url('ecwid-shopping-cart/js/ecwid-chameleon.js'), array(), get_option('ecwid_plugin_version'), true);
|
259 |
+
}
|
260 |
|
261 |
if (is_active_widget(false, false, 'ecwidrecentlyviewed')) {
|
262 |
+
wp_enqueue_script('ecwid-recently-viewed', plugins_url('ecwid-shopping-cart/js/recently-viewed-common.js'), array('jquery', 'utils'), get_option('ecwid_plugin_version'), true);
|
263 |
|
264 |
wp_localize_script(
|
265 |
'ecwid-products-list-js',
|
400 |
do_action('ecwid_plugin_installed', $current_version);
|
401 |
add_option('ecwid_plugin_version', $current_version);
|
402 |
|
403 |
+
if (get_option('ecwid_installation_date') % 4 == 0) {
|
404 |
+
update_option('ecwid_use_chameleon', true);
|
405 |
+
}
|
406 |
+
|
407 |
} elseif ($upgrade) {
|
408 |
|
409 |
ecwid_plugin_add_oauth();
|
437 |
update_option('ecwid_error_log', json_encode($errors));
|
438 |
}
|
439 |
|
440 |
+
function ecwid_get_last_logged_error()
|
441 |
+
{
|
442 |
+
$logs = get_option('ecwid_error_log');
|
443 |
+
|
444 |
+
if ($logs) {
|
445 |
+
$logs = json_decode($logs);
|
446 |
+
}
|
447 |
+
|
448 |
+
if (count($logs) > 0) {
|
449 |
+
$entry = $logs[count($logs) - 1];
|
450 |
+
if (isset($entry->message)) {
|
451 |
+
return $entry->message;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
return '';
|
456 |
+
}
|
457 |
+
|
458 |
function ecwid_plugin_add_oauth()
|
459 |
{
|
460 |
add_option('ecwid_oauth_client_id', 'RD4o2KQimiGUrFZc');
|
815 |
|
816 |
function ecwid_wrap_shortcode_content($content, $name)
|
817 |
{
|
818 |
+
return "<!-- Ecwid shopping cart plugin v 3.2 -->"
|
819 |
. ecwid_get_scriptjs_code()
|
820 |
. "<div class=\"ecwid-shopping-cart-$name\">$content</div>"
|
821 |
+
. "<!-- END Ecwid Shopping Cart v 3.2 -->";
|
822 |
}
|
823 |
|
824 |
function ecwid_get_scriptjs_code($force_lang = null) {
|
827 |
if (!$ecwid_script_rendered) {
|
828 |
$store_id = get_ecwid_store_id();
|
829 |
$force_lang_str = !is_null($force_lang) ? "&lang=$force_lang" : '';
|
830 |
+
$s = '<script data-cfasync="false" type="text/javascript" src="https://' . APP_ECWID_COM . '/script.js?' . $store_id . '&data_platform=wporg' . $force_lang_str . '"></script>';
|
831 |
$s = $s . ecwid_sso();
|
832 |
$ecwid_script_rendered = true;
|
833 |
|
1327 |
delete_option("ecwid_installation_date");
|
1328 |
delete_option('ecwid_hide_appearance_menu');
|
1329 |
delete_option("ecwid_advanced_theme_layout");
|
1330 |
+
|
1331 |
+
delete_option("ecwid_plugin_version");
|
1332 |
}
|
1333 |
|
1334 |
function ecwid_abs_intval($value) {
|
1386 |
'ecwid_advanced_settings_do_page'
|
1387 |
);
|
1388 |
}
|
|
|
1389 |
}
|
1390 |
|
1391 |
function ecwid_register_admin_styles($hook_suffix) {
|
1392 |
|
1393 |
+
wp_enqueue_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'), array(), get_option('ecwid_plugin_version'));
|
1394 |
|
1395 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
1396 |
+
wp_enqueue_style('ecwid-admin38-css', plugins_url('ecwid-shopping-cart/css/admin.3.8.css'), array('ecwid-admin-css'), get_option('ecwid_plugin_version'), 'all');
|
1397 |
}
|
1398 |
|
1399 |
if (isset($_GET['page']) && $_GET['page'] == 'ecwid') {
|
1400 |
|
1401 |
if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
|
1402 |
// Open dashboard for the first time, ecwid store id is set to demo => need landing styles/scripts
|
1403 |
+
wp_enqueue_script('ecwid-landing-js', plugins_url('ecwid-shopping-cart/js/landing.js'), array(), get_option('ecwid_plugin_version'));
|
1404 |
+
wp_enqueue_style('ecwid-landing-css', plugins_url('ecwid-shopping-cart/css/landing.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1405 |
+
wp_enqueue_style('ecwid-landing-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300', array(), get_option('ecwid_plugin_version'));
|
1406 |
} else {
|
1407 |
// We already connected and disconnected the store, no need for fancy landing
|
1408 |
+
wp_enqueue_script('ecwid-connect-js', plugins_url('ecwid-shopping-cart/js/dashboard.js'), array(), get_option('ecwid_plugin_version'));
|
1409 |
}
|
1410 |
}
|
1411 |
}
|
1414 |
|
1415 |
if ( ($hook_suffix != 'post.php' && $hook_suffix != 'post-new.php') && strpos($hook_suffix, 'ecwid') === false) return;
|
1416 |
|
1417 |
+
wp_enqueue_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1418 |
+
wp_enqueue_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), get_option('ecwid_plugin_version'), 'all');
|
1419 |
|
1420 |
if (version_compare(get_bloginfo('version'), '3.8-beta') > 0) {
|
1421 |
wp_enqueue_style('ecwid-settings38-css', plugins_url('ecwid-shopping-cart/css/settings.3.8.css'), array('ecwid-settings-css'), '', 'all');
|
1450 |
|
1451 |
case 'general':
|
1452 |
register_setting('ecwid_options_page', 'ecwid_store_id','ecwid_abs_intval' );
|
1453 |
+
if (isset($_POST['ecwid_store_id']) && intval($_POST['ecwid_store_id']) == 0) {
|
1454 |
Ecwid_Message_Manager::reset_hidden_messages();
|
1455 |
}
|
1456 |
break;
|
1459 |
register_setting('ecwid_options_page', 'ecwid_default_category_id', 'ecwid_abs_intval');
|
1460 |
register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
|
1461 |
register_setting('ecwid_options_page', 'ecwid_enable_advanced_theme_layout');
|
1462 |
+
register_setting('ecwid_options_page', 'ecwid_use_chameleon');
|
1463 |
break;
|
1464 |
}
|
1465 |
|
1471 |
|
1472 |
function ecwid_common_admin_scripts() {
|
1473 |
|
1474 |
+
wp_enqueue_script('ecwid-admin-js', plugins_url('ecwid-shopping-cart/js/admin.js'), array(), get_option('ecwid_plugin_version'));
|
1475 |
+
wp_enqueue_script('ecwid-modernizr-js', plugins_url('ecwid-shopping-cart/js/modernizr.js'), array(), get_option('ecwid_plugin_version'));
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
function ecwid_get_register_link()
|
1479 |
+
{
|
1480 |
+
$link = 'https://my.ecwid.com/cp/?source=wporg%s#register';
|
1481 |
+
|
1482 |
+
global $current_user;
|
1483 |
+
get_currentuserinfo();
|
1484 |
+
|
1485 |
+
$user_data = '';
|
1486 |
+
if ($current_user->ID && function_exists('get_user_meta')) {
|
1487 |
+
$meta = get_user_meta($current_user->ID);
|
1488 |
+
|
1489 |
+
$user_data = '&' . build_query(array(
|
1490 |
+
'name' => get_user_meta($current_user->ID, 'first_name', true) . ' ' . get_user_meta($current_user->ID, 'last_name', true),
|
1491 |
+
'nickname' => get_user_meta($current_user->ID, 'nickname', true),
|
1492 |
+
'email' => $current_user->user_email
|
1493 |
+
));
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
$link = sprintf($link, $user_data);
|
1497 |
+
|
1498 |
+
return $link;
|
1499 |
}
|
1500 |
|
1501 |
function ecwid_general_settings_do_page() {
|
1502 |
|
1503 |
+
$connection_error = isset($_GET['connection_error']);
|
1504 |
+
if ($connection_error) {
|
1505 |
+
$last_error = ecwid_get_last_logged_error();
|
1506 |
+
}
|
1507 |
+
|
1508 |
if (get_option('ecwid_store_id') == ECWID_DEMO_STORE_ID) {
|
1509 |
global $ecwid_oauth;
|
1510 |
|
|
|
1511 |
$register = !$connection_error && !isset($_GET['connect']) && !@$_COOKIE['ecwid_create_store_clicked'];
|
1512 |
|
1513 |
require_once(ECWID_PLUGIN_DIR . '/templates/landing.php');
|
1515 |
|
1516 |
if (get_ecwid_store_id() == ECWID_DEMO_STORE_ID) {
|
1517 |
global $ecwid_oauth;
|
|
|
1518 |
|
1519 |
require_once ECWID_PLUGIN_DIR . '/templates/connect.php';
|
1520 |
} else {
|
1576 |
|
1577 |
function ecwid_appearance_settings_do_page() {
|
1578 |
|
1579 |
+
wp_register_script('ecwid-appearance-js', plugins_url('ecwid-shopping-cart/js/appearance.js'), array(), get_option('ecwid_plugin_version'), true);
|
1580 |
wp_enqueue_script('ecwid-appearance-js');
|
1581 |
|
1582 |
$disabled = false;
|
1721 |
|
1722 |
class EcwidBadgeWidget extends WP_Widget {
|
1723 |
|
1724 |
+
var $url_template = "//static.ecwid.com/badges/%s.png";
|
1725 |
var $available_badges;
|
1726 |
|
1727 |
function EcwidBadgeWidget() {
|
2083 |
|
2084 |
function widget($args, $instance) {
|
2085 |
|
2086 |
+
wp_enqueue_script('ecwid-recently-viewed-js', plugins_url('ecwid-shopping-cart/js/recently-viewed.js'), array('jquery', 'utils', 'ecwid-products-list-js'), get_option('ecwid_plugin_version'));
|
2087 |
wp_enqueue_style('ecwid-products-list-css');
|
2088 |
+
wp_enqueue_style('ecwid-recently-viewed-css', plugins_url('ecwid-shopping-cart/css/recently-viewed.css'), array(), get_option('ecwid_plugin_version'));
|
2089 |
extract($args);
|
2090 |
|
2091 |
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']);
|
2266 |
'ecwid_store_shortcode_used',
|
2267 |
'store_link_widget',
|
2268 |
'recently_viewed_widget',
|
2269 |
+
'avalanche_used',
|
2270 |
+
'chameleon_used'
|
2271 |
);
|
2272 |
|
2273 |
$usage_stats = ecwid_gather_usage_stats();
|
2303 |
'ecwid_store_shortcode_used',
|
2304 |
'store_link_widget',
|
2305 |
'recently_viewed_widget',
|
2306 |
+
'avalanche_used',
|
2307 |
+
'chameleon_used'
|
2308 |
);
|
2309 |
|
2310 |
$usage_stats = array();
|
2326 |
$usage_stats['store_link_widget'] = (bool) is_active_widget(false, false, 'ecwidstorelink');
|
2327 |
$usage_stats['recently_viewed_widget'] = (bool) is_active_widget(false, false, 'ecwidrecentlyviewed');
|
2328 |
$usage_stats['avalanche_used'] = (bool) is_plugin_active('ecwid-widgets-avalanche/ecwid_widgets_avalanche.php');
|
2329 |
+
$usage_stats['chameleon_used'] = (bool)get_option('ecwid_use_chameleon');
|
2330 |
|
2331 |
return $usage_stats;
|
2332 |
}
|
2427 |
{
|
2428 |
$ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
|
2429 |
$ecwid_api_check_time = get_option('ecwid_api_check_time');
|
2430 |
+
$now = time();
|
2431 |
|
2432 |
+
if ( $now > ($ecwid_api_check_time + 60 * 60 * 3) && get_ecwid_store_id() != ECWID_DEMO_STORE_ID ) {
|
2433 |
// check whether API is available once in 3 hours
|
2434 |
$ecwid = ecwid_new_product_api();
|
2435 |
|
2436 |
$ecwid_is_api_enabled = ($ecwid->is_api_enabled() ? 'on' : 'off');
|
2437 |
+
|
2438 |
update_option('ecwid_is_api_enabled', $ecwid_is_api_enabled);
|
2439 |
update_option('ecwid_api_check_time', $now);
|
2440 |
}
|
2465 |
*/
|
2466 |
function ecwid_find_shortcodes( $content, $tag ) {
|
2467 |
|
2468 |
+
if ( false === strpos( $content, '[' ) ) {
|
2469 |
+
return false;
|
2470 |
+
}
|
2471 |
+
|
2472 |
if ( shortcode_exists( $tag ) ) {
|
2473 |
+
preg_match_all( '/' . ecwid_get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
|
2474 |
if ( empty( $matches ) )
|
2475 |
return false;
|
2476 |
|
2478 |
foreach ( $matches as $shortcode ) {
|
2479 |
if ( $tag === $shortcode[2] ) {
|
2480 |
$result[] = $shortcode;
|
2481 |
+
} elseif ( !empty($shortcode[5]) && $found = ecwid_find_shortcodes( $shortcode[5], $tag ) ) {
|
2482 |
+
$result[] = $found;
|
2483 |
}
|
2484 |
}
|
2485 |
|
2490 |
}
|
2491 |
return false;
|
2492 |
}
|
2493 |
+
|
2494 |
+
// Since we use shortcode regex in our own functions, we need it to be persistent
|
2495 |
+
function ecwid_get_shortcode_regex() {
|
2496 |
+
global $shortcode_tags;
|
2497 |
+
$tagnames = array_keys($shortcode_tags);
|
2498 |
+
$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
|
2499 |
+
|
2500 |
+
// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
|
2501 |
+
// Also, see shortcode_unautop() and shortcode.js.
|
2502 |
+
return
|
2503 |
+
'\\[' // Opening bracket
|
2504 |
+
. '(\\[?)' // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
|
2505 |
+
. "($tagregexp)" // 2: Shortcode name
|
2506 |
+
. '(?![\\w-])' // Not followed by word character or hyphen
|
2507 |
+
. '(' // 3: Unroll the loop: Inside the opening shortcode tag
|
2508 |
+
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
2509 |
+
. '(?:'
|
2510 |
+
. '\\/(?!\\])' // A forward slash not followed by a closing bracket
|
2511 |
+
. '[^\\]\\/]*' // Not a closing bracket or forward slash
|
2512 |
+
. ')*?'
|
2513 |
+
. ')'
|
2514 |
+
. '(?:'
|
2515 |
+
. '(\\/)' // 4: Self closing tag ...
|
2516 |
+
. '\\]' // ... and closing bracket
|
2517 |
+
. '|'
|
2518 |
+
. '\\]' // Closing bracket
|
2519 |
+
. '(?:'
|
2520 |
+
. '(' // 5: Unroll the loop: Optionally, anything between the opening and closing shortcode tags
|
2521 |
+
. '[^\\[]*+' // Not an opening bracket
|
2522 |
+
. '(?:'
|
2523 |
+
. '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing shortcode tag
|
2524 |
+
. '[^\\[]*+' // Not an opening bracket
|
2525 |
+
. ')*+'
|
2526 |
+
. ')'
|
2527 |
+
. '\\[\\/\\2\\]' // Closing shortcode tag
|
2528 |
+
. ')?'
|
2529 |
+
. ')'
|
2530 |
+
. '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
|
2531 |
+
}
|
2532 |
+
|
2533 |
?>
|
includes/class-ecwid-oauth.php
CHANGED
@@ -57,7 +57,7 @@ class Ecwid_OAuth {
|
|
57 |
|| !isset( $result->access_token )
|
58 |
|| ( $result->token_type != 'Bearer' )
|
59 |
) {
|
60 |
-
ecwid_log_error(
|
61 |
return $this->trigger_auth_error();
|
62 |
}
|
63 |
|
@@ -73,6 +73,9 @@ class Ecwid_OAuth {
|
|
73 |
{
|
74 |
update_option( 'ecwid_store_id', '' );
|
75 |
update_option( 'ecwid_oauth_token', '' );
|
|
|
|
|
|
|
76 |
wp_redirect('admin.php?page=ecwid');
|
77 |
}
|
78 |
|
57 |
|| !isset( $result->access_token )
|
58 |
|| ( $result->token_type != 'Bearer' )
|
59 |
) {
|
60 |
+
ecwid_log_error(var_export($return, true));
|
61 |
return $this->trigger_auth_error();
|
62 |
}
|
63 |
|
73 |
{
|
74 |
update_option( 'ecwid_store_id', '' );
|
75 |
update_option( 'ecwid_oauth_token', '' );
|
76 |
+
update_option('ecwid_is_api_enabled', 'off');
|
77 |
+
update_option('ecwid_api_check_time', 0);
|
78 |
+
|
79 |
wp_redirect('admin.php?page=ecwid');
|
80 |
}
|
81 |
|
includes/class-ecwid-store-editor.php
CHANGED
@@ -57,9 +57,9 @@ HTML;
|
|
57 |
}
|
58 |
|
59 |
public function add_scripts() {
|
60 |
-
wp_enqueue_style( 'ecwid-store-editor-css', plugins_url( 'ecwid-shopping-cart/css/store-popup.css' ) );
|
61 |
-
wp_enqueue_script( 'ecwid-store-editor-common-js', plugins_url( 'ecwid-shopping-cart/js/store-editor-common.js' ) );
|
62 |
-
wp_enqueue_script( 'ecwid-store-editor-page-js', plugins_url('ecwid-shopping-cart/js/store-editor-page.js' ) );
|
63 |
wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
|
64 |
add_editor_style( plugins_url( 'ecwid-shopping-cart/css/page-editor.css' ) );
|
65 |
}
|
57 |
}
|
58 |
|
59 |
public function add_scripts() {
|
60 |
+
wp_enqueue_style( 'ecwid-store-editor-css', plugins_url( 'ecwid-shopping-cart/css/store-popup.css' ), array(), get_option('ecwid_plugin_version') );
|
61 |
+
wp_enqueue_script( 'ecwid-store-editor-common-js', plugins_url( 'ecwid-shopping-cart/js/store-editor-common.js' ), array(), get_option('ecwid_plugin_version') );
|
62 |
+
wp_enqueue_script( 'ecwid-store-editor-page-js', plugins_url('ecwid-shopping-cart/js/store-editor-page.js' ), array(), get_option('ecwid_plugin_version') );
|
63 |
wp_localize_script( 'ecwid-store-editor-page-js', 'ecwid_i18n', array( 'edit_store_appearance' => __( 'Edit Appearance', 'ecwid-shopping-cart' ) ) );
|
64 |
add_editor_style( plugins_url( 'ecwid-shopping-cart/css/page-editor.css' ) );
|
65 |
}
|
includes/themes/class-ecwid-theme-base.php
CHANGED
@@ -12,7 +12,8 @@ class Ecwid_Theme_Base {
|
|
12 |
wp_enqueue_script(
|
13 |
'ecwid-scroller',
|
14 |
plugins_url( 'ecwid-shopping-cart/js/create_scroller.js' ),
|
15 |
-
array( 'jquery' )
|
|
|
16 |
);
|
17 |
}
|
18 |
}
|
12 |
wp_enqueue_script(
|
13 |
'ecwid-scroller',
|
14 |
plugins_url( 'ecwid-shopping-cart/js/create_scroller.js' ),
|
15 |
+
array( 'jquery' ),
|
16 |
+
get_option('ecwid_plugin_version')
|
17 |
);
|
18 |
}
|
19 |
}
|
includes/themes/class-ecwid-theme-customizr.php
CHANGED
@@ -12,8 +12,8 @@ class Ecwid_Theme_Customizr extends Ecwid_Theme_Base
|
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
15 |
-
wp_enqueue_script( 'ecwid-theme-js', plugins_url( 'ecwid-shopping-cart/js/themes/customizr.js' ), array( 'jquery' ),
|
16 |
-
wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/customizr.css' ), array(),
|
17 |
}
|
18 |
}
|
19 |
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
15 |
+
wp_enqueue_script( 'ecwid-theme-js', plugins_url( 'ecwid-shopping-cart/js/themes/customizr.js' ), array( 'jquery' ), get_option('ecwid_plugin_version'), true );
|
16 |
+
wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/customizr.css' ), array(), get_option('ecwid_plugin_version'), 'all' );
|
17 |
}
|
18 |
}
|
19 |
|
includes/themes/class-ecwid-theme-pagelines.php
CHANGED
@@ -12,7 +12,7 @@ class Ecwid_Theme_Pagelines extends Ecwid_Theme_Base
|
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
15 |
-
wp_enqueue_script( 'ecwid-theme-js', plugins_url( 'ecwid-shopping-cart/js/themes/pagelines.js' ), array( 'jquery' ),
|
16 |
}
|
17 |
}
|
18 |
|
12 |
{
|
13 |
parent::__construct();
|
14 |
|
15 |
+
wp_enqueue_script( 'ecwid-theme-js', plugins_url( 'ecwid-shopping-cart/js/themes/pagelines.js' ), array( 'jquery' ), get_option('ecwid_plugin_version'), true );
|
16 |
}
|
17 |
}
|
18 |
|
includes/themes/class-ecwid-theme-responsive.php
CHANGED
@@ -13,8 +13,8 @@ class Ecwid_Theme_Responsive extends Ecwid_Theme_Base
|
|
13 |
if (!is_admin()) {
|
14 |
|
15 |
if ( $this->need_advanced_layout() ) {
|
16 |
-
wp_enqueue_style( 'ecwid-theme-adjustments' , plugins_url( 'ecwid-shopping-cart/css/themes/responsive-adjustments.css' ), array(),
|
17 |
-
wp_enqueue_script( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/js/themes/responsive.js' ), array( 'jquery' ),
|
18 |
|
19 |
add_filter( 'ecwid_minicart_shortcode_content', array( $this, 'minicart_shortcode_content' ) );
|
20 |
add_filter( 'ecwid_search_shortcode_content', array( $this, 'search_shortcode_content' ) );
|
@@ -22,7 +22,7 @@ class Ecwid_Theme_Responsive extends Ecwid_Theme_Base
|
|
22 |
|
23 |
wp_enqueue_style( 'ecwid-open-sans' , 'http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext,cyrillic,greek-ext,vietnamese,greek,latin-ext');
|
24 |
wp_enqueue_style( 'dashicons' );
|
25 |
-
wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/responsive.css' ), array(),
|
26 |
|
27 |
add_filter('body_class', array($this, 'body_class'));
|
28 |
|
13 |
if (!is_admin()) {
|
14 |
|
15 |
if ( $this->need_advanced_layout() ) {
|
16 |
+
wp_enqueue_style( 'ecwid-theme-adjustments' , plugins_url( 'ecwid-shopping-cart/css/themes/responsive-adjustments.css' ), array(), get_option('ecwid_plugin_version'), 'all' );
|
17 |
+
wp_enqueue_script( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/js/themes/responsive.js' ), array( 'jquery' ), get_option('ecwid_plugin_version'), true );
|
18 |
|
19 |
add_filter( 'ecwid_minicart_shortcode_content', array( $this, 'minicart_shortcode_content' ) );
|
20 |
add_filter( 'ecwid_search_shortcode_content', array( $this, 'search_shortcode_content' ) );
|
22 |
|
23 |
wp_enqueue_style( 'ecwid-open-sans' , 'http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext,cyrillic,greek-ext,vietnamese,greek,latin-ext');
|
24 |
wp_enqueue_style( 'dashicons' );
|
25 |
+
wp_enqueue_style( 'ecwid-theme-fixes' , plugins_url( 'ecwid-shopping-cart/css/themes/responsive.css' ), array(), get_option('ecwid_plugin_version'), 'all' );
|
26 |
|
27 |
add_filter('body_class', array($this, 'body_class'));
|
28 |
|
includes/themes/class-ecwid-theme-twentyfifteen.php
CHANGED
@@ -11,7 +11,7 @@ class Ecwid_Theme_2015 extends Ecwid_Theme_Base
|
|
11 |
parent::__construct();
|
12 |
|
13 |
if (ecwid_page_has_productbrowser()) {
|
14 |
-
wp_enqueue_style( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/css/themes/2015.css' ), array('twentyfifteen-style') );
|
15 |
}
|
16 |
|
17 |
add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
|
11 |
parent::__construct();
|
12 |
|
13 |
if (ecwid_page_has_productbrowser()) {
|
14 |
+
wp_enqueue_style( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/css/themes/2015.css' ), array('twentyfifteen-style'), get_option('ecwid_plugin_version') );
|
15 |
}
|
16 |
|
17 |
add_action('ecwid_plugin_installed', array($this, 'on_ecwid_plugin_installed'));
|
includes/themes/class-ecwid-theme-twentyfourteen.php
CHANGED
@@ -13,7 +13,7 @@ class Ecwid_Theme_2014 extends Ecwid_Theme_Base
|
|
13 |
parent::__construct();
|
14 |
|
15 |
if (ecwid_page_has_productbrowser()) {
|
16 |
-
wp_enqueue_style( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/css/themes/2014.css' ), array('twentyfourteen-style') );
|
17 |
}
|
18 |
}
|
19 |
}
|
13 |
parent::__construct();
|
14 |
|
15 |
if (ecwid_page_has_productbrowser()) {
|
16 |
+
wp_enqueue_style( 'ecwid-theme', plugins_url( 'ecwid-shopping-cart/css/themes/2014.css' ), array('twentyfourteen-style'), get_option('ecwid_plugin_version') );
|
17 |
}
|
18 |
}
|
19 |
}
|
js/ecwid-chameleon.js
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if (typeof(Ecwid) == 'object') {
|
2 |
+
Ecwid.OnAPILoaded.add(function() {
|
3 |
+
|
4 |
+
var html_id = document.getElementsByTagName("html")[0].id;
|
5 |
+
var body_id = document.getElementsByTagName("body")[0].id;;
|
6 |
+
var css_prefix = 'html#'+html_id+' body#'+body_id+'.chameleon';
|
7 |
+
|
8 |
+
var css = '';
|
9 |
+
var parent = document.querySelector('.ecwid-productBrowser').parentNode;
|
10 |
+
var computedStyle = getComputedStyle(parent, null);
|
11 |
+
|
12 |
+
var primary_color = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_color !== 'undefined') ? ecwidChameleon.primary_color : computedStyle.color );
|
13 |
+
var primary_background = tinycolor( (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') ? ecwidChameleon.primary_background : getBackground(parent) );
|
14 |
+
|
15 |
+
if (typeof ecwidChameleon !== 'undefined' && typeof ecwidChameleon.primary_background !== 'undefined') {
|
16 |
+
var primary_link = tinycolor( ecwidChameleon.primary_link );
|
17 |
+
}
|
18 |
+
else {
|
19 |
+
var a = document.createElement('a');
|
20 |
+
a.href = a.textContent = url = '';
|
21 |
+
parent.appendChild(a);
|
22 |
+
var primary_link = tinycolor( document.defaultView.getComputedStyle(a, null).color );
|
23 |
+
parent.removeChild(a);
|
24 |
+
}
|
25 |
+
|
26 |
+
if (tinycolor.equals(primary_background, 'transparent')) {
|
27 |
+
primary_background = tinycolor('#fff');
|
28 |
+
}
|
29 |
+
|
30 |
+
var accent_color = tinycolor(primary_link.toString()).darken(15).brighten();
|
31 |
+
var muted_accent_color = tinycolor(primary_link.toString()).darken(15).setAlpha(.6);
|
32 |
+
|
33 |
+
var hover_link = tinycolor(primary_link.toString()).lighten(20);
|
34 |
+
var muted_color = (primary_color.isLight()) ? tinycolor(primary_color.toString()).darken(15) : tinycolor(primary_color.toString()).lighten(20);
|
35 |
+
var muted_link = tinycolor(primary_color.toString()).lighten(20);
|
36 |
+
var secondary_link = tinycolor(primary_link.toString()).darken(20);
|
37 |
+
|
38 |
+
var border_color = tinycolor(primary_color.toString()).setAlpha(.1);
|
39 |
+
|
40 |
+
var muted_background = tinycolor(primary_background.toString());
|
41 |
+
var muted_background = (muted_background.isLight()) ? muted_background.darken(5) : muted_background.lighten(15);
|
42 |
+
var muted_soft_background = tinycolor(primary_background.toString());
|
43 |
+
var muted_soft_background = (muted_soft_background.isLight()) ? muted_soft_background.darken(10) : muted_soft_background.lighten(20);
|
44 |
+
var hover_background = tinycolor(primary_link.toString()).lighten(20).setAlpha(.2);
|
45 |
+
|
46 |
+
var button_border_color = tinycolor(hover_link.toString()).darken(5);
|
47 |
+
var button_hover_top = tinycolor(hover_link.toString()).lighten(5);
|
48 |
+
var button_hover_bottom = tinycolor(primary_link.toString()).lighten(5);
|
49 |
+
var button_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.3);
|
50 |
+
var button_hover_shadow = tinycolor(button_border_color.toString()).lighten(15).setAlpha(.4);
|
51 |
+
var button_border_hover_color = tinycolor(hover_link.toString());
|
52 |
+
|
53 |
+
// Additional rules
|
54 |
+
if (!tinycolor.isReadable(accent_color, muted_soft_background)) {
|
55 |
+
accent_color = tinycolor(secondary_link.toString()).brighten(20);
|
56 |
+
muted_accent_color = tinycolor(secondary_link.toString()).lighten(20);
|
57 |
+
}
|
58 |
+
if (!tinycolor.isReadable(secondary_link, '#F0F0F0')) {
|
59 |
+
secondary_link = (secondary_link.isLight()) ? tinycolor(secondary_link.toString()).darken() : tinycolor(secondary_link.toString()).lighten();
|
60 |
+
}
|
61 |
+
var button_color = tinycolor('#fff');
|
62 |
+
if (!tinycolor.isReadable(button_color, primary_link)) {
|
63 |
+
button_color = tinycolor(primary_background.toString());
|
64 |
+
}
|
65 |
+
|
66 |
+
// Font family
|
67 |
+
css+= css_prefix + ' * { font-family: inherit !important; }\n';
|
68 |
+
|
69 |
+
// Primary colors
|
70 |
+
css+= css_prefix + ' div.ecwid-productBrowser-head{ color: '+ primary_color.toString() +'; }\n';
|
71 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productNameLink a:visited{ color: '+ muted_color.toString() +'; }\n';
|
72 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productMiddleFragment-mouseover div.ecwid-productBrowser-productNameLink a:visited{ font-size: 17px; color: '+ primary_color.toString() +'; }\n';
|
73 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:active, ' + css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-productNameLink a:visited{ color: '+ primary_color.toString() +'; }\n';
|
74 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-price{ color: '+ primary_color.toString() +'; }\n';
|
75 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-subtotalAmountMinus, ' + css_prefix + ' div.ecwid-productBrowser-cart-shippingAmount, ' + css_prefix + ' div.ecwid-productBrowser-cart-taxAmount{ color: '+ primary_color.toString() +'; }\n';
|
76 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-totalLabel{ color: '+ primary_color.toString() +'; }\n';
|
77 |
+
css+= css_prefix + ' table.ecwid-productBrowser-productsTable-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsList-v2 div.ecwid-productBrowser-productNameLink:hover a, ' + css_prefix + ' table.ecwid-productBrowser-productsGrid-v2 div.ecwid-productBrowser-productNameLink:hover a { color: '+ primary_color.toString() +'; }\n';
|
78 |
+
css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price, ' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ primary_color.toString() +'; }\n';
|
79 |
+
|
80 |
+
// Muted colors
|
81 |
+
css+= css_prefix + ' .ecwid{ color: '+ muted_color.toString() +'; }\n';
|
82 |
+
css+= css_prefix + ' div.ecwid-productBrowser-categoryPath{ color: '+ muted_color.toString() +'; }\n';
|
83 |
+
css+= css_prefix + ' div.ecwid-productBrowser-subcategories-categoryName{ color: '+ muted_color.toString() +'; }\n';
|
84 |
+
css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-itemsCountLabel{ color: '+ muted_color.toString() +'; }\n';
|
85 |
+
css+= css_prefix + ' div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
|
86 |
+
css+= css_prefix + ' div.ecwid-results-topPanel div{ color: '+ muted_color.toString() +'; }\n';
|
87 |
+
css+= css_prefix + ' div.ecwid-productBrowser-details-optionPanel label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
|
88 |
+
css+= css_prefix + ' div.ecwid-productBrowser-details-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
|
89 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
|
90 |
+
css+= css_prefix + ' span.ecwid-productBrowser-cart-weight{ color: '+ muted_color.toString() +'; }\n';
|
91 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-optionsList{ color: '+ muted_color.toString() +'; }\n';
|
92 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-subtotalLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-shippingLabel,' + css_prefix + ' div.ecwid-productBrowser-cart-taxLabel{ color: '+ muted_color.toString() +'; }\n';
|
93 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote{ color: '+ muted_color.toString() +'; }\n';
|
94 |
+
css+= css_prefix + ' label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
|
95 |
+
css+= css_prefix + ' div.ecwid-FormPopup-fieldWrapper label.ecwid-fieldLabel{ color: '+ muted_color.toString() +'; }\n';
|
96 |
+
css+= css_prefix + ' div.ecwid-Checkout-PasswordBlock-tip{ color: '+ muted_color.toString() +'; }\n';
|
97 |
+
css+= css_prefix + ' div.ecwid-pager{ color: '+ muted_color.toString() +'; }\n';
|
98 |
+
css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-disabled{ color: '+ muted_color.toString() +'; }\n';
|
99 |
+
css+= css_prefix + ' div.ecwid-productBrowser-details-inTheBag div{ color: '+ muted_color.toString() +'; }\n';
|
100 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productsList-descr{ color: '+ muted_color.toString() +'; }\n';
|
101 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productsTable div.ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
|
102 |
+
css+= css_prefix + ' div.ecwid-productBrowser-extraFields-side{ color: '+ muted_color.toString() +'; }\n';
|
103 |
+
css+= css_prefix + ' div.ecwid-Invoice-block{ color: '+ muted_color.toString() +'; }\n';
|
104 |
+
css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-sku{ color: '+ muted_color.toString() +'; }\n';
|
105 |
+
css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-optionsList{ color: '+ muted_color.toString() +'; }\n';
|
106 |
+
css+= css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-productBrowser-price,' + css_prefix + ' table.ecwid-Invoice-itemsTable .ecwid-Invoice-qtyLabel{ color: '+ muted_color.toString() +'; }\n';
|
107 |
+
css+= css_prefix + ' div.ecwid-Invoice-Summary-label,' + css_prefix + ' div.ecwid-Invoice-Summary-value{ color: '+ muted_color.toString() +'; }\n';
|
108 |
+
css+= css_prefix + ' div.ecwid-Invoice-header-placeOrder div.gwt-Label,' + css_prefix + ' div.ecwid-Invoice-footer-placeOrder div.gwt-Label,' + css_prefix + ' td.ecwid-Invoice-header-orderConfirmation-text,' + css_prefix + ' td.ecwid-Invoice-footer-orderConfirmation-text{ color: '+ muted_color.toString() +'; }\n';
|
109 |
+
css+= css_prefix + ' div.ecwid-productBrowser-details-outOfStockLabel{ color: '+ muted_color.toString() +'; }\n';
|
110 |
+
|
111 |
+
// Borders
|
112 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productsGrid-productTopFragment-mouseover,' + css_prefix + ' div.ecwid-productBrowser-productsGrid-productBottomFragment-mouseover{ border-color: '+ border_color.toString() +'; }\n';
|
113 |
+
css+= css_prefix + ' .ecwid-productBrowser-productsGrid-v2 td.ecwid-productBrowser-productsGrid-productInside.ecwid-productBrowser-productsGrid-hover{ border-color: '+ border_color.toString() +'; }\n';
|
114 |
+
css+= css_prefix + ' td.ecwid-productBrowser-productsList-mouseover{ border-color: '+ border_color.toString() +'; }\n';
|
115 |
+
css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-top-hover{ border-color: '+ border_color.toString() +'; }\n';
|
116 |
+
css+= css_prefix + ' .ecwid-productBrowser-relatedProducts .ecwid-productBrowser-relatedProducts-item-bottom-hover{ border-color: '+ border_color.toString() +'; }\n';
|
117 |
+
css+= css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarFirst,' + css_prefix + ' table.ecwid-categoriesTabBar div.gwt-TabBarRest,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem,' + css_prefix + ' div.ecwid-categories-horizontal-menuBarContainer,' + css_prefix + ' td.ecwid-categories-vertical-table-cell,' + css_prefix + ' div.ecwid-categories-MenuBarPopup div.menuSeparatorInner{ border-color: '+ border_color.toString() +'; }\n';
|
118 |
+
|
119 |
+
// Accents
|
120 |
+
css+= css_prefix + ' div.ecwid-productBrowser-price{ color: '+ accent_color.toString() +'; }\n';
|
121 |
+
css+= css_prefix + ' div.ecwid-productBrowser-details-inStockLabel{ color: '+ muted_accent_color.toString() +'; }\n';
|
122 |
+
css+= css_prefix + ' div.ecwid-Checkout-blockTitle,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-Label,' + css_prefix + ' table.ecwid-Checkout-blockTitle div.gwt-HTML{ color: '+ muted_accent_color.toString() +'; }\n';
|
123 |
+
css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-visited{ color: '+ muted_accent_color.toString() +'; }\n';
|
124 |
+
css+= css_prefix + ' div.ecwid-Checkout-BreadCrumbs-link-current{ color: '+ muted_accent_color.toString() +'; border-color: '+ muted_accent_color.toString() +'; }\n';
|
125 |
+
css+= css_prefix + ' div.ecwid-fieldEnvelope-label{ color: '+ accent_color.toString() +'; }\n';
|
126 |
+
css+= css_prefix + ' input.gwt-PasswordTextBox,' + css_prefix + ' textarea.gwt-TextArea,' + css_prefix + ' input.gwt-DateBox{ color: '+ accent_color.toString() +'; }\n';
|
127 |
+
css+= css_prefix + ' .ecwid div.ecwid-AccentedContinueButton-label{ color: '+ accent_color.toString() +'; }\n';
|
128 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-termsCheckbox-rollover{ background-color: '+ hover_background.toString() +'; }\n';
|
129 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-estimationNote span{ color: '+ muted_accent_color.toString() +'; }\n';
|
130 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-asterisk{ color: '+ muted_accent_color.toString() +'; }\n';
|
131 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-totalAmount{ color: '+ accent_color.toString() +'; }\n';
|
132 |
+
|
133 |
+
// Primary links
|
134 |
+
css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:active,' + css_prefix + ' div.ecwid-productBrowser-categoryPath a:visited{ color: '+ primary_link.toString() +'; }\n';
|
135 |
+
css+= css_prefix + ' .ecwid a,' + css_prefix + ' .ecwid a:active, ' + css_prefix + ' .ecwid a:visited{ color: '+ primary_link.toString() +'; }\n';
|
136 |
+
css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link{ color: '+ primary_link.toString() +'; }\n';
|
137 |
+
css+= css_prefix + ' div.ecwid-pager span.ecwid-pager-link-enabled{ color: '+ primary_link.toString() +'; }\n';
|
138 |
+
css+= css_prefix + ' div.ecwid-productBrowser-productsTable-addToBagLink{ color: '+ primary_link.toString() +'; }\n';
|
139 |
+
|
140 |
+
// Hover links
|
141 |
+
css+= css_prefix + ' div.ecwid-productBrowser-categoryPath a:hover{ color: '+ hover_link.toString() +'; }\n';
|
142 |
+
css+= css_prefix + ' .ecwid a:hover{ color: '+ hover_link.toString() +'; }\n';
|
143 |
+
css+= css_prefix + ' div.ecwid-results-topPanel div.ecwid-results-topPanel-viewAsPanel-link:hover{ color: '+ hover_link.toString() +'; }\n';
|
144 |
+
|
145 |
+
// Backgrounds
|
146 |
+
css+= css_prefix + ' .ecwid .ecwid-ProductDetails-gray-panel-bottom,' + css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
|
147 |
+
css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel div.ecwid-productBrowser-sharePanel-header{ background-color: '+ muted_background.toString() +'; }\n';
|
148 |
+
css+= css_prefix + ' a.ecwid-productBrowser-nav-left,' + css_prefix + ' a.ecwid-productBrowser-nav-right{ background-color: '+ muted_background.toString() +'; }\n';
|
149 |
+
css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel{ background-color: '+ muted_background.toString() +'; }\n';
|
150 |
+
css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel .ecwid-productBrowser-ask-advice-panel-icon{ background-color: '+ muted_background.toString() +'; }\n';
|
151 |
+
css+= css_prefix + ' div.ecwid-productBrowser-backgroundedPanel{ background-color: '+ muted_soft_background.toString() +'; }\n';
|
152 |
+
css+= css_prefix + ' .ecwid-productBrowser-details-rightPanel .ecwid-productBrowser-sharePanel-buttonsContainer{ background-color: '+ muted_soft_background.toString() +'; border-color: '+ tinycolor(muted_color.toString()).setAlpha(.2).toString() +'}\n';
|
153 |
+
css+= css_prefix + ' tr.ecwid-productBrowser-cart-itemsTable-row-selected,' + css_prefix + ' td.ecwid-productBrowser-cart-itemsTable-cell-selected{ background-color: '+ muted_background.toString() +'; }\n';
|
154 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-EnterCouponBox{ background-color: '+ muted_background.toString() +'; border-color: transparent; }\n';
|
155 |
+
css+= css_prefix + ' div.ecwid-form{ background-color: '+ muted_background.toString() +'; }\n';
|
156 |
+
css+= css_prefix + ' .ecwid input.ecwid-productBrowser-details-qtyTextField{ color: '+ primary_color.toString() +'; }\n';
|
157 |
+
css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cell{ background-color: '+ primary_background.toString() +'; }\n';
|
158 |
+
css+= css_prefix + ' td.ecwid-productBrowser-productsTable-cellOdd{ background-color: '+ muted_background.toString() +'; }\n';
|
159 |
+
|
160 |
+
css+= css_prefix + ' div.ecwid-Invoice-cell-title{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
|
161 |
+
css+= css_prefix + ' div.ecwid-Invoice-blockTitle{ color: '+ muted_color +';background-color: '+ muted_background.toString() +'; }\n';
|
162 |
+
css+= css_prefix + ' td.ecwid-Invoice-cell{ background-color: '+ muted_background.toString() +'; }\n';
|
163 |
+
css+= css_prefix + ' td.ecwid-Invoice-edgeCell{ background-color: '+ muted_background.toString() +'; }\n';
|
164 |
+
|
165 |
+
// Buttons
|
166 |
+
css+= css_prefix + ' div.ecwid-AddToBagButton::after { content: "' + msg('TableProductsContainer.add_to_bag', 'Add To Bag') + '"; white-space: nowrap; }\n';
|
167 |
+
css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after { content: "' + msg('ShoppingCartView.continue', 'Continue Shopping') + '"; white-space: nowrap; }\n';
|
168 |
+
css+= css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton:after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Checkout') + '"; white-space: nowrap; }\n';
|
169 |
+
css+= css_prefix + ' div.ecwid-Checkout-placeOrderButton::after { content: "' + msg('FBAutofillCheckout.Breadcrumbs.checkout', 'Place Order') + '"; white-space: nowrap; }\n';
|
170 |
+
|
171 |
+
css+= css_prefix + ' div.ecwid-ContinueShoppingButton::after,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after, ' + css_prefix + ' div.ecwid-AddToBagButton::after, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton::after, ' + css_prefix + ' button.ecwid-AccentedButton span, ' + css_prefix + ' div.ecwid-Checkout-placeOrderButton::after{ color: '+ button_color +'; }\n';
|
172 |
+
|
173 |
+
css+= css_prefix + ' button.ecwid-AccentedButton,' + css_prefix + ' div.ecwid-AddToBagButton-up, ' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up,' + css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-AddToBagButton-down-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-down-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-down-hovering,' + css_prefix + ' button.ecwid-AccentedButton:hover { -webkit-box-sizing: border-box; box-sizing: border-box; width: auto; min-width: 160px; height: auto; padding: 11px 40px; background-color: '+primary_link+'; background-image: -webkit-gradient(linear, left top, left bottom, from('+hover_link+'), to('+primary_link+')); background-image: -webkit-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -moz-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -ms-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: -o-linear-gradient(top, '+hover_link+', '+primary_link+'); background-image: linear-gradient(to bottom, '+hover_link+', '+primary_link+'); border: 1px solid '+button_border_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_shadow+'; box-shadow: inset 0 1px 0 '+button_shadow+'; text-decoration: none; text-shadow: 0 1px 0 rgba(0,0,0,0.1); border-radius: 3px; padding-left: 20px; padding-right: 20px; }\n';
|
174 |
+
|
175 |
+
css+= css_prefix + ' div.ecwid-AddToBagButton-up-hovering,' + css_prefix + ' div.ecwid-productBrowser-cart-checkoutButton-up-hovering,' + css_prefix + ' div.ecwid-Checkout-placeOrderButton-up-hovering,' + css_prefix + ' div.ecwid-ContinueShoppingButton-up-hovering { background-image: -webkit-gradient(linear, left top, left bottom, from('+button_hover_top+'), to('+button_hover_bottom+')); background-image: -webkit-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -moz-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -ms-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: -o-linear-gradient(top, '+button_hover_top+', '+button_hover_bottom+'); background-image: linear-gradient(to bottom, '+button_hover_top+', '+button_hover_bottom+'); border: 1px solid '+button_border_hover_color+'; -webkit-box-shadow: inset 0 1px 0 '+button_hover_shadow+'; box-shadow: inset 0 1px 0 '+button_hover_shadow+'; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,0.2); } \n';
|
176 |
+
|
177 |
+
|
178 |
+
css+= css_prefix + ' button.gwt-Button,' + css_prefix + ' #wrapper button.gwt-Button{ color: '+ secondary_link +'; }\n';
|
179 |
+
css+= css_prefix + ' button.ecwid-AccentedButton{ line-height: 1; }\n';
|
180 |
+
|
181 |
+
// Search
|
182 |
+
css+= css_prefix + ' .ecwid-SearchPanel-button { background-color: '+ muted_background.toString() +'; border: 1px solid '+ border_color +'; border-radius: 2px; color: '+ primary_color +'; cursor: pointer; font-size: 12px; height: 26px; outline: medium none; padding: 2px 5px; text-decoration: none; vertical-align: baseline; white-space: nowrap; }\n';
|
183 |
+
|
184 |
+
// Categories
|
185 |
+
css+= css_prefix + ' span.ecwid-categories-category{ color: '+ muted_color.toString() +'; }\n';
|
186 |
+
css+= css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-selected span.ecwid-categories-category,' + css_prefix + ' div.ecwid-categoriesMenuBar td.gwt-MenuItem-current span.ecwid-categories-category,' + css_prefix + ' td.ecwid-categories-vertical-table-cell-selected span.ecwid-categories-category,' + css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected span.ecwid-categories-category{ color: '+ primary_link.toString() +'; }\n';
|
187 |
+
|
188 |
+
css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected td { background: none !important; }\n';
|
189 |
+
css+= css_prefix + ' table.ecwid-categoriesTabBar table.gwt-TabBarItem-selected { border: 1px solid; border-bottom: 0px; border-color: '+ border_color.toString() +'; }\n';
|
190 |
+
css+= css_prefix + ' .ecwid .ecwid-productBrowser-ask-advice-panel { min-height: 18px; height: auto; }\n';
|
191 |
+
|
192 |
+
head = document.getElementsByTagName('head')[0],
|
193 |
+
style = document.createElement('style');
|
194 |
+
style.type = 'text/css';
|
195 |
+
if (style.styleSheet) {
|
196 |
+
style.styleSheet.cssText = css;
|
197 |
+
} else {
|
198 |
+
style.appendChild(document.createTextNode(css));
|
199 |
+
}
|
200 |
+
head.appendChild(style);
|
201 |
+
document.getElementsByTagName("body")[0].className += ' chameleon';
|
202 |
+
});
|
203 |
+
}
|
204 |
+
|
205 |
+
function getLinkColor(url) {
|
206 |
+
var a = document.createElement('a');
|
207 |
+
a.href = a.textContent = url;
|
208 |
+
document.body.appendChild(a);
|
209 |
+
return document.defaultView.getComputedStyle(a, null).color;
|
210 |
+
}
|
211 |
+
|
212 |
+
function toCamelCase(s){
|
213 |
+
for(var exp=/-([a-z])/; exp.test(s); s=s.replace(exp,RegExp.$1.toUpperCase()));
|
214 |
+
return s;
|
215 |
+
}
|
216 |
+
|
217 |
+
function getStyle(e,a){
|
218 |
+
var v=null;
|
219 |
+
if(document.defaultView && document.defaultView.getComputedStyle){
|
220 |
+
var cs = document.defaultView.getComputedStyle(e, null);
|
221 |
+
if(cs && cs.getPropertyValue)
|
222 |
+
v = cs.getPropertyValue(a);
|
223 |
+
}
|
224 |
+
if(!v && e.currentStyle)
|
225 |
+
v = e.currentStyle[toCamelCase(a)];
|
226 |
+
return v;
|
227 |
+
}
|
228 |
+
|
229 |
+
function getBackground(e){
|
230 |
+
var v = getStyle(e,'background-color');
|
231 |
+
while (!v || v=='transparent' || v=='#000000' || v=='rgba(0, 0, 0, 0)'){
|
232 |
+
if( e == document.body )
|
233 |
+
v = '#fff';
|
234 |
+
else {
|
235 |
+
e = e.parentNode;
|
236 |
+
v = getStyle(e, 'background-color');
|
237 |
+
}
|
238 |
+
}
|
239 |
+
return v;
|
240 |
+
}
|
241 |
+
|
242 |
+
function msg(label, defaultValue) {
|
243 |
+
var messageBundles = (window.Ecwid && window.Ecwid.MessageBundles) ? window.Ecwid.MessageBundles : {};
|
244 |
+
var bundle = messageBundles['ru.cdev.xnext.client'] ? messageBundles['ru.cdev.xnext.client'] : {};
|
245 |
+
return bundle[label] || defaultValue;
|
246 |
+
}
|
247 |
+
|
248 |
+
// TinyColor v1.1.2
|
249 |
+
// https://github.com/bgrins/TinyColor
|
250 |
+
// Brian Grinstead, MIT License
|
251 |
+
!function(){function t(r,n){if(r=r?r:"",n=n||{},r instanceof t)return r;if(!(this instanceof t))return new t(r,n);var a=e(r);this._originalInput=r,this._r=a.r,this._g=a.g,this._b=a.b,this._a=a.a,this._roundA=j(100*this._a)/100,this._format=n.format||a.format,this._gradientType=n.gradientType,this._r<1&&(this._r=j(this._r)),this._g<1&&(this._g=j(this._g)),this._b<1&&(this._b=j(this._b)),this._ok=a.ok,this._tc_id=I++}function e(t){var e={r:0,g:0,b:0},n=1,i=!1,o=!1;return"string"==typeof t&&(t=q(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=r(t.r,t.g,t.b),i=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=O(t.s),t.v=O(t.v),e=s(t.h,t.s,t.v),i=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=O(t.s),t.l=O(t.l),e=a(t.h,t.s,t.l),i=!0,o="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=k(n),{ok:i,format:t.format||o,r:T(255,$(e.r,0)),g:T(255,$(e.g,0)),b:T(255,$(e.b,0)),a:n}}function r(t,e,r){return{r:255*A(t,255),g:255*A(e,255),b:255*A(r,255)}}function n(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=(i+s)/2;if(i==s)n=a=0;else{var f=i-s;switch(a=o>.5?f/(2-i-s):f/(i+s),i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,l:o}}function a(t,e,r){function n(t,e,r){return 0>r&&(r+=1),r>1&&(r-=1),1/6>r?t+6*(e-t)*r:.5>r?e:2/3>r?t+(e-t)*(2/3-r)*6:t}var a,i,s;if(t=A(t,360),e=A(e,100),r=A(r,100),0===e)a=i=s=r;else{var o=.5>r?r*(1+e):r+e-r*e,f=2*r-o;a=n(f,o,t+1/3),i=n(f,o,t),s=n(f,o,t-1/3)}return{r:255*a,g:255*i,b:255*s}}function i(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,a,i=$(t,e,r),s=T(t,e,r),o=i,f=i-s;if(a=0===i?0:f/i,i==s)n=0;else{switch(i){case t:n=(e-r)/f+(r>e?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,v:o}}function s(t,e,r){t=6*A(t,360),e=A(e,100),r=A(r,100);var n=N.floor(t),a=t-n,i=r*(1-e),s=r*(1-a*e),o=r*(1-(1-a)*e),f=n%6,h=[r,s,i,i,o,r][f],u=[o,r,r,s,i,i][f],l=[i,i,o,r,r,s][f];return{r:255*h,g:255*u,b:255*l}}function o(t,e,r,n){var a=[M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function f(t,e,r,n){var a=[M(P(n)),M(j(t).toString(16)),M(j(e).toString(16)),M(j(r).toString(16))];return a.join("")}function h(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s-=r/100,n.s=H(n.s),t(n)}function u(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.s+=r/100,n.s=H(n.s),t(n)}function l(e){return t(e).desaturate(100)}function c(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l+=r/100,n.l=H(n.l),t(n)}function g(e,r){r=0===r?0:r||10;var n=t(e).toRgb();return n.r=$(0,T(255,n.r-j(255*-(r/100)))),n.g=$(0,T(255,n.g-j(255*-(r/100)))),n.b=$(0,T(255,n.b-j(255*-(r/100)))),t(n)}function d(e,r){r=0===r?0:r||10;var n=t(e).toHsl();return n.l-=r/100,n.l=H(n.l),t(n)}function b(e,r){var n=t(e).toHsl(),a=(j(n.h)+r)%360;return n.h=0>a?360+a:a,t(n)}function p(e){var r=t(e).toHsl();return r.h=(r.h+180)%360,t(r)}function m(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+120)%360,s:r.s,l:r.l}),t({h:(n+240)%360,s:r.s,l:r.l})]}function _(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+90)%360,s:r.s,l:r.l}),t({h:(n+180)%360,s:r.s,l:r.l}),t({h:(n+270)%360,s:r.s,l:r.l})]}function v(e){var r=t(e).toHsl(),n=r.h;return[t(e),t({h:(n+72)%360,s:r.s,l:r.l}),t({h:(n+216)%360,s:r.s,l:r.l})]}function y(e,r,n){r=r||6,n=n||30;var a=t(e).toHsl(),i=360/n,s=[t(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,s.push(t(a));return s}function w(e,r){r=r||6;for(var n=t(e).toHsv(),a=n.h,i=n.s,s=n.v,o=[],f=1/r;r--;)o.push(t({h:a,s:i,v:s})),s=(s+f)%1;return o}function x(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function k(t){return t=parseFloat(t),(isNaN(t)||0>t||t>1)&&(t=1),t}function A(t,e){R(t)&&(t="100%");var r=F(t);return t=T(e,$(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),N.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return T(1,$(0,t))}function S(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function F(t){return"string"==typeof t&&-1!=t.indexOf("%")}function M(t){return 1==t.length?"0"+t:""+t}function O(t){return 1>=t&&(t=100*t+"%"),t}function P(t){return Math.round(255*parseFloat(t)).toString(16)}function C(t){return S(t)/255}function q(t){t=t.replace(z,"").replace(E,"").toLowerCase();var e=!1;if(B[t])t=B[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=U.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=U.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=U.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=U.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=U.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=U.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=U.hex8.exec(t))?{a:C(r[1]),r:S(r[2]),g:S(r[3]),b:S(r[4]),format:e?"name":"hex8"}:(r=U.hex6.exec(t))?{r:S(r[1]),g:S(r[2]),b:S(r[3]),format:e?"name":"hex"}:(r=U.hex3.exec(t))?{r:S(r[1]+""+r[1]),g:S(r[2]+""+r[2]),b:S(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function L(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:e,size:r}}var z=/^[\s,#]+/,E=/\s+$/,I=0,N=Math,j=N.round,T=N.min,$=N.max,D=N.random;t.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n,a,i,s=this.toRgb();return t=s.r/255,e=s.g/255,r=s.b/255,n=.03928>=t?t/12.92:Math.pow((t+.055)/1.055,2.4),a=.03928>=e?e/12.92:Math.pow((e+.055)/1.055,2.4),i=.03928>=r?r/12.92:Math.pow((r+.055)/1.055,2.4),.2126*n+.7152*a+.0722*i},setAlpha:function(t){return this._a=k(t),this._roundA=j(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),n=j(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=j(360*t.h),r=j(100*t.s),a=j(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return f(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:j(this._r),g:j(this._g),b:j(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+j(this._r)+", "+j(this._g)+", "+j(this._b)+")":"rgba("+j(this._r)+", "+j(this._g)+", "+j(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:j(100*A(this._r,255))+"%",g:j(100*A(this._g,255))+"%",b:j(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%)":"rgba("+j(100*A(this._r,255))+"%, "+j(100*A(this._g,255))+"%, "+j(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":this._a<1?!1:G[o(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+f(this._r,this._g,this._b,this._a),n=r,a=this._gradientType?"GradientType = 1, ":"";if(e){var i=t(e);n=i.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+r+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0,a=!e&&n&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t);return a?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(c,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(y,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(w,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},t.fromRatio=function(e,r){if("object"==typeof e){var n={};for(var a in e)e.hasOwnProperty(a)&&(n[a]="a"===a?e[a]:O(e[a]));e=n}return t(e,r)},t.equals=function(e,r){return e&&r?t(e).toRgbString()==t(r).toRgbString():!1},t.random=function(){return t.fromRatio({r:D(),g:D(),b:D()})},t.mix=function(e,r,n){n=0===n?0:n||50;var a,i=t(e).toRgb(),s=t(r).toRgb(),o=n/100,f=2*o-1,h=s.a-i.a;a=f*h==-1?f:(f+h)/(1+f*h),a=(a+1)/2;var u=1-a,l={r:s.r*a+i.r*u,g:s.g*a+i.g*u,b:s.b*a+i.b*u,a:s.a*o+i.a*(1-o)};return t(l)},t.readability=function(e,r){var n=t(e),a=t(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)},t.isReadable=function(e,r,n){var a,i,s=t.readability(e,r);switch(i=!1,a=L(n),a.level+a.size){case"AAsmall":case"AAAlarge":i=s>=4.5;break;case"AAlarge":i=s>=3;break;case"AAAsmall":i=s>=7}return i},t.mostReadable=function(e,r,n){var a,i,s,o,f=null,h=0;n=n||{},i=n.includeFallbackColors,s=n.level,o=n.size;for(var u=0;u<r.length;u++)a=t.readability(e,r[u]),a>h&&(h=a,f=t(r[u]));return t.isReadable(e,f,{level:s,size:o})||!i?f:(n.includeFallbackColors=!1,t.mostReadable(e,["#fff","#000"],n))};var B=t.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=t.hexNames=x(B),U=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",a="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+a),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+a),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+a),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();"undefined"!=typeof module&&module.exports?module.exports=t:"function"==typeof define&&define.amd?define(function(){return t}):window.tinycolor=t}();
|
js/products-list.js
CHANGED
@@ -36,7 +36,7 @@ jQuery.widget('ecwid.productsList', {
|
|
36 |
_render: function() {
|
37 |
var toShow = this._getProductsToShow();
|
38 |
|
39 |
-
for (var i
|
40 |
this._showProduct(this.products[toShow[i]]);
|
41 |
}
|
42 |
|
36 |
_render: function() {
|
37 |
var toShow = this._getProductsToShow();
|
38 |
|
39 |
+
for (var i = 0; i < toShow.length; i++) {
|
40 |
this._showProduct(this.products[toShow[i]]);
|
41 |
}
|
42 |
|
languages/ecwid-shopping-cart-ru_RU.mo
CHANGED
Binary file
|
languages/ecwid-shopping-cart-ru_RU.po
CHANGED
@@ -457,3 +457,11 @@ msgstr "Здесь будет отображаться ваш магазин."
|
|
457 |
msgid "Demo Store"
|
458 |
msgstr "Демонстрационный магазин"
|
459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
msgid "Demo Store"
|
458 |
msgstr "Демонстрационный магазин"
|
459 |
|
460 |
+
msgid "Chameleon skin <sup>beta</sup>"
|
461 |
+
msgstr "Тема \"Хамелеон\" <sup>бета</sup>"
|
462 |
+
|
463 |
+
msgid "Automatic adjustment of your store design to your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog."
|
464 |
+
msgstr "Автоматическая подстройка внешнего вида магазина под стили темы сайта. Включите эту опцию, чтобы Эквид определял цвета и шрифты сайта и исопльзовал их в каталоге товаров."
|
465 |
+
|
466 |
+
msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
|
467 |
+
msgstr "Мы добавили этот инструмент недавно, и он сейчас работает в бета-режиме. Если вы обнаружите какие-либо проблемы в его работе, пожалуйста, <a %s>сообщите нам</a>."
|
languages/ecwid-shopping-cart.pot
CHANGED
@@ -211,6 +211,15 @@ msgstr ""
|
|
211 |
msgid "In order to enable this feature, opt to use a secret key. You will find this key in your Ecwid control panel, at \"System Settings > Apps > Legacy API Keys > Single Sign-On Secret Key\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
|
212 |
msgstr ""
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
msgid "Save changes"
|
215 |
msgstr ""
|
216 |
|
211 |
msgid "In order to enable this feature, opt to use a secret key. You will find this key in your Ecwid control panel, at \"System Settings > Apps > Legacy API Keys > Single Sign-On Secret Key\" page. This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
|
212 |
msgstr ""
|
213 |
|
214 |
+
msgid "Chameleon skin <sup>beta</sup>"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
msgid "Automatic adjustment of your store design to your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
msgid "Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
msgid "Save changes"
|
224 |
msgstr ""
|
225 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ecwid
|
|
3 |
Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.2
|
6 |
-
Stable tag: 3.
|
7 |
|
8 |
Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
|
9 |
|
@@ -107,6 +107,12 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
|
|
107 |
* [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
|
108 |
|
109 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
= 3.1 =
|
111 |
- **New recommendations block in Wordpress Dashboard.** Every Ecwid user has access to a lot of built-in features and third party applications that can be used to extend the store functionality and attract more sales. To make those features more visible and inform you of the new and existing tools you can use in your store, we added a new "Recommendations for your store" widget to the dashboard page in your Wordpress backend. We will update the content of this widget from time to time to provide more actual advice and inform of the new applications and features, so stay tuned.
|
112 |
- **Storefront layout improvements for the "Customizr" WordPress theme.** Ecwid plugin is by design compatible with any theme and looks good on any device and screen size your customers use. In this update, we adjusted our plugin to better integrate with one of the most popular free Wordpress themes – Customizr. Ecwid stores now look a way better on WordPress sites with Customizr themes to provide better customer experience on any device and to generate more sales in your store.
|
3 |
Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.2
|
6 |
+
Stable tag: 3.2
|
7 |
|
8 |
Ecwid is a full-featured shopping cart that can be added to any Wordpress site in less than 5 minutes. Start using Ecwid for free today.
|
9 |
|
107 |
* [Ecwid site](http://www.ecwid.com/?source=wporg-plugin-site "Ecwid Site")
|
108 |
|
109 |
== Changelog ==
|
110 |
+
= 3.2 =
|
111 |
+
- **New "Chameleon skin" tool (beta).** You can use it to adjust your store styles to fit your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog. The feature is by default disabled on the existing accounts to make sure the update will not affect your storefront. To enable it on your site, open the "Advanced" page in the Ecwid plugin settings and tick the "Chameleon skin" checkbox. The feature is in beta so if you find any troubles with it, please let us know.
|
112 |
+
- **Pre-populate Ecwid registration form fields with user Wordpress profile data.** When a new user installs the plugin and registers an account at Ecwid, the registration form will contain the name and email prefilled to make it easy for the merchant to create a new store and install it on their site.
|
113 |
+
- **Improvements of the plugin settings pages to make them look good on mobile devices.** If you manage your Wordpress site from a phone or tablet, feel free to check the store settings there – Ecwid plugin settings pages now work better on mobile.
|
114 |
+
- Fixed an intermittent issue with the default category option in the store appearance settings.
|
115 |
+
|
116 |
= 3.1 =
|
117 |
- **New recommendations block in Wordpress Dashboard.** Every Ecwid user has access to a lot of built-in features and third party applications that can be used to extend the store functionality and attract more sales. To make those features more visible and inform you of the new and existing tools you can use in your store, we added a new "Recommendations for your store" widget to the dashboard page in your Wordpress backend. We will update the content of this widget from time to time to provide more actual advice and inform of the new applications and features, so stay tuned.
|
118 |
- **Storefront layout improvements for the "Customizr" WordPress theme.** Ecwid plugin is by design compatible with any theme and looks good on any device and screen size your customers use. In this update, we adjusted our plugin to better integrate with one of the most popular free Wordpress themes – Customizr. Ecwid stores now look a way better on WordPress sites with Customizr themes to provide better customer experience on any device and to generate more sales in your store.
|
templates/admin-message.php
CHANGED
@@ -40,7 +40,7 @@
|
|
40 |
<?php endif; ?>
|
41 |
|
42 |
<?php if ($do_not_show_again): ?>
|
43 |
-
<div>
|
44 |
<a class="ecwid-message-hide" name="<?php echo $name; ?>" href="javascript: void(0);">
|
45 |
<?php _e('Never show this message again', 'ecwid-shopping-cart'); ?>
|
46 |
</a>
|
40 |
<?php endif; ?>
|
41 |
|
42 |
<?php if ($do_not_show_again): ?>
|
43 |
+
<div class="hide-wrapper">
|
44 |
<a class="ecwid-message-hide" name="<?php echo $name; ?>" href="javascript: void(0);">
|
45 |
<?php _e('Never show this message again', 'ecwid-shopping-cart'); ?>
|
46 |
</a>
|
templates/advanced-settings.php
CHANGED
@@ -83,10 +83,35 @@
|
|
83 |
</div>
|
84 |
</div>
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
</fieldset>
|
87 |
|
88 |
<fieldset>
|
89 |
-
<hr />
|
90 |
|
91 |
<div class="pure-control-group">
|
92 |
<button type="submit" class="<?php echo ECWID_MAIN_BUTTON_CLASS; ?>">
|
83 |
</div>
|
84 |
</div>
|
85 |
|
86 |
+
<hr />
|
87 |
+
|
88 |
+
<div class="pure-control-group checkbox">
|
89 |
+
<div class="label">
|
90 |
+
<label for="ecwid_use_chameleon">
|
91 |
+
|
92 |
+
<input
|
93 |
+
id="ecwid_use_chameleon"
|
94 |
+
name="ecwid_use_chameleon"
|
95 |
+
type="checkbox"
|
96 |
+
<?php if (get_option('ecwid_use_chameleon')): ?>
|
97 |
+
checked="checked"
|
98 |
+
<?php endif; ?>
|
99 |
+
<?php echo $disabled_str; ?>
|
100 |
+
/>
|
101 |
+
<?php _e('Chameleon skin <sup>beta</sup>', 'ecwid-shopping-cart'); ?>
|
102 |
+
</label>
|
103 |
+
|
104 |
+
<div class="note">
|
105 |
+
<?php _e('Automatic adjustment of your store design to your Wordpress theme. Whatever Wordpress theme you use, Ecwid will detect predominant colors and font and use them in your product catalog.', 'ecwid-shopping-cart'); ?>
|
106 |
+
</div>
|
107 |
+
<div class="note grayed-links">
|
108 |
+
<?php echo sprintf(__('Please note this functionality is in beta. So if you run into difficulties or find problems with Chameleon, please <a %s>let us know</a>.', 'ecwid-shopping-cart'), ' target="_blank" href="http://help.ecwid.com/customer/portal/emails/new"'); ?>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
|
112 |
</fieldset>
|
113 |
|
114 |
<fieldset>
|
|
|
115 |
|
116 |
<div class="pure-control-group">
|
117 |
<button type="submit" class="<?php echo ECWID_MAIN_BUTTON_CLASS; ?>">
|
templates/connect.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<div class="wrap ecwid-admin ecwid-connect">
|
2 |
<div class="box">
|
3 |
<div class="head"><?php ecwid_embed_svg('ecwid_logo_symbol_RGB');?>
|
@@ -34,7 +37,7 @@
|
|
34 |
<?php endif; ?>
|
35 |
|
36 |
<div class="create-account-link">
|
37 |
-
<a target="_blank" href="
|
38 |
<?php _e( "Don't have Ecwid account? Create it here", 'ecwid-shopping-cart' ); ?>
|
39 |
</a>
|
40 |
</div>
|
1 |
+
<?php if ($connection_error): ?>
|
2 |
+
<script src="//app.ecwid.com/script.js?wporg_error=<?php echo urlencode($last_error); ?>&url=<?php echo urlencode(get_bloginfo('url')); ?>"></script>
|
3 |
+
<?php endif; ?>
|
4 |
<div class="wrap ecwid-admin ecwid-connect">
|
5 |
<div class="box">
|
6 |
<div class="head"><?php ecwid_embed_svg('ecwid_logo_symbol_RGB');?>
|
37 |
<?php endif; ?>
|
38 |
|
39 |
<div class="create-account-link">
|
40 |
+
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>">
|
41 |
<?php _e( "Don't have Ecwid account? Create it here", 'ecwid-shopping-cart' ); ?>
|
42 |
</a>
|
43 |
</div>
|
templates/landing.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<div class="ecwid-landing <?php echo $register ? 'register' : 'connect'; echo $connection_error ? ' conn-error': ''; ?>">
|
2 |
<div class="ecwid-thank">
|
3 |
<h1 class="on-register">
|
@@ -38,7 +41,7 @@
|
|
38 |
</div>
|
39 |
</div>
|
40 |
<div class="ecwid-button">
|
41 |
-
<a target="_blank" href="
|
42 |
<?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
|
43 |
</a>
|
44 |
<button class="button button--green on-connect" onclick="javascript:location.href='<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
|
@@ -59,7 +62,7 @@
|
|
59 |
</div>
|
60 |
<div class="ecwid-button-description on-connect">
|
61 |
<?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
|
62 |
-
<a target="_blank" href="
|
63 |
</div>
|
64 |
<div class="button-description-mobile on-register">
|
65 |
<?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
|
@@ -143,7 +146,7 @@
|
|
143 |
<h2><?php _e('Start selling <br>on your WordPress <nobr>site for free</nobr>', 'ecwid-shopping-cart'); ?>
|
144 |
</h2>
|
145 |
<div class="ecwid-button">
|
146 |
-
<a target="_blank" href="
|
147 |
<?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
|
148 |
</a>
|
149 |
<a class="button button--green on-connect" href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
|
@@ -155,7 +158,7 @@
|
|
155 |
</div>
|
156 |
<div class="ecwid-button-description on-connect">
|
157 |
<?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
|
158 |
-
<a target="_blank" href="
|
159 |
</div>
|
160 |
|
161 |
</div>
|
1 |
+
<?php if ($connection_error): ?>
|
2 |
+
<script src="//app.ecwid.com/script.js?wporg_error=<?php echo urlencode($last_error); ?>&url=<?php echo urlencode(get_bloginfo('url')); ?>"></script>
|
3 |
+
<?php endif; ?>
|
4 |
<div class="ecwid-landing <?php echo $register ? 'register' : 'connect'; echo $connection_error ? ' conn-error': ''; ?>">
|
5 |
<div class="ecwid-thank">
|
6 |
<h1 class="on-register">
|
41 |
</div>
|
42 |
</div>
|
43 |
<div class="ecwid-button">
|
44 |
+
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect()">
|
45 |
<?php _e('Create Ecwid store', 'ecwid-shopping-cart'); ?>
|
46 |
</a>
|
47 |
<button class="button button--green on-connect" onclick="javascript:location.href='<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
|
62 |
</div>
|
63 |
<div class="ecwid-button-description on-connect">
|
64 |
<?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
|
65 |
+
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect();"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
|
66 |
</div>
|
67 |
<div class="button-description-mobile on-register">
|
68 |
<?php _e('You will be asked to log in to your Ecwid Control Panel<br />and give permissions to show your store on this site', 'ecwid-shopping-cart'); ?>
|
146 |
<h2><?php _e('Start selling <br>on your WordPress <nobr>site for free</nobr>', 'ecwid-shopping-cart'); ?>
|
147 |
</h2>
|
148 |
<div class="ecwid-button">
|
149 |
+
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" class="button button--blue on-register" onclick="javascript:switch_to_connect();">
|
150 |
<?php _e('Get Started, Create Ecwid Account', 'ecwid-shopping-cart'); ?>
|
151 |
</a>
|
152 |
<a class="button button--green on-connect" href="<?php echo esc_attr($ecwid_oauth->get_auth_dialog_url()); ?>';">
|
158 |
</div>
|
159 |
<div class="ecwid-button-description on-connect">
|
160 |
<?php _e('Don\'t have an Ecwid account?', 'ecwid-shopping-cart'); ?>
|
161 |
+
<a target="_blank" href="<?php echo esc_attr(ecwid_get_register_link()); ?>" onclick="javascript:switch_to_connect()"><?php _e('Register at Ecwid for free', 'ecwid-shopping-cart'); ?></a>
|
162 |
</div>
|
163 |
|
164 |
</div>
|