Ecwid Ecommerce Shopping Cart - Version 6.4.8

Version Description

  • Dec 26, 2018 =
  • Improved settings interface for the "Product" block in Gutenberg (the new WordPress page editor). You can add a single product to any of your pages or posts using the Ecwid ecommerce "Product" block and fine-tune its layout in the block settings on the right side in the editor.
  • Resolved a minor layout issue caused by the Embed Any Document plugin. The Embed Any Document plugin adds a breaking CSS code to the Wordpress admin backend which caused some of the Ecwid plugin admin pages display incorreclty. We fixed that, the plugins are now compatible.
  • SEO enhancement: improved canonical tags for the sites that display different store categories on different site pages. In such case, the canonical tags on products and categories pages will keep the pages structure as is (link to the page that they are opened from). Otherwise, if you have one main store page displaying the whole catalog, the product/categories canonical tags will link to the main store page to avoid duplicates issues and make your e-commerce store appear better in the Google search results.
  • Minor improvements for the Ecwid admin backend pages navigation.
Download this release

Release Info

Developer Ecwid
Plugin Icon 128x128 Ecwid Ecommerce Shopping Cart
Version 6.4.8
Comparing to
See all releases

Code changes from version 6.4.7 to 6.4.8

css/admin.css CHANGED
@@ -354,13 +354,13 @@ body[class*="_page_ecwid"] .ecwid-message {
354
  margin-bottom: 28px;
355
  }
356
 
357
- .ecwid-reconnect-allow-sso.ecwid-connect .box .connect-button a {
358
  text-align: center;
359
  white-space: nowrap;
360
  width:auto;
361
  }
362
 
363
- .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
364
  font-size: 16px;
365
  line-height: 1.50em;
366
  color: #444;
@@ -430,7 +430,7 @@ body[class*="_page_ecwid"] .ecwid-message {
430
  margin-bottom: 14px;
431
  }
432
 
433
- .ecwid-reconnect-allow-sso.ecwid-connect .box .note {
434
  margin-bottom: 20px;
435
  }
436
  }
@@ -491,7 +491,7 @@ body[class*="_page_ecwid"] .ecwid-message {
491
  }
492
  }
493
 
494
- .ecwid-admin-timeout .box {
495
  margin: 20px auto;
496
  border: 2px solid #ed917d;
497
  min-width: 290px;
@@ -502,25 +502,25 @@ body[class*="_page_ecwid"] .ecwid-message {
502
  font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
503
  }
504
 
505
- .ecwid-admin-timeout .box .logo {
506
  width: auto;
507
  height: 65px;
508
  }
509
- .ecwid-admin-timeout .box .logo svg {
510
  max-height: 65px;
511
  }
512
 
513
- .ecwid-admin-timeout .box .logo svg path {
514
  fill: #ed917d;
515
  }
516
 
517
- .ecwid-admin-timeout .box .title {
518
  text-align: center;
519
  font-size: 18px;
520
  padding: 15px 0 5px;
521
  }
522
 
523
- .ecwid-admin-timeout .box .text {
524
  text-align: center;
525
  font-size: 14px;
526
  line-height: 24px;
354
  margin-bottom: 28px;
355
  }
356
 
357
+ .ecwid-reconnect-allow-sso.ecwid-connect .ec-store-box .connect-button a {
358
  text-align: center;
359
  white-space: nowrap;
360
  width:auto;
361
  }
362
 
363
+ .ecwid-reconnect-allow-sso.ecwid-connect .ec-store-box .note {
364
  font-size: 16px;
365
  line-height: 1.50em;
366
  color: #444;
430
  margin-bottom: 14px;
431
  }
432
 
433
+ .ecwid-reconnect-allow-sso.ecwid-connect .ec-store-box .note {
434
  margin-bottom: 20px;
435
  }
436
  }
491
  }
492
  }
493
 
494
+ .ecwid-admin-timeout .ec-store-box {
495
  margin: 20px auto;
496
  border: 2px solid #ed917d;
497
  min-width: 290px;
502
  font-family: Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;
503
  }
504
 
505
+ .ecwid-admin-timeout .ec-store-box .logo {
506
  width: auto;
507
  height: 65px;
508
  }
509
+ .ecwid-admin-timeout .ec-store-box .logo svg {
510
  max-height: 65px;
511
  }
512
 
513
+ .ecwid-admin-timeout .ec-store-box .logo svg path {
514
  fill: #ed917d;
515
  }
516
 
517
+ .ecwid-admin-timeout .ec-store-box .title {
518
  text-align: center;
519
  font-size: 18px;
520
  padding: 15px 0 5px;
521
  }
522
 
523
+ .ecwid-admin-timeout .ec-store-box .text {
524
  text-align: center;
525
  font-size: 14px;
526
  line-height: 24px;
css/gutenberg/blocks.editor.build.css CHANGED
@@ -1,2 +1,2 @@
1
- .components-toolbar__control.components-button:not(:disabled).is-active>svg rect{fill:white}.components-toolbar__control.components-button.ecwid-toolbar-icon>svg{padding:0}.ecwid-store-block-icon{background:url("../images/wordpress_20x20.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-store-block{position:relative}.ecwid-store-block-button{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;position:relative;top:135px;font-size:14px}.ecwid-product-block-icon{background:url("../images/gutenberg-block-product.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-block{text-align:center;font-size:13px;font-family:'Open Sans';padding:1em;background-color:#f8f9f9;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:220px}.ecwid-block>div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.ecwid-block .ecwid-block-header{font-weight:600;margin-bottom:1em}.ecwid-block .ecwid-block-header svg{max-height:20px;margin-right:1ch}.ecwid-block .ecwid-store-block-icon,.ecwid-block .ecwid-product-block-icon{margin-right:10px}.ecwid-block .ecwid-block-image{height:90px;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.ecwid-block .ecwid-block-image img{width:auto;max-height:100%;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1)}.ecwid-block .ecwid-block-title{margin-top:11px;margin-bottom:1em}.ecwid-block .ecwid-block-button{font-weight:400}.ecwid-selected-product{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif}.ecwid-selected-product>div{display:table-cell}.ecwid-selected-product .ecwid-selected-product-image img{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1)}.ecwid-selected-product .ecwid-selected-product-image{padding-right:25px;vertical-align:top}.ecwid-selected-product .ecwid-selected-product-details{vertical-align:middle}.ecwid-selected-product .ecwid-selected-product-name{font-size:20px;font-weight:600;margin-bottom:0.5em}.ecwid-selected-product .ecwid-selected-product-sku{font-size:16px;margin-bottom:1em}.media-frame-content.has-selected-product form,.media-frame-content.has-selected-product .products,.media-frame-content.has-selected-product .tablenav{display:none}#ecwid-product-popup-content .media-frame-content.ecwid-selected-product{padding-left:20px;padding-top:40px}.ecwid-store-block-icon{background:url("../images/wordpress_20x20.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-store-block{position:relative}.ecwid-store-block-button{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;position:relative;top:135px;font-size:14px}.ecwid-product-block-icon{background:url("../../images/gutenberg-block-product.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ec-store-block{text-align:center;font-size:13px;font-family:'Open Sans';padding:1em;background-color:#f8f9f9;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:220px}.ec-store-block>div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.ec-store-block .ec-store-block-header{font-weight:600;margin-bottom:1em}.ec-store-block .ec-store-block-header svg{max-height:20px;margin-right:1ch}.ec-store-block .ec-store-store-block-icon,.ec-store-block .ec-store-product-block-icon{margin-right:10px}.ec-store-block .ec-store-block-image{height:90px;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.ec-store-block .ec-store-block-image img{width:auto;max-height:100%;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1)}.ec-store-block .ec-store-block-title{margin-top:11px;margin-bottom:1em}.ec-store-block .ec-store-block-button{font-weight:400}.ec-store-color-picker .component-color-indicator{vertical-align:text-bottom}.ec-store-color-picker .components-color-palette{margin-top:.6rem}.ec-store-inspector-subheader{color:#555d66;font-weight:600;padding:15px 0}
2
  .wp-block-cgb-block-my-block2{background:#bada55;border:0.2rem solid #292929;color:#292929;margin:0 auto;max-width:740px;padding:2rem}
1
+ .components-toolbar__control.components-button:not(:disabled).is-active>svg rect{fill:white}.components-toolbar__control.components-button.ecwid-toolbar-icon>svg{padding:0}.ecwid-store-block-icon{background:url("../images/wordpress_20x20.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-store-block{position:relative}.ecwid-store-block-button{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;position:relative;top:135px;font-size:14px}.ecwid-product-block-icon{background:url("../images/gutenberg-block-product.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-block{text-align:center;font-size:13px;font-family:'Open Sans';padding:1em;background-color:#f8f9f9;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:220px}.ecwid-block>div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.ecwid-block .ecwid-block-header{font-weight:600;margin-bottom:1em}.ecwid-block .ecwid-block-header svg{max-height:20px;margin-right:1ch}.ecwid-block .ecwid-store-block-icon,.ecwid-block .ecwid-product-block-icon{margin-right:10px}.ecwid-block .ecwid-block-image{height:90px;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.ecwid-block .ecwid-block-image img{width:auto;max-height:100%;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1)}.ecwid-block .ecwid-block-title{margin-top:11px;margin-bottom:1em}.ecwid-block .ecwid-block-button{font-weight:400}.ecwid-selected-product{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif}.ecwid-selected-product>div{display:table-cell}.ecwid-selected-product .ecwid-selected-product-image img{-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1)}.ecwid-selected-product .ecwid-selected-product-image{padding-right:25px;vertical-align:top}.ecwid-selected-product .ecwid-selected-product-details{vertical-align:middle}.ecwid-selected-product .ecwid-selected-product-name{font-size:20px;font-weight:600;margin-bottom:0.5em}.ecwid-selected-product .ecwid-selected-product-sku{font-size:16px;margin-bottom:1em}.media-frame-content.has-selected-product form,.media-frame-content.has-selected-product .products,.media-frame-content.has-selected-product .tablenav{display:none}#ecwid-product-popup-content .media-frame-content.ecwid-selected-product{padding-left:20px;padding-top:40px}.ecwid-store-block-icon{background:url("../images/wordpress_20x20.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ecwid-store-block{position:relative}.ecwid-store-block-button{font-family:Open Sans, Trebuchet MS, Helvetica, Verdana, sans-serif;position:relative;top:135px;font-size:14px}.ecwid-product-block-icon{background:url("../../images/gutenberg-block-product.svg");background-size:contain;width:20px;height:20px;margin-bottom:3px}.ec-store-block{text-align:center;font-size:13px;font-family:'Open Sans';padding:1em;background-color:#f8f9f9;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:220px}.ec-store-block>div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.ec-store-block .ec-store-block-header{font-weight:600;margin-bottom:1em}.ec-store-block .ec-store-block-header svg{max-height:20px;margin-right:1ch}.ec-store-block .ec-store-store-block-icon,.ec-store-block .ec-store-product-block-icon{margin-right:10px}.ec-store-block .ec-store-block-image{height:90px;background-repeat:no-repeat;background-size:contain;background-position:50% 50%}.ec-store-block .ec-store-block-image img{width:auto;max-height:100%;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);box-shadow:0 2px 5px 0 rgba(0,0,0,0.1);-o-object-fit:cover;object-fit:cover}.ec-store-block .ec-store-block-title{margin-top:11px;margin-bottom:1em}.ec-store-block .ec-store-block-button{font-weight:400}.ec-store-color-picker .component-color-indicator{vertical-align:text-bottom}.ec-store-color-picker .components-color-palette{margin-top:.6rem}.ec-store-inspector-row{-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ec-store-inspector-row label,.ec-store-inspector-row button{display:block}.ec-store-inspector-subheader{color:#191e23;font-weight:600;cursor:default}.ec-store-inspector-row{margin:15px 0}
2
  .wp-block-cgb-block-my-block2{background:#bada55;border:0.2rem solid #292929;color:#292929;margin:0 auto;max-width:740px;padding:2rem}
css/gutenberg/editor.scss CHANGED
@@ -219,6 +219,7 @@
219
  -webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
220
  -moz-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
221
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
 
222
  }
223
 
224
  .ec-store-block .ec-store-block-title {
@@ -238,8 +239,24 @@
238
  margin-top: .6rem;
239
  }
240
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  .ec-store-inspector-subheader {
242
- color: #555d66;
243
  font-weight: 600;
244
- padding: 15px 0;
 
 
 
 
245
  }
219
  -webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
220
  -moz-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
221
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.1);
222
+ object-fit: cover;
223
  }
224
 
225
  .ec-store-block .ec-store-block-title {
239
  margin-top: .6rem;
240
  }
241
 
242
+ .ec-store-inspector-row {
243
+ justify-content: space-between;
244
+ display: flex;
245
+ align-items: center;
246
+ }
247
+
248
+ .ec-store-inspector-row label,
249
+ .ec-store-inspector-row button
250
+ {
251
+ display: block;
252
+ }
253
+
254
  .ec-store-inspector-subheader {
255
+ color: #191e23;
256
  font-weight: 600;
257
+ cursor: default;
258
+ }
259
+
260
+ .ec-store-inspector-row {
261
+ margin: 15px 0;
262
  }
css/product-popup.css CHANGED
@@ -5951,6 +5951,19 @@ body, html {
5951
  visibility: visible;
5952
  }
5953
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5954
  @media only screen and (max-width: 640px) {
5955
  #ecwid-product-popup-content .note.pb-note {
5956
  text-align: left;
5951
  visibility: visible;
5952
  }
5953
 
5954
+ #ecwid-product-popup-content.gutenberg .media-frame-menu,
5955
+ #ecwid-product-popup-content.gutenberg .toolbar-link.customize-appearance,
5956
+ #ecwid-product-popup-content.gutenberg .toolbar-link.add-product {
5957
+ display: none !important;
5958
+ }
5959
+
5960
+ #ecwid-product-popup-content.gutenberg .media-frame-toolbar,
5961
+ #ecwid-product-popup-content.gutenberg .media-frame-content,
5962
+ #ecwid-product-popup-content.gutenberg .media-frame-title {
5963
+ left: 0;
5964
+ }
5965
+
5966
+
5967
  @media only screen and (max-width: 640px) {
5968
  #ecwid-product-popup-content .note.pb-note {
5969
  text-align: left;
css/settings.css CHANGED
@@ -299,7 +299,7 @@ display: none;
299
  .ecwid-admin {
300
  margin-left: 20px;
301
  }
302
- .ecwid-admin div.box {
303
  position: relative;
304
  margin-top: 25px;
305
 
@@ -339,7 +339,7 @@ display: none;
339
  height: 70px;
340
  }
341
 
342
- .ecwid-admin .box .head {
343
  text-align: left;
344
  margin-bottom: 20px;
345
  }
@@ -356,31 +356,31 @@ display: none;
356
 
357
 
358
  /* CONNECT - positioning */
359
- .ecwid-connect .box > div {
360
  margin: 0px auto;
361
  text-align: center;
362
  }
363
 
364
- .ecwid-connect .box h3 + div {
365
  margin-top: 40px;
366
  }
367
 
368
- .ecwid-connect .box div:last-child {
369
  margin-bottom: 40px;
370
  }
371
 
372
- .ecwid-connect .box .greeting-message {
373
  margin-top: 11px;
374
  line-height: 1.3em;
375
  margin-bottom: 38px;
376
  }
377
 
378
 
379
- .ecwid-connect.ecwid-reconnect .box .greeting-message {
380
  margin-bottom: 15px;
381
  }
382
 
383
- .ecwid-connect .box .connect-button {
384
  margin-top: 8px;
385
  margin-bottom: 15px;
386
  }
@@ -389,28 +389,28 @@ display: none;
389
  margin-bottom: 0;
390
  }
391
 
392
- .ecwid-connect .box .note {
393
  margin-top: 6px;
394
  max-width: 760px;
395
  font-size: 13px;
396
  }
397
 
398
- .ecwid-connect .box .note.reconnect-message {
399
  margin-bottom: 38px;
400
  color: #707070;
401
  }
402
- .ecwid-connect .box .create-account-link {
403
  margin-top: 35px;
404
  }
405
 
406
 
407
  /* CONNECT - styles */
408
- .ecwid-connect .box .greeting-message {
409
  font-size: 24px;
410
  font-weight: lighter;
411
  }
412
 
413
- .ecwid-connect .box .connect-button a {
414
  padding: 14px 40px;
415
  border: 0px none;
416
  border-radius: 4px;
@@ -427,20 +427,20 @@ display: none;
427
  white-space: nowrap;
428
  }
429
 
430
- .ecwid-connect .box .connect-button a:hover {
431
  background: #64A52F;
432
  }
433
 
434
- .ecwid-connect .box .note {
435
  color: #A0A0A0;
436
  line-height: 18px;
437
  max-width: 400px;
438
  }
439
 
440
- .ecwid-connect .box .note.initial {
441
  }
442
 
443
- .ecwid-connect .box .note.auth-error {
444
  max-width: 350px;
445
  color: red;
446
  }
@@ -466,7 +466,7 @@ display: none;
466
  font-family: 'Open Sans';
467
  }
468
 
469
- .ecwid-connect .box .create-account-link a {
470
  text-decoration: none;
471
  font-size: 14px;
472
  }
@@ -685,7 +685,7 @@ display: none;
685
  margin: 0px;
686
  }
687
 
688
- .ecwid-popup .box {
689
  margin: 0px;
690
  position: absolute;
691
  left: 0;
299
  .ecwid-admin {
300
  margin-left: 20px;
301
  }
302
+ .ecwid-admin div.ec-store-box {
303
  position: relative;
304
  margin-top: 25px;
305
 
339
  height: 70px;
340
  }
341
 
342
+ .ecwid-admin .ec-store-box .head {
343
  text-align: left;
344
  margin-bottom: 20px;
345
  }
356
 
357
 
358
  /* CONNECT - positioning */
359
+ .ecwid-connect .ec-store-box > div {
360
  margin: 0px auto;
361
  text-align: center;
362
  }
363
 
364
+ .ecwid-connect .ec-store-box h3 + div {
365
  margin-top: 40px;
366
  }
367
 
368
+ .ecwid-connect .ec-store-box div:last-child {
369
  margin-bottom: 40px;
370
  }
371
 
372
+ .ecwid-connect .ec-store-box .greeting-message {
373
  margin-top: 11px;
374
  line-height: 1.3em;
375
  margin-bottom: 38px;
376
  }
377
 
378
 
379
+ .ecwid-connect.ecwid-reconnect .ec-store-box .greeting-message {
380
  margin-bottom: 15px;
381
  }
382
 
383
+ .ecwid-connect .ec-store-box .connect-button {
384
  margin-top: 8px;
385
  margin-bottom: 15px;
386
  }
389
  margin-bottom: 0;
390
  }
391
 
392
+ .ecwid-connect .ec-store-box .note {
393
  margin-top: 6px;
394
  max-width: 760px;
395
  font-size: 13px;
396
  }
397
 
398
+ .ecwid-connect .ec-store-box .note.reconnect-message {
399
  margin-bottom: 38px;
400
  color: #707070;
401
  }
402
+ .ecwid-connect .ec-store-box .create-account-link {
403
  margin-top: 35px;
404
  }
405
 
406
 
407
  /* CONNECT - styles */
408
+ .ecwid-connect .ec-store-box .greeting-message {
409
  font-size: 24px;
410
  font-weight: lighter;
411
  }
412
 
413
+ .ecwid-connect .ec-store-box .connect-button a {
414
  padding: 14px 40px;
415
  border: 0px none;
416
  border-radius: 4px;
427
  white-space: nowrap;
428
  }
429
 
430
+ .ecwid-connect .ec-store-box .connect-button a:hover {
431
  background: #64A52F;
432
  }
433
 
434
+ .ecwid-connect .ec-store-box .note {
435
  color: #A0A0A0;
436
  line-height: 18px;
437
  max-width: 400px;
438
  }
439
 
440
+ .ecwid-connect .ec-store-box .note.initial {
441
  }
442
 
443
+ .ecwid-connect .ec-store-box .note.auth-error {
444
  max-width: 350px;
445
  color: red;
446
  }
466
  font-family: 'Open Sans';
467
  }
468
 
469
+ .ecwid-connect .ec-store-box .create-account-link a {
470
  text-decoration: none;
471
  font-size: 14px;
472
  }
685
  margin: 0px;
686
  }
687
 
688
+ .ecwid-popup .ec-store-box {
689
  margin: 0px;
690
  position: absolute;
691
  left: 0;
ecwid-shopping-cart.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.ecwid.com?source=wporg
5
  Description: Ecwid is a free full-featured shopping cart. It can be easily integrated with any Wordpress blog and takes less than 5 minutes to set up.
6
  Text Domain: ecwid-shopping-cart
7
  Author: Ecwid Ecommerce
8
- Version: 6.4.7
9
  Author URI: https://ecwid.to/ecwid-site
10
  */
11
 
@@ -681,6 +681,9 @@ function ecwid_check_version()
681
 
682
  // Since 6.4.x
683
  add_option( EcwidPlatform::OPTION_LOG_CACHE );
 
 
 
684
 
685
  do_action( 'ecwid_on_plugin_update' );
686
 
@@ -1126,9 +1129,11 @@ function ecwid_product_browser_url_in_head() {
1126
 
1127
  function ecwid_canonical() {
1128
 
 
 
1129
  $link = false;
1130
  if ( ecwid_is_applicable_escaped_fragment() ) {
1131
-
1132
  $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
1133
 
1134
  if ($params['mode'] == 'product') {
@@ -1139,6 +1144,7 @@ function ecwid_canonical() {
1139
  $link = ecwid_get_category_url($category);
1140
  }
1141
  } else if ( Ecwid_Seo_Links::is_product_browser_url() ) {
 
1142
  $params = Ecwid_Seo_Links::maybe_extract_html_catalog_params();
1143
 
1144
  if ($params) {
@@ -1161,7 +1167,18 @@ function ecwid_canonical() {
1161
  return;
1162
  }
1163
 
1164
- if ($link) {
 
 
 
 
 
 
 
 
 
 
 
1165
  echo '<link rel="canonical" href="' . esc_attr($link) . '" />' . PHP_EOL;
1166
  }
1167
  }
@@ -1984,6 +2001,13 @@ function ecwid_get_update_params_options() {
1984
 
1985
  'ecwid_api_status' => array(
1986
  'type' => 'string'
 
 
 
 
 
 
 
1987
  )
1988
  );
1989
 
@@ -2413,11 +2437,7 @@ function ecwid_admin_do_page( $page ) {
2413
  if ( $page == Ecwid_Admin_Main_Page::PAGE_HASH_UPGRADE ) {
2414
  update_option('ecwid_api_check_time', time() - ECWID_API_AVAILABILITY_CHECK_TIME + 10 * 60);
2415
  }
2416
-
2417
- if ($page == 'dashboard') {
2418
- $show_reconnect = true;
2419
- }
2420
-
2421
  $time = time() - get_option('ecwid_time_correction', 0);
2422
 
2423
  $iframe_src = ecwid_get_iframe_src($time, $page);
@@ -2469,6 +2489,7 @@ function ecwid_admin_do_page( $page ) {
2469
  require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
2470
  }
2471
  } else {
 
2472
  require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
2473
  }
2474
  }
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.4.8
9
  Author URI: https://ecwid.to/ecwid-site
10
  */
11
 
681
 
682
  // Since 6.4.x
683
  add_option( EcwidPlatform::OPTION_LOG_CACHE );
684
+
685
+ // Since 6.5
686
+ add_option( 'ecwid_hide_canonical', false );
687
 
688
  do_action( 'ecwid_on_plugin_update' );
689
 
1129
 
1130
  function ecwid_canonical() {
1131
 
1132
+ if ( get_option( 'ecwid_hide_canonical', false ) ) return;
1133
+
1134
  $link = false;
1135
  if ( ecwid_is_applicable_escaped_fragment() ) {
1136
+
1137
  $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
1138
 
1139
  if ($params['mode'] == 'product') {
1144
  $link = ecwid_get_category_url($category);
1145
  }
1146
  } else if ( Ecwid_Seo_Links::is_product_browser_url() ) {
1147
+
1148
  $params = Ecwid_Seo_Links::maybe_extract_html_catalog_params();
1149
 
1150
  if ($params) {
1167
  return;
1168
  }
1169
 
1170
+
1171
+ if ( $link ) {
1172
+
1173
+ $main_page_id = Ecwid_Store_page::get_current_store_page_id();
1174
+ $params = Ecwid_Store_page::get_store_page_params( $main_page_id );
1175
+
1176
+ if ( $params['default_category_id'] ) {
1177
+ $current = get_permalink();
1178
+ $store_page = Ecwid_Store_Page::get_store_url();
1179
+ $link = str_replace( $store_page, $current, $link );
1180
+ }
1181
+
1182
  echo '<link rel="canonical" href="' . esc_attr($link) . '" />' . PHP_EOL;
1183
  }
1184
  }
2001
 
2002
  'ecwid_api_status' => array(
2003
  'type' => 'string'
2004
+ ),
2005
+
2006
+ 'ecwid_hide_canonical' => array(
2007
+ 'values' => array(
2008
+ '',
2009
+ 'hide'
2010
+ )
2011
  )
2012
  );
2013
 
2437
  if ( $page == Ecwid_Admin_Main_Page::PAGE_HASH_UPGRADE ) {
2438
  update_option('ecwid_api_check_time', time() - ECWID_API_AVAILABILITY_CHECK_TIME + 10 * 60);
2439
  }
2440
+
 
 
 
 
2441
  $time = time() - get_option('ecwid_time_correction', 0);
2442
 
2443
  $iframe_src = ecwid_get_iframe_src($time, $page);
2489
  require_once ECWID_PLUGIN_DIR . 'templates/dashboard.php';
2490
  }
2491
  } else {
2492
+ $show_reconnect = true;
2493
  require_once ECWID_PLUGIN_DIR . 'templates/ecwid-admin.php';
2494
  }
2495
  }
includes/class-ecwid-admin.php CHANGED
@@ -29,7 +29,8 @@ class Ecwid_Admin {
29
  'dashboard_url' => Ecwid_Admin::get_relative_dashboard_url(),
30
  'menu' => self::are_auto_menus_enabled() ? $menu : array(),
31
  'baseSlug' => self::ADMIN_SLUG,
32
- 'enableAutoMenus' => self::are_auto_menus_enabled()
 
33
  ));
34
  }
35
 
@@ -64,7 +65,7 @@ class Ecwid_Admin {
64
  $title,
65
  'manage_options',
66
  self::ADMIN_SLUG,
67
- 'ecwid_general_settings_do_page'
68
  );
69
  }
70
 
29
  'dashboard_url' => Ecwid_Admin::get_relative_dashboard_url(),
30
  'menu' => self::are_auto_menus_enabled() ? $menu : array(),
31
  'baseSlug' => self::ADMIN_SLUG,
32
+ 'enableAutoMenus' => self::are_auto_menus_enabled(),
33
+ 'actionUpdateMenu' => self::AJAX_ACTION_UPDATE_MENU
34
  ));
35
  }
36
 
65
  $title,
66
  'manage_options',
67
  self::ADMIN_SLUG,
68
+ array( $page, 'do_page' )
69
  );
70
  }
71
 
includes/class-ecwid-seo-links.php CHANGED
@@ -139,7 +139,7 @@ class Ecwid_Seo_Links {
139
  static $pattern = '';
140
 
141
  if ( !$pattern ) {
142
- $patterns = $this->get_seo_links_patterns();
143
 
144
  $pattern = '!(^' . implode('$|^', $patterns) . '$)!';
145
  }
@@ -147,7 +147,7 @@ class Ecwid_Seo_Links {
147
  return preg_match($pattern, $slug);
148
  }
149
 
150
- protected function get_seo_links_patterns() {
151
  return array(
152
  '.*-p([0-9]+)(\/.*|\?.*)?',
153
  '.*-c([0-9]+)(\/.*|\?.*)?',
@@ -285,6 +285,26 @@ JS;
285
 
286
  return preg_match( self::_get_pb_preg_pattern(), $url );
287
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
 
289
  protected static function _get_pb_preg_pattern() {
290
  return $pattern = '!.*-(p|c)([0-9]+)(\/.*|\?.*)?$!';
@@ -297,7 +317,7 @@ JS;
297
  $all_base_urls = $this->_build_all_base_urls();
298
 
299
  foreach ( $all_base_urls as $page_id => $links ) {
300
- $patterns = $this->get_seo_links_patterns();
301
 
302
  $post = get_post( $page_id );
303
  if ( ! $post ) continue;
@@ -314,7 +334,7 @@ JS;
314
  }
315
 
316
  if ( $this->is_store_on_home_page() ) {
317
- $patterns = $this->get_seo_links_patterns();
318
  foreach ( $patterns as $pattern ) {
319
  add_rewrite_rule( '^' . $pattern . '$', 'index.php?page_id=' . get_option( 'page_on_front' ), 'top' );
320
  }
@@ -363,7 +383,7 @@ JS;
363
  foreach ( $flattened as $link ) {
364
  $link = trim( $link, '/' );
365
 
366
- $patterns = $this->get_seo_links_patterns();
367
  $pattern = $patterns[0];
368
 
369
  $rules_pattern = '^' . $link . '/' . $pattern . '.*';
@@ -401,7 +421,7 @@ JS;
401
  ) {
402
 
403
  if ( PLL()->options['force_lang'] == 1 ) {
404
- $patterns = $this->get_seo_links_patterns();
405
  foreach ( $pages as $page_id ) {
406
  $link = urldecode( self::_get_relative_permalink( $page_id ) );
407
  $language = pll_get_post_language( $page_id );
139
  static $pattern = '';
140
 
141
  if ( !$pattern ) {
142
+ $patterns = self::get_seo_links_patterns();
143
 
144
  $pattern = '!(^' . implode('$|^', $patterns) . '$)!';
145
  }
147
  return preg_match($pattern, $slug);
148
  }
149
 
150
+ protected static function get_seo_links_patterns() {
151
  return array(
152
  '.*-p([0-9]+)(\/.*|\?.*)?',
153
  '.*-c([0-9]+)(\/.*|\?.*)?',
285
 
286
  return preg_match( self::_get_pb_preg_pattern(), $url );
287
  }
288
+
289
+ public static function is_seo_link() {
290
+ if ( !Ecwid_Store_Page::is_store_page() ) return false;
291
+
292
+ $url = add_query_arg( null, null );
293
+
294
+ $link = urldecode( self::_get_relative_permalink( get_the_ID() ) );
295
+ $site_url = parse_url( get_bloginfo('url') );
296
+ $site_path = $site_url['path'];
297
+
298
+ foreach ( self::get_seo_links_patterns() as $pattern ) {
299
+ $pattern = '#' . $site_path . preg_quote( $link ) . $pattern . '#';
300
+
301
+ if ( preg_match( $pattern, $url ) ) {
302
+ return true;
303
+ }
304
+ }
305
+
306
+ return false;
307
+ }
308
 
309
  protected static function _get_pb_preg_pattern() {
310
  return $pattern = '!.*-(p|c)([0-9]+)(\/.*|\?.*)?$!';
317
  $all_base_urls = $this->_build_all_base_urls();
318
 
319
  foreach ( $all_base_urls as $page_id => $links ) {
320
+ $patterns = self::get_seo_links_patterns();
321
 
322
  $post = get_post( $page_id );
323
  if ( ! $post ) continue;
334
  }
335
 
336
  if ( $this->is_store_on_home_page() ) {
337
+ $patterns = self::get_seo_links_patterns();
338
  foreach ( $patterns as $pattern ) {
339
  add_rewrite_rule( '^' . $pattern . '$', 'index.php?page_id=' . get_option( 'page_on_front' ), 'top' );
340
  }
383
  foreach ( $flattened as $link ) {
384
  $link = trim( $link, '/' );
385
 
386
+ $patterns = self::get_seo_links_patterns();
387
  $pattern = $patterns[0];
388
 
389
  $rules_pattern = '^' . $link . '/' . $pattern . '.*';
421
  ) {
422
 
423
  if ( PLL()->options['force_lang'] == 1 ) {
424
+ $patterns = self::get_seo_links_patterns();
425
  foreach ( $pages as $page_id ) {
426
  $link = urldecode( self::_get_relative_permalink( $page_id ) );
427
  $language = pll_get_post_language( $page_id );
includes/class-ecwid-static-home-page.php CHANGED
@@ -43,7 +43,7 @@ class Ecwid_Static_Home_Page {
43
  wp_enqueue_style( 'ecwid-' . self::HANDLE_STATIC_PAGE . '-' . $ind, $item );
44
  }
45
 
46
- wp_add_inline_script( 'ecwid-' . self::HANDLE_STATIC_PAGE, "window.ec.config.interactive = false;" );
47
  }
48
 
49
  public function apply_theme( $theme ) {
@@ -63,10 +63,10 @@ class Ecwid_Static_Home_Page {
63
  }
64
 
65
 
66
- if ( Ecwid_Seo_Links::is_enabled() && Ecwid_Seo_Links::is_product_browser_url() ) {
67
  return null;
68
  }
69
-
70
  $data = self::_maybe_fetch_data();
71
 
72
  if ( $data ) {
@@ -78,7 +78,7 @@ class Ecwid_Static_Home_Page {
78
 
79
  protected static function _maybe_fetch_data()
80
  {
81
- $store_page_params = self::_get_store_page_params();
82
 
83
  if ( isset( $store_page_params['default_category_id'] ) && $store_page_params['default_category_id'] ) {
84
  return null;
@@ -159,7 +159,7 @@ class Ecwid_Static_Home_Page {
159
  $store_params = EcwidPlatform::get_from_catalog_cache( $cache_key );
160
 
161
  if ( !$store_params ) {
162
- $store_params = self::_get_store_page_params();
163
  }
164
 
165
  $non_tplvar_params = array(
@@ -199,7 +199,7 @@ class Ecwid_Static_Home_Page {
199
  return false;
200
  }
201
 
202
- if ( get_ecwid_store_id() > 15182050 && get_ecwid_store_id() % 2 == 0 ) {
203
  return true;
204
  }
205
 
@@ -213,34 +213,11 @@ class Ecwid_Static_Home_Page {
213
  return $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_STATIC_HOME_PAGE )
214
  && $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_NEW_PRODUCT_LIST );
215
  }
216
-
217
- public static function save_store_page_params( $data ) {
218
- $existing = self::_get_store_page_params();
219
-
220
- $data = array_merge( $existing, $data );
221
-
222
- EcwidPlatform::cache_set( self::_get_store_page_data_key(), $data );
223
- }
224
-
225
- protected static function _get_store_page_params( ) {
226
- $params = EcwidPlatform::cache_get( self::_get_store_page_data_key(), array() );
227
-
228
- if ( !empty( $params) ) return $params;
229
-
230
- return array();
231
- }
232
 
233
  protected static function _get_page_content_data_key( $url ) {
234
  $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
235
  }
236
-
237
- protected static function _get_store_page_data_key()
238
- {
239
- $post = get_post();
240
-
241
- return get_ecwid_store_id() . '_' . $post->ID . '_' . $post->post_modified_gmt;
242
 
243
- }
244
  }
245
 
246
  $__ecwid_static_home_page = new Ecwid_Static_Home_Page();
43
  wp_enqueue_style( 'ecwid-' . self::HANDLE_STATIC_PAGE . '-' . $ind, $item );
44
  }
45
 
46
+ wp_add_inline_script( 'ecwid-' . self::HANDLE_STATIC_PAGE, "window.ec = window.ec || {}; window.ec.config = window.ec.config || {}; window.ec.config.interactive = false;" );
47
  }
48
 
49
  public function apply_theme( $theme ) {
63
  }
64
 
65
 
66
+ if ( Ecwid_Seo_Links::is_enabled() && Ecwid_Seo_Links::is_seo_link() ) {
67
  return null;
68
  }
69
+
70
  $data = self::_maybe_fetch_data();
71
 
72
  if ( $data ) {
78
 
79
  protected static function _maybe_fetch_data()
80
  {
81
+ $store_page_params = Ecwid_Store_Page::get_store_page_params();
82
 
83
  if ( isset( $store_page_params['default_category_id'] ) && $store_page_params['default_category_id'] ) {
84
  return null;
159
  $store_params = EcwidPlatform::get_from_catalog_cache( $cache_key );
160
 
161
  if ( !$store_params ) {
162
+ $store_params = Ecwid_Store_Page::get_store_page_params();
163
  }
164
 
165
  $non_tplvar_params = array(
199
  return false;
200
  }
201
 
202
+ if ( get_ecwid_store_id() > 15182050 && get_ecwid_store_id() % 2 == 0 && 0 ) {
203
  return true;
204
  }
205
 
213
  return $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_STATIC_HOME_PAGE )
214
  && $api->is_store_feature_enabled( Ecwid_Api_V3::FEATURE_NEW_PRODUCT_LIST );
215
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
  protected static function _get_page_content_data_key( $url ) {
218
  $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
219
  }
 
 
 
 
 
 
220
 
 
221
  }
222
 
223
  $__ecwid_static_home_page = new Ecwid_Static_Home_Page();
includes/class-ecwid-store-page.php CHANGED
@@ -116,6 +116,30 @@ class Ecwid_Store_Page {
116
  return $link;
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  public static function get_page_base_url( $page = 0 ) {
120
  return urldecode( get_page_uri( $page ) );
121
  }
116
  return $link;
117
  }
118
 
119
+ public static function save_store_page_params( $data ) {
120
+ $existing = self::get_store_page_params();
121
+
122
+ $data = array_merge( $existing, $data );
123
+
124
+ EcwidPlatform::cache_set( self::_get_store_page_data_key(), $data );
125
+ }
126
+
127
+ public static function get_store_page_params( $page_id = 0 ) {
128
+ $params = EcwidPlatform::cache_get( self::_get_store_page_data_key( $page_id ), array() );
129
+
130
+ if ( !empty( $params) ) return $params;
131
+
132
+ return array();
133
+ }
134
+
135
+ protected static function _get_store_page_data_key( $page_id = 0 )
136
+ {
137
+ $post = get_post( $page_id );
138
+
139
+ return get_ecwid_store_id() . '_' . $post->ID . '_' . $post->post_modified_gmt;
140
+
141
+ }
142
+
143
  public static function get_page_base_url( $page = 0 ) {
144
  return urldecode( get_page_uri( $page ) );
145
  }
includes/integrations/class-ecwid-integration-autoptimize.php CHANGED
@@ -24,6 +24,11 @@ class Ecwid_Integration_Autoptimize
24
 
25
  public function hook_js_exclude($exclude) {
26
  $code = ecwid_get_search_js_code();
 
 
 
 
 
27
  return $exclude . ", $code";
28
  }
29
  }
24
 
25
  public function hook_js_exclude($exclude) {
26
  $code = ecwid_get_search_js_code();
27
+
28
+ if ( Ecwid_Static_Home_Page::is_enabled() ) {
29
+ $code .= ", " . Ecwid_Static_Home_Page::HANDLE_STATIC_PAGE . ".js";
30
+ }
31
+
32
  return $exclude . ", $code";
33
  }
34
  }
includes/integrations/class-ecwid-integration-gutenberg.php CHANGED
@@ -26,15 +26,30 @@ class Ecwid_Integration_Gutenberg {
26
  'editor_script' => 'ecwid-gutenberg-store',
27
  'render_callback' => array( $this, 'render_callback' ),
28
  ));
29
-
30
  register_block_type(self::PRODUCT_BLOCK, array(
31
- 'editor_script' => 'ecwid-gutenberg-product',
32
  'render_callback' => array( $this, 'product_render_callback' ),
33
  ));
34
 
35
- // add_filter( 'block_categories', array( $this, 'block_categories' ) );
36
  }
37
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  public function on_save_post( $post, $request, $creating ) {
39
  if (strpos( $post->post_content, '<!-- wp:' . self::STORE_BLOCK ) !== false ) {
40
  Ecwid_Store_Page::add_store_page( $post->ID );
@@ -42,11 +57,9 @@ class Ecwid_Integration_Gutenberg {
42
  }
43
 
44
  public function enqueue_block_editor_assets() {
 
45
  wp_enqueue_script( 'ecwid-gutenberg-store', ECWID_PLUGIN_URL . 'js/gutenberg/blocks.build.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ) );
46
  wp_enqueue_style( 'ecwid-gutenberg-block', ECWID_PLUGIN_URL . 'css/gutenberg/blocks.editor.build.css' );
47
- if ( Ecwid_Api_V3::is_available() ) {
48
- EcwidPlatform::enqueue_script( 'gutenberg-product', array( 'wp-blocks', 'wp-i18n', 'wp-element' ) );
49
- }
50
 
51
  $locale_data = '';
52
  if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
@@ -73,7 +86,7 @@ class Ecwid_Integration_Gutenberg {
73
  'storeBlockTitle' => _x( 'Store', 'gutenberg-store-block-stub', 'ecwid-shopping-cart' )
74
  )
75
  );
76
-
77
  $is_demo_store = ecwid_is_demo_store();
78
  wp_localize_script( 'ecwid-gutenberg-store', 'EcwidGutenbergParams',
79
  array(
@@ -94,6 +107,8 @@ class Ecwid_Integration_Gutenberg {
94
  'storeIcon' => $this->_get_store_icon_path(),
95
  'productIcon' => $this->_get_product_icon_path(),
96
  'isDemoStore' => $is_demo_store,
 
 
97
  'customizeMinicartText' =>
98
  sprintf(
99
  __(
@@ -109,6 +124,40 @@ class Ecwid_Integration_Gutenberg {
109
 
110
  }
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  protected function _is_new_product_list() {
113
  $api = new Ecwid_Api_V3();
114
 
@@ -125,6 +174,21 @@ class Ecwid_Integration_Gutenberg {
125
 
126
  if ( !@$params['id'] ) return '';
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  $display = array(
129
  'picture', 'title', 'price', 'options', 'qty', 'addtobag'
130
  );
@@ -132,7 +196,7 @@ class Ecwid_Integration_Gutenberg {
132
  $params['display'] = '';
133
  $display_string = '';
134
  foreach ( $display as $name ) {
135
- if ($params['show_' . $name]) {
136
  $params['display'] .= ' ' . $name;
137
  }
138
  }
@@ -246,9 +310,7 @@ HTML;
246
 
247
  $store_page_data['chameleon-colors'] = $chameleon['colors'];
248
 
249
- if ( Ecwid_Static_Home_Page::is_enabled() ) {
250
- Ecwid_Static_Home_Page::save_store_page_params( $store_page_data );
251
- }
252
 
253
  if ( $chameleon['colors'] != 'auto' ) {
254
  $result .= <<<JS
@@ -355,12 +417,13 @@ JS;
355
 
356
  public static function get_store_block_data_from_current_page() {
357
 
358
- if ( !function_exists( 'gutenberg_parse_blocks' ) ) {
359
- return array();
360
- }
361
-
362
  $post = get_post();
363
- $blocks = gutenberg_parse_blocks( $post->post_content );
 
 
 
 
 
364
 
365
  $store_block = null;
366
  foreach ( $blocks as $block ) {
@@ -406,4 +469,4 @@ JS;
406
  }
407
  }
408
 
409
- $ecwid_gutenberg = new Ecwid_Integration_Gutenberg();
26
  'editor_script' => 'ecwid-gutenberg-store',
27
  'render_callback' => array( $this, 'render_callback' ),
28
  ));
29
+
30
  register_block_type(self::PRODUCT_BLOCK, array(
31
+ 'editor_script' => 'ecwid-gutenberg-store',
32
  'render_callback' => array( $this, 'product_render_callback' ),
33
  ));
34
 
35
+ add_filter( 'block_categories', array( $this, 'block_categories' ) );
36
  }
37
+
38
+ public function block_categories( $categories ) {
39
+ return array_merge(
40
+ $categories,
41
+ array(
42
+ array(
43
+ 'slug' => 'ec-store',
44
+ 'title' => sprintf( __( '%s', 'ecwid-shopping-cart' ), Ecwid_Config::get_brand() ),
45
+ 'icon' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#555d66" d="' . $this->_get_store_icon_path() . '"/><path d="M19 13H5v-2h14v2z" /></svg>'
46
+ ),
47
+ )
48
+ );
49
+ }
50
+
51
+
52
+
53
  public function on_save_post( $post, $request, $creating ) {
54
  if (strpos( $post->post_content, '<!-- wp:' . self::STORE_BLOCK ) !== false ) {
55
  Ecwid_Store_Page::add_store_page( $post->ID );
57
  }
58
 
59
  public function enqueue_block_editor_assets() {
60
+
61
  wp_enqueue_script( 'ecwid-gutenberg-store', ECWID_PLUGIN_URL . 'js/gutenberg/blocks.build.js', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' ) );
62
  wp_enqueue_style( 'ecwid-gutenberg-block', ECWID_PLUGIN_URL . 'css/gutenberg/blocks.editor.build.css' );
 
 
 
63
 
64
  $locale_data = '';
65
  if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
86
  'storeBlockTitle' => _x( 'Store', 'gutenberg-store-block-stub', 'ecwid-shopping-cart' )
87
  )
88
  );
89
+
90
  $is_demo_store = ecwid_is_demo_store();
91
  wp_localize_script( 'ecwid-gutenberg-store', 'EcwidGutenbergParams',
92
  array(
107
  'storeIcon' => $this->_get_store_icon_path(),
108
  'productIcon' => $this->_get_product_icon_path(),
109
  'isDemoStore' => $is_demo_store,
110
+ 'isApiAvailable' => Ecwid_Api_V3::is_available(),
111
+ 'products' => $this->_get_products_data(),
112
  'customizeMinicartText' =>
113
  sprintf(
114
  __(
124
 
125
  }
126
 
127
+ protected function _get_products_data() {
128
+
129
+ $post = get_post();
130
+
131
+ if ( function_exists( 'gutenberg_parse_blocks' ) ) {
132
+ $blocks = gutenberg_parse_blocks( $post->post_content );
133
+ } else {
134
+ $blocks = parse_blocks( $post->post_content );
135
+ }
136
+
137
+ $productIds = array();
138
+ foreach ( $blocks as $block ) {
139
+ if ( $block['blockName'] == self::PRODUCT_BLOCK ) {
140
+ $productIds[] = $block['attrs']['id'];
141
+ }
142
+ }
143
+
144
+ if ( empty( $productIds ) ) {
145
+ return array();
146
+ }
147
+
148
+ $result = array();
149
+ foreach ( $productIds as $id ) {
150
+ $product = Ecwid_Product::get_by_id( $id );
151
+
152
+ $result[$id] = array(
153
+ 'name' => $product->name,
154
+ 'imageUrl' => $product->thumbnailUrl
155
+ );
156
+ }
157
+
158
+ return $result;
159
+ }
160
+
161
  protected function _is_new_product_list() {
162
  $api = new Ecwid_Api_V3();
163
 
174
 
175
  if ( !@$params['id'] ) return '';
176
 
177
+ $params = wp_parse_args(
178
+ $params,
179
+ array(
180
+ 'id' => 0,
181
+ 'show_picture' => true,
182
+ 'show_title' => true,
183
+ 'show_price' => true,
184
+ 'show_options' => true,
185
+ 'show_addtobag' => true,
186
+ 'show_border' => true,
187
+ 'center_align' => true,
188
+ 'show_price_on_button' => true
189
+ )
190
+ );
191
+
192
  $display = array(
193
  'picture', 'title', 'price', 'options', 'qty', 'addtobag'
194
  );
196
  $params['display'] = '';
197
  $display_string = '';
198
  foreach ( $display as $name ) {
199
+ if (@$params['show_' . $name]) {
200
  $params['display'] .= ' ' . $name;
201
  }
202
  }
310
 
311
  $store_page_data['chameleon-colors'] = $chameleon['colors'];
312
 
313
+ Ecwid_Store_Page::save_store_page_params( $store_page_data );
 
 
314
 
315
  if ( $chameleon['colors'] != 'auto' ) {
316
  $result .= <<<JS
417
 
418
  public static function get_store_block_data_from_current_page() {
419
 
 
 
 
 
420
  $post = get_post();
421
+
422
+ if ( function_exists( 'gutenberg_parse_blocks' ) ) {
423
+ $blocks = gutenberg_parse_blocks( $post->post_content );
424
+ } else {
425
+ $blocks = parse_blocks( $post->post_content );
426
+ }
427
 
428
  $store_block = null;
429
  foreach ( $blocks as $block ) {
469
  }
470
  }
471
 
472
+ $ecwid_gutenberg = new Ecwid_Integration_Gutenberg();
includes/shortcodes/class-ecwid-shortcode-productbrowser.php CHANGED
@@ -88,18 +88,18 @@ HTML;
88
  }
89
  }
90
 
91
- if ( Ecwid_Static_Home_Page::is_enabled() ) {
92
- $params = array();
93
- if ( $this->_lang ) {
94
- $params['lang'] = $this->_lang;
95
- }
96
- if ( @$this->_params['defaultCategoryId'] ) {
97
- $params['default_category_id'] = $this->_params['defaultCategoryId'];
98
- }
99
-
100
- Ecwid_Static_Home_Page::save_store_page_params( $params );
101
  }
102
 
 
 
103
  $result = '';
104
 
105
  $classname = $this->_get_html_class_name();
88
  }
89
  }
90
 
91
+ $params = array(
92
+ 'default_category_id' => 0
93
+ );
94
+ if ( $this->_lang ) {
95
+ $params['lang'] = $this->_lang;
96
+ }
97
+ if ( @$this->_params['defaultCategoryId'] ) {
98
+ $params['default_category_id'] = $this->_params['defaultCategoryId'];
 
 
99
  }
100
 
101
+ Ecwid_Store_Page::save_store_page_params( $params );
102
+
103
  $result = '';
104
 
105
  $classname = $this->_get_html_class_name();
js/admin-menu.js CHANGED
@@ -53,13 +53,16 @@ function ecwidApplyIframeAdminMenu($link, menu) {
53
  .data('ecwid-menu', menu)
54
  .attr('data-ecwid-menu-slug', menu.slug)
55
  .click(function () {
 
 
 
56
  var ecwidMenu = jQuery(this).data('ecwid-menu');
57
 
58
  var link = jQuery(this).closest('li');
59
  var is3dlevelMenuRoot = link.hasClass('wp-has-submenu3');
60
- var isOpen = link.hasClass('wp-has-current-submenu3');
61
-
62
-
63
  ecwidOpenAdminPage(ecwidMenu.hash);
64
  history.pushState({}, null, ecwidMenu.url);
65
 
@@ -136,6 +139,44 @@ function ecwidAddMenuItems(items) {
136
  }
137
 
138
  jQuery(document).ready(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  if (jQuery('#ecwid-frame').length > 0) {
140
  if (jQuery('div.update-nag').length > 0) {
141
  jQuery('#ecwid-frame').addClass('has-wp-message');
53
  .data('ecwid-menu', menu)
54
  .attr('data-ecwid-menu-slug', menu.slug)
55
  .click(function () {
56
+ if ( jQuery(this).hasClass('current') ) {
57
+ return false;
58
+ }
59
  var ecwidMenu = jQuery(this).data('ecwid-menu');
60
 
61
  var link = jQuery(this).closest('li');
62
  var is3dlevelMenuRoot = link.hasClass('wp-has-submenu3');
63
+
64
+ var isOpen = jQuery('li.current').closest('.toplevel_page_ec-store').length > 0;
65
+
66
  ecwidOpenAdminPage(ecwidMenu.hash);
67
  history.pushState({}, null, ecwidMenu.url);
68
 
139
  }
140
 
141
  jQuery(document).ready(function() {
142
+
143
+ var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
144
+ var eventer = window[eventMethod];
145
+ var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
146
+
147
+ // Listen to message from child window
148
+ eventer(messageEvent,function(e) {
149
+
150
+ if ( typeof e.data.action != 'undefined') {
151
+ if ( e.data.action == 'pageLoad' ) {
152
+ var page = e.data.data.page.path;
153
+
154
+ jQuery('*[data-ecwid-menu-slug=ec-store-admin-' + page + ']').eq(0).click();
155
+ } else if (
156
+ e.data.action
157
+ && e.data.action == 'navigationMenuUpdated'
158
+ && e.data.data && e.data.data.navigationMenuItems
159
+ && e.data.data.navigationMenuItems.length > 0
160
+ && ecwid_admin_menu.enableAutoMenus
161
+ ) {
162
+ jQuery.ajax({
163
+ 'url': ajaxurl + '?action=' + ecwid_admin_menu.actionUpdateMenu,
164
+ 'method': 'POST',
165
+ 'data': {
166
+ menu: e.data.data.navigationMenuItems
167
+ },
168
+ 'success': function(result) {
169
+ jQuery('li[data-ecwid-dynamic-menu]').remove();
170
+ ecwidAddMenuItems(jQuery.parseJSON(result));
171
+ ecwidRefreshEcwidMenuItemSelection();
172
+ jQuery(window).trigger('resize');
173
+ }
174
+ });
175
+ }
176
+ }
177
+ },false);
178
+
179
+
180
  if (jQuery('#ecwid-frame').length > 0) {
181
  if (jQuery('div.update-nag').length > 0) {
182
  jQuery('#ecwid-frame').addClass('has-wp-message');
js/gutenberg/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(n){if(l[n])return l[n].exports;var r=l[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var l={};t.m=e,t.c=l,t.d=function(e,l,n){t.o(e,l)||Object.defineProperty(e,l,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(l,"a",l),l},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});l(1),l(5)},function(e,t,l){"use strict";function n(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}var r=l(2),o=(l.n(r),l(3)),a=(l.n(o),l(4)),i=wp.i18n,c=i.__,s=(i._x,a.a,wp.blocks),m=(s.BlockControls,s.registerBlockType),p=wp.editor,u=p.InspectorControls,d=(p.AlignmentToolbar,p.withColors,wp.components),w=d.PanelBody,h=d.PanelRow,g=d.ToggleControl,_=d.ButtonGroup,f=d.Button,E=(d.IconButton,d.BaseControl),y=d.Toolbar,v=(d.Dropdown,d.ColorPalette),b=d.ColorIndicator,x=wp.compose.withState;wp.element.Fragment;m("ecwid/store-block",{title:EcwidGutenbergParams.storeBlockTitle,icon:wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.storeIcon})),category:"common",attributes:EcwidGutenbergStoreBlockParams.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,l){return wp.element.createElement(g,{label:l,checked:e.attributes[t],onChange:function(){return e.setAttributes(n({},t,!e.attributes[t]))}})}function l(e,t,l,r){return wp.element.createElement(E,{label:l},wp.element.createElement(y,{controls:r.map(function(l){return{icon:a.a[l.icon],title:l.title,isActive:e.attributes[t]===l.value,className:"ecwid-toolbar-icon",onClick:function(){return e.setAttributes(n({},t,l.value))}}})}))}function r(e,t,l,r){return wp.element.createElement(E,{label:l},wp.element.createElement("select",{onChange:function(l){e.setAttributes(n({},t,l.target.value))}},r.map(function(l){return wp.element.createElement("option",{value:l.value,selected:e.attributes[t]==l.value},l.title)})))}function o(e,t,l){return wp.element.createElement(E,{label:l},wp.element.createElement("input",{type:"text",value:e.attributes[t],onChange:function(l){e.setAttributes(n({},t,l.target.value))}}))}function i(e,t,l,r){return wp.element.createElement(E,{label:l},wp.element.createElement(_,null,r.map(function(l){return wp.element.createElement(f,{isDefault:!0,isButton:!0,isPrimary:C[t]==l.value,onClick:function(){return e.setAttributes(n({},t,l.value))}},l.title)})))}function s(e,t){return wp.element.createElement(E,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}function m(e,n,a){var c=EcwidGutenbergStoreBlockParams.attributes[n];return"undefined"===typeof a&&(a=c.type),"default_category_id"===a&&(a=c.values&&c.values.length>1?"select":"textbox"),"buttonGroup"===a?i(e,c.name,c.title,c.values):"toolbar"===a?l(e,c.name,c.title,c.values):"select"===a?r(e,c.name,c.title,c.values):"colorPalette"===a?p(e,c.name,c.title):"text"===a?s(c.title,c.message):"textbox"===a?o(e,c.name,c.title):t(e,c.name,c.title)}function p(e,t,l){var r=wp.element.createElement("span",null,l,wp.element.createElement(b,{colorValue:C[t]}));return wp.element.createElement(E,{label:r,className:"ec-store-color-picker"},wp.element.createElement(v,{value:C[t],colors:P,onChange:function(l){return e.setAttributes(n({},t,l))}}))}function d(e){function t(e){o(function(t){return{manual:"manual",color:e}}),i.setAttributes(n({},a,e))}var l=e.manual,r=e.color,o=e.setState,a=arguments[0].name,i=arguments[0].props,s=EcwidGutenbergStoreBlockParams.attributes[a].title,m=null===l&&null!==i.attributes[a]&&""!==i.attributes[a]||"manual"===l;m?null!==r&&i.setAttributes(n({},a,r)):i.setAttributes(n({},a,null));var p=i.attributes[a],u=wp.element.createElement("span",null,s,null!==p&&wp.element.createElement(b,{colorValue:C[a]}));return wp.element.createElement(E,{label:u,className:"ec-store-color-picker"},wp.element.createElement("select",{onChange:function(e){return o(function(e){return{manual:event.target.value,color:e.color}})}},wp.element.createElement("option",{value:"auto",selected:!m},c("Detect automatically","ecwid-shopping-cart")),wp.element.createElement("option",{value:"manual",selected:m},c("Set manually","ecwid-shopping-cart"))),m&&wp.element.createElement(v,{value:p,colors:P,onChange:t}))}function k(e){var t=e.count,l=e.setState;return wp.element.createElement("div",null,wp.element.createElement("button",{onClick:function(){return l(function(e){return{count:e.count+1}})}},"text ",t," ",arguments[0].color))}var C=e.attributes;e.setAttributes({widgets:""});var B=wp.element.createElement("div",{className:"ec-store-block ec-store-block-product-browser"},wp.element.createElement("div",{className:"ec-store-block-header"},wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.storeIcon})),EcwidGutenbergParams.isDemoStore&&c("Demo store","ecwid-shopping-cart"),!EcwidGutenbergParams.isDemoStore&&EcwidGutenbergStoreBlockParams.storeBlockTitle),EcwidGutenbergParams.isDemoStore&&wp.element.createElement("div",null,wp.element.createElement("a",{className:"button button-primary",href:"admin.php?page=ec-store"},c("Set up your store","ecwid-shopping-cart")))),P=[{name:c("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:c("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:c("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:c("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:c("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:c("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:c("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:c("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:c("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:c("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:c("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],S=x({manual:null,color:null})(d),G=(x({count:0})(k),s("",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"))),N=s(c("Display cart icon","ecwid-shopping-cart"),EcwidGutenbergParams.customizeMinicartText),O=(s("",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")),EcwidGutenbergStoreBlockParams.is_new_product_list),z=EcwidGutenbergStoreBlockParams.is_new_details_page,L=EcwidGutenbergStoreBlockParams.attributes.default_category_id&&EcwidGutenbergStoreBlockParams.attributes.default_category_id.values&&EcwidGutenbergStoreBlockParams.attributes.default_category_id.values.length>0;return[B,wp.element.createElement(u,null,L&&wp.element.createElement(w,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},O&&m(e,"product_list_category_title_behavior","select"),O&&"SHOW_TEXT_ONLY"!==C.product_list_category_title_behavior&&m(e,"product_list_category_image_size","buttonGroup"),O&&"SHOW_TEXT_ONLY"!==C.product_list_category_title_behavior&&m(e,"product_list_category_image_aspect_ratio","toolbar"),!O&&G),wp.element.createElement(w,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},O&&m(e,"product_list_show_product_images","toggle"),O&&C.product_list_show_product_images&&m(e,"product_list_image_size","buttonGroup"),O&&C.product_list_show_product_images&&m(e,"product_list_image_aspect_ratio","toolbar"),O&&m(e,"product_list_product_info_layout","toolbar"),O&&m(e,"product_list_title_behavior","select"),O&&m(e,"product_list_price_behavior","select"),O&&m(e,"product_list_sku_behavior","select"),O&&m(e,"product_list_buybutton_behavior","select"),O&&m(e,"product_list_show_additional_image_on_hover","toggle"),O&&m(e,"product_list_show_frame","toggle"),!O&&G),wp.element.createElement(w,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},z&&m(e,"product_details_layout","select"),z&&("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"==C.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"==C.product_details_layout)&&m(e,"show_description_under_image","toggle"),z&&m(e,"product_details_gallery_layout","toolbar"),z&&wp.element.createElement(h,null,wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Product sidebar content","ecwid-shopping-cart"))),z&&m(e,"product_details_show_product_name","toggle"),z&&m(e,"product_details_show_breadcrumbs","toggle"),z&&m(e,"product_details_show_product_sku","toggle"),z&&m(e,"product_details_show_product_price","toggle"),z&&m(e,"product_details_show_qty","toggle"),z&&m(e,"product_details_show_number_of_items_in_stock","toggle"),z&&m(e,"product_details_show_in_stock_label","toggle"),z&&m(e,"product_details_show_wholesale_prices","toggle"),z&&m(e,"product_details_show_share_buttons","toggle"),!z&&G),L&&wp.element.createElement(w,{title:c("Store Front Page","ecwid-shopping-cart"),initialOpen:!1},m(e,"default_category_id","default_category_id")),wp.element.createElement(w,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},m(e,"show_categories","toggle"),m(e,"show_search","toggle"),m(e,"show_breadcrumbs","toggle"),O&&m(e,"show_footer_menu","toggle"),m(e,"show_signin_link","toggle"),m(e,"product_list_show_sort_viewas_options","toggle"),N),wp.element.createElement(w,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},wp.element.createElement(S,{props:e,name:"chameleon_color_button"}),wp.element.createElement(S,{props:e,name:"chameleon_color_foreground"}),wp.element.createElement(S,{props:e,name:"chameleon_color_price"}),wp.element.createElement(S,{props:e,name:"chameleon_color_link"}),wp.element.createElement(S,{props:e,name:"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 l={widgets:t.join(" "),default_category_id:"undefined"!=typeof e.attributes.default_category_id?e.attributes.default_category_id:0};return new wp.shortcode({tag:EcwidGutenbergParams.storeShortcodeName,attrs:l,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={},l=["widgets","default_category_id"],n=0;n<l.length;n++)t[l[n]]=e.attributes[l[n]];return t.default_product_id=0,new wp.shortcode({tag:EcwidGutenbergParams.storeShortcodeName,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,l){"use strict";l.d(t,"a",function(){return n});var n={store: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"})),product: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:"#231F20",d:"M16.43,5.12c-0.13-1.19-0.15-1.19-1.35-1.33c-0.21-0.02-0.21-0.02-0.43-0.05c-0.01,0.06,0.06,0.78,0.14,1.13 c0.57,0.37,0.87,0.98,0.87,1.71c0,1.14-0.93,2.07-2.07,2.07s-2.07-0.93-2.07-2.07c0-0.54,0.09-0.97,0.55-1.4 c-0.06-0.61-0.19-1.54-0.18-1.64C10.14,3.46,8.72,3.46,8.58,3.6l-8.17,8.13c-0.56,0.55-0.56,1.43,0,1.97l5.54,5.93 c0.56,0.55,1.46,0.55,2.01,0l8.67-8.14C17.04,11.09,16.68,7.14,16.43,5.12z M16.06,0.04c-1.91,0-3.46,1.53-3.46,3.41c0,0.74,0.4,3.09,0.44,3.28c0.07,0.34,0.52,0.56,0.86,0.49 C14,7.19,14.07,7.15,14.12,7.1c0.24-0.11,0.32-0.39,0.25-0.68c-0.09-0.45-0.39-2.44-0.39-2.94c0-1.16,0.94-2.09,2.11-2.09 c1.24,0,2.11,0.96,2.11,2.34c0,2.43-0.31,4.23-0.32,4.26c-0.1,0.17-0.1,0.38-0.03,0.55c0.03,0.17,0.13,0.31,0.28,0.4 c0.1,0.06,0.22,0.09,0.33,0.09c0.21,0,0.42-0.1,0.54-0.3c0.06-0.09,0.52-2.17,0.52-5.03C19.52,1.61,18.04,0.04,16.06,0.04z"})),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"}))))}},function(e,t,l){"use strict";var n=l(6),r=(l.n(n),l(7)),o=(l.n(r),wp.i18n.__);(0,wp.blocks.registerBlockType)("cgb/block-my-block2",{title:o("my-block - CGB Block"),icon:"shield",category:"common",keywords:[o("my-block \u2014 CGB Block"),o("CGB Example"),o("create-guten-block")],edit:function(e){return wp.element.createElement("div",{className:e.className},wp.element.createElement("p",null,"\u2014 Hello from the backend."),wp.element.createElement("p",null,"CGB BLOCK: ",wp.element.createElement("code",null,"my-block")," is a new Gutenberg block"),wp.element.createElement("p",null,"It was created via"," ",wp.element.createElement("code",null,wp.element.createElement("a",{href:"https://github.com/ahmadawais/create-guten-block"},"create-guten-block")),"."))},save:function(e){return wp.element.createElement("div",null,wp.element.createElement("p",null,"\u2014 Hello from the frontend."),wp.element.createElement("p",null,"CGB BLOCK: ",wp.element.createElement("code",null,"my-block")," is a new Gutenberg block."),wp.element.createElement("p",null,"It was created via"," ",wp.element.createElement("code",null,wp.element.createElement("a",{href:"https://github.com/ahmadawais/create-guten-block"},"create-guten-block")),"."))}})},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1),n(5)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=n(2),o=(n.n(l),n(3)),i=(n.n(o),n(4)),a=wp.i18n,c=a.__,s=(a._x,i.a,wp.blocks),p=(s.BlockControls,s.registerBlockType),u=wp.editor,m=u.InspectorControls,d=(u.AlignmentToolbar,u.withColors,wp.components),w=d.PanelBody,g=d.PanelRow,h=d.ToggleControl,_=d.ButtonGroup,f=d.Button,b=(d.IconButton,d.BaseControl),E=d.Toolbar,v=d.ColorPalette,y=d.ColorIndicator,x=wp.compose.withState;wp.element.Fragment;p("ecwid/store-block",{title:EcwidGutenbergParams.storeBlockTitle,icon:wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.storeIcon})),category:"ec-store",attributes:EcwidGutenbergStoreBlockParams.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,n){return wp.element.createElement(h,{label:n,checked:e.attributes[t],onChange:function(){return e.setAttributes(r({},t,!e.attributes[t]))}})}function n(e,t,n,l){return wp.element.createElement(b,{label:n},wp.element.createElement(E,{controls:l.map(function(n){return{icon:i.a[n.icon],title:n.title,isActive:e.attributes[t]===n.value,className:"ecwid-toolbar-icon",onClick:function(){return e.setAttributes(r({},t,n.value))}}})}))}function l(e,t,n,l){return wp.element.createElement(b,{label:n},wp.element.createElement("select",{onChange:function(n){e.setAttributes(r({},t,n.target.value))}},l.map(function(n){return wp.element.createElement("option",{value:n.value,selected:e.attributes[t]==n.value},n.title)})))}function o(e,t,n){return wp.element.createElement(b,{label:n},wp.element.createElement("input",{type:"text",value:e.attributes[t],onChange:function(n){e.setAttributes(r({},t,n.target.value))}}))}function a(e,t,n,l){return wp.element.createElement(b,{label:n},wp.element.createElement(_,null,l.map(function(n){return wp.element.createElement(f,{isDefault:!0,isButton:!0,isPrimary:P[t]==n.value,onClick:function(){return e.setAttributes(r({},t,n.value))}},n.title)})))}function s(e,t){return wp.element.createElement(b,{label:e},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:t}}))}function p(e,r,i){var c=EcwidGutenbergStoreBlockParams.attributes[r];return"undefined"===typeof i&&(i=c.type),"default_category_id"===i&&(i=c.values&&c.values.length>1?"select":"textbox"),"buttonGroup"===i?a(e,c.name,c.title,c.values):"toolbar"===i?n(e,c.name,c.title,c.values):"select"===i?l(e,c.name,c.title,c.values):"colorPalette"===i?u(e,c.name,c.title):"text"===i?s(c.title,c.message):"textbox"===i?o(e,c.name,c.title):t(e,c.name,c.title)}function u(e,t,n){var l=wp.element.createElement("span",null,n,wp.element.createElement(y,{colorValue:P[t]}));return wp.element.createElement(b,{label:l,className:"ec-store-color-picker"},wp.element.createElement(v,{value:P[t],colors:B,onChange:function(n){return e.setAttributes(r({},t,n))}}))}function d(e){function t(e){o(function(t){return{manual:"manual",color:e}}),a.setAttributes(r({},i,e))}var n=e.manual,l=e.color,o=e.setState,i=arguments[0].name,a=arguments[0].props,s=EcwidGutenbergStoreBlockParams.attributes[i].title,p=null===n&&null!==a.attributes[i]&&""!==a.attributes[i]||"manual"===n;p?null!==l&&a.setAttributes(r({},i,l)):a.setAttributes(r({},i,null));var u=a.attributes[i],m=wp.element.createElement("span",null,s,null!==u&&wp.element.createElement(y,{colorValue:P[i]}));return wp.element.createElement(b,{label:m,className:"ec-store-color-picker"},wp.element.createElement("select",{onChange:function(e){return o(function(e){return{manual:event.target.value,color:e.color}})}},wp.element.createElement("option",{value:"auto",selected:!p},c("Detect automatically","ecwid-shopping-cart")),wp.element.createElement("option",{value:"manual",selected:p},c("Set manually","ecwid-shopping-cart"))),p&&wp.element.createElement(v,{value:u,colors:B,onChange:t}))}function k(e){var t=e.count,n=e.setState;return wp.element.createElement("div",null,wp.element.createElement("button",{onClick:function(){return n(function(e){return{count:e.count+1}})}},"text ",t," ",arguments[0].color))}var P=e.attributes;e.setAttributes({widgets:""});var C=wp.element.createElement("div",{className:"ec-store-block ec-store-block-product-browser"},wp.element.createElement("div",{className:"ec-store-block-header"},wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.storeIcon})),EcwidGutenbergParams.isDemoStore&&c("Demo store","ecwid-shopping-cart"),!EcwidGutenbergParams.isDemoStore&&EcwidGutenbergStoreBlockParams.storeBlockTitle),EcwidGutenbergParams.isDemoStore&&wp.element.createElement("div",null,wp.element.createElement("a",{className:"button button-primary",href:"admin.php?page=ec-store"},c("Set up your store","ecwid-shopping-cart")))),B=[{name:c("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:c("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:c("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:c("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:c("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:c("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:c("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:c("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:c("Very light gray"),slug:"very-light-gray",color:"#eeeeee"},{name:c("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:c("Very dark gray"),slug:"very-dark-gray",color:"#313131"}],G=x({manual:null,color:null})(d),N=(x({count:0})(k),s("",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=s(c("Display cart icon","ecwid-shopping-cart"),EcwidGutenbergParams.customizeMinicartText),O=(s("",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")),EcwidGutenbergStoreBlockParams.is_new_product_list),A=EcwidGutenbergStoreBlockParams.is_new_details_page,T=EcwidGutenbergStoreBlockParams.attributes.default_category_id&&EcwidGutenbergStoreBlockParams.attributes.default_category_id.values&&EcwidGutenbergStoreBlockParams.attributes.default_category_id.values.length>0;return[C,wp.element.createElement(m,null,T&&wp.element.createElement(w,{title:c("Category List Appearance","ecwid-shopping-cart"),initialOpen:!1},O&&p(e,"product_list_category_title_behavior","select"),O&&"SHOW_TEXT_ONLY"!==P.product_list_category_title_behavior&&p(e,"product_list_category_image_size","buttonGroup"),O&&"SHOW_TEXT_ONLY"!==P.product_list_category_title_behavior&&p(e,"product_list_category_image_aspect_ratio","toolbar"),!O&&N),wp.element.createElement(w,{title:c("Product List Appearance","ecwid-shopping-cart"),initialOpen:!1},O&&p(e,"product_list_show_product_images","toggle"),O&&P.product_list_show_product_images&&p(e,"product_list_image_size","buttonGroup"),O&&P.product_list_show_product_images&&p(e,"product_list_image_aspect_ratio","toolbar"),O&&p(e,"product_list_product_info_layout","toolbar"),O&&p(e,"product_list_title_behavior","select"),O&&p(e,"product_list_price_behavior","select"),O&&p(e,"product_list_sku_behavior","select"),O&&p(e,"product_list_buybutton_behavior","select"),O&&p(e,"product_list_show_additional_image_on_hover","toggle"),O&&p(e,"product_list_show_frame","toggle"),!O&&N),wp.element.createElement(w,{title:c("Product Page Appearance","ecwid-shopping-cart"),initialOpen:!1},A&&p(e,"product_details_layout","select"),A&&("TWO_COLUMNS_SIDEBAR_ON_THE_RIGHT"==P.product_details_layout||"TWO_COLUMNS_SIDEBAR_ON_THE_LEFT"==P.product_details_layout)&&p(e,"show_description_under_image","toggle"),A&&p(e,"product_details_gallery_layout","toolbar"),A&&wp.element.createElement(g,null,wp.element.createElement("label",{className:"ec-store-inspector-subheader"},c("Product sidebar content","ecwid-shopping-cart"))),A&&p(e,"product_details_show_product_name","toggle"),A&&p(e,"product_details_show_breadcrumbs","toggle"),A&&p(e,"product_details_show_product_sku","toggle"),A&&p(e,"product_details_show_product_price","toggle"),A&&p(e,"product_details_show_qty","toggle"),A&&p(e,"product_details_show_number_of_items_in_stock","toggle"),A&&p(e,"product_details_show_in_stock_label","toggle"),A&&p(e,"product_details_show_wholesale_prices","toggle"),A&&p(e,"product_details_show_share_buttons","toggle"),!A&&N),T&&wp.element.createElement(w,{title:c("Store Front Page","ecwid-shopping-cart"),initialOpen:!1},p(e,"default_category_id","default_category_id")),wp.element.createElement(w,{title:c("Store Navigation","ecwid-shopping-cart"),initialOpen:!1},p(e,"show_categories","toggle"),p(e,"show_search","toggle"),p(e,"show_breadcrumbs","toggle"),O&&p(e,"show_footer_menu","toggle"),p(e,"show_signin_link","toggle"),p(e,"product_list_show_sort_viewas_options","toggle"),S),wp.element.createElement(w,{title:c("Color settings","ecwid-shopping-cart"),initialOpen:!1},wp.element.createElement(G,{props:e,name:"chameleon_color_button"}),wp.element.createElement(G,{props:e,name:"chameleon_color_foreground"}),wp.element.createElement(G,{props:e,name:"chameleon_color_price"}),wp.element.createElement(G,{props:e,name:"chameleon_color_link"}),wp.element.createElement(G,{props:e,name:"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 n={widgets:t.join(" "),default_category_id:"undefined"!=typeof e.attributes.default_category_id?e.attributes.default_category_id:0};return new wp.shortcode({tag:EcwidGutenbergParams.storeShortcodeName,attrs:n,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={},n=["widgets","default_category_id"],r=0;r<n.length;r++)t[n[r]]=e.attributes[n[r]];return t.default_product_id=0,new wp.shortcode({tag:EcwidGutenbergParams.storeShortcodeName,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,n){"use strict";n.d(t,"a",function(){return r});var r={store: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"})),product: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:"#231F20",d:"M16.43,5.12c-0.13-1.19-0.15-1.19-1.35-1.33c-0.21-0.02-0.21-0.02-0.43-0.05c-0.01,0.06,0.06,0.78,0.14,1.13 c0.57,0.37,0.87,0.98,0.87,1.71c0,1.14-0.93,2.07-2.07,2.07s-2.07-0.93-2.07-2.07c0-0.54,0.09-0.97,0.55-1.4 c-0.06-0.61-0.19-1.54-0.18-1.64C10.14,3.46,8.72,3.46,8.58,3.6l-8.17,8.13c-0.56,0.55-0.56,1.43,0,1.97l5.54,5.93 c0.56,0.55,1.46,0.55,2.01,0l8.67-8.14C17.04,11.09,16.68,7.14,16.43,5.12z M16.06,0.04c-1.91,0-3.46,1.53-3.46,3.41c0,0.74,0.4,3.09,0.44,3.28c0.07,0.34,0.52,0.56,0.86,0.49 C14,7.19,14.07,7.15,14.12,7.1c0.24-0.11,0.32-0.39,0.25-0.68c-0.09-0.45-0.39-2.44-0.39-2.94c0-1.16,0.94-2.09,2.11-2.09 c1.24,0,2.11,0.96,2.11,2.34c0,2.43-0.31,4.23-0.32,4.26c-0.1,0.17-0.1,0.38-0.03,0.55c0.03,0.17,0.13,0.31,0.28,0.4 c0.1,0.06,0.22,0.09,0.33,0.09c0.21,0,0.42-0.1,0.54-0.3c0.06-0.09,0.52-2.17,0.52-5.03C19.52,1.61,18.04,0.04,16.06,0.04z"})),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"}))))}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=n(6),o=(n.n(l),n(7));n.n(o);if(!EcwidGutenbergParams.isDemoStore){var i=wp.i18n,a=i.__,c=i._x,s=wp.blocks,p=(s.BlockControls,s.registerBlockType),u=wp.editor,m=u.InspectorControls,d=(u.AlignmentToolbar,u.withColors,wp.components),w=d.PanelBody,g=(d.PanelRow,d.ToggleControl);d.ButtonGroup,d.Button,d.IconButton,d.BaseControl,d.Toolbar,d.ColorPalette,d.ColorIndicator,wp.compose.withState,wp.element.Fragment;p("ecwid/product-block",{title:EcwidGutenbergParams.productBlockTitle,icon:wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.productIcon})),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:a("Display product with a buy button","ecwid-shopping-cart"),supports:{customClassName:!1,className:!1,html:!1,isPrivate:!EcwidGutenbergParams.isApiAvailable},edit:function(e){function t(e,t,n){return wp.element.createElement(g,{label:n,checked:e.attributes[t],onChange:function(){return e.setAttributes(r({},t,!e.attributes[t]))}})}function n(e){ecwid_open_product_popup({saveCallback:o,props:e})}var l=e.attributes,o=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"},wp.element.createElement("div",{className:"ec-store-block-header"},wp.element.createElement("svg",{className:"dashicon",viewBox:"0 0 20 20",width:"20",height:"20"},wp.element.createElement("path",{d:EcwidGutenbergParams.productIcon})),EcwidGutenbergParams.yourProductLabel),EcwidGutenbergParams.products&&l.id&&EcwidGutenbergParams.products[l.id]&&wp.element.createElement("div",{className:"ec-store-block-image"},wp.element.createElement("img",{src:EcwidGutenbergParams.products[l.id].imageUrl})),EcwidGutenbergParams.products&&l.id&&EcwidGutenbergParams.products[l.id]&&wp.element.createElement("div",{className:"ec-store-block-title"},EcwidGutenbergParams.products[l.id].name),!l.id&&wp.element.createElement("div",null,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))),wp.element.createElement(m,null,l.id&&wp.element.createElement("div",null,wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("label",{className:"ec-store-inspector-subheader"},a("Displayed product","ecwid-shopping-cart"))),wp.element.createElement("div",{className:"ec-store-inspector-row"},EcwidGutenbergParams.products&&EcwidGutenbergParams.products[l.id]&&wp.element.createElement("label",null,EcwidGutenbergParams.products[l.id].name),wp.element.createElement("button",{className:"button",onClick:function(){return n(e)}},a("Change","ecwid-shopping-cart")))),!l.id&&wp.element.createElement("div",{className:"ec-store-inspector-row"},wp.element.createElement("button",{className:"button",onClick:function(){return n(e)}},a("Choose product","ecwid-shopping-cart"))),wp.element.createElement(w,{title:c("Content","gutenberg-product-block","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_picture",a("Picture","ecwid-shopping-cart")),t(e,"show_title",a("Title","ecwid-shopping-cart")),t(e,"show_price",a("Price","ecwid-shopping-cart")),t(e,"show_options",a("Options","ecwid-shopping-cart")),t(e,"show_qty",a("Quantity","ecwid-shopping-cart")),t(e,"show_addtobag",a("\xabBuy now\xbb button","ecwid-shopping-cart"))),wp.element.createElement(w,{title:a("Appearance","ecwid-shopping-cart"),initialOpen:!1},t(e,"show_price_on_button",a("Show price inside the \xabBuy now\xbb button","ecwid-shopping-cart")),t(e,"show_border",a("Add border","ecwid-shopping-cart")),t(e,"center_align",a("Center align on a page","ecwid-shopping-cart"))))]},save:function(e){return!1}})}},function(e,t){},function(e,t){}]);
js/gutenberg/product.jsx ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
9
+ // Import CSS.
10
+ import './style.scss';
11
+ import './editor.scss';
12
+
13
+ if ( !EcwidGutenbergParams.isDemoStore ) {
14
+
15
+ const { __, _x } = wp.i18n; // Import __() from wp.i18n
16
+
17
+ const {
18
+ BlockControls,
19
+ registerBlockType,
20
+ } = wp.blocks;
21
+
22
+ const {
23
+ InspectorControls,
24
+ AlignmentToolbar,
25
+ withColors
26
+ } = wp.editor;
27
+
28
+ const {
29
+ PanelBody,
30
+ PanelRow,
31
+ ToggleControl,
32
+ ButtonGroup,
33
+ Button,
34
+ IconButton,
35
+ BaseControl,
36
+ Toolbar,
37
+ ColorPalette,
38
+ ColorIndicator
39
+ } = wp.components;
40
+
41
+ const { withState } = wp.compose;
42
+
43
+ const {
44
+ Fragment
45
+ } = wp.element;
46
+
47
+
48
+ /**
49
+ * Register: aa Gutenberg Block.
50
+ *
51
+ * Registers a new block provided a unique name and an object defining its
52
+ * behavior. Once registered, the block is made editor as an option to any
53
+ * editor interface where blocks are implemented.
54
+ *
55
+ * @link https://wordpress.org/gutenberg/handbook/block-api/
56
+ * @param {string} name Block name.
57
+ * @param {Object} settings Block settings.
58
+ * @return {?WPBlock} The block, if it has been successfully
59
+ * registered; otherwise `undefined`.
60
+ */
61
+ registerBlockType( 'ecwid/product-block', {
62
+ title: EcwidGutenbergParams.productBlockTitle, // Block title.
63
+ icon: (
64
+ <svg className="dashicon" viewBox="0 0 20 20" width="20" height="20">
65
+ <path d={ EcwidGutenbergParams.productIcon }></path>
66
+ </svg>
67
+ ),
68
+ category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
69
+ attributes: {
70
+ id: {type: 'integer'},
71
+ show_picture: {type: 'boolean', default: true},
72
+ show_title: {type: 'boolean', default: true},
73
+ show_price: {type: 'boolean', default: true},
74
+ show_options: {type: 'boolean', default: true},
75
+ show_qty: {type: 'boolean', default: false},
76
+ show_addtobag: {type: 'boolean', default: true},
77
+ show_price_on_button: {type: 'boolean', default: true},
78
+ show_border: {type: 'boolean', default: true},
79
+ center_align: {type: 'boolean', default: true}
80
+ },
81
+ description: __( 'Display product with a buy button', 'ecwid-shopping-cart' ),
82
+ supports: {
83
+ customClassName: false,
84
+ className: false,
85
+ html: false,
86
+ isPrivate: !EcwidGutenbergParams.isApiAvailable
87
+ },
88
+
89
+ /**
90
+ * The edit function describes the structure of your block in the context of the editor.
91
+ * This represents what the editor will render when the block is used.
92
+ *
93
+ * The "edit" property must be a valid function.
94
+ *
95
+ * @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
96
+ */
97
+ edit: function( props ) {
98
+
99
+ const { attributes } = props;
100
+
101
+ const saveCallback = function( params ) {
102
+
103
+ const attributes = {
104
+ 'id': params.newProps.id
105
+ };
106
+
107
+ EcwidGutenbergParams.products[params.newProps.id] = {
108
+ name: params.newProps.product.name,
109
+ imageUrl: params.newProps.product.thumb
110
+ };
111
+
112
+ params.originalProps.setAttributes(attributes);
113
+ }
114
+
115
+ const editor = <div className="ec-store-block">
116
+ <div className="ec-store-block-header">
117
+ <svg className="dashicon" viewBox="0 0 20 20" width="20" height="20">
118
+ <path d={ EcwidGutenbergParams.productIcon }></path>
119
+ </svg>
120
+ { EcwidGutenbergParams.yourProductLabel }
121
+ </div>
122
+
123
+ { EcwidGutenbergParams.products && attributes.id && EcwidGutenbergParams.products[attributes.id] &&
124
+ <div className="ec-store-block-image">
125
+ <img src={ EcwidGutenbergParams.products[attributes.id].imageUrl }/>
126
+ </div>
127
+ }
128
+
129
+ { EcwidGutenbergParams.products && attributes.id && EcwidGutenbergParams.products[attributes.id] &&
130
+ <div className="ec-store-block-title">
131
+ { EcwidGutenbergParams.products[attributes.id].name }
132
+ </div>
133
+ }
134
+
135
+ { !attributes.id &&
136
+ <div>
137
+ <button className="button ec-store-block-button" onClick={ () => { var params = {'saveCallback':saveCallback, 'props': props}; ecwid_open_product_popup( params ); } }>{ EcwidGutenbergParams.chooseProduct }</button>
138
+ </div>
139
+ }
140
+
141
+ </div>;
142
+
143
+ function buildToggle(props, name, label) {
144
+ return <ToggleControl
145
+ label={ label }
146
+ checked={ props.attributes[name] }
147
+ onChange={ () => props.setAttributes( { [name]: ! props.attributes[name] } ) }
148
+ />
149
+ }
150
+
151
+ function openEcwidProductPopup( props ) {
152
+ ecwid_open_product_popup( { 'saveCallback': saveCallback, 'props': props } );
153
+ }
154
+
155
+ return ([
156
+ editor,
157
+ <InspectorControls>
158
+
159
+ { attributes.id &&
160
+ <div>
161
+ <div className="ec-store-inspector-row">
162
+ <label className="ec-store-inspector-subheader">{ __( 'Displayed product', 'ecwid-shopping-cart' ) }</label>
163
+ </div>
164
+ <div className="ec-store-inspector-row">
165
+
166
+ { EcwidGutenbergParams.products && EcwidGutenbergParams.products[attributes.id] &&
167
+ <label>{ EcwidGutenbergParams.products[attributes.id].name }</label>
168
+ }
169
+
170
+ <button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Change', 'ecwid-shopping-cart' ) }</button>
171
+ </div>
172
+ </div>
173
+ }
174
+ {!attributes.id &&
175
+ <div className="ec-store-inspector-row">
176
+ <button className="button" onClick={ () => openEcwidProductPopup( props ) }>{ __( 'Choose product', 'ecwid-shopping-cart' ) }</button>
177
+ </div>
178
+ }
179
+ <PanelBody title={ _x( 'Content', 'gutenberg-product-block', 'ecwid-shopping-cart' ) } initialOpen={false}>
180
+ { buildToggle( props, 'show_picture', __( 'Picture', 'ecwid-shopping-cart' ) ) }
181
+ { buildToggle( props, 'show_title', __( 'Title', 'ecwid-shopping-cart' ) ) }
182
+ { buildToggle( props, 'show_price', __( 'Price', 'ecwid-shopping-cart' ) ) }
183
+ { buildToggle( props, 'show_options', __( 'Options', 'ecwid-shopping-cart' ) ) }
184
+ { buildToggle( props, 'show_qty', __( 'Quantity', 'ecwid-shopping-cart' ) ) }
185
+ { buildToggle( props, 'show_addtobag', __( '«Buy now» button', 'ecwid-shopping-cart' ) ) }
186
+ </PanelBody>
187
+
188
+ <PanelBody title={ __( 'Appearance', 'ecwid-shopping-cart' ) } initialOpen={false}>
189
+ { buildToggle( props, 'show_price_on_button', __( 'Show price inside the «Buy now» button', 'ecwid-shopping-cart' ) ) }
190
+ { buildToggle( props, 'show_border', __( 'Add border', 'ecwid-shopping-cart' ) ) }
191
+ { buildToggle( props, 'center_align', __( 'Center align on a page', 'ecwid-shopping-cart' ) ) }
192
+ </PanelBody>
193
+ </InspectorControls>
194
+ ]);
195
+ },
196
+
197
+ save: function( props ) {
198
+ return false;
199
+ },
200
+
201
+ } );
202
+
203
+ }
js/gutenberg/store.jsx CHANGED
@@ -63,7 +63,7 @@ registerBlockType( 'ecwid/store-block', {
63
  <path d={ EcwidGutenbergParams.storeIcon }></path>
64
  </svg>
65
  ),
66
- category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
67
  attributes: EcwidGutenbergStoreBlockParams.attributes,
68
  description: __( 'Add storefront (product listing)', 'ecwid-shopping-cart' ),
69
  supports: {
63
  <path d={ EcwidGutenbergParams.storeIcon }></path>
64
  </svg>
65
  ),
66
+ category: 'ec-store', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
67
  attributes: EcwidGutenbergStoreBlockParams.attributes,
68
  description: __( 'Add storefront (product listing)', 'ecwid-shopping-cart' ),
69
  supports: {
js/product-popup.js CHANGED
@@ -1,4 +1,8 @@
1
  jQuery(document).ready(function() {
 
 
 
 
2
  var popup = function() {
3
  return jQuery('#ecwid-product-popup-content');
4
  };
@@ -28,32 +32,18 @@ jQuery(document).ready(function() {
28
 
29
  setSelectedProduct(null);
30
 
 
31
  if (popup().data('params')) {
32
-
33
  var props = popup().data('params').props.attributes;
34
- if (props.id) {
35
- var productTemplate = wp.template('selected-product');
36
 
 
37
  setSelectedProduct(
38
- {'name': props.productName, 'thumb': props.productImageURL, 'sku': props.productSKU, 'id': props.id}
39
- );
40
-
41
- var productHtml = productTemplate(
42
- getSelectedProduct()
43
  );
44
-
45
- jQuery('.media-frame-content.selected-product').empty().append(productHtml);
46
- changeMode('selected-product');
47
- changeTab('selected-product');
48
-
49
- jQuery('#choose-another-product').click(function() {
50
- jQuery('.media-modal-content', popup()).attr('data-active-dialog', 'add-product');
51
- jQuery('.media-button-update').addClass('disabled');
52
- });
53
- jQuery('media-modal-content', popup()).attr('data-mode', 'selected-product');
54
- changeTab('customize');
55
  }
56
- }
 
 
57
 
58
  if ( !getSelectedProduct() ) {
59
  changeMode('add-product');
1
  jQuery(document).ready(function() {
2
+ if ( typeof wp !== 'undefined' && typeof wp.blocks !== 'undefined' ) {
3
+ jQuery('#ecwid-product-popup-content').addClass('gutenberg');
4
+ }
5
+
6
  var popup = function() {
7
  return jQuery('#ecwid-product-popup-content');
8
  };
32
 
33
  setSelectedProduct(null);
34
 
35
+
36
  if (popup().data('params')) {
 
37
  var props = popup().data('params').props.attributes;
 
 
38
 
39
+ if (props.id) {
40
  setSelectedProduct(
41
+ { 'id': props.id }
 
 
 
 
42
  );
 
 
 
 
 
 
 
 
 
 
 
43
  }
44
+ changeMode('selected-product');
45
+
46
+ }
47
 
48
  if ( !getSelectedProduct() ) {
49
  changeMode('add-product');
languages/ecwid-shopping-cart-ru_RU.mo CHANGED
Binary file
languages/ecwid-shopping-cart-ru_RU.po CHANGED
@@ -1491,7 +1491,7 @@ msgstr "Количество"
1491
 
1492
  #: templates/product-popup.php:176
1493
  msgid "«Buy now» button"
1494
- msgstr "Кнопка \"Купить\""
1495
 
1496
  #: templates/product-popup.php:196
1497
  msgid "Add border"
@@ -1501,6 +1501,10 @@ msgstr "Показывать рамку"
1501
  msgid "Show price inside the \"Buy now\" button"
1502
  msgstr "Показывать цену в кнопке \"Купить\""
1503
 
 
 
 
 
1504
  #: templates/product-popup.php:206
1505
  msgid "Center align on a page"
1506
  msgstr "Выровнять карточку по центру страницы"
@@ -1517,6 +1521,28 @@ msgstr "выбрать товар"
1517
  msgid "Insert"
1518
  msgstr "Вставить"
1519
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1520
  #: templates/reconnect-sso.php:11
1521
  msgid "Your store Control Panel. Right here in WordPress."
1522
  msgstr "Панель управления магазином, встроенная в Wordpress."
1491
 
1492
  #: templates/product-popup.php:176
1493
  msgid "«Buy now» button"
1494
+ msgstr "Кнопка «Купить»"
1495
 
1496
  #: templates/product-popup.php:196
1497
  msgid "Add border"
1501
  msgid "Show price inside the \"Buy now\" button"
1502
  msgstr "Показывать цену в кнопке \"Купить\""
1503
 
1504
+ #: templates/product-popup.php:201
1505
+ msgid "Show price inside the «Buy now» button"
1506
+ msgstr "Показывать цену в кнопке «Купить»"
1507
+
1508
  #: templates/product-popup.php:206
1509
  msgid "Center align on a page"
1510
  msgstr "Выровнять карточку по центру страницы"
1521
  msgid "Insert"
1522
  msgstr "Вставить"
1523
 
1524
+ msgid "Display product with a buy button"
1525
+ msgstr "Товар с кнопкой \"Купить\""
1526
+
1527
+ msgctxt "gutenberg-product-block"
1528
+ msgid "Content"
1529
+ msgstr "Элементы виджета"
1530
+
1531
+ msgid "Displayed product"
1532
+ msgstr "Выбранный товар"
1533
+
1534
+ msgid "Change"
1535
+ msgstr "Изменить"
1536
+
1537
+ msgid "Choose product"
1538
+ msgstr "Выбрать товар"
1539
+
1540
+ msgid "Your product"
1541
+ msgstr "Товар"
1542
+
1543
+ msgid "%s product"
1544
+ msgstr "%s товар"
1545
+
1546
  #: templates/reconnect-sso.php:11
1547
  msgid "Your store Control Panel. Right here in WordPress."
1548
  msgstr "Панель управления магазином, встроенная в Wordpress."
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Ecwid
3
  Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
4
  Requires at least: 3.7
5
  Tested up to: 5.0
6
- Stable tag: 6.4.7
7
 
8
  Powerful, easy to use ecommerce shopping cart. Sell on Facebook and Instagram. iPhone & Android apps. Superb support. Free plan available.
9
 
@@ -150,8 +150,14 @@ 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.4.7 - Dec 14, 2018 =
154
- - - **Compatibility fixes for Elementor and Gravity Forms.** Thanks to a user report, we found a few glitches in how the Ecwid e-commerce plugin works with Elementor and Gravity Forms. All fixed — the plugins should work fine together now
155
 
156
  = 6.4.6 - Dec 7, 2018 =
157
  - Minor fixes & improvements.
3
  Tags: ecommerce, downloadable products, Facebook ecommerce, online store, paypal, product catalog, shop, shopping cart, store
4
  Requires at least: 3.7
5
  Tested up to: 5.0
6
+ Stable tag: 6.4.8
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.4.8 - Dec 26, 2018 =
154
+ - **Improved settings interface for the "Product" block in Gutenberg (the new WordPress page editor)**. You can add a single product to any of your pages or posts using the Ecwid ecommerce "Product" block and fine-tune its layout in the block settings on the right side in the editor.
155
+ - **Resolved a minor layout issue caused by the Embed Any Document plugin.** The Embed Any Document plugin adds a breaking CSS code to the Wordpress admin backend which caused some of the Ecwid plugin admin pages display incorreclty. We fixed that, the plugins are now compatible.
156
+ - **SEO enhancement: improved canonical tags for the sites that display different store categories on different site pages.** In such case, the canonical tags on products and categories pages will keep the pages structure as is (link to the page that they are opened from). Otherwise, if you have one main store page displaying the whole catalog, the product/categories canonical tags will link to the main store page to avoid duplicates issues and make your e-commerce store appear better in the Google search results.
157
+ - Minor improvements for the Ecwid admin backend pages navigation.
158
+
159
  = 6.4.7 - Dec 14, 2018 =
160
+ - **Compatibility fixes for Elementor and Gravity Forms.** Thanks to a user report, we found a few glitches in how the Ecwid e-commerce plugin works with Elementor and Gravity Forms. All fixed — the plugins should work fine together now
161
 
162
  = 6.4.6 - Dec 7, 2018 =
163
  - Minor fixes & improvements.
templates/admin-footer.php CHANGED
@@ -22,7 +22,7 @@
22
 
23
  <?php endif; ?>
24
 
25
- <?php if (@$show_reconnect && Ecwid_Config::should_show_reconnect_in_footer()): ?>
26
  <div class="ecwid-admin-footer-block">
27
  <h4 class="ecwid-admin-footer-title"><?php printf( __('Want to connect another %s store?', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ); ?></h4>
28
  <div class="ecwid-admin-footer-text">
22
 
23
  <?php endif; ?>
24
 
25
+ <?php if ( @$show_reconnect && Ecwid_Config::should_show_reconnect_in_footer() ): ?>
26
  <div class="ecwid-admin-footer-block">
27
  <h4 class="ecwid-admin-footer-title"><?php printf( __('Want to connect another %s store?', 'ecwid-shopping-cart'), Ecwid_Config::get_brand() ); ?></h4>
28
  <div class="ecwid-admin-footer-text">
templates/admin-timeout.php CHANGED
@@ -1,5 +1,5 @@
1
  <div class="ecwid-admin-timeout">
2
- <div class="box">
3
  <div class="logo">
4
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70">
5
  <path d="M34.5 67C16.58 67 2 52.42 2 34.5S16.58 2 34.5 2 67 16.58 67 34.5 52.42 67 34.5 67zm0-62C18.23 5 5 18.23 5 34.5S18.23 64 34.5 64 64 50.77 64 34.5 50.77 5 34.5 5z"></path>
1
  <div class="ecwid-admin-timeout">
2
+ <div class="ec-store-box">
3
  <div class="logo">
4
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70">
5
  <path d="M34.5 67C16.58 67 2 52.42 2 34.5S16.58 2 34.5 2 67 16.58 67 34.5 52.42 67 34.5 67zm0-62C18.23 5 5 18.23 5 34.5S18.23 64 34.5 64 64 50.77 64 34.5 50.77 5 34.5 5z"></path>
templates/admin/legacy-connect.tpl.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="wrap ecwid-admin">
2
 
3
- <div class="box">
4
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
5
 
6
  <form method="POST" action="options.php" class="pure-form ecwid-settings general-settings">
1
  <div class="wrap ecwid-admin">
2
 
3
+ <div class="ec-store-box">
4
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
5
 
6
  <form method="POST" action="options.php" class="pure-form ecwid-settings general-settings">
templates/admin/simple-connect.tpl.php CHANGED
@@ -4,7 +4,7 @@
4
  ?>
5
 
6
  <div class="wrap ecwid-admin ecwid-connect<?php if ($no_oauth): ?> no-oauth<?php else: ?> with-oauth<?php endif; ?>">
7
- <div class="box">
8
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
9
 
10
  <div class="greeting-image">
4
  ?>
5
 
6
  <div class="wrap ecwid-admin ecwid-connect<?php if ($no_oauth): ?> no-oauth<?php else: ?> with-oauth<?php endif; ?>">
7
+ <div class="ec-store-box">
8
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
9
 
10
  <div class="greeting-image">
templates/admin/simple-dashboard.php CHANGED
@@ -1,5 +1,5 @@
1
  <div class="wrap ecwid-admin ecwid-dashboard">
2
- <div class="box">
3
  <div class="head">
4
  <?php ecwid_embed_svg( 'ecwid-logo-blue' );?>
5
  <h3>
1
  <div class="wrap ecwid-admin ecwid-dashboard">
2
+ <div class="ec-store-box">
3
  <div class="head">
4
  <?php ecwid_embed_svg( 'ecwid-logo-blue' );?>
5
  <h3>
templates/admin/simple-reconnect.tpl.php CHANGED
@@ -5,7 +5,7 @@ global $ecwid_oauth;
5
 
6
  ?>
7
  <div class="wrap ecwid-admin ecwid-connect ecwid-reconnect">
8
- <div class="box">
9
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
10
 
11
  <div class="greeting-image">
5
 
6
  ?>
7
  <div class="wrap ecwid-admin ecwid-connect ecwid-reconnect">
8
+ <div class="ec-store-box">
9
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
10
 
11
  <div class="greeting-image">
templates/ecwid-admin.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  jQuery(document).ready(function() {
5
  document.body.className += ' ecwid-no-padding';
6
- $ = jQuery;
7
  // Create IE + others compatible event handler
8
  var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
9
  var eventer = window[eventMethod];
@@ -12,31 +12,11 @@
12
  // Listen to message from child window
13
  eventer(messageEvent,function(e) {
14
  if (typeof e.data.height != 'undefined') {
15
- $('#ecwid-frame').css('height', e.data.height + 'px');
16
- } else if (
17
- e.data.action
18
- && e.data.action == 'navigationMenuUpdated'
19
- && e.data.data && e.data.data.navigationMenuItems
20
- && e.data.data.navigationMenuItems.length > 0
21
- && ecwid_admin_menu.enableAutoMenus
22
- ) {
23
- jQuery.ajax({
24
- 'url': ajaxurl + '?action=<?php echo Ecwid_Admin::AJAX_ACTION_UPDATE_MENU; ?>',
25
- 'method': 'POST',
26
- 'data': {
27
- menu: e.data.data.navigationMenuItems
28
- },
29
- 'success': function(result) {
30
- jQuery('li[data-ecwid-dynamic-menu]').remove();
31
- ecwidAddMenuItems(jQuery.parseJSON(result));
32
- ecwidRefreshEcwidMenuItemSelection();
33
- jQuery(window).trigger('resize');
34
- }
35
- });
36
- }
37
  },false);
38
 
39
- $('#ecwid-frame').attr('src', '<?php echo $iframe_src; ?>');
40
  ecwidSetPopupCentering('#ecwid-frame');
41
  });
42
  //]]>
3
 
4
  jQuery(document).ready(function() {
5
  document.body.className += ' ecwid-no-padding';
6
+
7
  // Create IE + others compatible event handler
8
  var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
9
  var eventer = window[eventMethod];
12
  // Listen to message from child window
13
  eventer(messageEvent,function(e) {
14
  if (typeof e.data.height != 'undefined') {
15
+ jQuery('#ecwid-frame').css('height', e.data.height + 'px');
16
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  },false);
18
 
19
+ jQuery('#ecwid-frame').attr('src', '<?php echo $iframe_src; ?>');
20
  ecwidSetPopupCentering('#ecwid-frame');
21
  });
22
  //]]>
templates/reconnect-sso.php CHANGED
@@ -1,5 +1,5 @@
1
  <div class="wrap ecwid-admin ecwid-connect ecwid-reconnect-allow-sso">
2
- <div class="box">
3
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
4
 
5
  <div class="main-wrap">
1
  <div class="wrap ecwid-admin ecwid-connect ecwid-reconnect-allow-sso">
2
+ <div class="ec-store-box">
3
  <?php require ECWID_PLUGIN_DIR . 'templates/admin-head.php'; ?>
4
 
5
  <div class="main-wrap">