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

This commit is contained in:
Gregory Roussac
2013-01-21 15:31:44 +01:00
56 changed files with 1185 additions and 1289 deletions
+23 -16
View File
@@ -43,22 +43,29 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
#top_container{margin:0;padding:0}
/*HEADER*/
#header { background-color: #394049; height:114px; }
#header #header_infos{ position:relative; margin: 0; padding:0; height:84px; }
#header #header_shopname {float: left; margin:15px 20px 0 20px;}
#header #employee_links {float: right; display:block; margin:15px 15px 0 15px; }
#header #employee_links a{ float:left; color:#BABABA; text-transform:capitalize;}
#header #employee_links a:hover {color:#fff;}
#header #employee_links .employee_name { float:left; color:#fff;}
#header .separator { background: transparent url('../img/separator.png') no-repeat scroll center top; display: block;float: left;height: 19px; width: 16px;}
#header { background-color: #394049; height:90px; }
#header #header_infos{ position:relative; margin: 0; padding:0; height:60px; }
#header #header_shopname {float: left; margin:10px 15px 0 10px;}
#header #employee_box {float: right; display:block;}
#header #employee_infos {display:block; margin:10px 15px 0 10px;}
#header #employee_infos a{color:#BABABA; text-transform:capitalize;margin-right: 5px}
#header #employee_infos a:hover {color:#fff;}
#header #employee_infos .employee_name { float:left; color:#fff;padding: 0 20px 0 0;}
#header .separator { background: transparent url('../img/separator.png') no-repeat scroll center top;height: 19px; width: 16px; margin-right: 5px}
#header ul#employee_links {list-style: none;display: block;text-align: left;}
#header ul#employee_links li {display: inline;line-height: 20px;}
#header #header_infos #header_shopname span{display:block; font-size:24px; height:28px; overflow:hidden;margin:0; color:#fff; text-shadow: 0 1px 0 #000000;}
#header #header_infos a#header_logout { background: transparent url('../img/logout.png') no-repeat scroll left top; float:left; padding-left:20px; color:#bababa;}
#header #header_infos a#header_logout { background: transparent url('../img/logout.png') no-repeat scroll left top; padding-left:15px; color:#bababa;}
#header #header_infos a#header_logout:hover {color:#fff;}
#header #header_infos #header_logout a span {color:#bababa}
#header #header_infos #header_foaccess{ text-decoration:none; color:#bababa;}
#header #header_infos #header_foaccess a {color:#bababa !important;}
#header #header_infos a#header_foaccess:hover { color:#fff;}
#header #header_search{ background-color:#fff; border:2px solid #000; float:left; margin-top:15px; margin-left:7%; position:relative; height:25px; box-shadow: 0 1px 0 #666666; }
#header #header_search{ background-color:#fff; border:2px solid #000; float:left; margin-top:15px; position:relative; height:25px; box-shadow: 0 1px 0 #666666; }
#header #header_search #bo_query{ font: 13px Arial,sans-serif; float:left;background: none repeat scroll 0 0 transparent; border:none; box-shadow:none; padding: 5px 0px 5px 4px; width: 160px; }
#header #header_search #bo_search_type_chzn{ font-size:13px; float:left; margin:0 23px 0 0; padding:0 4px; vertical-align:middle;width:100px;height:27px; border:none;}
#header #header_search #bo_search_type_chzn.chzn-container-single .chzn-single { box-shadow:none; border-radius:0px; border:none; border-left:1px dotted #ccc;}
@@ -92,9 +99,8 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
/*MENU*/
#header #menu{ background-color: #f8f8f8; border-bottom:1px solid #e5e5e5; float:left;line-height:normal;margin:0;padding:0;width:100%;}
#header #menu li.maintab{float:left;height:29px;list-style:none;margin:0 1px 0 0;list-style:none;display:block; border-left:1px solid #fff; border-right:1px solid #ccc;}
#header #menu li:first-child { margin-left:15px;}
#header #menu li.submenu_size .title{cursor:default;color:#000;display:block; padding:8px 6px 4px 0;font-weight:normal;font-size:12px;}
#header #menu li.maintab{float:left;height:29px;list-style:none;list-style:none;display:block; border-left:1px solid #fff; border-right:1px solid #ccc;}
#header #menu li.submenu_size .title{cursor:default;color:#000;display:block; padding:8px 3px 4px 0;font-weight:normal;font-size:12px;}
#header #menu li.submenu_size .title{_display:inline;_padding:6px 5px 4px 0}
#header #menu li{_height:32px;_padding-top:3px}
#header #menu img{display:inline;padding:0 3px 0 6px; margin-top:-4px; vertical-align:middle;width:16px;height:16px}
@@ -188,7 +194,7 @@ a.module_toggle_all{color: #268CCD;}
.multishop_toolbar .chzn-container .chzn-results .shop{padding-left: 30px;background-color: #EAF2FC;}
/*toolbarBox*/
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 5px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
.toolbarBox .pageTitle h3 {font-size: 2em; font-weight: normal; line-height: 52px; margin: 0; padding: 0; text-shadow:0 1px 0 #fff;}
.toolbarBox ul.cc_button {float:right;margin:0 5px 0 0;padding:0;}
@@ -279,7 +285,7 @@ form#product_form h4 { font-size:18px; font-weight:normal;}
#product-tab-content-3-Associations .Association td.col-left { width:200px;}
/*FILTER MODULE*/
.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; margin-top:10px; padding:10px; display:block; min-height:25px;}
.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; padding:10px; display:block; min-height:35px;}
.filter-module #filternameForm {float:left; margin-right:30px;}
.filter-module label {width:auto;}
.filter-module .select-filter { float:left;}
@@ -415,7 +421,7 @@ form#product_form h4 { font-size:18px; font-weight:normal;}
/*MODULECONTAINER*/
#moduleContainer { margin-left:220px; padding:13px 0 0 20px;}
#moduleContainer .table tr th { height:40px;}
#moduleContainer .table tr td { vertical-align:top; padding: 5px 7px 0; border-top:1px dotted #ccc; border-bottom:none;}
#moduleContainer .table tr td { font-size:12px; vertical-align:top; padding: 5px 7px 0; border-top:1px solid #ccc; border-bottom:none;}
#moduleContainer .table tr:first-child {border-top:1px solid #ccc}
#moduleContainer .table tr td .imgm {width:32px;}
#moduleContainer .moduleDesc { font-size:12px; position:relative; margin-bottom:10px;}
@@ -428,6 +434,7 @@ form#product_form h4 { font-size:18px; font-weight:normal;}
#moduleContainer .moduleDesc p.desc { color:#666; font-family: Georgia; font-style: italic; font-size:12px; display:block; clear:both;}
#moduleContainer .setup {background-color:#6db300; font-weight:bold; font-size:10px; color:#fff; text-transform:uppercase; position:relative; left:10px; padding:0px 4px; display: inline-block; border-radius:3px;}
#moduleContainer .setup.non-install { background-color:#ec7000;}
#moduleContainer .setup.must-have { background-color: #ec7000;}
#moduleContainer .setup.off{ background-color:#ccc;}
#moduleContainer .row-actions-module span { padding-right:5px;}
#moduleContainer .row-actions-module span a { font-size:12px;}
+1 -166
View File
@@ -1,65 +1,3 @@
body {font-family: Arial, Helvetica, sans-serif;}
h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; margin-bottom:.5em; line-height:1.4em; }
h2 { font-size:1.7em; }
h3 { font-size:1.25em; }
h4 { font-size:1.05em; }
h6 { font-size:1em; }
/*LIST*/
ul,ol {list-style:none; margin: 0; padding: 0;}
/*FORM*/
label {color:#585a69;text-shadow:0 1px 0#fff;}
fieldset{background-color:#EBEDF4; border:1px solid #CCCED7;font-size:1.1em;margin:0;padding:1em}
legend{background:#EBEDF4;border:1px solid #CCCED7;font-weight:700;margin:0;padding:.2em .5em;text-align:left}
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #ccc;}
select { border:1px solid #ccc;}
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
.header_module{background:url('../img/header_module.png');padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;}
/*BUTTON*/
.button{background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#E3E3E3)) repeat scroll 0 0 transparent;
border-color: #CCCCCC #BBBBBB #A0A0A0;border-left: 1px solid #BBBBBB;border-radius: 3px 3px 3px 3px;border-right: 1px solid #BBBBBB;border-style: solid;border-width: 1px;color: #000000;margin: 0; outline: medium none;padding: 3px 8px;text-align: center;vertical-align: middle;white-space: nowrap;}
.button[disabled=disabled]{color:#8C8C8C}
input.button[disabled=disabled]:hover{background-color:#FFF6D3}
.button:hover{border:1px solid #939393;}
.button:active{border:1px solid #939393;}
#top_container{margin:0;padding:0}
/*HEADER*/
#header { background-color: #394049; height:114px; }
#header #header_infos{ position:relative; margin: 0; padding:0; height:84px; }
#header #header_shopname {float: left; margin:15px 20px 0 20px;}
#header #employee_links {float: right; display:block; margin:15px 15px 0 15px; }
#header #employee_links a{ float:left; color:#fff; text-transform:capitalize;}
#header #employee_links .employee_name { float:left; color:#fff;}
#header .separator { background: transparent url('../img/separator.png') no-repeat scroll center top; display: block;float: left;height: 19px; width: 16px;}
#header #header_infos #header_shopname span{display:block; font-size:24px; height:28px; overflow:hidden;margin:0; color:#fff; text-shadow: 0 1px 0 #000000;}
#header #header_infos #header_logout { background: transparent url('../img/logout.png') no-repeat scroll left top; float:left; padding-left:20px; color:#fff !important; }
#header #header_infos #header_logout a { color:#fff !important;}
#header #header_infos #header_logout a span {color:#fff;}
#header #header_infos #header_foaccess{ text-decoration:none; color:#fff;}
#header #header_infos #header_foaccess a {color:#fff !important;}
#header #header_search{ float:left; margin-top:15px; }
#header #header_search #bo_query{float:left;background: none repeat scroll 0 0 #fff; border-color: #666666 #CCCCCC #CCCCCC;
border-style:solid dotted solid solid;
border-width: 1px; color: #333; font: 13px Arial,sans-serif; padding: 4px 1px 4px 4px; width: 180px;
box-shadow: 0 1px 0 #444444;}
#header #header_search #bo_search_type{float:left; margin:0; padding:3px 0 4px; vertical-align:middle;width:auto; border-color: #666666 #CCCCCC #CCCCCC;
border-style:solid solid solid none; height:25px;
border-width: 1px;}
#header #header_search #bo_search_submit { border-color: #CCCCCC #BBBBBB; float:left; font-weight:normal; margin:0; padding: 4px 8px 3px; cursor:pointer; text-shadow: 0 1px 0 #fff; border-bottom-left-radius: 0; border-left: 0 none; border-top-left-radius: 0; }
#header #header_quick{float:right; display:block; margin-top:15px;}
#header #header_quick #quick_select{margin:0; padding:3px 0 4px; vertical-align:middle;width:140px; height:25px;}
#header #header_shoplist{ background-image:none; clear:both; float: right; color:#fff; margin-top:10px; margin-right:15px;}
#header #header_shoplist span { float:left; padding:3px;}
#header #header_myaccount{background:url('../img/bg-lang.png') no-repeat;display:block;float:right;height:16px;margin:8px 1px 0 0;width:16px}
.path_bar {display:none;}
#notifs_icon_wrapper {float: left;position: relative;margin:15px 10px 0; width:90px;}
@@ -71,79 +9,6 @@ input.button[disabled=disabled]:hover{background-color:#FFF6D3}
#customers_notif.open_notifs,
#messages_notif.open_notifs { background-color: #FFFFFF;border: 1px solid #000000; position: relative; display: block; background-position:center bottom; }
.number_wrapper {color: white;display: none;font-size: 13px;font-weight: bold;position: absolute; right: -8px;top: -10px;z-index: 101;padding: 2px 5px;}
.number_wrapper span {background-color: #F03D25;display: block;padding: 0 2px;border-color: -moz-use-text-color #DD3822 #DD3822;border-radius: 2px 2px 2px 2px;border-right: 1px solid #DD3822;border-style: none solid solid;border-width: 0 0px;}
.notifs_wrapper {background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #000; border-top:none;display: none; cursor:auto; position: absolute; top: 25px; left: -1px; width:300px; padding: 10px;color: black; z-index:9999;}
.notifs_wrapper h3 {font-size: 14px;padding-bottom:8px;margin:0;border-bottom: 1px solid #E5E5E5;}
.notifs_wrapper ul {padding:6px 0;margin:0;}
.notifs_wrapper ul li {text-decoration: none;list-style: none;font-size:12px;padding:5px 0;}
#header_infos .notifs_wrapper a {font-weight: bold; font-size:11px; color: black; float:right;}
.notifs_wrapper p {font-size: 12px;padding-top:8px;margin:0;border-top: 1px solid #E5E5E5;}
.notifs_wrapper p.no_notifs {border: none;}
/*MENU*/
#header #menu{ background-color: #f8f8f8; border-bottom:1px solid #e5e5e5; float:left;line-height:normal;margin:0;padding:0;width:100%;}
#header #menu li.maintab{float:left;height:29px;list-style:none;margin:0 1px 0 0;list-style:none;display:block; border-left:1px solid #fff; border-right:1px solid #ccc;}
#header #menu li#maintab1 { margin-left:20px;}
#header #menu li.submenu_size .title{color:#000;display:block; padding:8px 6px 4px 0;font-weight:normal;font-size:12px;}
#header #menu li.submenu_size .title{_display:inline;_padding:6px 5px 4px 0}
#header #menu li{_height:32px;_padding-top:3px}
#header #menu img{display:inline;padding:0 3px 0 6px; margin-top:-4px; vertical-align:middle;width:16px;height:16px}
#header #menu li.active, #header #menu li:hover{background-position:0 -38px;white-space:nowrap;}
#header #menu li.active a{}
#header #menu li:hover, #header #menu li.active {background-color:#49B2FF; }
#header #menu li.active span.title, #header #menu li:hover span.title {color:#fff; text-shadow: -1px -1px 0 #3293D6;}
#header #menu .withLeftBorder{background:transparent url('../img/separator_subnav.png') no-repeat 0 5px}
#header #menu .submenu{background:#f8f8f8;clear:both;margin:0;padding:0;border:1px solid #d9d9d9;z-index:9999; box-shadow: 1px 5px 10px #CCCCCC; -moz-box-shadow:1px 5px 10px #CCCCCC; -webkit-box-shadow:1px 5px 10px #CCCCCC;}
#header #menu .submenu li{list-style:none;margin:0;padding:0;display:block;}
#header #menu .submenu li a{ font-size:12px;display:block;padding: 5px 15px 5px 10px; color:#666666;border-top:1px solid #fff; border-bottom:1px solid #ccc;}
#header #menu .submenu li a:hover { background-color:#eee; text-shadow:0 1px 0 #fff;}
/*SEPARATION*/
.separation { background-color:#ccc;border-bottom:1px solid #fff; width:100%; height:1px; margin:10px 0;}
/*TABLE*/
.table_grid {width:100%;}
.table{ background-color:#fff;border:1px solid #ccc;padding:0: border-radius:3px; -moz-border-radius:3px;-webkit-border-radius:3px;}
.filter {background-color:#f1f9ff;}
.table th a{text-decoration:underline}
.table a:hover{text-decoration:none}
.table tr th{ background-color: #F1F1F1; text-shadow:0 1px 0 #fff; padding:4px 6px;
background-image: -moz-linear-gradient(center top , #F9F9F9, #ECECEC);
background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#ECECEC)) repeat scroll 0 0 transparent;}
.table tr td{border-bottom:1px solid #ccc;color:#333;font-size:11px;padding: 2px 4px 2px 6px}
.table tr.action_details td{background:#FAFAFA;}
.table tr.alt_row.action_details td{background:#E8E8E8;}
.table tr td.empty{border-bottom:none;background:white!important}
.table tr td.first{border-left:1px solid #DEDEDE}
.table tr td.last{border-right:1px solid #DEDEDE}
.table tr.small td{height:15px}
.table tr.last td{border-bottom:none}
td.col-left {vertical-align:top; padding-right:10px;}
td.col-left label { display:block; width:100%; text-align:right;}
.alt_row{background-color:#f8f8f8}
.path_bar{background-color:#E2EBEE;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:13px;margin-bottom:20px;padding:5px}
.path_bar a{font-weight:700}
.cat_bar{background-color:#F4E8CD;border:1px solid #999999;font-family:Trebuchet,Arial,Helvetica,sans-serif;font-size:12px;font-weight:700;margin-bottom:20px;padding:5px}
.cat_bar a{font-weight:700}
a.action_module{color: #268CCD;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
a.module_toggle_all{color: #268CCD;}
.nbr_module{float:right;margin-right:10px;font-style:italic;font-size:12px;color: #268CCD;}
.autoupgradeSteps div { line-height: 30px; }
.upgradestep { margin-right: 5px;padding-left: 10px; padding-right: 5px;}
#upgradeNow.stepok, .autoupgradeSteps a.stepok { background-image: url('../img/admin/enabled.gif');background-position: left center;background-repeat: no-repeat;padding-left: 15px;}
#upgradeNow {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.button-autoupgrade {-moz-border-bottom-colors: none;-moz-border-image: none;-moz-border-left-colors: none;-moz-border-right-colors: none;-moz-border-top-colors: none;border-color: #FFF6D3 #DFD5AF #DFD5AF #FFF6D3;border-right: 1px solid #DFD5AF;border-style: solid;border-width: 1px;color: #268CCD;font-size: medium;padding: 5px;}
.processing {overflow: auto;}
/*TABLE STATUS COMMANDE*/
.table td span.color_field { font-size:11px; padding:2px 5px; border-radius:3px; text-transform:uppercase; text-shadow:0 1px 0 #fff; color:#fff; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
/*toolbarBox*/
.toolbarBox { background-color: #F8F8F8; border: 1px solid #CCCCCC; margin-bottom:10px; padding: 10px 0; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px;}
.toolbarBox .pageTitle { margin-left:10px; line-height:48px}
@@ -171,32 +36,6 @@ a.module_toggle_all{color: #268CCD;}
div.fix-toolbar {border-bottom: 1px solid #E0E0E0;position:fixed;top:0;opacity:0.9;z-index:1}
/*button upload files*/
.qq-upload-button {background: -moz-linear-gradient(center top , #F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
background: -webkit-gradient(linear, center top ,center bottom, from(#F9F9F9), to(#E3E3E3)) repeat scroll 0 0 transparent;
border-color: #CCCCCC #BBBBBB #A0A0A0;border-left: 1px solid #BBBBBB;border-radius: 3px 3px 3px 3px;border-right: 1px solid #BBBBBB;border-style: solid;border-width: 1px;color: #000000;}
.qq-upload-button:hover { border:1px solid #939393;}
/*leadin*/
.leadin { padding:10px;}
/*productBox*/
#productBox { position:relative; width:100%; float:left;}
/*tab-pane*/
form#product, form#access_form{ background-color:#ebedf4; border:1px solid #ccced7; min-height:300px; padding: 5px 10px 10px; margin-left:140px;}
/*form.defaultForm{ background-color:#ebedf4; border:1px solid #ccced7; min-height:300px; padding: 5px 10px 10px;}*/
.tab-row {}
.tab-row .tab {background:#EFEFEF;width:100px;}
.tab-row .tab-page.selected {}
.tab-row .tab-page {}
.productTabs{ background-color:#fafafa; border:1px solid #ccced7; border-right:none; float:left; width:140px;}
.productTabs ul{padding:0;margin:0;}
.productTabs ul li.tab-row { border:none; }
.productTabs ul li.tab-row:first-child a {border-top:none;}
.productTabs ul li.tab-row a { display:block; font-weight:normal; color:#666;padding: 7px 10px; border-top:1px solid #CCCED7; border-right:1px solid #CCCED7;}
.productTabs ul li.tab-row a.selected { background-color:#EBEDF4;font-weight:bold;color:#000; border-right:none;}
.product-tab-content h4.tab { display:none;}
/*FILTER MODULE*/
.filter-module { background-color:#ebedf4; border:1px solid #c2c4d9; padding:10px; display:block; min-height:35px;}
@@ -242,8 +81,4 @@ form#product, form#access_form{ background-color:#ebedf4; border:1px solid #cc
#list-action-button{width:175px}
#list-action-button li{margin-left:10px;display: inline;float: left;}
#moduleContainer .moduleName {font-size:12px; color:#3A6EA7;font-weight:bold;}
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
/*FOOTER*/
#footer {height:40px;padding-top:5px;font-size:12px;clear:both;font-size:0.9em;color:#666666}
#footer .footer_link, #footer .footer_link:hover {color:#D41958;}
#moduleContainer .moduleFavDesc { font-family:Georgia; font-style:italic; color:#666;}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

@@ -81,6 +81,7 @@
<img src="../img/admin/edit.gif" />
</a>
</div>
{l s='Language:'} {if isset($customerLanguage)}{$customerLanguage->name}{else}{l s='undefined'}{/if}<br />
{l s='Newsletter:'} {if $customer->newsletter}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
{l s='Opt in:'} {if $customer->optin}<img src="../img/admin/enabled.gif" />{else}<img src="../img/admin/disabled.gif" />{/if}<br />
{l s='Age:'} {$customer_stats['age']} {if isset($customer->birthday['age'])}({$customer_birthday}){else}{l s='unknown'}{/if}<br /><br />
@@ -87,7 +87,7 @@
<img src="../img/admin/import.gif" />{l s='Add / Update a language'}
</legend>
<div id="submitAddLangContent" style="float:left;">
<p>{l s='You can add or update a language directly from the PrestaShop webiste here:'}</p>
<p>{l s='You can add or update a language directly from the PrestaShop website here:'}</p>
<div class="warn">
{l s='If you choose to update an existing language pack, all of your previous customization\'s in the theme named "Default" will be lost. This includes Front Office expressions and default email templates.'}
</div>
+15 -10
View File
@@ -144,17 +144,22 @@
</div>
{/if}
</div>
<div id="employee_links">
<span class="employee_name">{$first_name}&nbsp;{$last_name}</span>
<span class="separator">&nbsp;</span>
<a class="employee" href="index.php?controller=AdminEmployees&amp;id_employee={$employee->id}&amp;updateemployee&amp;token={getAdminToken tab='AdminEmployees'}" alt="">{l s='My preferences'}</a>
<span class="separator">&nbsp;</span>
<a href="index.php?logout" id="header_logout">{l s='logout'}</a>
{if {$base_url}}
<span class="separator">&nbsp;</span>
<a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
{/if}
<div id="employee_box">
<div id="employee_infos">
<div class="employee_name">{l s='Welcome,'} <strong>{$first_name}&nbsp;{$last_name}</strong></div>
<div class="clear"></div>
<ul id="employee_links">
<li><a href="{$link->getAdminLink('AdminEmployees')|escape:'htmlall':'UTF-8'}&id_employee={$employee->id}&amp;updateemployee">{l s='My preferences'}</a></li>
<li class="separator">&nbsp;</li>
<li><a id="header_logout" href="index.php?logout">{l s='logout'}</a></li>
</ul>
{if {$base_url}}
<a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
{/if}
</div>
</div>
<div id="header_search">
<form method="post" action="index.php?controller=AdminSearch&amp;token={getAdminToken tab='AdminSearch'}">
<input type="text" name="bo_query" id="bo_query" value="{$bo_query}" />
+8 -3
View File
@@ -50,9 +50,14 @@
{if isset($informations) && count($informations) && $informations}
<div class="hint clear" style="display:block;">
{foreach $informations as $info}
{$info}<br />
{/foreach}
<span id="see_more_infos">
<b><a href="#" style="color:#00529B;" onclick="$('#see_more_infos').hide(); $('#infos_block').show();return false;">{l s='Click here to see more informations'}</a></b>
</span>
<div id="infos_block" style="display:none;">
{foreach $informations as $info}
{$info}<br />
{/foreach}
</div>
</div><br />
{/if}
-1
View File
@@ -61,7 +61,6 @@ class AddressFormatCore extends ObjectModel
public static $forbiddenPropertyList = array(
'deleted',
'date_add',
'other',
'alias',
'secure_key',
'note',
+2 -2
View File
@@ -51,7 +51,7 @@ class CartCore extends ObjectModel
public $id_lang;
/** @var boolean True if the customer wants a recycled package */
public $recyclable = 1;
public $recyclable = 0;
/** @var boolean True if the customer wants a gift wrapping */
public $gift = 0;
@@ -1685,7 +1685,7 @@ class CartCore extends ObjectModel
{
$product['carrier_list'] = array_merge($product['carrier_list'], Carrier::getAvailableCarrierList(new Product($product['id_product']), $id_war, $product['id_address_delivery'], null, $this));
if (in_array((int)$id_war, $product['warehouse_list']) && $id_warehouse == 0)
$id_warehouse = $id_war;
$id_warehouse = (int)$id_war;
}
if (!isset($grouped_by_warehouse[$product['id_address_delivery']]['in_stock'][$id_warehouse]))
-1
View File
@@ -219,7 +219,6 @@ class CartRuleCore extends ObjectModel
cr.`id_customer` = '.(int)$id_customer.'
'.($includeGeneric ? 'OR cr.`id_customer` = 0' : '').'
)
AND highlight = 1
'.($active ? 'AND cr.`active` = 1' : '').'
'.($inStock ? 'AND cr.`quantity` > 0' : ''));
+1 -1
View File
@@ -1348,7 +1348,7 @@ class CategoryCore extends ObjectModel
SELECT c.`id_category`
FROM `'._DB_PREFIX_.'category` c
LEFT JOIN `'._DB_PREFIX_.'category_shop` cs
ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` = '.(int)$id_shop.')
ON (c.`id_category` = cs.`id_category` AND cs.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') )
WHERE cs.`id_shop` = '.(int)$id_shop.'
AND c.`id_parent` = '.(int)$this->id_parent);
}
+3
View File
@@ -145,6 +145,9 @@ class ConfigurationCore extends ObjectModel
*/
public static function get($key, $id_lang = null, $id_shop_group = null, $id_shop = null)
{
if (defined('_PS_DO_NOT_LOAD_CONFIGURATION_') && _PS_DO_NOT_LOAD_CONFIGURATION_)
return false;
// If conf if not initialized, try manual query
if (!self::$_CONF)
{
+7 -1
View File
@@ -44,6 +44,9 @@ class CustomerCore extends ObjectModel
/** @var integer Default group ID */
public $id_default_group;
/** @var integer Current language used by the customer */
public $id_lang;
/** @var string Lastname */
public $lastname;
@@ -135,6 +138,7 @@ class CustomerCore extends ObjectModel
protected $webserviceParameters = array(
'fields' => array(
'id_default_group' => array('xlink_resource' => 'groups'),
'id_lang' => array('xlink_resource' => 'languages'),
'newsletter_date_add' => array(),
'ip_registration_newsletter' => array(),
'last_passwd_gen' => array('setter' => null),
@@ -181,6 +185,7 @@ class CustomerCore extends ObjectModel
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
'id_default_group' => array('type' => self::TYPE_INT, 'copy_post' => false),
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
),
@@ -200,6 +205,7 @@ class CustomerCore extends ObjectModel
{
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->id;
$this->id_shop_group = ($this->id_shop_group) ? $this->id_shop_group : Context::getContext()->shop->id_shop_group;
$this->id_lang = ($this->id_lang) ? $this->id_lang : Context::getContext()->language->id;
$this->birthday = (empty($this->years) ? $this->birthday : (int)$this->years.'-'.(int)$this->months.'-'.(int)$this->days);
$this->secure_key = md5(uniqid(rand(), true));
$this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes'));
@@ -227,7 +233,7 @@ class CustomerCore extends ObjectModel
if ($this->newsletter && !Validate::isDate($this->newsletter_date_add))
$this->newsletter_date_add = date('Y-m-d H:i:s');
if (Context::getContext()->controller->controller_type == 'admin')
if (isset(Context::getContext()->controller) && Context::getContext()->controller->controller_type == 'admin')
$this->updateGroup($this->groupBox);
if ($this->deleted)
+2
View File
@@ -102,6 +102,7 @@ class CustomerThreadCore extends ObjectModel
SELECT id_customer_thread
FROM '._DB_PREFIX_.'customer_thread ct2
WHERE status = "open" AND ct.id_contact = ct2.id_contact
'.Shop::addSqlRestriction().'
ORDER BY date_upd ASC
LIMIT 1
) as id_customer_thread
@@ -111,6 +112,7 @@ class CustomerThreadCore extends ObjectModel
WHERE ct.status = "open"
AND ct.id_contact IS NOT NULL
AND cl.id_contact IS NOT NULL
'.Shop::addSqlRestriction().'
GROUP BY ct.id_contact HAVING COUNT(*) > 0
');
}
+15 -14
View File
@@ -395,7 +395,19 @@ class DispatcherCore
$this->default_routes[$route] = array();
$this->default_routes[$route] = array_merge($this->default_routes[$route], $route_details);
}
// Set default routes
foreach (Language::getLanguages() as $lang)
foreach ($this->default_routes as $id => $route)
$this->addRoute(
$id,
$route['rule'],
$route['controller'],
$lang['id_lang'],
$route['keywords'],
isset($route['params']) ? $route['params'] : array()
);
// Load the custom routes prior the defaults to avoid infinite loops
if ($this->use_routes)
{
@@ -438,18 +450,6 @@ class DispatcherCore
isset($route_data['params']) ? $route_data['params'] : array()
);
}
// Set default routes
foreach (Language::getLanguages() as $lang)
foreach ($this->default_routes as $id => $route)
$this->addRoute(
$id,
$route['rule'],
$route['controller'],
$lang['id_lang'],
$route['keywords'],
isset($route['params']) ? $route['params'] : array()
);
}
/**
@@ -581,7 +581,6 @@ class DispatcherCore
return ($route_id == 'index') ? $index_link.(($query) ? '?'.$query : '') : 'index.php?controller='.$route_id.(($query) ? '&'.$query : '').$anchor;
}
$route = $this->routes[$id_lang][$route_id];
// Check required fields
$query_params = isset($route['params']) ? $route['params'] : array();
foreach ($route['keywords'] as $key => $data)
@@ -598,8 +597,10 @@ class DispatcherCore
// Build an url which match a route
if ($this->use_routes || $force_routes)
{
$url = $route['rule'];
$add_param = array();
foreach ($params as $key => $value)
{
if (!isset($route['keywords'][$key]))
+4 -1
View File
@@ -143,13 +143,16 @@ class ImageTypeCore extends ObjectModel
{
$theme_name = Context::getContext()->shop->theme_name;
$name_without_theme_name = str_replace(array('_'.$theme_name, $theme_name.'_'), '', $name);
//check if the theme name is already in $name if yes only return $name
if (strstr($name, $theme_name) && self::getByNameNType($name))
return $name;
else if (self::getByNameNType($name_without_theme_name.'_'.$theme_name))
return $name_without_theme_name.'_'.$theme_name;
else
else if (self::getByNameNType($theme_name.'_'.$name_without_theme_name))
return $theme_name.'_'.$name_without_theme_name;
else
return $name_without_theme_name;
}
}
+2 -2
View File
@@ -142,8 +142,8 @@ class PackCore extends Product
AND a.`id_product_pack` = '.(int)$id_product;
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
foreach ($result as &$row)
$row = Product::getTaxesInformations($row);
foreach ($result as &$line)
$line = Product::getTaxesInformations($line);
if (!$full)
return $result;
+13 -1
View File
@@ -589,9 +589,16 @@ class ProductCore extends ObjectModel
*/
public static function getDefaultAttribute($id_product, $minimum_quantity = 0)
{
static $combinations = array();
if (!Combination::isFeatureActive())
return 0;
if (!isset($combinations[$id_product]))
$combinations[$id_product] = array();
if (isset($combinations[$id_product][$minimum_quantity]))
return $combinations[$id_product][$minimum_quantity];
$sql = 'SELECT pa.id_product_attribute
FROM '._DB_PREFIX_.'product_attribute pa
'.Shop::addSqlAssociation('product_attribute', 'pa').'
@@ -630,6 +637,8 @@ class ProductCore extends ObjectModel
WHERE pa.id_product = '.(int)$id_product;
$result = Db::getInstance()->getValue($sql);
}
$combinations[$id_product][$minimum_quantity] = $result;
return $result;
}
@@ -2533,8 +2542,11 @@ class ProductCore extends ObjectModel
if (!$use_customer_price)
$id_customer = 0;
if ($id_product_attribute === null)
$id_product_attribute = Product::getDefaultAttribute($id_product);
$cache_id = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_state.'-'.$zipcode.'-'.$id_group.
'-'.$quantity.'-'.(int)$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
'-'.$quantity.'-'.$id_product_attribute.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').
'-'.($use_reduc?'1':'0').'-'.$with_ecotax.'-'.$id_customer;
// reference parameter is filled before any returns
+3 -3
View File
@@ -345,7 +345,7 @@ class SpecificPriceCore extends ObjectModel
if (!SpecificPrice::isFeatureActive())
return array();
$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT `id_product`, `id_product_attribute`
FROM `'._DB_PREFIX_.'specific_price`
WHERE `id_shop` IN(0, '.(int)$id_shop.') AND
@@ -361,9 +361,9 @@ class SpecificPriceCore extends ObjectModel
)
AND
`reduction` > 0
');
', false);
$ids_product = array();
foreach ($results as $row)
while ($row = Db::getInstance()->nextRow($result))
$ids_product[] = $with_combination_id ? array('id_product' => (int)$row['id_product'], 'id_product_attribute' => (int)$row['id_product_attribute']) : (int)$row['id_product'];
return $ids_product;
}
+8 -3
View File
@@ -110,7 +110,7 @@ class ToolsCore
}
/**
* Redirect url wich allready PS_BASE_URI
* Redirect URLs already containing PS_BASE_URI
*
* @param string $url Desired URL
*/
@@ -968,15 +968,20 @@ class ToolsCore
*/
public static function str2url($str)
{
static $allow_accented_chars = null;
if ($allow_accented_chars === null)
$allow_accented_chars = Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL');
if (function_exists('mb_strtolower'))
$str = mb_strtolower($str, 'utf-8');
$str = trim($str);
if (!function_exists('mb_strtolower') || !Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'))
if (!function_exists('mb_strtolower') || !$allow_accented_chars)
$str = Tools::replaceAccentedChars($str);
// Remove all non-whitelist chars.
if (Configuration::get('PS_ALLOW_ACCENTED_CHARS_URL'))
if ($allow_accented_chars)
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str);
else
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-]/','', $str);
+13 -24
View File
@@ -419,41 +419,28 @@ class AdminControllerCore extends Controller
*/
public function processFilter()
{
$prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this)));
// Filter memorization
if (isset($_POST) && !empty($_POST) && isset($this->table))
foreach ($_POST as $key => $value)
{
if (is_array($this->table))
{
foreach ($this->table as $table)
if (stripos($key, $table.'Filter_') === 0 || stripos($key, 'submitFilter') === 0)
$this->context->cookie->$key = !is_array($value) ? $value : serialize($value);
}
elseif (stripos($key, $this->table.'Filter_') === 0 || stripos($key, 'submitFilter') === 0)
if (stripos($key, $this->table.'Filter_') === 0)
$this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : serialize($value);
elseif(stripos($key, 'submitFilter') === 0)
$this->context->cookie->$key = !is_array($value) ? $value : serialize($value);
}
if (isset($_GET) && !empty($_GET) && isset($this->table))
foreach ($_GET as $key => $value)
{
if (is_array($this->table))
{
foreach ($this->table as $table)
if (stripos($key, $table.'OrderBy') === 0 || stripos($key, $table.'Orderway') === 0)
$this->context->cookie->$key = $value;
}
elseif (stripos($key, $this->table.'OrderBy') === 0 || stripos($key, $this->table.'Orderway') === 0)
if (stripos($key, $this->table.'OrderBy') === 0 || stripos($key, $this->table.'Orderway') === 0)
$this->context->cookie->$key = $value;
}
$filters = $this->context->cookie->getFamily($this->table.'Filter_');
$filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_');
foreach ($filters as $key => $value)
{
/* Extracting filters from $_POST on key filter_ */
if ($value != null && !strncmp($key, $this->table.'Filter_', 7 + Tools::strlen($this->table)))
if ($value != null && !strncmp($key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table)))
{
$key = Tools::substr($key, 7 + Tools::strlen($this->table));
$key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->table));
/* Table alias could be specified using a ! eg. alias!field */
$tmp_tab = explode('!', $key);
$filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0];
@@ -835,11 +822,12 @@ class AdminControllerCore extends Controller
*/
public function processResetFilters()
{
$filters = $this->context->cookie->getFamily($this->table.'Filter_');
$prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this)));
$filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_');
foreach ($filters as $cookie_key => $filter)
if (strncmp($cookie_key, $this->table.'Filter_', 7 + Tools::strlen($this->table)) == 0)
if (strncmp($cookie_key, $prefix.$this->table.'Filter_', 7 + Tools::strlen($prefix.$this->table)) == 0)
{
$key = substr($cookie_key, 7 + Tools::strlen($this->table));
$key = substr($cookie_key, 7 + Tools::strlen($prefix.$this->table));
/* Table alias could be specified using a ! eg. alias!field */
$tmp_tab = explode('!', $key);
$key = (count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0]);
@@ -1592,6 +1580,7 @@ class AdminControllerCore extends Controller
$helper->multiple_fieldsets = $this->multiple_fieldsets;
$helper->row_hover = $this->row_hover;
$helper->position_identifier = $this->position_identifier;
$helper->controller_name = $this->controller_name;
// For each action, try to add the corresponding skip elements list
$helper->list_skip_actions = $this->list_skip_actions;
+2 -2
View File
@@ -67,7 +67,7 @@ class DbQueryCore
public function from($table, $alias = null)
{
if (!empty($table))
$this->query['from'] = '`'._DB_PREFIX_.$table.'`'.($alias ? ' '.$alias : '');
$this->query['from'][] = '`'._DB_PREFIX_.$table.'`'.($alias ? ' '.$alias : '');
return $this;
}
@@ -220,7 +220,7 @@ class DbQueryCore
if (!$this->query['from'])
die('DbQuery->build() missing from clause');
$sql .= 'FROM '.$this->query['from']."\n";
$sql .= 'FROM '.implode(', ', $this->query['from'])."\n";
if ($this->query['join'])
$sql .= implode("\n", $this->query['join'])."\n";
+5 -4
View File
@@ -530,11 +530,12 @@ class HelperListCore extends Helper
if ($this->position_identifier && ($this->orderBy == 'position' && $this->orderWay != 'DESC'))
$table_dnd = true;
$prefix = isset($this->controller_name) ? str_replace(array('admin', 'controller'), '', Tools::strtolower($this->controller_name)) : '';
foreach ($this->fields_list as $key => $params)
{
if (!isset($params['type']))
$params['type'] = 'text';
$value = Context::getContext()->cookie->{$this->table.'Filter_'.(array_key_exists('filter_key', $params) ? $params['filter_key'] : $key)};
$value = Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.(array_key_exists('filter_key', $params) ? $params['filter_key'] : $key)};
switch ($params['type'])
{
case 'bool':
@@ -558,9 +559,9 @@ class HelperListCore extends Helper
case 'select':
foreach ($params['list'] as $option_value => $option_display)
{
if (isset(Context::getContext()->cookie->{$this->table.'Filter_'.$params['filter_key']})
&& Context::getContext()->cookie->{$this->table.'Filter_'.$params['filter_key']} == $option_value
&& Context::getContext()->cookie->{$this->table.'Filter_'.$params['filter_key']} != '')
if (isset(Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']})
&& Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} == $option_value
&& Context::getContext()->cookie->{$prefix.$this->table.'Filter_'.$params['filter_key']} != '')
$this->fields_list[$key]['select'][$option_value]['selected'] = 'selected';
}
break;
+1 -1
View File
@@ -857,7 +857,7 @@ abstract class ModuleCore
if (!Validate::isModuleName($module_name))
{
if (_PS_MODE_DEV_)
die(Tools::displayError());
die(Tools::displayError($module_name.' is not a valid module name.'));
return false;
}
+4
View File
@@ -80,7 +80,11 @@ class PDFCore
}
if ($render)
{
// clean the output buffer to avoid random bugs with tcpdf
ob_end_clean();
return $this->pdf_renderer->render($this->filename, $display);
}
}
public function getTemplateObject($object)
+8
View File
@@ -171,6 +171,14 @@ class StockAvailableCore extends ObjectModel
continue;
$product_quantity = $manager->getProductRealQuantities($id_product, null, $allowed_warehouse_for_product_clean, true);
Hook::exec('actionUpdateQuantity',
array(
'id_product' => $id_product,
'id_product_attribute' => 0,
'quantity' => $product_quantity
)
);
}
// else this product has attributes, hence loops on $ids_product_attribute
else
+30 -21
View File
@@ -82,11 +82,13 @@ if (!isset($_SERVER['REQUEST_URI']) || empty($_SERVER['REQUEST_URI']))
/* Trying to redefine HTTP_HOST if empty (on some webservers...) */
if (!isset($_SERVER['HTTP_HOST']) || empty($_SERVER['HTTP_HOST']))
$_SERVER['HTTP_HOST'] = @getenv('HTTP_HOST');
$context = Context::getContext();
/* Initialize the current Shop */
Context::getContext()->shop = Shop::initialize();
define('_THEME_NAME_', Context::getContext()->shop->getTheme());
define('__PS_BASE_URI__', Context::getContext()->shop->getBaseURI());
$context->shop = Shop::initialize();
define('_THEME_NAME_', $context->shop->getTheme());
define('__PS_BASE_URI__', $context->shop->getBaseURI());
/* Include all defines related to base uri and theme name */
require_once(dirname(__FILE__).'/defines_uri.inc.php');
@@ -102,7 +104,7 @@ Language::loadLanguages();
/* Loading default country */
$defaultCountry = new Country(Configuration::get('PS_COUNTRY_DEFAULT'), Configuration::get('PS_LANG_DEFAULT'));
Context::getContext()->country = $defaultCountry;
$context->country = $defaultCountry;
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */
@date_default_timezone_set(Configuration::get('PS_TIMEZONE'));
@@ -124,24 +126,32 @@ if (defined('_PS_ADMIN_DIR_'))
$cookie = new Cookie('psAdmin', '', $cookie_lifetime);
else
{
if (Context::getContext()->shop->getGroup()->share_order)
$cookie = new Cookie('ps-sg'.Context::getContext()->shop->getGroup()->id, '', $cookie_lifetime, Context::getContext()->shop->getUrlsSharedCart());
if ($context->shop->getGroup()->share_order)
$cookie = new Cookie('ps-sg'.$context->shop->getGroup()->id, '', $cookie_lifetime, $context->shop->getUrlsSharedCart());
else
{
$domains = null;
if (Context::getContext()->shop->domain != Context::getContext()->shop->domain_ssl)
$domains = array(Context::getContext()->shop->domain_ssl, Context::getContext()->shop->domain);
if ($context->shop->domain != $context->shop->domain_ssl)
$domains = array($context->shop->domain_ssl, $context->shop->domain);
$cookie = new Cookie('ps-s'.Context::getContext()->shop->id, '', $cookie_lifetime, $domains);
$cookie = new Cookie('ps-s'.$context->shop->id, '', $cookie_lifetime, $domains);
}
}
Context::getContext()->cookie = $cookie;
$context->cookie = $cookie;
/* if the language stored in the cookie is not available language, use default language */
if (isset($cookie->id_lang) && $cookie->id_lang)
$language = new Language($cookie->id_lang);
if (!isset($language) || !Validate::isLoadedObject($language))
$language = new Language(Configuration::get('PS_LANG_DEFAULT'));
$context->language = $language;
/* Create employee if in BO, customer else */
if (defined('_PS_ADMIN_DIR_'))
{
$employee = new Employee($cookie->id_employee);
Context::getContext()->employee = $employee;
$context->employee = $employee;
/* Auth on shops are recached after employee assignation */
if ($employee->id_profile != _PS_ADMIN_PROFILE_)
@@ -155,6 +165,12 @@ else
{
$customer = new Customer($cookie->id_customer);
$customer->logged = $cookie->logged;
if ($customer->id_lang != $context->language->id)
{
$customer->id_lang = $context->language->id;
$customer->update();
}
}
else
{
@@ -165,19 +181,12 @@ else
$customer->id_default_group = Configuration::get('PS_UNIDENTIFIED_GROUP');
}
$customer->id_guest = $cookie->id_guest;
Context::getContext()->customer = $customer;
$context->customer = $customer;
}
/* if the language stored in the cookie is not available language, use default language */
if (isset($cookie->id_lang) && $cookie->id_lang)
$language = new Language($cookie->id_lang);
if (!isset($language) || !Validate::isLoadedObject($language))
$language = new Language(Configuration::get('PS_LANG_DEFAULT'));
Context::getContext()->language = $language;
/* Link should also be initialized in the context here for retrocompatibility */
$https_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
Context::getContext()->link = new Link($https_link, $https_link);
$context->link = new Link($https_link, $https_link);
/**
* @deprecated : these defines are going to be deleted on 1.6 version of Prestashop
@@ -198,4 +207,4 @@ define('_PS_OS_WS_PAYMENT_', Configuration::get('PS_OS_WS_PAYMENT'));
/* Get smarty */
require_once(dirname(__FILE__).'/smarty.config.inc.php');
Context::getContext()->smarty = $smarty;
$context->smarty = $smarty;
+14 -4
View File
@@ -113,8 +113,18 @@ class AdminCartsControllerCore extends AdminController
/* Display order information */
$id_order = (int)Order::getOrderByCartId($cart->id);
$order = new Order($id_order);
if ($order->getTaxCalculationMethod() == PS_TAX_EXC)
if (Validate::isLoadedObject($order))
{
$tax_calculation_method = $order->getTaxCalculationMethod();
$id_shop = (int)$order->id_shop;
}
else
{
$id_shop = (int)$cart->id_shop;
$tax_calculation_method = Group::getPriceDisplayMethod(Group::getCurrent()->id);
}
if ($tax_calculation_method == PS_TAX_EXC)
{
$total_products = $summary['total_products'];
$total_discounts = $summary['total_discounts_tax_exc'];
@@ -132,7 +142,7 @@ class AdminCartsControllerCore extends AdminController
}
foreach ($products as $k => &$product)
{
if ($order->getTaxCalculationMethod() == PS_TAX_EXC)
if ($tax_calculation_method == PS_TAX_EXC)
{
$product['product_price'] = $product['price'];
$product['product_total'] = $product['total'];
@@ -153,7 +163,7 @@ class AdminCartsControllerCore extends AdminController
WHERE id_product = '.(int)$product['id_product'].' AND cover = 1');
$product_obj = new Product($product['id_product']);
$product['qty_in_stock'] = StockAvailable::getQuantityAvailableByProduct($product['id_product'], isset($product['id_product_attribute']) ? $product['id_product_attribute'] : null, (int)$order->id_shop);
$product['qty_in_stock'] = StockAvailable::getQuantityAvailableByProduct($product['id_product'], isset($product['id_product_attribute']) ? $product['id_product_attribute'] : null, (int)$id_shop);
$image_product = new Image($image['id_image']);
$product['image'] = (isset($image['id_image']) ? ImageManager::thumbnail(_PS_IMG_DIR_.'p/'.$image_product->getExistingImgPath().'.jpg', 'product_mini_'.(int)$product['id_product'].(isset($product['id_product_attribute']) ? '_'.(int)$product['id_product_attribute'] : '').'.jpg', 45, 'jpg') : '--');
@@ -442,7 +442,7 @@ class AdminCountriesControllerCore extends AdminController
$html .= '<li>
<a href="javascript:void(0);" onClick="displayAvailableFields(\''.$class_name.'\')">'.$class_name.'</a>';
foreach (AddressFormat::getValidateFields($class_name) as $name)
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" id="'.$class_name.':'.$name.'">
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" '.$name.' id="'.($class_name == 'Address' ? $name : $class_name.':'.$name).'">
'.$name.'</a>';
$html .= '
<div class="availableFieldsList" id="availableListFieldsFor_'.$class_name.'" style="width:300px;">
@@ -666,7 +666,8 @@ class AdminCustomersControllerCore extends AdminController
'customer_birthday' => Tools::displayDate($customer->birthday, $this->default_form_language),
'last_update' => Tools::displayDate($customer->date_upd, $this->default_form_language, true),
'customer_exists' => Customer::customerExists($customer->email),
'id_lang' => (int)(count($orders) ? $orders[0]['id_lang'] : Configuration::get('PS_LANG_DEFAULT')),
'id_lang' => $customer->id_lang,
'customerLanguage' => (new Language($customer->id_lang)),
// Add a Private note
'customer_note' => Tools::htmlentitiesUTF8($customer->note),
@@ -493,8 +493,6 @@ class AdminHomeControllerCore extends AdminController
if (@fsockopen('api.prestashop.com', 80, $errno, $errst, AdminHomeController::TIPS_TIMEOUT))
$result['discover_prestashop'] .= '<div class="row-news"><div id="block_discover"><iframe frameborder="no" style="margin: 0px; padding: 0px; width: 100%; height:300px; overflow:hidden;" src="'.$protocol.'://api.prestashop.com/rss2/news2.php?v='._PS_VERSION_.'&lang='.$isoUser.'"></iframe></div>';
else
$result['discover_prestashop'] .= '';
// SHOW TIPS OF THE DAY
$content = @file_get_contents($protocol.'://api.prestashop.com/partner/tipsoftheday/?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser), false, $stream_context);
+1 -1
View File
@@ -40,7 +40,7 @@ class AdminImagesControllerCore extends AdminController
$this->fields_list = array(
'id_image_type' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'name' => array('title' => $this->l('Name'), 'width' => 300),
'name' => array('title' => $this->l('Name'), 'width' => 'auto'),
'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
'products' => array('title' => $this->l('Products:'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
@@ -447,6 +447,13 @@ class AdminModulesControllerCore extends AdminController
// Try to upload and unarchive the module
if ($this->tabAccess['add'] === '1')
{
// UPLOAD_ERR_OK: 0
// UPLOAD_ERR_INI_SIZE: 1
// UPLOAD_ERR_FORM_SIZE: 2
// UPLOAD_ERR_NO_TMP_DIR: 6
// UPLOAD_ERR_CANT_WRITE: 7
// UPLOAD_ERR_EXTENSION: 8
// UPLOAD_ERR_PARTIAL: 3
if (!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name']))
$this->errors[] = $this->l('No file has been selected');
elseif (substr($_FILES['file']['name'], -4) != '.tar' && substr($_FILES['file']['name'], -4) != '.zip'
+2 -1
View File
@@ -301,6 +301,7 @@ class AdminOrdersControllerCore extends AdminController
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{id_order}' => $order->id,
'{shipping_number}' => $order->shipping_number,
'{order_name}' => $order->getUniqReference()
);
if (@Mail::Send((int)$order->id_lang, 'in_transit', Mail::l('Package in transit', (int)$order->id_lang), $templateVars,
@@ -1284,7 +1285,7 @@ class AdminOrdersControllerCore extends AdminController
foreach (PaymentModule::getInstalledPaymentModules() as $payment)
{
$module = Module::getInstanceByName($payment['name']);
if (Validate::isLoadedObject($module))
if (Validate::isLoadedObject($module) && $module->active)
$payment_methods[] = $module->displayName;
}
@@ -206,7 +206,7 @@ class AdminProductsControllerCore extends AdminController
else
$this->fields_list['name_category'] = array(
'title' => $this->l('Category'),
'width' => 230,
'width' => 'auto',
'filter_key' => 'cl!name',
);
$this->fields_list['price'] = array(
+4 -5
View File
@@ -665,8 +665,8 @@ class AdminShopControllerCore extends AdminController
'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-groups.png',
'attr' => array(
'href' => $this->context->link->getAdminLink('AdminShop').'&id_shop_group='.$id_shop_group,
'title' => sprintf($this->l('Click here to display the shops in group %s'), $row['group_name']),
)
'title' => sprintf($this->l('Click here to display the shops in group %s', 'AdminShop', false, false), $row['group_name']),
),
),
'attr' => array(
'id' => 'tree-group-'.$id_shop_group,
@@ -685,7 +685,7 @@ class AdminShopControllerCore extends AdminController
'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-shop.png',
'attr' => array(
'href' => $this->context->link->getAdminLink('AdminShopUrl').'&id_shop='.$id_shop,
'title' => sprintf($this->l('Click here to display the URLs of shops %s'), $row['shop_name']),
'title' => sprintf($this->l('Click here to display the URLs of shops %s', 'AdminShop', false, false), $row['shop_name']),
)
),
'attr' => array(
@@ -693,7 +693,6 @@ class AdminShopControllerCore extends AdminController
),
'children' => array(),
);
// Url list
if (!$id_shop_url)
continue;
@@ -736,7 +735,7 @@ class AdminShopControllerCore extends AdminController
'icon' => 'themes/'.$this->context->employee->bo_theme.'/img/tree-multishop-root.png',
'attr' => array(
'href' => $this->context->link->getAdminLink('AdminShopGroup'),
'title' => $this->l('Click here to display group shops list'),
'title' => $this->l('Click here to display group shops list', 'AdminShop', false, false),
)
),
'attr' => array(
@@ -61,7 +61,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
'name' => array(
'title' => $this->l('Name'),
'filter_key' => 'a!name',
'width' => 200
'width' => 'auto'
),
'shop_name' => array(
'title' => $this->l('Shop'),
@@ -398,11 +398,16 @@ class AdminTaxRulesGroupControllerCore extends AdminController
if (empty($this->selected_states) || count($this->selected_states) == 0)
$this->selected_states = array(0);
$tax_rules_group = new TaxRulesGroup((int)$id_tax_rules_group);
foreach ($this->selected_countries as $id_country)
{
foreach ($this->selected_states as $id_state)
{
if ($tax_rules_group->hasUniqueTaxRuleForCountry($id_country, $id_state))
{
$this->errors[] = Tools::displayError('A tax rule already exists for this country/state with tax only behavior');
continue;
}
$tr = new TaxRule();
// update or creation?
+1
View File
@@ -112,6 +112,7 @@ class CmsControllerCore extends FrontController
else if ($this->assignCase == 2)
{
$this->context->smarty->assign(array(
'category' => $this->cms_category, //for backward compatibility
'cms_category' => $this->cms_category,
'sub_category' => $this->cms_category->getSubCategories($this->context->language->id),
'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id) ),
+1 -1
View File
@@ -329,7 +329,7 @@ class ParentOrderControllerCore extends FrontController
$cart_cart_rules = $this->context->cart->getCartRules();
foreach ($available_cart_rules as $key => $available_cart_rule)
{
if (strpos($available_cart_rule['code'], 'BO_ORDER_') === 0)
if (!$available_cart_rule['highlight'] || strpos($available_cart_rule['code'], 'BO_ORDER_') === 0)
{
unset($available_cart_rules[$key]);
continue;
@@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/
require_once(_PS_ROOT_DIR_.'/config/settings.inc.php');
define('_PS_DO_NOT_LOAD_CONFIGURATION_', true);
if (Tools::getValue('bo'))
{
if (!is_dir(_PS_ROOT_DIR_.'/admin/'))
+1
View File
@@ -537,6 +537,7 @@ CREATE TABLE `PREFIX_customer` (
`id_shop` INT(11) UNSIGNED NOT NULL DEFAULT '1',
`id_gender` int(10) unsigned NOT NULL,
`id_default_group` int(10) unsigned NOT NULL DEFAULT '1',
`id_lang` int(10) unsigned NULL,
`id_risk` int(10) unsigned NOT NULL DEFAULT '1',
`company` varchar(64),
`siret` varchar(14),
+3
View File
@@ -228,6 +228,7 @@ div.field {
font-family:Georgia;
font-style:italic;
color:#999;
float: right;
}
#uploadedImage {border:1px solid #ccc;}
@@ -242,6 +243,8 @@ div.field {
padding:20px 20px 20px 38px;
background:#ffebe8 url(img/pict_error.png) no-repeat 15px 21px;
border:1px solid #cc0000;
clear: both;
display: block;
}
.errorTxt {
+1 -1
View File
@@ -88,7 +88,7 @@ var default_iso = '<?php echo $this->session->shop_country ?>';
</div>
<p class="userInfos aligned"><?php echo $this->l('Recommended dimensions:') ?><br />209px x 52px</p>
<div id="inputFileLogo" class="contentinput">
<div id="inputFileLogo" class="contentinput" style="top:-20px;position:relative">
<input type="file" name="fileToUpload" id="fileToUpload"/>
</div>
<span id="resultInfosLogo" class="result"></span>
+7
View File
@@ -3,3 +3,10 @@ SET NAMES 'utf8';
UPDATE `PREFIX_meta` SET `page` = 'supplier' WHERE `page` = 'supply';
ALTER TABLE `PREFIX_image_type` CHANGE `name` `name` VARCHAR( 64 ) NOT NULL;
ALTER TABLE `PREFIX_customer` ADD `id_lang` INT UNSIGNED NULL AFTER `id_default_group`;
UPDATE `PREFIX_customer` SET id_lang = (SELECT `value` FROM `PREFIX_configuration` WHERE name = 'PS_LANG_DEFAULT' LIMIT 1);
UPDATE `PREFIX_customer` c, `PREFIX_orders` o SET c.id_lang = o.id_lang WHERE c.id_customer = o.id_customer;
UPDATE `PREFIX_quick_access` SET `link` = 'index.php?controller=AdminCartRules&addcart_rule' WHERE `link` = 'index.php?tab=AdminDiscounts&adddiscount';
+2 -2
View File
@@ -25,7 +25,7 @@
<tax id="2" name="7%" rate="7" />
<tax id="3" name="8%" rate="8" />
<tax id="4" name="10%" rate="10" />
<tax id="5" name="9.5%" rate="9.5" />
<tax id="5" name="9.975%" rate="9.975" />
<tax id="8" name="5%" rate="5" />
<taxRulesGroup name="CA Standard Rate">
@@ -37,7 +37,7 @@
<taxRule iso_code_country="ca" iso_code_state="ns" id_tax="4" behavior="1" />
<taxRule iso_code_country="ca" iso_code_state="on" id_tax="3" behavior="1" />
<taxRule iso_code_country="ca" iso_code_state="pe" id_tax="4" behavior="2" />
<taxRule iso_code_country="ca" iso_code_state="qc" id_tax="5" behavior="2" />
<taxRule iso_code_country="ca" iso_code_state="qc" id_tax="5" behavior="1" />
<taxRule iso_code_country="ca" iso_code_state="sk" id_tax="1" behavior="1" />
</taxRulesGroup>
</taxes>
+2 -2
View File
@@ -353,7 +353,7 @@ class MailAlerts extends Module
'{delivery_postal_code}' => $delivery->postcode,
'{delivery_country}' => $delivery->country,
'{delivery_state}' => $delivery->id_state ? $delivery_state->name : '',
'{delivery_phone}' => $delivery->phone,
'{delivery_phone}' => $delivery->phone ? $delivery->phone : $delivery->phone_mobile,
'{delivery_other}' => $delivery->other,
'{invoice_company}' => $invoice->company,
'{invoice_firstname}' => $invoice->firstname,
@@ -364,7 +364,7 @@ class MailAlerts extends Module
'{invoice_postal_code}' => $invoice->postcode,
'{invoice_country}' => $invoice->country,
'{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
'{invoice_phone}' => $invoice->phone,
'{invoice_phone}' => $invoice->phone ? $invoice->phone : $invoice->phone_mobile,
'{invoice_other}' => $invoice->other,
'{order_name}' => sprintf('%06d', $order->id),
'{shop_name}' => Configuration::get('PS_SHOP_NAME'),
@@ -1,32 +0,0 @@
<?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');
require_once(dirname(__FILE__).'/sendtoafriend.php');
$sendtoafriend = new sendToAFriend($dontTranslate = true);
echo $sendtoafriend->displayPageForm();
+1 -1
View File
@@ -77,7 +77,7 @@ class Tools extends ToolsCore
/**
* Redirect url wich allready PS_BASE_URI after 5 sec
* Redirect URLs already containing PS_BASE_URI after 5s
*
* @param string $url Desired URL
*/
+4 -4
View File
@@ -25,10 +25,10 @@
<script type="text/javascript">
// <![CDATA[
idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{else}false{/if}{/if};
countries = new Array();
countriesNeedIDNumber = new Array();
countriesNeedZipCode = new Array();
var idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{else}false{/if}{/if};
var countries = new Array();
var countriesNeedIDNumber = new Array();
var countriesNeedZipCode = new Array();
{foreach from=$countries item='country'}
{if isset($country.states) && $country.contains_states}
countries[{$country.id_country|intval}] = new Array();
+9 -2
View File
@@ -748,9 +748,13 @@ table#cart_summary tr ul {
table#cart_summary .cart_product {
width:80px;
text-align:center
}table#cart_summary tbody tr:last-child td {
}
table#cart_summary tbody tr:last-child td {
border-bottom: 1px solid #999;
}
table#cart_summary tbody tr td.cart_discount_delete {
padding-left: 34px;
}
table#cart_summary .cart_product img {border:1px solid #ccc}
table#cart_summary .cart_description {
width:230px;
@@ -812,6 +816,8 @@ table#cart_summary #total_price_container {
font-size:13px
}
.cart_voucher p {padding-bottom:0;}
.cart_voucher p.discount_name_block {float:left;}
.cart_voucher #display_cart_vouchers {
clear:both;
line-height: 20px;
@@ -1445,7 +1451,8 @@ form#add_adress {}
width:360px;/* 370 */
border:1px solid #ccc;
font-size: 12px;
color:#666
color:#666;
line-height:22px
}
#add_adress p.checkbox input {
margin-left:260px;
+1 -4
View File
@@ -50,7 +50,7 @@
{if $discountDetail.id_discount_type == 1}
{$discountDetail.value|escape:'htmlall':'UTF-8'}%
{elseif $discountDetail.id_discount_type == 2}
{convertPrice price=$discountDetail.value}
{convertPrice price=$discountDetail.value} ({if $discountDetail.reduction_tax == 1}{l s='Tax included'}{else}{l s='Tax excluded'}{/if})
{elseif $discountDetail.id_discount_type == 3}
{l s='Free shipping'}
{else}
@@ -76,9 +76,6 @@
{/foreach}
</tbody>
</table>
<p>
*{l s='Tax included'}
</p>
{else}
<p class="warning">{l s='You do not have any vouchers.'}</p>
{/if}
+7 -7
View File
@@ -171,13 +171,13 @@
<p><span class="price" id="total_shipping">{displayPrice price=$total_shipping_tax_exc}</span></p>
</div>
{/if}
<h3>{l s='Total (tax excl.):'}</h3>
<p><span class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</span></p>
<h3>{l s='Total tax:'}</h3>
<p><span class="price" id="total_tax">{displayPrice price=$total_tax}</span></p>
{if $use_taxes}
<h3>{l s='Total (tax excl.):'}</h3>
<p><span class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</span></p>
<h3>{l s='Total tax:'}</h3>
<p><span class="price" id="total_tax">{displayPrice price=$total_tax}</span></p>
{/if}
<h3>{l s='Total:'}</h3>
{if $use_taxes}
<p><span class="price" id="total_price">{displayPrice price=$total_price}</span></p>
+7 -1
View File
@@ -397,7 +397,13 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
{/if}
</div>
<p id="reduction_percent" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}</span></p>
<p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}><span id="reduction_amount_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0}-{convertPrice price=$product->specificPrice.reduction|floatval}{/if}</span></p>
<p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}>
<span id="reduction_amount_display">
{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0}
-{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval}
{/if}
</span>
</p>
{if $product->specificPrice AND $product->specificPrice.reduction}
<p id="old_price"><span class="bold">
{if $priceDisplay >= 0 && $priceDisplay <= 2}
+1 -1
View File
@@ -185,7 +185,7 @@
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
<fieldset>
<p class="title_block"><label for="discount_name">{l s='Vouchers'}</label></p>
<p>
<p class="discount_name_block">
<input type="text" class="discount_name" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
</p>
<p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='OK'}" class="button" /></p>
+925 -934
View File
File diff suppressed because it is too large Load Diff