Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Vincent Augagneur committed 2013-09-12 10:08:32 +02:00
commit 6fa398e8e0
36 files changed
+882 -440

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world by @mdo and @fat. * Designed and built with all the love in the world by @mdo and @fat.
*//* normalize.css v2.1.0 | 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}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}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}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}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}@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:2cm .5cm}p,h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header{orphans:3;widows:3}h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header{page-break-after:avoid}.navbar,#header_infos{display:none}.table td,.table th{background-color:#fff !important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:12px;line-height:1.42857;color:#555;background-color:#313a45}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#6992af;text-decoration:none}a:hover,a:focus{color:#476b85;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail,.thumbnail{padding:4px;line-height:1.42857;background-color:#313a45;border:1px solid #ddd;border-radius:3px;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:17px;margin-bottom:17px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 8.5px}.lead{margin-bottom:17px;font-size:13.8px;font-weight:200;line-height:1.4}@media (min-width: 768px){.lead{font-size:18px}}small{font-size:85%}cite{font-style:normal}.text-muted,.module_description,.hook_panel_header .hook_description{color:#999}.text-primary{color:#6992af}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Ubuntu",sans-serif;font-weight:300;line-height:1.1Line truncated *//* normalize.css v2.1.0 | 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}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}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}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}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}@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:2cm .5cm}p,h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header{orphans:3;widows:3}h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header{page-break-after:avoid}.navbar,#header_infos{display:none}.table td,.table th{background-color:#fff !important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Open Sans",Helvetica,Arial,sans-serif;font-size:12px;line-height:1.42857;color:#555;background-color:#515561}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#89afe5;text-decoration:none}a:hover,a:focus{color:#4a84d7;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail,.thumbnail{padding:4px;line-height:1.42857;background-color:#515561;border:1px solid #ddd;border-radius:3px;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:17px;margin-bottom:17px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 8.5px}.lead{margin-bottom:17px;font-size:13.8px;font-weight:200;line-height:1.4}@media (min-width: 768px){.lead{font-size:18px}}small{font-size:85%}cite{font-style:normal}.text-muted,.module_description,.hook_panel_header .hook_description{color:#999}.text-primary{color:#89afe5}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,#content .panel-heading,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Ubuntu",sans-serif;font-weight:300;line-height:1.1Line truncated
* Font Awesome 3.2.1 * Font Awesome 3.2.1
* the iconic font designed for Bootstrap * the iconic font designed for Bootstrap
* ------------------------------------------------------------------------------ * ------------------------------------------------------------------------------
@@ -30,4 +30,4 @@
* Email: dave@fontawesome.io * Email: dave@fontawesome.io
* Twitter: http://twitter.com/byscuits * Twitter: http://twitter.com/byscuits
* Work: Lead Product Designer @ Kyruus - http://kyruus.com * Work: Lead Product Designer @ Kyruus - http://kyruus.com
*/@font-face{font-family:'FontAwesome';src:url("../font/fontawesome-webfont.eot?v=3.2.1");src:url("../font/fontawesome-webfont.eot?#iefix&v=3.2.1") format("embedded-opentype"),url("../font/fontawesome-webfont.woff?v=3.2.1") format("woff"),url("../font/fontawesome-webfont.ttf?v=3.2.1") format("truetype"),url("../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1") format("svg");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^="icon-"],a [class*=" icon-"]{display:inline}[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em}.icons-ul{margin-left:2.142857142857143em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit}[class^="icon-"].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eeeeee}.icon-light{color:#ffffff}.icon-dark{color:#333333}.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right,#content h3 .panel-heading-action,#content .panel-heading .panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header .panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header .panel-heading-action{float:right}.pull-left,.page-head h2.page-title{float:left}[class^="icon-"].pull-left,.page-head h2[class^="icon-"].page-title,[class*=" icon-"].pull-left,.page-head h2[class*=" icon-"].page-title{margin-right:.3em}[class^="icon-"].pull-right,#content h3 [class^="icon-"].panel-heading-action,#content .panel-heading [class^="icon-"].panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header [class^="icon-"].panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header [class^="icon-"].panel-heading-action,[class*=" icon-"].pull-right,#content h3 [class*=" icon-"].panel-heading-action,#content .panel-heading [class*=" icon-"].panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header [class*=" icon-"].panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header [class*=" icon-"].panel-heading-action{margin-left:.3em}[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],#header_infos .nav>.active>a>[class^="icon-"],.navbar-inverse #header_notifs_icon_wrapper>.active>a>[class^="icon-"],#header_infos #header_notifs_icon_wrapper>.active>a>[class^="icon-"],.navbar-inverse #header_employee_box>.active>a>[class^="icon-"],#header_infos #header_employee_box>.active>a>[class^="icon-"],.navbar-inverse #header_quick>.active>a>[class^="icon-"],#header_infos #header_quick>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],#header_infos .nav>.active>a>[class*=" icon-"],.navbar-inverse #header_notifs_icon_wrapper>.active>a>[class*=" icon-"],#header_infos #header_notifs_icon_wrapper>.active>a>[class*=" icon-"],.navbar-inverse #header_employee_box>.active>a>[class*=" icon-"],#header_infos #header_employee_box>.active>a>[class*=" icon-"],.navbar-inverse #header_quick>.active>a>[class*=" icon-"],#header_infos #header_quick>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^="icon-"].icon-large,.nav [class^="icon-Line truncated */@font-face{font-family:'FontAwesome';src:url("../font/fontawesome-webfont.eot?v=3.2.1");src:url("../font/fontawesome-webfont.eot?#iefix&v=3.2.1") format("embedded-opentype"),url("../font/fontawesome-webfont.woff?v=3.2.1") format("woff"),url("../font/fontawesome-webfont.ttf?v=3.2.1") format("truetype"),url("../font/fontawesome-webfont.svg#fontawesomeregular?v=3.2.1") format("svg");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em}[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}a [class^="icon-"],a [class*=" icon-"]{display:inline}[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em}.icons-ul{margin-left:2.142857142857143em;list-style-type:none}.icons-ul>li{position:relative}.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit}[class^="icon-"].hide,[class*=" icon-"].hide{display:none}.icon-muted{color:#eeeeee}.icon-light{color:#ffffff}.icon-dark{color:#333333}.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.icon-5x{font-size:5em}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.pull-right,#content h3 .panel-heading-action,#content .panel-heading .panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header .panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header .panel-heading-action{float:right}.pull-left,.page-head h2.page-title{float:left}[class^="icon-"].pull-left,.page-head h2[class^="icon-"].page-title,[class*=" icon-"].pull-left,.page-head h2[class*=" icon-"].page-title{margin-right:.3em}[class^="icon-"].pull-right,#content h3 [class^="icon-"].panel-heading-action,#content .panel-heading [class^="icon-"].panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header [class^="icon-"].panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header [class^="icon-"].panel-heading-action,[class*=" icon-"].pull-right,#content h3 [class*=" icon-"].panel-heading-action,#content .panel-heading [class*=" icon-"].panel-heading-action,#content #header_notifs_icon_wrapper .notifs_panel .notifs_panel_header [class*=" icon-"].panel-heading-action,#header_notifs_icon_wrapper .notifs_panel #content .notifs_panel_header [class*=" icon-"].panel-heading-action{margin-left:.3em}[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],#header_infos .nav>.active>a>[class^="icon-"],.navbar-inverse #header_notifs_icon_wrapper>.active>a>[class^="icon-"],#header_infos #header_notifs_icon_wrapper>.active>a>[class^="icon-"],.navbar-inverse #header_employee_box>.active>a>[class^="icon-"],#header_infos #header_employee_box>.active>a>[class^="icon-"],.navbar-inverse #header_quick>.active>a>[class^="icon-"],#header_infos #header_quick>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],#header_infos .nav>.active>a>[class*=" icon-"],.navbar-inverse #header_notifs_icon_wrapper>.active>a>[class*=" icon-"],#header_infos #header_notifs_icon_wrapper>.active>a>[class*=" icon-"],.navbar-inverse #header_employee_box>.active>a>[class*=" icon-"],#header_infos #header_employee_box>.active>a>[class*=" icon-"],.navbar-inverse #header_quick>.active>a>[class*=" icon-"],#header_infos #header_quick>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}.btn [class^="icon-"].icon-large,.nav [class^="icon-Line truncated
+29 -22
View File
@@ -1,5 +1,5 @@
//$brand-primary: #1BA6E5 //$brand-primary: #1BA6E5
$brand-primary: #6992AF
//light //light
//$main-color: #F7F7F7 //$main-color: #F7F7F7
@@ -8,13 +8,15 @@ $brand-primary: #6992AF
//$main-color: #E0E0E0 //gris //$main-color: #E0E0E0 //gris
//$main-color: #D7D6DE //violet //$main-color: #D7D6DE //violet
//$main-color: #F1F8FE //theme wordpress //$main-color: #F1F8FE //theme wordpress
//dark //dark
//$main-color: #272A31 //bleu PrestaShop //$main-color: #272A31 //bleu PrestaShop
//$main-color: #3D3D3D //gris //$main-color: #3D3D3D //gris
//$main-color: #515561 //gris bleu clair $main-color: #515561 //gris bleu clair
//$main-color: #4D4645 //taupe //$main-color: #4D4645 //taupe
//$main-color: #272822 //gris vert //$main-color: #272822 //gris vert
$main-color: #313A45 //gris bleu //$main-color: #313A45 //gris bleu
//$main-color: #7B8676
//$main-color: #443A42 //violet //$main-color: #443A42 //violet
//$main-color: #373E35 //vert camo //$main-color: #373E35 //vert camo
//$main-color: #262C3F //bleu nuit - pretty sure that a girl could do better naming the colors, sorry about that... //$main-color: #262C3F //bleu nuit - pretty sure that a girl could do better naming the colors, sorry about that...
@@ -30,14 +32,17 @@ $main-color: #313A45 //gris bleu
//$secondary-color: #4691D2 //bleu ciel //$secondary-color: #4691D2 //bleu ciel
//$secondary-color: #814C76 //violet //$secondary-color: #814C76 //violet
//$secondary-color: #FE635F //saumon //$secondary-color: #FE635F //saumon
//$secondary-color: #F8235A //rose //$secondary-color: #FFB4B8 //rose
//$secondary-color: #F2B100 //moutarde //$secondary-color: #F2B100 //moutarde
//$secondary-color: #F7854E //abricot //$secondary-color: #F6A88A //abricot
//$secondary-color: #937976 //taupe clair //$secondary-color: #937976 //taupe clair
//$secondary-color: #60C276 //vert //$secondary-color: #60C276 //vert
//$secondary-color: #9DC44B //vert pomme //$secondary-color: #9DC44B //vert pomme
$secondary-color: #6992AF //theme wordpress //$secondary-color: #6992AF //theme wordpress
//$secondary-color: #8BC954 //vert PrestaShop //$secondary-color: #8BC954 //vert PrestaShop
$secondary-color: #AB7073
$brand-primary: #89AFE5
//some tests //some tests
//$secondary-color: #79C09D //$secondary-color: #79C09D
@@ -68,7 +73,7 @@ $bg-page-head-color : $secondary-color
$bg-panel-heading-color: hsl(hue($secondary-color), 10, 90) $bg-panel-heading-color: hsl(hue($secondary-color), 10, 90)
//others //others
$badge-notif-color: #EF1778 $badge-notif-color: #8BC954
$icon-color: #87C795 $icon-color: #87C795
@import "compass" @import "compass"
@@ -150,7 +155,7 @@ html, body
background-image: url('../img/patterns/bedge_grunge.png') // texture background-image: url('../img/patterns/bedge_grunge.png') // texture
#content #content
padding: 90px 20px 0 padding: 80px 20px 0
margin-left: 240px margin-left: 240px
@include transition-property(margin) @include transition-property(margin)
@include transition-duration(0.4s) @include transition-duration(0.4s)
@@ -356,21 +361,21 @@ html, body
text-decoration: none text-decoration: none
&:last-child a &:last-child a
border-bottom: none border-bottom: none
&.active &.active a
a
color: contrast-color($brand-primary, white, #333, 10%) color: contrast-color($brand-primary, white, #333, 10%)
background-color: $brand-primary background-color: $brand-primary
border-bottom: solid 1px darken($brand-primary,10%) border-bottom: solid 1px darken($brand-primary,10%)
#nav-topbar #nav-topbar
position: fixed
height: 28px height: 28px
top: 36px top: 35px
left: 80 left: 80
width: 100% width: 100%
z-index: 600 z-index: 600
background-color: white background-color: white
border-top: black solid 1px border-top: black solid 1px
border-bottom: black solid 1px border-bottom: darken($secondary-color,20%) solid 1px
ul.menu ul.menu
height: 28px height: 28px
margin: 0 margin: 0
@@ -415,12 +420,12 @@ html, body
ul.submenu ul.submenu
display: none!important display: none!important
@include box-shadow(rgba(black,0.3) 0 2px 4px) @include box-shadow(rgba(black,0.3) 0 2px 4px)
> ul.menu > li > ul.menu > li.expanded
ul.submenu.expanded ul.submenu
display: block!important display: block!important
> ul.menu > li > ul.menu > li
ul.submenu ul.submenu
display: none display: none!important
position: absolute position: absolute
margin: 0 margin: 0
padding: 0 padding: 0
@@ -445,9 +450,9 @@ html, body
&:last-child a &:last-child a
border-bottom: none border-bottom: none
&.active a &.active a
color: contrast-color($main-color, white, #333, 10%) color: contrast-color($brand-primary, white, #333, 10%)
background-color: $main-color background-color: $brand-primary
border-bottom: solid 1px darken($main-color,10%) border-bottom: solid 1px darken($brand-primary,10%)
.page-topbar .page-topbar
#main #main
@@ -455,7 +460,7 @@ html, body
#nav-sidebar #nav-sidebar
display: none display: none
.page-head .page-head
top: 64px top: 63px
#content #content
margin-left: 0 margin-left: 0
width: 100% width: 100%
@@ -1262,6 +1267,11 @@ fieldset > .row
margin: 0 4px 0 6px margin: 0 4px 0 6px
background-color: #ccc background-color: #ccc
+border-radius(6px) +border-radius(6px)
.tree-item-disable, .tree-folder-name-disable
color: #ccc
&:hover
color: #ccc
background-color: none
#carrier_wizard #carrier_wizard
position: relative position: relative
@@ -1405,6 +1415,3 @@ fieldset > .row
width: auto width: auto
.field_error .field_error
border-color: $brand-danger border-color: $brand-danger
+76 -34
View File
@@ -25,42 +25,84 @@
$( document ).ready(function() { $( document ).ready(function() {
//nav side bar //nav side bar
$('#nav-sidebar li.maintab.has_submenu').append('<span class="submenu_expand"></span>'); function navSidebar(){
$('#nav-sidebar .submenu_expand').click(function(){ $('#nav-sidebar li.maintab.has_submenu').append('<span class="submenu_expand"></span>');
var $navId = $(this).parent(); $('#nav-sidebar .submenu_expand').on('click',function(){
$(".submenu-collapse").remove(); var $navId = $(this).parent();
if($(".expanded").length ){ $('.submenu-collapse').remove();
$(".expanded > ul").slideUp( if($('.expanded').length ){
"fast", $('.expanded > ul').slideUp(
function(){ 'fast',
var $target = $(".expanded"); function(){
$target.removeClass("expanded"); var $target = $('.expanded');
$($navId).not($target).not(".active").addClass("expanded"); $target.removeClass('expanded');
$($navId).not($target).not(".active").children("ul:first").hide().slideDown(); $($navId).not($target).not('.active').addClass('expanded');
} $($navId).not($target).not('.active').children('ul:first').hide().slideDown();
); }
} );
else { }
$($navId).not(".active").addClass("expanded"); else {
$($navId).not(".active").children("ul:first").hide().slideDown(); $($navId).not('.active').addClass('expanded');
} $($navId).not('.active').children('ul:first').hide().slideDown();
});
//nav top bar
$(window).on("resize", function() {
$("#nav-topbar ul.menu").find("li.maintab").each(function(){
if ($(this).position().top > 0) {
$(this).addClass("hide");
} }
}); });
}); }
//nav top bar
$("#nav-topbar li.maintab.has_submenu").hover(function(){ function navTopbar(){
$(this).find("ul.submenu").fadeIn("fast").addClass("expanded"); $('.expanded').removeClass('expanded');
}, function(){
//$(this).removeClass("expanded"); $('#nav-topbar').on('mouseenter', 'li.maintab.has_submenu',
$(this).find("ul.submenu").fadeOut("fast").removeClass("expanded"); function(){
}); $(this).addClass('expanded');
});
$('#nav-topbar').on('mouseleave', 'li.maintab.has_submenu',
function(){
$(this).removeClass('expanded');
});
//todo hide element over menu width on load
$('#nav-topbar').find('li.maintab').each(
function(){
if ($(this).position().top > 0) {
$(this).addClass('hide');
}
});
//todo hide element over menu width on resize
$(window).on('resize', function() {
$('#nav-topbar ul.menu').find('li.maintab').each(function(){
if ($(this).position().top > 0) {
$(this).addClass('hide');
}
});
});
}
//nav switch
function navSwitch(){
if ($('body').hasClass('page-sidebar')||$('body').hasClass('page-sidebar-closed')) {
$('body').removeClass('page-sidebar').removeClass('page-sidebar-closed').addClass('page-topbar');
$('#nav-sidebar').attr('id','nav-topbar');
$('#nav-topbar').off();
navTopbar();
} else {
$('body.page-topbar').removeClass('page-topbar').addClass('page-sidebar');
$('#nav-topbar').attr('id','nav-sidebar');
$('#nav-sidebar').off();
navSidebar();
}
}
//todo add condition
navTopbar();
$('#header_shopname').on('click',
function(e){
e.preventDefault();
navSwitch();
}
);
//tooltip //tooltip
$('.label-tooltip').tooltip(); $('.label-tooltip').tooltip();
@@ -0,0 +1,108 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id}" class="tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
{/if}
{if isset($use_search) && $use_search == true}
$("#{$id}-categories-search").bind("typeahead:selected", function(obj, datum) {
$("#{$id}").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
});
{/if}
$(document).ready(function () {
$("#{$id}").tree("collapseAll");
{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$("#{$id}").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
});
</script>
@@ -0,0 +1,34 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="radio" name="id_parent" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler ">{$node['name']}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>
@@ -0,0 +1,31 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="radio" name="id_parent" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
<label>
</li>
@@ -1,27 +0,0 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if} class="btn btn-default btn-xs">
{if isset($icon_class)}<i class="{$icon_class}"></i>&nbsp;{/if}{l s=$label}
</a>
@@ -1,39 +0,0 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<label for="node-search">{l s=$label}</label>&nbsp;<input type="text"{if isset($id)} id="{$id}"{/if}{if isset($name)} name="{$name}"{/if}{if isset($class)} class="{$class}"{/if} />
{if isset($typeahead_source) && isset($id)}
<script type="text/javascript">
$(document).ready(
function()
{
$("#{$id}").typeahead(
{
name: "{$name}",
local: [{$typeahead_source}]
});
}
);
</script>
{/if}
+1 -2
View File
@@ -289,8 +289,7 @@
<div id="main"> <div id="main">
{include file='nav-top.tpl'} {include file='nav-top.tpl'}
{include file='nav-side.tpl'}
<div id="content" class="page-content"> <div id="content" class="page-content">
{if $display_header && $install_dir_exists} {if $display_header && $install_dir_exists}
<div class="alert alert-warning"> <div class="alert alert-warning">
@@ -158,7 +158,19 @@
{if isset($input.disabled) && $input.disabled}disabled="disabled"{/if} {if isset($input.disabled) && $input.disabled}disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} /> {if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if} />
{if isset($input.suffix)}{$input.suffix}{/if} {if isset($input.suffix)}{$input.suffix}{/if}
{if !empty($input.desc)}<div class="alert alert-info">{$input.desc}</div>{/if} {if !empty($input.desc)}
<div class="alert alert-info">
{if is_array($input.desc)}
<ul>
{foreach $input.desc as $desc}
<li>{$desc}</li>
{/foreach}
</ul>
{else}
{$input.desc}
{/if}
</div>
{/if}
{/if} {/if}
{elseif $input.type == 'select'} {elseif $input.type == 'select'}
{if isset($input.options.query) && !$input.options.query && isset($input.empty_message)} {if isset($input.options.query) && !$input.options.query && isset($input.empty_message)}
@@ -405,7 +417,7 @@
{elseif $input.type == 'shop'} {elseif $input.type == 'shop'}
{$input.html} {$input.html}
{elseif $input.type == 'categories'} {elseif $input.type == 'categories'}
{include file='helpers/form/form_category.tpl' categories=$input.values} {$categories_tree}
{elseif $input.type == 'categories_select'} {elseif $input.type == 'categories_select'}
{$input.category_tree} {$input.category_tree}
{elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop} {elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
@@ -0,0 +1,116 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id}" class="tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
{/if}
{if isset($use_search) && $use_search == true}
$("#{$id}-categories-search").bind("typeahead:selected", function(obj, datum) {
$("#{$id}").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
});
{/if}
$(document).ready(function () {
$("#{$id}").tree("collapseAll");
$("#{$id}").find(":input[type=radio]").click(
function()
{
location.href = location.href.replace(
/&id_category=[0-9]*/, "")+"&id_category="
+$(this).val();
}
);
{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$("#{$id}").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
});
</script>
@@ -22,7 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<li class="tree-folder"> <li class="tree-folder">
<span class="tree-folder-name"> <span class="tree-folder-name">
<i class="icon-folder-close"></i> <i class="icon-folder-close"></i>
@@ -23,8 +23,8 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<li class="tree-folder"> <li class="tree-folder">
<span class="tree-folder-name"> <span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}" /> <input type="checkbox" name="categoryBox[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i> <i class="icon-folder-close"></i>
<label class="tree-toggler">{$node['name']}</label> <label class="tree-toggler">{$node['name']}</label>
</span> </span>
@@ -23,8 +23,8 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<li class="tree-folder"> <li class="tree-folder">
<span class="tree-folder-name"> <span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="radio" name="id-category" value="{$node['id_category']}" /> <input type="radio" name="id-category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i> <i class="icon-folder-close"></i>
<label class="tree-toggler ">{$node['name']}</label> <label class="tree-toggler ">{$node['name']}</label>
</span> </span>
@@ -22,9 +22,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<li class="tree-item"> <li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name"> <label class="tree-item-name">
<input type="checkbox" name="categoryBox[]" value="{$node['id_category']}" /> <input type="checkbox" name="categoryBox[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i> <i class="tree-dot"></i>
{$node['name']} {$node['name']}
</label> </label>
@@ -22,9 +22,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<li class="tree-item"> <li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name"> <label class="tree-item-name">
<input type="radio" name="id-category" value="{$node['id_category']}" /> <input type="radio" name="id-category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i> <i class="tree-dot"></i>
{$node['name']} {$node['name']}
<label> <label>
@@ -1,4 +1,4 @@
<nav id="nav-topbar" data-spy="affix" data-offset-top="34px" role="navigation"> <nav id="nav-topbar" data-spy="affix" data-offset-top="0" role="navigation">
{if !$tab} {if !$tab}
<div class="mainsubtablist" style="display:none"></div> <div class="mainsubtablist" style="display:none"></div>
{/if} {/if}
+5 -1
View File
@@ -477,15 +477,19 @@ class CategoryCore extends ObjectModel
return $categories; return $categories;
} }
public static function getNestedCategories($root_category = 1, public static function getNestedCategories($root_category = null,
$id_lang = false, $active = true, $sql_filter = '', $sql_sort = '', $id_lang = false, $active = true, $sql_filter = '', $sql_sort = '',
$sql_limit = '') $sql_limit = '')
{ {
if (!isset($root_category))
$root_category = self::getRootCategory($id_lang)->id;
if (!Validate::isInt($root_category)) if (!Validate::isInt($root_category))
die(Tools::displayError()); die(Tools::displayError());
if (!Validate::isBool($active)) if (!Validate::isBool($active))
die(Tools::displayError()); die(Tools::displayError());
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT * SELECT *
FROM `'._DB_PREFIX_.'category` c FROM `'._DB_PREFIX_.'category` c
+11 -8
View File
@@ -89,16 +89,18 @@ class HelperFormCore extends Helper
case 'categories': case 'categories':
if ($categories) if ($categories)
{ {
// Added Jquery plugin treeview (css and js files) $tree = new HelperTreeCategories($params['tree']['id'], isset($params['tree']['title']) ? $params['tree']['title'] : null);
$this->context->controller->addJqueryPlugin('treeview-categories');
// Added JS files if (isset($params['tree']['selected_categories']))
$this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.async.js'); $tree->setSelectedCategories($params['tree']['selected_categories']);
$this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/treeview-categories/jquery.treeview-categories.edit.js');
$this->context->controller->addJS(_PS_JS_DIR_.'admin-categories-tree.js');
if (isset($params['use_search']) && $params['use_search']) if (isset($params['tree']['disabled_categories']))
$this->context->controller->addJS(_PS_JS_DIR_.'jquery/plugins/autocomplete/jquery.autocomplete.js'); $tree->setDisabledCategories($params['tree']['disabled_categories']);
if (isset($params['tree']['root_category']))
$tree->setRootCategory($params['tree']['root_category']);
$this->context->smarty->assign('categories_tree', $tree->render());
$categories = false; $categories = false;
} }
break; break;
@@ -225,6 +227,7 @@ class HelperFormCore extends Helper
} }
} }
$tpl = $this->createTemplate('assoshop.tpl'); $tpl = $this->createTemplate('assoshop.tpl');
$tree = Shop::getTree(); $tree = Shop::getTree();
$nb_shop = 0; $nb_shop = 0;
+265
View File
@@ -0,0 +1,265 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class HelperTreeCategories extends TreeCore
{
const DEFAULT_TEMPLATE = 'tree_categories.tpl';
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder_radio.tpl';
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item_radio.tpl';
private $_disabled_categories;
private $_lang;
private $_root_category;
private $_selected_categories;
private $_shop;
private $_use_checkbox;
private $_use_search;
public function __construct($id, $title = null, $root_category = null,
$lang = null, $shop = null)
{
parent::__construct($id);
if (isset($title))
$this->setTitle($title);
if (isset($root_category))
$this->setRootCategory($root_category);
$this->setLang($lang);
$this->setShop($shop);
}
public function getData()
{
if (!isset($this->_data))
$this->setData(Category::getNestedCategories(
$this->getRootCategory(), $this->getLang()));
return $this->_data;
}
public function setDisabledCategories($value)
{
$this->_disabled_categories = $value;
return $this;
}
public function getDisabledCategories()
{
return $this->_disabled_categories;
}
public function setLang($value)
{
$this->_lang = $value;
return $this;
}
public function getLang()
{
if (!isset($this->_lang))
$this->setLang($this->getContext()->employee->id_lang);
return $this->_lang;
}
public function getNodeFolderTemplate()
{
if (!isset($this->_node_folder_template))
$this->setNodeFolderTemplate(self::DEFAULT_NODE_FOLDER_TEMPLATE);
return $this->_node_folder_template;
}
public function getNodeItemTemplate()
{
if (!isset($this->_node_item_template))
$this->setNodeItemTemplate(self::DEFAULT_NODE_ITEM_TEMPLATE);
return $this->_node_item_template;
}
public function setRootCategory($value)
{
if (!Validate::isInt($value))
throw new PrestaShopException('Root category must be an integer value');
$this->_root_category = $value;
return $this;
}
public function getRootCategory()
{
if (!isset($this->_root_category))
$this->setRootCategory(Category::getRootCategory($this->getLang())
->id);
return $this->_root_category;
}
public function setSelectedCategories($value)
{
if (!is_array($value))
throw new PrestaShopException('Selected categories value must be an array');
$this->_selected_categories = $value;
return $this;
}
public function getSelectedCatgories()
{
if (!isset($this->_selected_categories))
$this->_selected_categories = array();
return $this->_selected_categories;
}
public function setShop($value)
{
$this->_shop = $value;
return $this;
}
public function getShop()
{
if (!isset($this->_shop))
{
if (Tools::isSubmit('id_shop'))
$this->setShop(new Shop(Tools::getValue('id_shop')));
else
if ($this->getContext()->shop->id)
$this->setShop(new Shop($this->getContext()->shop->id));
else
if (!Shop::isFeatureActive())
$this->setShop(new Shop(Configuration::get('PS_SHOP_DEFAULT')));
else
$this->setShop(new Shop(0));
}
return $this->_shop;
}
public function getTemplate()
{
if (!isset($this->_template))
$this->setTemplate(self::DEFAULT_TEMPLATE);
return $this->_template;
}
public function setUseCheckBox($value)
{
$this->_use_checkbox = (bool)$value;
return $this;
}
public function setUseSearch($value)
{
$this->_use_search = (bool)$value;
return $this;
}
public function useCheckBox()
{
return (isset($this->_use_checkbox) && $this->_use_checkbox);
}
public function useSearch()
{
return (isset($this->_use_search) && $this->_use_search);
}
public function render($data = NULL)
{
if (!isset($data))
$data = $this->getData();
if (isset($this->_disabled_categories)
&& !empty($this->_disabled_categories))
$this->_disableCategories($data, $this->getDisabledCategories());
$this->setActions(array(
new TreeToolbarLink(
'Collapse All',
'#',
'$(\'#'.$this->getId().'\').tree(\'collapseAll\')',
'icon-collapse-alt'),
new TreeToolbarLink(
'Expand All',
'#',
'$(\'#'.$this->getId().'\').tree(\'expandAll\')',
'icon-expand-alt')
));
if ($this->useCheckBox())
{
$this->addAction(new TreeToolbarLink(
'Check All',
'#',
'checkAllAssociatedCategories($(\'#'.$this->getId().'\'));',
'icon-check-sign')
);
$this->addAction(new TreeToolbarLink(
'Uncheck All',
'#',
'uncheckAllAssociatedCategories($(\'#'.$this->getId().'\'));',
'icon-check-empty')
);
$this->setNodeFolderTemplate('tree_node_folder_checkbox.tpl');
$this->setNodeItemTemplate('tree_node_item_checkbox.tpl');
$this->setAttribute('use_checkbox', $this->useCheckBox());
}
if ($this->useSearch())
{
$this->addAction(new TreeToolbarSearch(
'Find a category:',
$this->getId().'-categories-search')
);
$this->setAttribute('use_search', $this->useSearch());
}
$this->setAttribute('selected_categories', $this->getSelectedCatgories());
return parent::render($data);
}
private function _disableCategories(&$categories, $disabled_categories = null)
{
foreach ($categories as &$category)
{
if (!isset($disabled_categories) || in_array($category['id_category'], $disabled_categories))
{
$category['disabled'] = true;
if (array_key_exists('children', $category) && is_array($category['children']))
self::_disableCategories($category['children']);
}
else if (array_key_exists('children', $category) && is_array($category['children']))
self::_disableCategories($category['children'], $disabled_categories);
}
}
}
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
interface HelperITreeToolbarCore interface ITreeToolbarCore
{ {
public function __toString(); public function __toString();
public function setActions($value); public function setActions($value);
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
interface HelperITreeToolbarButtonCore interface ITreeToolbarButtonCore
{ {
public function __toString(); public function __toString();
public function setAttribute($name, $value); public function setAttribute($name, $value);
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
class HelperTreeCore class TreeCore
{ {
const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree'; const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree';
const DEFAULT_TEMPLATE = 'tree.tpl'; const DEFAULT_TEMPLATE = 'tree.tpl';
@@ -32,15 +32,16 @@ class HelperTreeCore
const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder.tpl'; const DEFAULT_NODE_FOLDER_TEMPLATE = 'tree_node_folder.tpl';
const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item.tpl'; const DEFAULT_NODE_ITEM_TEMPLATE = 'tree_node_item.tpl';
private $_context; protected $_attributes;
private $_data; private $_context;
private $_headerTemplate; protected $_data;
private $_id; protected $_headerTemplate;
private $_node_folder_template; private $_id;
private $_node_item_template; protected $_node_folder_template;
private $_template; protected $_node_item_template;
private $_template_directory; protected $_template;
private $_title; private $_template_directory;
private $_title;
public function __construct($id, $data = null) public function __construct($id, $data = null)
{ {
@@ -58,7 +59,7 @@ class HelperTreeCore
public function setActions($value) public function setActions($value)
{ {
if (!isset($this->_toolbar)) if (!isset($this->_toolbar))
$this->setToolbar(new HelperTreeToolbarCore()); $this->setToolbar(new TreeToolbarCore());
$this->getToolbar()->setActions($value); $this->getToolbar()->setActions($value);
return $this; return $this;
@@ -67,7 +68,7 @@ class HelperTreeCore
public function getActions() public function getActions()
{ {
if (!isset($this->_toolbar)) if (!isset($this->_toolbar))
$this->setToolbar(new HelperTreeToolbarCore()); $this->setToolbar(new TreeToolbarCore());
return $this->getToolbar()->getActions(); return $this->getToolbar()->getActions();
} }
@@ -75,12 +76,43 @@ class HelperTreeCore
public function addAction($action) public function addAction($action)
{ {
if (!isset($this->_toolbar)) if (!isset($this->_toolbar))
$this->setToolbar(new HelperTreeToolbarCore()); $this->setToolbar(new TreeToolbarCore());
$this->getToolbar()->addAction($action); $this->getToolbar()->addAction($action);
return $this; return $this;
} }
public function setAttribute($name, $value)
{
if (!isset($this->_attributes))
$this->_attributes = array();
$this->_attributes[$name] = $value;
return $this;
}
public function getAttribute($name)
{
return $this->hasAttribute($name) ? $this->_attributes[$name] : null;
}
public function setAttributes($value)
{
if (!is_array($value) && !$value instanceof Traversable)
throw new PrestaShopException('Data value must be an traversable array');
$this->_attributes = $value;
return $this;
}
public function getAttributes()
{
if (!isset($this->_attributes))
$this->_attributes = array();
return $this->_attributes;
}
public function setContext($value) public function setContext($value)
{ {
$this->_context = $value; $this->_context = $value;
@@ -250,7 +282,7 @@ class HelperTreeCore
$reflection = new ReflectionClass($value); $reflection = new ReflectionClass($value);
if (!$reflection->implementsInterface('HelperITreeToolbarCore')) if (!$reflection->implementsInterface('ITreeToolbarCore'))
throw new PrestaShopException('Toolbar class must implements ITreeToolbarCore interface'); throw new PrestaShopException('Toolbar class must implements ITreeToolbarCore interface');
$this->_toolbar = $value; $this->_toolbar = $value;
@@ -315,7 +347,9 @@ class HelperTreeCore
} }
//Assign Tree nodes //Assign Tree nodes
$template->assign(array( $template
->assign($this->getAttributes())
->assign(array(
'id' => $this->getId(), 'id' => $this->getId(),
'nodes' => $this->renderNodes($data) 'nodes' => $this->renderNodes($data)
)); ));
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
class HelperTreeToolbarCore implements HelperITreeToolbarCore class TreeToolbarCore implements ITreeToolbarCore
{ {
const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree'; const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree';
const DEFAULT_TEMPLATE = 'tree_toolbar.tpl'; const DEFAULT_TEMPLATE = 'tree_toolbar.tpl';
@@ -159,7 +159,7 @@ class HelperTreeToolbarCore implements HelperITreeToolbarCore
$reflection = new ReflectionClass($action); $reflection = new ReflectionClass($action);
if (!$reflection->implementsInterface('HelperITreeToolbarButtonCore')) if (!$reflection->implementsInterface('ITreeToolbarButtonCore'))
throw new PrestaShopException('Action class must implements ITreeToolbarButtonCore interface'); throw new PrestaShopException('Action class must implements ITreeToolbarButtonCore interface');
if (!isset($this->_actions)) if (!isset($this->_actions))
@@ -173,7 +173,7 @@ class HelperTreeToolbarCore implements HelperITreeToolbarCore
{ {
foreach ($this->getActions() as $action) foreach ($this->getActions() as $action)
{ {
if ($action instanceof HelperTreeToolbarSearchCore) if ($action instanceof TreeToolbarSearchCore)
$action->setAttribute('data', $this->getData()); $action->setAttribute('data', $this->getData());
} }
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
abstract class HelperTreeToolbarButtonCore abstract class TreeToolbarButtonCore
{ {
const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree'; const DEFAULT_TEMPLATE_DIRECTORY = 'helpers/tree';
@@ -24,8 +24,8 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
class HelperTreeToolbarLinkCore extends HelperTreeToolbarButtonCore implements class TreeToolbarLinkCore extends TreeToolbarButtonCore implements
HelperITreeToolbarButtonCore ITreeToolbarButtonCore
{ {
private $_action; private $_action;
private $_icon_class; private $_icon_class;
@@ -24,8 +24,8 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
class HelperTreeToolbarSearchCore extends HelperTreeToolbarButtonCore implements class TreeToolbarSearchCore extends TreeToolbarButtonCore implements
HelperITreeToolbarButtonCore ITreeToolbarButtonCore
{ {
protected $_template = 'tree_toolbar_search.tpl'; protected $_template = 'tree_toolbar_search.tpl';
@@ -340,7 +340,7 @@ class AdminCategoriesControllerCore extends AdminController
$this->initToolbar(); $this->initToolbar();
$obj = $this->loadObject(true); $obj = $this->loadObject(true);
$id_shop = Context::getContext()->shop->id; $id_shop = Context::getContext()->shop->id;
$selected_cat = array((isset($obj->id_parent) && $obj->isParentCategoryAvailable($id_shop))? (int)$obj->id_parent : (int)Tools::getValue('id_parent', Category::getRootCategory()->id)); $selected_categories = array((isset($obj->id_parent) && $obj->isParentCategoryAvailable($id_shop))? (int)$obj->id_parent : (int)Tools::getValue('id_parent', Category::getRootCategory()->id));
$unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP'));
$guest = new Group(Configuration::get('PS_GUEST_GROUP')); $guest = new Group(Configuration::get('PS_GUEST_GROUP'));
$default = new Group(Configuration::get('PS_CUSTOMER_GROUP')); $default = new Group(Configuration::get('PS_CUSTOMER_GROUP'));
@@ -348,8 +348,7 @@ class AdminCategoriesControllerCore extends AdminController
$unidentified_group_information = sprintf($this->l('%s - All people without a valid customer account.'), '<b>'.$unidentified->name[$this->context->language->id].'</b>'); $unidentified_group_information = sprintf($this->l('%s - All people without a valid customer account.'), '<b>'.$unidentified->name[$this->context->language->id].'</b>');
$guest_group_information = sprintf($this->l('%s - Customer who placed an order with the guest checkout.'), '<b>'.$guest->name[$this->context->language->id].'</b>'); $guest_group_information = sprintf($this->l('%s - Customer who placed an order with the guest checkout.'), '<b>'.$guest->name[$this->context->language->id].'</b>');
$default_group_information = sprintf($this->l('%s - All people who have created an account on this site.'), '<b>'.$default->name[$this->context->language->id].'</b>'); $default_group_information = sprintf($this->l('%s - All people who have created an account on this site.'), '<b>'.$default->name[$this->context->language->id].'</b>');
$root_category = Category::getRootCategory();
$root_category = array('id_category' => $root_category->id, 'name' => $root_category->name);
$this->fields_form = array( $this->fields_form = array(
'tinymce' => true, 'tinymce' => true,
'legend' => array( 'legend' => array(
@@ -386,23 +385,13 @@ class AdminCategoriesControllerCore extends AdminController
) )
), ),
array( array(
'type' => 'categories', 'type' => 'categories',
'label' => $this->l('Parent category:'), 'label' => $this->l('Parent category:'),
'name' => 'id_parent', 'name' => 'id_parent',
'values' => array( 'tree' => array(
'trads' => array( 'id' => 'categories-tree',
'Root' => $root_category, 'selected_categories' => $selected_categories,
'selected' => $this->l('Selected'), 'disabled_categories' => !Tools::isSubmit('add'.$this->table) ? array($this->_category->id) : null
'Collapse All' => $this->l('Collapse All'),
'Expand All' => $this->l('Expand All')
),
'selected_cat' => $selected_cat,
'input_name' => 'id_parent',
'use_radio' => true,
'use_search' => false,
'disabled_categories' => array(4),
'top_category' => Category::getTopCategory(),
'use_context' => true,
) )
), ),
array( array(
+10 -183
View File
@@ -2309,7 +2309,9 @@ class AdminProductsControllerCore extends AdminController
$this->tpl_list_vars['is_category_filter'] = (bool)$this->id_current_category; $this->tpl_list_vars['is_category_filter'] = (bool)$this->id_current_category;
// Generate category selection tree // Generate category selection tree
$this->tpl_list_vars['category_tree'] = $this->renderCategoriesTree((int)$id_category); $tree = new HelperTreeCategories('categories-tree', 'Filter by category');
$tree->setSelectedCategories(array((int)$id_category));
$this->tpl_list_vars['category_tree'] = $tree->render();
// used to build the new url when changing category // used to build the new url when changing category
$this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token; $this->tpl_list_vars['base_url'] = preg_replace('#&id_category=[0-9]*#', '', self::$currentIndex).'&token='.$this->token;
@@ -2328,186 +2330,6 @@ class AdminProductsControllerCore extends AdminController
return parent::renderList(); return parent::renderList();
} }
public function renderCategoriesTree($selected_category = null)
{
if (Tools::isSubmit('id_shop'))
$id_shop = Tools::getValue('id_shop');
else
if (Context::getContext()->shop->id)
$id_shop = Context::getContext()->shop->id;
else
if (!Shop::isFeatureActive())
$id_shop = Configuration::get('PS_SHOP_DEFAULT');
else
$id_shop = 0;
$shop = new Shop($id_shop);
$root_category = Category::getRootCategory(null, $shop);
$tree = new HelperTree('categories-tree', Category::getNestedCategories(
$root_category->id, $this->context->employee->id_lang));
$html = $tree->setTitle('Filter by category')
->setActions(array(
new HelperTreeToolbarLink(
'Collapse All',
'#',
'$(\'#categories-tree\').tree(\'collapseAll\')',
'icon-collapse-alt'),
new HelperTreeToolbarLink(
'Expand All',
'#',
'$(\'#categories-tree\').tree(\'expandAll\')',
'icon-expand-alt')
))
->render();
$html .= '<script type="text/javascript">
$(document).ready(function () {
$("#categories-tree").tree("collapseAll");
$("#categories-tree").find(":input[type=radio]").click(
function()
{
location.href = location.href.replace(
/&id_category=[0-9]*/, "")+"&id_category="
+$(this).val();
}
);';
if (isset($selected_category))
$html .= '$("#categories-tree").find(":input").each(
function()
{
if ($(this).val() == '.$selected_category.')
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);';
$html .= '});
</script>';
return $html;
}
public function renderAssociationsCategoriesTree($root_category,
$selected_categories)
{
$tree = new HelperTree('associated-categories-tree',
Category::getNestedCategories($root_category, $this->context->employee->id_lang));
$html = $tree->setTitle('Associated categories')
->setActions(array(
new HelperTreeToolbarLink(
'Collapse All',
'#',
'$(\'#associated-categories-tree\').tree(\'collapseAll\')',
'icon-collapse-alt'),
new HelperTreeToolbarLink(
'Expand All',
'#',
'$(\'#associated-categories-tree\').tree(\'expandAll\')',
'icon-expand-alt'),
new HelperTreeToolbarLink(
'Check All',
'#',
'checkAllAssociatedCategories();',
'icon-check-sign'),
new HelperTreeToolbarLink(
'Uncheck All',
'#',
'uncheckAllAssociatedCategories();',
'icon-check-empty'),
new HelperTreeToolbarSearch(
'Find a category:',
'categories-search')
))
->setNodeFolderTemplate('tree_node_folder_associations.tpl')
->setNodeItemTemplate('tree_node_item_associations.tpl')
->render();
$html .= '<script type="text/javascript">
function checkAllAssociatedCategories()
{
$("#associated-categories-tree").find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories()
{
$("#associated-categories-tree").find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
$("#categories-search").bind("typeahead:selected", function(obj, datum) {
$("#associated-categories-tree").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
});
$(document).ready(
function()
{
$("#associated-categories-tree").tree("collapseAll");
var selected_categories = new Array("'.implode('","', $selected_categories).'");
$("#associated-categories-tree").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
}
);
</script>';
return $html;
}
public function ajaxProcessProductManufacturers() public function ajaxProcessProductManufacturers()
{ {
$manufacturers = Manufacturer::getManufacturers(); $manufacturers = Manufacturer::getManufacturers();
@@ -3114,12 +2936,17 @@ class AdminProductsControllerCore extends AdminController
foreach ($selected_cat as $key => $category) foreach ($selected_cat as $key => $category)
$categories[] = $key; $categories[] = $key;
$tree = new HelperTreeCategories('associated-categories-tree', 'Associated categories');
$tree->setRootCategory($root->id)
->setUseCheckBox(true)
->setUseSearch(true)
->setSelectedCategories($categories);
$data->assign(array('default_category' => $default_category, $data->assign(array('default_category' => $default_category,
'selected_cat_ids' => implode(',', array_keys($selected_cat)), 'selected_cat_ids' => implode(',', array_keys($selected_cat)),
'selected_cat' => $selected_cat, 'selected_cat' => $selected_cat,
'id_category_default' => $product->getDefaultCategory(), 'id_category_default' => $product->getDefaultCategory(),
'category_tree' => $this->renderAssociationsCategoriesTree( 'category_tree' => $tree->render(),
$root->id, $categories),
'product' => $product, 'product' => $product,
'link' => $this->context->link, 'link' => $this->context->link,
'is_shop_context' => Shop::getContext() == Shop::CONTEXT_SHOP 'is_shop_context' => Shop::getContext() == Shop::CONTEXT_SHOP
+57 -44
View File
@@ -79,12 +79,14 @@ class Dashactivity extends Module
$gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false; $gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false;
if (Validate::isLoadedObject($gapi) && $gapi->isConfigured()) if (Validate::isLoadedObject($gapi) && $gapi->isConfigured())
{ {
$visits = $unique_visitors = 0; $visits = $unique_visitors = $online_visitor = 0;
if ($result = $gapi->requestReportData('', 'ga:visits,ga:visitors', $params['date_from'], $params['date_to'], null, null, 1, 1)) if ($result = $gapi->requestReportData('', 'ga:visits,ga:visitors', $params['date_from'], $params['date_to'], null, null, 1, 1))
{ {
$visits = $result[0]['metrics']['visits']; $visits = $result[0]['metrics']['visits'];
$unique_visitors = $result[0]['metrics']['visitors']; $unique_visitors = $result[0]['metrics']['visitors'];
} }
if ($result = $gapi->requestReportData('', 'ga:activeVisitors', null, null, null, null, 1, 1))
$online_visitor = $result[0]['metrics']['activeVisitors'];
} }
else else
{ {
@@ -94,6 +96,24 @@ class Dashactivity extends Module
WHERE `date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'" WHERE `date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
'.Shop::addSqlRestriction(false)); '.Shop::addSqlRestriction(false));
extract($row); extract($row);
if ($maintenance_ips = Configuration::get('PS_MAINTENANCE_IP'))
$maintenance_ips = implode(',', array_map('ip2long', array_map('trim', explode(',', $maintenance_ips))));
if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
$sql = 'SELECT COUNT(DISTINCT c.id_connections)
FROM `'._DB_PREFIX_.'connections` c
LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
AND cp.`time_end` IS NULL
'.Shop::addSqlRestriction(false, 'c').'
'.($maintenance_ips ? 'AND c.ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
else
$sql = 'SELECT COUNT(*)
FROM `'._DB_PREFIX_.'connections`
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), `date_add`)) < 900
'.Shop::addSqlRestriction(false).'
'.($maintenance_ips ? 'AND ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
$online_visitor = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
} }
$order_nbr = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' $order_nbr = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
@@ -129,25 +149,7 @@ class Dashactivity extends Module
LEFT JOIN `'._DB_PREFIX_.'customer_message` cm ON ct.id_customer_thread = cm.id_customer_thread LEFT JOIN `'._DB_PREFIX_.'customer_message` cm ON ct.id_customer_thread = cm.id_customer_thread
WHERE cm.`date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'" WHERE cm.`date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
'.Shop::addSqlRestriction(false, 'ct')); '.Shop::addSqlRestriction(false, 'ct'));
if ($maintenance_ips = Configuration::get('PS_MAINTENANCE_IP'))
$maintenance_ips = implode(',', array_map('ip2long', array_map('trim', explode(',', $maintenance_ips))));
if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
$sql = 'SELECT COUNT(DISTINCT c.id_connections)
FROM `'._DB_PREFIX_.'connections` c
LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
AND cp.`time_end` IS NULL
'.Shop::addSqlRestriction(false, 'c').'
'.($maintenance_ips ? 'AND c.ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
else
$sql = 'SELECT COUNT(*)
FROM `'._DB_PREFIX_.'connections`
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), `date_add`)) < 900
'.Shop::addSqlRestriction(false).'
'.($maintenance_ips ? 'AND ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
$online_visitor = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
$active_shopping_cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' $active_shopping_cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT COUNT(*) SELECT COUNT(*)
FROM `'._DB_PREFIX_.'cart` FROM `'._DB_PREFIX_.'cart`
@@ -208,7 +210,7 @@ class Dashactivity extends Module
'orders_trends' => array('way' => 'down', 'value' => 0.42), 'orders_trends' => array('way' => 'down', 'value' => 0.42),
), ),
'data_list_small' => array( 'data_list_small' => array(
'dash_traffic_source' => $this->getReferer($params['date_from'], $params['date_to']), 'dash_traffic_source' => $this->getReferer($params['date_from'], $params[ 'date_to']),
), ),
'data_chart' => array( 'data_chart' => array(
'dash_trends_chart1' => $this->getChartTrafficSource($params['date_from'], $params['date_to']), 'dash_trends_chart1' => $this->getChartTrafficSource($params['date_from'], $params['date_to']),
@@ -228,31 +230,42 @@ class Dashactivity extends Module
public function getReferer($date_from, $date_to, $limit = 10) public function getReferer($date_from, $date_to, $limit = 10)
{ {
$directLink = $this->l('Direct link'); $gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false;
$sql = 'SELECT http_referer if (Validate::isLoadedObject($gapi) && $gapi->isConfigured())
FROM '._DB_PREFIX_.'connections
WHERE 1
'.Shop::addSqlRestriction().'
AND date_add BETWEEN '.$date_from.' AND '.$date_to.'
LIMIT 0, '.(int)$limit;
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql);
$websites = array($directLink => 0);
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
{ {
if (!isset($row['http_referer']) || empty($row['http_referer'])) $websites = array();
++$websites[$directLink]; if ($result = $gapi->requestReportData('ga:source', 'ga:visitors', $date_from, $date_to, '-ga:visitors', null, 1, 3))
else foreach ($result as $row)
{ $websites[$row['dimensions']['source']] = $row['metrics']['visitors'];
$website = preg_replace('/^www./', '', parse_url($row['http_referer'], PHP_URL_HOST)); }
if (!isset($websites[$website])) else
$websites[$website] = 1; {
else $directLink = $this->l('Direct link');
++$websites[$website]; $sql = 'SELECT http_referer
} FROM '._DB_PREFIX_.'connections
WHERE 1
'.Shop::addSqlRestriction().'
AND date_add BETWEEN '.$date_from.' AND '.$date_to.'
LIMIT 0, '.(int)$limit;
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql);
$websites = array($directLink => 0);
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
{
if (!isset($row['http_referer']) || empty($row['http_referer']))
++$websites[$directLink];
else
{
$website = preg_replace('/^www./', '', parse_url($row['http_referer'], PHP_URL_HOST));
if (!isset($websites[$website]))
$websites[$website] = 1;
else
++$websites[$website];
}
}
arsort($websites);
} }
arsort($websites);
return $websites; return $websites;
} }
+1 -1
View File
@@ -93,7 +93,7 @@ class Dashtrends extends Module
$gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false; $gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false;
if (Validate::isLoadedObject($gapi) && $gapi->isConfigured()) if (Validate::isLoadedObject($gapi) && $gapi->isConfigured())
{ {
if ($result = $gapi->requestReportData('ga:date', 'ga:visits', $params['date_from'], $params['date_to'], null, null, 1, 1)) if ($result = $gapi->requestReportData('ga:date', 'ga:visits', $params['date_from'], $params['date_to'], null, null, 1, 9999))
foreach ($result as $row) foreach ($result as $row)
$tmp_data['visits_score'][strtotime(preg_replace('/^([0-9]{4})([0-9]{2})([0-9]{2})$/', '$1-$2-$3', $row['dimensions']['date']))] = $row['metrics']['visits']; $tmp_data['visits_score'][strtotime(preg_replace('/^([0-9]{4})([0-9]{2})([0-9]{2})$/', '$1-$2-$3', $row['dimensions']['date']))] = $row['metrics']['visits'];
} }
+22 -21
View File
@@ -29,8 +29,8 @@ if (!defined('_PS_VERSION_'))
class Gapi extends Module class Gapi extends Module
{ {
public function __construct($type = null) public function __construct()
{ {
$this->name = 'gapi'; $this->name = 'gapi';
$this->tab = 'administration'; $this->tab = 'administration';
$this->version = 0.9; $this->version = 0.9;
@@ -40,8 +40,8 @@ class Gapi extends Module
parent::__construct(); parent::__construct();
$this->displayName = $this->l('Google Analytics API'); $this->displayName = $this->l('Google Analytics API');
} }
public function isConfigured() public function isConfigured()
{ {
return ($this->active && $this->api_3_0_isConfigured()); return ($this->active && $this->api_3_0_isConfigured());
@@ -64,7 +64,7 @@ class Gapi extends Module
'.(($curl && $allow_url_fopen) ? '' : '<li>'.$this->l('You are not allowed to open external URLs').'</li>').' '.(($curl && $allow_url_fopen) ? '' : '<li>'.$this->l('You are not allowed to open external URLs').'</li>').'
'.(($curl && $allow_url_fopen) ? '' : '<li>'.$this->l('cURL is not enabled').'</li>').' '.(($curl && $allow_url_fopen) ? '' : '<li>'.$this->l('cURL is not enabled').'</li>').'
'.($openssl ? '' : '<li>'.$this->l('OpenSSL is not enabled').'</li>').' '.($openssl ? '' : '<li>'.$this->l('OpenSSL is not enabled').'</li>').'
'.(($allow_url_fopen AND $openssl AND !$ping) ? '<li>'.$this->l('Google is unreachable').' ('.$this->l('check your firewall').')</li>' : '').' '.(($allow_url_fopen && $openssl && !$ping) ? '<li>'.$this->l('Google is unreachable').' ('.$this->l('check your firewall').')</li>' : '').'
'.($online ? '' : '<li>'.$this->l('Your store is not online').'</li>').' '.($online ? '' : '<li>'.$this->l('Your store is not online').'</li>').'
</ul>'); </ul>');
} }
@@ -73,7 +73,7 @@ class Gapi extends Module
return $html.$this->api_3_0_getContent(); return $html.$this->api_3_0_getContent();
} }
public function requestReportData($dimensions, $metrics, $date_from, $date_to, $sort = null, $filters = null, $start = 1, $limit = 30) public function requestReportData($dimensions, $metrics, $date_from = null, $date_to = null, $sort = null, $filters = null, $start = 1, $limit = 30)
{ {
// You can switch to the 1.3 API by replacing the following function call by $this->api_1_3_requestReportData() // You can switch to the 1.3 API by replacing the following function call by $this->api_1_3_requestReportData()
return $this->api_3_0_requestReportData($dimensions, $metrics, $date_from, $date_to, $sort, $filters, $start, $limit); return $this->api_3_0_requestReportData($dimensions, $metrics, $date_from, $date_to, $sort, $filters, $start, $limit);
@@ -93,7 +93,7 @@ class Gapi extends Module
); );
Tools::redirectLink('https://accounts.google.com/o/oauth2/auth?'.http_build_query($params)); Tools::redirectLink('https://accounts.google.com/o/oauth2/auth?'.http_build_query($params));
} }
public function api_3_0_refreshtoken() public function api_3_0_refreshtoken()
{ {
$params = array( $params = array(
@@ -179,7 +179,7 @@ class Gapi extends Module
$html .= $this->displayConfirmation(sprintf($this->l('Yesterday, your store received the visit of %d people for a total of %d unique page views.'), $result_test[0]['metrics']['visits'], $result_test[0]['metrics']['uniquePageviews'])); $html .= $this->displayConfirmation(sprintf($this->l('Yesterday, your store received the visit of %d people for a total of %d unique page views.'), $result_test[0]['metrics']['visits'], $result_test[0]['metrics']['uniquePageviews']));
} }
} }
if ($display_slider) if ($display_slider)
{ {
$slides = array( $slides = array(
@@ -195,7 +195,7 @@ class Gapi extends Module
'Google API - 10 - Profile ID.png' => $this->l('Now you need the ID of the Analytics Profile you want to connect. In order to find you Profile ID, connect to the Analytics dashboard look at the URL in the address bar. Your Profile ID is the number following a "p", as shown underlined in red on the screenshot') 'Google API - 10 - Profile ID.png' => $this->l('Now you need the ID of the Analytics Profile you want to connect. In order to find you Profile ID, connect to the Analytics dashboard look at the URL in the address bar. Your Profile ID is the number following a "p", as shown underlined in red on the screenshot')
); );
$first_slide = key($slides); $first_slide = key($slides);
$html .= ' $html .= '
<a id="screenshots_button" href="#screenshots"><button class="btn btn-default"><i class="icon-question-sign"></i> How to configure Google Analytics API</button></a> <a id="screenshots_button" href="#screenshots"><button class="btn btn-default"><i class="icon-question-sign"></i> How to configure Google Analytics API</button></a>
<div style="display:none"> <div style="display:none">
@@ -264,7 +264,7 @@ class Gapi extends Module
return $html.$helper->generateOptions($fields_options); return $html.$helper->generateOptions($fields_options);
} }
public function api_3_0_oauth2callback() public function api_3_0_oauth2callback()
{ {
if (!Tools::getValue('state')) if (!Tools::getValue('state'))
@@ -326,9 +326,10 @@ class Gapi extends Module
'timeout' => 5, 'timeout' => 5,
) )
)); ));
if (!$response_json = Tools::file_get_contents('https://www.googleapis.com/analytics/v3/data/ga?'.$content, false, $stream_context)) $api = ($date_from && $date_to) ? 'ga' : 'realtime';
if (!$response_json = Tools::file_get_contents('https://www.googleapis.com/analytics/v3/data/'.$api.'?'.$content, false, $stream_context))
return false; return false;
// https://developers.google.com/analytics/devguides/reporting/core/v3/reference // https://developers.google.com/analytics/devguides/reporting/core/v3/reference
$response = Tools::jsonDecode($response_json, true); $response = Tools::jsonDecode($response_json, true);
@@ -337,7 +338,7 @@ class Gapi extends Module
{ {
$metrics = array(); $metrics = array();
$dimensions = array(); $dimensions = array();
foreach($row as $key => $value) foreach ($row as $key => $value)
if ($response['columnHeaders'][$key]['columnType'] == 'DIMENSION') if ($response['columnHeaders'][$key]['columnType'] == 'DIMENSION')
$dimensions[str_replace('ga:', '', $response['columnHeaders'][$key]['name'])] = $value; $dimensions[str_replace('ga:', '', $response['columnHeaders'][$key]['name'])] = $value;
elseif ($response['columnHeaders'][$key]['columnType'] == 'METRIC') elseif ($response['columnHeaders'][$key]['columnType'] == 'METRIC')
@@ -351,7 +352,7 @@ class Gapi extends Module
{ {
return (Configuration::get('PS_GAPI13_EMAIL') && Configuration::get('PS_GAPI13_PASSWORD') && Configuration::get('PS_GAPI13_PROFILE')); return (Configuration::get('PS_GAPI13_EMAIL') && Configuration::get('PS_GAPI13_PASSWORD') && Configuration::get('PS_GAPI13_PROFILE'));
} }
public function api_1_3_getContent() public function api_1_3_getContent()
{ {
$html = ''; $html = '';
@@ -448,17 +449,17 @@ class Gapi extends Module
if ($filters !== null) if ($filters !== null)
$params['filters'] = $filters; $params['filters'] = $filters;
$content = str_replace('&amp;', '&', urldecode(http_build_query($params))); $content = str_replace('&amp;', '&', urldecode(http_build_query($params)));
$stream_context = stream_context_create(array( $stream_context = stream_context_create(array(
'http' => array( 'http' => array(
'method'=> 'GET', 'method'=> 'GET',
'header' => "Authorization: GoogleLogin auth=".$this->auth_token."\r\n", 'header' => 'Authorization: GoogleLogin auth='.$this->auth_token."\r\n",
'timeout' => 5, 'timeout' => 5,
) )
)); ));
if (!$response = Tools::file_get_contents('https://www.google.com/analytics/feeds/data?'.$content, false, $stream_context)) if (!$response = Tools::file_get_contents('https://www.google.com/analytics/feeds/data?'.$content, false, $stream_context))
return false; return false;
$xml = simplexml_load_string($response); $xml = simplexml_load_string($response);
/* Meta data not useful at this time */ /* Meta data not useful at this time */
@@ -485,21 +486,21 @@ class Gapi extends Module
$metrics = array(); $metrics = array();
foreach ($entry->children('http://schemas.google.com/analytics/2009')->metric as $metric) foreach ($entry->children('http://schemas.google.com/analytics/2009')->metric as $metric)
{ {
$key = str_replace('ga:','',$metric->attributes()->name); $key = str_replace('ga:', '', $metric->attributes()->name);
$metric_value = strval($metric->attributes()->value); $metric_value = strval($metric->attributes()->value);
if (preg_match('/^(\d+\.\d+)|(\d+E\d+)|(\d+.\d+E\d+)$/',$metric_value)) if (preg_match('/^(\d+\.\d+)|(\d+E\d+)|(\d+.\d+E\d+)$/', $metric_value))
$metrics[$key] = floatval($metric_value); $metrics[$key] = floatval($metric_value);
else else
$metrics[$key] = intval($metric_value); $metrics[$key] = intval($metric_value);
} }
$dimensions = array(); $dimensions = array();
foreach($entry->children('http://schemas.google.com/analytics/2009')->dimension as $dimension) foreach ($entry->children('http://schemas.google.com/analytics/2009')->dimension as $dimension)
$dimensions[str_replace('ga:', '', $dimension->attributes()->name)] = strval($dimension->attributes()->value); $dimensions[str_replace('ga:', '', $dimension->attributes()->name)] = strval($dimension->attributes()->value);
$result[] = array('metrics' => $metrics, 'dimensions' => $dimensions); $result[] = array('metrics' => $metrics, 'dimensions' => $dimensions);
} }
return $result; return $result;
} }
} }
+24
View File
@@ -1,4 +1,28 @@
<?php <?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/gapi.php'); include(dirname(__FILE__).'/gapi.php');