Ecwid Ecommerce Shopping Cart - Version 2.0

Version Description

  • New revamped plugin settings: the new settings layout makes the plugin easy and intuitive for starters, yet powerful and advanced for experienced merchants.

  • Multilingual plugin backend: the plugin settings now support multilanguage. Currently available in English and Russian. More translations are coming!

  • SEO improvements

    • Auto generated meta description tags for the product and category pages. Now, Google should properly index product/category descriptions and display them in the search results.
    • <title> tags for categories. The SEO category pages in your store now include both title and description tags so they will appear in Google search results properly.
  • Smooth HTTP/HTTPS switch: Ecwid always transfers all sensitive data using secure HTTPS connection and a special 'HTTPS' option in the Ecwid plugin settings is not necessary anymore. Now, the plugin detects connection type and adjust Ecwid integration codes automatically. No manual adjustments are needed regardless of whether you run your site under HTTP or HTTPS.

  • Improved compatibility with CloudFlare Rocket Loader: previously, using CloudFlare Rocket Loader along with Ecwid might cause intermittent loading issues for some stores. We've improved the plugin code to prevent such issues.

Download this release

Release Info

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

Code changes from version 1.8.1 to 2.0

css/admin.css ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wpadminbar .ecwid-top-menu-item {
2
+ width: 23px;
3
+ height: 28px;
4
+ background: url(../images/icon-head-default.png) no-repeat 0% 2px;
5
+ }
6
+
7
+ #wpadminbar .ecwid-top-menu-item:hover,
8
+ #wpadminbar .hover .ecwid-top-menu-item{
9
+ background-image: url(../images/icon-head-active.png);
10
+ }
11
+
12
+ #adminmenu #toplevel_page_ecwid div.wp-menu-image {
13
+ background: url(../images/icon-sidebar-default.png) no-repeat 5px 2px;
14
+ margin: 2px 3px 2px 2px;
15
+ width: 23px;
16
+ height: 23px;
17
+ }
18
+
19
+ #adminmenu #toplevel_page_ecwid:hover div.wp-menu-image,
20
+ #adminmenu #toplevel_page_ecwid.wp-has-current-submenu div.wp-menu-image
21
+ {
22
+ background-image: url(../images/icon-sidebar-active.png);
23
+ }
24
+
25
+ .ecwid-settings h2 {
26
+ background:url(../images/icon-title.png) no-repeat 0% 50%;
27
+ padding-left: 43px;
28
+ line-height: 32px;
29
+ margin-bottom: 30px;
30
+ }
css/pure-min.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Pure v0.3.0
3
+ Copyright 2013 Yahoo! Inc. All rights reserved.
4
+ Licensed under the BSD License.
5
+ https://github.com/yui/pure/blob/master/LICENSE.md
6
+ */
7
+ /*!
8
+ normalize.css v1.1.2 | MIT License | git.io/normalize
9
+ Copyright (c) Nicolas Gallagher and Jonathan Neal
10
+ */
11
+ /*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}.pure-button{display:inline-block;*display:inline;zoom:1;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-size:100%;*font-size:90%;*overflow:visible;padding:.5em 1.5em;color:#444;color:rgba(0,0,0,.8);*color:#444;border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px;-webkit-transition:.1s linear -webkit-box-shadow;-moz-transition:.1s linear -moz-box-shadow;-ms-transition:.1s linear box-shadow;-o-transition:.1s linear box-shadow;transition:.1s linear box-shadow}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-ms-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;font-size:.8em;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-transition:.3s linear border;-moz-transition:.3s linear border;-ms-transition:.3s linear border;-o-transition:.3s linear border;transition:.3s linear border;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input[type=text]:focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;outline:thin dotted \9;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus,.pure-form input[type=checkbox]:focus{outline:thin dotted #333;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=text][disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border:1px solid #ee5f5b}.pure-form input:focus:invalid:focus,.pure-form textarea:focus:invalid:focus,.pure-form select:focus:invalid:focus{border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em;font-size:90%}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;font-size:125%;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=text],.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-aligned .pure-help-inline,.pure-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 10em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input{display:block;padding:10px;margin:0;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus{z-index:2}.pure-form .pure-group input:first-child{top:1px;border-radius:4px 4px 0 0}.pure-form .pure-group input:last-child{top:-2px;border-radius:0 0 4px 4px}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:90%}.pure-form-message{display:block;color:#666;font-size:90%}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form label{margin-bottom:.3em;display:block}.pure-group input[type=text],.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=color]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message-inline,.pure-form-message{display:block;font-size:80%;padding:.2em 0 .8em}}.pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-5-24,.pure-u-7-24,.pure-u-11-24,.pure-u-13-24,.pure-u-17-24,.pure-u-19-24,.pure-u-23-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1{width:100%}.pure-u-1-2{width:50%;*width:49.969%}.pure-u-1-3{width:33.3333%;*width:33.3023%}.pure-u-2-3{width:66.6667%;*width:66.6357%}.pure-u-1-4{width:25%;*width:24.969%}.pure-u-3-4{width:75%;*width:74.969%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-1-6{width:16.6667%;*width:16.6357%}.pure-u-5-6{width:83.3333%;*width:83.3023%}.pure-u-1-8{width:12.5%;*width:12.469%}.pure-u-3-8{width:37.5%;*width:37.469%}.pure-u-5-8{width:62.5%;*width:62.469%}.pure-u-7-8{width:87.5%;*width:87.469%}.pure-u-1-12{width:8.3333%;*width:8.3023%}.pure-u-5-12{width:41.6667%;*width:41.6357%}.pure-u-7-12{width:58.3333%;*width:58.3023%}.pure-u-11-12{width:91.6667%;*width:91.6357%}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-g-r{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap}.opera-only :-o-prefocus,.pure-g-r{word-spacing:-.43em}.pure-g-r [class *="pure-u"]{font-family:sans-serif}.pure-g-r img{max-width:100%;height:auto}@media (min-width:980px){.pure-visible-phone{display:none}.pure-visible-tablet{display:none}.pure-hidden-desktop{display:none}}@media (max-width:480px){.pure-g-r>.pure-u,.pure-g-r>[class *="pure-u-"]{width:100%}}@media (max-width:767px){.pure-g-r>.pure-u,.pure-g-r>[class *="pure-u-"]{width:100%}.pure-hidden-phone{display:none}.pure-visible-desktop{display:none}}@media (min-width:768px) and (max-width:979px){.pure-hidden-tablet{display:none}.pure-visible-desktop{display:none}}.pure-menu ul{position:absolute;visibility:hidden}.pure-menu.pure-menu-open{visibility:visible;z-index:2;width:100%}.pure-menu ul{left:-10000px;list-style:none;margin:0;padding:0;top:-10000px;z-index:1}.pure-menu>ul{position:relative}.pure-menu-open>ul{left:0;top:0;visibility:visible}.pure-menu-open>ul:focus{outline:0}.pure-menu li{position:relative}.pure-menu a,.pure-menu .pure-menu-heading{display:block;color:inherit;line-height:1.5em;padding:5px 20px;text-decoration:none;white-space:nowrap}.pure-menu.pure-menu-horizontal>.pure-menu-heading{display:inline-block;*display:inline;zoom:1;margin:0;vertical-align:middle}.pure-menu.pure-menu-horizontal>ul{display:inline-block;*display:inline;zoom:1;vertical-align:middle;height:2.4em}.pure-menu li a{padding:5px 20px}.pure-menu-can-have-children>.pure-menu-label:after{content:'\25B8';float:right;font-family:'Lucida Grande','Lucida Sans Unicode','DejaVu Sans',sans-serif;margin-right:-20px;margin-top:-1px}.pure-menu-can-have-children>.pure-menu-label{padding-right:30px}.pure-menu-separator{background-color:#dfdfdf;display:block;height:1px;font-size:0;margin:7px 2px;overflow:hidden}.pure-menu-hidden{display:none}.pure-menu-fixed{position:fixed;top:0;left:0;width:100%}.pure-menu-horizontal li{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-horizontal li li{display:block}.pure-menu-horizontal>.pure-menu-children>.pure-menu-can-have-children>.pure-menu-label:after{content:"\25BE"}.pure-menu-horizontal>.pure-menu-children>.pure-menu-can-have-children>.pure-menu-label{padding-right:30px}.pure-menu-horizontal li.pure-menu-separator{height:50%;width:1px;margin:0 7px}.pure-menu-horizontal li li.pure-menu-separator{height:1px;width:auto;margin:7px 2px}.pure-menu.pure-menu-open,.pure-menu.pure-menu-horizontal li .pure-menu-children{background:#fff;border:1px solid #b7b7b7}.pure-menu.pure-menu-horizontal,.pure-menu.pure-menu-horizontal .pure-menu-heading{border:0}.pure-menu a{border:1px solid transparent;border-left:0;border-right:0}.pure-menu a,.pure-menu .pure-menu-can-have-children>li:after{color:#777}.pure-menu .pure-menu-can-have-children>li:hover:after{color:#fff}.pure-menu .pure-menu-open{background:#dedede}.pure-menu li a:hover,.pure-menu li a:focus{background:#eee}.pure-menu li.pure-menu-disabled a:hover,.pure-menu li.pure-menu-disabled a:focus{background:#fff;color:#bfbfbf}.pure-menu .pure-menu-disabled>a{background-image:none;border-color:transparent;cursor:default}.pure-menu .pure-menu-disabled>a,.pure-menu .pure-menu-can-have-children.pure-menu-disabled>a:after{color:#bfbfbf}.pure-menu .pure-menu-heading{color:#565d64;text-transform:uppercase;font-size:90%;margin-top:.5em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#dfdfdf}.pure-menu .pure-menu-selected a{color:#000}.pure-menu.pure-menu-open.pure-menu-fixed{border:0;border-bottom:1px solid #b7b7b7}.pure-paginator{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;list-style:none;margin:0;padding:0}.opera-only :-o-prefocus,.pure-paginator{word-spacing:-.43em}.pure-paginator li{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-paginator .pure-button{border-radius:0;padding:.8em 1.4em;vertical-align:top;height:1.1em}.pure-paginator .pure-button:focus,.pure-paginator .pure-button:active{outline-style:none}.pure-paginator .prev,.pure-paginator .next{color:#C0C1C3;text-shadow:0 -1px 0 rgba(0,0,0,.45)}.pure-paginator .prev{border-radius:2px 0 0 2px}.pure-paginator .next{border-radius:0 2px 2px 0}@media (max-width:480px){.pure-menu-horizontal{width:100%}.pure-menu-children li{display:block;border-bottom:1px solid #000}}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:6px 12px}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child td,.pure-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child td{border-bottom-width:0}
css/settings.css ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .pure-form.ecwid-settings fieldset {
2
+ font-size: 14px;
3
+ }
4
+
5
+ .pure-form.ecwid-settings fieldset > :not(legend) {
6
+ margin-left:14px;
7
+ }
8
+
9
+ .pure-form.ecwid-settings .pure-button {
10
+ height: auto;
11
+ line-height: 32px;
12
+ padding: 0px 20px;
13
+ font-size: 14px;
14
+ background-image: none;
15
+ background-color: #f6f6f6;
16
+ font-weight: normal;
17
+ color: #333333;
18
+ border: 1px solid #cccccc;
19
+ border-radius: 3px;
20
+ }
21
+
22
+ .pure-form.ecwid-settings .pure-button-secondary {
23
+ font-weight: bold;
24
+ color: #246fba;
25
+ }
26
+
27
+ .pure-form.ecwid-settings a.pure-button:not(.pure-button-primary):hover {
28
+ border-color: #137ebe;
29
+ color: #137ebe;
30
+ }
31
+
32
+ .pure-form.ecwid-settings .pure-button.pure-button-primary {
33
+ color: white;
34
+ font-weight: normal;
35
+ border-color: #189DEE;
36
+ background-color: #189DEE;
37
+ }
38
+
39
+ .pure-form.ecwid-settings .pure-button.pure-button-primary:hover {
40
+ border-color: #137ebe;
41
+ background-color: #137ebe;
42
+ }
43
+
44
+ .pure-form.ecwid-settings .link {
45
+ border: 0px none;
46
+ background: transparent;
47
+ box-shadow: none;
48
+ }
49
+
50
+ /* 2.8 compatibility for left menu icon */
51
+ .wp-menu-image>a>img {
52
+ display: none;
53
+ }
54
+
55
+ .ecwid-settings {
56
+ width: 650px;
57
+ }
58
+
59
+ .ecwid-settings .pure-control-group {
60
+ margin-bottom: 19px;
61
+ }
62
+
63
+ .ecwid-settings legend {
64
+ margin-bottom: 10px;
65
+ }
66
+
67
+ .ecwid-settings hr {
68
+ margin-left: 0px;
69
+ border: 0px none;
70
+ height: 1px;
71
+ background: #e5e5e5;
72
+ margin-bottom: 20px;
73
+ }
74
+
75
+ .pure-form.ecwid-settings .pure-control-group label {
76
+ width: 232px;
77
+ font-weight: bold;
78
+ text-align: left;
79
+ margin-right: 5px;
80
+ }
81
+
82
+ .ecwid-settings.general-settings button {
83
+ position: relative;
84
+ top: 2px;
85
+ padding: 5px 31px 5px 31px;
86
+ margin-left: 5px;
87
+ }
88
+
89
+ .ecwid-settings.general-settings hr {
90
+ margin-bottom: 6px;
91
+ }
92
+
93
+ .ecwid-settings .warning {
94
+ background: #FFF797;
95
+ font-size: 12px;
96
+ padding: 8px 14px 8px 14px;
97
+ font-weight: bold;
98
+ color: #444444;
99
+ }
100
+
101
+ .ecwid-settings.appearance-settings h3 {
102
+ font-size: 12px;
103
+ }
104
+
105
+ .ecwid-settings.appearance-settings input[type=text] {
106
+ font-size: 13px;
107
+ padding: 5px 3px 4px 3px;
108
+ outline: 1px solid white;
109
+ outline-offset: 0px;
110
+ }
111
+
112
+ .ecwid-settings input[type=text].number {
113
+ width: 27px;
114
+ text-align: center;
115
+ }
116
+
117
+ .ecwid-settings select {
118
+ padding: 5px;
119
+ }
120
+
121
+ .ecwid-settings .note.pb-note {
122
+ margin-right: 30px;
123
+ margin-left: 30px;
124
+ }
125
+
126
+ .ecwid-settings.appearance-settings {
127
+ max-width: 650px;
128
+ }
129
+
130
+ .ecwid-settings.appearance-settings .products-per-page-label {
131
+ padding-top: 5px;
132
+ padding-bottom: 15px;
133
+ display: block;
134
+ }
135
+
136
+ .ecwid-settings.appearance-settings input[type=checkbox] {
137
+ margin-right: 3px;
138
+ margin-left: 7px;
139
+ }
140
+
141
+ .ecwid-pb-view-size {
142
+ display: inline-block;
143
+ position: relative;
144
+ width: 153px;
145
+ height: 153px;
146
+ margin-left: 30px;
147
+ margin-right: 25px;
148
+ }
149
+
150
+ .ecwid-pb-view-size .title {
151
+ margin: 8px;
152
+ width: 110px;
153
+ text-align: center;
154
+ }
155
+
156
+ .ecwid-pb-view-size * {
157
+ transition: background-image .3s, border-color .3s, font-weight .3s;
158
+ }
159
+
160
+ .ecwid-pb-view-size.grid .main-area {
161
+ background-image: url(../images/grid-default.png);
162
+ }
163
+
164
+ .ecwid-pb-view-size.list .main-area {
165
+ background-image: url(../images/list-default.png);
166
+ }
167
+
168
+ .ecwid-pb-view-size.table .main-area {
169
+ background-image: url(../images/table-default.png);
170
+ }
171
+
172
+ .ecwid-pb-view-size .main-area {
173
+ width: 116px;
174
+ height: 82px;
175
+ border: 2px solid #d1eef6;
176
+ border-radius: 2px;
177
+ float: left;
178
+ background-position: 50% 50%;
179
+ background-repeat: no-repeat;
180
+ }
181
+
182
+ .ecwid-pb-view-size .right {
183
+ height:86px;
184
+ float: right;
185
+ position: relative;
186
+ }
187
+
188
+ .ecwid-pb-view-size .right input
189
+ {
190
+ margin-top: 30px;
191
+ }
192
+
193
+ .ecwid-pb-view-size .bottom input
194
+ {
195
+ margin-left: 48px;
196
+ }
197
+
198
+ .ecwid-pb-view-size .bottom {
199
+ width: 120px;
200
+ margin-top: 8px;
201
+ position: absolute;
202
+ top: 114px;
203
+ }
204
+
205
+ .ecwid-pb-view-size .ruler {
206
+ position: absolute;
207
+ background: #cccccc;
208
+ z-index: -1;
209
+ }
210
+
211
+ .ecwid-pb-view-size .right .ruler {
212
+ width: 1px;
213
+ height: 100%;
214
+ right: 13px;
215
+ }
216
+
217
+ .ecwid-pb-view-size .bottom .ruler {
218
+ width: 100%;
219
+ height: 1px;
220
+ bottom: 12px;
221
+ }
222
+
223
+ .ecwid-settings.advanced-settings .pure-control-group {
224
+ margin-bottom: 20px;
225
+ }
226
+
227
+ .ecwid-settings.advanced-settings .pure-control-group.last {
228
+ margin-bottom: 0px;
229
+ }
230
+
231
+ .ecwid-settings.advanced-settings input,
232
+ .ecwid-settings.advanced-settings select
233
+ {
234
+ width: 160px;
235
+ height: 25px;
236
+ margin-right: 15px;
237
+ }
238
+
239
+ .ecwid-settings.advanced-settings .note {
240
+ margin-top: 15px;
241
+ }
242
+
243
+ .ecwid-settings .note.inline-note {
244
+ max-width: 300px;
245
+ margin-left: 15px;
246
+ vertical-align: middle;
247
+ }
248
+
249
+ .general-settings {
250
+ font-size: 14px;
251
+ max-width: 750px;
252
+ }
253
+
254
+ .general-settings .greeting-box {
255
+ background: url(../images/store_inprogress.png);
256
+ background-repeat: no-repeat;
257
+ background-position: 18px 3px;
258
+ height: 141px;
259
+ padding-left: 190px;
260
+ padding-bottom: 12px;
261
+ display: table-cell;
262
+ vertical-align: middle;
263
+ }
264
+
265
+ .general-settings .greeting-box.complete {
266
+ background-image: url(../images/store_ready.png);
267
+ height: 141px;
268
+ }
269
+
270
+ .general-settings .greeting-box .main-message {
271
+ font-size: 22px;
272
+ font-weight: bold;
273
+ line-height: 22px;
274
+ }
275
+
276
+ .general-settings .greeting-box .secondary-message {
277
+ font-size: 18px;
278
+ padding-top: 6px;
279
+ line-height: 20px;
280
+ }
281
+
282
+ .general-settings ol {
283
+ margin-top: 30px;
284
+ padding-left: 10px;
285
+ list-style-position: inside;
286
+ }
287
+
288
+ .general-settings ol li {
289
+ font-size: 20px;
290
+ margin-bottom: 34px;
291
+ font-weight: bold;
292
+ padding-top: 10px;
293
+ }
294
+
295
+ .general-settings ol li * {
296
+ color: #333333;
297
+ font-size:13px;
298
+ font-weight: normal;
299
+ }
300
+
301
+ .general-settings ol li h4 {
302
+ font-size: 20px;
303
+ font-weight: bold;
304
+ margin: 0px 0px 12px;
305
+ display: inline-block;
306
+ }
307
+
308
+ .general-settings .ecwid-account-buttons .pure-button {
309
+ margin: 20px 17px 20px 0px;
310
+ }
311
+
312
+ .general-settings p.note {
313
+ font-weight: bold;
314
+ }
315
+
316
+ .ecwid-settings .note {
317
+ font-size: 11px;
318
+ color: #A0A0A0;
319
+ display: inline-block;
320
+ line-height: 16px;
321
+ }
322
+
323
+
324
+ .general-settings input[type=text] {
325
+ height: 34px;
326
+ font-size: 14px;
327
+ }
328
+
329
+ .general-settings .find-store-id-in-cp {
330
+ line-height: 18px;
331
+ margin-bottom: 15px;
332
+ }
333
+
334
+ .general-settings .find-store-id-in-cp em {
335
+ color: #246fba;
336
+ font-style: normal;
337
+ }
338
+
339
+ .general-settings #ecwid_store_id {
340
+ position: relative;
341
+ top: 2px;
342
+ width: 153px;
343
+ }
344
+
345
+ .general-settings .section {
346
+ line-height: 24px;
347
+ height: 80px;
348
+ display: table;
349
+ vertical-align: middle;
350
+ width: 640px;
351
+ }
352
+
353
+ .general-settings .section .left {
354
+ display: table-cell;
355
+ vertical-align: middle;
356
+ }
357
+
358
+ .general-settings .section .right {
359
+ display: table-cell;
360
+ vertical-align: middle;
361
+ text-align: right;
362
+ }
363
+
364
+ .general-settings .section.small-text {
365
+ line-height: normal;
366
+ }
367
+
368
+
369
+ .general-settings .section .left-section {
370
+ float: left;
371
+ }
372
+
373
+ .general-settings .section .main-info {
374
+ font-size: 18px;
375
+ }
376
+
377
+ .general-settings .section .secondary-info {
378
+ font-size: 12px;
379
+ line-height: 20px;
380
+ }
381
+
382
+ .ecwid-settings .note.grayed-links,
383
+ .ecwid-settings .note.grayed-links a:not(:hover)
384
+ {
385
+ font-size: 11px;
386
+ color: #A0A0A0;
387
+ margin-top:10px;
388
+ margin-bottom: 10px;
389
+ }
ecwid-shopping-cart.php CHANGED
@@ -4,20 +4,32 @@ Plugin Name: Ecwid Shopping Cart
4
  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
  Author: Ecwid Team
7
- Version: 1.8.1
8
  Author URI: http://www.ecwid.com?source=wporg
9
  */
10
 
11
  register_activation_hook( __FILE__, 'ecwid_store_activate' );
12
  register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
13
 
14
- define("APP_ECWID_COM","app.ecwid.com");
 
 
 
 
 
 
 
 
 
15
 
16
  if ( is_admin() ){
17
  add_action('admin_init', 'ecwid_settings_api_init');
18
  add_action('admin_notices', 'ecwid_show_admin_message');
19
  add_action('admin_menu', 'ecwid_options_add_page');
20
  add_action('wp_dashboard_setup', 'ecwid_add_dashboard_widgets' );
 
 
 
21
  } else {
22
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
23
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
@@ -30,6 +42,7 @@ if ( is_admin() ){
30
  add_action('wp_head', 'ecwid_meta');
31
  add_action('wp_title', 'ecwid_seo_compatibility_init', 0);
32
  add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
 
33
  $ecwid_seo_title = '';
34
  }
35
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
@@ -42,27 +55,36 @@ if (version_compare($version, '3.6') < 0) {
42
  * http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/shortcodes.php
43
  */
44
 
45
- function shortcode_exists( $tag ) {
46
- global $shortcode_tags;
47
- return array_key_exists( $tag, $shortcode_tags );
 
 
48
  }
49
 
50
- function has_shortcode( $content, $tag ) {
51
- if ( shortcode_exists( $tag ) ) {
52
- preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
53
- if ( empty( $matches ) )
54
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- foreach ( $matches as $shortcode ) {
57
- if ( $tag === $shortcode[2] ) {
58
- return true;
59
- }
60
- }
61
- return false;
62
- }
63
- }
64
  }
65
 
 
66
 
67
  function ecwid_backward_compatibility() {
68
 
@@ -109,6 +131,7 @@ function ecwid_seo_compatibility_init($title)
109
  // Canonical for Yoast Wordpress SEO
110
  global $wpseo_front;
111
  remove_action( 'wpseo_head', array( $wpseo_front, 'canonical' ), 20);
 
112
 
113
  // Canonical for Platinum SEO Pack
114
  ecwid_override_option('psp_canonical', false);
@@ -119,9 +142,11 @@ function ecwid_seo_compatibility_init($title)
119
  // Canonical for All in One SEO Pack
120
  $aioseop_options['aiosp_can'] = false;
121
  // Title for All in One SEO Pack
122
- remove_filter('wp_title', array($aiosp, 'wp_title'), 20);
 
 
 
123
 
124
- return $title;
125
  }
126
 
127
  function ecwid_seo_compatibility_restore()
@@ -138,38 +163,49 @@ function add_ecwid_admin_bar_node() {
138
  global $wp_admin_bar;
139
  if ( !is_super_admin() || !is_admin_bar_showing() )
140
  return;
141
- //add parent menu node
142
  $wp_admin_bar->add_menu( array(
143
  'id' => 'ecwid_main',
144
- 'title' => '<img src="'.plugins_url().'/ecwid-shopping-cart/ecwid_menu_icon.png" style="width: 22px;height: 22px;margin-top: 3px;"/>',
145
  ));
146
- //add ecwid home page
 
 
 
 
 
 
147
  $wp_admin_bar->add_menu(array(
148
  "id" => "ecwid_home",
149
- "title" => "Ecwid Site",
150
  "parent" => "ecwid_main",
151
  'href' => 'http://www.ecwid.com?source=wporg'
152
  )
153
  );
154
- //add store page link
155
  $wp_admin_bar->add_menu(array(
156
  "id" => "ecwid_go_to_page",
157
- "title" => "My Ecwid Store",
158
  "parent" => "ecwid_main",
159
  'href' => get_page_link(get_option("ecwid_store_page_id"))
160
  )
161
  );
162
- //add settings page link
163
  $wp_admin_bar->add_menu(array(
164
- "id" => "ecwid_settings",
165
- "title" => "Settings page",
166
  "parent" => "ecwid_main",
167
- 'href' => admin_url('options-general.php?page=ecwid_options_page' )
168
  )
169
  );
170
- $wp_admin_bar->add_menu(array(
 
 
 
 
 
 
 
171
  "id" => "ecwid_fb_app",
172
- "title" => "→ Sell on Facebook",
173
  "parent" => "ecwid_main",
174
  'href' => 'http://apps.facebook.com/ecwid-shop/?fb_source=wp'
175
  )
@@ -208,6 +244,38 @@ function ecwid_meta() {
208
  }
209
  }
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  function ecwid_get_product_and_category($category_id, $product_id) {
212
  $params = array
213
  (
@@ -279,19 +347,18 @@ function ecwid_seo_title($content) {
279
 
280
  function ecwid_wrap_shortcode_content($content)
281
  {
282
- return "<!-- Ecwid shopping cart plugin v 1.8 --><div>$content</div><!-- END Ecwid Shopping Cart v 1.8 -->";
283
  }
284
 
285
  function ecwid_get_scriptjs_code() {
286
  if (!defined('ECWID_SCRIPTJS')) {
287
- $ecwid_protocol = get_ecwid_protocol();
288
  $store_id = get_ecwid_store_id();
289
- $s = "<script type=\"text/javascript\" src=\"$ecwid_protocol://" . APP_ECWID_COM . "/script.js?$store_id\"></script>";
290
  define('ECWID_SCRIPTJS','Yep');
291
  $s = $s . ecwid_sso();
292
  return $s;
293
  } else {
294
- return;
295
  }
296
  }
297
 
@@ -300,6 +367,7 @@ function ecwid_script_shortcode() {
300
  }
301
 
302
  function ecwid_minicart_shortcode() {
 
303
  $ecwid_enable_minicart = get_option('ecwid_enable_minicart');
304
  $ecwid_show_categories = get_option('ecwid_show_categories');
305
  if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) {
@@ -419,6 +487,7 @@ function ecwid_productbrowser_shortcode($shortcode_params) {
419
  $plain_content = $catalog->get_category($params['id']);
420
  $ecwid_default_category_str = ',"defaultCategoryId=' . $params['id'] . '"';
421
  }
 
422
  } else {
423
  $plain_content = $catalog->get_category(intval($ecwid_default_category_id));
424
  }
@@ -442,7 +511,7 @@ function ecwid_store_activate() {
442
  <!-- Ecwid code. Please do not remove this line otherwise your Ecwid shopping cart will not work properly. --> [ecwid_script] [ecwid_minicart] [ecwid_searchbox] [ecwid_categories] [ecwid_productbrowser] <!-- Ecwid code end -->
443
  EOT;
444
  add_option("ecwid_store_page_id", '', '', 'yes');
445
- add_option("ecwid_store_id", '1003', '', 'yes');
446
 
447
  add_option("ecwid_enable_minicart", 'Y', '', 'yes');
448
  add_option("ecwid_show_categories", 'Y', '', 'yes');
@@ -459,8 +528,6 @@ EOT;
459
  add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
460
  add_option("ecwid_pb_searchview", 'list', '', 'yes');
461
 
462
- add_option("ecwid_enable_ssl", '', '', 'yes');
463
-
464
  add_option("ecwid_mobile_catalog_link", '', '', 'yes');
465
  add_option("ecwid_default_category_id", '', '', 'yes');
466
 
@@ -472,7 +539,7 @@ EOT;
472
  $id = get_option("ecwid_store_page_id");
473
  $_tmp_page = null;
474
  if (!empty($id) and ($id > 0)) {
475
- $_tmp_page = get_page($id);
476
  }
477
  if ($_tmp_page !== null) {
478
  $my_post = array();
@@ -481,7 +548,7 @@ EOT;
481
  wp_update_post( $my_post );
482
 
483
  } else {
484
- $my_post['post_title'] = 'Store';
485
  $my_post['post_content'] = $content;
486
  $my_post['post_status'] = 'publish';
487
  $my_post['post_author'] = 1;
@@ -493,14 +560,19 @@ EOT;
493
  }
494
  function ecwid_show_admin_message() {
495
 
496
- if (get_ecwid_store_id() != 1003) {
497
- return;
498
- } else {
499
  $ecwid_page_id = get_option("ecwid_store_page_id");
500
  $page_url = get_page_link($ecwid_page_id);
501
- echo "<div id='' class='updated fade'><p><strong>Ecwid shopping cart is almost ready</strong>. Please visit <a href=\"$page_url\">the created page</a> to see your store with demo products. In order to finish the installation, please go to the <a href=\"options-general.php?page=ecwid_options_page\"><strong>Ecwid settings</strong></a> and configure the plugin.</p></div>";
502
- }
 
 
 
 
503
  }
 
504
 
505
  function ecwid_store_deactivate() {
506
  $ecwid_page_id = get_option("ecwid_store_page_id");
@@ -520,291 +592,181 @@ function ecwid_store_deactivate() {
520
  }
521
 
522
  function ecwid_abs_intval($value) {
523
- return abs(intval($value));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  }
525
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  function ecwid_settings_api_init() {
527
- register_setting('ecwid_options_page', 'ecwid_store_id','ecwid_abs_intval' );
528
- register_setting('ecwid_options_page', 'ecwid_enable_minicart');
529
-
530
- register_setting('ecwid_options_page', 'ecwid_show_categories');
531
- register_setting('ecwid_options_page', 'ecwid_show_search_box');
532
-
533
- register_setting('ecwid_options_page', 'ecwid_pb_categoriesperrow', 'ecwid_abs_intval');
534
- register_setting('ecwid_options_page', 'ecwid_pb_productspercolumn_grid', 'ecwid_abs_intval');
535
- register_setting('ecwid_options_page', 'ecwid_pb_productsperrow_grid', 'ecwid_abs_intval');
536
- register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_list', 'ecwid_abs_intval');
537
- register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval');
538
- register_setting('ecwid_options_page', 'ecwid_pb_defaultview');
539
- register_setting('ecwid_options_page', 'ecwid_pb_searchview');
540
- register_setting('ecwid_options_page', 'ecwid_enable_ssl');
541
-
542
- register_setting('ecwid_options_page', 'ecwid_mobile_catalog_link');
543
- register_setting('ecwid_options_page', 'ecwid_default_category_id');
544
-
545
- register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
 
 
 
 
 
546
 
547
- if (isset($_POST['ecwid_store_id'])) {
548
- update_option('ecwid_is_api_enabled', 'off');
549
- update_option('ecwid_api_check_time', 0);
550
- }
551
- }
 
552
 
553
- function ecwid_options_add_page() {
554
- add_options_page('Ecwid shopping cart settings', 'Ecwid shopping cart', 'manage_options', 'ecwid_options_page', 'ecwid_options_do_page');
 
 
 
 
 
555
  }
556
 
557
- function ecwid_options_do_page() {
558
- $store_id = get_ecwid_store_id();
559
- $ecwid_enable_minicart = get_option('ecwid_enable_minicart');
560
- $ecwid_show_categories = get_option('ecwid_show_categories');
561
- $ecwid_show_search_box = get_option('ecwid_show_search_box');
562
 
563
- $ecwid_pb_categoriesperrow = get_option('ecwid_pb_categoriesperrow');
564
- $ecwid_pb_productspercolumn_grid = get_option('ecwid_pb_productspercolumn_grid');
565
- $ecwid_pb_productsperrow_grid = get_option('ecwid_pb_productsperrow_grid');
566
- $ecwid_pb_productsperpage_list = get_option('ecwid_pb_productsperpage_list');
567
- $ecwid_pb_productsperpage_table = get_option('ecwid_pb_productsperpage_table');
568
- $ecwid_pb_defaultview = get_option('ecwid_pb_defaultview');
569
- $ecwid_pb_searchview = get_option('ecwid_pb_searchview');
570
-
571
- $ecwid_mobile_catalog_link = get_option('ecwid_mobile_catalog_link');
572
- $ecwid_default_category_id = get_option('ecwid_default_category_id');
573
- $ecwid_enable_ssl = get_option('ecwid_enable_ssl');
574
- $ecwid_page_id = get_option("ecwid_store_page_id");
575
-
576
- $ecwid_sso_secret_key = get_option("ecwid_sso_secret_key");
577
-
578
- $ecwid_noscript_seo_catalog_disabled = false;
579
- $ecwid_noscript_seo_catalog_message = '<a href="http://kb.ecwid.com/Inline-SEO-Catalog" target="_blank">How it works</a>';
580
- $ecwid_settings_message = false;
581
-
582
- $_tmp_page = null;
583
- $disabled = false;
584
- if (!empty($ecwid_page_id) and ($ecwid_page_id > 0)) {
585
- $_tmp_page = get_page($ecwid_page_id);
586
- $content = $_tmp_page->post_content;
587
- if ( (strpos($content, "[ecwid_productbrowser]") === false) && (strpos($content, "xProductBrowser") !== false) )
588
- $disabled = true;
589
- }
590
 
591
- if ($disabled)
592
- $disabled_str = 'disabled = "disabled"';
593
- else
594
- $disabled_str = "";
595
-
596
-
597
- ?>
598
- <div class="wrap">
599
- <?php if ($ecwid_settings_message)
600
- echo "<div id='' class='updated fade'><p><strong>Error.</strong>&nbsp;$ecwid_settings_message</p></div>";
601
- ?>
602
- <h2>Ecwid settings</h2>
603
- <form method="post" action="options.php">
604
- <?php settings_fields('ecwid_options_page'); ?>
605
- <table class="form-table">
606
- <tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">General</h3></th></tr>
607
- <tr><th scope="row"><a href="http://kb.ecwid.com/Instruction-on-how-to-get-your-free-Store-ID-(for-WordPress)" target="_blank">Store ID</a></th>
608
- <td><input type="text" name="ecwid_store_id" value="<?php if ($store_id != 1003) echo $store_id; ?>" />
609
- <?php if ($store_id == 1003) {
610
- echo '&nbsp;&nbsp;&nbsp;&nbsp;<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;The Store ID isn\'t set up. Please enter your Store ID to assign your site with your Ecwid store and show your products. <a href="http://kb.ecwid.com/Instruction-on-how-to-get-your-free-Store-ID-(for-WordPress)" target="_blank">How to get this free ID</a>.';
611
- }
612
- ?>
613
- </td>
614
- </tr>
615
- <tr><th scope="row">
616
- <label for="ecwid_show_categories">Show horizontal categories?</label> </th>
617
- <td><input type="checkbox" id="ecwid_show_categories" name="ecwid_show_categories" <?php if (!empty($ecwid_show_categories)) echo "checked=\"checked\""; echo $disabled_str; ?> />
618
- </td>
619
- </tr>
620
- <tr><th scope="row">
621
- <label for="ecwid_show_search_box">Show search box?</label> </th>
622
- <td><input type="checkbox" id="ecwid_show_search_box" name="ecwid_show_search_box" <?php if (!empty($ecwid_show_search_box)) echo "checked=\"checked\"";?> <?php echo $disabled_str;?> />
623
- </td>
624
- </tr>
625
-
626
- <tr><th scope="row">
627
- <label for="ecwid_enable_minicart">Enable minicart attached to horizontal categories?</label></th>
628
- <td><input type="checkbox" name="ecwid_enable_minicart" id="ecwid_enable_minicart" <?php if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) echo "checked=\"checked\"";?>
629
- <?php if (empty($ecwid_show_categories)) {
630
- echo 'disabled = "disabled"';
631
- }
632
- else {
633
- echo $disabled_str;
634
- } ?> />
635
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;If you added minicart to your blog's sidebar, please disable this option.
636
-
637
- </td>
638
- </tr>
639
-
640
- <tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">Appearance</h3></th></tr>
641
-
642
- <tr><th scope="row"><label for="ecwid_pb_categoriesperrow">Categories per row</label></th>
643
- <td><input type="text" id="ecwid_pb_categoriesperrow" name="ecwid_pb_categoriesperrow" value="<?php echo $ecwid_pb_categoriesperrow; ?>" <?php echo $disabled_str;?> /></td>
644
- </tr>
645
-
646
- <tr><th scope="row"><label for="ecwid_pb_productspercolumn_grid">Products per column in grid mode</th>
647
- <td><input type="text" id="ecwid_pb_productspercolumn_grid" name="ecwid_pb_productspercolumn_grid" value="<?php echo $ecwid_pb_productspercolumn_grid; ?>" <?php echo $disabled_str;?> /></td>
648
- </tr>
649
-
650
- <tr><th scope="row"><label for="ecwid_pb_productsperrow_grid">Products per row in grid mode</label></th>
651
- <td><input type="text" id="ecwid_pb_productsperrow_grid" name="ecwid_pb_productsperrow_grid" value="<?php echo $ecwid_pb_productsperrow_grid; ?>" <?php echo $disabled_str;?> /></td>
652
- </tr>
653
-
654
- <tr><th scope="row"><label for="ecwid_pb_productsperpage_list">Products per page in list mode</label></th>
655
- <td><input type="text" id="ecwid_pb_productsperpage_list" name="ecwid_pb_productsperpage_list" value="<?php echo $ecwid_pb_productsperpage_list; ?>" <?php echo $disabled_str;?> /></td>
656
- </tr>
657
-
658
- <tr><th scope="row"><label for="ecwid_pb_productsperpage_table">Products per page in table mode</label></th>
659
- <td><input type="text" id="ecwid_pb_productsperpage_table" name="ecwid_pb_productsperpage_table" value="<?php echo $ecwid_pb_productsperpage_table; ?>" <?php echo $disabled_str;?> /></td>
660
- </tr>
661
-
662
-
663
- <tr><th scope="row"><label for="ecwid_pb_defaultview">Default view mode on product pages</label></th>
664
- <td>
665
- <select id="ecwid_pb_defaultview" name="ecwid_pb_defaultview" <?php echo $disabled_str;?> >
666
- <option value="grid" <?php if($ecwid_pb_defaultview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
667
- <option value="list" <?php if($ecwid_pb_defaultview == 'list') echo 'selected="selected"' ?> >List mode</option>
668
- <option value="table" <?php if($ecwid_pb_defaultview == 'table') echo 'selected="selected"' ?> >Table mode</option>
669
- </select>
670
- </td>
671
- </tr>
672
-
673
- <tr><th scope="row"><label for="ecwid_pb_searchview">Default view mode on search results</label></th>
674
- <td>
675
- <select id="ecwid_pb_searchview" name="ecwid_pb_searchview" <?php echo $disabled_str;?> >
676
- <option value="grid" <?php if($ecwid_pb_searchview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
677
- <option value="list" <?php if($ecwid_pb_searchview == 'list') echo 'selected="selected"' ?> >List mode</option>
678
- <option value="table" <?php if($ecwid_pb_searchview == 'table') echo 'selected="selected"' ?> >Table mode</option>
679
- </select>
680
- </td>
681
- </tr>
682
-
683
- <tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">SEO</h3></th></tr>
684
-
685
- <tr>
686
- <th scope="row"><label for="ecwid_mobile_catalog_link">Full link to your mobile catalog</label></th>
687
- <td><input id="ecwid_mobile_catalog_link" type="text" name="ecwid_mobile_catalog_link" value="<?php echo $ecwid_mobile_catalog_link; ?>" />
688
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;For example <em>http://mdemo.ecwid.com</em>.&nbsp;<a href="http://kb.ecwid.com/Mobile-Catalog" target="_blank">Information about Ecwid and mobile catalogs.</a></td>
689
- </tr>
690
-
691
- <tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">Advanced</h3></th></tr>
692
-
693
- <tr><th scope="row"><label for="ecwid_enable_ssl">
694
- Single Sign-on Secret Key: </label>
695
- </th>
696
- <td>
697
- <table>
698
- <tr>
699
- <td style="padding-top:0;padding-left:0;vertical-align:top;">
700
- <input id="ecwid_sso_secret_key" type="text" name="ecwid_sso_secret_key" value="<?php echo $ecwid_sso_secret_key; ?>" />
701
- </td>
702
- <td style="padding:0;vertical-align:top;">
703
- <img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;This feature allows your customers to sign into your WordPress site and fully use your store without having to sign into Ecwid. I.e. if a customer is logged in to your site, he/she is logged in to your store automatically, even if he/she didn't have an account in your store before. In order to enable this feature you should set the secret key that can be found on the "System Settings > API > Single Sign-on API" page in your Ecwid control panel. Please note that this API is available only to <a href="http://www.ecwid.com/compare-plans.html">paid users</a>.
704
- </td>
705
- </tr>
706
- </table>
707
-
708
- </td> </tr>
709
 
710
-
711
- <tr><th scope="row"><label for="ecwid_enable_ssl">
712
- Enable the following option, if you use Ecwid on a secure HTTPS page</label>
713
- </th>
714
- <td><input id="ecwid_enable_ssl" type="checkbox" name="ecwid_enable_ssl" <?php if (!empty($ecwid_enable_ssl)) echo "checked=\"checked\"";?> />
715
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;<a href="http://kb.ecwid.com/SSL-HTTPS" target="_blank">Information about Ecwid and SSL/HTTPS</a>
716
-
717
- </td> </tr>
718
-
719
-
720
- <tr><th scope="row"><label for="ecwid_default_category_id">
721
- Default category ID</label>
722
- </th>
723
- <td><input id="ecwid_default_category_id" type="text" name="ecwid_default_category_id" value="<?php echo $ecwid_default_category_id; ?>"/>
724
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt="">&nbsp;<a href="http://kb.ecwid.com/Default-category-for-product-browser" target="_blank">What is it?</a>
725
-
726
- </td> </tr>
727
-
728
-
729
- </table>
730
- <p class="submit">
731
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
732
- </p>
733
-
734
- <style>
735
- ul#ecwid-instruction-ul li, ul#ecwid-need-manual-editing-ul li {
736
- padding-bottom:10px;
737
- }
738
- </style>
739
 
 
 
 
 
 
 
740
 
741
- <?php
742
- if ($disabled) {
743
- ?>
744
 
745
- <div id="ecwid-need-manual-editing" >
746
- </div>
 
747
 
 
748
 
749
- <?php
750
-
751
- }
752
 
753
- ?>
 
754
 
755
- <?php
756
- if ($store_id == '1003') {
757
- ?>
758
- <div id="ecwid-instruction" >
759
- <h4>Instruction on how to get your free Store ID</h4>
760
- <ul style="padding-left:30px;list-style-type:disc;" id="ecwid-instruction-ul">
761
- <li>Go to the <a target="_blank" href="https://my.ecwid.com/cp/?source=wporg#register">Ecwid control panel</a>. Open this URL: <a target="_blank" href="https://my.ecwid.com/cp/?source=wporg#register">https://my.ecwid.com/cp?source=wporg#register</a>. You will get to 'Sign In or Register' form.</li>
762
- <li>Register an account at Ecwid. Use section &quot;Using Ecwid account&quot; for that. The registration is free.
763
- <p>Or you can log in using your account at Gmail, Facebook, Twitter, Yahoo, or another provider. Choose one from the list of the providers (click on 'More providers' if you don't see your provider there). Click on the provider logo, you will be redirected to the account login page. Submit your username/password there to login to your Ecwid.</p>
764
- <p>Note: the login might take several seconds. Please, be patient.</p>
765
- </li>
766
- <li>Look at the right bottom corner of the page.</li>
767
- <li>You will see the&nbsp;<span style="background-color:#d3e9e9;">&quot;Store ID: <strong>NNNNNN</strong>&quot;</span> text, where <strong>NNNNNN</strong> is your <strong>Store ID</strong>.<br />
768
- <p>For example if the text is&nbsp;<span style="background-color:#d3e9e9;">Store ID:</span> <strong><span style="background-color:#d3e9e9;">1003</span></strong>, your Store ID is <strong>1003</strong>. &nbsp;</p><br />
769
- You will also get your Store ID by email.
770
- </li>
771
- </ul>
772
- <p>If you have any questions, feel free to ask them on <a href="http://www.ecwid.com/forums/?source=wporg">Ecwid forums</a> or <a href="http://www.ecwid.com/contact-us.html?source=wporg">contact Ecwid team</a>.</p>
773
- </div>
774
- <?php
775
- }
776
- ?>
777
- </form>
778
-
779
-
780
-
781
- </div>
782
- <?php
783
- }
784
 
785
  function get_ecwid_store_id() {
786
  static $store_id = null;
787
  if (is_null($store_id)) {
788
  $store_id = get_option('ecwid_store_id');
789
  if (empty($store_id))
790
- $store_id = 1003;
791
  }
792
  return $store_id;
793
- }
794
-
795
- function get_ecwid_protocol() {
796
- static $ecwid_enable_ssl = null;
797
- if (is_null($ecwid_enable_ssl)) {
798
- $ecwid_enable_ssl = get_option('ecwid_enable_ssl');
799
- }
800
- if (empty($ecwid_enable_ssl)) {
801
- return "http";
802
- }
803
- else {
804
- return "https";
805
- }
806
- }
807
-
808
  function ecwid_dashboard_widget_function() {
809
  echo "<a href=\"https://my.ecwid.com/\" target=\"_blank\">Go to the Ecwid Control Panel</a><br /><br /><a href=\"http://kb.ecwid.com/\" target=\"_blank\">Ecwid Knowledge Base</a>&nbsp;|&nbsp;<a href=\"http://www.ecwid.com/forums/\" target=\"_blank\">Ecwid Forums</a>";
810
  }
@@ -813,19 +775,19 @@ function ecwid_add_dashboard_widgets() {
813
  if (current_user_can('administrator')) {
814
  wp_add_dashboard_widget('ecwid_dashboard_widget','Ecwid Links', 'ecwid_dashboard_widget_function');
815
  }
816
- }
817
-
818
 
819
 
820
  class EcwidMinicartWidget extends WP_Widget {
821
 
822
  function EcwidMinicartWidget() {
823
- $widget_ops = array('classname' => 'widget_ecwid_minicart', 'description' => __( "Your store's minicart") );
824
- $this->WP_Widget('ecwidminicart', __('Ecwid Shopping Bag (Normal)'), $widget_ops);
825
- }
 
826
 
827
  function widget($args, $instance) {
828
- extract($args);
829
  $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
830
 
831
  echo $before_widget;
@@ -833,12 +795,8 @@ class EcwidMinicartWidget extends WP_Widget {
833
  if ( $title )
834
  echo $before_title . $title . $after_title;
835
 
836
- $store_id = get_ecwid_store_id();
837
- $ecwid_protocol = get_ecwid_protocol();
838
  echo '<div>';
839
  echo ecwid_get_scriptjs_code();
840
- //echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://" . APP_ECWID_COM . "/script.js?$store_id\"></script>";
841
-
842
 
843
  $ecwid_page_id = get_option("ecwid_store_page_id");
844
  $page_url = get_page_link($ecwid_page_id);
@@ -873,8 +831,8 @@ EOT;
873
  class EcwidMinicartMiniViewWidget extends WP_Widget {
874
 
875
  function EcwidMinicartMiniViewWidget() {
876
- $widget_ops = array('classname' => 'widget_ecwid_minicart_miniview', 'description' => __( "Your store's minicart") );
877
- $this->WP_Widget('ecwidminicart_miniview', __('Ecwid Shopping Bag (Mini view)'), $widget_ops);
878
  }
879
 
880
  function widget($args, $instance) {
@@ -886,12 +844,8 @@ class EcwidMinicartMiniViewWidget extends WP_Widget {
886
  if ( $title )
887
  echo $before_title . $title . $after_title;
888
 
889
- $store_id = get_ecwid_store_id();
890
- $ecwid_protocol = get_ecwid_protocol();
891
  echo '<div>';
892
  echo ecwid_get_scriptjs_code();
893
- //echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://" . APP_ECWID_COM . "/script.js?$store_id\"></script>";
894
-
895
 
896
  $ecwid_page_id = get_option("ecwid_store_page_id");
897
  $page_url = get_page_link($ecwid_page_id);
@@ -927,8 +881,8 @@ EOT;
927
  class EcwidSearchWidget extends WP_Widget {
928
 
929
  function EcwidSearchWidget() {
930
- $widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __( "Your store's search box") );
931
- $this->WP_Widget('ecwidsearch', __('Ecwid Search Box'), $widget_ops);
932
  }
933
 
934
  function widget($args, $instance) {
@@ -940,11 +894,9 @@ class EcwidSearchWidget extends WP_Widget {
940
  if ( $title )
941
  echo $before_title . $title . $after_title;
942
 
943
- $store_id = get_ecwid_store_id();
944
- $ecwid_protocol = get_ecwid_protocol();
945
  echo '<div>';
946
  echo ecwid_get_scriptjs_code();
947
- //echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://" . APP_ECWID_COM . "/script.js?$store_id\"></script>";
948
  $ecwid_page_id = get_option("ecwid_store_page_id");
949
  $page_url = get_page_link($ecwid_page_id);
950
  $_tmp_page = get_page($ecwid_page_id);
@@ -978,8 +930,8 @@ echo $after_widget;
978
  class EcwidVCategoriesWidget extends WP_Widget {
979
 
980
  function EcwidVCategoriesWidget() {
981
- $widget_ops = array('classname' => 'widget_ecwid_vcategories', 'description' => __( "Vertical menu of categories") );
982
- $this->WP_Widget('ecwidvcategories', __('Ecwid Vertical Categories'), $widget_ops);
983
  }
984
 
985
  function widget($args, $instance) {
@@ -991,11 +943,8 @@ class EcwidVCategoriesWidget extends WP_Widget {
991
  if ( $title )
992
  echo $before_title . $title . $after_title;
993
 
994
- $store_id = get_ecwid_store_id();
995
- $ecwid_protocol = get_ecwid_protocol();
996
  echo '<div>';
997
  echo ecwid_get_scriptjs_code();
998
- // echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://" . APP_ECWID_COM . "/script.js?$store_id\"></script>";
999
  $ecwid_page_id = get_option("ecwid_store_page_id");
1000
  $page_url = get_page_link($ecwid_page_id);
1001
  $_tmp_page = get_page($ecwid_page_id);
@@ -1031,7 +980,7 @@ function ecwid_sidebar_widgets_init() {
1031
  register_widget('EcwidMinicartWidget');
1032
  register_widget('EcwidSearchWidget');
1033
  register_widget('EcwidVCategoriesWidget');
1034
- register_widget('EcwidMinicartMiniViewWidget');
1035
  }
1036
 
1037
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
@@ -1106,6 +1055,11 @@ function ecwid_hmacsha1($data, $key) {
1106
  }
1107
  }
1108
 
 
 
 
 
 
1109
  function ecwid_is_api_enabled()
1110
  {
1111
  $ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
4
  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
  Author: Ecwid Team
7
+ Version: 2.0
8
  Author URI: http://www.ecwid.com?source=wporg
9
  */
10
 
11
  register_activation_hook( __FILE__, 'ecwid_store_activate' );
12
  register_deactivation_hook( __FILE__, 'ecwid_store_deactivate' );
13
 
14
+ define("APP_ECWID_COM", "app.ecwid.com");
15
+ define("ECWID_DEMO_STORE_ID", 1003);
16
+
17
+ if ( ! defined( 'ECWID_PLUGIN_DIR' ) ) {
18
+ define( 'ECWID_PLUGIN_DIR', plugin_dir_path( realpath(__FILE__) ) );
19
+ }
20
+
21
+ if ( ! defined( 'ECWID_PLUGIN_URL' ) ) {
22
+ define( 'ECWID_PLUGIN_URL', plugin_dir_url( realpath(__FILE__) ) );
23
+ }
24
 
25
  if ( is_admin() ){
26
  add_action('admin_init', 'ecwid_settings_api_init');
27
  add_action('admin_notices', 'ecwid_show_admin_message');
28
  add_action('admin_menu', 'ecwid_options_add_page');
29
  add_action('wp_dashboard_setup', 'ecwid_add_dashboard_widgets' );
30
+ add_action('admin_enqueue_scripts', 'ecwid_register_admin_styles');
31
+ add_action('admin_enqueue_scripts', 'ecwid_register_settings_styles');
32
+
33
  } else {
34
  add_shortcode('ecwid_script', 'ecwid_script_shortcode');
35
  add_shortcode('ecwid_minicart', 'ecwid_minicart_shortcode');
42
  add_action('wp_head', 'ecwid_meta');
43
  add_action('wp_title', 'ecwid_seo_compatibility_init', 0);
44
  add_action('wp_head', 'ecwid_seo_compatibility_restore', 1000);
45
+ add_action('wp_head', 'ecwid_meta_description', 0);
46
  $ecwid_seo_title = '';
47
  }
48
  add_action('admin_bar_menu', 'add_ecwid_admin_bar_node', 1000);
55
  * http://core.trac.wordpress.org/browser/tags/3.6/wp-includes/shortcodes.php
56
  */
57
 
58
+ if (!function_exists('shortcode_exists')) {
59
+ function shortcode_exists( $tag ) {
60
+ global $shortcode_tags;
61
+ return array_key_exists( $tag, $shortcode_tags );
62
+ }
63
  }
64
 
65
+ if (!function_exists('has_shortcode')) {
66
+ function has_shortcode( $content, $tag ) {
67
+ if ( shortcode_exists( $tag ) ) {
68
+ preg_match_all( '/' . get_shortcode_regex() . '/s', $content, $matches, PREG_SET_ORDER );
69
+ if ( empty( $matches ) )
70
+ return false;
71
+
72
+ foreach ( $matches as $shortcode ) {
73
+ if ( $tag === $shortcode[2] ) {
74
+ return true;
75
+ }
76
+ }
77
+ }
78
+ return false;
79
+ }
80
+ }
81
+ }
82
 
83
+ function ecwid_load_textdomain() {
84
+ load_plugin_textdomain( 'ecwid-shopping-cart', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
 
 
 
 
 
 
85
  }
86
 
87
+ add_filter( 'plugins_loaded', 'ecwid_load_textdomain' );
88
 
89
  function ecwid_backward_compatibility() {
90
 
131
  // Canonical for Yoast Wordpress SEO
132
  global $wpseo_front;
133
  remove_action( 'wpseo_head', array( $wpseo_front, 'canonical' ), 20);
134
+ remove_action( 'wpseo_head', array( $wpseo_front, 'metadesc' ), 10 );
135
 
136
  // Canonical for Platinum SEO Pack
137
  ecwid_override_option('psp_canonical', false);
142
  // Canonical for All in One SEO Pack
143
  $aioseop_options['aiosp_can'] = false;
144
  // Title for All in One SEO Pack
145
+ add_filter('aioseop_description', __return_null);
146
+ add_filter('aioseop_title', __return_null);
147
+
148
+ return $title;
149
 
 
150
  }
151
 
152
  function ecwid_seo_compatibility_restore()
163
  global $wp_admin_bar;
164
  if ( !is_super_admin() || !is_admin_bar_showing() )
165
  return;
166
+
167
  $wp_admin_bar->add_menu( array(
168
  'id' => 'ecwid_main',
169
+ 'title' => '<div class="ecwid-top-menu-item"></div>',
170
  ));
171
+ $wp_admin_bar->add_menu(array(
172
+ "id" => "ecwid_help",
173
+ "title" => __("Get help", 'ecwid-shopping-cart'),
174
+ "parent" => "ecwid_main",
175
+ 'href' => 'http://help.ecwid.com'
176
+ )
177
+ );
178
  $wp_admin_bar->add_menu(array(
179
  "id" => "ecwid_home",
180
+ "title" => __("Go to Ecwid site", 'ecwid-shopping-cart'),
181
  "parent" => "ecwid_main",
182
  'href' => 'http://www.ecwid.com?source=wporg'
183
  )
184
  );
 
185
  $wp_admin_bar->add_menu(array(
186
  "id" => "ecwid_go_to_page",
187
+ "title" => __("Visit storefront", 'ecwid-shopping-cart'),
188
  "parent" => "ecwid_main",
189
  'href' => get_page_link(get_option("ecwid_store_page_id"))
190
  )
191
  );
 
192
  $wp_admin_bar->add_menu(array(
193
+ "id" => "ecwid_control_panel",
194
+ "title" => __("Manage my store", 'ecwid-shopping-cart'),
195
  "parent" => "ecwid_main",
196
+ 'href' => 'https://my.ecwid.com/cp/?source=wporg#t1=&t2=Dashboard'
197
  )
198
  );
199
+ $wp_admin_bar->add_menu(array(
200
+ "id" => "ecwid_settings",
201
+ "title" => __("Manage plugin settings", 'ecwid-shopping-cart'),
202
+ "parent" => "ecwid_main",
203
+ 'href' => admin_url('admin.php?page=ecwid')
204
+ )
205
+ );
206
+ $wp_admin_bar->add_menu(array(
207
  "id" => "ecwid_fb_app",
208
+ "title" => __("→ Sell on Facebook", 'ecwid-shopping-cart'),
209
  "parent" => "ecwid_main",
210
  'href' => 'http://apps.facebook.com/ecwid-shop/?fb_source=wp'
211
  )
244
  }
245
  }
246
 
247
+ function ecwid_meta_description() {
248
+
249
+ $allowed = ecwid_is_api_enabled() && isset($_GET['_escaped_fragment_']);
250
+ if (!$allowed) return;
251
+
252
+ $params = ecwid_parse_escaped_fragment($_GET['_escaped_fragment_']);
253
+ if (!$params) return;
254
+
255
+ if (!in_array($params['mode'], array('category', 'product')) || !isset($params['id'])) return;
256
+
257
+ $api = ecwid_new_product_api();
258
+ if ($params['mode'] == 'product') {
259
+ $product = $api->get_product($params['id']);
260
+ $description = $product['description'];
261
+ } elseif ($params['mode'] == 'category') {
262
+ $category = $api->get_category($params['id']);
263
+ $description = $category['description'];
264
+ } else return;
265
+
266
+ $description = strip_tags($description);
267
+ $description = html_entity_decode($description, ENT_NOQUOTES, 'UTF-8');
268
+
269
+ $description = preg_replace("![\\s]+!", " ", $description);
270
+ $description = trim($description, " \t\xA0\n\r"); // Space, tab, non-breaking space, newline, carriage return
271
+ $description = mb_substr($description, 0, 160);
272
+ $description = htmlspecialchars($description, ENT_COMPAT | ENT_HTML401, 'UTF-8');
273
+
274
+ echo <<<HTML
275
+ <meta name="description" content="$description" />
276
+ HTML;
277
+ }
278
+
279
  function ecwid_get_product_and_category($category_id, $product_id) {
280
  $params = array
281
  (
347
 
348
  function ecwid_wrap_shortcode_content($content)
349
  {
350
+ return "<!-- Ecwid shopping cart plugin v 2.0 --><div>$content</div><!-- END Ecwid Shopping Cart v 2.0 -->";
351
  }
352
 
353
  function ecwid_get_scriptjs_code() {
354
  if (!defined('ECWID_SCRIPTJS')) {
 
355
  $store_id = get_ecwid_store_id();
356
+ $s = '<script type="text/javascript" data-cfasync="false" src="//' . APP_ECWID_COM . '/script.js?' . $store_id . '"></script>';
357
  define('ECWID_SCRIPTJS','Yep');
358
  $s = $s . ecwid_sso();
359
  return $s;
360
  } else {
361
+ return '';
362
  }
363
  }
364
 
367
  }
368
 
369
  function ecwid_minicart_shortcode() {
370
+
371
  $ecwid_enable_minicart = get_option('ecwid_enable_minicart');
372
  $ecwid_show_categories = get_option('ecwid_show_categories');
373
  if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) {
487
  $plain_content = $catalog->get_category($params['id']);
488
  $ecwid_default_category_str = ',"defaultCategoryId=' . $params['id'] . '"';
489
  }
490
+
491
  } else {
492
  $plain_content = $catalog->get_category(intval($ecwid_default_category_id));
493
  }
511
  <!-- Ecwid code. Please do not remove this line otherwise your Ecwid shopping cart will not work properly. --> [ecwid_script] [ecwid_minicart] [ecwid_searchbox] [ecwid_categories] [ecwid_productbrowser] <!-- Ecwid code end -->
512
  EOT;
513
  add_option("ecwid_store_page_id", '', '', 'yes');
514
+ add_option("ecwid_store_id", ECWID_DEMO_STORE_ID, '', 'yes');
515
 
516
  add_option("ecwid_enable_minicart", 'Y', '', 'yes');
517
  add_option("ecwid_show_categories", 'Y', '', 'yes');
528
  add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
529
  add_option("ecwid_pb_searchview", 'list', '', 'yes');
530
 
 
 
531
  add_option("ecwid_mobile_catalog_link", '', '', 'yes');
532
  add_option("ecwid_default_category_id", '', '', 'yes');
533
 
539
  $id = get_option("ecwid_store_page_id");
540
  $_tmp_page = null;
541
  if (!empty($id) and ($id > 0)) {
542
+ $_tmp_page = get_post($id);
543
  }
544
  if ($_tmp_page !== null) {
545
  $my_post = array();
548
  wp_update_post( $my_post );
549
 
550
  } else {
551
+ $my_post['post_title'] = __('Store', 'ecwid-shopping-cart');
552
  $my_post['post_content'] = $content;
553
  $my_post['post_status'] = 'publish';
554
  $my_post['post_author'] = 1;
560
  }
561
  function ecwid_show_admin_message() {
562
 
563
+ if (get_ecwid_store_id() != ECWID_DEMO_STORE_ID || $_GET['page'] == 'ecwid') {
564
+ return;
565
+ } else {
566
  $ecwid_page_id = get_option("ecwid_store_page_id");
567
  $page_url = get_page_link($ecwid_page_id);
568
+ echo sprintf(
569
+ '<div class="updated fade"><p>'
570
+ . __('<strong>Ecwid shopping cart is almost ready</strong>. Please visit <a target="_blank" href="%s">the created page</a> to see your store with demo products. In order to finish the installation, please go to the <a href="admin.php?page=ecwid"><strong>Ecwid settings</strong></a> and configure the plugin.', 'ecwid-shopping-cart')
571
+ . '</p></div>',
572
+ $page_url
573
+ );
574
  }
575
+ }
576
 
577
  function ecwid_store_deactivate() {
578
  $ecwid_page_id = get_option("ecwid_store_page_id");
592
  }
593
 
594
  function ecwid_abs_intval($value) {
595
+ if (!is_null($value))
596
+ return abs(intval($value));
597
+ else
598
+ return null;
599
+ }
600
+
601
+ function ecwid_options_add_page() {
602
+
603
+
604
+ add_menu_page(
605
+ __('Ecwid shopping cart settings', 'ecwid-shopping-cart'),
606
+ __('Ecwid Store', 'ecwid-shopping-cart'),
607
+ 'manage_options',
608
+ 'ecwid',
609
+ 'ecwid_general_settings_do_page'
610
+ );
611
+
612
+ add_submenu_page(
613
+ 'ecwid',
614
+ __('General settings', 'ecwid-shopping-cart'),
615
+ __('General', 'ecwid-shopping-cart'),
616
+ 'manage_options',
617
+ 'ecwid',
618
+ 'ecwid_general_settings_do_page'
619
+ );
620
+
621
+ add_submenu_page(
622
+ 'ecwid',
623
+ __('Appearance settings', 'ecwid-shopping-cart'),
624
+ __('Appearance', 'ecwid-shopping-cart'),
625
+ 'manage_options',
626
+ 'ecwid-appearance',
627
+ 'ecwid_appearance_settings_do_page'
628
+ );
629
+
630
+ add_submenu_page(
631
+ 'ecwid',
632
+ __('Advanced settings', 'ecwid-shopping-cart'),
633
+ __('Advanced', 'ecwid-shopping-cart'),
634
+ 'manage_options',
635
+ 'ecwid-advanced',
636
+ 'ecwid_advanced_settings_do_page'
637
+ );
638
+ //add_options_page('Ecwid shopping cart settings', 'Ecwid shopping cart', 'manage_options', 'ecwid_options_page', 'ecwid_options_do_page');
639
  }
640
 
641
+ function ecwid_register_admin_styles() {
642
+ wp_register_style('ecwid-admin-css', plugins_url('ecwid-shopping-cart/css/admin.css'), array(), '', 'all');
643
+ wp_enqueue_style('ecwid-admin-css');
644
+ }
645
+
646
+ function ecwid_register_settings_styles() {
647
+ wp_register_style('ecwid-settings-pure-css', plugins_url('ecwid-shopping-cart/css/pure-min.css'), array(), '', 'all');
648
+ wp_enqueue_style('ecwid-settings-pure-css');
649
+ wp_register_style('ecwid-settings-css', plugins_url('ecwid-shopping-cart/css/settings.css'), array(), '', 'all');
650
+ wp_enqueue_style('ecwid-settings-css');
651
+ }
652
+
653
+
654
  function ecwid_settings_api_init() {
655
+ switch ($_POST['settings_section']) {
656
+ case 'appearance':
657
+ register_setting('ecwid_options_page', 'ecwid_enable_minicart');
658
+
659
+ register_setting('ecwid_options_page', 'ecwid_show_categories');
660
+ register_setting('ecwid_options_page', 'ecwid_show_search_box');
661
+
662
+ register_setting('ecwid_options_page', 'ecwid_pb_categoriesperrow', 'ecwid_abs_intval');
663
+ register_setting('ecwid_options_page', 'ecwid_pb_productspercolumn_grid', 'ecwid_abs_intval');
664
+ register_setting('ecwid_options_page', 'ecwid_pb_productsperrow_grid', 'ecwid_abs_intval');
665
+ register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_list', 'ecwid_abs_intval');
666
+ register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval');
667
+ register_setting('ecwid_options_page', 'ecwid_pb_defaultview');
668
+ register_setting('ecwid_options_page', 'ecwid_pb_searchview');
669
+ break;
670
+
671
+ case 'general':
672
+ register_setting('ecwid_options_page', 'ecwid_store_id','ecwid_abs_intval' );
673
+ break;
674
+
675
+ case 'advanced':
676
+ register_setting('ecwid_options_page', 'ecwid_default_category_id');
677
+ register_setting('ecwid_options_page', 'ecwid_sso_secret_key');
678
+ break;
679
 
680
+ }
681
+ if (isset($_POST['ecwid_store_id'])) {
682
+ update_option('ecwid_is_api_enabled', 'off');
683
+ update_option('ecwid_api_check_time', 0);
684
+ }
685
+ }
686
 
687
+ function ecwid_general_settings_do_page() {
688
+
689
+ if (get_ecwid_store_id() == ECWID_DEMO_STORE_ID) {
690
+ require_once plugin_dir_path(__FILE__) . '/templates/general-settings-initial.php';
691
+ } else {
692
+ require_once plugin_dir_path(__FILE__) . '/templates/general-settings.php';
693
+ }
694
  }
695
 
696
+ function ecwid_advanced_settings_do_page() {
697
+ wp_register_script('ecwid-appearance-js', plugins_url('ecwid-shopping-cart/js/advanced.js'), array(), '', '');
698
+ wp_enqueue_script('ecwid-appearance-js');
 
 
699
 
700
+ wp_register_script('select2-js', plugins_url('ecwid-shopping-cart/lib/select2/select2.js'), array(), '', '');
701
+ wp_enqueue_script('select2-js');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
702
 
703
+ wp_register_style('select2-css', plugins_url('ecwid-shopping-cart/lib/select2/select2.css'), array(), '', 'all');
704
+ wp_enqueue_style('select2-css');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
705
 
706
+ $categories = false;
707
+ if (ecwid_is_paid_account()) {
708
+ $api = ecwid_new_product_api();
709
+ $categories = $api->get_all_categories();
710
+ $by_id = array();
711
+ foreach ($categories as $key => $category) {
712
+ $by_id[$category['id']] = $category;
713
+ }
714
+ unset($categories);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
 
716
+ foreach ($by_id as $id => $category) {
717
+ $name_path = array($category['name']);
718
+ while (isset($category['parentId'])) {
719
+ $category = $by_id[$category['parentId']];
720
+ $name_path[] = $category['name'];
721
+ }
722
 
723
+ $by_id[$id]['path'] = array_reverse($name_path);
724
+ $by_id[$id]['path_str'] = implode(" > ", $by_id[$id]['path']);
725
+ }
726
 
727
+ function sort_by_path($a, $b) {
728
+ return strcmp($a['path_str'], $b['path_str']);
729
+ }
730
 
731
+ uasort($by_id, 'sort_by_path');
732
 
733
+ $categories = $by_id;
734
+ }
 
735
 
736
+ require_once plugin_dir_path(__FILE__) . '/templates/advanced-settings.php';
737
+ }
738
 
739
+ function ecwid_appearance_settings_do_page() {
740
+
741
+ wp_register_script('ecwid-appearance-js', plugins_url('ecwid-shopping-cart/js/appearance.js'), array(), '', '');
742
+ wp_enqueue_script('ecwid-appearance-js');
743
+
744
+ $disabled = false;
745
+ if (!empty($ecwid_page_id) && ($ecwid_page_id > 0)) {
746
+ $_tmp_page = get_post($ecwid_page_id);
747
+ $content = $_tmp_page->post_content;
748
+ if ( (strpos($content, "[ecwid_productbrowser]") === false) && (strpos($content, "xProductBrowser") !== false) )
749
+ $disabled = true;
750
+ }
751
+ // $disabled_str is used in appearance settings template
752
+ if ($disabled)
753
+ $disabled_str = 'disabled = "disabled"';
754
+ else
755
+ $disabled_str = "";
756
+
757
+ require_once ECWID_PLUGIN_DIR . 'templates/appearance-settings.php';
758
+ }
 
 
 
 
 
 
 
 
 
759
 
760
  function get_ecwid_store_id() {
761
  static $store_id = null;
762
  if (is_null($store_id)) {
763
  $store_id = get_option('ecwid_store_id');
764
  if (empty($store_id))
765
+ $store_id = ECWID_DEMO_STORE_ID;
766
  }
767
  return $store_id;
768
+ }
769
+
 
 
 
 
 
 
 
 
 
 
 
 
 
770
  function ecwid_dashboard_widget_function() {
771
  echo "<a href=\"https://my.ecwid.com/\" target=\"_blank\">Go to the Ecwid Control Panel</a><br /><br /><a href=\"http://kb.ecwid.com/\" target=\"_blank\">Ecwid Knowledge Base</a>&nbsp;|&nbsp;<a href=\"http://www.ecwid.com/forums/\" target=\"_blank\">Ecwid Forums</a>";
772
  }
775
  if (current_user_can('administrator')) {
776
  wp_add_dashboard_widget('ecwid_dashboard_widget','Ecwid Links', 'ecwid_dashboard_widget_function');
777
  }
778
+ }
 
779
 
780
 
781
  class EcwidMinicartWidget extends WP_Widget {
782
 
783
  function EcwidMinicartWidget() {
784
+ $widget_ops = array('classname' => 'widget_ecwid_minicart', 'description' => __("Your store's minicart", 'ecwid-shopping-cart') );
785
+ $this->WP_Widget('ecwidminicart', __('Ecwid Shopping Bag (Normal)', 'ecwid-shopping-cart'), $widget_ops);
786
+
787
+ }
788
 
789
  function widget($args, $instance) {
790
+ extract($args);
791
  $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
792
 
793
  echo $before_widget;
795
  if ( $title )
796
  echo $before_title . $title . $after_title;
797
 
 
 
798
  echo '<div>';
799
  echo ecwid_get_scriptjs_code();
 
 
800
 
801
  $ecwid_page_id = get_option("ecwid_store_page_id");
802
  $page_url = get_page_link($ecwid_page_id);
831
  class EcwidMinicartMiniViewWidget extends WP_Widget {
832
 
833
  function EcwidMinicartMiniViewWidget() {
834
+ $widget_ops = array('classname' => 'widget_ecwid_minicart_miniview', 'description' => __("Your store's minicart", 'ecwid-shopping-cart') );
835
+ $this->WP_Widget('ecwidminicart_miniview', __('Ecwid Shopping Bag (Mini view)', 'ecwid-shopping-cart'), $widget_ops);
836
  }
837
 
838
  function widget($args, $instance) {
844
  if ( $title )
845
  echo $before_title . $title . $after_title;
846
 
 
 
847
  echo '<div>';
848
  echo ecwid_get_scriptjs_code();
 
 
849
 
850
  $ecwid_page_id = get_option("ecwid_store_page_id");
851
  $page_url = get_page_link($ecwid_page_id);
881
  class EcwidSearchWidget extends WP_Widget {
882
 
883
  function EcwidSearchWidget() {
884
+ $widget_ops = array('classname' => 'widget_ecwid_search', 'description' => __("Your store's search box", 'ecwid-shopping-cart'));
885
+ $this->WP_Widget('ecwidsearch', __('Ecwid Search Box', 'ecwid-shopping-cart'), $widget_ops);
886
  }
887
 
888
  function widget($args, $instance) {
894
  if ( $title )
895
  echo $before_title . $title . $after_title;
896
 
 
 
897
  echo '<div>';
898
  echo ecwid_get_scriptjs_code();
899
+
900
  $ecwid_page_id = get_option("ecwid_store_page_id");
901
  $page_url = get_page_link($ecwid_page_id);
902
  $_tmp_page = get_page($ecwid_page_id);
930
  class EcwidVCategoriesWidget extends WP_Widget {
931
 
932
  function EcwidVCategoriesWidget() {
933
+ $widget_ops = array('classname' => 'widget_ecwid_vcategories', 'description' => __('Vertical menu of categories', 'ecwid-shopping-cart'));
934
+ $this->WP_Widget('ecwidvcategories', __('Ecwid Vertical Categories', 'ecwid-shopping-cart'), $widget_ops);
935
  }
936
 
937
  function widget($args, $instance) {
943
  if ( $title )
944
  echo $before_title . $title . $after_title;
945
 
 
 
946
  echo '<div>';
947
  echo ecwid_get_scriptjs_code();
 
948
  $ecwid_page_id = get_option("ecwid_store_page_id");
949
  $page_url = get_page_link($ecwid_page_id);
950
  $_tmp_page = get_page($ecwid_page_id);
980
  register_widget('EcwidMinicartWidget');
981
  register_widget('EcwidSearchWidget');
982
  register_widget('EcwidVCategoriesWidget');
983
+ register_widget('EcwidMinicartMiniViewWidget');
984
  }
985
 
986
  add_action('widgets_init', 'ecwid_sidebar_widgets_init');
1055
  }
1056
  }
1057
 
1058
+ function ecwid_is_paid_account()
1059
+ {
1060
+ return ecwid_is_api_enabled() && get_ecwid_store_id() != ECWID_DEMO_STORE_ID;
1061
+ }
1062
+
1063
  function ecwid_is_api_enabled()
1064
  {
1065
  $ecwid_is_api_enabled = get_option('ecwid_is_api_enabled');
images/ecwid_wp_attention.gif ADDED
Binary file
images/grid-active.png ADDED
Binary file
images/grid-default.png ADDED
Binary file
images/icon-head-active.png ADDED
Binary file
images/icon-head-default.png ADDED
Binary file
images/icon-sidebar-active.png ADDED
Binary file
images/icon-sidebar-default.png ADDED
Binary file
images/icon-title.png ADDED
Binary file
images/list-active.png ADDED
Binary file
images/list-default.png ADDED
Binary file
images/store_inprogress.png ADDED
Binary file
images/store_ready.png ADDED
Binary file
images/table-active.png ADDED
Binary file
images/table-default.png ADDED
Binary file
js/advanced.js ADDED
File without changes
js/appearance.js ADDED
File without changes
languages/ecwid-shopping-cart-ru_RU.mo ADDED
Binary file
languages/ecwid-shopping-cart.pot ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Ecwid Shopping Cart 2.0\n"
4
+ "PO-Revision-Date: 2013-10-28 11:58:11\n"
5
+ "Last-Translator: <test@example.com>\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+
10
+ msgid "Get help"
11
+ msgstr ""
12
+
13
+ msgid "Go to Ecwid site"
14
+ msgstr ""
15
+
16
+ msgid "Visit storefront"
17
+ msgstr ""
18
+
19
+ msgid "Manage my store"
20
+ msgstr ""
21
+
22
+ msgid "Manage plugin settings"
23
+ msgstr ""
24
+
25
+ msgid "→ Sell on Facebook"
26
+ msgstr ""
27
+
28
+ msgid "Store"
29
+ msgstr ""
30
+
31
+ msgid "<strong>Ecwid shopping cart is almost ready</strong>. Please visit <a target=\"_blank\" href=\"%s\">the created page</a> to see your store with demo products. In order to finish the installation, please go to the <a href=\"admin.php?page=ecwid\"><strong>Ecwid settings</strong></a> and configure the plugin."
32
+ msgstr ""
33
+
34
+ msgid "Ecwid shopping cart settings"
35
+ msgstr ""
36
+
37
+ msgid "Ecwid Store"
38
+ msgstr ""
39
+
40
+ msgid "General settings"
41
+ msgstr ""
42
+
43
+ msgid "General"
44
+ msgstr ""
45
+
46
+ msgid "Appearance settings"
47
+ msgstr ""
48
+
49
+ msgid "Appearance"
50
+ msgstr ""
51
+
52
+ msgid "Advanced settings"
53
+ msgstr ""
54
+
55
+ msgid "Advanced"
56
+ msgstr ""
57
+
58
+ msgid "Your store's minicart"
59
+ msgstr ""
60
+
61
+ msgid "Ecwid Shopping Bag (Normal)"
62
+ msgstr ""
63
+
64
+ msgid "Ecwid Shopping Bag (Mini view)"
65
+ msgstr ""
66
+
67
+ msgid "Your store's search box"
68
+ msgstr ""
69
+
70
+ msgid "Ecwid Search Box"
71
+ msgstr ""
72
+
73
+ msgid "Vertical menu of categories"
74
+ msgstr ""
75
+
76
+ msgid "Ecwid Vertical Categories"
77
+ msgstr ""
78
+
79
+ msgid "Ecwid Shopping Cart - Advanced settings"
80
+ msgstr ""
81
+
82
+ msgid "Category shown by default"
83
+ msgstr ""
84
+
85
+ msgid "Store root category"
86
+ msgstr ""
87
+
88
+ msgid "Default category ID"
89
+ msgstr ""
90
+
91
+ msgid "By default, the storefront shows a list of root categories. You can override this behaviour and show a different category when customers open your store for the first time. It is useful if you have one category only or want to display a specific set of items (e.g. \"Featured products\") to all new visitors."
92
+ msgstr ""
93
+
94
+ msgid "In order to set this option, <a %s>find an ID of the necessary category</a> and save it here."
95
+ msgstr ""
96
+
97
+ msgid "Single Sign-on Secret Key"
98
+ msgstr ""
99
+
100
+ msgid "This optional feature allows enabling Single Sign-On : when customers are logged in to your site, they are automatically logged in to your Ecwid store as well, even if they didn't have an account in the store before. It makes sense to enable this feature, if your visitors actually create accounts in your WordPress website."
101
+ msgstr ""
102
+
103
+ msgid "In order to enable this feature you should submit a secret key. You will find this key in your Ecwid control panel, at \"System Settings > API > Single Sign-on API\" page . This feature is available for <a href=\"http://www.ecwid.com/compare-plans.html\" target=\"_blank\">paid users</a> only."
104
+ msgstr ""
105
+
106
+ msgid "Save changes"
107
+ msgstr ""
108
+
109
+ msgid "Ecwid Shopping Cart - Appearance settings"
110
+ msgstr ""
111
+
112
+ msgid "Display search box above products"
113
+ msgstr ""
114
+
115
+ msgid "Or you can add search box to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
116
+ msgstr ""
117
+
118
+ msgid "Display horizontal categories above products"
119
+ msgstr ""
120
+
121
+ msgid "Or you can add vertical categories to your website's toolbar using <a href=\"widgets.php\">WordPress native widgets</a>."
122
+ msgstr ""
123
+
124
+ msgid "Enable minicart attached to horizontal categories"
125
+ msgstr ""
126
+
127
+ msgid "You should disable this option, if you added minicart to your website's&nbsp;sidebar."
128
+ msgstr ""
129
+
130
+ msgid "Number of categories per row"
131
+ msgstr ""
132
+
133
+ msgid "Number of products per page"
134
+ msgstr ""
135
+
136
+ msgid "Grid view"
137
+ msgstr ""
138
+
139
+ msgid "List view"
140
+ msgstr ""
141
+
142
+ msgid "Table view"
143
+ msgstr ""
144
+
145
+ msgid "Here you can control how many products will be displayed per page. These options define maximum values. If there is not enough space to show all product columns, Ecwid will adapt the number of columns to hold all products."
146
+ msgstr ""
147
+
148
+ msgid "Default view mode on product pages"
149
+ msgstr ""
150
+
151
+ msgid "Grid"
152
+ msgstr ""
153
+
154
+ msgid "List"
155
+ msgstr ""
156
+
157
+ msgid "Table"
158
+ msgstr ""
159
+
160
+ msgid "Default view mode on search results"
161
+ msgstr ""
162
+
163
+ msgid "Ecwid Shopping Cart - General settings"
164
+ msgstr ""
165
+
166
+ msgid "Thank you for choosing Ecwid to build your online store."
167
+ msgstr ""
168
+
169
+ msgid "The first step towards opening your online business: <br />Let’s get started and add a store to your WordPress website in <strong>3</strong> simple steps."
170
+ msgstr ""
171
+
172
+ msgid "Register at Ecwid"
173
+ msgstr ""
174
+
175
+ msgid "Create a new Ecwid account which you will use to manage your store and inventory. The registration is free."
176
+ msgstr ""
177
+
178
+ msgid "Create new Ecwid account"
179
+ msgstr ""
180
+
181
+ msgid "I already have Ecwid account, sign in"
182
+ msgstr ""
183
+
184
+ msgid "You will be able to sign up through your exising Google, Facebook or PayPal profiles as well."
185
+ msgstr ""
186
+
187
+ msgid "Find your Store ID"
188
+ msgstr ""
189
+
190
+ msgid "Store ID is a unique identifier of any Ecwid store, it consists of several digits. You can find it on the \"Dashboard\" page of Ecwid control panel. Also the Store ID will be sent in the Welcome email after the registration."
191
+ msgstr ""
192
+
193
+ msgid "Enter your Store ID"
194
+ msgstr ""
195
+
196
+ msgid "Enter your Store ID here:"
197
+ msgstr ""
198
+
199
+ msgid "Store ID"
200
+ msgstr ""
201
+
202
+ msgid "Save and connect your Ecwid store to the site"
203
+ msgstr ""
204
+
205
+ msgid "Questions? Visit <a href=\"http://help.ecwid.com/?source=wporg\">Ecwid support center</a>."
206
+ msgstr ""
207
+
208
+ msgid "Congratulations!"
209
+ msgstr ""
210
+
211
+ msgid "Your Ecwid store is now connected to your WordPress website."
212
+ msgstr ""
213
+
214
+ msgid "Greetings!"
215
+ msgstr ""
216
+
217
+ msgid "Your Ecwid store is connected to your WordPress website."
218
+ msgstr ""
219
+
220
+ msgid "Control panel"
221
+ msgstr ""
222
+
223
+ msgid "Account status"
224
+ msgstr ""
225
+
226
+ msgid "Paid"
227
+ msgstr ""
228
+
229
+ msgid "Free"
230
+ msgstr ""
231
+
232
+ msgid "Thank you for supporting Ecwid!"
233
+ msgstr ""
234
+
235
+ msgid "Upgrade to get access to cool premium features."
236
+ msgstr ""
237
+
238
+ msgid "Billing and plans"
239
+ msgstr ""
240
+
241
+ msgid "Upgrade"
242
+ msgstr ""
243
+
244
+ msgid "If you want to connect another Ecwid store, you can <a %s>disconnect the current one and change Store ID</a>."
245
+ msgstr ""
lib/EcwidCatalog.php CHANGED
@@ -126,8 +126,8 @@ class EcwidCatalog
126
  {
127
  $params = array
128
  (
129
- array("alias" => "c", "action" => "categories", "params" => array("parent" => $id)),
130
- array("alias" => "p", "action" => "products", "params" => array("category" => $id)),
131
  array("alias" => "pf", "action" => "profile")
132
  );
133
 
126
  {
127
  $params = array
128
  (
129
+ array("alias" => "c", "action" => "categories", "params" => array("parent" => $id)),
130
+ array("alias" => "p", "action" => "products", "params" => array("category" => $id)),
131
  array("alias" => "pf", "action" => "profile")
132
  );
133
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Ecwid Shopping Cart ===
2
  Contributors: Ecwid Team
3
- Tags: ecwid, shopping cart, ecommerce, e-commerce, paypal, google checkout, 2checkout, store, shop, product catalog, inventory
4
  Requires at least: 2.8
5
- Tested up to: 3.6
6
- Stable tag: 1.8.1
7
 
8
  Ecwid is a free full-featured shopping cart that can easily be added to any blog
9
  and takes less than 5 minutes to set up.
@@ -78,6 +78,19 @@ http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
78
  - Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
79
 
80
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  = 1.8.1 =
82
  - [!] Fixed meta title tag display issue on the main store page appeared with the version 1.8 : in some cases, the store page title tag was stripped. Now it should work OK.
83
 
1
  === Ecwid Shopping Cart ===
2
  Contributors: Ecwid Team
3
+ Tags: ecwid, shopping cart, ecommerce, wordpress ecommerce, wp e-commerce, paypal, e-commerce, online store, store, shop, cart, online shop, shopping, digital goods, downloadable products, product catalog, ecomerce, products, facebook, f-commerce
4
  Requires at least: 2.8
5
+ Tested up to: 3.7
6
+ Stable tag: 2.0
7
 
8
  Ecwid is a free full-featured shopping cart that can easily be added to any blog
9
  and takes less than 5 minutes to set up.
78
  - Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
79
 
80
  == Changelog ==
81
+ = 2.0 =
82
+ - **New revamped plugin settings**: the new settings layout makes the plugin easy and intuitive for starters, yet powerful and advanced for experienced merchants.
83
+
84
+ - **Multilingual plugin backend**: the plugin settings now support multilanguage. Currently available in English and Russian. More translations are coming!
85
+
86
+ - **SEO improvements**
87
+ - Auto generated meta description tags for the product and category pages. Now, Google should properly index product/category descriptions and display them in the search results.
88
+ - &lt;title&gt; tags for categories. The SEO category pages in your store now include both title and description tags so they will appear in Google search results properly.
89
+
90
+ - **Smooth HTTP/HTTPS switch**: Ecwid always transfers all sensitive data using secure HTTPS connection and a special 'HTTPS' option in the Ecwid plugin settings is not necessary anymore. Now, the plugin detects connection type and adjust Ecwid integration codes automatically. No manual adjustments are needed regardless of whether you run your site under HTTP or HTTPS.
91
+
92
+ - **Improved compatibility with CloudFlare Rocket Loader**: previously, using CloudFlare Rocket Loader along with Ecwid might cause intermittent loading issues for some stores. We've improved the plugin code to prevent such issues.
93
+
94
  = 1.8.1 =
95
  - [!] Fixed meta title tag display issue on the main store page appeared with the version 1.8 : in some cases, the store page title tag was stripped. Now it should work OK.
96
 
templates/advanced-settings.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form class="wrap pure-form pure-form-aligned ecwid-settings advanced-settings" method="POST" action="options.php">
2
+
3
+ <h2><?php _e('Ecwid Shopping Cart - Advanced settings', 'ecwid-shopping-cart'); ?></h2>
4
+
5
+ <?php settings_fields('ecwid_options_page'); ?>
6
+ <input type="hidden" name="settings_section" value="advanced" />
7
+
8
+ <fieldset>
9
+
10
+ <div class="pure-control-group">
11
+
12
+ <?php if (ecwid_is_paid_account()): ?>
13
+ <label for="ecwid_default_category_id">
14
+ <?php _e('Category shown by default', 'ecwid-shopping-cart'); ?>
15
+ </label>
16
+
17
+ <select name="ecwid_default_category_id" id="ecwid_default_category_id">
18
+ <option value=""><?php _e('Store root category', 'ecwid-shopping-cart'); ?></option>
19
+ <?php foreach ($categories as $category): ?>
20
+ <option
21
+ value="<?php echo esc_attr($category['id']); ?>"
22
+ <?php if ($category['id'] == get_option('ecwid_default_category_id')): ?>
23
+ selected="selected"
24
+ <?php endif; ?>
25
+ >
26
+ <?php echo esc_html($category['path_str']); ?>
27
+ </option>
28
+ <?php endforeach; ?>
29
+ </select>
30
+ <?php else: ?>
31
+
32
+ <label for="ecwid_default_category_id">
33
+ <?php _e('Default category ID', 'ecwid-shopping-cart'); ?>
34
+ </label>
35
+
36
+ <input
37
+ id="ecwid_default_category_id"
38
+ name="ecwid_default_category_id"
39
+ type="text"
40
+ placeholder="<?php _e('Default category ID', 'ecwid-shopping-cart'); ?>"
41
+ value="<?php echo esc_attr(get_option('ecwid_default_category_id')) ?>"
42
+ />
43
+ <?php endif; ?>
44
+ <div class="note">
45
+ <?php _e('By default, the storefront shows a list of root categories. You can override this behaviour and show a different category when customers open your store for the first time. It is useful if you have one category only or want to display a specific set of items (e.g. "Featured products") to all new visitors.', 'ecwid-shopping-cart'); ?>
46
+ </div>
47
+ <div class="note">
48
+ <?php if (!ecwid_is_paid_account()): ?>
49
+ <?php echo sprintf(
50
+ __('In order to set this option, <a %s>find an ID of the necessary category</a> and save it here.', 'ecwid-shopping-cart'),
51
+ 'target="_blank" href="http://kb.ecwid.com/w/page/23947812/How%20to%20get%20ID%20of%20your%20product%20or%20category"'
52
+ );
53
+ ?>
54
+ <?php endif; ?>
55
+ </div>
56
+ </div>
57
+
58
+ <hr />
59
+
60
+ <div class="pure-control-group last">
61
+ <label for="ecwid_sso_secret_key">
62
+ <?php _e('Single Sign-on Secret Key', 'ecwid-shopping-cart'); ?>
63
+ </label>
64
+
65
+ <input
66
+ id="ecwid_sso_secret_key"
67
+ type="text"
68
+ name="ecwid_sso_secret_key"
69
+ placeholder="<?php _e('Single Sign-on Secret Key', 'ecwid-shopping-cart'); ?>"
70
+ value="<?php echo esc_attr(get_option('ecwid_sso_secret_key')); ?>"
71
+ />
72
+
73
+ <div class="note">
74
+ <?php _e("This optional feature allows enabling Single Sign-On : when customers are logged in to your site, they are automatically logged in to your Ecwid store as well, even if they didn't have an account in the store before. It makes sense to enable this feature, if your visitors actually create accounts in your WordPress website.", 'ecwid-shopping-cart'); ?>
75
+ </div>
76
+ <div class="note grayed-links">
77
+ <?php _e('In order to enable this feature you should submit a secret key. You will find this key in your Ecwid control panel, at "System Settings > API > Single Sign-on API" page . This feature is available for <a href="http://www.ecwid.com/compare-plans.html" target="_blank">paid users</a> only.', 'ecwid-shopping-cart'); ?>
78
+ </div>
79
+ </div>
80
+
81
+ </fieldset>
82
+
83
+ <fieldset>
84
+ <hr />
85
+
86
+ <div class="pure-control-group">
87
+ <button type="submit" class="pure-button pure-button-primary">
88
+ <?php _e('Save changes', 'ecwid-shopping-cart'); ?>
89
+ </button>
90
+ </div>
91
+ </fieldset>
92
+ </form>
templates/appearance-settings.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form class="wrap pure-form pure-form-aligned ecwid-settings appearance-settings" method="POST" action="options.php">
2
+
3
+ <h2><?php _e('Ecwid Shopping Cart - Appearance settings', 'ecwid-shopping-cart'); ?></h2>
4
+
5
+ <?php settings_fields('ecwid_options_page'); ?>
6
+ <input type="hidden" name="settings_section" value="appearance" />
7
+
8
+ <fieldset>
9
+
10
+ <div class="pure-control-group">
11
+ <label for="ecwid_show_search_box">
12
+ <?php _e('Display search box above products', 'ecwid-shopping-cart'); ?>
13
+ </label>
14
+
15
+ <input
16
+ id="ecwid_show_search_box"
17
+ name="ecwid_show_search_box"
18
+ type="checkbox"
19
+ <?php if (get_option('ecwid_show_search_box')): ?>
20
+ checked="checked"
21
+ <?php endif; ?>
22
+ $disabled_str
23
+ />
24
+ <span class="note inline-note">
25
+ <?php _e('Or you can add search box to your website\'s toolbar using <a href="widgets.php">WordPress native widgets</a>.', 'ecwid-shopping-cart'); ?>
26
+ </span>
27
+ </div>
28
+
29
+ <div class="pure-control-group">
30
+ <label for="ecwid_show_categories">
31
+ <?php _e('Display horizontal categories above products', 'ecwid-shopping-cart'); ?>
32
+ </label>
33
+
34
+ <input
35
+ id="ecwid_show_categories"
36
+ name="ecwid_show_categories"
37
+ type="checkbox"
38
+ <?php if (get_option('ecwid_show_categories')): ?>
39
+ checked="checked"
40
+ <?php endif; ?>
41
+ $disabled_str
42
+ />
43
+ <span class="note inline-note">
44
+ <?php _e('Or you can add vertical categories to your website\'s toolbar using <a href="widgets.php">WordPress native widgets</a>.', 'ecwid-shopping-cart'); ?>
45
+ </span>
46
+ </div>
47
+
48
+ <div class="pure-control-group">
49
+ <label for="ecwid_enable_minicart">
50
+ <?php _e('Enable minicart attached to horizontal categories', 'ecwid-shopping-cart'); ?>
51
+ </label>
52
+
53
+ <input
54
+ id="ecwid_enable_minicart"
55
+ name="ecwid_enable_minicart"
56
+ type="checkbox"
57
+ <?php if (get_option('ecwid_enable_minicart')): ?>
58
+ checked="checked"
59
+ <?php endif; ?>
60
+ $disabled_str
61
+ />
62
+ <span class="note inline-note">
63
+ <?php _e("You should disable this option, if you added minicart to your website's&nbsp;sidebar.", 'ecwid-shopping-cart'); ?>
64
+ </span>
65
+ </div>
66
+
67
+ <div class="pure-control-group">
68
+ <label for="ecwid_pb_categoriesperrow">
69
+ <?php _e('Number of categories per row', 'ecwid-shopping-cart'); ?>
70
+ </label>
71
+
72
+ <input
73
+ id="ecwid_pb_categoriesperrow"
74
+ name="ecwid_pb_categoriesperrow"
75
+ type="text"
76
+ class="number"
77
+ value="<?php echo esc_attr(get_option('ecwid_pb_categoriesperrow')); ?>"
78
+ $disabled_str
79
+ />
80
+ </div>
81
+
82
+ <hr />
83
+
84
+
85
+ <div class="pure-control-group">
86
+ <label class="products-per-page-label"><?php _e('Number of products per page', 'ecwid-shopping-cart'); ?></label>
87
+ <div class="ecwid-pb-view-size grid active" tabindex="1">
88
+ <div class="title"><?php _e('Grid view', 'ecwid-shopping-cart'); ?></div>
89
+ <div class="main-area"></div>
90
+ <div class="right">
91
+ <div class="ruler"></div>
92
+ <input
93
+ type="text"
94
+ size="2"
95
+ name="ecwid_pb_productsperrow_grid"
96
+ class="number"
97
+ value="<?php echo esc_attr(get_option('ecwid_pb_productsperrow_grid')); ?>"
98
+ />
99
+ </div>
100
+ <div class="bottom">
101
+ <div class="ruler"></div>
102
+ <input
103
+ type="text"
104
+ size="2"
105
+ name="ecwid_pb_productspercolumn_grid"
106
+ class="number"
107
+ value="<?php echo esc_attr(get_option('ecwid_pb_productspercolumn_grid')); ?>"
108
+ />
109
+ </div>
110
+ </div>
111
+
112
+ <div class="ecwid-pb-view-size list" tabindex="1">
113
+ <div class="title"><?php _e('List view', 'ecwid-shopping-cart'); ?></div>
114
+ <div class="main-area"></div>
115
+ <div class="right">
116
+ <div class="ruler"></div>
117
+ <input
118
+ type="text"
119
+ size="2"
120
+ name="ecwid_pb_productsperpage_list"
121
+ class="number"
122
+ value="<?php echo esc_attr(get_option('ecwid_pb_productsperpage_list')); ?>" />
123
+ </div>
124
+ </div>
125
+
126
+
127
+ <div class="ecwid-pb-view-size table" tabindex="1">
128
+ <div class="title"><?php _e('Table view', 'ecwid-shopping-cart'); ?></div>
129
+ <div class="main-area"></div>
130
+ <div class="right">
131
+ <div class="ruler"></div>
132
+ <input
133
+ type="text"
134
+ size="2"
135
+ name="ecwid_pb_productsperpage_table"
136
+ class="number"
137
+ value="<?php echo esc_attr(get_option('ecwid_pb_productsperpage_table')); ?>"
138
+ />
139
+ </div>
140
+ </div>
141
+ <p class="note pb-note"><?php _e('Here you can control how many products will be displayed per page. These options define maximum values. If there is not enough space to show all product columns, Ecwid will adapt the number of columns to hold all products.', 'ecwid-shopping-cart'); ?></p>
142
+ </div>
143
+
144
+ <hr />
145
+
146
+ <div class="pure-control-group">
147
+ <label for="ecwid_pb_defaultview">
148
+ <?php _e('Default view mode on product pages', 'ecwid-shopping-cart'); ?>
149
+ </label>
150
+
151
+ <select id="ecwid_pb_defaultview" name="ecwid_pb_defaultview" $disabled_str>
152
+ <option value="grid" <?php if(get_option('ecwid_pb_defaultview') == 'grid') echo 'selected="selected"' ?> >
153
+ <?php _e('Grid', 'ecwid-shopping-cart'); ?>
154
+ </option>
155
+ <option value="list" <?php if(get_option('ecwid_pb_defaultview') == 'list') echo 'selected="selected"' ?> >
156
+ <?php _e('List', 'ecwid-shopping-cart'); ?>
157
+ </option>
158
+ <option value="table" <?php if(get_option('ecwid_pb_defaultview') == 'table') echo 'selected="selected"' ?> >
159
+ <?php _e('Table', 'ecwid-shopping-cart'); ?>
160
+ </option>
161
+ </select>
162
+ </div>
163
+
164
+ <div class="pure-control-group">
165
+ <label for="ecwid_pb_searchview">
166
+ <?php _e('Default view mode on search results', 'ecwid-shopping-cart'); ?>
167
+ </label>
168
+
169
+ <select id="ecwid_pb_searchview" name="ecwid_pb_searchview" $disabled_str>
170
+ <option value="grid" <?php if(get_option('ecwid_pb_searchview') == 'grid') echo 'selected="selected"' ?> >
171
+ <?php _e('Grid', 'ecwid-shopping-cart'); ?>
172
+ </option>
173
+ <option value="list" <?php if(get_option('ecwid_pb_searchview') == 'list') echo 'selected="selected"' ?> >
174
+ <?php _e('List', 'ecwid-shopping-cart'); ?>
175
+ </option>
176
+ <option value="table" <?php if(get_option('ecwid_pb_searchview') == 'table') echo 'selected="selected"' ?> >
177
+ <?php _e('Table', 'ecwid-shopping-cart'); ?>
178
+ </option>
179
+ </select>
180
+ </div>
181
+
182
+ </fieldset>
183
+
184
+ <fieldset>
185
+ <hr />
186
+ <div class="pure-control-group">
187
+ <button type="submit" class="pure-button pure-button-primary"><?php _e('Save changes', 'ecwid-shopping-cart'); ?></button>
188
+ </div>
189
+ </fieldset>
190
+ </form>
templates/general-settings-initial.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap pure-form ecwid-settings general-settings">
2
+
3
+ <h2><?php _e('Ecwid Shopping Cart - General settings', 'ecwid-shopping-cart'); ?></h2>
4
+
5
+ <form method="POST" action="options.php">
6
+ <?php settings_fields('ecwid_options_page'); ?>
7
+ <fieldset>
8
+
9
+ <input type="hidden" name="settings_section" value="general" />
10
+
11
+ <div class="greeting-box">
12
+ <div class="main-message">
13
+ <?php _e('Thank you for choosing Ecwid to build your online store.', 'ecwid-shopping-cart'); ?>
14
+ </div>
15
+ <div class="secondary-message">
16
+ <?php _e('The first step towards opening your online business: <br />Let’s get started and add a store to your WordPress website in <strong>3</strong> simple steps.', 'ecwid-shopping-cart'); ?>
17
+ </div>
18
+ </div>
19
+ <hr />
20
+
21
+ <ol>
22
+ <li>
23
+ <h4><?php _e('Register at Ecwid', 'ecwid-shopping-cart'); ?></h4>
24
+ <div>
25
+ <?php _e('Create a new Ecwid account which you will use to manage your store and inventory. The registration is free.', 'ecwid-shopping-cart'); ?>
26
+ </div>
27
+ <div class="ecwid-account-buttons">
28
+ <a class="pure-button pure-button-secondary" target="_blank" href="https://my.ecwid.com/cp/?source=wporg#register">
29
+ <?php _e('Create new Ecwid account', 'ecwid-shopping-cart'); ?>
30
+ </a>
31
+ <a class="pure-button pure-button-secondary" target="_blank" href="https://my.ecwid.com/cp/?source=wporg#t1=&t2=Dashboard">
32
+ <?php _e('I already have Ecwid account, sign in', 'ecwid-shopping-cart'); ?>
33
+ </a>
34
+ </div>
35
+ <div class="note">
36
+ <?php _e('You will be able to sign up through your exising Google, Facebook or PayPal profiles as well.', 'ecwid-shopping-cart'); ?>
37
+ </div>
38
+ </li>
39
+ <li>
40
+ <h4><?php _e('Find your Store ID', 'ecwid-shopping-cart'); ?></h4>
41
+ <div>
42
+ <?php _e('Store ID is a unique identifier of any Ecwid store, it consists of several digits. You can find it on the "Dashboard" page of Ecwid control panel. Also the Store ID will be sent in the Welcome email after the registration.', 'ecwid-shopping-cart'); ?>
43
+ </div>
44
+ </li>
45
+ <li>
46
+ <h4>
47
+ <?php _e('Enter your Store ID', 'ecwid-shopping-cart'); ?>
48
+ </h4>
49
+ <div><label for="ecwid_store_id"><?php _e('Enter your Store ID here:', 'ecwid-shopping-cart'); ?></label></div>
50
+ <div class="pure-control-group store-id">
51
+ <input
52
+ id="ecwid_store_id"
53
+ name="ecwid_store_id"
54
+ type="text"
55
+ placeholder="<?php _e('Store ID', 'ecwid-shopping-cart'); ?>"
56
+ value="<?php if (get_ecwid_store_id() != 1003) echo esc_attr(get_ecwid_store_id()); ?>"
57
+ />
58
+ <button type="submit" class="pure-button pure-button-primary"><?php _e('Save and connect your Ecwid store to the site', 'ecwid-shopping-cart'); ?></button>
59
+ </div>
60
+
61
+ </li>
62
+ </ol>
63
+ <hr />
64
+ <p><?php _e('Questions? Visit <a href="http://help.ecwid.com/?source=wporg">Ecwid support center</a>.', 'ecwid-shopping-cart'); ?></p>
65
+ </fieldset>
66
+ </form>
67
+ </div>
templates/general-settings.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap pure-form ecwid-settings general-settings">
2
+ <h2><?php _e('Ecwid Shopping Cart - General settings', 'ecwid-shopping-cart'); ?></h2>
3
+
4
+
5
+ <form method="POST" action="options.php" name="settings">
6
+ <?php settings_fields('ecwid_options_page'); ?>
7
+ <fieldset>
8
+
9
+ <input type="hidden" name="settings_section" value="general" />
10
+
11
+ <div class="greeting-box complete">
12
+ <?php if ($_GET['settings-updated']): ?>
13
+
14
+ <div class="main-message"><?php _e('Congratulations!', 'ecwid-shopping-cart'); ?></div>
15
+ <div class="secondary-message"?><?php _e('Your Ecwid store is now connected to your WordPress website.', 'ecwid-shopping-cart'); ?></div>
16
+
17
+ <?php else: ?>
18
+
19
+ <div class="main-message"><?php _e('Greetings!', 'ecwid-shopping-cart'); ?></div>
20
+ <div class="secondary-message"?><?php _e('Your Ecwid store is connected to your WordPress website.', 'ecwid-shopping-cart'); ?></div>
21
+ <?php endif; ?>
22
+ </div>
23
+ <hr />
24
+ <div class="section">
25
+ <div class="left">
26
+ <span class="main-info">
27
+ <?php _e('Store ID', 'ecwid-shopping-cart'); ?>: <strong><? echo esc_attr(get_ecwid_store_id()); ?></strong>
28
+ </span>
29
+ </div>
30
+ <div class="right"">
31
+ <a class="pure-button" target="_blank" href="https://my.ecwid.com/cp/?source=wporg#t1=&t2=Dashboard">
32
+ <?php _e('Control panel', 'ecwid-shopping-cart'); ?>
33
+ </a>
34
+ <a class="pure-button" target="_blank" href="<?php echo esc_attr(get_page_link(get_option('ecwid_store_page_id'))); ?>">
35
+ <?php _e('Visit storefront', 'ecwid-shopping-cart'); ?>
36
+ </a>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="section">
41
+ <div class="left">
42
+ <span class="main-info">
43
+ <?php _e('Account status', 'ecwid-shopping-cart'); ?>:
44
+ <strong>
45
+ <?php
46
+ if (ecwid_is_paid_account()) {
47
+ _e('Paid', 'ecwid-shopping-cart');
48
+ } else {
49
+ _e('Free', 'ecwid-shopping-cart');
50
+ }
51
+ ?>
52
+ </strong>
53
+ </span>
54
+ <div class="secondary-info">
55
+ <?php
56
+ if (ecwid_is_paid_account())
57
+ _e('Thank you for supporting Ecwid!', 'ecwid-shopping-cart');
58
+ else
59
+ _e('Upgrade to get access to cool premium features.', 'ecwid-shopping-cart');
60
+ ?>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="right">
65
+ <?php if (ecwid_is_api_enabled()): ?>
66
+ <a class="pure-button" target="_blank" href="https://my.ecwid.com/cp/CP.html#profile=Billing&t2=My_Profile">
67
+ <?php _e('Billing and plans', 'ecwid-shopping-cart'); ?>
68
+ </a>
69
+ <?php else: ?>
70
+ <a class="pure-button pure-button-primary" target="_blank" href="http://www.ecwid.com/plans-and-pricing.html">
71
+ <?php _e('Upgrade', 'ecwid-shopping-cart'); ?>
72
+ </a>
73
+ <?php endif; ?>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="note grayed-links">
78
+ <?php
79
+ echo sprintf(
80
+ __('If you want to connect another Ecwid store, you can <a %s>disconnect the current one and change Store ID</a>.', 'ecwid-shopping-cart'),
81
+ 'href="#" onClick="javascript:document.forms[\'settings\'].submit(); return false;"'
82
+ );
83
+ ?>
84
+
85
+ </div>
86
+
87
+ <hr />
88
+ <p><?php _e('Questions? Visit <a href="http://help.ecwid.com/?source=wporg">Ecwid support center</a>.', 'ecwid-shopping-cart'); ?></p>
89
+ </fieldset>
90
+ </form>
91
+ </div>