Version Description
- Apr 3, 2019 =
- Minor fixes and improvements.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 6.5.2 |
Comparing to | |
See all releases |
Code changes from version 6.5.1 to 6.5.2
- css/settings.css +3 -4
- ecwid-shopping-cart.php +40 -13
- includes/class-ecwid-products.php +4 -14
- includes/gutenberg/class-ecwid-gutenberg.php +21 -19
- includes/importer/class-ecwid-importer.php +0 -1
- includes/integrations/class-ecwid-integration-wpseo.php +20 -0
- includes/shortcodes/class-ecwid-shortcode-productbrowser.php +2 -2
- js/gutenberg/blocks.build.js +1 -1
- js/gutenberg/buynow.jsx +146 -0
- js/gutenberg/cart-page.jsx +97 -0
- js/gutenberg/categories.jsx +86 -0
- js/gutenberg/category-page.jsx +207 -0
- js/gutenberg/filters-page.jsx +171 -0
- js/gutenberg/product-page.jsx +180 -0
- js/gutenberg/search.jsx +66 -0
- js/gutenberg/store.jsx +2 -2
- readme.txt +4 -1
- templates/admin-head.php +6 -1
- templates/admin/simple-dashboard.php +5 -1
css/settings.css
CHANGED
@@ -322,7 +322,6 @@ display: none;
|
|
322 |
position: relative;
|
323 |
padding: 0px;
|
324 |
margin: 0px;
|
325 |
-
left: 60px;
|
326 |
|
327 |
display: inline-block;
|
328 |
height: 70px;
|
@@ -342,15 +341,15 @@ display: none;
|
|
342 |
.ecwid-admin .ec-store-box .head {
|
343 |
text-align: left;
|
344 |
margin-bottom: 20px;
|
|
|
345 |
}
|
346 |
|
347 |
.ecwid-admin .head svg {
|
348 |
width: 32px;
|
349 |
height: 32px;
|
350 |
-
position: absolute;
|
351 |
-
top: 20px;
|
352 |
-
left: 20px;
|
353 |
margin-right: 10px;
|
|
|
|
|
354 |
}
|
355 |
/* END Common main */
|
356 |
|
322 |
position: relative;
|
323 |
padding: 0px;
|
324 |
margin: 0px;
|
|
|
325 |
|
326 |
display: inline-block;
|
327 |
height: 70px;
|
341 |
.ecwid-admin .ec-store-box .head {
|
342 |
text-align: left;
|
343 |
margin-bottom: 20px;
|
344 |
+
padding-left: 20px;
|
345 |
}
|
346 |
|
347 |
.ecwid-admin .head svg {
|
348 |
width: 32px;
|
349 |
height: 32px;
|
|
|
|
|
|
|
350 |
margin-right: 10px;
|
351 |
+
margin-top: 20px;
|
352 |
+
float: left;
|
353 |
}
|
354 |
/* END Common main */
|
355 |
|
ecwid-shopping-cart.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?source=wporg
|
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Ecommerce
|
8 |
-
Version: 6.5.
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
@@ -294,8 +294,12 @@ HTML;
|
|
294 |
add_action( 'wp_head', 'ecwid_maybe_remove_emoji', 0 );
|
295 |
function ecwid_maybe_remove_emoji() {
|
296 |
|
297 |
-
if ( Ecwid_Store_page::is_store_page() && get_option( 'ecwid_remove_emoji' ) == 'Y'
|
298 |
-
remove_action(
|
|
|
|
|
|
|
|
|
299 |
}
|
300 |
}
|
301 |
|
@@ -497,6 +501,7 @@ JS;
|
|
497 |
}
|
498 |
|
499 |
function ecwid_load_textdomain() {
|
|
|
500 |
load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
501 |
}
|
502 |
|
@@ -1075,7 +1080,7 @@ function ecwid_content_has_productbrowser( $content ) {
|
|
1075 |
$result = has_shortcode( $content, 'ecwid_productbrowser' );
|
1076 |
|
1077 |
|
1078 |
-
if ( class_exists( '
|
1079 |
return true;
|
1080 |
}
|
1081 |
|
@@ -1295,16 +1300,35 @@ function ecwid_meta_description() {
|
|
1295 |
$category = Ecwid_Category::get_by_id( $params['id'] );
|
1296 |
|
1297 |
if ( $category ) {
|
1298 |
-
if ( isset( $category->
|
1299 |
-
$description = $category->
|
1300 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1301 |
|
|
|
1302 |
if (!$description && isset( $category->description ) ) {
|
1303 |
$description = $category->description;
|
1304 |
}
|
1305 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1306 |
}
|
1307 |
-
}
|
1308 |
}
|
1309 |
|
1310 |
if ( !$description ) {
|
@@ -1586,10 +1610,10 @@ function ecwid_get_scriptjs_params( $force_lang = null ) {
|
|
1586 |
$params .= '&data_static_home=1';
|
1587 |
}
|
1588 |
|
1589 |
-
if ( class_exists( '
|
1590 |
|
1591 |
-
$all_blocks =
|
1592 |
-
$page_blocks =
|
1593 |
|
1594 |
$mask = "";
|
1595 |
foreach ( $all_blocks as $name ) {
|
@@ -3319,9 +3343,12 @@ function ecwid_is_paid_account()
|
|
3319 |
}
|
3320 |
|
3321 |
function ecwid_embed_svg($name) {
|
3322 |
-
$
|
3323 |
-
|
3324 |
-
|
|
|
|
|
|
|
3325 |
}
|
3326 |
|
3327 |
/*
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Text Domain: ecwid-shopping-cart
|
7 |
Author: Ecwid Ecommerce
|
8 |
+
Version: 6.5.2
|
9 |
Author URI: https://ecwid.to/ecwid-site
|
10 |
*/
|
11 |
|
294 |
add_action( 'wp_head', 'ecwid_maybe_remove_emoji', 0 );
|
295 |
function ecwid_maybe_remove_emoji() {
|
296 |
|
297 |
+
if ( Ecwid_Store_page::is_store_page() && get_option( 'ecwid_remove_emoji' ) == 'Y' ) {
|
298 |
+
remove_action('wp_head', 'print_emoji_detection_script', 7);
|
299 |
+
remove_action('wp_print_styles', 'print_emoji_styles');
|
300 |
+
|
301 |
+
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
302 |
+
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
303 |
}
|
304 |
}
|
305 |
|
501 |
}
|
502 |
|
503 |
function ecwid_load_textdomain() {
|
504 |
+
|
505 |
load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
506 |
}
|
507 |
|
1080 |
$result = has_shortcode( $content, 'ecwid_productbrowser' );
|
1081 |
|
1082 |
|
1083 |
+
if ( class_exists( 'Ecwid_Gutenberg' ) && strpos( $content, Ecwid_Gutenberg::STORE_BLOCK ) !== false ) {
|
1084 |
return true;
|
1085 |
}
|
1086 |
|
1300 |
$category = Ecwid_Category::get_by_id( $params['id'] );
|
1301 |
|
1302 |
if ( $category ) {
|
1303 |
+
if (!$description && isset( $category->description ) ) {
|
1304 |
+
$description = $category->description;
|
1305 |
}
|
1306 |
+
}
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
} else if ( Ecwid_Store_Page::is_store_page() ) {
|
1310 |
+
$set_metadesc = false;
|
1311 |
+
$set_metadesc = apply_filters( 'ecwid_set_mainpage_metadesc', $set_metadesc );
|
1312 |
+
|
1313 |
+
if( $set_metadesc ) {
|
1314 |
+
$store_page_params = Ecwid_Store_Page::get_store_page_params();
|
1315 |
+
if ( isset( $store_page_params['default_category_id'] ) && $store_page_params['default_category_id'] > 0 ) {
|
1316 |
+
$category = Ecwid_Category::get_by_id( $store_page_params['default_category_id'] );
|
1317 |
|
1318 |
+
if ( $category ) {
|
1319 |
if (!$description && isset( $category->description ) ) {
|
1320 |
$description = $category->description;
|
1321 |
}
|
1322 |
}
|
1323 |
+
} else {
|
1324 |
+
$api = new Ecwid_Api_V3();
|
1325 |
+
$profile = $api->get_store_profile();
|
1326 |
+
|
1327 |
+
if( !empty($profile->settings->storeDescription) ) {
|
1328 |
+
$description = $profile->settings->storeDescription;
|
1329 |
+
}
|
1330 |
}
|
1331 |
+
}
|
1332 |
}
|
1333 |
|
1334 |
if ( !$description ) {
|
1610 |
$params .= '&data_static_home=1';
|
1611 |
}
|
1612 |
|
1613 |
+
if ( class_exists( 'Ecwid_Gutenberg') ) {
|
1614 |
|
1615 |
+
$all_blocks = Ecwid_Gutenberg::get_block_names();
|
1616 |
+
$page_blocks = Ecwid_Gutenberg::get_blocks_on_page();
|
1617 |
|
1618 |
$mask = "";
|
1619 |
foreach ( $all_blocks as $name ) {
|
3343 |
}
|
3344 |
|
3345 |
function ecwid_embed_svg($name) {
|
3346 |
+
$path = ECWID_PLUGIN_DIR . 'images/' . $name . '.svg';
|
3347 |
+
|
3348 |
+
if( file_exists( $path ) ) {
|
3349 |
+
$code = file_get_contents( $path );
|
3350 |
+
echo $code;
|
3351 |
+
}
|
3352 |
}
|
3353 |
|
3354 |
/*
|
includes/class-ecwid-products.php
CHANGED
@@ -43,7 +43,6 @@ class Ecwid_Products {
|
|
43 |
add_action( 'ecwid_on_plugin_update', array( $this, 'on_plugin_update' ) );
|
44 |
|
45 |
if (EcwidPlatform::get('hide_out_of_stock')) {
|
46 |
-
add_filter( 'posts_where_paged', array( $this, 'where_out_of_stock' ) );
|
47 |
add_filter( 'posts_join_paged', array( $this, 'join_out_of_stock' ) );
|
48 |
}
|
49 |
|
@@ -95,22 +94,12 @@ class Ecwid_Products {
|
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
-
|
99 |
-
|
100 |
-
public function where_out_of_stock($where) {
|
101 |
-
if (!is_search()) {
|
102 |
-
return $where;
|
103 |
-
}
|
104 |
-
$where .= ' AND ' . self::DB_ALIAS_OUT_OF_STOCK . '.meta_value=1 ';
|
105 |
-
|
106 |
-
return $where;
|
107 |
-
}
|
108 |
-
|
109 |
public function join_out_of_stock($join) {
|
110 |
if (!is_search()) {
|
111 |
return $join;
|
112 |
}
|
113 |
-
|
114 |
if (!$join) {
|
115 |
$join = '';
|
116 |
}
|
@@ -119,7 +108,8 @@ class Ecwid_Products {
|
|
119 |
|
120 |
$join .= 'LEFT JOIN ' . $wpdb->postmeta .' ' . self::DB_ALIAS_OUT_OF_STOCK
|
121 |
. ' ON ' . $wpdb->posts . '.id = ' . self::DB_ALIAS_OUT_OF_STOCK . '.post_id'
|
122 |
-
. ' AND ' . self::DB_ALIAS_OUT_OF_STOCK . '.meta_key=' . '"in_stock"'
|
|
|
123 |
|
124 |
return $join;
|
125 |
}
|
43 |
add_action( 'ecwid_on_plugin_update', array( $this, 'on_plugin_update' ) );
|
44 |
|
45 |
if (EcwidPlatform::get('hide_out_of_stock')) {
|
|
|
46 |
add_filter( 'posts_join_paged', array( $this, 'join_out_of_stock' ) );
|
47 |
}
|
48 |
|
94 |
}
|
95 |
}
|
96 |
}
|
97 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
public function join_out_of_stock($join) {
|
99 |
if (!is_search()) {
|
100 |
return $join;
|
101 |
}
|
102 |
+
|
103 |
if (!$join) {
|
104 |
$join = '';
|
105 |
}
|
108 |
|
109 |
$join .= 'LEFT JOIN ' . $wpdb->postmeta .' ' . self::DB_ALIAS_OUT_OF_STOCK
|
110 |
. ' ON ' . $wpdb->posts . '.id = ' . self::DB_ALIAS_OUT_OF_STOCK . '.post_id'
|
111 |
+
. ' AND ' . self::DB_ALIAS_OUT_OF_STOCK . '.meta_key=' . '"in_stock"'
|
112 |
+
. ' AND ' . self::DB_ALIAS_OUT_OF_STOCK . '.meta_value=1';
|
113 |
|
114 |
return $join;
|
115 |
}
|
includes/gutenberg/class-ecwid-gutenberg.php
CHANGED
@@ -8,6 +8,12 @@ class Ecwid_Gutenberg {
|
|
8 |
const PRODUCT_BLOCK = 'ecwid/product-block';
|
9 |
const BUYNOW_BLOCK = 'ec-store/buynow';
|
10 |
const PRODUCT_PAGE_BLOCK = 'ec-store/product-page';
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
public $_blocks = array();
|
13 |
|
@@ -15,20 +21,9 @@ class Ecwid_Gutenberg {
|
|
15 |
|
16 |
if ( isset( $_GET['classic-editor'] ) ) return;
|
17 |
|
18 |
-
$blocks =
|
19 |
-
'store',
|
20 |
-
'minicart',
|
21 |
-
'product',
|
22 |
-
'categories',
|
23 |
-
'search',
|
24 |
-
'buynow',
|
25 |
-
'product-page',
|
26 |
-
'filters-page',
|
27 |
-
'category-page',
|
28 |
-
'cart-page'
|
29 |
-
);
|
30 |
|
31 |
-
foreach ( $blocks as $block ) {
|
32 |
require_once dirname( __FILE__ ) . "/class-ecwid-gutenberg-block-$block.php";
|
33 |
$className = "Ecwid_Gutenberg_Block_" . str_replace('-', '_', ucfirst( $block ) );
|
34 |
|
@@ -78,7 +73,7 @@ class Ecwid_Gutenberg {
|
|
78 |
public function enqueue_block_editor_assets() {
|
79 |
|
80 |
wp_enqueue_script( 'ecwid-gutenberg-store', ECWID_PLUGIN_URL . 'js/gutenberg/blocks.build.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), get_option('ecwid_plugin_version') );
|
81 |
-
wp_enqueue_style( 'ecwid-gutenberg-block', ECWID_PLUGIN_URL . 'css/gutenberg/blocks.editor.build.css',
|
82 |
|
83 |
$locale_data = '';
|
84 |
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
@@ -182,11 +177,18 @@ class Ecwid_Gutenberg {
|
|
182 |
}
|
183 |
|
184 |
public static function get_block_names() {
|
|
|
185 |
return array(
|
186 |
-
self::STORE_BLOCK,
|
187 |
-
self::PRODUCT_BLOCK,
|
188 |
-
self::BUYNOW_BLOCK,
|
189 |
-
self::
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
);
|
191 |
}
|
192 |
|
@@ -249,4 +251,4 @@ class Ecwid_Gutenberg {
|
|
249 |
}
|
250 |
}
|
251 |
|
252 |
-
$ecwid_gutenberg = new Ecwid_Gutenberg();
|
8 |
const PRODUCT_BLOCK = 'ecwid/product-block';
|
9 |
const BUYNOW_BLOCK = 'ec-store/buynow';
|
10 |
const PRODUCT_PAGE_BLOCK = 'ec-store/product-page';
|
11 |
+
const CATEGORIES_BLOCK = 'ec-store/categories';
|
12 |
+
const CATEGORY_PAGE_BLOCK = 'ec-store/category-page';
|
13 |
+
const CART_PAGE_BLOCK = 'ec-store/cart';
|
14 |
+
const FILTERS_PAGE_BLOCK = 'ec-store/filters';
|
15 |
+
const SEARCH_BLOCK = 'ec-store/search';
|
16 |
+
const MINICART_BLOCK = 'ec-store/minicart';
|
17 |
|
18 |
public $_blocks = array();
|
19 |
|
21 |
|
22 |
if ( isset( $_GET['classic-editor'] ) ) return;
|
23 |
|
24 |
+
$blocks = self::get_block_names();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
foreach ( $blocks as $block => $block_name ) {
|
27 |
require_once dirname( __FILE__ ) . "/class-ecwid-gutenberg-block-$block.php";
|
28 |
$className = "Ecwid_Gutenberg_Block_" . str_replace('-', '_', ucfirst( $block ) );
|
29 |
|
73 |
public function enqueue_block_editor_assets() {
|
74 |
|
75 |
wp_enqueue_script( 'ecwid-gutenberg-store', ECWID_PLUGIN_URL . 'js/gutenberg/blocks.build.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ), get_option('ecwid_plugin_version') );
|
76 |
+
wp_enqueue_style( 'ecwid-gutenberg-block', ECWID_PLUGIN_URL . 'css/gutenberg/blocks.editor.build.css', get_option('ecwid_plugin_version') );
|
77 |
|
78 |
$locale_data = '';
|
79 |
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
|
177 |
}
|
178 |
|
179 |
public static function get_block_names() {
|
180 |
+
// cuz no late static binding sadly
|
181 |
return array(
|
182 |
+
'store' => self::STORE_BLOCK,
|
183 |
+
'product' => self::PRODUCT_BLOCK,
|
184 |
+
'buynow' => self::BUYNOW_BLOCK,
|
185 |
+
'categories' => self::CATEGORIES_BLOCK,
|
186 |
+
'search' => self::SEARCH_BLOCK,
|
187 |
+
'minicart' => self::MINICART_BLOCK,
|
188 |
+
'category-page' => self::CATEGORY_PAGE_BLOCK,
|
189 |
+
'product-page' => self::PRODUCT_PAGE_BLOCK,
|
190 |
+
'filters-page' => self::FILTERS_PAGE_BLOCK,
|
191 |
+
'cart-page' => self::CART_PAGE_BLOCK,
|
192 |
);
|
193 |
}
|
194 |
|
251 |
}
|
252 |
}
|
253 |
|
254 |
+
$ecwid_gutenberg = new Ecwid_Gutenberg();
|
includes/importer/class-ecwid-importer.php
CHANGED
@@ -26,7 +26,6 @@ class Ecwid_Importer
|
|
26 |
|
27 |
public function initiate( $settings = array() )
|
28 |
{
|
29 |
-
$t = Ecwid_Importer_Task::load_task(Ecwid_Importer_Task_Import_Woo_Product::$type);
|
30 |
update_option( self::OPTION_CATEGORIES, array() );
|
31 |
update_option( self::OPTION_PRODUCTS, array() );
|
32 |
update_option( self::OPTION_TASKS, array() );
|
26 |
|
27 |
public function initiate( $settings = array() )
|
28 |
{
|
|
|
29 |
update_option( self::OPTION_CATEGORIES, array() );
|
30 |
update_option( self::OPTION_PRODUCTS, array() );
|
31 |
update_option( self::OPTION_TASKS, array() );
|
includes/integrations/class-ecwid-integration-wpseo.php
CHANGED
@@ -19,6 +19,7 @@ class Ecwid_Integration_WordPress_SEO_By_Yoast
|
|
19 |
if ( ecwid_is_paid_account() && ecwid_is_store_page_available()) {
|
20 |
add_filter( 'wpseo_sitemap_index', array( $this, 'wpseo_hook_sitemap_index' ) );
|
21 |
add_filter( 'wpseo_do_sitemap_ecwid', array( $this, 'wpseo_hook_do_sitemap' ) );
|
|
|
22 |
if ( ecwid_is_applicable_escaped_fragment() || Ecwid_Seo_Links::is_product_browser_url() ) {
|
23 |
add_filter( 'wpseo_title', 'ecwid_seo_title' );
|
24 |
remove_filter( 'wp_title', 'ecwid_seo_title' , 10000, 3 );
|
@@ -31,6 +32,8 @@ class Ecwid_Integration_WordPress_SEO_By_Yoast
|
|
31 |
|
32 |
add_filter( 'wpseo_output_twitter_card', '__return_false' );
|
33 |
}
|
|
|
|
|
34 |
}
|
35 |
|
36 |
add_filter( 'ecwid_title_separator', array( $this, 'get_title_separator' ) );
|
@@ -38,6 +41,23 @@ class Ecwid_Integration_WordPress_SEO_By_Yoast
|
|
38 |
add_action( 'init', array($this, 'clear_ecwid_sitemap_index') );
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
public function clear_ecwid_sitemap_index() {
|
42 |
|
43 |
if( strpos( $_SERVER['REQUEST_URI'], 'sitemap_index.xml' ) !== false ) {
|
19 |
if ( ecwid_is_paid_account() && ecwid_is_store_page_available()) {
|
20 |
add_filter( 'wpseo_sitemap_index', array( $this, 'wpseo_hook_sitemap_index' ) );
|
21 |
add_filter( 'wpseo_do_sitemap_ecwid', array( $this, 'wpseo_hook_do_sitemap' ) );
|
22 |
+
|
23 |
if ( ecwid_is_applicable_escaped_fragment() || Ecwid_Seo_Links::is_product_browser_url() ) {
|
24 |
add_filter( 'wpseo_title', 'ecwid_seo_title' );
|
25 |
remove_filter( 'wp_title', 'ecwid_seo_title' , 10000, 3 );
|
32 |
|
33 |
add_filter( 'wpseo_output_twitter_card', '__return_false' );
|
34 |
}
|
35 |
+
|
36 |
+
add_filter( 'ecwid_set_mainpage_metadesc', array( $this, 'ecwid_set_mainpage_metadesc_hook' ) );
|
37 |
}
|
38 |
|
39 |
add_filter( 'ecwid_title_separator', array( $this, 'get_title_separator' ) );
|
41 |
add_action( 'init', array($this, 'clear_ecwid_sitemap_index') );
|
42 |
}
|
43 |
|
44 |
+
public function ecwid_set_mainpage_metadesc_hook( $set_metadesc ) {
|
45 |
+
|
46 |
+
global $wpseo_front;
|
47 |
+
|
48 |
+
if ( empty($wpseo_front) && class_exists('WPSEO_Frontend') ) {
|
49 |
+
$wpseo_front = WPSEO_Frontend::get_instance();
|
50 |
+
}
|
51 |
+
|
52 |
+
$wpseo_metadesc = $wpseo_front->metadesc(false);
|
53 |
+
|
54 |
+
if( empty($wpseo_metadesc) ) {
|
55 |
+
return true;
|
56 |
+
}
|
57 |
+
|
58 |
+
return $set_metadesc;
|
59 |
+
}
|
60 |
+
|
61 |
public function clear_ecwid_sitemap_index() {
|
62 |
|
63 |
if( strpos( $_SERVER['REQUEST_URI'], 'sitemap_index.xml' ) !== false ) {
|
includes/shortcodes/class-ecwid-shortcode-productbrowser.php
CHANGED
@@ -186,11 +186,11 @@ HTML;
|
|
186 |
if ( empty( $plain_content ) ) {
|
187 |
$plain_content = $catalog->get_category( 0 );
|
188 |
} else {
|
189 |
-
$
|
190 |
}
|
191 |
}
|
192 |
|
193 |
-
if ( $url && !$
|
194 |
$parsed = parse_url($url);
|
195 |
|
196 |
if ($parsed['fragment']) {
|
186 |
if ( empty( $plain_content ) ) {
|
187 |
$plain_content = $catalog->get_category( 0 );
|
188 |
} else {
|
189 |
+
$is_default_category = true;
|
190 |
}
|
191 |
}
|
192 |
|
193 |
+
if ( $url && !$is_default_category && !Ecwid_Seo_Links::is_product_browser_url() ) {
|
194 |
$parsed = parse_url($url);
|
195 |
|
196 |
if ($parsed['fragment']) {
|
js/gutenberg/blocks.build.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";r.d(t,"a",function(){return n});var n={ecwid:wp.element.createElement("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 20 20","enable-background":"new 0 0 20 20"},wp.element.createElement("path",{fill:"#555d66",d:"M15.32,15.58c-0.37,0-0.66,0.3-0.66,0.67c0,0.37,0.3,0.67,0.66,0.67c0.37,0,0.67-0.3,0.67-0.67 C15.98,15.88,15.69,15.58,15.32,15.58z M15.45,0H4.55C2.04,0,0,2.04,0,4.55v10.91C0,17.97,2.04,20,4.55,20h10.91c2.51,0,4.55-2.04,4.55-4.55V4.55 C20,2.04,17.96,0,15.45,0z M12.97,4.94C13.54,4.94,14,5.4,14,5.96s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C11.95,5.4,12.41,4.94,12.97,4.94z M12.97,8.02c0.57,0,1.03,0.46,1.03,1.03c0,0.57-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C11.95,8.48,12.41,8.02,12.97,8.02z M9.98,4.94c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C8.95,5.4,9.41,4.94,9.98,4.94z M9.98,8.02c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C8.95,8.48,9.41,8.02,9.98,8.02z M7.03,4.94c0.57,0,1.03,0.46,1.03,1.03S7.6,6.99,7.03,6.99C6.46,6.99,6,6.53,6,5.96 C6,5.4,6.46,4.94,7.03,4.94z M7.03,8.02c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03C6.46,10.08,6,9.62,6,9.05 C6,8.48,6.46,8.02,7.03,8.02z M4.6,18.02c-1.02,0-1.86-0.83-1.86-1.86c0-1.03,0.83-1.86,1.86-1.86c1.03,0,1.86,0.83,1.86,1.86 C6.45,17.19,5.62,18.02,4.6,18.02z M15.32,18.1c-1.02,0-1.86-0.83-1.86-1.86c0-1.03,0.83-1.86,1.86-1.86c1.03,0,1.86,0.83,1.86,1.86 C17.17,17.27,16.34,18.1,15.32,18.1z M18.48,2.79l-1.92,7.14c-0.51,1.91-2.03,3.1-4,3.1H7.2c-1.91,0-3.26-1.09-3.84-2.91L1.73,5 C1.7,4.9,1.72,4.79,1.78,4.71c0.06-0.09,0.16-0.14,0.27-0.14l0.31,0c0.75,0,1.41,0.49,1.64,1.2l1.2,3.76 c0.32,1.02,1.26,1.7,2.33,1.7h4.81c1.1,0,2.08-0.74,2.36-1.81l1.55-5.78c0.2-0.75,0.89-1.28,1.67-1.28h0.24 c0.1,0,0.2,0.05,0.26,0.13C18.48,2.58,18.5,2.68,18.48,2.79z M4.6,15.5c-0.37,0-0.66,0.3-0.66,0.67c0,0.37,0.3,0.67,0.66,0.67c0.37,0,0.67-0.3,0.67-0.67 S4.96,15.5,4.6,15.5z"})),store:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-234.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"store-icon",transform:"translate(234.000000, 324.000000)"},wp.element.createElement("path",{d:"M9,20.4893188 L7,20.4893188 L7,14 C7,13.4477153 7.44771525,13 8,13 L16,13 C16.5522847,13 17,13.4477153 17,14 L17,20.4893188 C16.260376,20.4893188 15.5929565,20.4893188 15,20.4893188 L15,15 L9,15 L9,20.4893188 Z",id:"Rectangle-3"}),wp.element.createElement("path",{d:"M20,10 L22,10 L22,21.0006104 C22,21.5528951 21.5522847,22.0006104 21,22.0006104 L3,22.0006104 C2.44771525,22.0006104 2,21.5528951 2,21.0006104 L2,10 L4,10 L4,20.0006104 L20,20.0006104 L20,10 Z",id:"Rectangle-3"}),wp.element.createElement("path",{d:"M2,6.5 C2,7.88071187 3.11928813,9 4.5,9 C5.18185515,9 5.81786053,8.72707728 6.28575907,8.24959145 L7,7.52071565 L7.71424093,8.24959145 C8.18213947,8.72707728 8.81814485,9 9.5,9 C10.1818552,9 10.8178605,8.72707728 11.2857591,8.24959145 L12,7.52071565 L12.7142409,8.24959145 C13.1821395,8.72707728 13.8181448,9 14.5,9 C15.1818552,9 15.8178605,8.72707728 16.2857591,8.24959145 L17,7.52071565 L17.7142409,8.24959145 C18.1821395,8.72707728 18.8181448,9 19.5,9 C20.8807119,9 22,7.88071187 22,6.5 C22,5.81342077 21.7917279,4.97737648 21.3637104,4 L2.63518632,4 C2.20791709,4.97255801 2,5.80837301 2,6.5 Z M4.5,11 C2.01471863,11 4.4408921e-16,8.98528137 0,6.5 C0,5.33310646 0.374574518,4.02209564 1.10468286,2.55457075 L1.38058736,2 L22.6207487,2 L22.8961752,2.55629959 C23.6256977,4.02977127 24,5.33982925 24,6.5 C24,8.98528137 21.9852814,11 19.5,11 C18.5937006,11 17.7289225,10.73006 17,10.2422809 C16.2710775,10.73006 15.4062994,11 14.5,11 C13.5937006,11 12.7289225,10.73006 12,10.2422809 C11.2710775,10.73006 10.4062994,11 9.5,11 C8.59370056,11 7.72892246,10.73006 7,10.2422809 C6.27107754,10.73006 5.40629944,11 4.5,11 Z",id:"Combined-Shape"}))))),product:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-352.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"icon-product",transform:"translate(352.000000, 324.000000)"},wp.element.createElement("path",{d:"M4,9 L4,20 L20,20 L20,9 L4,9 Z M2,7 L22,7 L22,22 L2,22 L2,7 Z",id:"Rectangle-2-Copy-2"}),wp.element.createElement("path",{d:"M9,7 L15,7 L15,15 L12.0361633,14 L9,15 L9,7 Z M11,9 L11,12 L12.0361633,11.5393066 L13,12 L13,9 L11,9 Z",id:"Combined-Shape"}),wp.element.createElement("polygon",{id:"Line-3",points:"13 9 11 9 11 2 13 2"}),wp.element.createElement("polygon",{id:"Rectangle-2-Copy-2",points:"17.0387503 4 19.4387503 7 22 7 18 2 6 2 2 7 4.56124969 7 6.96124969 4"}))))),aspect169:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"9",y:"14",width:"22",height:"12",rx:"2"}))),aspect916:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"}," ",wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"14",y:"9",width:"12",height:"22",rx:"2"}))),aspect11:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"12",y:"12",width:"16",height:"16",rx:"2"}))),aspect34:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"12",y:"10",width:"16",height:"20",rx:"2"}))),aspect43:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"10",y:"12",width:"20",height:"16",rx:"2"}))),textalignleft:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"16",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"19",width:"13",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"22",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textaligncenter:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"16",y:"16",width:"8",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"14",y:"19",width:"12",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"16",y:"22",width:"8",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textalignright:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"16",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"14",y:"19",width:"13",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"22",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textalignjustify:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",zoomAndPan:"1.5",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"16",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"19",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"22",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),productLayout3Columns:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",transform:"translate(13.000000, 19.500000) rotate(-270.000000) translate(-13.000000, -19.500000) ",x:"3.5",y:"16.5",width:"19",height:"6",rx:"1"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"10",width:"5",height:"19"}),wp.element.createElement("rect",{fill:"#000000",x:"25",y:"10",width:"5",height:"8"}),wp.element.createElement("rect",{fill:"#000000",x:"25",y:"19",width:"5",height:"10"}))),productLayout2ColumnsLeft:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"17",y:"10",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{fill:"#000000",x:"10",y:"10",width:"5",height:"5"}),wp.element.createElement("rect",{fill:"#000000",x:"10",y:"17",width:"5",height:"12"}))),productLayout2ColumnsRight:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(10.000000, 10.000000)",fill:"#000000"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"12"})))),productLayout2ColumnsBottom:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(10.000000, 10.000000)",fill:"#000000"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"12",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"12"}),wp.element.createElement("rect",{x:"0",y:"14",width:"20",height:"5"})))),galleryLayoutHorizontal:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(20.000000, 20.500000) rotate(-180.000000) translate(-20.000000, -20.500000) translate(10.000000, 11.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"6"}),wp.element.createElement("rect",{x:"15",y:"14",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"6"})))),galleryLayoutVertical:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(19.500000, 20.000000) rotate(-270.000000) translate(-19.500000, -20.000000) translate(9.500000, 10.500000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"-1.13686838e-13",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"-1.13686838e-13",width:"5",height:"6"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"13",width:"5",height:"6"})))),galleryLayoutFeed:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(20.500000, 12.500000) rotate(-270.000000) translate(-20.500000, -12.500000) translate(14.000000, 3.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"})),wp.element.createElement("g",{transform:"translate(20.500000, 27.500000) rotate(-270.000000) translate(-20.500000, -27.500000) translate(14.000000, 18.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"})))),cart:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-352.000000, -415.000000)",fill:"#555D66"},wp.element.createElement("g",{id:"cart-icon",transform:"translate(352.000000, 415.000000)"},wp.element.createElement("path",{d:"M4.5269723,4 L2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 L5.33333333,2 C5.80393835,2 6.21086155,2.32812702 6.31061146,2.788039 L7.22413999,7 L21,7 C21.6640252,7 22.143636,7.63527258 21.9617572,8.27390353 L19.968471,15.272927 C19.8460922,15.7026358 19.4535094,15.9990234 19.0067139,15.9990234 L7.93579102,15.9990234 C7.465186,15.9990234 7.0582628,15.6708964 6.95851289,15.2109844 L4.5269723,4 Z M7.65791824,9 L8.74215205,13.9990234 L18.2517453,13.9990234 L19.6754416,9 L7.65791824,9 Z",id:"Path-3","fill-rule":"nonzero"}),wp.element.createElement("circle",{id:"Oval-2",cx:"9",cy:"20",r:"2"}),wp.element.createElement("circle",{id:"Oval-2",cx:"18",cy:"20",r:"2"}))))),search:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-469.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"search-icon",transform:"translate(469.000000, 324.000000)"},wp.element.createElement("path",{d:"M3.83470744,16.348799 C3.83470744,15.7965143 4.28242269,15.348799 4.83470744,15.348799 C5.38699219,15.348799 5.83470744,15.7965143 5.83470744,16.348799 L5.81335241,21.7511152 C5.81335241,22.3033999 5.36563716,22.7511152 4.81335241,22.7511152 C4.26106766,22.7511152 3.81335241,22.3033999 3.81335241,21.7511152 L3.83470744,16.348799 Z",id:"Line-2",transform:"translate(4.824030, 19.049957) scale(-1, 1) rotate(-45.000000) translate(-4.824030, -19.049957) "}),wp.element.createElement("path",{d:"M13,18 C16.8659932,18 20,14.8659932 20,11 C20,7.13400675 16.8659932,4 13,4 C9.13400675,4 6,7.13400675 6,11 C6,14.8659932 9.13400675,18 13,18 Z M13,20 C8.02943725,20 4,15.9705627 4,11 C4,6.02943725 8.02943725,2 13,2 C17.9705627,2 22,6.02943725 22,11 C22,15.9705627 17.9705627,20 13,20 Z",id:"Oval",transform:"translate(13.000000, 11.000000) scale(-1, 1) translate(-13.000000, -11.000000) "}),wp.element.createElement("path",{d:"M17,6 C17.5522847,6 18,6.44771525 18,7 C18,7.55228475 17.5522847,8 17,8 C15.0670034,8 13.5,9.56700338 13.5,11.5 C13.5,12.0522847 13.0522847,12.5 12.5,12.5 C11.9477153,12.5 11.5,12.0522847 11.5,11.5 C11.5,8.46243388 13.9624339,6 17,6 Z",id:"Oval",transform:"translate(14.750000, 9.250000) scale(-1, 1) translate(-14.750000, -9.250000) "}))))),categories:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-234.000000, -416.000000)"},wp.element.createElement("g",{id:"categories-icon",transform:"translate(234.000000, 416.000000)"},wp.element.createElement("polygon",{id:"Triangle",fill:"#555D66",points:"3 2 5.5 7 0.5 7"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 6 8 4 23 4 23 6"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 13 8 11 23 11 23 13"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 20 8 18 23 18 23 20"}),wp.element.createElement("rect",{id:"Rectangle",stroke:"#555D66","stroke-width":"2",fill:"#FFFFFF",x:"2",y:"11",width:"2",height:"2"}),wp.element.createElement("rect",{id:"Rectangle",stroke:"#555D66","stroke-width":"2",fill:"#FFFFFF",x:"2",y:"18",width:"2",height:"2",rx:"1"}))))),category:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-470.000000, -416.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"category-icon",transform:"translate(470.000000, 416.000000)"},wp.element.createElement("polygon",{id:"Line-4",points:"3 4 3 2 21 2 21 4"}),wp.element.createElement("path",{d:"M5,17 L5,20 L9,20 L9,17 L5,17 Z M3,15 L11,15 L11,22 L3,22 L3,15 Z",id:"Rectangle-2"}),wp.element.createElement("path",{d:"M5,8 L5,11 L9,11 L9,8 L5,8 Z M3,6 L11,6 L11,13 L3,13 L3,6 Z",id:"Rectangle-2-Copy"}),wp.element.createElement("path",{d:"M15,17 L15,20 L19,20 L19,17 L15,17 Z M13,15 L21,15 L21,22 L13,22 L13,15 Z",id:"Rectangle-2"}),wp.element.createElement("path",{d:"M15,8 L15,11 L19,11 L19,8 L15,8 Z M13,6 L21,6 L21,13 L13,13 L13,6 Z",id:"Rectangle-2-Copy-3"}))))),button:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-345.000000, -280.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"button-icon",transform:"translate(345.000000, 280.000000)"},wp.element.createElement("path",{d:"M4,8 L4,16 L20,16 L20,8 L4,8 Z M4,6 L20,6 C21.1045695,6 22,6.8954305 22,8 L22,16 C22,17.1045695 21.1045695,18 20,18 L4,18 C2.8954305,18 2,17.1045695 2,16 L2,8 C2,6.8954305 2.8954305,6 4,6 Z",id:"Rectangle-5"}),wp.element.createElement("path",{d:"M13.8320367,9.8101295 C14.2137832,9.41102047 14.8467917,9.3969454 15.2459008,9.77869195 C15.6450098,10.1604385 15.6590849,10.793447 15.2773383,11.192556 L12.2122748,14.3970238 C11.8300377,14.7966458 11.1960253,14.8101668 10.7970986,14.427204 L9.5128579,13.1943549 C9.11444327,12.8118837 9.10151859,12.1788506 9.48398981,11.780436 C9.86646103,11.3820214 10.4994941,11.3690967 10.8979087,11.7515679 L11.4594438,12.290632 L13.8320367,9.8101295 Z",id:"Line-6"}))))),productPreview:wp.element.createElement("svg",{width:"72px",height:"72px",viewBox:"0 0 72 72",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets",transform:"translate(-625.000000, -811.000000)",fill:"#AAAAAA"},wp.element.createElement("g",{id:"Group-2",transform:"translate(571.000000, 756.000000)"},wp.element.createElement("g",{id:"product-preview",transform:"translate(54.000000, 55.000000)"},wp.element.createElement("path",{d:"M6,25 L6,69 L66,69 L66,25 L6,25 Z M4,23 L68,23 L68,71 L4,71 L4,23 Z",id:"Rectangle-2-Copy-2","fill-rule":"nonzero"}),wp.element.createElement("path",{d:"M36.5,23.5 L65.836706,23.5 L67.2237665,22.8226349 L55.0328393,7.34740904 L39.8812213,0.895706316 L40.7501329,7.5 L17.0403124,7.5 L5.04031242,22.5 L6.32093727,22.5 L17.5209373,8.5 L36.5,8.5 L36.5,23.5 Z M42.9573255,16.6099474 L41.1011835,2.50206036 L54.4056315,8.16722056 L66.5284549,23.5566573 L42.9573255,16.6099474 Z",id:"Combined-Shape",stroke:"#AAAAAA"}),wp.element.createElement("path",{d:"M29.8056641,41.53125 C29.9375,38.2060547 32.2080078,35.6865234 36.4560547,35.6865234 C40.3232422,35.6865234 42.9306641,37.9863281 42.9306641,41.1210938 C42.9306641,43.3916016 41.7880859,44.9882812 39.8544922,46.1455078 C37.9648438,47.2587891 37.4228516,48.0351562 37.4228516,49.5439453 L37.4228516,50.4375 L34.390625,50.4375 L34.3759766,49.265625 C34.3027344,47.2001953 35.1962891,45.8818359 37.203125,44.6806641 C38.9755859,43.6113281 39.6054688,42.7617188 39.6054688,41.2529297 C39.6054688,39.5976562 38.3017578,38.3818359 36.2949219,38.3818359 C34.2734375,38.3818359 32.9697266,39.5976562 32.8378906,41.53125 L29.8056641,41.53125 Z M35.9287109,57.2197266 C34.859375,57.2197266 34.0097656,56.3994141 34.0097656,55.3300781 C34.0097656,54.2607422 34.859375,53.4404297 35.9287109,53.4404297 C37.0273438,53.4404297 37.8623047,54.2607422 37.8623047,55.3300781 C37.8623047,56.3994141 37.0273438,57.2197266 35.9287109,57.2197266 Z",id:"?"})))))),filters:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"square"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-354.000000, -500.000000)",stroke:"#555D66","stroke-width":"2"},wp.element.createElement("g",{id:"filter-icon",transform:"translate(354.000000, 500.000000)"},wp.element.createElement("path",{d:"M3,6 L21,6",id:"Line-5"}),wp.element.createElement("path",{d:"M7,12 L17,12",id:"Line-5"}),wp.element.createElement("path",{d:"M10,18 L14,18",id:"Line-5"}))))),cartPage:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-470.000000, -500.000000)",fill:"#555D66"},wp.element.createElement("g",{id:"cart-icon",transform:"translate(470.000000, 500.000000)"},wp.element.createElement("g",{id:"Group-6",transform:"translate(2.000000, 3.000000)"},wp.element.createElement("path",{d:"M2.5269723,1 L0,1 C-0.55228475,1 -1,0.55228475 -1,-1.11022302e-16 C-1,-0.55228475 -0.55228475,-1 0,-1 L3.33333333,-1 C3.80393835,-1 4.21086155,-0.671872981 4.31061146,-0.211960997 L6.74215205,10.9990234 L16.2517453,10.9990234 L17.6754416,6 L17.0067139,6 C16.4544291,6 16.0067139,5.55228475 16.0067139,5 C16.0067139,4.44771525 16.4544291,4 17.0067139,4 L19,4 C19.6640252,4 20.143636,4.63527258 19.9617572,5.27390353 L17.968471,12.272927 C17.8460922,12.7026358 17.4535094,12.9990234 17.0067139,12.9990234 L5.93579102,12.9990234 C5.465186,12.9990234 5.0582628,12.6708964 4.95851289,12.2109844 L2.5269723,1 Z",id:"Path-3","fill-rule":"nonzero"}),wp.element.createElement("path",{d:"M13.6266547,1.30878828 C14.0084012,0.909679249 14.6414097,0.895604177 15.0405188,1.27735072 C15.4396278,1.65909727 15.4537029,2.29210579 15.0719563,2.69121482 L11.0068929,6.89568259 C10.6246557,7.29530459 9.99064332,7.30882561 9.59171662,6.92586281 L7.61584318,5.00113813 C7.21742856,4.61866691 7.20450388,3.98563386 7.5869751,3.58721924 C7.96944632,3.18880462 8.60247937,3.17587994 9.00089399,3.55835116 L10.2540618,4.78929076 L13.6266547,1.30878828 Z",id:"Line-6","fill-rule":"nonzero"}),wp.element.createElement("circle",{id:"Oval-2",cx:"7",cy:"17",r:"2"}),wp.element.createElement("circle",{id:"Oval-2",cx:"16",cy:"17",r:"2"}))))))}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=t.attributes,o=function(e,t,o,l){return wp.element.createElement(u,{label:o},wp.element.createElement(d,null,l.map(function(o){return wp.element.createElement(m,{isDefault:!0,isButton:!0,isPrimary:r[t]===o.value,onClick:function(){return e.setAttributes(n({},t,o.value))}},o.title)})))},l=function(e,t,r){return wp.element.createElement(w,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})},a=function(e,t,r,o){return wp.element.createElement(u,{label:r},wp.element.createElement("select",{onChange:function(r){e.setAttributes(n({},t,r.target.value))}},o.map(function(r){return wp.element.createElement("option",{value:r.value,selected:parseInt(e.attributes[t])==r.value},r.title)})))},i=function(e,t,r){return wp.element.createElement(u,{label:r},wp.element.createElement("input",{type:"text",value:e.attributes[t],onChange:function(r){e.setAttributes(n({},t,r.target.value))}}))},p=function(e,t,r,o){return wp.element.createElement(u,{label:r},wp.element.createElement(g,{controls:o.map(function(r){return{icon:c.a[r.icon],title:r.title,isActive:e.attributes[t]===r.value,className:"ecwid-toolbar-icon",onClick:function(){return e.setAttributes(n({},t,r.value))}}})}))};return{buttonGroup:function(r){var n=e[r];return o(t,n.name,n.title,n.values)},toggle:function(r){var n=e[r];return l(t,n.name,n.title)},select:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=e[r];return a(t,o.name,n||o.title,o.values)},textbox:function(r){var n=e[r];return builtTextbox(t,n.name,n.title)},toolbar:function(r){var n=e[r];return p(t,n.name,n.title,n.values)},color:function(r){return wp.element.createElement(s.a,{props:t,name:r,title:e[r].title})},defaultCategoryId:function(r){var n=e[r];return n.values&&n.values.length>1?a(t,n.name,n.title,n.values):i(t,n.name,n.title)}}}function l(e){return wp.element.createElement("div",{className:"ec-store-inspector-subheader-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},e))}function a(e){return wp.element.createElement("div",{className:"ec-store-block ec-store-generic-block"},wp.element.createElement("div",{className:"ec-store-block-header"},e.icon,e.title),wp.element.createElement("div",{className:"ec-store-block-content"},e.children),e.showDemoButton&&wp.element.createElement("div",null,wp.element.createElement("a",{className:"button button-primary",href:"admin.php?page=ec-store"},h("Set up your store","ecwid-shopping-cart"))))}function i(e){var t=EcwidGutenbergParams.imagesUrl+e.src;return wp.element.createElement("img",{src:t})}r.d(t,"a",function(){return o}),r.d(t,"c",function(){return l}),r.d(t,"b",function(){return i}),r.d(t,"d",function(){return a});var c=r(0),s=r(6),p=wp.components,d=p.ButtonGroup,m=p.Button,u=p.BaseControl,g=p.Toolbar,w=p.ToggleControl,h=wp.i18n.__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(3),r(7),r(10),r(13),r(16),r(19),r(22),r(25),r(28),r(31)},function(e,t,r){"use strict";var n=r(4),o=(r.n(n),r(5)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=(d.PanelRow,d.ToggleControl,d.ButtonGroup,d.Button,d.BaseControl),g=(d.Toolbar,d.ColorPalette,d.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ecwid/store-block"]);s("ecwid/store-block",{title:g.title,icon:l.a.store,category:"ec-store",attributes:g.attributes,description:c("Add storefront (product listing)","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes;e.setAttributes({widgets:""});var n=wp.element.createElement(a.d,{icon:l.a.store,title:c("Store Home Page"),showDemoButton:g.isDemoStore},wp.element.createElement("div",{className:"ec-store-products"},wp.element.createElement("div",{className:"ec-store-product1"}),wp.element.createElement("div",{className:"ec-store-product2"}),wp.element.createElement("div",{className:"ec-store-product3"})),wp.element.createElement("div",{className:"ec-store-products"},wp.element.createElement("div",{className:"ec-store-product4"}),wp.element.createElement("div",{className:"ec-store-product5"}),wp.element.createElement("div",{className:"ec-store-product6"}))),o=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),i=t(c("Display cart icon","ecwid-shopping-cart"),g.customizeMinicartText),s=(t("",c('To improve the look and feel of your product page and manage your its appearance here, please enable the \u201cNext-gen look and feel of the product page on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),g.isNewProductList),d=g.isNewDetailsPage,w=g.attributes.default_category_id&&g.attributes.default_category_id.values&&g.attributes.default_category_id.values.length>0,h=Object(a.a)(g.attributes,e);return[n,wp.element.createElement(p,null,w&&wp.element.createElement(m,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[h.select("product_list_category_title_behavior"),"SHOW_TEXT_ONLY"!==r.product_list_category_title_behavior&&[h.buttonGroup("product_list_category_image_size"),h.toolbar("product_list_category_image_aspect_ratio")]],!s&&o),wp.element.createElement(m,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[h.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[h.buttonGroup("product_list_image_size"),h.toolbar("product_list_image_aspect_ratio")],h.toolbar("product_list_product_info_layout"),h.select("product_list_title_behavior"),h.select("product_list_price_behavior"),h.select("product_list_sku_behavior"),h.select("product_list_buybutton_behavior"),h.toggle("product_list_show_additional_image_on_hover"),h.toggle("product_list_show_frame")],!s&&o),wp.element.createElement(m,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},d&&[h.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===r.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===r.product_details_layout)&&h.toggle("show_description_under_image"),h.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),h.toggle("product_details_show_product_name"),h.toggle("product_details_show_breadcrumbs"),h.toggle("product_details_show_product_sku"),h.toggle("product_details_show_product_price"),h.toggle("product_details_show_qty"),h.toggle("product_details_show_number_of_items_in_stock"),h.toggle("product_details_show_in_stock_label"),h.toggle("product_details_show_wholesale_prices"),h.toggle("product_details_show_share_buttons")],!d&&o),w&&wp.element.createElement(m,{title:c("Store Front Page","ecwid-shopping-cart"),initialOpen:!1},h.defaultCategoryId("default_category_id")),wp.element.createElement(m,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},h.toggle("show_categories"),h.toggle("show_search"),h.toggle("show_breadcrumbs"),s&&h.toggle("show_footer_menu"),h.toggle("show_signin_link"),h.toggle("product_list_show_sort_viewas_options"),i),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},h.color("chameleon_color_button"),h.color("chameleon_color_foreground"),h.color("chameleon_color_price"),h.color("chameleon_color_link"),h.color("chameleon_color_background")))]},save:function(e){var t=["productbrowser"];e.attributes.show_categories&&(t[t.length]="categories"),e.attributes.show_search&&(t[t.length]="search");var r={widgets:t.join(" "),default_category_id:"undefined"!==typeof e.attributes.default_category_id?e.attributes.default_category_id:0};return new wp.shortcode({tag:g.shortcodeName,attrs:r,type:"single"}).string()},deprecated:[{attributes:{widgets:{type:"string"},categories_per_row:{type:"integer"},grid:{type:"string"},list:{type:"integer"},table:{type:"integer"},default_category_id:{type:"integer"},default_product_id:{type:"integer"},category_view:{type:"string"},search_view:{type:"string"},minicart_layout:{type:"string"}},save:function(e){return null}},{attributes:{widgets:{type:"string",default:"productbrowser"},default_category_id:{type:"integer",default:0}},migrate:function(e){return{widgets:e.widgets,default_category_id:e.default_category_id}},save:function(e){for(var t={},r=["widgets","default_category_id"],n=0;n<r.length;n++)t[r[n]]=e.attributes[r[n]];return t.default_product_id=0,new wp.shortcode({tag:g.shortcodeName,attrs:t,type:"single"}).string()}},{save:function(e){return"[ecwid]"}},{save:function(e){return'[ecwid widgets="productbrowser" default_category_id="0" default_product_id="0"]'}},{save:function(e){return'[ecwid widgets="productbrowser" default_category_id="0"]'}}],transforms:{from:[{type:"shortcode",tag:["ecwid","ec_store"],attributes:{default_category_id:{type:"integer",shortcode:function(e){return e.default_category_id}},show_categories:{type:"boolean",shortcode:function(e){return-1!==e.named.widgets.indexOf("categories")}},show_search:{type:"boolean",shortcode:function(e){return-1!==e.named.widgets.indexOf("search")}}},priority:10}]}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){function t(e){l(function(t){return{manual:"manual",color:e}}),m.setAttributes(n({},s,e))}var r=e.manual,o=e.color,l=e.setState,s=arguments[0].name,m=arguments[0].props,u=arguments[0].title,g=null===r&&null!==m.attributes[s]&&""!==m.attributes[s]||"manual"===r;g?null!==o&&m.setAttributes(n({},s,o)):m.setAttributes(n({},s,null));var w=m.attributes[s],h=wp.element.createElement("span",null,u,null!==w&&wp.element.createElement(c,{colorValue:m.attributes[s]}));return wp.element.createElement(a,{label:h,className:"ec-store-color-picker"},wp.element.createElement("select",{onChange:function(e){return l(function(e){return{manual:event.target.value,color:e.color}})}},wp.element.createElement("option",{value:"auto",selected:!g},p("Detect automatically","ecwid-shopping-cart")),wp.element.createElement("option",{value:"manual",selected:g},p("Set manually","ecwid-shopping-cart"))),g&&wp.element.createElement(i,{value:w,colors:d,onChange:t}))}r.d(t,"a",function(){return m});var l=wp.components,a=l.BaseControl,i=l.ColorPalette,c=l.ColorIndicator,s=wp.compose.withState,p=wp.i18n.__,d=[{name:p("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:p("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:p("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:p("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:p("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:p("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:p("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:p("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:p("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:p("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:p("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],m=s({manual:null,color:null})(o)},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(8),l=(r.n(o),r(9)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=i._x,p=wp.blocks.registerBlockType,d=wp.editor.InspectorControls,m=wp.components,u=m.PanelBody,g=m.ToggleControl;wp.compose.withState,wp.element.Fragment;p("ecwid/product-block",{title:c("Product Card Small","ecwid-shopping-cart"),icon:a.a.product,category:"ec-store",attributes:{id:{type:"integer"},show_picture:{type:"boolean",default:!0},show_title:{type:"boolean",default:!0},show_price:{type:"boolean",default:!0},show_options:{type:"boolean",default:!0},show_qty:{type:"boolean",default:!1},show_addtobag:{type:"boolean",default:!0},show_price_on_button:{type:"boolean",default:!0},show_border:{type:"boolean",default:!0},center_align:{type:"boolean",default:!0}},description:c("Display product with a buy button","ecwid-shopping-cart"),alignWide:!1,supports:{customClassName:!1,className:!1,html:!1,align:!0,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){function t(e,t,r){return wp.element.createElement(g,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})}function r(e){ecwid_open_product_popup({saveCallback:l,props:e})}var o=e.attributes,l=function(e){var t={id:e.newProps.product.id};EcwidGutenbergParams.products[e.newProps.product.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)};return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-product"},EcwidGutenbergParams.products&&o.id&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("div",{className:"ec-store-block-image"},wp.element.createElement("img",{src:EcwidGutenbergParams.products[o.id].imageUrl})),EcwidGutenbergParams.products&&o.id&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("div",{className:"ec-store-product-title"},EcwidGutenbergParams.products[o.id].name),!o.id&&wp.element.createElement("div",{className:"ec-store-block-product-preview"},a.a.productPreview),!o.id&&wp.element.createElement("div",null,wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:l,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),wp.element.createElement(d,null,o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Displayed product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[o.id].name),wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Change","ecwid-shopping-cart")))),!o.id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement(u,{title:s("Content","gutenberg-product-block","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_picture",c("Picture","ecwid-shopping-cart")),t(e,"show_title",c("Title","ecwid-shopping-cart")),t(e,"show_price",c("Price","ecwid-shopping-cart")),t(e,"show_options",c("Options","ecwid-shopping-cart")),t(e,"show_qty",c("Quantity","ecwid-shopping-cart")),t(e,"show_addtobag",c("\xabBuy now\xbb button","ecwid-shopping-cart"))),wp.element.createElement(u,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_price_on_button",c("Show price inside the \xabBuy now\xbb button","ecwid-shopping-cart")),t(e,"show_border",c("Add border","ecwid-shopping-cart")),t(e,"center_align",c("Center align on a page","ecwid-shopping-cart"))))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(11),l=(r.n(o),r(12)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=(i._x,wp.blocks),p=(s.BlockControls,s.registerBlockType),d=wp.editor.InspectorControls,m=wp.components,u=m.PanelBody,g=m.ToggleControl;wp.compose.withState,wp.element.Fragment;p("ec-store/buynow",{title:c("Buy Now Button","ecwid-shopping-cart"),icon:a.a.button,category:"ec-store",attributes:{id:{type:"integer"},show_price_on_button:{type:"boolean",default:!0},center_align:{type:"boolean",default:!0}},description:c("Display a buy button","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,align:!0,alignWide:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){function t(e,t,r){return wp.element.createElement(g,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})}function r(e){ecwid_open_product_popup({saveCallback:l,props:e})}var o=e.attributes,l=function(e){var t={id:e.newProps.id};EcwidGutenbergParams.products[e.newProps.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)};return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-buynow"},!o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"image"}),wp.element.createElement("div",{className:"button-container"},wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:l,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),o.id&&wp.element.createElement("div",{className:"image"})),wp.element.createElement(d,null,o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Linked product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[o.id].name),wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Change","ecwid-shopping-cart")))),!o.id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement("br",null),wp.element.createElement(u,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_price_on_button",c("Show price inside the \xabBuy now\xbb button","ecwid-shopping-cart")),t(e,"center_align",c("Center align on a page","ecwid-shopping-cart"))))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(14),o=(r.n(n),r(15)),l=(r.n(o),r(0));if(!EcwidGutenbergParams.isDemoStore){var a=wp.i18n,i=a.__;a._x;(0,wp.blocks.registerBlockType)("ec-store/search",{title:i("Product Search Box","ecwid-shopping-cart"),icon:l.a.search,category:"ec-store",description:i("Display search box","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){e.attributes;return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-search"},wp.element.createElement("div",{class:"image"}))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(17),o=(r.n(n),r(18)),l=(r.n(o),r(0));if(!EcwidGutenbergParams.isDemoStore){var a=wp.editor.InspectorControls,i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=EcwidGutenbergParams.blockParams["ec-store/categories"];s("ec-store/categories",{title:c("Store Categories Menu","ecwid-shopping-cart"),icon:l.a.categories,category:"ec-store",description:c("Display categories menu","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){var t=(e.attributes,wp.element.createElement("div",{className:"ec-store-block ec-store-block-categories"},wp.element.createElement("div",{className:"ec-store-block-header"},l.a.categories,c("Categories","ecwid-shopping-cart")))),r=c('The block is hidden because you don\'t have categories in your store. <a target="_blank" href="admin.php?page=ec-store-admin-category-id-0-mode-edit">Add categories.</a>',"ecwid-shopping-cart");return[t,wp.element.createElement(a,null,wp.element.createElement("div",{style:{height:"10px"}}),!p.has_categories&&wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(20),l=(r.n(o),r(21)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=(i._x,wp.editor.InspectorControls),p=wp.components,d=p.PanelBody,m=p.BaseControl;(0,wp.blocks.registerBlockType)("ec-store/minicart",{title:c("Shopping Cart Icon","ecwid-shopping-cart"),icon:a.a.cart,category:"ec-store",description:c("Display shopping bag link and summary","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable,align:!0,alignWide:!1},attributes:EcwidGutenbergParams.minicartAttributes,edit:function(e){function t(e,t,r,o){return wp.element.createElement(m,{label:r},wp.element.createElement("select",{className:"ec-store-inspector-select",onChange:function(r){e.setAttributes(n({},t,r.target.value))}},o.map(function(r){return wp.element.createElement("option",{value:r.value,selected:e.attributes[t]==r.value},r.title)})))}function r(e,r,n){var o=EcwidGutenbergParams.minicartAttributes[r];return"undefined"===typeof n&&(n=o.type),t(e,o.name,o.title,o.values)}e.attributes;return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-minicart"},wp.element.createElement("div",{className:"image"})),wp.element.createElement(s,null,wp.element.createElement(d,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!0},r(e,"layout","select"),r(e,"icon","select"),r(e,"fixed_shape","select")))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(23),o=(r.n(n),r(24)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,l.a,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=d.BaseControl,g=EcwidGutenbergParams.blockParams["ec-store/category-page"];s("ec-store/category-page",{title:c("Store Category Page","ecwid-shopping-cart"),icon:l.a.category,category:"ec-store",attributes:EcwidGutenbergStoreBlockParams.attributes,description:c("Display category page","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes;e.setAttributes({widgets:""});var n=wp.element.createElement(a.d,{icon:l.a.category,title:c("Store Category Page","ecwid-shopping-cart"),showDemoButton:g.isDemoStore},wp.element.createElement("div",{className:"ec-store-category-products"},wp.element.createElement("div",{className:"ec-store-category-product1"}),wp.element.createElement("div",{className:"ec-store-category-product2"}),wp.element.createElement("div",{className:"ec-store-category-product3"})),wp.element.createElement("div",{className:"ec-store-category-products"},wp.element.createElement("div",{className:"ec-store-category-product4"}),wp.element.createElement("div",{className:"ec-store-category-product5"}),wp.element.createElement("div",{className:"ec-store-category-product6"}))),o=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),i=t(c("Display cart icon","ecwid-shopping-cart"),g.customizeMinicartText),s=g.isNewProductList,d=g.isNewDetailsPage,w=Object(a.a)(g.attributes,e);return[n,wp.element.createElement(p,null,wp.element.createElement("div",{style:{height:"10px"}}),!EcwidGutenbergParams.hasCategories&&wp.element.createElement("div",{style:{margin:"10px"}},wp.element.createElement("a",{href:"admin.php?page=ec-store-admin-category-id-0-mode-edit",target:"_blank",class:"button button-primary"},c("Add categories","ecwid-shopping-cart"))),EcwidGutenbergParams.hasCategories&&[!e.attributes.default_category_id&&w.select("default_category_id",c("Select category","ecwid-shopping-cart")),e.attributes.default_category_id&&w.select("default_category_id",c("Selected category","ecwid-shopping-cart"))],wp.element.createElement(m,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[w.select("product_list_category_title_behavior"),"SHOW_TEXT_ONLY"!==r.product_list_category_title_behavior&&[w.buttonGroup("product_list_category_image_size"),w.toolbar("product_list_category_image_aspect_ratio")]],!s&&o),wp.element.createElement(m,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[w.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[w.buttonGroup("product_list_image_size"),w.toolbar("product_list_image_aspect_ratio")],w.toolbar("product_list_product_info_layout"),w.select("product_list_title_behavior"),w.select("product_list_price_behavior"),w.select("product_list_sku_behavior"),w.select("product_list_buybutton_behavior"),w.toggle("product_list_show_additional_image_on_hover"),w.toggle("product_list_show_frame")],!s&&o),wp.element.createElement(m,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},d&&[w.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===r.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===r.product_details_layout)&&w.toggle("show_description_under_image"),w.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),w.toggle("product_details_show_product_name"),w.toggle("product_details_show_breadcrumbs"),w.toggle("product_details_show_product_sku"),w.toggle("product_details_show_product_price"),w.toggle("product_details_show_qty"),w.toggle("product_details_show_number_of_items_in_stock"),w.toggle("product_details_show_in_stock_label"),w.toggle("product_details_show_wholesale_prices"),w.toggle("product_details_show_share_buttons")],!d&&productDetailsMigrationWarning),wp.element.createElement(m,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},w.toggle("show_categories"),w.toggle("show_search"),w.toggle("show_breadcrumbs"),s&&w.toggle("show_footer_menu"),w.toggle("show_signin_link"),w.toggle("product_list_show_sort_viewas_options"),i),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},w.color("chameleon_color_button"),w.color("chameleon_color_foreground"),w.color("chameleon_color_price"),w.color("chameleon_color_link"),w.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(26),o=(r.n(n),r(27)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=d.BaseControl,g=(wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/product-page"]);s("ec-store/product-page",{title:c("Product Card Large","ecwid-shopping-cart"),icon:l.a.product,category:"ec-store",attributes:g.attributes,description:c("Display product page with description and a buy button","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e){ecwid_open_product_popup({saveCallback:o,props:e})}function r(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var n=e.attributes,o=function(e){var t={default_product_id:e.newProps.product.id};EcwidGutenbergParams.products[e.newProps.product.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)},i=wp.element.createElement(a.d,{icon:l.a.product,title:c("Product Card Large")},wp.element.createElement(a.b,{src:"product-page-preview.png"}),!n.default_product_id&&wp.element.createElement("div",{className:"button-container"},wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:o,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),s=r("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),d=(r("",c('To improve the look and feel of your product page and manage your its appearance here, please enable the \u201cNext-gen look and feel of the product page on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),g.isNewDetailsPage),w=Object(a.a)(g.attributes,e);return[i,wp.element.createElement(p,null,n.default_product_id>0&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Linked product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[n.default_product_id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[n.default_product_id].name),wp.element.createElement("button",{className:"button",onClick:function(){return t(e)}},c("Change","ecwid-shopping-cart")))),!n.default_product_id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return t(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement(m,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},d&&[w.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===n.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===n.product_details_layout)&&w.toggle("show_description_under_image"),w.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),w.toggle("product_details_show_product_name"),w.toggle("product_details_show_breadcrumbs"),w.toggle("product_details_show_product_sku"),w.toggle("product_details_show_product_price"),w.toggle("product_details_show_qty"),w.toggle("product_details_show_number_of_items_in_stock"),w.toggle("product_details_show_in_stock_label"),w.toggle("product_details_show_wholesale_prices"),w.toggle("product_details_show_share_buttons")],!d&&s),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},w.color("chameleon_color_button"),w.color("chameleon_color_foreground"),w.color("chameleon_color_price"),w.color("chameleon_color_link"),w.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(29),o=(r.n(n),r(30)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=(d.PanelRow,d.ToggleControl,d.ButtonGroup,d.Button,d.BaseControl),g=(d.Toolbar,d.ColorPalette,d.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/filters-page"]);s("ec-store/filters-page",{title:c("Product Search and filters","ecwid-shopping-cart"),icon:l.a.filters,category:"ec-store",attributes:g.attributes,description:c("Display search page with filters on a side","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes,n=wp.element.createElement(a.d,{icon:l.a.filters,title:c("Search and Filters")},wp.element.createElement(a.b,{src:"filter-preview.png"})),o=t("",c('You can enable filters in the store settings: (\u201c<a target="_blank" href="admin.php?page=ec-store-admin-product-filters-mode-main">Settings \u2192 Product Filters</a>\u201d).',"ecwid-shopping-cart")),i=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),s=g.isNewProductList,d=Object(a.a)(g.attributes,e);return[n,wp.element.createElement(p,null,wp.element.createElement(m,{title:c("Filters","ecwid-shopping-cart"),initialOpen:!1},!g.filtersEnabled&&o,g.filtersEnabled&&[d.select("product_filters_position_search_page")]),wp.element.createElement(m,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[d.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[d.buttonGroup("product_list_image_size"),d.toolbar("product_list_image_aspect_ratio")],d.toolbar("product_list_product_info_layout"),d.select("product_list_title_behavior"),d.select("product_list_price_behavior"),d.select("product_list_sku_behavior"),d.select("product_list_buybutton_behavior"),d.toggle("product_list_show_additional_image_on_hover"),d.toggle("product_list_show_frame")],!s&&i),wp.element.createElement(m,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},d.toggle("show_categories"),d.toggle("show_breadcrumbs"),s&&d.toggle("show_footer_menu"),d.toggle("show_signin_link"),d.toggle("product_list_show_sort_viewas_options")),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},d.color("chameleon_color_button"),d.color("chameleon_color_foreground"),d.color("chameleon_color_price"),d.color("chameleon_color_link"),d.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(32),o=(r.n(n),r(33)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=(wp.editor.InspectorControls,wp.components),d=(p.PanelBody,p.PanelRow,p.ToggleControl,p.ButtonGroup,p.Button,p.BaseControl,p.Toolbar,p.ColorPalette,p.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/cart-page"]);s("ec-store/cart-page",{title:c("Cart and Checkout","ecwid-shopping-cart"),icon:l.a.cartPage,category:"ec-store",attributes:d.attributes,description:c("Display shopping cart and checkout page","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){e.attributes;return[wp.element.createElement(a.d,{icon:l.a.cartPage,title:c("Cart and Checkout")},wp.element.createElement(a.b,{src:"cart-page-preview.png"}))]},save:function(e){return null}})},function(e,t){},function(e,t){}]);
|
1 |
+
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";r.d(t,"a",function(){return n});var n={ecwid:wp.element.createElement("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 20 20","enable-background":"new 0 0 20 20"},wp.element.createElement("path",{fill:"#555d66",d:"M15.32,15.58c-0.37,0-0.66,0.3-0.66,0.67c0,0.37,0.3,0.67,0.66,0.67c0.37,0,0.67-0.3,0.67-0.67 C15.98,15.88,15.69,15.58,15.32,15.58z M15.45,0H4.55C2.04,0,0,2.04,0,4.55v10.91C0,17.97,2.04,20,4.55,20h10.91c2.51,0,4.55-2.04,4.55-4.55V4.55 C20,2.04,17.96,0,15.45,0z M12.97,4.94C13.54,4.94,14,5.4,14,5.96s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C11.95,5.4,12.41,4.94,12.97,4.94z M12.97,8.02c0.57,0,1.03,0.46,1.03,1.03c0,0.57-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C11.95,8.48,12.41,8.02,12.97,8.02z M9.98,4.94c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C8.95,5.4,9.41,4.94,9.98,4.94z M9.98,8.02c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03c-0.57,0-1.03-0.46-1.03-1.03 C8.95,8.48,9.41,8.02,9.98,8.02z M7.03,4.94c0.57,0,1.03,0.46,1.03,1.03S7.6,6.99,7.03,6.99C6.46,6.99,6,6.53,6,5.96 C6,5.4,6.46,4.94,7.03,4.94z M7.03,8.02c0.57,0,1.03,0.46,1.03,1.03s-0.46,1.03-1.03,1.03C6.46,10.08,6,9.62,6,9.05 C6,8.48,6.46,8.02,7.03,8.02z M4.6,18.02c-1.02,0-1.86-0.83-1.86-1.86c0-1.03,0.83-1.86,1.86-1.86c1.03,0,1.86,0.83,1.86,1.86 C6.45,17.19,5.62,18.02,4.6,18.02z M15.32,18.1c-1.02,0-1.86-0.83-1.86-1.86c0-1.03,0.83-1.86,1.86-1.86c1.03,0,1.86,0.83,1.86,1.86 C17.17,17.27,16.34,18.1,15.32,18.1z M18.48,2.79l-1.92,7.14c-0.51,1.91-2.03,3.1-4,3.1H7.2c-1.91,0-3.26-1.09-3.84-2.91L1.73,5 C1.7,4.9,1.72,4.79,1.78,4.71c0.06-0.09,0.16-0.14,0.27-0.14l0.31,0c0.75,0,1.41,0.49,1.64,1.2l1.2,3.76 c0.32,1.02,1.26,1.7,2.33,1.7h4.81c1.1,0,2.08-0.74,2.36-1.81l1.55-5.78c0.2-0.75,0.89-1.28,1.67-1.28h0.24 c0.1,0,0.2,0.05,0.26,0.13C18.48,2.58,18.5,2.68,18.48,2.79z M4.6,15.5c-0.37,0-0.66,0.3-0.66,0.67c0,0.37,0.3,0.67,0.66,0.67c0.37,0,0.67-0.3,0.67-0.67 S4.96,15.5,4.6,15.5z"})),store:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-234.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"store-icon",transform:"translate(234.000000, 324.000000)"},wp.element.createElement("path",{d:"M9,20.4893188 L7,20.4893188 L7,14 C7,13.4477153 7.44771525,13 8,13 L16,13 C16.5522847,13 17,13.4477153 17,14 L17,20.4893188 C16.260376,20.4893188 15.5929565,20.4893188 15,20.4893188 L15,15 L9,15 L9,20.4893188 Z",id:"Rectangle-3"}),wp.element.createElement("path",{d:"M20,10 L22,10 L22,21.0006104 C22,21.5528951 21.5522847,22.0006104 21,22.0006104 L3,22.0006104 C2.44771525,22.0006104 2,21.5528951 2,21.0006104 L2,10 L4,10 L4,20.0006104 L20,20.0006104 L20,10 Z",id:"Rectangle-3"}),wp.element.createElement("path",{d:"M2,6.5 C2,7.88071187 3.11928813,9 4.5,9 C5.18185515,9 5.81786053,8.72707728 6.28575907,8.24959145 L7,7.52071565 L7.71424093,8.24959145 C8.18213947,8.72707728 8.81814485,9 9.5,9 C10.1818552,9 10.8178605,8.72707728 11.2857591,8.24959145 L12,7.52071565 L12.7142409,8.24959145 C13.1821395,8.72707728 13.8181448,9 14.5,9 C15.1818552,9 15.8178605,8.72707728 16.2857591,8.24959145 L17,7.52071565 L17.7142409,8.24959145 C18.1821395,8.72707728 18.8181448,9 19.5,9 C20.8807119,9 22,7.88071187 22,6.5 C22,5.81342077 21.7917279,4.97737648 21.3637104,4 L2.63518632,4 C2.20791709,4.97255801 2,5.80837301 2,6.5 Z M4.5,11 C2.01471863,11 4.4408921e-16,8.98528137 0,6.5 C0,5.33310646 0.374574518,4.02209564 1.10468286,2.55457075 L1.38058736,2 L22.6207487,2 L22.8961752,2.55629959 C23.6256977,4.02977127 24,5.33982925 24,6.5 C24,8.98528137 21.9852814,11 19.5,11 C18.5937006,11 17.7289225,10.73006 17,10.2422809 C16.2710775,10.73006 15.4062994,11 14.5,11 C13.5937006,11 12.7289225,10.73006 12,10.2422809 C11.2710775,10.73006 10.4062994,11 9.5,11 C8.59370056,11 7.72892246,10.73006 7,10.2422809 C6.27107754,10.73006 5.40629944,11 4.5,11 Z",id:"Combined-Shape"}))))),product:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-352.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"icon-product",transform:"translate(352.000000, 324.000000)"},wp.element.createElement("path",{d:"M4,9 L4,20 L20,20 L20,9 L4,9 Z M2,7 L22,7 L22,22 L2,22 L2,7 Z",id:"Rectangle-2-Copy-2"}),wp.element.createElement("path",{d:"M9,7 L15,7 L15,15 L12.0361633,14 L9,15 L9,7 Z M11,9 L11,12 L12.0361633,11.5393066 L13,12 L13,9 L11,9 Z",id:"Combined-Shape"}),wp.element.createElement("polygon",{id:"Line-3",points:"13 9 11 9 11 2 13 2"}),wp.element.createElement("polygon",{id:"Rectangle-2-Copy-2",points:"17.0387503 4 19.4387503 7 22 7 18 2 6 2 2 7 4.56124969 7 6.96124969 4"}))))),aspect169:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"9",y:"14",width:"22",height:"12",rx:"2"}))),aspect916:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"}," ",wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"14",y:"9",width:"12",height:"22",rx:"2"}))),aspect11:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"12",y:"12",width:"16",height:"16",rx:"2"}))),aspect34:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"12",y:"10",width:"16",height:"20",rx:"2"}))),aspect43:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"10",y:"12",width:"20",height:"16",rx:"2"}))),textalignleft:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"16",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"19",width:"13",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"22",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textaligncenter:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"16",y:"16",width:"8",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"14",y:"19",width:"12",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"16",y:"22",width:"8",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textalignright:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"16",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"14",y:"19",width:"13",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"22",width:"9",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),textalignjustify:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",zoomAndPan:"1.5",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"13",y:"13",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"16",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"19",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"22",width:"14",height:"2"}),wp.element.createElement("rect",{fill:"#000000",x:"13",y:"25",width:"14",height:"2"}))),productLayout3Columns:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",transform:"translate(13.000000, 19.500000) rotate(-270.000000) translate(-13.000000, -19.500000) ",x:"3.5",y:"16.5",width:"19",height:"6",rx:"1"}),wp.element.createElement("rect",{fill:"#000000",x:"18",y:"10",width:"5",height:"19"}),wp.element.createElement("rect",{fill:"#000000",x:"25",y:"10",width:"5",height:"8"}),wp.element.createElement("rect",{fill:"#000000",x:"25",y:"19",width:"5",height:"10"}))),productLayout2ColumnsLeft:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("rect",{fill:"#000000",x:"17",y:"10",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{fill:"#000000",x:"10",y:"10",width:"5",height:"5"}),wp.element.createElement("rect",{fill:"#000000",x:"10",y:"17",width:"5",height:"12"}))),productLayout2ColumnsRight:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(10.000000, 10.000000)",fill:"#000000"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"12"})))),productLayout2ColumnsBottom:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(10.000000, 10.000000)",fill:"#000000"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"12",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"12"}),wp.element.createElement("rect",{x:"0",y:"14",width:"20",height:"5"})))),galleryLayoutHorizontal:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(20.000000, 20.500000) rotate(-180.000000) translate(-20.000000, -20.500000) translate(10.000000, 11.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"0",width:"5",height:"6"}),wp.element.createElement("rect",{x:"15",y:"14",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"6"})))),galleryLayoutVertical:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(19.500000, 20.000000) rotate(-270.000000) translate(-19.500000, -20.000000) translate(9.500000, 10.500000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"-1.13686838e-13",width:"13",height:"19",rx:"1"}),wp.element.createElement("rect",{x:"15",y:"-1.13686838e-13",width:"5",height:"6"}),wp.element.createElement("rect",{x:"15",y:"7",width:"5",height:"5"}),wp.element.createElement("rect",{x:"15",y:"13",width:"5",height:"6"})))),galleryLayoutFeed:wp.element.createElement("svg",{width:"40px",height:"40px",viewBox:"0 0 40 40",version:"1.1"},wp.element.createElement("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{transform:"translate(20.500000, 12.500000) rotate(-270.000000) translate(-20.500000, -12.500000) translate(14.000000, 3.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"})),wp.element.createElement("g",{transform:"translate(20.500000, 27.500000) rotate(-270.000000) translate(-20.500000, -27.500000) translate(14.000000, 18.000000)",fill:"#000000","fill-rule":"nonzero"},wp.element.createElement("rect",{x:"0",y:"0",width:"13",height:"19",rx:"1"})))),cart:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-352.000000, -415.000000)",fill:"#555D66"},wp.element.createElement("g",{id:"cart-icon",transform:"translate(352.000000, 415.000000)"},wp.element.createElement("path",{d:"M4.5269723,4 L2,4 C1.44771525,4 1,3.55228475 1,3 C1,2.44771525 1.44771525,2 2,2 L5.33333333,2 C5.80393835,2 6.21086155,2.32812702 6.31061146,2.788039 L7.22413999,7 L21,7 C21.6640252,7 22.143636,7.63527258 21.9617572,8.27390353 L19.968471,15.272927 C19.8460922,15.7026358 19.4535094,15.9990234 19.0067139,15.9990234 L7.93579102,15.9990234 C7.465186,15.9990234 7.0582628,15.6708964 6.95851289,15.2109844 L4.5269723,4 Z M7.65791824,9 L8.74215205,13.9990234 L18.2517453,13.9990234 L19.6754416,9 L7.65791824,9 Z",id:"Path-3","fill-rule":"nonzero"}),wp.element.createElement("circle",{id:"Oval-2",cx:"9",cy:"20",r:"2"}),wp.element.createElement("circle",{id:"Oval-2",cx:"18",cy:"20",r:"2"}))))),search:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-469.000000, -324.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"search-icon",transform:"translate(469.000000, 324.000000)"},wp.element.createElement("path",{d:"M3.83470744,16.348799 C3.83470744,15.7965143 4.28242269,15.348799 4.83470744,15.348799 C5.38699219,15.348799 5.83470744,15.7965143 5.83470744,16.348799 L5.81335241,21.7511152 C5.81335241,22.3033999 5.36563716,22.7511152 4.81335241,22.7511152 C4.26106766,22.7511152 3.81335241,22.3033999 3.81335241,21.7511152 L3.83470744,16.348799 Z",id:"Line-2",transform:"translate(4.824030, 19.049957) scale(-1, 1) rotate(-45.000000) translate(-4.824030, -19.049957) "}),wp.element.createElement("path",{d:"M13,18 C16.8659932,18 20,14.8659932 20,11 C20,7.13400675 16.8659932,4 13,4 C9.13400675,4 6,7.13400675 6,11 C6,14.8659932 9.13400675,18 13,18 Z M13,20 C8.02943725,20 4,15.9705627 4,11 C4,6.02943725 8.02943725,2 13,2 C17.9705627,2 22,6.02943725 22,11 C22,15.9705627 17.9705627,20 13,20 Z",id:"Oval",transform:"translate(13.000000, 11.000000) scale(-1, 1) translate(-13.000000, -11.000000) "}),wp.element.createElement("path",{d:"M17,6 C17.5522847,6 18,6.44771525 18,7 C18,7.55228475 17.5522847,8 17,8 C15.0670034,8 13.5,9.56700338 13.5,11.5 C13.5,12.0522847 13.0522847,12.5 12.5,12.5 C11.9477153,12.5 11.5,12.0522847 11.5,11.5 C11.5,8.46243388 13.9624339,6 17,6 Z",id:"Oval",transform:"translate(14.750000, 9.250000) scale(-1, 1) translate(-14.750000, -9.250000) "}))))),categories:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-234.000000, -416.000000)"},wp.element.createElement("g",{id:"categories-icon",transform:"translate(234.000000, 416.000000)"},wp.element.createElement("polygon",{id:"Triangle",fill:"#555D66",points:"3 2 5.5 7 0.5 7"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 6 8 4 23 4 23 6"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 13 8 11 23 11 23 13"}),wp.element.createElement("polygon",{id:"Line",fill:"#555D66","fill-rule":"nonzero",points:"8 20 8 18 23 18 23 20"}),wp.element.createElement("rect",{id:"Rectangle",stroke:"#555D66","stroke-width":"2",fill:"#FFFFFF",x:"2",y:"11",width:"2",height:"2"}),wp.element.createElement("rect",{id:"Rectangle",stroke:"#555D66","stroke-width":"2",fill:"#FFFFFF",x:"2",y:"18",width:"2",height:"2",rx:"1"}))))),category:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-470.000000, -416.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"category-icon",transform:"translate(470.000000, 416.000000)"},wp.element.createElement("polygon",{id:"Line-4",points:"3 4 3 2 21 2 21 4"}),wp.element.createElement("path",{d:"M5,17 L5,20 L9,20 L9,17 L5,17 Z M3,15 L11,15 L11,22 L3,22 L3,15 Z",id:"Rectangle-2"}),wp.element.createElement("path",{d:"M5,8 L5,11 L9,11 L9,8 L5,8 Z M3,6 L11,6 L11,13 L3,13 L3,6 Z",id:"Rectangle-2-Copy"}),wp.element.createElement("path",{d:"M15,17 L15,20 L19,20 L19,17 L15,17 Z M13,15 L21,15 L21,22 L13,22 L13,15 Z",id:"Rectangle-2"}),wp.element.createElement("path",{d:"M15,8 L15,11 L19,11 L19,8 L15,8 Z M13,6 L21,6 L21,13 L13,13 L13,6 Z",id:"Rectangle-2-Copy-3"}))))),button:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-345.000000, -280.000000)",fill:"#555D66","fill-rule":"nonzero"},wp.element.createElement("g",{id:"button-icon",transform:"translate(345.000000, 280.000000)"},wp.element.createElement("path",{d:"M4,8 L4,16 L20,16 L20,8 L4,8 Z M4,6 L20,6 C21.1045695,6 22,6.8954305 22,8 L22,16 C22,17.1045695 21.1045695,18 20,18 L4,18 C2.8954305,18 2,17.1045695 2,16 L2,8 C2,6.8954305 2.8954305,6 4,6 Z",id:"Rectangle-5"}),wp.element.createElement("path",{d:"M13.8320367,9.8101295 C14.2137832,9.41102047 14.8467917,9.3969454 15.2459008,9.77869195 C15.6450098,10.1604385 15.6590849,10.793447 15.2773383,11.192556 L12.2122748,14.3970238 C11.8300377,14.7966458 11.1960253,14.8101668 10.7970986,14.427204 L9.5128579,13.1943549 C9.11444327,12.8118837 9.10151859,12.1788506 9.48398981,11.780436 C9.86646103,11.3820214 10.4994941,11.3690967 10.8979087,11.7515679 L11.4594438,12.290632 L13.8320367,9.8101295 Z",id:"Line-6"}))))),productPreview:wp.element.createElement("svg",{width:"72px",height:"72px",viewBox:"0 0 72 72",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets",transform:"translate(-625.000000, -811.000000)",fill:"#AAAAAA"},wp.element.createElement("g",{id:"Group-2",transform:"translate(571.000000, 756.000000)"},wp.element.createElement("g",{id:"product-preview",transform:"translate(54.000000, 55.000000)"},wp.element.createElement("path",{d:"M6,25 L6,69 L66,69 L66,25 L6,25 Z M4,23 L68,23 L68,71 L4,71 L4,23 Z",id:"Rectangle-2-Copy-2","fill-rule":"nonzero"}),wp.element.createElement("path",{d:"M36.5,23.5 L65.836706,23.5 L67.2237665,22.8226349 L55.0328393,7.34740904 L39.8812213,0.895706316 L40.7501329,7.5 L17.0403124,7.5 L5.04031242,22.5 L6.32093727,22.5 L17.5209373,8.5 L36.5,8.5 L36.5,23.5 Z M42.9573255,16.6099474 L41.1011835,2.50206036 L54.4056315,8.16722056 L66.5284549,23.5566573 L42.9573255,16.6099474 Z",id:"Combined-Shape",stroke:"#AAAAAA"}),wp.element.createElement("path",{d:"M29.8056641,41.53125 C29.9375,38.2060547 32.2080078,35.6865234 36.4560547,35.6865234 C40.3232422,35.6865234 42.9306641,37.9863281 42.9306641,41.1210938 C42.9306641,43.3916016 41.7880859,44.9882812 39.8544922,46.1455078 C37.9648438,47.2587891 37.4228516,48.0351562 37.4228516,49.5439453 L37.4228516,50.4375 L34.390625,50.4375 L34.3759766,49.265625 C34.3027344,47.2001953 35.1962891,45.8818359 37.203125,44.6806641 C38.9755859,43.6113281 39.6054688,42.7617188 39.6054688,41.2529297 C39.6054688,39.5976562 38.3017578,38.3818359 36.2949219,38.3818359 C34.2734375,38.3818359 32.9697266,39.5976562 32.8378906,41.53125 L29.8056641,41.53125 Z M35.9287109,57.2197266 C34.859375,57.2197266 34.0097656,56.3994141 34.0097656,55.3300781 C34.0097656,54.2607422 34.859375,53.4404297 35.9287109,53.4404297 C37.0273438,53.4404297 37.8623047,54.2607422 37.8623047,55.3300781 C37.8623047,56.3994141 37.0273438,57.2197266 35.9287109,57.2197266 Z",id:"?"})))))),filters:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"square"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-354.000000, -500.000000)",stroke:"#555D66","stroke-width":"2"},wp.element.createElement("g",{id:"filter-icon",transform:"translate(354.000000, 500.000000)"},wp.element.createElement("path",{d:"M3,6 L21,6",id:"Line-5"}),wp.element.createElement("path",{d:"M7,12 L17,12",id:"Line-5"}),wp.element.createElement("path",{d:"M10,18 L14,18",id:"Line-5"}))))),cartPage:wp.element.createElement("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24",version:"1.1"},wp.element.createElement("g",{id:"Typography",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},wp.element.createElement("g",{id:"gutenberg-widgets-icons",transform:"translate(-470.000000, -500.000000)",fill:"#555D66"},wp.element.createElement("g",{id:"cart-icon",transform:"translate(470.000000, 500.000000)"},wp.element.createElement("g",{id:"Group-6",transform:"translate(2.000000, 3.000000)"},wp.element.createElement("path",{d:"M2.5269723,1 L0,1 C-0.55228475,1 -1,0.55228475 -1,-1.11022302e-16 C-1,-0.55228475 -0.55228475,-1 0,-1 L3.33333333,-1 C3.80393835,-1 4.21086155,-0.671872981 4.31061146,-0.211960997 L6.74215205,10.9990234 L16.2517453,10.9990234 L17.6754416,6 L17.0067139,6 C16.4544291,6 16.0067139,5.55228475 16.0067139,5 C16.0067139,4.44771525 16.4544291,4 17.0067139,4 L19,4 C19.6640252,4 20.143636,4.63527258 19.9617572,5.27390353 L17.968471,12.272927 C17.8460922,12.7026358 17.4535094,12.9990234 17.0067139,12.9990234 L5.93579102,12.9990234 C5.465186,12.9990234 5.0582628,12.6708964 4.95851289,12.2109844 L2.5269723,1 Z",id:"Path-3","fill-rule":"nonzero"}),wp.element.createElement("path",{d:"M13.6266547,1.30878828 C14.0084012,0.909679249 14.6414097,0.895604177 15.0405188,1.27735072 C15.4396278,1.65909727 15.4537029,2.29210579 15.0719563,2.69121482 L11.0068929,6.89568259 C10.6246557,7.29530459 9.99064332,7.30882561 9.59171662,6.92586281 L7.61584318,5.00113813 C7.21742856,4.61866691 7.20450388,3.98563386 7.5869751,3.58721924 C7.96944632,3.18880462 8.60247937,3.17587994 9.00089399,3.55835116 L10.2540618,4.78929076 L13.6266547,1.30878828 Z",id:"Line-6","fill-rule":"nonzero"}),wp.element.createElement("circle",{id:"Oval-2",cx:"7",cy:"17",r:"2"}),wp.element.createElement("circle",{id:"Oval-2",cx:"16",cy:"17",r:"2"}))))))}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=t.attributes,o=function(e,t,o,l){return wp.element.createElement(u,{label:o},wp.element.createElement(d,null,l.map(function(o){return wp.element.createElement(m,{isDefault:!0,isButton:!0,isPrimary:r[t]===o.value,onClick:function(){return e.setAttributes(n({},t,o.value))}},o.title)})))},l=function(e,t,r){return wp.element.createElement(w,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})},a=function(e,t,r,o){return wp.element.createElement(u,{label:r},wp.element.createElement("select",{onChange:function(r){e.setAttributes(n({},t,r.target.value))}},o.map(function(r){return wp.element.createElement("option",{value:r.value,selected:parseInt(e.attributes[t])==r.value},r.title)})))},i=function(e,t,r){return wp.element.createElement(u,{label:r},wp.element.createElement("input",{type:"text",value:e.attributes[t],onChange:function(r){e.setAttributes(n({},t,r.target.value))}}))},p=function(e,t,r,o){return wp.element.createElement(u,{label:r},wp.element.createElement(g,{controls:o.map(function(r){return{icon:c.a[r.icon],title:r.title,isActive:e.attributes[t]===r.value,className:"ecwid-toolbar-icon",onClick:function(){return e.setAttributes(n({},t,r.value))}}})}))};return{buttonGroup:function(r){var n=e[r];return o(t,n.name,n.title,n.values)},toggle:function(r){var n=e[r];return l(t,n.name,n.title)},select:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=e[r];return a(t,o.name,n||o.title,o.values)},textbox:function(r){var n=e[r];return builtTextbox(t,n.name,n.title)},toolbar:function(r){var n=e[r];return p(t,n.name,n.title,n.values)},color:function(r){return wp.element.createElement(s.a,{props:t,name:r,title:e[r].title})},defaultCategoryId:function(r){var n=e[r];return n.values&&n.values.length>1?a(t,n.name,n.title,n.values):i(t,n.name,n.title)}}}function l(e){return wp.element.createElement("div",{className:"ec-store-inspector-subheader-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},e))}function a(e){return wp.element.createElement("div",{className:"ec-store-block ec-store-generic-block"},wp.element.createElement("div",{className:"ec-store-block-header"},e.icon,e.title),wp.element.createElement("div",{className:"ec-store-block-content"},e.children),e.showDemoButton&&wp.element.createElement("div",null,wp.element.createElement("a",{className:"button button-primary",href:"admin.php?page=ec-store"},h("Set up your store","ecwid-shopping-cart"))))}function i(e){var t=EcwidGutenbergParams.imagesUrl+e.src;return wp.element.createElement("img",{src:t})}r.d(t,"a",function(){return o}),r.d(t,"c",function(){return l}),r.d(t,"b",function(){return i}),r.d(t,"d",function(){return a});var c=r(0),s=r(6),p=wp.components,d=p.ButtonGroup,m=p.Button,u=p.BaseControl,g=p.Toolbar,w=p.ToggleControl,h=wp.i18n.__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(3),r(7),r(10),r(13),r(16),r(19),r(22),r(25),r(28),r(31)},function(e,t,r){"use strict";var n=r(4),o=(r.n(n),r(5)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=i._x,p=wp.blocks.registerBlockType,d=wp.editor.InspectorControls,m=wp.components,u=m.PanelBody,g=(m.PanelRow,m.ToggleControl,m.ButtonGroup,m.Button,m.BaseControl),w=(m.Toolbar,m.ColorPalette,m.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ecwid/store-block"]);p("ecwid/store-block",{title:s("Store Home Page","ecwid-shopping-cart"),icon:l.a.store,category:"ec-store",attributes:w.attributes,description:c("Add storefront (product listing)","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(g,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes;e.setAttributes({widgets:""});var n=wp.element.createElement(a.d,{icon:l.a.store,title:c("Store Home Page"),showDemoButton:w.isDemoStore},wp.element.createElement("div",{className:"ec-store-products"},wp.element.createElement("div",{className:"ec-store-product1"}),wp.element.createElement("div",{className:"ec-store-product2"}),wp.element.createElement("div",{className:"ec-store-product3"})),wp.element.createElement("div",{className:"ec-store-products"},wp.element.createElement("div",{className:"ec-store-product4"}),wp.element.createElement("div",{className:"ec-store-product5"}),wp.element.createElement("div",{className:"ec-store-product6"}))),o=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),i=t(c("Display cart icon","ecwid-shopping-cart"),w.customizeMinicartText),s=(t("",c('To improve the look and feel of your product page and manage your its appearance here, please enable the \u201cNext-gen look and feel of the product page on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),w.isNewProductList),p=w.isNewDetailsPage,m=w.attributes.default_category_id&&w.attributes.default_category_id.values&&w.attributes.default_category_id.values.length>0,h=Object(a.a)(w.attributes,e);return[n,wp.element.createElement(d,null,m&&wp.element.createElement(u,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[h.select("product_list_category_title_behavior"),"SHOW_TEXT_ONLY"!==r.product_list_category_title_behavior&&[h.buttonGroup("product_list_category_image_size"),h.toolbar("product_list_category_image_aspect_ratio")]],!s&&o),wp.element.createElement(u,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[h.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[h.buttonGroup("product_list_image_size"),h.toolbar("product_list_image_aspect_ratio")],h.toolbar("product_list_product_info_layout"),h.select("product_list_title_behavior"),h.select("product_list_price_behavior"),h.select("product_list_sku_behavior"),h.select("product_list_buybutton_behavior"),h.toggle("product_list_show_additional_image_on_hover"),h.toggle("product_list_show_frame")],!s&&o),wp.element.createElement(u,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},p&&[h.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===r.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===r.product_details_layout)&&h.toggle("show_description_under_image"),h.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),h.toggle("product_details_show_product_name"),h.toggle("product_details_show_breadcrumbs"),h.toggle("product_details_show_product_sku"),h.toggle("product_details_show_product_price"),h.toggle("product_details_show_qty"),h.toggle("product_details_show_number_of_items_in_stock"),h.toggle("product_details_show_in_stock_label"),h.toggle("product_details_show_wholesale_prices"),h.toggle("product_details_show_share_buttons")],!p&&o),m&&wp.element.createElement(u,{title:c("Store Front Page","ecwid-shopping-cart"),initialOpen:!1},h.defaultCategoryId("default_category_id")),wp.element.createElement(u,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},h.toggle("show_categories"),h.toggle("show_search"),h.toggle("show_breadcrumbs"),s&&h.toggle("show_footer_menu"),h.toggle("show_signin_link"),h.toggle("product_list_show_sort_viewas_options"),i),wp.element.createElement(u,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},h.color("chameleon_color_button"),h.color("chameleon_color_foreground"),h.color("chameleon_color_price"),h.color("chameleon_color_link"),h.color("chameleon_color_background")))]},save:function(e){var t=["productbrowser"];e.attributes.show_categories&&(t[t.length]="categories"),e.attributes.show_search&&(t[t.length]="search");var r={widgets:t.join(" "),default_category_id:"undefined"!==typeof e.attributes.default_category_id?e.attributes.default_category_id:0};return new wp.shortcode({tag:w.shortcodeName,attrs:r,type:"single"}).string()},deprecated:[{attributes:{widgets:{type:"string"},categories_per_row:{type:"integer"},grid:{type:"string"},list:{type:"integer"},table:{type:"integer"},default_category_id:{type:"integer"},default_product_id:{type:"integer"},category_view:{type:"string"},search_view:{type:"string"},minicart_layout:{type:"string"}},save:function(e){return null}},{attributes:{widgets:{type:"string",default:"productbrowser"},default_category_id:{type:"integer",default:0}},migrate:function(e){return{widgets:e.widgets,default_category_id:e.default_category_id}},save:function(e){for(var t={},r=["widgets","default_category_id"],n=0;n<r.length;n++)t[r[n]]=e.attributes[r[n]];return t.default_product_id=0,new wp.shortcode({tag:w.shortcodeName,attrs:t,type:"single"}).string()}},{save:function(e){return"[ecwid]"}},{save:function(e){return'[ecwid widgets="productbrowser" default_category_id="0" default_product_id="0"]'}},{save:function(e){return'[ecwid widgets="productbrowser" default_category_id="0"]'}}],transforms:{from:[{type:"shortcode",tag:["ecwid","ec_store"],attributes:{default_category_id:{type:"integer",shortcode:function(e){return e.default_category_id}},show_categories:{type:"boolean",shortcode:function(e){return-1!==e.named.widgets.indexOf("categories")}},show_search:{type:"boolean",shortcode:function(e){return-1!==e.named.widgets.indexOf("search")}}},priority:10}]}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){function t(e){l(function(t){return{manual:"manual",color:e}}),m.setAttributes(n({},s,e))}var r=e.manual,o=e.color,l=e.setState,s=arguments[0].name,m=arguments[0].props,u=arguments[0].title,g=null===r&&null!==m.attributes[s]&&""!==m.attributes[s]||"manual"===r;g?null!==o&&m.setAttributes(n({},s,o)):m.setAttributes(n({},s,null));var w=m.attributes[s],h=wp.element.createElement("span",null,u,null!==w&&wp.element.createElement(c,{colorValue:m.attributes[s]}));return wp.element.createElement(a,{label:h,className:"ec-store-color-picker"},wp.element.createElement("select",{onChange:function(e){return l(function(e){return{manual:event.target.value,color:e.color}})}},wp.element.createElement("option",{value:"auto",selected:!g},p("Detect automatically","ecwid-shopping-cart")),wp.element.createElement("option",{value:"manual",selected:g},p("Set manually","ecwid-shopping-cart"))),g&&wp.element.createElement(i,{value:w,colors:d,onChange:t}))}r.d(t,"a",function(){return m});var l=wp.components,a=l.BaseControl,i=l.ColorPalette,c=l.ColorIndicator,s=wp.compose.withState,p=wp.i18n.__,d=[{name:p("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:p("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:p("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:p("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:p("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:p("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:p("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:p("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:p("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:p("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:p("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],m=s({manual:null,color:null})(o)},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(8),l=(r.n(o),r(9)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=i._x,p=wp.blocks.registerBlockType,d=wp.editor.InspectorControls,m=wp.components,u=m.PanelBody,g=m.ToggleControl;wp.compose.withState,wp.element.Fragment;p("ecwid/product-block",{title:c("Product Card Small","ecwid-shopping-cart"),icon:a.a.product,category:"ec-store",attributes:{id:{type:"integer"},show_picture:{type:"boolean",default:!0},show_title:{type:"boolean",default:!0},show_price:{type:"boolean",default:!0},show_options:{type:"boolean",default:!0},show_qty:{type:"boolean",default:!1},show_addtobag:{type:"boolean",default:!0},show_price_on_button:{type:"boolean",default:!0},show_border:{type:"boolean",default:!0},center_align:{type:"boolean",default:!0}},description:c("Display product with a buy button","ecwid-shopping-cart"),alignWide:!1,supports:{customClassName:!1,className:!1,html:!1,align:!0,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){function t(e,t,r){return wp.element.createElement(g,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})}function r(e){ecwid_open_product_popup({saveCallback:l,props:e})}var o=e.attributes,l=function(e){var t={id:e.newProps.product.id};EcwidGutenbergParams.products[e.newProps.product.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)};return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-product"},EcwidGutenbergParams.products&&o.id&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("div",{className:"ec-store-block-image"},wp.element.createElement("img",{src:EcwidGutenbergParams.products[o.id].imageUrl})),EcwidGutenbergParams.products&&o.id&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("div",{className:"ec-store-product-title"},EcwidGutenbergParams.products[o.id].name),!o.id&&wp.element.createElement("div",{className:"ec-store-block-product-preview"},a.a.productPreview),!o.id&&wp.element.createElement("div",null,wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:l,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),wp.element.createElement(d,null,o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Displayed product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[o.id].name),wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Change","ecwid-shopping-cart")))),!o.id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement(u,{title:s("Content","gutenberg-product-block","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_picture",c("Picture","ecwid-shopping-cart")),t(e,"show_title",c("Title","ecwid-shopping-cart")),t(e,"show_price",c("Price","ecwid-shopping-cart")),t(e,"show_options",c("Options","ecwid-shopping-cart")),t(e,"show_qty",c("Quantity","ecwid-shopping-cart")),t(e,"show_addtobag",c("\xabBuy now\xbb button","ecwid-shopping-cart"))),wp.element.createElement(u,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_price_on_button",c("Show price inside the \xabBuy now\xbb button","ecwid-shopping-cart")),t(e,"show_border",c("Add border","ecwid-shopping-cart")),t(e,"center_align",c("Center align on a page","ecwid-shopping-cart"))))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(11),l=(r.n(o),r(12)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=(i._x,wp.blocks),p=(s.BlockControls,s.registerBlockType),d=wp.editor.InspectorControls,m=wp.components,u=m.PanelBody,g=m.ToggleControl;wp.compose.withState,wp.element.Fragment;p("ec-store/buynow",{title:c("Buy Now Button","ecwid-shopping-cart"),icon:a.a.button,category:"ec-store",attributes:{id:{type:"integer"},show_price_on_button:{type:"boolean",default:!0},center_align:{type:"boolean",default:!0}},description:c("Display a buy button","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,align:!0,alignWide:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){function t(e,t,r){return wp.element.createElement(g,{label:r,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})}function r(e){ecwid_open_product_popup({saveCallback:l,props:e})}var o=e.attributes,l=function(e){var t={id:e.newProps.id};EcwidGutenbergParams.products[e.newProps.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)};return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-buynow"},!o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"image"}),wp.element.createElement("div",{className:"button-container"},wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:l,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),o.id&&wp.element.createElement("div",{className:"image"})),wp.element.createElement(d,null,o.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Linked product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[o.id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[o.id].name),wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Change","ecwid-shopping-cart")))),!o.id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return r(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement("br",null),wp.element.createElement(u,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_price_on_button",c("Show price inside the \xabBuy now\xbb button","ecwid-shopping-cart")),t(e,"center_align",c("Center align on a page","ecwid-shopping-cart"))))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(14),o=(r.n(n),r(15)),l=(r.n(o),r(0));if(!EcwidGutenbergParams.isDemoStore){var a=wp.i18n,i=a.__;a._x;(0,wp.blocks.registerBlockType)("ec-store/search",{title:i("Product Search Box","ecwid-shopping-cart"),icon:l.a.search,category:"ec-store",description:i("Display search box","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){e.attributes;return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-search"},wp.element.createElement("div",{class:"image"}))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(17),o=(r.n(n),r(18)),l=(r.n(o),r(0));if(!EcwidGutenbergParams.isDemoStore){var a=wp.editor.InspectorControls,i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=EcwidGutenbergParams.blockParams["ec-store/categories"];s("ec-store/categories",{title:c("Store Categories Menu","ecwid-shopping-cart"),icon:l.a.categories,category:"ec-store",description:c("Display categories menu","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){var t=(e.attributes,wp.element.createElement("div",{className:"ec-store-block ec-store-block-categories"},wp.element.createElement("div",{className:"ec-store-block-header"},l.a.categories,c("Categories","ecwid-shopping-cart")))),r=c('The block is hidden because you don\'t have categories in your store. <a target="_blank" href="admin.php?page=ec-store-admin-category-id-0-mode-edit">Add categories.</a>',"ecwid-shopping-cart");return[t,wp.element.createElement(a,null,wp.element.createElement("div",{style:{height:"10px"}}),!p.has_categories&&wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(20),l=(r.n(o),r(21)),a=(r.n(l),r(0));if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,c=i.__,s=(i._x,wp.editor.InspectorControls),p=wp.components,d=p.PanelBody,m=p.BaseControl;(0,wp.blocks.registerBlockType)("ec-store/minicart",{title:c("Shopping Cart Icon","ecwid-shopping-cart"),icon:a.a.cart,category:"ec-store",description:c("Display shopping bag link and summary","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable,align:!0,alignWide:!1},attributes:EcwidGutenbergParams.minicartAttributes,edit:function(e){function t(e,t,r,o){return wp.element.createElement(m,{label:r},wp.element.createElement("select",{className:"ec-store-inspector-select",onChange:function(r){e.setAttributes(n({},t,r.target.value))}},o.map(function(r){return wp.element.createElement("option",{value:r.value,selected:e.attributes[t]==r.value},r.title)})))}function r(e,r,n){var o=EcwidGutenbergParams.minicartAttributes[r];return"undefined"===typeof n&&(n=o.type),t(e,o.name,o.title,o.values)}e.attributes;return[wp.element.createElement("div",{className:"ec-store-block ec-store-block-minicart"},wp.element.createElement("div",{className:"image"})),wp.element.createElement(s,null,wp.element.createElement(d,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!0},r(e,"layout","select"),r(e,"icon","select"),r(e,"fixed_shape","select")))]},save:function(e){return!1}})}},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(23),o=(r.n(n),r(24)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,l.a,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=d.BaseControl,g=EcwidGutenbergParams.blockParams["ec-store/category-page"];s("ec-store/category-page",{title:c("Store Category Page","ecwid-shopping-cart"),icon:l.a.category,category:"ec-store",attributes:EcwidGutenbergStoreBlockParams.attributes,description:c("Display category page","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes;e.setAttributes({widgets:""});var n=wp.element.createElement(a.d,{icon:l.a.category,title:c("Store Category Page","ecwid-shopping-cart"),showDemoButton:g.isDemoStore},wp.element.createElement("div",{className:"ec-store-category-products"},wp.element.createElement("div",{className:"ec-store-category-product1"}),wp.element.createElement("div",{className:"ec-store-category-product2"}),wp.element.createElement("div",{className:"ec-store-category-product3"})),wp.element.createElement("div",{className:"ec-store-category-products"},wp.element.createElement("div",{className:"ec-store-category-product4"}),wp.element.createElement("div",{className:"ec-store-category-product5"}),wp.element.createElement("div",{className:"ec-store-category-product6"}))),o=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),i=t(c("Display cart icon","ecwid-shopping-cart"),g.customizeMinicartText),s=g.isNewProductList,d=g.isNewDetailsPage,w=Object(a.a)(g.attributes,e);return[n,wp.element.createElement(p,null,wp.element.createElement("div",{style:{height:"10px"}}),!EcwidGutenbergParams.hasCategories&&wp.element.createElement("div",{style:{margin:"10px"}},wp.element.createElement("a",{href:"admin.php?page=ec-store-admin-category-id-0-mode-edit",target:"_blank",class:"button button-primary"},c("Add categories","ecwid-shopping-cart"))),EcwidGutenbergParams.hasCategories&&[!e.attributes.default_category_id&&w.select("default_category_id",c("Select category","ecwid-shopping-cart")),e.attributes.default_category_id&&w.select("default_category_id",c("Selected category","ecwid-shopping-cart"))],wp.element.createElement(m,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[w.select("product_list_category_title_behavior"),"SHOW_TEXT_ONLY"!==r.product_list_category_title_behavior&&[w.buttonGroup("product_list_category_image_size"),w.toolbar("product_list_category_image_aspect_ratio")]],!s&&o),wp.element.createElement(m,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[w.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[w.buttonGroup("product_list_image_size"),w.toolbar("product_list_image_aspect_ratio")],w.toolbar("product_list_product_info_layout"),w.select("product_list_title_behavior"),w.select("product_list_price_behavior"),w.select("product_list_sku_behavior"),w.select("product_list_buybutton_behavior"),w.toggle("product_list_show_additional_image_on_hover"),w.toggle("product_list_show_frame")],!s&&o),wp.element.createElement(m,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},d&&[w.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===r.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===r.product_details_layout)&&w.toggle("show_description_under_image"),w.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),w.toggle("product_details_show_product_name"),w.toggle("product_details_show_breadcrumbs"),w.toggle("product_details_show_product_sku"),w.toggle("product_details_show_product_price"),w.toggle("product_details_show_qty"),w.toggle("product_details_show_number_of_items_in_stock"),w.toggle("product_details_show_in_stock_label"),w.toggle("product_details_show_wholesale_prices"),w.toggle("product_details_show_share_buttons")],!d&&productDetailsMigrationWarning),wp.element.createElement(m,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},w.toggle("show_categories"),w.toggle("show_search"),w.toggle("show_breadcrumbs"),s&&w.toggle("show_footer_menu"),w.toggle("show_signin_link"),w.toggle("product_list_show_sort_viewas_options"),i),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},w.color("chameleon_color_button"),w.color("chameleon_color_foreground"),w.color("chameleon_color_price"),w.color("chameleon_color_link"),w.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(26),o=(r.n(n),r(27)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=d.BaseControl,g=(wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/product-page"]);s("ec-store/product-page",{title:c("Product Card Large","ecwid-shopping-cart"),icon:l.a.product,category:"ec-store",attributes:g.attributes,description:c("Display product page with description and a buy button","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e){ecwid_open_product_popup({saveCallback:o,props:e})}function r(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var n=e.attributes,o=function(e){var t={default_product_id:e.newProps.product.id};EcwidGutenbergParams.products[e.newProps.product.id]={name:e.newProps.product.name,imageUrl:e.newProps.product.thumb},e.originalProps.setAttributes(t)},i=wp.element.createElement(a.d,{icon:l.a.product,title:c("Product Card Large")},wp.element.createElement(a.b,{src:"product-page-preview.png"}),!n.default_product_id&&wp.element.createElement("div",{className:"button-container"},wp.element.createElement("button",{className:"button ec-store-block-button",onClick:function(){var t={saveCallback:o,props:e};ecwid_open_product_popup(t)}},EcwidGutenbergParams.chooseProduct))),s=r("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),d=(r("",c('To improve the look and feel of your product page and manage your its appearance here, please enable the \u201cNext-gen look and feel of the product page on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),g.isNewDetailsPage),w=Object(a.a)(g.attributes,e);return[i,wp.element.createElement(p,null,n.default_product_id>0&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Linked product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[n.default_product_id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[n.default_product_id].name),wp.element.createElement("button",{className:"button",onClick:function(){return t(e)}},c("Change","ecwid-shopping-cart")))),!n.default_product_id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return t(e)}},c("Choose product","ecwid-shopping-cart"))),wp.element.createElement(m,{title:c("Appearance","ecwid-shopping-cart"),initialOpen:!1},d&&[w.select("product_details_layout"),("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"===n.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"===n.product_details_layout)&&w.toggle("show_description_under_image"),w.toolbar("product_details_gallery_layout"),Object(a.c)(c("Product sidebar content","ecwid-shopping-cart")),w.toggle("product_details_show_product_name"),w.toggle("product_details_show_breadcrumbs"),w.toggle("product_details_show_product_sku"),w.toggle("product_details_show_product_price"),w.toggle("product_details_show_qty"),w.toggle("product_details_show_number_of_items_in_stock"),w.toggle("product_details_show_in_stock_label"),w.toggle("product_details_show_wholesale_prices"),w.toggle("product_details_show_share_buttons")],!d&&s),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},w.color("chameleon_color_button"),w.color("chameleon_color_foreground"),w.color("chameleon_color_price"),w.color("chameleon_color_link"),w.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(29),o=(r.n(n),r(30)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=wp.editor.InspectorControls,d=wp.components,m=d.PanelBody,u=(d.PanelRow,d.ToggleControl,d.ButtonGroup,d.Button,d.BaseControl),g=(d.Toolbar,d.ColorPalette,d.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/filters-page"]);s("ec-store/filters-page",{title:c("Product Search and filters","ecwid-shopping-cart"),icon:l.a.filters,category:"ec-store",attributes:g.attributes,description:c("Display search page with filters on a side","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){function t(e,t){return wp.element.createElement(u,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}var r=e.attributes,n=wp.element.createElement(a.d,{icon:l.a.filters,title:c("Search and Filters")},wp.element.createElement(a.b,{src:"filter-preview.png"})),o=t("",c('You can enable filters in the store settings: (\u201c<a target="_blank" href="admin.php?page=ec-store-admin-product-filters-mode-main">Settings \u2192 Product Filters</a>\u201d).',"ecwid-shopping-cart")),i=t("",c('To improve the look and feel of your store and manage your storefront appearance here, please enable the \u201cNext-gen look and feel of the product list on the storefront\u201d option in your store dashboard (\u201c<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings \u2192 What\u2019s New</a>\u201d).',"ecwid-shopping-cart")),s=g.isNewProductList,d=Object(a.a)(g.attributes,e);return[n,wp.element.createElement(p,null,wp.element.createElement(m,{title:c("Filters","ecwid-shopping-cart"),initialOpen:!1},!g.filtersEnabled&&o,g.filtersEnabled&&[d.select("product_filters_position_search_page")]),wp.element.createElement(m,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},s&&[d.toggle("product_list_show_product_images"),r.product_list_show_product_images&&[d.buttonGroup("product_list_image_size"),d.toolbar("product_list_image_aspect_ratio")],d.toolbar("product_list_product_info_layout"),d.select("product_list_title_behavior"),d.select("product_list_price_behavior"),d.select("product_list_sku_behavior"),d.select("product_list_buybutton_behavior"),d.toggle("product_list_show_additional_image_on_hover"),d.toggle("product_list_show_frame")],!s&&i),wp.element.createElement(m,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},d.toggle("show_categories"),d.toggle("show_breadcrumbs"),s&&d.toggle("show_footer_menu"),d.toggle("show_signin_link"),d.toggle("product_list_show_sort_viewas_options")),wp.element.createElement(m,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},d.color("chameleon_color_button"),d.color("chameleon_color_foreground"),d.color("chameleon_color_price"),d.color("chameleon_color_link"),d.color("chameleon_color_background")))]},save:function(e){return null}})},function(e,t){},function(e,t){},function(e,t,r){"use strict";var n=r(32),o=(r.n(n),r(33)),l=(r.n(o),r(0)),a=r(1),i=wp.i18n,c=i.__,s=(i._x,wp.blocks.registerBlockType),p=(wp.editor.InspectorControls,wp.components),d=(p.PanelBody,p.PanelRow,p.ToggleControl,p.ButtonGroup,p.Button,p.BaseControl,p.Toolbar,p.ColorPalette,p.ColorIndicator,wp.compose.withState,EcwidGutenbergParams.blockParams["ec-store/cart-page"]);s("ec-store/cart-page",{title:c("Cart and Checkout","ecwid-shopping-cart"),icon:l.a.cartPage,category:"ec-store",attributes:d.attributes,description:c("Display shopping cart and checkout page","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,multiple:!1},edit:function(e){e.attributes;return[wp.element.createElement(a.d,{icon:l.a.cartPage,title:c("Cart and Checkout")},wp.element.createElement(a.b,{src:"cart-page-preview.png"}))]},save:function(e){return null}})},function(e,t){},function(e,t){}]);
|
js/gutenberg/buynow.jsx
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Import CSS.
|
2 |
+
import './style.scss';
|
3 |
+
import './editor.scss';
|
4 |
+
import {EcwidIcons} from '../icons.js';
|
5 |
+
|
6 |
+
|
7 |
+
if ( !EcwidGutenbergParams.isDemoStore ) {
|
8 |
+
|
9 |
+
const { __, _x } = wp.i18n; // Import __() from wp.i18n
|
10 |
+
|
11 |
+
const {
|
12 |
+
BlockControls,
|
13 |
+
registerBlockType,
|
14 |
+
} = wp.blocks;
|
15 |
+
|
16 |
+
const {
|
17 |
+
InspectorControls,
|
18 |
+
} = wp.editor;
|
19 |
+
|
20 |
+
const {
|
21 |
+
PanelBody,
|
22 |
+
ToggleControl,
|
23 |
+
} = wp.components;
|
24 |
+
|
25 |
+
const { withState } = wp.compose;
|
26 |
+
|
27 |
+
const {
|
28 |
+
Fragment
|
29 |
+
} = wp.element;
|
30 |
+
|
31 |
+
registerBlockType( 'ec-store/buynow', {
|
32 |
+
title: __( 'Buy Now Button', 'ecwid-shopping-cart' ),
|
33 |
+
icon: EcwidIcons.button,
|
34 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
35 |
+
attributes: {
|
36 |
+
id: {type: 'integer'},
|
37 |
+
show_price_on_button: {type: 'boolean', default: true},
|
38 |
+
center_align: {type: 'boolean', default: true}
|
39 |
+
},
|
40 |
+
description: __( 'Display a buy button', 'ecwid-shopping-cart' ),
|
41 |
+
supports: {
|
42 |
+
customClassName: false,
|
43 |
+
className: false,
|
44 |
+
html: false,
|
45 |
+
align: true,
|
46 |
+
alignWide: false,
|
47 |
+
isPrivate: !EcwidGutenbergParams.isApiAvailable
|
48 |
+
},
|
49 |
+
|
50 |
+
/**
|
51 |
+
* The edit function describes the structure of your block in the context of the editor.
|
52 |
+
* This represents what the editor will render when the block is used.
|
53 |
+
*
|
54 |
+
* The "edit" property must be a valid function.
|
55 |
+
*
|
56 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
57 |
+
*/
|
58 |
+
edit: function( props ) {
|
59 |
+
|
60 |
+
const { attributes } = props;
|
61 |
+
|
62 |
+
const saveCallback = function( params ) {
|
63 |
+
|
64 |
+
const attributes = {
|
65 |
+
'id': params.newProps.id
|
66 |
+
};
|
67 |
+
|
68 |
+
EcwidGutenbergParams.products[params.newProps.id] = {
|
69 |
+
name: params.newProps.product.name,
|
70 |
+
imageUrl: params.newProps.product.thumb
|
71 |
+
};
|
72 |
+
|
73 |
+
params.originalProps.setAttributes(attributes);
|
74 |
+
};
|
75 |
+
|
76 |
+
const editor = <div className="ec-store-block ec-store-block-buynow">
|
77 |
+
{ !attributes.id &&
|
78 |
+
<div>
|
79 |
+
<div className="image">
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div className="button-container">
|
83 |
+
<button className="button ec-store-block-button" onClick={ () => { var params = {'saveCallback':saveCallback, 'props': props}; ecwid_open_product_popup( params ); } }>{ EcwidGutenbergParams.chooseProduct }</button>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
}
|
87 |
+
|
88 |
+
{ attributes.id &&
|
89 |
+
<div className="image">
|
90 |
+
</div>
|
91 |
+
}
|
92 |
+
</div>;
|
93 |
+
|
94 |
+
function buildToggle(props, name, label) {
|
95 |
+
return <ToggleControl
|
96 |
+
label={ label }
|
97 |
+
checked={ props.attributes[name] }
|
98 |
+
onChange={ () => props.setAttributes( { [name]: ! props.attributes[name] } ) }
|
99 |
+
/>
|
100 |
+
}
|
101 |
+
|
102 |
+
function openEcwidProductPopup( props ) {
|
103 |
+
ecwid_open_product_popup( { 'saveCallback': saveCallback, 'props': props } );
|
104 |
+
}
|
105 |
+
|
106 |
+
return ([
|
107 |
+
editor,
|
108 |
+
<InspectorControls>
|
109 |
+
{attributes.id &&
|
110 |
+
<div>
|
111 |
+
<div className="ec-store-inspector-row">
|
112 |
+
<label className="ec-store-inspector-subheader">{ __( 'Linked product', 'ecwid-shopping-cart' ) }</label>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div className="ec-store-inspector-row">
|
116 |
+
|
117 |
+
{ EcwidGutenbergParams.products && EcwidGutenbergParams.products[attributes.id] &&
|
118 |
+
<label>{ EcwidGutenbergParams.products[attributes.id].name }</label>
|
119 |
+
}
|
120 |
+
|
121 |
+
<button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Change', 'ecwid-shopping-cart' ) }</button>
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
}
|
125 |
+
{!attributes.id &&
|
126 |
+
<div className="ec-store-inspector-row">
|
127 |
+
<button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Choose product', 'ecwid-shopping-cart' ) }</button>
|
128 |
+
</div>
|
129 |
+
}
|
130 |
+
|
131 |
+
<br />
|
132 |
+
<PanelBody title={ __( 'Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
133 |
+
{ buildToggle( props, 'show_price_on_button', __( 'Show price inside the «Buy now» button', 'ecwid-shopping-cart' ) ) }
|
134 |
+
{ buildToggle( props, 'center_align', __( 'Center align on a page', 'ecwid-shopping-cart' ) ) }
|
135 |
+
</PanelBody>
|
136 |
+
</InspectorControls>
|
137 |
+
]);
|
138 |
+
},
|
139 |
+
|
140 |
+
save: function( props ) {
|
141 |
+
return false;
|
142 |
+
},
|
143 |
+
|
144 |
+
} );
|
145 |
+
|
146 |
+
}
|
js/gutenberg/cart-page.jsx
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: my-block
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
import {EcwidIcons} from '../icons.js';
|
12 |
+
import { EcwidControls, EcwidProductBrowserBlock, EcwidImage } from '../includes/controls.js';
|
13 |
+
|
14 |
+
const { __, _x } = wp.i18n;
|
15 |
+
|
16 |
+
const {
|
17 |
+
registerBlockType,
|
18 |
+
} = wp.blocks;
|
19 |
+
|
20 |
+
const {
|
21 |
+
InspectorControls,
|
22 |
+
} = wp.editor;
|
23 |
+
|
24 |
+
const {
|
25 |
+
PanelBody,
|
26 |
+
PanelRow,
|
27 |
+
ToggleControl,
|
28 |
+
ButtonGroup,
|
29 |
+
Button,
|
30 |
+
BaseControl,
|
31 |
+
Toolbar,
|
32 |
+
ColorPalette,
|
33 |
+
ColorIndicator
|
34 |
+
} = wp.components;
|
35 |
+
|
36 |
+
const { withState } = wp.compose;
|
37 |
+
|
38 |
+
const blockName = 'ec-store/cart-page';
|
39 |
+
|
40 |
+
const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
41 |
+
/**
|
42 |
+
* Register: aa Gutenberg Block.
|
43 |
+
*
|
44 |
+
* Registers a new block provided a unique name and an object defining its
|
45 |
+
* behavior. Once registered, the block is made editor as an option to any
|
46 |
+
* editor interface where blocks are implemented.
|
47 |
+
*
|
48 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
49 |
+
* @param {string} name Block name.
|
50 |
+
* @param {Object} settings Block settings.
|
51 |
+
* @return {?WPBlock} The block, if it has been successfully
|
52 |
+
* registered; otherwise `undefined`.
|
53 |
+
*/
|
54 |
+
registerBlockType( 'ec-store/cart-page', {
|
55 |
+
title: __( 'Cart and Checkout', 'ecwid-shopping-cart' ), // Block title.
|
56 |
+
icon: EcwidIcons.cartPage,
|
57 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
58 |
+
attributes: blockParams.attributes,
|
59 |
+
description: __( 'Display shopping cart and checkout page', 'ecwid-shopping-cart' ),
|
60 |
+
supports: {
|
61 |
+
customClassName: false,
|
62 |
+
className: false,
|
63 |
+
html: false,
|
64 |
+
multiple: false
|
65 |
+
},
|
66 |
+
|
67 |
+
/**
|
68 |
+
* The edit function describes the structure of your block in the context of the editor.
|
69 |
+
* This represents what the editor will render when the block is used.
|
70 |
+
*
|
71 |
+
* The "edit" property must be a valid function.
|
72 |
+
*
|
73 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
74 |
+
*/
|
75 |
+
edit: function( props ) {
|
76 |
+
|
77 |
+
const { attributes } = props;
|
78 |
+
|
79 |
+
|
80 |
+
const editor =
|
81 |
+
<EcwidProductBrowserBlock icon={ EcwidIcons.cartPage } title={ __( 'Cart and Checkout') }>
|
82 |
+
<EcwidImage src="cart-page-preview.png" />
|
83 |
+
</EcwidProductBrowserBlock>;
|
84 |
+
|
85 |
+
function buildDangerousHTMLMessageWithTitle( title, message ) {
|
86 |
+
return <BaseControl label={ title }><div dangerouslySetInnerHTML={{ __html: message }} /></BaseControl>;
|
87 |
+
}
|
88 |
+
|
89 |
+
return ([
|
90 |
+
editor
|
91 |
+
]);
|
92 |
+
},
|
93 |
+
|
94 |
+
save: function( props ) {
|
95 |
+
return null;
|
96 |
+
}
|
97 |
+
} );
|
js/gutenberg/categories.jsx
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Import CSS.
|
2 |
+
import './style.scss';
|
3 |
+
import './editor.scss';
|
4 |
+
import {EcwidIcons} from '../icons.js';
|
5 |
+
|
6 |
+
if ( !EcwidGutenbergParams.isDemoStore ) {
|
7 |
+
|
8 |
+
const {
|
9 |
+
InspectorControls
|
10 |
+
} = wp.editor;
|
11 |
+
|
12 |
+
const { __, _x } = wp.i18n; // Import __() from wp.i18n
|
13 |
+
|
14 |
+
const {
|
15 |
+
registerBlockType,
|
16 |
+
} = wp.blocks;
|
17 |
+
|
18 |
+
const blockName = 'ec-store/categories';
|
19 |
+
|
20 |
+
const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register: aa Gutenberg Block.
|
24 |
+
*
|
25 |
+
* Registers a new block provided a unique name and an object defining its
|
26 |
+
* behavior. Once registered, the block is made editor as an option to any
|
27 |
+
* editor interface where blocks are implemented.
|
28 |
+
*
|
29 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
30 |
+
* @param {string} name Block name.
|
31 |
+
* @param {Object} settings Block settings.
|
32 |
+
* @return {?WPBlock} The block, if it has been successfully
|
33 |
+
* registered; otherwise `undefined`.
|
34 |
+
*/
|
35 |
+
registerBlockType( 'ec-store/categories', {
|
36 |
+
title: __( 'Store Categories Menu', 'ecwid-shopping-cart' ),
|
37 |
+
icon: EcwidIcons.categories,
|
38 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
39 |
+
description: __( 'Display categories menu', 'ecwid-shopping-cart' ),
|
40 |
+
supports: {
|
41 |
+
customClassName: false,
|
42 |
+
className: false,
|
43 |
+
html: false,
|
44 |
+
isPrivate: !EcwidGutenbergParams.isApiAvailable
|
45 |
+
},
|
46 |
+
|
47 |
+
/**
|
48 |
+
* The edit function describes the structure of your block in the context of the editor.
|
49 |
+
* This represents what the editor will render when the block is used.
|
50 |
+
*
|
51 |
+
* The "edit" property must be a valid function.
|
52 |
+
*
|
53 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
54 |
+
*/
|
55 |
+
edit: function( props ) {
|
56 |
+
|
57 |
+
const { attributes } = props;
|
58 |
+
|
59 |
+
const editor = <div className="ec-store-block ec-store-block-categories">
|
60 |
+
<div className="ec-store-block-header">
|
61 |
+
{ EcwidIcons.categories }
|
62 |
+
{ __( 'Categories', 'ecwid-shopping-cart' ) }
|
63 |
+
</div>
|
64 |
+
</div>;
|
65 |
+
|
66 |
+
const message = __( 'The block is hidden because you don\'t have categories in your store. <a target="_blank" href="admin.php?page=ec-store-admin-category-id-0-mode-edit">Add categories.</a>', 'ecwid-shopping-cart' );
|
67 |
+
|
68 |
+
return ([
|
69 |
+
editor,
|
70 |
+
<InspectorControls>
|
71 |
+
<div style={{ height: '10px' }}></div>
|
72 |
+
|
73 |
+
{ !blockParams.has_categories &&
|
74 |
+
<div dangerouslySetInnerHTML={{__html: message}}/>
|
75 |
+
}
|
76 |
+
</InspectorControls>
|
77 |
+
]);
|
78 |
+
},
|
79 |
+
|
80 |
+
save: function( props ) {
|
81 |
+
return false;
|
82 |
+
},
|
83 |
+
|
84 |
+
} );
|
85 |
+
|
86 |
+
}
|
js/gutenberg/category-page.jsx
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: my-block
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
import {EcwidIcons} from '../icons.js';
|
12 |
+
import { EcwidControls, EcwidInspectorSubheader, EcwidProductBrowserBlock } from '../includes/controls.js';
|
13 |
+
|
14 |
+
const { __, _x } = wp.i18n; // Import __() from wp.i18n
|
15 |
+
|
16 |
+
const ecwidIcons = EcwidIcons;
|
17 |
+
|
18 |
+
const {
|
19 |
+
registerBlockType,
|
20 |
+
} = wp.blocks;
|
21 |
+
|
22 |
+
const {
|
23 |
+
InspectorControls,
|
24 |
+
} = wp.editor;
|
25 |
+
|
26 |
+
const {
|
27 |
+
PanelBody,
|
28 |
+
BaseControl,
|
29 |
+
} = wp.components;
|
30 |
+
|
31 |
+
const blockName = 'ec-store/category-page';
|
32 |
+
|
33 |
+
const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
34 |
+
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Register: aa Gutenberg Block.
|
38 |
+
*
|
39 |
+
* Registers a new block provided a unique name and an object defining its
|
40 |
+
* behavior. Once registered, the block is made editor as an option to any
|
41 |
+
* editor interface where blocks are implemented.
|
42 |
+
*
|
43 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
44 |
+
* @param {string} name Block name.
|
45 |
+
* @param {Object} settings Block settings.
|
46 |
+
* @return {?WPBlock} The block, if it has been successfully
|
47 |
+
* registered; otherwise `undefined`.
|
48 |
+
*/
|
49 |
+
|
50 |
+
registerBlockType( 'ec-store/category-page', {
|
51 |
+
title: __( 'Store Category Page', 'ecwid-shopping-cart' ), // Block title.
|
52 |
+
icon: EcwidIcons.category,
|
53 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
54 |
+
attributes: EcwidGutenbergStoreBlockParams.attributes,
|
55 |
+
description: __( 'Display category page', 'ecwid-shopping-cart' ),
|
56 |
+
supports: {
|
57 |
+
customClassName: false,
|
58 |
+
className: false,
|
59 |
+
html: false,
|
60 |
+
multiple: false
|
61 |
+
},
|
62 |
+
|
63 |
+
/**
|
64 |
+
* The edit function describes the structure of your block in the context of the editor.
|
65 |
+
* This represents what the editor will render when the block is used.
|
66 |
+
*
|
67 |
+
* The "edit" property must be a valid function.
|
68 |
+
*
|
69 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
70 |
+
*/
|
71 |
+
edit: function( props ) {
|
72 |
+
|
73 |
+
const { attributes } = props;
|
74 |
+
|
75 |
+
// legacy reset
|
76 |
+
props.setAttributes({widgets:''});
|
77 |
+
|
78 |
+
const editor =
|
79 |
+
<EcwidProductBrowserBlock icon={ EcwidIcons.category } title={ __( 'Store Category Page', 'ecwid-shopping-cart' ) } showDemoButton={ blockParams.isDemoStore }>
|
80 |
+
<div className="ec-store-category-products">
|
81 |
+
<div className="ec-store-category-product1"></div>
|
82 |
+
<div className="ec-store-category-product2"></div>
|
83 |
+
<div className="ec-store-category-product3"></div>
|
84 |
+
</div>
|
85 |
+
<div className="ec-store-category-products">
|
86 |
+
<div className="ec-store-category-product4"></div>
|
87 |
+
<div className="ec-store-category-product5"></div>
|
88 |
+
<div className="ec-store-category-product6"></div>
|
89 |
+
</div>
|
90 |
+
</EcwidProductBrowserBlock>;
|
91 |
+
|
92 |
+
function buildDangerousHTMLMessageWithTitle( title, message ) {
|
93 |
+
return <BaseControl label={ title }><div dangerouslySetInnerHTML={{ __html: message }} /></BaseControl>;
|
94 |
+
}
|
95 |
+
|
96 |
+
const productMigrationWarning = buildDangerousHTMLMessageWithTitle(
|
97 |
+
'',
|
98 |
+
__( 'To improve the look and feel of your store and manage your storefront appearance here, please enable the “Next-gen look and feel of the product list on the storefront” option in your store dashboard (“<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings → What’s New</a>”).', 'ecwid-shopping-cart' )
|
99 |
+
);
|
100 |
+
|
101 |
+
const cartIconMessage = buildDangerousHTMLMessageWithTitle(
|
102 |
+
__( 'Display cart icon', 'ecwid-shopping-cart' ),
|
103 |
+
blockParams.customizeMinicartText
|
104 |
+
);
|
105 |
+
|
106 |
+
const isNewProductList = blockParams.isNewProductList;
|
107 |
+
const isNewDetailsPage = blockParams.isNewDetailsPage;
|
108 |
+
|
109 |
+
const controls = EcwidControls(blockParams.attributes, props);
|
110 |
+
|
111 |
+
return ([
|
112 |
+
editor,
|
113 |
+
<InspectorControls>
|
114 |
+
<div style={{height:"10px"}}></div>
|
115 |
+
{ !EcwidGutenbergParams.hasCategories &&
|
116 |
+
<div style={{margin:'10px'}}>
|
117 |
+
<a href="admin.php?page=ec-store-admin-category-id-0-mode-edit" target="_blank" class="button button-primary">{ __('Add categories', 'ecwid-shopping-cart') }</a>
|
118 |
+
</div>
|
119 |
+
}
|
120 |
+
{ EcwidGutenbergParams.hasCategories &&
|
121 |
+
[
|
122 |
+
!props.attributes.default_category_id &&
|
123 |
+
controls.select( 'default_category_id', __( 'Select category', 'ecwid-shopping-cart' ) ),
|
124 |
+
props.attributes.default_category_id &&
|
125 |
+
controls.select( 'default_category_id', __( 'Selected category', 'ecwid-shopping-cart' ) )
|
126 |
+
]
|
127 |
+
}
|
128 |
+
<PanelBody title={ __('Category List Appearance', 'ecwid-shopping-cart') } initialOpen={false}>
|
129 |
+
{ isNewProductList &&
|
130 |
+
[
|
131 |
+
controls.select('product_list_category_title_behavior'),
|
132 |
+
attributes.product_list_category_title_behavior !== 'SHOW_TEXT_ONLY' &&
|
133 |
+
[
|
134 |
+
controls.buttonGroup('product_list_category_image_size'),
|
135 |
+
controls.toolbar('product_list_category_image_aspect_ratio'),
|
136 |
+
]
|
137 |
+
]
|
138 |
+
}
|
139 |
+
{ !isNewProductList && productMigrationWarning }
|
140 |
+
</PanelBody>
|
141 |
+
|
142 |
+
<PanelBody title={ __( 'Product List Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
143 |
+
{ isNewProductList &&
|
144 |
+
[
|
145 |
+
controls.toggle( 'product_list_show_product_images' ),
|
146 |
+
attributes.product_list_show_product_images && [
|
147 |
+
controls.buttonGroup( 'product_list_image_size' ),
|
148 |
+
controls.toolbar( 'product_list_image_aspect_ratio' )
|
149 |
+
],
|
150 |
+
controls.toolbar( 'product_list_product_info_layout' ),
|
151 |
+
controls.select( 'product_list_title_behavior' ),
|
152 |
+
controls.select( 'product_list_price_behavior' ),
|
153 |
+
controls.select( 'product_list_sku_behavior' ),
|
154 |
+
controls.select( 'product_list_buybutton_behavior' ),
|
155 |
+
controls.toggle( 'product_list_show_additional_image_on_hover' ),
|
156 |
+
controls.toggle( 'product_list_show_frame' )
|
157 |
+
]
|
158 |
+
}
|
159 |
+
{ !isNewProductList && productMigrationWarning }
|
160 |
+
</PanelBody>
|
161 |
+
|
162 |
+
<PanelBody title={ __( 'Product Page Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
163 |
+
{ isNewDetailsPage &&
|
164 |
+
[
|
165 |
+
controls.select('product_details_layout'),
|
166 |
+
( attributes.product_details_layout === 'TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT'
|
167 |
+
|| attributes.product_details_layout === 'TWO_COLUMNS_SIDEBAR_ON_THE_LEFT' ) &&
|
168 |
+
controls.toggle('show_description_under_image'),
|
169 |
+
controls.toolbar('product_details_gallery_layout'),
|
170 |
+
EcwidInspectorSubheader( __('Product sidebar content', 'ecwid-shopping-cart') ),
|
171 |
+
controls.toggle('product_details_show_product_name'),
|
172 |
+
controls.toggle('product_details_show_breadcrumbs'),
|
173 |
+
controls.toggle('product_details_show_product_sku'),
|
174 |
+
controls.toggle('product_details_show_product_price'),
|
175 |
+
controls.toggle('product_details_show_qty'),
|
176 |
+
controls.toggle('product_details_show_number_of_items_in_stock'),
|
177 |
+
controls.toggle('product_details_show_in_stock_label'),
|
178 |
+
controls.toggle('product_details_show_wholesale_prices'),
|
179 |
+
controls.toggle('product_details_show_share_buttons'),
|
180 |
+
]
|
181 |
+
}
|
182 |
+
{ !isNewDetailsPage && productDetailsMigrationWarning }
|
183 |
+
</PanelBody>
|
184 |
+
<PanelBody title={ __( 'Store Navigation', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
185 |
+
{ controls.toggle( 'show_categories') }
|
186 |
+
{ controls.toggle( 'show_search') }
|
187 |
+
{ controls.toggle( 'show_breadcrumbs') }
|
188 |
+
{ isNewProductList && controls.toggle( 'show_footer_menu' ) }
|
189 |
+
{ controls.toggle( 'show_signin_link') }
|
190 |
+
{ controls.toggle( 'product_list_show_sort_viewas_options') }
|
191 |
+
{ cartIconMessage }
|
192 |
+
</PanelBody>
|
193 |
+
<PanelBody title={ __( 'Color settings', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
194 |
+
{ controls.color( 'chameleon_color_button' ) }
|
195 |
+
{ controls.color( 'chameleon_color_foreground' ) }
|
196 |
+
{ controls.color( 'chameleon_color_price' ) }
|
197 |
+
{ controls.color( 'chameleon_color_link' ) }
|
198 |
+
{ controls.color( 'chameleon_color_background' ) }
|
199 |
+
</PanelBody>
|
200 |
+
</InspectorControls>
|
201 |
+
]);
|
202 |
+
},
|
203 |
+
|
204 |
+
save: function( props ) {
|
205 |
+
return null;
|
206 |
+
},
|
207 |
+
} );
|
js/gutenberg/filters-page.jsx
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: my-block
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
import {EcwidIcons} from '../icons.js';
|
12 |
+
import { EcwidControls, EcwidProductBrowserBlock, EcwidImage } from '../includes/controls.js';
|
13 |
+
|
14 |
+
const { __, _x } = wp.i18n;
|
15 |
+
|
16 |
+
const {
|
17 |
+
registerBlockType,
|
18 |
+
} = wp.blocks;
|
19 |
+
|
20 |
+
const {
|
21 |
+
InspectorControls,
|
22 |
+
} = wp.editor;
|
23 |
+
|
24 |
+
const {
|
25 |
+
PanelBody,
|
26 |
+
PanelRow,
|
27 |
+
ToggleControl,
|
28 |
+
ButtonGroup,
|
29 |
+
Button,
|
30 |
+
BaseControl,
|
31 |
+
Toolbar,
|
32 |
+
ColorPalette,
|
33 |
+
ColorIndicator
|
34 |
+
} = wp.components;
|
35 |
+
|
36 |
+
const { withState } = wp.compose;
|
37 |
+
|
38 |
+
const blockName = 'ec-store/filters-page';
|
39 |
+
|
40 |
+
const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
41 |
+
/**
|
42 |
+
* Register: aa Gutenberg Block.
|
43 |
+
*
|
44 |
+
* Registers a new block provided a unique name and an object defining its
|
45 |
+
* behavior. Once registered, the block is made editor as an option to any
|
46 |
+
* editor interface where blocks are implemented.
|
47 |
+
*
|
48 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
49 |
+
* @param {string} name Block name.
|
50 |
+
* @param {Object} settings Block settings.
|
51 |
+
* @return {?WPBlock} The block, if it has been successfully
|
52 |
+
* registered; otherwise `undefined`.
|
53 |
+
*/
|
54 |
+
registerBlockType( 'ec-store/filters-page', {
|
55 |
+
title: __( 'Product Search and filters', 'ecwid-shopping-cart' ), // Block title.
|
56 |
+
icon: EcwidIcons.filters,
|
57 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
58 |
+
attributes: blockParams.attributes,
|
59 |
+
description: __( 'Display search page with filters on a side', 'ecwid-shopping-cart' ),
|
60 |
+
supports: {
|
61 |
+
customClassName: false,
|
62 |
+
className: false,
|
63 |
+
html: false,
|
64 |
+
multiple: false
|
65 |
+
},
|
66 |
+
|
67 |
+
/**
|
68 |
+
* The edit function describes the structure of your block in the context of the editor.
|
69 |
+
* This represents what the editor will render when the block is used.
|
70 |
+
*
|
71 |
+
* The "edit" property must be a valid function.
|
72 |
+
*
|
73 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
74 |
+
*/
|
75 |
+
edit: function( props ) {
|
76 |
+
|
77 |
+
const { attributes } = props;
|
78 |
+
|
79 |
+
const editor =
|
80 |
+
<EcwidProductBrowserBlock icon={ EcwidIcons.filters } title={ __( 'Search and Filters') }>
|
81 |
+
<EcwidImage src="filter-preview.png" />
|
82 |
+
</EcwidProductBrowserBlock>;
|
83 |
+
/* const editor =
|
84 |
+
<div className="ec-store-block ec-store-block-filters-page">
|
85 |
+
<div className="ec-store-block-header">
|
86 |
+
{ EcwidIcons.filters }
|
87 |
+
{ __( 'Filters Page', 'ecwid-shopping-cart' ) }
|
88 |
+
</div>
|
89 |
+
<div className="image">
|
90 |
+
</div>
|
91 |
+
{ blockParams.isDemoStore &&
|
92 |
+
<div>
|
93 |
+
<a className="button button-primary" href="admin.php?page=ec-store">{ __( 'Set up your store', 'ecwid-shopping-cart') }</a>
|
94 |
+
</div>
|
95 |
+
}
|
96 |
+
</div>
|
97 |
+
;*/
|
98 |
+
|
99 |
+
function buildDangerousHTMLMessageWithTitle( title, message ) {
|
100 |
+
return <BaseControl label={ title }><div dangerouslySetInnerHTML={{ __html: message }} /></BaseControl>;
|
101 |
+
}
|
102 |
+
|
103 |
+
const filtersDisabledMessage = buildDangerousHTMLMessageWithTitle(
|
104 |
+
'',
|
105 |
+
__( 'You can enable filters in the store settings: (“<a target="_blank" href="admin.php?page=ec-store-admin-product-filters-mode-main">Settings → Product Filters</a>”).', 'ecwid-shopping-cart' )
|
106 |
+
);
|
107 |
+
|
108 |
+
const productMigrationWarning = buildDangerousHTMLMessageWithTitle(
|
109 |
+
'',
|
110 |
+
__( 'To improve the look and feel of your store and manage your storefront appearance here, please enable the “Next-gen look and feel of the product list on the storefront” option in your store dashboard (“<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings → What’s New</a>”).', 'ecwid-shopping-cart' )
|
111 |
+
);
|
112 |
+
|
113 |
+
const isNewProductList = blockParams.isNewProductList;
|
114 |
+
|
115 |
+
const controls = EcwidControls(blockParams.attributes, props);
|
116 |
+
|
117 |
+
return ([
|
118 |
+
editor,
|
119 |
+
<InspectorControls>
|
120 |
+
<PanelBody title={ __( 'Filters', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
121 |
+
{ !blockParams.filtersEnabled && filtersDisabledMessage }
|
122 |
+
{ blockParams.filtersEnabled &&
|
123 |
+
[
|
124 |
+
controls.select( 'product_filters_position_search_page' )
|
125 |
+
]
|
126 |
+
}
|
127 |
+
</PanelBody>
|
128 |
+
|
129 |
+
<PanelBody title={ __( 'Product List Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
130 |
+
{ isNewProductList &&
|
131 |
+
[
|
132 |
+
controls.toggle( 'product_list_show_product_images' ),
|
133 |
+
attributes.product_list_show_product_images && [
|
134 |
+
controls.buttonGroup( 'product_list_image_size' ),
|
135 |
+
controls.toolbar( 'product_list_image_aspect_ratio' )
|
136 |
+
],
|
137 |
+
controls.toolbar( 'product_list_product_info_layout' ),
|
138 |
+
controls.select( 'product_list_title_behavior' ),
|
139 |
+
controls.select( 'product_list_price_behavior' ),
|
140 |
+
controls.select( 'product_list_sku_behavior' ),
|
141 |
+
controls.select( 'product_list_buybutton_behavior' ),
|
142 |
+
controls.toggle( 'product_list_show_additional_image_on_hover' ),
|
143 |
+
controls.toggle( 'product_list_show_frame' )
|
144 |
+
]
|
145 |
+
}
|
146 |
+
{ !isNewProductList && productMigrationWarning }
|
147 |
+
</PanelBody>
|
148 |
+
|
149 |
+
<PanelBody title={ __( 'Store Navigation', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
150 |
+
{ controls.toggle( 'show_categories') }
|
151 |
+
{ controls.toggle( 'show_breadcrumbs') }
|
152 |
+
{ isNewProductList && controls.toggle( 'show_footer_menu' ) }
|
153 |
+
{ controls.toggle( 'show_signin_link') }
|
154 |
+
{ controls.toggle( 'product_list_show_sort_viewas_options') }
|
155 |
+
</PanelBody>
|
156 |
+
|
157 |
+
<PanelBody title={ __( 'Color settings', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
158 |
+
{ controls.color( 'chameleon_color_button' ) }
|
159 |
+
{ controls.color( 'chameleon_color_foreground' ) }
|
160 |
+
{ controls.color( 'chameleon_color_price' ) }
|
161 |
+
{ controls.color( 'chameleon_color_link' ) }
|
162 |
+
{ controls.color( 'chameleon_color_background' ) }
|
163 |
+
</PanelBody>
|
164 |
+
</InspectorControls>
|
165 |
+
]);
|
166 |
+
},
|
167 |
+
|
168 |
+
save: function( props ) {
|
169 |
+
return null;
|
170 |
+
}
|
171 |
+
} );
|
js/gutenberg/product-page.jsx
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: my-block
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
import {EcwidIcons} from '../icons.js';
|
12 |
+
import { EcwidControls, EcwidInspectorSubheader, EcwidProductBrowserBlock, EcwidImage } from '../includes/controls.js';
|
13 |
+
|
14 |
+
const { __, _x } = wp.i18n;
|
15 |
+
|
16 |
+
const {
|
17 |
+
registerBlockType,
|
18 |
+
} = wp.blocks;
|
19 |
+
|
20 |
+
const {
|
21 |
+
InspectorControls,
|
22 |
+
} = wp.editor;
|
23 |
+
|
24 |
+
const {
|
25 |
+
PanelBody,
|
26 |
+
BaseControl
|
27 |
+
} = wp.components;
|
28 |
+
|
29 |
+
const { withState } = wp.compose;
|
30 |
+
|
31 |
+
const blockName = 'ec-store/product-page';
|
32 |
+
|
33 |
+
const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
34 |
+
/**
|
35 |
+
* Register: aa Gutenberg Block.
|
36 |
+
*
|
37 |
+
* Registers a new block provided a unique name and an object defining its
|
38 |
+
* behavior. Once registered, the block is made editor as an option to any
|
39 |
+
* editor interface where blocks are implemented.
|
40 |
+
*
|
41 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
42 |
+
* @param {string} name Block name.
|
43 |
+
* @param {Object} settings Block settings.
|
44 |
+
* @return {?WPBlock} The block, if it has been successfully
|
45 |
+
* registered; otherwise `undefined`.
|
46 |
+
*/
|
47 |
+
registerBlockType( 'ec-store/product-page', {
|
48 |
+
title: __( 'Product Card Large', 'ecwid-shopping-cart' ),
|
49 |
+
icon: EcwidIcons.product,
|
50 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
51 |
+
attributes: blockParams.attributes,
|
52 |
+
description: __( 'Display product page with description and a buy button', 'ecwid-shopping-cart' ),
|
53 |
+
supports: {
|
54 |
+
customClassName: false,
|
55 |
+
className: false,
|
56 |
+
html: false,
|
57 |
+
multiple: false
|
58 |
+
},
|
59 |
+
|
60 |
+
/**
|
61 |
+
* The edit function describes the structure of your block in the context of the editor.
|
62 |
+
* This represents what the editor will render when the block is used.
|
63 |
+
*
|
64 |
+
* The "edit" property must be a valid function.
|
65 |
+
*
|
66 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
67 |
+
*/
|
68 |
+
edit: function( props ) {
|
69 |
+
|
70 |
+
const { attributes } = props;
|
71 |
+
|
72 |
+
const saveCallback = function( params ) {
|
73 |
+
|
74 |
+
const attributes = {
|
75 |
+
'default_product_id': params.newProps.product.id
|
76 |
+
};
|
77 |
+
|
78 |
+
EcwidGutenbergParams.products[params.newProps.product.id] = {
|
79 |
+
name: params.newProps.product.name,
|
80 |
+
imageUrl: params.newProps.product.thumb
|
81 |
+
};
|
82 |
+
|
83 |
+
params.originalProps.setAttributes(attributes);
|
84 |
+
};
|
85 |
+
|
86 |
+
function openEcwidProductPopup( props ) {
|
87 |
+
ecwid_open_product_popup( { 'saveCallback': saveCallback, 'props': props } );
|
88 |
+
}
|
89 |
+
|
90 |
+
const editor =
|
91 |
+
<EcwidProductBrowserBlock icon={ EcwidIcons.product } title={ __( 'Product Card Large') }>
|
92 |
+
<EcwidImage src="product-page-preview.png" />
|
93 |
+
{ !attributes.default_product_id &&
|
94 |
+
|
95 |
+
<div className="button-container">
|
96 |
+
<button className="button ec-store-block-button" onClick={ () => { var params = {'saveCallback':saveCallback, 'props': props}; ecwid_open_product_popup( params ); } }>{ EcwidGutenbergParams.chooseProduct }</button>
|
97 |
+
</div>
|
98 |
+
}
|
99 |
+
</EcwidProductBrowserBlock>;
|
100 |
+
|
101 |
+
function buildDangerousHTMLMessageWithTitle( title, message ) {
|
102 |
+
return <BaseControl label={ title }><div dangerouslySetInnerHTML={{ __html: message }} /></BaseControl>;
|
103 |
+
}
|
104 |
+
|
105 |
+
const productMigrationWarning = buildDangerousHTMLMessageWithTitle(
|
106 |
+
'',
|
107 |
+
__( 'To improve the look and feel of your store and manage your storefront appearance here, please enable the “Next-gen look and feel of the product list on the storefront” option in your store dashboard (“<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings → What’s New</a>”).', 'ecwid-shopping-cart' )
|
108 |
+
);
|
109 |
+
|
110 |
+
const productDetailsMigrationWarning = buildDangerousHTMLMessageWithTitle(
|
111 |
+
'',
|
112 |
+
__( 'To improve the look and feel of your product page and manage your its appearance here, please enable the “Next-gen look and feel of the product page on the storefront” option in your store dashboard (“<a href="admin.php?page=ec-store&ec-store-page=whatsnew">Settings → What’s New</a>”).', 'ecwid-shopping-cart' )
|
113 |
+
);
|
114 |
+
|
115 |
+
const isNewDetailsPage = blockParams.isNewDetailsPage;
|
116 |
+
|
117 |
+
const controls = EcwidControls(blockParams.attributes, props);
|
118 |
+
|
119 |
+
return ([
|
120 |
+
editor,
|
121 |
+
<InspectorControls>
|
122 |
+
{attributes.default_product_id > 0 &&
|
123 |
+
<div>
|
124 |
+
<div className="ec-store-inspector-row">
|
125 |
+
<label className="ec-store-inspector-subheader">{ __( 'Linked product', 'ecwid-shopping-cart' ) }</label>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
<div className="ec-store-inspector-row">
|
129 |
+
|
130 |
+
{ EcwidGutenbergParams.products && EcwidGutenbergParams.products[attributes.default_product_id] &&
|
131 |
+
<label>{ EcwidGutenbergParams.products[attributes.default_product_id].name }</label>
|
132 |
+
}
|
133 |
+
|
134 |
+
<button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Change', 'ecwid-shopping-cart' ) }</button>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
}
|
138 |
+
{!attributes.default_product_id &&
|
139 |
+
<div className="ec-store-inspector-row">
|
140 |
+
<button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Choose product', 'ecwid-shopping-cart' ) }</button>
|
141 |
+
</div>
|
142 |
+
}
|
143 |
+
|
144 |
+
<PanelBody title={ __( 'Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
145 |
+
{ isNewDetailsPage &&
|
146 |
+
[
|
147 |
+
controls.select('product_details_layout'),
|
148 |
+
( attributes.product_details_layout === 'TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT'
|
149 |
+
|| attributes.product_details_layout === 'TWO_COLUMNS_SIDEBAR_ON_THE_LEFT' ) &&
|
150 |
+
controls.toggle('show_description_under_image'),
|
151 |
+
controls.toolbar('product_details_gallery_layout'),
|
152 |
+
EcwidInspectorSubheader( __('Product sidebar content', 'ecwid-shopping-cart') ),
|
153 |
+
controls.toggle('product_details_show_product_name'),
|
154 |
+
controls.toggle('product_details_show_breadcrumbs'),
|
155 |
+
controls.toggle('product_details_show_product_sku'),
|
156 |
+
controls.toggle('product_details_show_product_price'),
|
157 |
+
controls.toggle('product_details_show_qty'),
|
158 |
+
controls.toggle('product_details_show_number_of_items_in_stock'),
|
159 |
+
controls.toggle('product_details_show_in_stock_label'),
|
160 |
+
controls.toggle('product_details_show_wholesale_prices'),
|
161 |
+
controls.toggle('product_details_show_share_buttons'),
|
162 |
+
]
|
163 |
+
}
|
164 |
+
{ !isNewDetailsPage && productMigrationWarning }
|
165 |
+
</PanelBody>
|
166 |
+
<PanelBody title={ __( 'Color settings', 'ecwid-shopping-cart' ) } initialOpen={false}>
|
167 |
+
{ controls.color( 'chameleon_color_button' ) }
|
168 |
+
{ controls.color( 'chameleon_color_foreground' ) }
|
169 |
+
{ controls.color( 'chameleon_color_price' ) }
|
170 |
+
{ controls.color( 'chameleon_color_link' ) }
|
171 |
+
{ controls.color( 'chameleon_color_background' ) }
|
172 |
+
</PanelBody>
|
173 |
+
</InspectorControls>
|
174 |
+
]);
|
175 |
+
},
|
176 |
+
|
177 |
+
save: function( props ) {
|
178 |
+
return null;
|
179 |
+
}
|
180 |
+
} );
|
js/gutenberg/search.jsx
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Import CSS.
|
2 |
+
import './style.scss';
|
3 |
+
import './editor.scss';
|
4 |
+
import {EcwidIcons} from '../icons.js';
|
5 |
+
|
6 |
+
if ( !EcwidGutenbergParams.isDemoStore ) {
|
7 |
+
|
8 |
+
const { __, _x } = wp.i18n; // Import __() from wp.i18n
|
9 |
+
|
10 |
+
const {
|
11 |
+
registerBlockType,
|
12 |
+
} = wp.blocks;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Register: aa Gutenberg Block.
|
16 |
+
*
|
17 |
+
* Registers a new block provided a unique name and an object defining its
|
18 |
+
* behavior. Once registered, the block is made editor as an option to any
|
19 |
+
* editor interface where blocks are implemented.
|
20 |
+
*
|
21 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
22 |
+
* @param {string} name Block name.
|
23 |
+
* @param {Object} settings Block settings.
|
24 |
+
* @return {?WPBlock} The block, if it has been successfully
|
25 |
+
* registered; otherwise `undefined`.
|
26 |
+
*/
|
27 |
+
registerBlockType( 'ec-store/search', {
|
28 |
+
title: __( 'Product Search Box', 'ecwid-shopping-cart' ),
|
29 |
+
icon: EcwidIcons.search,
|
30 |
+
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
31 |
+
description: __( 'Display search box', 'ecwid-shopping-cart' ),
|
32 |
+
supports: {
|
33 |
+
customClassName: false,
|
34 |
+
className: false,
|
35 |
+
html: false,
|
36 |
+
isPrivate: !EcwidGutenbergParams.isApiAvailable
|
37 |
+
},
|
38 |
+
|
39 |
+
/**
|
40 |
+
* The edit function describes the structure of your block in the context of the editor.
|
41 |
+
* This represents what the editor will render when the block is used.
|
42 |
+
*
|
43 |
+
* The "edit" property must be a valid function.
|
44 |
+
*
|
45 |
+
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
46 |
+
*/
|
47 |
+
edit: function( props ) {
|
48 |
+
|
49 |
+
const { attributes } = props;
|
50 |
+
|
51 |
+
const editor = <div className="ec-store-block ec-store-block-search">
|
52 |
+
<div class="image"></div>
|
53 |
+
</div>;
|
54 |
+
|
55 |
+
return ([
|
56 |
+
editor
|
57 |
+
]);
|
58 |
+
},
|
59 |
+
|
60 |
+
save: function( props ) {
|
61 |
+
return false;
|
62 |
+
},
|
63 |
+
|
64 |
+
} );
|
65 |
+
|
66 |
+
}
|
js/gutenberg/store.jsx
CHANGED
@@ -51,8 +51,8 @@ const blockParams = EcwidGutenbergParams.blockParams[blockName];
|
|
51 |
* @return {?WPBlock} The block, if it has been successfully
|
52 |
* registered; otherwise `undefined`.
|
53 |
*/
|
54 |
-
registerBlockType(
|
55 |
-
title:
|
56 |
icon: EcwidIcons.store,
|
57 |
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
58 |
attributes: blockParams.attributes,
|
51 |
* @return {?WPBlock} The block, if it has been successfully
|
52 |
* registered; otherwise `undefined`.
|
53 |
*/
|
54 |
+
registerBlockType( 'ecwid/store-block', {
|
55 |
+
title: _x( 'Store Home Page', 'ecwid-shopping-cart' ), // Block title.
|
56 |
icon: EcwidIcons.store,
|
57 |
category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
58 |
attributes: blockParams.attributes,
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ecwid
|
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.1
|
6 |
-
Stable tag: 6.5.
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
@@ -150,6 +150,9 @@ You can use Ecwid’s built-in import tools to copy your store products from any
|
|
150 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
151 |
|
152 |
== Changelog ==
|
|
|
|
|
|
|
153 |
= 6.5.1 - Mar 28, 2019 =
|
154 |
- Fixed a minor appearance issue in the Ecwid e-commerce blocks in Gutenberg.
|
155 |
|
3 |
Tags: ecommerce, e-commerce, storefront, online store, sell
|
4 |
Requires at least: 3.7
|
5 |
Tested up to: 5.1
|
6 |
+
Stable tag: 6.5.2
|
7 |
|
8 |
Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
|
9 |
|
150 |
* [Ecwid eCommerce Forums](https://www.ecwid.com/forums/forumdisplay.php?f=19)
|
151 |
|
152 |
== Changelog ==
|
153 |
+
= 6.5.2 - Apr 3, 2019 =
|
154 |
+
- Minor fixes and improvements.
|
155 |
+
|
156 |
= 6.5.1 - Mar 28, 2019 =
|
157 |
- Fixed a minor appearance issue in the Ecwid e-commerce blocks in Gutenberg.
|
158 |
|
templates/admin-head.php
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
-
<div class="head"
|
|
|
|
|
|
|
|
|
|
|
2 |
<h3>
|
3 |
<?php printf( __( '%s', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
4 |
</h3>
|
1 |
+
<div class="head">
|
2 |
+
<?php
|
3 |
+
if( !Ecwid_Config::is_wl() ) {
|
4 |
+
ecwid_embed_svg( 'ecwid-logo-blue' );
|
5 |
+
}
|
6 |
+
?>
|
7 |
<h3>
|
8 |
<?php printf( __( '%s', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
9 |
</h3>
|
templates/admin/simple-dashboard.php
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
<div class="wrap ecwid-admin ecwid-dashboard">
|
2 |
<div class="ec-store-box">
|
3 |
<div class="head">
|
4 |
-
<?php
|
|
|
|
|
|
|
|
|
5 |
<h3>
|
6 |
<?php printf( __( '%s Shopping Cart', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
7 |
</h3>
|
1 |
<div class="wrap ecwid-admin ecwid-dashboard">
|
2 |
<div class="ec-store-box">
|
3 |
<div class="head">
|
4 |
+
<?php
|
5 |
+
if( !Ecwid_Config::is_wl() ) {
|
6 |
+
ecwid_embed_svg( 'ecwid-logo-blue' );
|
7 |
+
}
|
8 |
+
?>
|
9 |
<h3>
|
10 |
<?php printf( __( '%s Shopping Cart', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ); ?>
|
11 |
</h3>
|