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

This commit is contained in:
François Gaillard
2013-04-11 10:28:49 +02:00
33 changed files with 329 additions and 312 deletions
@@ -84,6 +84,13 @@ function addCartRuleOption(item)
function updateProductRuleShortDescription(item)
{
/******* For IE: put a product in condition on cart rules *******/
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
}
}
var id1 = $(item).attr('id').replace('_add', '').replace('_remove', '');
var id2 = id1.replace('_select', '');
var length = $('#' + id1 + '_2 option').length;
@@ -22,91 +22,79 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
var there_are = '{l s='There are'}';
var there_is = '{l s='There is'}';
var label_errors = '{l s='errors'}';
var label_error = '{l s='error'}';
</script>
<div id="container">
<div id="error" {if !isset($errors)}class="hide"{/if}>
{if isset($errors)}
<h3>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</h3>
<ol style="margin: 0 0 0 20px;">
{foreach from=$errors item="error"}
<li>{$error}</li>
{/foreach}
</ol>
{/if}
</div>
<br />
{if isset($warningSslMessage)}
<div class="warn">
{$warningSslMessage}
</div>
{/if}
<div id="login">
<h1>{$shop_name}</h1>
{if !isset($wrong_folder_name) && !isset($wrong_install_name)}
<form action="#" id="login_form" method="post">
<div class="field">
<label for="email">{l s='Email address:'}</label>
<input type="text" id="email" name="email" class="input email_field" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" />
</div>
<div class="field">
<label for="passwd">{l s='Password:'}</label>
<input id="passwd" type="password" name="passwd" class="input password_field" value="{if isset($password)}{$password}{/if}"/>
</div>
<div class="field">
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" />
<p class="fl no-margin hide ajax-loader">
<img src="../img/loader.gif" alt="" />
</p>
<p class="fr no-margin">
<a href="#" class="show-forgot-password">{l s='Lost password?'}</a>
</p>
<div class="clear"></div>
</div>
<input type="hidden" name="redirect" id="redirect" value="{$redirect}"/>
</form>
<form action="#" id="forgot_password_form" method="post" class="hide">
<h2 class="no-margin">{l s='Forgot your password?'}</h2>
<p class="bold">{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}</p>
<div class="field">
<label>{l s='Email address:'}</label>
<input type="text" name="email_forgot" id="email_forgot" class="input email_field" />
</div>
<div class="field">
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
<p class="fl no-margin hide ajax-loader">
<img src="../img/loader.gif" alt="" />
</p>
<p class="fr no-margin">
<a href="#" class="show-login-form">{l s='Back to login'}</a>
</p>
<div class="clear"></div>
</div>
</form>
{else}
<div class="padding-30">
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p>
<ul>
{if isset($wrong_install_name) && $wrong_install_name == true}<li>{l s='deleted the /install folder'}</li>{/if}
{if isset($wrong_folder_name) && $wrong_folder_name == true}<li>{l s='renamed the /admin folder (e.g. /admin%d)' sprintf=$randomNb}</li>{/if}
</ul>
{if isset($wrong_folder_name) && $wrong_folder_name == true}<p>{l s='Please then access this page by the new URL (e.g. http://www.yoursite.com/admin%d)' sprintf=$randomNb}</p>{/if}
</div>
{/if}
</div>
<h2><a href="http://www.prestashop.com">&copy; 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
</div>
<script type="text/javascript">
var there_are = '{l s='There are'}';
var there_is = '{l s='There is'}';
var label_errors = '{l s='errors'}';
var label_error = '{l s='error'}';
</script>
<div id="container">
<div id="error" {if !isset($errors)}class="hide"{/if}>
{if isset($errors)}
<h3>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</h3>
<ol style="margin: 0 0 0 20px;">
{foreach from=$errors item="error"}
<li>{$error}</li>
{/foreach}
</ol>
{/if}
</div>
<br />
{if isset($warningSslMessage)}
<div class="warn">{$warningSslMessage}</div>
{/if}
<div id="login">
<h1>{$shop_name}</h1>
{if !isset($wrong_folder_name) && !isset($wrong_install_name)}
<form action="#" id="login_form" method="post">
<div class="field">
<label for="email">{l s='Email address:'}</label>
<input type="text" id="email" name="email" class="input email_field" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" />
</div>
<div class="field">
<label for="passwd">{l s='Password:'}</label>
<input id="passwd" type="password" name="passwd" class="input password_field" value="{if isset($password)}{$password}{/if}"/>
</div>
<div class="field">
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" />
<p class="fl no-margin hide ajax-loader">
<img src="../img/loader.gif" alt="" />
</p>
<p class="fr no-margin">
<a href="#" class="show-forgot-password">{l s='Lost password?'}</a>
</p>
<div class="clear"></div>
</div>
<input type="hidden" name="redirect" id="redirect" value="{$redirect}"/>
</form>
<form action="#" id="forgot_password_form" method="post" class="hide">
<h2 class="no-margin">{l s='Forgot your password?'}</h2>
<p class="bold">{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}</p>
<div class="field">
<label>{l s='Email address:'}</label>
<input type="text" name="email_forgot" id="email_forgot" class="input email_field" />
</div>
<div class="field">
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
<p class="fl no-margin hide ajax-loader">
<img src="../img/loader.gif" alt="" />
</p>
<p class="fr no-margin">
<a href="#" class="show-login-form">{l s='Back to login'}</a>
</p>
<div class="clear"></div>
</div>
</form>
{else}
<div class="padding-30">
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p>
<ul>
{if isset($wrong_install_name) && $wrong_install_name == true}<li>{l s='deleted the /install folder'}</li>{/if}
{if isset($wrong_folder_name) && $wrong_folder_name == true}<li>{l s='renamed the /admin folder (e.g. %s)' sprintf=$randomNb}</li>{/if}
</ul>
<p><a href="{$adminUrl|escape:'htmlall':'UTF-8'}">{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}</a></p>
</div>
{/if}
</div>
<h2><a href="http://www.prestashop.com">&copy; 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
</div>
@@ -22,22 +22,23 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if $product.customizedDatas}
<tr class="customized customized-{$product.id_order_detail}">
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
<td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{else}--{/if}</td>
{if $product['customizedDatas']}
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td align="center">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if}</td>
<td>
<a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<a href="index.php?controller=adminproducts&id_product={$product['product_id']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='Customized'}</span><br />
{if ($product['product_reference'])}{l s='Ref:'} {$product['product_reference']}<br />{/if}
{if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if}
</a>
</td>
<td align="center">
<span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id}</span>
<span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id|intval}</span>
{if $can_edit}
<span class="product_price_edit" style="display:none;">
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
<input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_excl" class="edit_product_price_tax_excl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_excl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax excl.'}<br />
{if $currency->sign % 2}{$currency->sign}{/if}<input type="text" name="product_price_tax_incl" class="edit_product_price_tax_incl edit_product_price" value="{Tools::ps_round($product['unit_price_tax_incl'], 2)}" size="5" /> {if !($currency->sign % 2)}{$currency->sign}{/if} {l s='tax incl.'}
</span>
@@ -49,32 +50,37 @@
{if $stock_management}<td align="center" class=""> - </td>{/if}
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval}
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none" colspan="2">
&nbsp;
</td>
<td class="edit_product_fields" colspan="2" style="display:none">&nbsp;</td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"></td>
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="product_action" style="text-align:right">
<a href="#" class="edit_product_change_link"><img src="../img/admin/edit.gif" alt="{l s='Edit'}" /></a>
<input type="submit" class="button" name="submitProductChange" value="{l s='Update'}" style="display: none;" />
<a href="#" class="cancel_product_change_link" style="display: none;"><img src="../img/admin/disabled.gif" alt="{l s='Cancel'}" /></a>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a>
</td>
{/if}
</tr>
{foreach $product.customizedDatas as $customizationPerAddress}
{foreach $product['customizedDatas'] as $customizationPerAddress}
{foreach $customizationPerAddress as $customizationId => $customization}
<tr class="customized customized-{$product.id_order_detail}">
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
<tr class="customized customized-{$product['id_order_detail']|intval}">
<td colspan="2">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{foreach $customization.datas as $type => $datas}
{if ($type == Product::CUSTOMIZE_FILE)}
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
{foreach from=$datas item=data}
<li style="margin: 2px;">
<span>{if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}{l s=':'}</span>&nbsp;
<a href="displayImage.php?img={$data['value']}&name={$order->id}-file{$data@iteration}" target="_blank"><img src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$data@iteration}" target="_blank"><img src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
</li>
{/foreach}
</ul>
@@ -93,7 +99,7 @@
<span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span>
{if $can_edit}
<span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity[{$customizationId}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
<input type="text" name="product_quantity[{$customizationId|intval}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
</span>
{/if}
</td>
@@ -104,36 +110,38 @@
</td>
<td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval}
{else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id|intval}
{/if}
</td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']}" />
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']|intval}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']|intval}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" />
{if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))}
<input type="checkbox" name="id_order_detail[{$product['id_order_detail']}]" id="id_order_detail[{$product['id_order_detail']}]" value="{$product['id_order_detail']}" onchange="setCancelQuantity(this, {$product['id_order_detail']}, {$customization['quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
<input type="checkbox" name="id_customization[{$customizationId|intval}]" id="id_customization[{$customizationId|intval}]" value="{$product['id_order_detail']|intval}" onchange="setCancelQuantity(this, {$customizationId|intval}, {$customization['quantity'] - $product['customizationQuantityTotal'] - $product['product_quantity_reinjected']})" {if ($product['product_quantity_return'] + $product['product_quantity_refunded'] >= $product['product_quantity'])}disabled="disabled" {/if}/>
{else}
--
{/if}
</td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])}
<input type="hidden" name="cancelQuantity[{$product['id_order_detail']}]" value="0" />
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId|intval}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$product['id_order_detail']}" name="cancelQuantity[{$product['id_order_detail']}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']}
{/if}
</td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none">
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input type="text" size="3" name="partialRefundProductQuantity[{$product['id_order_detail']}]" value="0" />
<div style="width:40%;margin-top:5px;float:left">{l s='Quantity:'}</div> <div style="width:60%;margin-top:2px;float:left"><input type="text" size="3" name="partialRefundProductQuantity[{$product['id_order_detail']|intval}]" value="0" />
0/{$customization['quantity']-$customization['quantity_refunded']}
</div>
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left">{$currency->prefix}<input type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']}]" />{$currency->suffix}</div>
<td class="edit_product_fields" colspan="2" style="display:none"></td>
<td class="product_action" style="text-align:right">
<div style="width:40%;margin-top:5px;float:left">{l s='Amount:'}</div> <div style="width:60%;margin-top:2px;float:left">{$currency->prefix}<input type="text" size="3" name="partialRefundProduct[{$product['id_order_detail']|intval}]" />{$currency->suffix}</div>
</td>
{if ($can_edit && !$order->hasBeenDelivered())}
<td class="edit_product_fields" colspan="2" style="display:none"></td>
<td class="product_action" style="text-align:right"></td>
{/if}
</tr>
{/foreach}
{/foreach}
+24 -26
View File
@@ -22,33 +22,31 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div style="clear:both;height:0;line-height:0">&nbsp;</div>
</div>
<div style="clear:both;height:0;line-height:0">&nbsp;</div>
<div style="clear:both;height:0;line-height:0">&nbsp;</div>
</div>
<div style="clear:both;height:0;line-height:0">&nbsp;</div>
</div>
{if $display_footer}
{hook h="displayBackOfficeFooter"}
<div id="footer">
<div class="footerLeft">
<a href="http://www.prestashop.com/" target="_blank">PrestaShop&trade; {$ps_version}</a><br />
<span>{l s='Load time: '}{number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
</div>
{if $display_footer}
{hook h="displayBackOfficeFooter"}
<div id="footer">
<div class="footerLeft">
<a href="http://www.prestashop.com/" target="_blank">PrestaShop&trade; {$ps_version}</a><br />
<span>{l s='Load time: '}{number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
</div>
<div class="footerRight">
{if $iso_is_fr}
<span>Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h &agrave; 18h
{/if}
|&nbsp;<a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a>
|&nbsp;<a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|&nbsp;<a href="http://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
</div>
<div class="footerRight">
{if $iso_is_fr}
<span>Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h &agrave; 18h
{/if}
|&nbsp;<a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a>
|&nbsp;<a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a>
|&nbsp;<a href="http://www.prestashop.com/forums/" target="_blank" class="footer_link">{l s='Forum'}</a>
</div>
</div>
</div>
<div id="ajax_confirmation" style="display:none"></div>
{* ajaxBox allows*}
<div id="ajaxBox" style="display:none"></div>
{/if}
<div id="scrollTop"><a href="#top"></a></div>
</body>
</html>
</div>
<div id="ajax_confirmation" style="display:none"></div>
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
{/if}
<div id="scrollTop"><a href="#top"></a></div>
</body>
</html>
+34 -46
View File
@@ -82,7 +82,6 @@
<script type="text/javascript" src="{$js_uri}"></script>
{/foreach}
{/if}
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_dir}favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="{$img_dir}favicon.ico" />
{if isset($displayBackOfficeHeader)}
@@ -91,16 +90,15 @@
<!--[if IE]>
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
<![endif]-->
{if isset($brightness)}
{if isset($brightness)}
<style type="text/css">
div#header_infos, div#header_infos a#header_shopname, div#header_infos a#header_logout, div#header_infos a#header_foaccess {ldelim}color:{$brightness}{rdelim}
</style>
{/if}
{/if}
</head>
<body style="{if isset($bo_color) && $bo_color}background:{$bo_color};{/if}{if isset($bo_width) && $bo_width > 0}text-align:center;{/if}">
{if $display_header}
<div id="ajax_running"><img src="../img/admin/ajax-loader-yellow.gif" alt="" /> {l s='Loading...'}</div>
<div id="top_container" {if $bo_width > 0}style="margin:auto;width:{$bo_width}px"{/if}>
<div id="container">
{* begin HEADER *}
@@ -108,7 +106,7 @@
<div id="header_infos">
<a id="header_shopname" href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}"><span>{$shop_name}</span></a>
<div id="notifs_icon_wrapper">
{if {$show_new_orders} == 1}
{if {$show_new_orders} == 1}
<div id="orders_notif" class="notifs">
<span id="orders_notif_number_wrapper" class="number_wrapper">
<span id="orders_notif_value">0</span>
@@ -120,8 +118,8 @@
<p><a href="index.php?controller=AdminOrders&amp;token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a></p>
</div>
</div>
{/if}
{if ($show_new_customers == 1)}
{/if}
{if ($show_new_customers == 1)}
<div id="customers_notif" class="notifs notifs_alternate">
<span id="customers_notif_number_wrapper" class="number_wrapper">
<span id="customers_notif_value">0</span>
@@ -133,8 +131,8 @@
<p><a href="index.php?controller=AdminCustomers&amp;token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a></p>
</div>
</div>
{/if}
{if {$show_new_messages} == 1}
{/if}
{if {$show_new_messages} == 1}
<div id="customer_messages_notif" class="notifs">
<span id="customer_messages_notif_number_wrapper" class="number_wrapper">
<span id="customer_messages_notif_value">0</span>
@@ -146,9 +144,8 @@
<p><a href="index.php?tab=AdminCustomerThreads&amp;token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a></p>
</div>
</div>
{/if}
{/if}
</div>
<div id="employee_box">
<div id="employee_infos">
<div class="employee_name">{l s='Welcome,'} <strong>{$first_name}&nbsp;{$last_name}</strong></div>
@@ -157,14 +154,13 @@
<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>
{if {$base_url}}
<li class="separator">&nbsp;</li>
<a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
{/if}
{if {$base_url}}
<li class="separator">&nbsp;</li>
<a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
{/if}
</ul>
</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}" />
@@ -183,8 +179,7 @@
<input type="submit" id="bo_search_submit" class="button" value="{l s='Search'}"/>
</form>
</div>
{if count($quick_access) > 0}
{if count($quick_access) > 0}
<div id="header_quick">
<select onchange="quickSelect(this);" id="quick_select" class="chosen no-search">
<option value="0">{l s='Quick Access'}</option>
@@ -193,19 +188,15 @@
{/foreach}
</select>
</div>
{/if}
{if isset($displayBackOfficeTop)}
{$displayBackOfficeTop}
{/if}
{/if}
{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if}
</div>{* end header_infos*}
<ul id="menu">
{if !$tab}
<div class="mainsubtablist" style="display:none">
</div>
{/if}
{foreach $tabs AS $t}
{if $t.active}
{if !$tab}
<div class="mainsubtablist" style="display:none"></div>
{/if}
{foreach $tabs AS $t}
{if $t.active}
<li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
<a href="#" class="title">
<img src="{$t.img}" alt="" />{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}
@@ -218,23 +209,20 @@
{/foreach}
</ul>
</li>
{/if}
{/foreach}
{/if}
{/foreach}
</ul>
{/if}
</div>{* end header*}
</div>{* end header*}
{/if}
<div id="main">
<div id="content">
{if $display_header && $install_dir_exists}
<div style="background-color: #FFEBCC;border: 1px solid #F90;line-height: 20px;margin: 0px 0px 10px;padding: 10px 20px;">
{l s='For security reasons, you must also:'} {l s='delete the /install folder'}
</div>
{/if}
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
<div class="multishop_toolbar">
<span class="text_multishop">{l s='Multistore configuration for'}</span>
{$shop_list}
</div>
{/if}
{if $display_header && $install_dir_exists}
<div style="background-color: #FFEBCC;border: 1px solid #F90;line-height: 20px;margin: 0px 0px 10px;padding: 10px 20px;">
{l s='For security reasons, you must also:'}&nbsp;{l s='delete the /install folder'}
</div>
{/if}
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
<div class="multishop_toolbar">
<span class="text_multishop">{l s='Multistore configuration for'}</span> {$shop_list}
</div>
{/if}
+1 -5
View File
@@ -47,7 +47,6 @@
{/if}
</div>
{/if}
{if isset($informations) && count($informations) && $informations}
<div class="hint clear" style="display:block;">
<span id="see_more_infos">
@@ -60,7 +59,6 @@
</div>
</div><br />
{/if}
{if isset($confirmations) && count($confirmations) && $confirmations}
<div class="conf" style="display:block;">
{foreach $confirmations as $conf}
@@ -68,7 +66,6 @@
{/foreach}
</div><br />
{/if}
{if count($warnings)}
<div class="warn">
<span style="float:right">
@@ -94,6 +91,5 @@
{/if}
</div>
{/if}
{$page}
{include file='footer.tpl'}
{include file='footer.tpl'}
+1 -1
View File
@@ -276,7 +276,7 @@ class HookCore extends ObjectModel
{
$sql->where(Module::getPaypalIgnore());
if (Validate::isLoadedObject($context->country))
$sql->where('(h.name = "displayPayment" AND (SELECT id_country FROM '._DB_PREFIX_.'module_country mc WHERE mc.id_module = m.id_module AND id_country = '.(int)$context->country->id.' LIMIT 1) = '.(int)$context->country->id.')');
$sql->where('(h.name = "displayPayment" AND (SELECT id_country FROM '._DB_PREFIX_.'module_country mc WHERE mc.id_module = m.id_module AND id_country = '.(int)$context->country->id.' AND id_shop = '.(int)$context->shop->id.' LIMIT 1) = '.(int)$context->country->id.')');
if (Validate::isLoadedObject($context->currency))
$sql->where('(h.name = "displayPayment" AND (SELECT id_currency FROM '._DB_PREFIX_.'module_currency mcr WHERE mcr.id_module = m.id_module AND id_currency IN ('.(int)$context->currency->id.', -2) LIMIT 1) IN ('.(int)$context->currency->id.', -2))');
}
+3 -3
View File
@@ -1564,6 +1564,9 @@ class ToolsCore
fwrite($write_fd, "# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution\n");
fwrite($write_fd, "# http://www.prestashop.com - http://www.prestashop.com/forums\n\n");
if ($disable_modsec)
fwrite($write_fd, "<IfModule mod_security.c>\nSecFilterEngine Off\nSecFilterScanPOST Off\n</IfModule>\n");
// RewriteEngine
fwrite($write_fd, "<IfModule mod_rewrite.c>\n");
@@ -1571,9 +1574,6 @@ class ToolsCore
if ($disable_multiviews)
fwrite($write_fd, "\n# Disable Multiviews\nOptions -Multiviews\n\n");
if ($disable_modsec)
fwrite($write_fd, "<IfModule mod_security.c>\nSecFilterEngine Off\nSecFilterScanPOST Off\n</IfModule>");
fwrite($write_fd, "RewriteEngine on\n");
if (!$medias)
+1 -1
View File
@@ -129,7 +129,7 @@ class TranslateCore
static $translations_merged = array();
$name = $module instanceof Module ? $module->name : $module;
if (!isset($translations_merged[$name]))
if (!isset($translations_merged[$name]) && isset(Context::getContext()->language))
{
$filesByPriority = array(
// Translations in theme
+5 -6
View File
@@ -205,7 +205,6 @@ abstract class CacheCore
foreach ($this->keys as $k => $ttl)
if (preg_match('#^'.$pattern.'$#', $k))
$keys[] = $k;
}
// Delete keys
@@ -235,13 +234,13 @@ abstract class CacheCore
if (is_null($this->sql_tables_cached))
{
$this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME);
$this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME);
if (!is_array($this->sql_tables_cached))
$this->sql_tables_cached = array();
}
// Store query results in cache if this query is not already cached
$key = md5($query);
$key = md5(_COOKIE_IV_.$query);
if ($this->exists($key))
return true;
$this->set($key, $result);
@@ -251,7 +250,7 @@ abstract class CacheCore
foreach ($tables as $table)
if (!isset($this->sql_tables_cached[$table][$key]))
$this->sql_tables_cached[$table][$key] = true;
$this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached);
$this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached);
}
protected function getTables($string)
@@ -271,7 +270,7 @@ abstract class CacheCore
{
if (is_null($this->sql_tables_cached))
{
$this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME);
$this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME);
if (!is_array($this->sql_tables_cached))
$this->sql_tables_cached = array();
}
@@ -287,7 +286,7 @@ abstract class CacheCore
}
unset($this->sql_tables_cached[$table]);
}
$this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached);
$this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached);
}
/**
+11 -10
View File
@@ -443,7 +443,8 @@ class AdminControllerCore extends Controller
if (isset($_GET) && !empty($_GET) && isset($this->table))
foreach ($_GET as $key => $value)
if (stripos($key, $this->table.'OrderBy') === 0 || stripos($key, $this->table.'Orderway') === 0)
$this->context->cookie->$key = $value;
$this->context->cookie->{$prefix.$key} = $value;
$filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_');
foreach ($filters as $key => $value)
{
@@ -885,11 +886,11 @@ class AdminControllerCore extends Controller
if (isset($this->context->cookie->{'submitFilter'.$this->table}))
unset($this->context->cookie->{'submitFilter'.$this->table});
if (isset($this->context->cookie->{$this->table.'Orderby'}))
unset($this->context->cookie->{$this->table.'Orderby'});
if (isset($this->context->cookie->{$prefix.$this->table.'Orderby'}))
unset($this->context->cookie->{$prefix.$this->table.'Orderby'});
if (isset($this->context->cookie->{$this->table.'Orderway'}))
unset($this->context->cookie->{$this->table.'Orderway'});
if (isset($this->context->cookie->{$prefix.$this->table.'Orderway'}))
unset($this->context->cookie->{$prefix.$this->table.'Orderway'});
unset($_POST);
$this->_filter = false;
@@ -2045,11 +2046,11 @@ class AdminControllerCore extends Controller
if (!Validate::isTableOrIdentifier($this->table))
throw new PrestaShopException(sprintf('Table name %s is invalid:', $this->table));
$prefix = str_replace(array('admin', 'controller'), '', Tools::strtolower(get_class($this)));
if (empty($order_by))
{
if ($this->context->cookie->{$this->table.'Orderby'})
$order_by = $this->context->cookie->{$this->table.'Orderby'};
if ($this->context->cookie->{$prefix.$this->table.'Orderby'})
$order_by = $this->context->cookie->{$prefix.$this->table.'Orderby'};
elseif ($this->_orderBy)
$order_by = $this->_orderBy;
else
@@ -2058,8 +2059,8 @@ class AdminControllerCore extends Controller
if (empty($order_way))
{
if ($this->context->cookie->{$this->table.'Orderway'})
$order_way = $this->context->cookie->{$this->table.'Orderway'};
if ($this->context->cookie->{$prefix.$this->table.'Orderway'})
$order_way = $this->context->cookie->{$prefix.$this->table.'Orderway'};
elseif ($this->_orderWay)
$order_way = $this->_orderWay;
else
+7 -5
View File
@@ -139,8 +139,9 @@ abstract class ModuleCore
public function __construct($name = null, Context $context = null)
{
// Load context and smarty
$this->context = $context ? $context : Context::getContext();
$this->smarty = $this->context->smarty->createData($this->context->smarty);
$this->context = $context ? $context : Context::getContext();
if (is_object($this->context->smarty))
$this->smarty = $this->context->smarty->createData($this->context->smarty);
// If the module has no name we gave him its id as name
if ($this->name == null)
@@ -152,8 +153,9 @@ abstract class ModuleCore
// If cache is not generated, we generate it
if (self::$modules_cache == null && !is_array(self::$modules_cache))
{
// Join clause is done to check if the module is activated in current shop context
$sql_limit_shop = 'SELECT COUNT(*) FROM `'._DB_PREFIX_.'module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` = '.(int)Context::getContext()->shop->id;
// Join clause is done to check if the module is activated in current shop context
$sql_limit_shop = 'SELECT COUNT(*) FROM `'._DB_PREFIX_.'module_shop` ms WHERE m.`id_module` = ms.`id_module` AND ms.`id_shop` = '.((is_object(Context::getContext()->shop) && $id = (int)Context::getContext()->shop->id) ? $id : 1);
$sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m';
// Result is cached
@@ -1595,7 +1597,7 @@ abstract class ModuleCore
{
if ($name === null)
$name = $this->name;
return $name.'|'.(int)$this->context->shop->id.'_'.(int)Group::getCurrent()->id.'_'.(int)$this->context->language->id;
return $name.'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id;
}
public function display($file, $template, $cacheId = null, $compileId = null)
+18 -8
View File
@@ -117,20 +117,30 @@ class OrderHistoryCore extends ObjectModel
{
$assign[$key]['name'] = $product_download->display_filename;
$dl_link = $product_download->getTextLink(false, $virtual_product['download_hash'])
.'&id_order='.$order->id
.'&id_order='.(int)$order->id
.'&secure_key='.$order->secure_key;
$assign[$key]['link'] = $dl_link;
if ($virtual_product['download_deadline'] != '0000-00-00 00:00:00')
$assign[$key]['deadline'] = Tools::displayDate($virtual_product['download_deadline'], $order->id_lang);
if ($virtual_product['date_expiration'] != '0000-00-00 00:00:00')
$assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration '], $order->id_lang);
if ($product_download->nb_downloadable != 0)
$assign[$key]['downloadable'] = $product_download->nb_downloadable;
$assign[$key]['downloadable'] = (int)$product_download->nb_downloadable;
}
}
$customer = new Customer((int)$order->id_customer);
$context->smarty->assign('virtualProducts', $assign);
$context->smarty->assign('id_order', $order->id);
$iso = Language::getIsoById((int)($order->id_lang));
$links = $context->smarty->fetch(_PS_MAIL_DIR_.$iso.'/download-product.tpl');
$links = '<ul>';
foreach($assign as $product)
{
$links .= '<li>';
$links .= '<a href="'.$product['link'].'">'.Tools::htmlentitiesUTF8($product['name']).'</a>';
if (isset($product['deadline']))
$links .= '&nbsp;'.Tools::htmlentitiesUTF8(Tools::displayError('expires on')).'&nbsp;'.$product['deadline'];
if (isset($product['downloadable']))
$links .= '&nbsp;'.Tools::htmlentitiesUTF8(sprintf(Tools::displayError('downloadable %d time(s)'), (int)$product['downloadable']));
$links .= '</li>';
}
$links .= '<ul>';
$data = array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
+2
View File
@@ -32,6 +32,8 @@ global $smarty;
$smarty = new Smarty();
$smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile');
$smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache');
if (!Tools::getSafeModeStatus())
$smarty->use_sub_dirs = true;
$smarty->setConfigDir(_PS_SMARTY_DIR_.'configs');
$smarty->caching = false;
$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false;
@@ -542,9 +542,14 @@ class AdminCategoriesControllerCore extends AdminController
{
$id_category = (int)Tools::getValue('id_category');
$id_parent = (int)Tools::getValue('id_parent');
// if true, we are in a root category creation
if (!$id_parent && !Tools::isSubmit('is_root_category'))
$_POST['is_root_category'] = $_POST['level_depth'] = $_POST['id_parent'] = $id_parent = 1;
{
$_POST['is_root_category'] = $_POST['level_depth'] = 1;
$_POST['id_parent'] = $id_parent = (int)Configuration::get('PS_ROOT_CATEGORY');
}
if ($id_category)
{
if ($id_category != $id_parent)
+10 -5
View File
@@ -70,18 +70,23 @@ class AdminLoginControllerCore extends AdminController
if (file_exists(_PS_ADMIN_DIR_.'/../install'))
$this->context->smarty->assign('wrong_install_name', true);
if (file_exists(_PS_ADMIN_DIR_.'/../admin'))
if (basename(_PS_ADMIN_DIR_) == 'admin' && file_exists(_PS_ADMIN_DIR_.'/../admin/'))
{
$rand = sprintf('%04d', rand(0, 9999));
if (@rename(_PS_ADMIN_DIR_.'/../admin', _PS_ADMIN_DIR_.'/../admin'.$rand))
Tools::redirectAdmin('../admin'.$rand);
$rand = 'admin'.sprintf('%04d', rand(0, 9999)).'/';
if (@rename(_PS_ADMIN_DIR_.'/../admin/', _PS_ADMIN_DIR_.'/../'.$rand))
Tools::redirectAdmin('../'.$rand);
else
$this->context->smarty->assign(array(
'wrong_folder_name' => true
));
}
else
$rand = basename(_PS_ADMIN_DIR_).'/';
$this->context->smarty->assign(array(
'randomNb' => rand(0, 9999)
'randomNb' => $rand,
'adminUrl' => Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.$rand
));
// Redirect to admin panel
+4 -3
View File
@@ -568,9 +568,9 @@ class AdminOrdersControllerCore extends AdminController
{
if ($this->tabAccess['delete'] === '1')
{
if (!Tools::isSubmit('id_order_detail'))
if (!Tools::isSubmit('id_order_detail') && !Tools::isSubmit('id_customization'))
$this->errors[] = Tools::displayError('You must select a product.');
elseif (!Tools::isSubmit('cancelQuantity'))
elseif (!Tools::isSubmit('cancelQuantity') && !Tools::isSubmit('cancelCustomizationQuantity'))
$this->errors[] = Tools::displayError('You must enter a quantity.');
else
{
@@ -597,7 +597,8 @@ class AdminOrdersControllerCore extends AdminController
foreach ($customizationList as $key => $id_order_detail)
{
$full_product_list[(int)$id_order_detail] = $id_order_detail;
$full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
if (isset($customizationQtyList[$key]))
$full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
}
if ($productList || $customizationList)
@@ -586,7 +586,6 @@ class AdminTranslationsControllerCore extends AdminController
{
// Get instance of this tab by class name
$tab = Tab::getInstanceFromClassName($class_name);
//Check if class name exists
if (isset($tab->class_name) && !empty($tab->class_name))
{
@@ -1331,17 +1330,11 @@ class AdminTranslationsControllerCore extends AdminController
{
if ($this->tabAccess['edit'] === '1')
{
// Get a good path for module directory
if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
else
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
// Get list of modules
if ($modules = $this->getListModules())
{
// Get files of all modules
$arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
$arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true);
// Find and write all translation modules files
foreach ($arr_files as $value)
@@ -1882,24 +1875,10 @@ class AdminTranslationsControllerCore extends AdminController
throw new PrestaShopException(Tools::displayError('The module directory must be writable.'));
$modules = array();
if (!_PS_MODE_DEV_ && $this->theme_selected == self::DEFAULT_THEME_NAME)
{
// Get all module which are installed for to have a minimum of POST
$modules = Module::getModulesInstalled();
foreach ($modules as &$module)
$module = $module['name'];
}
else if ($this->theme_selected == self::DEFAULT_THEME_NAME)
if (Tools::file_exists_cache($this->translations_informations['modules']['dir']))
$modules = scandir($this->translations_informations['modules']['dir']);
else
$this->displayWarning(Tools::displayError('There are no active modules in this copy of PrestaShop. Please use the Modules page to activate, or visit the PrestaShop Addons Store to download them.'));
else
if (Tools::file_exists_cache($this->translations_informations['modules']['override']['dir']))
$modules = scandir($this->translations_informations['modules']['override']['dir']);
else
$this->displayWarning(Tools::displayError('There are no active modules in this copy of PrestaShop. Please use the Modules page to activate, or visit the PrestaShop Addons Store to download them.'));
// Get all module which are installed for to have a minimum of POST
$modules = Module::getModulesInstalled();
foreach ($modules as &$module)
$module = $module['name'];
return $modules;
}
@@ -2539,12 +2518,30 @@ class AdminTranslationsControllerCore extends AdminController
* @param boolean $is_default set it if modules are located in root/prestashop/modules folder
* This allow to distinguish overrided prestashop theme and original module
*/
protected function getAllModuleFiles($modules, $root_dir, $lang, $is_default = false)
protected function getAllModuleFiles($modules, $root_dir = null, $lang, $is_default = false)
{
$array_files = array();
$initial_root_dir = $root_dir;
foreach ($modules as $module)
{
if ($module{0} != '.' && is_dir($root_dir.$module))
$root_dir = $initial_root_dir;
if ($module{0} == '.')
continue;
// Get path of directory for find a good path of translation file
if ($root_dir == null)
{
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
if (is_dir($i18n_dir.$module))
$root_dir = $i18n_dir;
}
if ($root_dir == null)
{
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
if (is_dir($i18n_dir.$module))
$root_dir = $i18n_dir;
}
if (is_dir($root_dir.$module))
{
if (Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php'))
$lang_file = $root_dir.$module.'/translations/'.$lang.'.php';
@@ -2564,20 +2561,13 @@ class AdminTranslationsControllerCore extends AdminController
*/
public function initFormModules()
{
// Get path of directory for find a good path of translation file
if ($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_)
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
else
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
// Get list of modules
$modules = $this->getListModules();
if (!empty($modules))
{
// Get all modules files and include all translation files
$arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
$arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true);
foreach ($arr_files as $value)
$this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir']);
-1
View File
@@ -763,7 +763,6 @@ tr.deleted td {
}
.row {
background: #F4E6C9 url(../img/admin/news-bg.gif) repeat-x top left;
}
.uppercase {
+1 -1
View File
@@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA
*/
define('_PS_INSTALL_VERSION_', '1.5.4.0');
define('_PS_INSTALL_VERSION_', '1.5.4.1');
+1 -1
View File
@@ -75,7 +75,7 @@ var process_steps = <?php echo Tools::jsonEncode($this->process_steps) ?>;
</div>
<?php if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
<iframe src="http://addons.prestashop.com/psinstall.php?version=2&lang=<?php echo $this->language->getLanguageIso() ?>&email=<?php echo $this->session->admin_email ?>&activity=<?php echo $this->session->shop_activity ?>" scrolling="no" id="prestastore">
<iframe src="http://addons.prestashop.com/psinstall.php?version=2&lang=<?php echo $this->language->getLanguageIso() ?>&email=<?php echo $this->session->admin_email ?>&activity=<?php echo $this->session->shop_activity ?>&country=<?php echo $this->session->shop_country ?>" scrolling="no" id="prestastore">
<p>Your browser does not support iframes.</p>
</iframe>
<?php endif; ?>
@@ -31,6 +31,7 @@
function update_mailalerts_add_column_idshop()
{
$installed = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "mailalerts"');
$installed &= Db::getInstance()->getValue('SHOW TABLES LIKE "'._DB_PREFIX_.'mailalert_customer_oos"');
if ($installed && !Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`'))
return array('error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance ()->getMsgError()));
return true;
+22
View File
@@ -246,6 +246,28 @@ if(!defined('_PS_CACHE_ENABLED_'))
define('_PS_CACHE_ENABLED_', '0');
if(!defined('_MYSQL_ENGINE_'))
define('_MYSQL_ENGINE_', 'MyISAM');
global $smarty;
// Clean all cache values
Cache::clean('*');
Context::getContext()->shop = new Shop(1);
Shop::setContext(Shop::CONTEXT_SHOP, 1);
Configuration::loadConfiguration();
if (!isset(Context::getContext()->language) || !Validate::isLoadedObject(Context::getContext()->language))
if ($id_lang = (int)Configuration::get('PS_LANG_DEFAULT'))
Context::getContext()->language = new Language($id_lang);
if (!isset(Context::getContext()->country) || !Validate::isLoadedObject(Context::getContext()->country))
if ($id_country = (int)Configuration::get('PS_COUNTRY_DEFAULT'))
Context::getContext()->country = new Country((int)$id_country);
Context::getContext()->cart = new Cart();
Context::getContext()->employee = new Employee(1);
if (!defined('_PS_SMARTY_FAST_LOAD_'))
define('_PS_SMARTY_FAST_LOAD_', true);
require_once _PS_ROOT_DIR_.'/config/smarty.config.inc.php';
Context::getContext()->smarty = $smarty;
if(isset($_GET['customModule']) AND $_GET['customModule'] == 'desactivate')
{
+1 -1
View File
@@ -227,7 +227,7 @@ class BlockCategories extends Module
$id_product = (int)Tools::getValue('id_product', 0);
$id_category = (int)Tools::getValue('id_category', 0);
$id_lang = (int)$this->context->language->id;
return 'blockcategories|'.$this->context->shop->id.'_'.$groups.'_'.$id_lang.'_'.$id_product.'_'.$id_category;
return 'blockcategories|'.$this->context->shop->id.'|'.$groups.'|'.$id_lang.'|'.$id_product.'|'.$id_category;
}
public function hookFooter($params)
+1 -1
View File
@@ -121,7 +121,7 @@ public function hookDisplayMobileHeader($params)
protected function getCacheId($name = null)
{
$cache_id = parent::getCacheId($name);
return $cache_id.'_'.(int)Tools::usingSecureMode();
return $cache_id.'|'.(int)Tools::usingSecureMode();
}
}
+1 -1
View File
@@ -717,7 +717,7 @@ class Blocktopmenu extends Module
{
parent::getCacheId($name);
$page_name = in_array($this->page_name, array('category', 'supplier', 'manufacturer', 'cms', 'product')) ? $this->page_name : 'index';
return 'blocktopmenu|'.$page_name.'-'.(int)$this->context->shop->id.'-'.implode(', ',$this->user_groups).'-'.(int)$this->context->language->id.'-'.(int)Tools::getValue('id_category').'-'.(int)Tools::getValue('id_manufacturer').'-'.(int)Tools::getValue('id_supplier').'-'.(int)Tools::getValue('id_cms').'-'.(int)Tools::getValue('id_product');
return 'blocktopmenu|'.$page_name.'|'.(int)$this->context->shop->id.'|'.implode(', ',$this->user_groups).'|'.(int)$this->context->language->id.'|'.(int)Tools::getValue('id_category').'|'.(int)Tools::getValue('id_manufacturer').'|'.(int)Tools::getValue('id_supplier').'|'.(int)Tools::getValue('id_cms').'|'.(int)Tools::getValue('id_product');
}
public function hookDisplayTop($param)
+6 -6
View File
@@ -103,16 +103,16 @@ class BlockViewed extends Module
$productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT image_shop.id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').')
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'.
Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
'.Shop::addSqlAssociation('product', 'p').'
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').')
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product)'.
Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = i.id_image)
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').')
WHERE p.id_product IN ('.$productIds.')
AND (i.id_image IS NULL OR image_shop.id_shop='.(int)$this->context->shop->id.')
AND pl.id_lang = '.(int)($params['cookie']->id_lang).'
AND cl.id_lang = '.(int)($params['cookie']->id_lang)
AND cl.id_lang = '.(int)($params['cookie']->id_lang).'
GROUP BY product_shop.id_product'
);
$productsImagesArray = array();
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+4 -1
View File
@@ -190,7 +190,10 @@
<!-- CART RULES -->
{assign var="shipping_discount_tax_incl" value="0"}
{foreach $cart_rules as $cart_rule}
{cycle values='#FFF,#DDD' assign=bgcolor}
{if $cart_rule.free_shipping}
{assign var="shipping_discount_tax_incl" value=$order_invoice->total_shipping_tax_incl}
{/if}
{cycle values='#FFF,#DDD' assign=bgcolor}
<tr style="line-height:6px;background-color:{$bgcolor}" text-align="left">
<td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td>
<td>
+9 -7
View File
@@ -102,14 +102,16 @@ $(function(){ldelim}
<label for="company">{l s='Company'}</label>
<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company}{/if}{/if}" />
</p>
<div id="vat_area">
<div id="vat_number">
<p class="text">
<label for="vat_number">{l s='VAT number'}</label>
<input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number}{/if}{/if}" />
</p>
{/if}
{if $field_name eq 'vat_number'}
<div id="vat_area">
<div id="vat_number">
<p class="text">
<label for="vat_number">{l s='VAT number'}</label>
<input type="text" class="text" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number}{/if}{/if}" />
</p>
</div>
</div>
</div>
{/if}
{if $field_name eq 'firstname'}
<p class="required text">
+1 -1
View File
@@ -103,7 +103,7 @@ p em {font-style:italic}
padding:10px;
border:1px solid #5cff74;
font-size:13px;
background: #d3ffab
background: #d3ffab;
}
.error {
margin:0 0 10px 0;
+2 -3
View File
@@ -22,11 +22,10 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="{$lang_iso}"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang_iso}">
<head>
+4 -13
View File
@@ -23,16 +23,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if !empty($display_header)}
{include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER}
{/if}
{if !empty($template)}
{$template}
{/if}
{if !empty($display_footer)}
{include file='./footer.tpl'}
{/if}
{if !empty($live_edit)}
{$live_edit}
{/if}
{if !empty($display_header)}{include file='./header.tpl' HOOK_HEADER=$HOOK_HEADER}{/if}
{if !empty($template)}{$template}{/if}
{if !empty($display_footer)}{include file='./footer.tpl'}{/if}
{if !empty($live_edit)}{$live_edit}{/if}