Compare commits

..
19 Commits
Author SHA1 Message Date
François Gaillard e3d9613abf // Development branch merged 2013-03-27 10:43:43 +01:00
Damien Metzger 1d03f35748 Merge pull request #267 from dSkrbic/patch-1
// translations
2013-02-27 00:48:46 -08:00
dSkrbic 808fec8f4c // translations 2013-02-11 18:42:50 +01:00
Damien Metzger 3310d7582c // Fix upgrade 2012-12-31 15:17:35 +01:00
Damien Metzger 15b26ee239 // Changelog, readme and install_version.php 2012-12-31 14:37:29 +01:00
Rémi Gaillard 92a64c0c76 // oups.... 2012-12-31 13:52:28 +01:00
Rémi Gaillard 17aed56146 // small fix 2012-12-31 13:52:28 +01:00
Rémi Gaillard 7744068783 [-] FO: Fix retrocompatibility for modules and old themes 2012-12-31 13:52:27 +01:00
Damien Metzger 41798f3d8b // Just to be sure... 2012-12-31 13:52:27 +01:00
Damien Metzger 03101f3bab [-] BO : fixed accentuated URLs in products 2012-12-31 13:52:27 +01:00
PrestaEdit 1986ed9fef [-] Project: Fix bug when you want to upload (and resize) an image 2012-12-31 13:52:26 +01:00
Damien Metzger a18eb5bebe // Missing part of a fix 2012-12-31 13:52:26 +01:00
Rémi Gaillard 23ecbcbeaa [-] FO: Fix PHP warning on category controller 2012-12-31 13:52:15 +01:00
Rémi Gaillard 2903ab096a [-] Installer: Fix #PSCFV-6392 redirect_type was missing on upgrade 2012-12-31 13:52:15 +01:00
vAugagneur d571f91e74 Merge branch 'release' 2012-12-28 16:16:40 +01:00
vAugagneur 5cfd0c6f9a Merge branch 'release' 2012-12-28 10:40:40 +01:00
vAugagneur e36548ad3c //updated CONTRIBUTING.md & CONTRIBUTORS.md thanks to @all 2012-11-30 10:56:18 +01:00
François Gaillard 4f269e87a4 // .DS_Store files added to .gitignore 2012-11-26 11:21:23 +01:00
vAugagneur 3eebb2d620 //added CONTRIBUTING.md CONTRIBUTORS.md README.md 2012-11-22 14:57:18 +01:00
214 changed files with 2251 additions and 2878 deletions
-6
View File
@@ -29,10 +29,4 @@ themes/default/cache/*.js
themes/default/cache/*.css themes/default/cache/*.css
modules/*/translations/*.php modules/*/translations/*.php
!modules/*/translations/index.php !modules/*/translations/index.php
mails/*
!mails/en
modules/*/mails/*
!modules/*/mails/en
translations/*
!translations/*.gzip
+1 -1
View File
@@ -23,7 +23,7 @@
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
require_once(dirname(__FILE__).'/../images.inc.php');
function bindDatepicker($id, $time) function bindDatepicker($id, $time)
{ {
if ($time) if ($time)
+1 -5
View File
@@ -664,8 +664,4 @@ ul.listForm li {padding-bottom:3px;}
/******** CREATE AN ORDER **************/ /******** CREATE AN ORDER **************/
#carrier_form label{padding-top:0} #carrier_form label{padding-top:0}
#carrier_form input{margin-top:3px} #carrier_form input{margin-top:3px}
/************** SCENE *****************/
#large_scene_image{clear:both;border:1px solid transparent;}
@@ -27,7 +27,7 @@
{block name="label"} {block name="label"}
{if $input.type == 'color'} {if $input.type == 'color'}
<div id="colorAttributeProperties" style="display:{if $colorAttributeProperties}block{else}none{/if};"> <div id="colorAttributeProperties" style="display:{if $colorAttributeProperties}block{else}none{/if}";>
{/if} {/if}
{$smarty.block.parent} {$smarty.block.parent}
{/block} {/block}
@@ -207,12 +207,12 @@
<br /> <br />
<input type="checkbox" id="product_restriction" name="product_restriction" value="1" {if $product_rule_groups|@count}checked="checked"{/if} /> <strong>{l s='Product selection'}</strong> <input type="checkbox" id="product_restriction" name="product_restriction" value="1" {if $product_rule_groups|@count}checked="checked"{/if} /> <strong>{l s='Product selection'}</strong>
<div id="product_restriction_div"> <div id="product_restriction_div">
<table id="product_rule_group_table" style="border:1px solid #AAAAAA;margin:10px 0 10px 0;padding:10px 10px 10px 10px;background-color:#FFF5D3;width:600px;display:none" cellpadding="0" cellspacing="0"> <table id="product_rule_group_table" style="border:1px solid #AAAAAA;margin:10px 0 10px 0;padding:10px 10px 10px 10px;background-color:#FFF5D3;width:600px" cellpadding="0" cellspacing="0">
{foreach from=$product_rule_groups item='product_rule_group'} {foreach from=$product_rule_groups item='product_rule_group'}
{$product_rule_group} {$product_rule_group}
{/foreach} {/foreach}
</table> </table>
<a href="javascript:addProductRuleGroup();" style="margin-top:5px;display:block"> <a href="javascript:addProductRuleGroup();">
<img src="../img/admin/add.gif" alt="{l s='Add'}" title="{l s='Add'}" /> {l s='Product selection'} <img src="../img/admin/add.gif" alt="{l s='Add'}" title="{l s='Add'}" /> {l s='Product selection'}
</a> </a>
</div> </div>
@@ -25,7 +25,6 @@
function addProductRuleGroup() function addProductRuleGroup()
{ {
$('#product_rule_group_table').show();
product_rule_groups_counter += 1; product_rule_groups_counter += 1;
product_rule_counters[product_rule_groups_counter] = 0; product_rule_counters[product_rule_groups_counter] = 0;
@@ -85,13 +84,6 @@ function addCartRuleOption(item)
function updateProductRuleShortDescription(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 id1 = $(item).attr('id').replace('_add', '').replace('_remove', '');
var id2 = id1.replace('_select', ''); var id2 = id1.replace('_select', '');
var length = $('#' + id1 + '_2 option').length; var length = $('#' + id1 + '_2 option').length;
@@ -76,7 +76,7 @@
</form> </form>
{/if} {/if}
{if isset($display_move) && $display_move} {if isset($display_move)}
<br /><h2 class="space">{l s='Move images'}</h2> <br /><h2 class="space">{l s='Move images'}</h2>
{l s='PrestaShop now uses a new storage system for product images. It offers better performance if your shop has a large number of products.'}<br /> {l s='PrestaShop now uses a new storage system for product images. It offers better performance if your shop has a large number of products.'}<br />
<br /> <br />
@@ -22,79 +22,91 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<script type="text/javascript"> <script type="text/javascript">
var there_are = '{l s='There are'}'; var there_are = '{l s='There are'}';
var there_is = '{l s='There is'}'; var there_is = '{l s='There is'}';
var label_errors = '{l s='errors'}'; var label_errors = '{l s='errors'}';
var label_error = '{l s='error'}'; var label_error = '{l s='error'}';
</script> </script>
<div id="container">
<div id="error" {if !isset($errors)}class="hide"{/if}> <div id="container">
{if isset($errors)} <div id="error" {if !isset($errors)}class="hide"{/if}>
<h3>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</h3> {if isset($errors)}
<ol style="margin: 0 0 0 20px;"> <h3>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</h3>
{foreach from=$errors item="error"} <ol style="margin: 0 0 0 20px;">
<li>{$error}</li> {foreach from=$errors item="error"}
{/foreach} <li>{$error}</li>
</ol> {/foreach}
{/if} </ol>
</div> {/if}
<br /> </div>
{if isset($warningSslMessage)} <br />
<div class="warn">{$warningSslMessage}</div> {if isset($warningSslMessage)}
{/if} <div class="warn">
<div id="login"> {$warningSslMessage}
<h1>{$shop_name}</h1> </div>
{if !isset($wrong_folder_name) && !isset($wrong_install_name)} {/if}
<form action="#" id="login_form" method="post"> <div id="login">
<div class="field"> <h1>{$shop_name}</h1>
<label for="email">{l s='Email address:'}</label> {if !isset($wrong_folder_name) && !isset($wrong_install_name)}
<input type="text" id="email" name="email" class="input email_field" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" /> <form action="#" id="login_form" method="post">
</div> <div class="field">
<div class="field"> <label for="email">{l s='Email address:'}</label>
<label for="passwd">{l s='Password:'}</label> <input type="text" id="email" name="email" class="input email_field" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" />
<input id="passwd" type="password" name="passwd" class="input password_field" value="{if isset($password)}{$password}{/if}"/> </div>
</div>
<div class="field"> <div class="field">
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" /> <label for="passwd">{l s='Password:'}</label>
<p class="fl no-margin hide ajax-loader"> <input id="passwd" type="password" name="passwd" class="input password_field" value="{if isset($password)}{$password}{/if}"/>
<img src="../img/loader.gif" alt="" /> </div>
</p>
<p class="fr no-margin"> <div class="field">
<a href="#" class="show-forgot-password">{l s='Lost password?'}</a> <input type="submit" name="submitLogin" value="{l s='Log in'}" class="button fl margin-right-5" />
</p>
<div class="clear"></div> <p class="fl no-margin hide ajax-loader">
</div> <img src="../img/loader.gif" alt="" />
<input type="hidden" name="redirect" id="redirect" value="{$redirect}"/> </p>
</form>
<form action="#" id="forgot_password_form" method="post" class="hide"> <p class="fr no-margin">
<h2 class="no-margin">{l s='Forgot your password?'}</h2> <a href="#" class="show-forgot-password">{l s='Lost password?'}</a>
<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> </p>
<div class="field"> <div class="clear"></div>
<label>{l s='Email address:'}</label> </div>
<input type="text" name="email_forgot" id="email_forgot" class="input email_field" /> <input type="hidden" name="redirect" id="redirect" value="{$redirect}"/>
</div> </form>
<div class="field">
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" /> <form action="#" id="forgot_password_form" method="post" class="hide">
<p class="fl no-margin hide ajax-loader"> <h2 class="no-margin">{l s='Forgot your password?'}</h2>
<img src="../img/loader.gif" alt="" /> <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>
</p>
<p class="fr no-margin"> <div class="field">
<a href="#" class="show-login-form">{l s='Back to login'}</a> <label>{l s='Email address:'}</label>
</p> <input type="text" name="email_forgot" id="email_forgot" class="input email_field" />
<div class="clear"></div> </div>
</div>
</form> <div class="field">
{else} <input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
<div class="padding-30">
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p> <p class="fl no-margin hide ajax-loader">
<ul> <img src="../img/loader.gif" alt="" />
{if isset($wrong_install_name) && $wrong_install_name == true}<li>{l s='deleted the /install folder'}</li>{/if} </p>
{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 class="fr no-margin">
<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> <a href="#" class="show-login-form">{l s='Back to login'}</a>
</div> </p>
{/if} <div class="clear"></div>
</div> </div>
<h2><a href="http://www.prestashop.com">&copy; 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2> </form>
</div> {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>
@@ -321,46 +321,6 @@
catch(e){} catch(e){}
return false; return false;
}); });
$('.toggle_favorite').live('click', function(event)
{
var el = $(this);
var value_pref = el.data('value');
var module_pref = el.data('module');
var action_pref = 'f';
try
{
resAjax = $.ajax({
type:"POST",
url : ajaxCurrentIndex,
async: true,
data : {
ajax : "1",
token : token,
controller : "AdminModules",
action : "saveFavoritePreferences",
action_pref : action_pref,
module_pref : module_pref,
value_pref : value_pref
},
success : function(data)
{
// res.status = cache or refresh
if (data == 'OK')
{
el.parent('div').find('.toggle_favorite').toggle();
}
},
error: function(res,textStatus,jqXHR)
{
//jAlert("TECHNICAL ERROR"+res);
}
});
}
catch(e){}
return false;
});
}); });
{/literal} {/literal}
@@ -79,18 +79,7 @@
<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else}&nbsp;{/if}</p> <p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else}&nbsp;{/if}</p>
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if} {if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
<div class="row-actions-module"> <div class="row-actions-module">
{if !isset($module->not_on_disk)} {if !isset($module->not_on_disk)}{$module->optionsHtml}{else}&nbsp;{/if}
{$module->optionsHtml}
{if isset($module->preferences) && $module->preferences['favorite'] == 1}
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">{l s='Remove from Favorites'}</a>
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">{l s='Mark as Favorite'}</a>
{else}
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">{l s='Remove from Favorites'}</a>
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">{l s='Mark as Favorite'}</a>
{/if}
{else}
&nbsp;
{/if}
</div> </div>
</div> </div>
</td> </td>
@@ -26,16 +26,7 @@
<div id="productBox"> <div id="productBox">
{include file='controllers/modules/header.tpl'} {include file='controllers/modules/header.tpl'}
{include file='controllers/modules/filters.tpl'} {include file='controllers/modules/filters.tpl'}
{if $upgrade_available|@count}
<div class="hint" style="display:block;">
{l s='An upgrade is available for some of your modules!'}
<ul>
{foreach from=$upgrade_available item='module'}
<li> &raquo; <a href="{$currentIndex|escape:htmlall}&token={$token|escape:htmlall}&anchor=anchor{$module.anchor|escape:htmlall}"><b>{$module.name|escape:htmlall}</b></a></li>
{/foreach}
</ul>
</div>
{/if}
<ul class="view-modules"> <ul class="view-modules">
<li class="button normal-view-disabled"><img src="themes/default/img/modules_view_layout_sidebar.png" alt="{l s='Normal view'}" border="0" /><span>{l s='Normal view'}</span></li> <li class="button normal-view-disabled"><img src="themes/default/img/modules_view_layout_sidebar.png" alt="{l s='Normal view'}" border="0" /><span>{l s='Normal view'}</span></li>
<li class="button favorites-view"><a href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}&select=favorites"><img src="themes/default/img/modules_view_table_select_row.png" alt="{l s='Favorites view'}" border="0" /><span>{l s='Favorites view'}</span></a></li> <li class="button favorites-view"><a href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}&select=favorites"><img src="themes/default/img/modules_view_table_select_row.png" alt="{l s='Favorites view'}" border="0" /><span>{l s='Favorites view'}</span></a></li>
@@ -66,7 +66,7 @@
{else if !isset($module->not_on_disk)} {else if !isset($module->not_on_disk)}
{$module->optionsHtml} {$module->optionsHtml}
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">{l s='Submit'}</a> <a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">Valider</a>
{else} {else}
<a href="{$module->options.install_url}" class="button">{l s='Install'}</a> <a href="{$module->options.install_url}" class="button">{l s='Install'}</a>
{/if} {/if}
@@ -22,23 +22,22 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{if $product['customizedDatas']} {if $product.customizedDatas}
<tr class="customized customized-{$product['id_order_detail']|intval}"> <tr class="customized customized-{$product.id_order_detail}">
<td align="center"> <input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" /> <td align="center">{if isset($product.image) && $product.image->id}{$product.image_tag}{else}--{/if}</td>
{if isset($product['image']) && $product['image']->id|intval}{$product['image_tag']}{else}--{/if}</td>
<td> <td>
<a href="index.php?controller=adminproducts&id_product={$product['product_id']|intval}&updateproduct&token={getAdminToken tab='AdminProducts'}"> <a href="index.php?controller=adminproducts&id_product={$product['product_id']}&updateproduct&token={getAdminToken tab='AdminProducts'}">
<span class="productName">{$product['product_name']} - {l s='Customized'}</span><br /> <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_reference'])}{l s='Ref:'} {$product['product_reference']}<br />{/if}
{if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if} {if ($product['product_supplier_reference'])}{l s='Ref Supplier:'} {$product['product_supplier_reference']}{/if}
</a> </a>
</td> </td>
<td align="center"> <td align="center">
<span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id|intval}</span> <span class="product_price_show">{displayPrice price=$product['product_price_wt'] currency=$currency->id}</span>
{if $can_edit} {if $can_edit}
<span class="product_price_edit" style="display:none;"> <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']|intval}" /> <input type="hidden" name="product_id_order_detail" class="edit_product_id_order_detail" value="{$product['id_order_detail']}" />
{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_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.'} {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> </span>
@@ -50,37 +49,32 @@
{if $stock_management}<td align="center" class=""> - </td>{/if} {if $stock_management}<td align="center" class=""> - </td>{/if}
<td align="center" class="total_product"> <td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
{else} {else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price_wt'] * $product['customizationQuantityTotal'], 2) currency=$currency->id}
{/if} {/if}
</td> </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="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="partial_refund_fields current-edit" style="text-align:left;display:none"></td>
{if ($can_edit && !$order->hasBeenDelivered())} <td class="product_action" style="text-align:right">
<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>
<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;" />
<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="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>
<a href="#" class="delete_product_line"><img src="../img/admin/delete.gif" alt="{l s='Delete'}" /></a> </td>
</td>
{/if}
</tr> </tr>
{foreach $product['customizedDatas'] as $customizationPerAddress} {foreach $product.customizedDatas as $customizationPerAddress}
{foreach $customizationPerAddress as $customizationId => $customization} {foreach $customizationPerAddress as $customizationId => $customization}
<tr class="customized customized-{$product['id_order_detail']|intval}"> <tr class="customized customized-{$product.id_order_detail}">
<input type="hidden" class="edit_product_id_order_detail" value="{$product.id_order_detail}" />
<td colspan="2"> <td colspan="2">
<input type="hidden" class="edit_product_id_order_detail" value="{$product['id_order_detail']|intval}" />
{foreach $customization.datas as $type => $datas} {foreach $customization.datas as $type => $datas}
{if ($type == Product::CUSTOMIZE_FILE)} {if ($type == Product::CUSTOMIZE_FILE)}
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;"> <ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
{foreach from=$datas item=data} {foreach from=$datas item=data}
<li style="margin: 2px;"> <li style="margin: 2px;">
<span>{if $data['name']}{$data['name']}{else}{l s='Picture #'}{$data@iteration}{/if}{l s=':'}</span>&nbsp; <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|intval}-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}-file{$data@iteration}" target="_blank"><img src="{$smarty.const._THEME_PROD_PIC_DIR_}{$data['value']}_small" alt="" /></a>
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
@@ -99,7 +93,7 @@
<span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span> <span class="product_quantity_show{if (int)$customization['quantity'] > 1} red bold{/if}">{$customization['quantity']}</span>
{if $can_edit} {if $can_edit}
<span class="product_quantity_edit" style="display:none;"> <span class="product_quantity_edit" style="display:none;">
<input type="text" name="product_quantity[{$customizationId|intval}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" /> <input type="text" name="product_quantity[{$customizationId}]" class="edit_product_quantity" value="{$customization['quantity']|htmlentities}" size="2" />
</span> </span>
{/if} {/if}
</td> </td>
@@ -110,38 +104,36 @@
</td> </td>
<td align="center" class="total_product"> <td align="center" class="total_product">
{if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)}
{displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price'] * $customization['quantity'], 2) currency=$currency->id}
{else} {else}
{displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id|intval} {displayPrice price=Tools::ps_round($product['product_price_wt'] * $customization['quantity'], 2) currency=$currency->id}
{/if} {/if}
</td> </td>
<td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none"> <td align="center" class="cancelCheck standard_refund_fields current-edit" style="display:none">
<input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']|intval}" /> <input type="hidden" name="totalQtyReturn" id="totalQtyReturn" value="{$customization['quantity_returned']}" />
<input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']|intval}" /> <input type="hidden" name="totalQty" id="totalQty" value="{$customization['quantity']}" />
<input type="hidden" name="productName" id="productName" value="{$product['product_name']}" /> <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']))} {if ((!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN')) AND (int)($customization['quantity_returned']) < (int)($customization['quantity']))}
<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}/> <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}/>
{else} {else}
-- --
{/if} {/if}
</td> </td>
<td class="cancelQuantity standard_refund_fields current-edit" style="display:none"> <td class="cancelQuantity standard_refund_fields current-edit" style="display:none">
{if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])} {if ($customization['quantity_returned'] + $customization['quantity_refunded'] >= $customization['quantity'])}
<input type="hidden" name="cancelCustomizationQuantity[{$customizationId|intval}]" value="0" /> <input type="hidden" name="cancelQuantity[{$product['id_order_detail']}]" value="0" />
{elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))} {elseif (!$order->hasBeenDelivered() OR Configuration::get('PS_ORDER_RETURN'))}
<input type="text" id="cancelQuantity_{$customizationId|intval}" name="cancelCustomizationQuantity[{$customizationId|intval}]" size="2" onclick="selectCheckbox(this);" value="" />0/{$customization['quantity']-$customization['quantity_refunded']} <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']}
{/if} {/if}
</td> </td>
<td class="partial_refund_fields current-edit" style="text-align:left;display:none"> <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']|intval}]" 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']}]" value="0" />
0/{$customization['quantity']-$customization['quantity_refunded']} 0/{$customization['quantity']-$customization['quantity_refunded']}
</div> </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']|intval}]" />{$currency->suffix}</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">
</td> </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> </tr>
{/foreach} {/foreach}
{/foreach} {/foreach}
@@ -24,7 +24,7 @@
*} *}
<script type="text/javascript"> <script type="text/javascript">
var id_cart = {$cart->id|intval}; var id_cart = {$cart->id|intval};
var id_customer = 0; var id_customer = '';
var changed_shipping_price = false; var changed_shipping_price = false;
var shipping_price_selected_carrier = ''; var shipping_price_selected_carrier = '';
var current_index = '{$current}&token={$token}'; var current_index = '{$current}&token={$token}';
@@ -464,7 +464,6 @@
$('#summary_part').show(); $('#summary_part').show();
var address_link = $('#new_address').attr('href'); var address_link = $('#new_address').attr('href');
id_customer = idCustomer; id_customer = idCustomer;
id_cart = 0;
$('#new_address').attr('href', address_link.replace(/id_customer=[0-9]+/, 'id_customer='+id_customer)); $('#new_address').attr('href', address_link.replace(/id_customer=[0-9]+/, 'id_customer='+id_customer));
$.ajax({ $.ajax({
type:"POST", type:"POST",
@@ -317,8 +317,8 @@
line = line.replace(/image_path/g, path); line = line.replace(/image_path/g, path);
line = line.replace(/image_position/g, position); line = line.replace(/image_position/g, position);
line = line.replace(/blank/g, cover); line = line.replace(/blank/g, cover);
line = line.replace(/<tbody>/gi, ""); line = line.replace("<tbody>", "");
line = line.replace(/<\/tbody>/gi, ""); line = line.replace("</tbody>", "");
if (shops != false) if (shops != false)
{ {
$.each(shops, function(key, value){ $.each(shops, function(key, value){
@@ -227,7 +227,7 @@
{else} {else}
<div class="hint clear" style="display: block;width: 70%;">{l s='You cannot edit your file here because you used combinations. Please edit this file in the Combinations tab.'}</div> <div class="hint clear" style="display: block;width: 70%;">{l s='You cannot edit your file here because you used combinations. Please edit this file in the Combinations tab.'}</div>
<br /> <br />
{if isset($error_product_download)}{$error_product_download}{/if} {$error_product_download}
{/if} {/if}
</table> </table>
</div> </div>
@@ -38,7 +38,7 @@
if (html == 'false') if (html == 'false')
{ {
$("#conf_id_PS_SHOP_STATE_ID").fadeOut(); $("#conf_id_PS_SHOP_STATE_ID").fadeOut();
$('#PS_SHOP_STATE_ID option[value=0]').attr("selected", "selected"); $('#id_state option[value=0]').attr("selected", "selected");
} }
else else
{ {
@@ -33,29 +33,22 @@
document.getElementById('typeTranslationForm').submit(); document.getElementById('typeTranslationForm').submit();
} }
function addThemeSelect() function addThemeSelect(el)
{ {
var list_type_for_theme = ['front', 'modules', 'pdf', 'mails']; var list_type_for_theme = [{foreach $translations_type_for_theme as $type}'{$type}', {/foreach}];
var type = $('select[name=type]').val(); var type = el.value;
$('select[name=theme]').hide(); $('select[name=theme]').hide();
for (i=0; i < list_type_for_theme.length; i++) for (i=0; i < list_type_for_theme.length; i++)
if (list_type_for_theme[i] == type) if (list_type_for_theme[i] == type)
{
$('select[name=theme]').show(); $('select[name=theme]').show();
if (type == 'front')
$('select[name=theme]').children('option[value=""]').attr('disabled', true)
else
$('select[name=theme]').children('option[value=""]').attr('disabled', false)
}
else else
$('select[name=theme]').val('{$theme_default}'); $('select[name=theme]').val('{$theme_default}');
} }
$(document).ready(function(){ $(document).ready(function(){
addThemeSelect();
$('select[name=type]').change(function() { $('select[name=type]').change(function() {
addThemeSelect(); addThemeSelect(this);
}); });
}); });
</script> </script>
@@ -67,15 +60,15 @@
<form method="get" action="index.php" id="typeTranslationForm"> <form method="get" action="index.php" id="typeTranslationForm">
<input type="hidden" name="controller" value="AdminTranslations" /> <input type="hidden" name="controller" value="AdminTranslations" />
<input type="hidden" name="lang" id="translation_lang" value="0" /> <input type="hidden" name="lang" id="translation_lang" value="0" />
<select name="type" style="float:left;margin-right:10px"> <select name="type" style="float:left; margin-right:10px;">
{foreach $translations_type as $type => $array} {foreach $translations_type as $type => $array}
<option value="{$type}">{$array.name}</option> <option value="{$type}">{$array.name} &nbsp;</option>
{/foreach} {/foreach}
</select> </select>
<select name="theme" style="float:left;margin-right:10px"> <select name="theme" style="float:left; margin-right:10px;">
<option value="">{l s='Core (no theme selected)'}</option>
{foreach $themes as $theme} {foreach $themes as $theme}
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name}</option>
<option value="{$theme->directory}" {if $id_theme_current == $theme->id}selected=selected{/if}>{$theme->name} &nbsp;</option>
{/foreach} {/foreach}
</select> </select>
{foreach $languages as $language} {foreach $languages as $language}
@@ -117,7 +117,7 @@
<td style="width: 40%">{$key|stripslashes}</td> <td style="width: 40%">{$key|stripslashes}</td>
<td>= <td>=
{* Prepare name string for md5() *} {* Prepare name string for md5() *}
{capture assign="name"}{strtolower($module_name)}{if $theme_name}_{strtolower($theme_name)}{/if}_{strtolower($template_name)}_{md5($key)}{/capture} {capture assign="name"}{strtolower($module_name)}_{strtolower($theme_name)}_{strtolower($template_name)}_{md5($key)}{/capture}
{if $key|strlen < $textarea_sized} {if $key|strlen < $textarea_sized}
<input type="text" <input type="text"
style="width: 450px{if empty($value.trad)};background:#FBB{/if}" style="width: 450px{if empty($value.trad)};background:#FBB{/if}"
+26 -24
View File
@@ -22,31 +22,33 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<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> <div style="clear:both;height:0;line-height:0">&nbsp;</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>
<div class="footerRight"> {if $display_footer}
{if $iso_is_fr} {hook h="displayBackOfficeFooter"}
<span>Questions / Renseignements / Formations :</span> <strong>+33 (0)1.40.18.30.04</strong> de 09h &agrave; 18h <div id="footer">
{/if} <div class="footerLeft">
|&nbsp;<a href="http://www.prestashop.com/en/contact_us/" target="_blank" class="footer_link">{l s='Contact'}</a> <a href="http://www.prestashop.com/" target="_blank">PrestaShop&trade; {$ps_version}</a><br />
|&nbsp;<a href="http://forge.prestashop.com" target="_blank" class="footer_link">{l s='Bug Tracker'}</a> <span>{l s='Load time: '}{number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
|&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> </div>
</div> </div>
</div> <div id="ajax_confirmation" style="display:none"></div>
<div id="ajax_confirmation" style="display:none"></div> {* ajaxBox allows*}
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div> <div id="ajaxBox" style="display:none"></div>
{/if} {/if}
<div id="scrollTop"><a href="#top"></a></div> <div id="scrollTop"><a href="#top"></a></div>
</body> </body>
</html> </html>
+46 -34
View File
@@ -82,6 +82,7 @@
<script type="text/javascript" src="{$js_uri}"></script> <script type="text/javascript" src="{$js_uri}"></script>
{/foreach} {/foreach}
{/if} {/if}
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_dir}favicon.ico" /> <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" /> <link rel="shortcut icon" type="image/x-icon" href="{$img_dir}favicon.ico" />
{if isset($displayBackOfficeHeader)} {if isset($displayBackOfficeHeader)}
@@ -90,15 +91,16 @@
<!--[if IE]> <!--[if IE]>
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" /> <link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
<![endif]--> <![endif]-->
{if isset($brightness)} {if isset($brightness)}
<style type="text/css"> <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} 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> </style>
{/if} {/if}
</head> </head>
<body style="{if isset($bo_color) && $bo_color}background:{$bo_color};{/if}{if isset($bo_width) && $bo_width > 0}text-align:center;{/if}"> <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} {if $display_header}
<div id="ajax_running"><img src="../img/admin/ajax-loader-yellow.gif" alt="" /> {l s='Loading...'}</div> <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="top_container" {if $bo_width > 0}style="margin:auto;width:{$bo_width}px"{/if}>
<div id="container"> <div id="container">
{* begin HEADER *} {* begin HEADER *}
@@ -106,7 +108,7 @@
<div id="header_infos"> <div id="header_infos">
<a id="header_shopname" href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}"><span>{$shop_name}</span></a> <a id="header_shopname" href="{$link->getAdminLink('AdminHome')|escape:'htmlall':'UTF-8'}"><span>{$shop_name}</span></a>
<div id="notifs_icon_wrapper"> <div id="notifs_icon_wrapper">
{if {$show_new_orders} == 1} {if {$show_new_orders} == 1}
<div id="orders_notif" class="notifs"> <div id="orders_notif" class="notifs">
<span id="orders_notif_number_wrapper" class="number_wrapper"> <span id="orders_notif_number_wrapper" class="number_wrapper">
<span id="orders_notif_value">0</span> <span id="orders_notif_value">0</span>
@@ -118,8 +120,8 @@
<p><a href="index.php?controller=AdminOrders&amp;token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a></p> <p><a href="index.php?controller=AdminOrders&amp;token={getAdminToken tab='AdminOrders'}">{l s='Show all orders'}</a></p>
</div> </div>
</div> </div>
{/if} {/if}
{if ($show_new_customers == 1)} {if ($show_new_customers == 1)}
<div id="customers_notif" class="notifs notifs_alternate"> <div id="customers_notif" class="notifs notifs_alternate">
<span id="customers_notif_number_wrapper" class="number_wrapper"> <span id="customers_notif_number_wrapper" class="number_wrapper">
<span id="customers_notif_value">0</span> <span id="customers_notif_value">0</span>
@@ -131,8 +133,8 @@
<p><a href="index.php?controller=AdminCustomers&amp;token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a></p> <p><a href="index.php?controller=AdminCustomers&amp;token={getAdminToken tab='AdminCustomers'}">{l s='Show all customers'}</a></p>
</div> </div>
</div> </div>
{/if} {/if}
{if {$show_new_messages} == 1} {if {$show_new_messages} == 1}
<div id="customer_messages_notif" class="notifs"> <div id="customer_messages_notif" class="notifs">
<span id="customer_messages_notif_number_wrapper" class="number_wrapper"> <span id="customer_messages_notif_number_wrapper" class="number_wrapper">
<span id="customer_messages_notif_value">0</span> <span id="customer_messages_notif_value">0</span>
@@ -144,8 +146,9 @@
<p><a href="index.php?tab=AdminCustomerThreads&amp;token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a></p> <p><a href="index.php?tab=AdminCustomerThreads&amp;token={getAdminToken tab='AdminCustomerThreads'}">{l s='Show all messages'}</a></p>
</div> </div>
</div> </div>
{/if} {/if}
</div> </div>
<div id="employee_box"> <div id="employee_box">
<div id="employee_infos"> <div id="employee_infos">
<div class="employee_name">{l s='Welcome,'} <strong>{$first_name}&nbsp;{$last_name}</strong></div> <div class="employee_name">{l s='Welcome,'} <strong>{$first_name}&nbsp;{$last_name}</strong></div>
@@ -154,13 +157,14 @@
<li><a href="{$link->getAdminLink('AdminEmployees')|escape:'htmlall':'UTF-8'}&id_employee={$employee->id}&amp;updateemployee">{l s='My preferences'}</a></li> <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 class="separator">&nbsp;</li>
<li><a id="header_logout" href="index.php?logout">{l s='logout'}</a></li> <li><a id="header_logout" href="index.php?logout">{l s='logout'}</a></li>
{if {$base_url}} {if {$base_url}}
<li class="separator">&nbsp;</li> <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> <a href="{$base_url}" id="header_foaccess" target="_blank" title="{l s='View my shop'}">{l s='View my shop'}</a>
{/if} {/if}
</ul> </ul>
</div> </div>
</div> </div>
<div id="header_search"> <div id="header_search">
<form method="post" action="index.php?controller=AdminSearch&amp;token={getAdminToken tab='AdminSearch'}"> <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}" /> <input type="text" name="bo_query" id="bo_query" value="{$bo_query}" />
@@ -179,7 +183,8 @@
<input type="submit" id="bo_search_submit" class="button" value="{l s='Search'}"/> <input type="submit" id="bo_search_submit" class="button" value="{l s='Search'}"/>
</form> </form>
</div> </div>
{if count($quick_access) > 0}
{if count($quick_access) > 0}
<div id="header_quick"> <div id="header_quick">
<select onchange="quickSelect(this);" id="quick_select" class="chosen no-search"> <select onchange="quickSelect(this);" id="quick_select" class="chosen no-search">
<option value="0">{l s='Quick Access'}</option> <option value="0">{l s='Quick Access'}</option>
@@ -188,15 +193,19 @@
{/foreach} {/foreach}
</select> </select>
</div> </div>
{/if} {/if}
{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if} {if isset($displayBackOfficeTop)}
{$displayBackOfficeTop}
{/if}
</div>{* end header_infos*} </div>{* end header_infos*}
<ul id="menu"> <ul id="menu">
{if !$tab} {if !$tab}
<div class="mainsubtablist" style="display:none"></div> <div class="mainsubtablist" style="display:none">
{/if} </div>
{foreach $tabs AS $t} {/if}
{if $t.active} {foreach $tabs AS $t}
{if $t.active}
<li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}"> <li class="submenu_size maintab {if $t.current}active{/if}" id="maintab{$t.id_tab}">
<a href="#" class="title"> <a href="#" class="title">
<img src="{$t.img}" alt="" />{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if} <img src="{$t.img}" alt="" />{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}
@@ -209,20 +218,23 @@
{/foreach} {/foreach}
</ul> </ul>
</li> </li>
{/if} {/if}
{/foreach} {/foreach}
</ul> </ul>
</div>{* end header*} {/if}
{/if} </div>{* end header*}
<div id="main"> <div id="main">
<div id="content"> <div id="content">
{if $display_header && $install_dir_exists} {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;"> <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'} {l s='For security reasons, you must also:'} {l s='delete the /install folder'}
</div> </div>
{/if} {/if}
{if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
<div class="multishop_toolbar"> {if $display_header && $is_multishop && $shop_list && ($multishop_context & Shop::CONTEXT_GROUP || $multishop_context & Shop::CONTEXT_SHOP)}
<span class="text_multishop">{l s='Multistore configuration for'}</span> {$shop_list} <div class="multishop_toolbar">
</div> <span class="text_multishop">{l s='Multistore configuration for'}</span>
{/if} {$shop_list}
</div>
{/if}
@@ -116,8 +116,6 @@
{if isset($params.color) && isset($tr.color)} {if isset($params.color) && isset($tr.color)}
</span> </span>
{/if} {/if}
{/block}
{block name="close_td"}
</td> </td>
{/block} {/block}
{/foreach} {/foreach}
@@ -189,8 +189,8 @@
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option> <option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
</select> </select>
{elseif $params.type == 'date' || $params.type == 'datetime'} {elseif $params.type == 'date' || $params.type == 'datetime'}
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/><br /> {l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($value.0)}$value.0{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/> {l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($value.1)}$value.1{/if}"{if isset($params.width)} style="width:70px"{/if}/>
{elseif $params.type == 'select'} {elseif $params.type == 'select'}
{if isset($params.filter_key)} {if isset($params.filter_key)}
<select onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}> <select onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{$export_precontent}{foreach from=$export_headers item=header}{$header};{/foreach} {foreach from=$export_headers item=header}{$header};{/foreach}
{foreach from=$export_content item=line} {foreach from=$export_content item=line}
{foreach from=$line item=content}{$content};{/foreach} {foreach from=$line item=content}{$content};{/foreach}
+5 -1
View File
@@ -47,6 +47,7 @@
{/if} {/if}
</div> </div>
{/if} {/if}
{if isset($informations) && count($informations) && $informations} {if isset($informations) && count($informations) && $informations}
<div class="hint clear" style="display:block;"> <div class="hint clear" style="display:block;">
<span id="see_more_infos"> <span id="see_more_infos">
@@ -59,6 +60,7 @@
</div> </div>
</div><br /> </div><br />
{/if} {/if}
{if isset($confirmations) && count($confirmations) && $confirmations} {if isset($confirmations) && count($confirmations) && $confirmations}
<div class="conf" style="display:block;"> <div class="conf" style="display:block;">
{foreach $confirmations as $conf} {foreach $confirmations as $conf}
@@ -66,6 +68,7 @@
{/foreach} {/foreach}
</div><br /> </div><br />
{/if} {/if}
{if count($warnings)} {if count($warnings)}
<div class="warn"> <div class="warn">
<span style="float:right"> <span style="float:right">
@@ -91,5 +94,6 @@
{/if} {/if}
</div> </div>
{/if} {/if}
{$page} {$page}
{include file='footer.tpl'} {include file='footer.tpl'}
+1 -1
View File
@@ -128,7 +128,7 @@ class CarrierCore extends ObjectModel
'max_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'max_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'max_height' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'max_height' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'max_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'max_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'max_weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
'grade' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 1), 'grade' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 1),
'external_module_name' => array('type' => self::TYPE_STRING, 'size' => 64), 'external_module_name' => array('type' => self::TYPE_STRING, 'size' => 64),
'is_module' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'is_module' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
+7 -12
View File
@@ -953,7 +953,6 @@ class CartCore extends ObjectModel
$this->update(true); $this->update(true);
$context = Context::getContext()->cloneContext(); $context = Context::getContext()->cloneContext();
$context->cart = $this; $context->cart = $this;
Cache::clean('getContextualValue_*');
if ($auto_add_cart_rule) if ($auto_add_cart_rule)
CartRule::autoAddToCart($context); CartRule::autoAddToCart($context);
@@ -1592,9 +1591,9 @@ class CartCore extends ObjectModel
*/ */
public function getPackageList($flush = false) public function getPackageList($flush = false)
{ {
static $cache = array(); static $cache = false;
if (isset($cache[(int)$this->id]) && $cache[(int)$this->id] !== false && !$flush) if ($cache !== false && !$flush)
return $cache[(int)$this->id]; return $cache;
$product_list = $this->getProducts(); $product_list = $this->getProducts();
// Step 1 : Get product informations (warehouse_list and carrier_list), count warehouse // Step 1 : Get product informations (warehouse_list and carrier_list), count warehouse
@@ -1822,7 +1821,7 @@ class CartCore extends ObjectModel
); );
} }
} }
$cache[(int)$this->id] = $final_package_list; $cache = $final_package_list;
return $final_package_list; return $final_package_list;
} }
@@ -2293,7 +2292,7 @@ class CartCore extends ObjectModel
$this->id_carrier = 0; $this->id_carrier = 0;
return; return;
} }
Cache::clean('getContextualValue_*');
$delivery_option_list = $this->getDeliveryOptionList(null, true); $delivery_option_list = $this->getDeliveryOptionList(null, true);
foreach ($delivery_option_list as $id_address => $options) foreach ($delivery_option_list as $id_address => $options)
@@ -2870,12 +2869,8 @@ class CartCore extends ObjectModel
{ {
$cart_rule['value_real'] -= $total_shipping; $cart_rule['value_real'] -= $total_shipping;
$cart_rule['value_tax_exc'] -= $total_shipping_tax_exc; $cart_rule['value_tax_exc'] -= $total_shipping_tax_exc;
$cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); $total_discounts -= $total_shipping;
$cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); $total_discounts_tax_exc -= $total_shipping_tax_exc;
if ($total_discounts > $cart_rule['value_real'])
$total_discounts -= $total_shipping;
if ($total_discounts_tax_exc > $cart_rule['value_tax_exc'])
$total_discounts_tax_exc -= $total_shipping_tax_exc;
// Update total shipping // Update total shipping
$total_shipping = 0; $total_shipping = 0;
+7 -7
View File
@@ -912,7 +912,7 @@ class CartRuleCore extends ObjectModel
if ($cart_vat_amount == 0 || $cart_amount_te == 0) if ($cart_vat_amount == 0 || $cart_amount_te == 0)
$cart_average_vat_rate = 0; $cart_average_vat_rate = 0;
else else
$cart_average_vat_rate = Tools::ps_round($cart_vat_amount / $cart_amount_te, 3); $cart_average_vat_rate = $cart_vat_amount / $cart_amount_te;
if ($this->reduction_tax && !$use_tax) if ($this->reduction_tax && !$use_tax)
$reduction_value += $prorata * $reduction_amount / (1 + $cart_average_vat_rate); $reduction_value += $prorata * $reduction_amount / (1 + $cart_average_vat_rate);
@@ -1079,12 +1079,12 @@ class CartRuleCore extends ObjectModel
if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart)) if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart))
return; return;
$sql = ' $result = Db::getInstance()->executeS('
SELECT cr.* SELECT cr.*
FROM '._DB_PREFIX_.'cart_rule cr FROM '._DB_PREFIX_.'cart_rule cr
LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule
LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule
'.($context->cart->id_carrier ? 'LEFT JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').' '.($context->cart->id_carrier ? 'INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').'
LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule
WHERE cr.active = 1 WHERE cr.active = 1
AND cr.code = "" AND cr.code = ""
@@ -1108,9 +1108,9 @@ class CartRuleCore extends ObjectModel
'.($context->customer->id ? 'OR 0 < ( '.($context->customer->id ? 'OR 0 < (
SELECT cg.id_group SELECT cg.id_group
FROM '._DB_PREFIX_.'customer_group cg FROM '._DB_PREFIX_.'customer_group cg
LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON (cg.id_group = crg.id_group AND cg.id_group = '.(int)$context->customer->id_default_group.') LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON cg.id_group = crg.id_group
WHERE cr.id_cart_rule = crg.id_cart_rule WHERE cr.id_cart_rule = crg.id_cart_rule
AND cg.id_customer = '.(int)$context->customer->id.' LIMIT 1 AND cg.id_customer = '.(int)$context->customer->id.'
)' : '').' )' : '').'
) )
AND ( AND (
@@ -1122,8 +1122,8 @@ class CartRuleCore extends ObjectModel
) )
) )
AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.') AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.')
ORDER BY priority'; ORDER BY priority');
$result = Db::getInstance()->executeS($sql);
if ($result) if ($result)
{ {
$cart_rules = ObjectModel::hydrateCollection('CartRule', $result); $cart_rules = ObjectModel::hydrateCollection('CartRule', $result);
+8 -10
View File
@@ -47,6 +47,7 @@ class ConfigurationTestCore
'upload' => false, 'upload' => false,
'gd' => false, 'gd' => false,
'mysql_support' => false, 'mysql_support' => false,
'sessions' => false,
'config_dir' => 'config', 'config_dir' => 'config',
'cache_dir' => 'cache', 'cache_dir' => 'cache',
'sitemap' => 'sitemap.xml', 'sitemap' => 'sitemap.xml',
@@ -54,9 +55,9 @@ class ConfigurationTestCore
'img_dir' => 'img', 'img_dir' => 'img',
'mails_dir' => 'mails', 'mails_dir' => 'mails',
'module_dir' => 'modules', 'module_dir' => 'modules',
'theme_lang_dir' => 'themes/'._THEME_NAME_.'/lang/', 'theme_lang_dir' => 'themes/'._THEME_NAME_.'/lang',
'theme_pdf_lang_dir' => 'themes/'._THEME_NAME_.'/pdf/lang/', 'theme_pdf_lang_dir' => 'themes/'._THEME_NAME_.'/pdf/lang/',
'theme_cache_dir' => 'themes/'._THEME_NAME_.'/cache/', 'theme_cache_dir' => 'themes/'._THEME_NAME_.'/cache',
'translations_dir' => 'translations', 'translations_dir' => 'translations',
'customizable_products_dir' => 'upload', 'customizable_products_dir' => 'upload',
'virtual_products_dir' => 'download' 'virtual_products_dir' => 'download'
@@ -266,24 +267,21 @@ class ConfigurationTestCore
public static function test_theme_lang_dir($dir) public static function test_theme_lang_dir($dir)
{ {
$absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); if (!file_exists($dir))
if (!file_exists($absoluteDir)) return true;
return true;
return ConfigurationTest::test_dir($dir, true); return ConfigurationTest::test_dir($dir, true);
} }
public static function test_theme_pdf_lang_dir($dir) public static function test_theme_pdf_lang_dir($dir)
{ {
$absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); if (!file_exists($dir))
if (!file_exists($absoluteDir))
return true; return true;
return ConfigurationTest::test_dir($dir, true); return ConfigurationTest::test_dir($dir, true);
} }
public static function test_theme_cache_dir($dir) public static function test_theme_cache_dir($dir)
{ {
$absoluteDir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($dir, '\\/'); if (!file_exists($dir))
if (!file_exists($absoluteDir))
return true; return true;
return ConfigurationTest::test_dir($dir, true); return ConfigurationTest::test_dir($dir, true);
} }
@@ -319,4 +317,4 @@ class ConfigurationTestCore
{ {
return extension_loaded('Dom'); return extension_loaded('Dom');
} }
} }
+38 -41
View File
@@ -387,15 +387,15 @@ class DispatcherCore
// Load custom routes from modules // Load custom routes from modules
$modules_routes = Hook::exec('moduleRoutes', array(), null, true, false); $modules_routes = Hook::exec('moduleRoutes', array(), null, true, false);
if (is_array($modules_routes) && count($modules_routes)) if (is_array($modules_routes) && count($modules_routes))
foreach($modules_routes as $module_route) foreach($modules_routes as $module_route)
foreach($module_route as $route => $route_details) foreach($module_route as $route => $route_details)
if (array_key_exists('controller', $route_details) && array_key_exists('rule', $route_details) if (array_key_exists('controller', $route_details) && array_key_exists('rule', $route_details)
&& array_key_exists('keywords', $route_details) && array_key_exists('params', $route_details)) && array_key_exists('keywords', $route_details) && array_key_exists('params', $route_details))
{ {
if (!isset($this->default_routes[$route])) if (!isset($this->default_routes[$route]))
$this->default_routes[$route] = array(); $this->default_routes[$route] = array();
$this->default_routes[$route] = array_merge($this->default_routes[$route], $route_details); $this->default_routes[$route] = array_merge($this->default_routes[$route], $route_details);
} }
// Set default routes // Set default routes
foreach (Language::getLanguages() as $lang) foreach (Language::getLanguages() as $lang)
@@ -675,41 +675,38 @@ class DispatcherCore
if (!$this->request_uri) if (!$this->request_uri)
return strtolower($this->controller_not_found); return strtolower($this->controller_not_found);
$controller = $this->controller_not_found; $controller = $this->controller_not_found;
// If the request_uri matches a static file, then there is no need to check the routes, we keep "controller_not_found" (a static file should not go through the dispatcher)
if (!preg_match('/\.(gif|jpe?g|png|css|js|ico)$/i', $this->request_uri))
{
// Add empty route as last route to prevent this greedy regexp to match request uri before right time
if ($this->empty_route)
$this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller'], Context::getContext()->language->id);
if (isset($this->routes[Context::getContext()->language->id])) // Add empty route as last route to prevent this greedy regexp to match request uri before right time
foreach ($this->routes[Context::getContext()->language->id] as $route) if ($this->empty_route)
if (preg_match($route['regexp'], $this->request_uri, $m)) $this->addRoute($this->empty_route['routeID'], $this->empty_route['rule'], $this->empty_route['controller'], Context::getContext()->language->id);
if (isset($this->routes[Context::getContext()->language->id]))
foreach ($this->routes[Context::getContext()->language->id] as $route)
if (preg_match($route['regexp'], $this->request_uri, $m))
{
// Route found ! Now fill $_GET with parameters of uri
foreach ($m as $k => $v)
if (!is_numeric($k))
$_GET[$k] = $v;
$controller = $route['controller'] ? $route['controller'] : $_GET['controller'];
if (!empty($route['params']))
foreach ($route['params'] as $k => $v)
$_GET[$k] = $v;
// A patch for module friendly urls
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m))
{ {
// Route found ! Now fill $_GET with parameters of uri $_GET['module'] = $m[1];
foreach ($m as $k => $v) $_GET['fc'] = 'module';
if (!is_numeric($k)) $controller = $m[2];
$_GET[$k] = $v;
$controller = $route['controller'] ? $route['controller'] : $_GET['controller'];
if (!empty($route['params']))
foreach ($route['params'] as $k => $v)
$_GET[$k] = $v;
// A patch for module friendly urls
if (preg_match('#module-([a-z0-9_-]+)-([a-z0-9]+)$#i', $controller, $m))
{
$_GET['module'] = $m[1];
$_GET['fc'] = 'module';
$controller = $m[2];
}
if (isset($_GET['fc']) && $_GET['fc'] == 'module')
$this->front_controller = self::FC_MODULE;
break;
} }
}
if (isset($_GET['fc']) && $_GET['fc'] == 'module')
$this->front_controller = self::FC_MODULE;
break;
}
if ($controller == 'index' || $this->request_uri == '/index.php') if ($controller == 'index' || $this->request_uri == '/index.php')
$controller = $this->default_controller; $controller = $this->default_controller;
$this->controller = $controller; $this->controller = $controller;
+2 -2
View File
@@ -66,8 +66,8 @@ class GenderCore extends ObjectModel
public function getImage($use_unknown = false) public function getImage($use_unknown = false)
{ {
if (!isset($this->id) || empty($this->id) || !file_exists(_PS_GENDERS_DIR_.$this->id.'.jpg')) if (!file_exists(_PS_GENDERS_DIR_.$this->id.'.jpg'))
return _THEME_GENDERS_DIR_.'Unknown.jpg'; return ($use_unknown) ? _PS_ADMIN_IMG_.'unknown.gif' : false;
return _THEME_GENDERS_DIR_.$this->id.'.jpg'; return _THEME_GENDERS_DIR_.$this->id.'.jpg';
} }
} }
+2 -2
View File
@@ -274,9 +274,8 @@ class HookCore extends ObjectModel
// For payment modules, we check that they are available in the contextual country // For payment modules, we check that they are available in the contextual country
elseif ($frontend) elseif ($frontend)
{ {
$sql->where(Module::getPaypalIgnore());
if (Validate::isLoadedObject($context->country)) 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.' AND id_shop = '.(int)$context->shop->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.' LIMIT 1) = '.(int)$context->country->id.')');
if (Validate::isLoadedObject($context->currency)) 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))'); $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))');
} }
@@ -287,6 +286,7 @@ class HookCore extends ObjectModel
{ {
$sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`'); $sql->leftJoin('module_group', 'mg', 'mg.`id_module` = m.`id_module`');
$sql->where('mg.`id_group` IN ('.implode(', ', $groups).')'); $sql->where('mg.`id_group` IN ('.implode(', ', $groups).')');
$sql->where(Module::getPaypalIgnore());
$sql->groupBy('hm.id_hook, hm.id_module'); $sql->groupBy('hm.id_hook, hm.id_module');
} }
-2
View File
@@ -801,8 +801,6 @@ class LanguageCore extends ObjectModel
$files_list = $gz->listContent(); $files_list = $gz->listContent();
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false)) if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
$errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$iso; $errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$iso;
// Clear smarty modules cache
Tools::clearCache();
if (!Language::checkAndAddLanguage((string)$iso, $lang_pack, false, $params)) if (!Language::checkAndAddLanguage((string)$iso, $lang_pack, false, $params))
$errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$iso; $errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$iso;
else else
+6 -8
View File
@@ -51,6 +51,7 @@ class LocalizationPackCore
$res &= $this->_installUnits($xml); $res &= $this->_installUnits($xml);
$res &= $this->installConfiguration($xml); $res &= $this->installConfiguration($xml);
$res &= $this->installModules($xml); $res &= $this->installModules($xml);
$res &= $this->updateDefaultGroupDisplayMethod($xml);
$res &= $this->_installLanguages($xml, $install_mode); $res &= $this->_installLanguages($xml, $install_mode);
if ($res && isset($this->iso_code_lang)) if ($res && isset($this->iso_code_lang))
@@ -232,7 +233,7 @@ class LocalizationPackCore
} }
} }
} }
return $this->updateDefaultGroupDisplayMethod($xml); return true;
} }
protected function _installCurrencies($xml, $install_mode = false) protected function _installCurrencies($xml, $install_mode = false)
@@ -390,13 +391,10 @@ class LocalizationPackCore
$attributes = $xml->group_default->attributes(); $attributes = $xml->group_default->attributes();
if (isset($attributes['price_display_method']) && in_array((int)$attributes['price_display_method'], array(0, 1))) if (isset($attributes['price_display_method']) && in_array((int)$attributes['price_display_method'], array(0, 1)))
{ {
foreach (array((int)Configuration::get('PS_CUSTOMER_GROUP'), (int)Configuration::get('PS_GUEST_GROUP'), (int)Configuration::get('PS_UNIDENTIFIED_GROUP')) as $id_group) $group = new Group((int)Configuration::get('PS_CUSTOMER_GROUP'));
{ $group->price_display_method = (int)$attributes['price_display_method'];
$group = new Group((int)$id_group); if (!$group->save())
$group->price_display_method = (int)$attributes['price_display_method']; $this->_errors[] = Tools::displayError('An error occurred during the default group update');
if (!$group->save())
$this->_errors[] = Tools::displayError('An error occurred during the default group update');
}
} }
else else
$this->_errors[] = Tools::displayError('An error has occurred during the default group update'); $this->_errors[] = Tools::displayError('An error has occurred during the default group update');
+1 -1
View File
@@ -251,7 +251,7 @@ class MailCore
$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo))); $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo)));
$template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME', null, null, $id_shop)); $template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME', null, null, $id_shop));
$template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->language->id); $template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';
$template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id); $template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id);
$template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id); $template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id);
$template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id); $template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id);
+3 -3
View File
@@ -940,8 +940,8 @@ abstract class ObjectModelCore
{ {
global $_FIELDS; global $_FIELDS;
if ($_FIELDS === null && file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php')) if (file_exists(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'))
include_once(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php'); include(_PS_TRANSLATIONS_DIR_.Context::getContext()->language->iso_code.'/fields.php');
$key = $class.'_'.md5($field); $key = $class.'_'.md5($field);
return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field); return ((is_array($_FIELDS) && array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field);
@@ -1596,4 +1596,4 @@ abstract class ObjectModelCore
{ {
$this->update_fields = $fields; $this->update_fields = $fields;
} }
} }
+2 -4
View File
@@ -429,14 +429,12 @@ abstract class PaymentModuleCore extends Module
// Set the new voucher value // Set the new voucher value
if ($voucher->reduction_tax) if ($voucher->reduction_tax)
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl; $voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt;
else else
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl; $voucher->reduction_amount = $values['tax_excl'] - $order->total_products;
$voucher->id_customer = $order->id_customer; $voucher->id_customer = $order->id_customer;
$voucher->quantity = 1; $voucher->quantity = 1;
$voucher->quantity_per_user = 1;
$voucher->free_shipping = 0;
if ($voucher->add()) if ($voucher->add())
{ {
// If the voucher has conditions, they are now copied to the new voucher // If the voucher has conditions, they are now copied to the new voucher
+1 -8
View File
@@ -458,10 +458,6 @@ class ProductCore extends ObjectModel
$this->tax_rate = $this->getTaxesRate(new Address($address)); $this->tax_rate = $this->getTaxesRate(new Address($address));
$this->new = $this->isNew(); $this->new = $this->isNew();
// keep base price
$this->base_price = $this->price;
$this->price = Product::getPriceStatic((int)$this->id, false, null, 6, null, false, true, 1, false, null, null, null, $this->specificPrice); $this->price = Product::getPriceStatic((int)$this->id, false, null, 6, null, false, true, 1, false, null, null, null, $this->specificPrice);
$this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0); $this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0);
if ($this->id) if ($this->id)
@@ -2139,10 +2135,7 @@ class ProductCore extends ObjectModel
$sql = 'SELECT p.*, product_shop.*, stock.`out_of_stock` out_of_stock, pl.`description`, pl.`description_short`, $sql = 'SELECT p.*, product_shop.*, stock.`out_of_stock` out_of_stock, pl.`description`, pl.`description_short`,
pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`,
p.`ean13`, p.`upc`, MAX(image_shop.`id_image`) id_image, il.`legend`, p.`ean13`, p.`upc`, MAX(image_shop.`id_image`) id_image, il.`legend`
DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(),
INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).'
DAY)) > 0 AS new
FROM `'._DB_PREFIX_.'product` p FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON ( LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (
p.`id_product` = pl.`id_product` p.`id_product` = pl.`id_product`
+1 -1
View File
@@ -175,7 +175,7 @@ class ProductDownloadCore extends ObjectModel
{ {
if (!ProductDownload::isFeatureActive()) if (!ProductDownload::isFeatureActive())
return false; return false;
if (array_key_exists((int)$id_product, self::$_productIds)) if (array_key_exists($id_product, self::$_productIds))
return self::$_productIds[$id_product]; return self::$_productIds[$id_product];
self::$_productIds[$id_product] = (int)Db::getInstance()->getValue(' self::$_productIds[$id_product] = (int)Db::getInstance()->getValue('
SELECT `id_product_download` SELECT `id_product_download`
+4 -2
View File
@@ -65,9 +65,11 @@ class ProductSaleCore
{ {
if ($page_number < 0) $page_number = 0; if ($page_number < 0) $page_number = 0;
if ($nb_products < 1) $nb_products = 10; if ($nb_products < 1) $nb_products = 10;
$final_order_by = $order_by; $final_order_by = $order_by;
if (is_null($order_by) || $order_by == 'position' || $order_by == 'price') $order_by = 'sales'; if (empty($order_by) || $order_by == 'position' || $order_by = 'price') $order_by = 'sales';
if (is_null($order_way) || $order_by == 'sales') $order_way == 'DESC'; if (empty($order_way) || $order_by == 'sales') $order_way = 'DESC';
$groups = FrontController::getCurrentCustomerGroups(); $groups = FrontController::getCurrentCustomerGroups();
$sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1');
$interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; $interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20;
+1 -1
View File
@@ -658,7 +658,7 @@ class SearchCore
SELECT id_group FROM '._DB_PREFIX_.'customer_group SELECT id_group FROM '._DB_PREFIX_.'customer_group
WHERE id_customer = '.(int)$id_customer.')').' WHERE id_customer = '.(int)$id_customer.')').'
AND t.`name` LIKE \'%'.pSQL($tag).'%\' AND t.`name` LIKE \'%'.pSQL($tag).'%\'
GROUP BY product_shop.id_product GROUP BY product_shop.id_image
ORDER BY position DESC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').' ORDER BY position DESC'.($orderBy ? ', '.$orderBy : '').($orderWay ? ' '.$orderWay : '').'
LIMIT '.(int)(($pageNumber - 1) * $pageSize).','.(int)$pageSize; LIMIT '.(int)(($pageNumber - 1) * $pageSize).','.(int)$pageSize;
if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql)) if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql))
+2 -2
View File
@@ -280,7 +280,7 @@ class SpecificPriceRuleCore extends ObjectModel
$specific_price->id_currency = (int)$rule->id_currency; $specific_price->id_currency = (int)$rule->id_currency;
$specific_price->id_group = (int)$rule->id_group; $specific_price->id_group = (int)$rule->id_group;
$specific_price->from_quantity = (int)$rule->from_quantity; $specific_price->from_quantity = (int)$rule->from_quantity;
$specific_price->price = (float)$rule->price; $specific_price->price = (int)$rule->price;
$specific_price->reduction_type = $rule->reduction_type; $specific_price->reduction_type = $rule->reduction_type;
$specific_price->reduction = ($rule->reduction_type == 'percentage' ? $rule->reduction / 100 : (float)$rule->reduction); $specific_price->reduction = ($rule->reduction_type == 'percentage' ? $rule->reduction / 100 : (float)$rule->reduction);
$specific_price->from = $rule->from; $specific_price->from = $rule->from;
@@ -288,4 +288,4 @@ class SpecificPriceRuleCore extends ObjectModel
return $specific_price->add(); return $specific_price->add();
} }
} }
+19 -23
View File
@@ -1562,9 +1562,6 @@ class ToolsCore
fwrite($write_fd, "# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution\n"); 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"); 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 // RewriteEngine
fwrite($write_fd, "<IfModule mod_rewrite.c>\n"); fwrite($write_fd, "<IfModule mod_rewrite.c>\n");
@@ -1572,6 +1569,9 @@ class ToolsCore
if ($disable_multiviews) if ($disable_multiviews)
fwrite($write_fd, "\n# Disable Multiviews\nOptions -Multiviews\n\n"); 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"); fwrite($write_fd, "RewriteEngine on\n");
if (!$medias) if (!$medias)
@@ -1598,10 +1598,8 @@ class ToolsCore
// Webservice // Webservice
fwrite($write_fd, 'RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]'."\n\n"); fwrite($write_fd, 'RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]'."\n\n");
if (!$rewrite_settings) $rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS', null, null, (int)$uri['id_shop']);
$rewrite_settings = (int)Configuration::get('PS_REWRITING_SETTINGS', null, null, (int)$uri['id_shop']);
$domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n"; $domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n";
// Rewrite virtual multishop uri // Rewrite virtual multishop uri
if ($uri['virtual']) if ($uri['virtual'])
@@ -1631,10 +1629,10 @@ class ToolsCore
{ {
fwrite($write_fd, $media_domains); fwrite($write_fd, $media_domains);
fwrite($write_fd, $domain_rewrite_cond); fwrite($write_fd, $domain_rewrite_cond);
fwrite($write_fd, 'RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3$4.jpg [L]'."\n"); fwrite($write_fd, 'RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.'$1-$2$3$4.jpg [L]'."\n");
fwrite($write_fd, $media_domains); fwrite($write_fd, $media_domains);
fwrite($write_fd, $domain_rewrite_cond); fwrite($write_fd, $domain_rewrite_cond);
fwrite($write_fd, 'RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1-$2$3.jpg [L]'."\n"); fwrite($write_fd, 'RewriteRule ^([0-9]+)\-([0-9]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.'$1-$2$3.jpg [L]'."\n");
} }
// Rewrite product images < 100 millions // Rewrite product images < 100 millions
@@ -1649,7 +1647,7 @@ class ToolsCore
$img_name .= '$'.$j; $img_name .= '$'.$j;
fwrite($write_fd, $media_domains); fwrite($write_fd, $media_domains);
fwrite($write_fd, $domain_rewrite_cond); fwrite($write_fd, $domain_rewrite_cond);
fwrite($write_fd, 'RewriteRule ^'.str_repeat('([0-9])', $i).'(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/'.$img_path.$img_name.'$'.($j + 1).".jpg [L]\n"); fwrite($write_fd, 'RewriteRule ^'.str_repeat('([0-9])', $i).'(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}'._PS_PROD_IMG_.$img_path.$img_name.'$'.($j + 1).".jpg [L]\n");
} }
fwrite($write_fd, $media_domains); fwrite($write_fd, $media_domains);
fwrite($write_fd, $domain_rewrite_cond); fwrite($write_fd, $domain_rewrite_cond);
@@ -2117,14 +2115,11 @@ exit;
* *
* @param Smarty $smarty * @param Smarty $smarty
*/ */
public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null) public static function clearCache($smarty, $tpl = false, $cache_id = null, $compile_id = null)
{ {
if ($smarty === null) if (is_null($smarty))
$smarty = Context::getContext()->smarty; $smarty = Context::getContext()->smarty;
if ($smarty === null)
return;
if (!$tpl && $cache_id === null && $compile_id === null) if (!$tpl && $cache_id === null && $compile_id === null)
return $smarty->clearAllCache(); return $smarty->clearAllCache();
@@ -2350,16 +2345,16 @@ exit;
$addons_url = 'api.addons.prestashop.com'; $addons_url = 'api.addons.prestashop.com';
$postData = ''; $postData = '';
$postDataArray = array( $postDataArray = array(
'version' => isset($params['version']) ? $params['version'] : _PS_VERSION_, 'version' => _PS_VERSION_,
'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code), 'iso_lang' => strtolower(Context::getContext()->language->iso_code),
'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))), 'iso_code' => strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
'shop_url' => urlencode(isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain()), 'shop_url' => urlencode(Tools::getShopDomain()),
'mail' => urlencode(isset($params['email']) ? $params['email'] : Configuration::get('email')) 'mail' => urlencode(Configuration::get('PS_SHOP_EMAIL'))
); );
foreach ($postDataArray as $postDataKey => $postDataValue) foreach ($postDataArray as $postDataKey => $postDataValue)
$postData .= '&'.$postDataKey.'='.$postDataValue; $postData .= '&'.$postDataKey.'='.$postDataValue;
$postData = ltrim($postData, '&'); $postData = ltrim($postData, '&');
// Config for each request // Config for each request
if ($request == 'native') if ($request == 'native')
{ {
@@ -2456,4 +2451,5 @@ function cmpPriceDesc($a, $b)
elseif ((float)$a['price_tmp'] > (float)$b['price_tmp']) elseif ((float)$a['price_tmp'] > (float)$b['price_tmp'])
return -1; return -1;
return 0; return 0;
} }
+1 -1
View File
@@ -129,7 +129,7 @@ class TranslateCore
static $translations_merged = array(); static $translations_merged = array();
$name = $module instanceof Module ? $module->name : $module; $name = $module instanceof Module ? $module->name : $module;
if (!isset($translations_merged[$name]) && isset(Context::getContext()->language)) if (!isset($translations_merged[$name]))
{ {
$filesByPriority = array( $filesByPriority = array(
// Translations in theme // Translations in theme
+7 -6
View File
@@ -205,6 +205,7 @@ abstract class CacheCore
foreach ($this->keys as $k => $ttl) foreach ($this->keys as $k => $ttl)
if (preg_match('#^'.$pattern.'$#', $k)) if (preg_match('#^'.$pattern.'$#', $k))
$keys[] = $k; $keys[] = $k;
} }
// Delete keys // Delete keys
@@ -234,13 +235,13 @@ abstract class CacheCore
if (is_null($this->sql_tables_cached)) if (is_null($this->sql_tables_cached))
{ {
$this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); $this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME);
if (!is_array($this->sql_tables_cached)) if (!is_array($this->sql_tables_cached))
$this->sql_tables_cached = array(); $this->sql_tables_cached = array();
} }
// Store query results in cache if this query is not already cached // Store query results in cache if this query is not already cached
$key = md5(_COOKIE_IV_.$query); $key = md5($query);
if ($this->exists($key)) if ($this->exists($key))
return true; return true;
$this->set($key, $result); $this->set($key, $result);
@@ -250,7 +251,7 @@ abstract class CacheCore
foreach ($tables as $table) foreach ($tables as $table)
if (!isset($this->sql_tables_cached[$table][$key])) if (!isset($this->sql_tables_cached[$table][$key]))
$this->sql_tables_cached[$table][$key] = true; $this->sql_tables_cached[$table][$key] = true;
$this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); $this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached);
} }
protected function getTables($string) protected function getTables($string)
@@ -270,7 +271,7 @@ abstract class CacheCore
{ {
if (is_null($this->sql_tables_cached)) if (is_null($this->sql_tables_cached))
{ {
$this->sql_tables_cached = $this->get(_COOKIE_IV_.self::SQL_TABLES_NAME); $this->sql_tables_cached = $this->get(self::SQL_TABLES_NAME);
if (!is_array($this->sql_tables_cached)) if (!is_array($this->sql_tables_cached))
$this->sql_tables_cached = array(); $this->sql_tables_cached = array();
} }
@@ -286,7 +287,7 @@ abstract class CacheCore
} }
unset($this->sql_tables_cached[$table]); unset($this->sql_tables_cached[$table]);
} }
$this->set(_COOKIE_IV_.self::SQL_TABLES_NAME, $this->sql_tables_cached); $this->set(self::SQL_TABLES_NAME, $this->sql_tables_cached);
} }
/** /**
@@ -325,7 +326,7 @@ abstract class CacheCore
public static function clean($key) public static function clean($key)
{ {
if (strpos($key, '*') !== false) if (strpos($key, '*'))
{ {
$regexp = str_replace('\\*', '.*', preg_quote($key, '#')); $regexp = str_replace('\\*', '.*', preg_quote($key, '#'));
foreach (array_keys(Cache::$local) as $key) foreach (array_keys(Cache::$local) as $key)
+13 -15
View File
@@ -443,8 +443,7 @@ class AdminControllerCore extends Controller
if (isset($_GET) && !empty($_GET) && isset($this->table)) if (isset($_GET) && !empty($_GET) && isset($this->table))
foreach ($_GET as $key => $value) foreach ($_GET as $key => $value)
if (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->{$prefix.$key} = $value; $this->context->cookie->$key = $value;
$filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_'); $filters = $this->context->cookie->getFamily($prefix.$this->table.'Filter_');
foreach ($filters as $key => $value) foreach ($filters as $key => $value)
{ {
@@ -594,7 +593,6 @@ class AdminControllerCore extends Controller
} }
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'export_precontent' => "\xEF\xBB\xBF",
'export_headers' => $headers, 'export_headers' => $headers,
'export_content' => $content 'export_content' => $content
) )
@@ -887,11 +885,11 @@ class AdminControllerCore extends Controller
if (isset($this->context->cookie->{'submitFilter'.$this->table})) if (isset($this->context->cookie->{'submitFilter'.$this->table}))
unset($this->context->cookie->{'submitFilter'.$this->table}); unset($this->context->cookie->{'submitFilter'.$this->table});
if (isset($this->context->cookie->{$prefix.$this->table.'Orderby'})) if (isset($this->context->cookie->{$this->table.'Orderby'}))
unset($this->context->cookie->{$prefix.$this->table.'Orderby'}); unset($this->context->cookie->{$this->table.'Orderby'});
if (isset($this->context->cookie->{$prefix.$this->table.'Orderway'})) if (isset($this->context->cookie->{$this->table.'Orderway'}))
unset($this->context->cookie->{$prefix.$this->table.'Orderway'}); unset($this->context->cookie->{$this->table.'Orderway'});
unset($_POST); unset($_POST);
$this->_filter = false; $this->_filter = false;
@@ -2047,11 +2045,11 @@ class AdminControllerCore extends Controller
if (!Validate::isTableOrIdentifier($this->table)) if (!Validate::isTableOrIdentifier($this->table))
throw new PrestaShopException(sprintf('Table name %s is invalid:', $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 (empty($order_by))
{ {
if ($this->context->cookie->{$prefix.$this->table.'Orderby'}) if ($this->context->cookie->{$this->table.'Orderby'})
$order_by = $this->context->cookie->{$prefix.$this->table.'Orderby'}; $order_by = $this->context->cookie->{$this->table.'Orderby'};
elseif ($this->_orderBy) elseif ($this->_orderBy)
$order_by = $this->_orderBy; $order_by = $this->_orderBy;
else else
@@ -2060,8 +2058,8 @@ class AdminControllerCore extends Controller
if (empty($order_way)) if (empty($order_way))
{ {
if ($this->context->cookie->{$prefix.$this->table.'Orderway'}) if ($this->context->cookie->{$this->table.'Orderway'})
$order_way = $this->context->cookie->{$prefix.$this->table.'Orderway'}; $order_way = $this->context->cookie->{$this->table.'Orderway'};
elseif ($this->_orderWay) elseif ($this->_orderWay)
$order_way = $this->_orderWay; $order_way = $this->_orderWay;
else else
@@ -2300,7 +2298,7 @@ class AdminControllerCore extends Controller
else else
{ {
$fieldValue = $this->getFieldValue($obj, $input['name']); $fieldValue = $this->getFieldValue($obj, $input['name']);
if ($fieldValue === false && isset($input['default_value'])) if (empty($fieldValue) && isset($input['default_value']))
$fieldValue = $input['default_value']; $fieldValue = $input['default_value'];
$this->fields_value[$input['name']] = $fieldValue; $this->fields_value[$input['name']] = $fieldValue;
} }
@@ -2322,9 +2320,9 @@ class AdminControllerCore extends Controller
public function getFieldValue($obj, $key, $id_lang = null) public function getFieldValue($obj, $key, $id_lang = null)
{ {
if ($id_lang) if ($id_lang)
$default_value = ($obj->id && isset($obj->{$key}[$id_lang])) ? $obj->{$key}[$id_lang] : false; $default_value = ($obj->id && isset($obj->{$key}[$id_lang])) ? $obj->{$key}[$id_lang] : '';
else else
$default_value = isset($obj->{$key}) ? $obj->{$key} : false; $default_value = isset($obj->{$key}) ? $obj->{$key} : '';
return Tools::getValue($key.($id_lang ? '_'.$id_lang : ''), $default_value); return Tools::getValue($key.($id_lang ? '_'.$id_lang : ''), $default_value);
} }
+1 -1
View File
@@ -176,7 +176,7 @@ abstract class ControllerCore
if ($this->ajax) if ($this->ajax)
{ {
$action = Tools::getValue('action'); $action = Tools::getValue('action');
if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true))) if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true)))
$this->{'displayAjax'.$action}(); $this->{'displayAjax'.$action}();
elseif (method_exists($this, 'displayAjax')) elseif (method_exists($this, 'displayAjax'))
$this->displayAjax(); $this->displayAjax();
+2 -5
View File
@@ -398,7 +398,7 @@ class FrontControllerCore extends Controller
$this->displayRestrictedCountryPage(); $this->displayRestrictedCountryPage();
if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess()) if (Tools::isSubmit('live_edit') && !$this->checkLiveEditAccess())
Tools::redirect('index.php?controller=404'); die(Tools::displayError());
$this->iso = $iso; $this->iso = $iso;
@@ -705,7 +705,7 @@ class FrontControllerCore extends Controller
$this->addJS(_THEME_MOBILE_JS_DIR_.'jqm-docs.js'); $this->addJS(_THEME_MOBILE_JS_DIR_.'jqm-docs.js');
$this->addJS(_PS_JS_DIR_.'tools.js'); $this->addJS(_PS_JS_DIR_.'tools.js');
$this->addJS(_THEME_MOBILE_JS_DIR_.'global.js'); $this->addJS(_THEME_MOBILE_JS_DIR_.'global.js');
$this->addjqueryPlugin('fancybox'); $this->addjqueryPlugin('fancybox');
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'jquery.mobile-1.3.0.min.css', 'all'); $this->addCSS(_THEME_MOBILE_CSS_DIR_.'jquery.mobile-1.3.0.min.css', 'all');
$this->addCSS(_THEME_MOBILE_CSS_DIR_.'jqm-docs.css', 'all'); $this->addCSS(_THEME_MOBILE_CSS_DIR_.'jqm-docs.css', 'all');
@@ -721,9 +721,6 @@ class FrontControllerCore extends Controller
$this->setMobileMedia(); $this->setMobileMedia();
return true; return true;
} }
if (Tools::file_exists_cache(_PS_ROOT_DIR_.Tools::str_replace_once(__PS_BASE_URI__, DIRECTORY_SEPARATOR, _THEME_CSS_DIR_.'grid_prestashop.css')))
$this->addCSS(_THEME_CSS_DIR_.'grid_prestashop.css', 'all');
$this->addCSS(_THEME_CSS_DIR_.'global.css', 'all'); $this->addCSS(_THEME_CSS_DIR_.'global.css', 'all');
$this->addjquery(); $this->addjquery();
$this->addjqueryPlugin('easing'); $this->addjqueryPlugin('easing');
+6 -8
View File
@@ -60,7 +60,7 @@ abstract class ModuleCore
/** @var int need_instance */ /** @var int need_instance */
public $need_instance = 1; public $need_instance = 1;
/** @var string Admin tab corresponding to the module */ /** @var string Admin tab correponding to the module */
public $tab = null; public $tab = null;
/** @var boolean Status */ /** @var boolean Status */
@@ -139,9 +139,8 @@ abstract class ModuleCore
public function __construct($name = null, Context $context = null) public function __construct($name = null, Context $context = null)
{ {
// Load context and smarty // Load context and smarty
$this->context = $context ? $context : Context::getContext(); $this->context = $context ? $context : Context::getContext();
if (is_object($this->context->smarty)) $this->smarty = $this->context->smarty->createData($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 the module has no name we gave him its id as name
if ($this->name == null) if ($this->name == null)
@@ -153,9 +152,8 @@ abstract class ModuleCore
// If cache is not generated, we generate it // If cache is not generated, we generate it
if (self::$modules_cache == null && !is_array(self::$modules_cache)) 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 // 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_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;
$sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m'; $sql = 'SELECT m.`id_module`, m.`name`, ('.$sql_limit_shop.') as total FROM `'._DB_PREFIX_.'module` m';
// Result is cached // Result is cached
@@ -1597,7 +1595,7 @@ abstract class ModuleCore
{ {
if ($name === null) if ($name === null)
$name = $this->name; $name = $this->name;
return $name.'|'.(int)Tools::usingSecureMode().'|'.(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) public function display($file, $template, $cacheId = null, $compileId = null)
+1 -1
View File
@@ -175,7 +175,7 @@ class OrderCore extends ObjectModel
'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'current_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'), 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5'),
'payment' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), 'payment' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true),
'module' => array('type' => self::TYPE_STRING, 'validate' => 'isModuleName', 'required' => true), 'module' => array('type' => self::TYPE_STRING),
'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'recyclable' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'gift' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'), 'gift_message' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage'),
+8 -18
View File
@@ -117,30 +117,20 @@ class OrderHistoryCore extends ObjectModel
{ {
$assign[$key]['name'] = $product_download->display_filename; $assign[$key]['name'] = $product_download->display_filename;
$dl_link = $product_download->getTextLink(false, $virtual_product['download_hash']) $dl_link = $product_download->getTextLink(false, $virtual_product['download_hash'])
.'&id_order='.(int)$order->id .'&id_order='.$order->id
.'&secure_key='.$order->secure_key; .'&secure_key='.$order->secure_key;
$assign[$key]['link'] = $dl_link; $assign[$key]['link'] = $dl_link;
if ($virtual_product['date_expiration'] != '0000-00-00 00:00:00') if ($virtual_product['download_deadline'] != '0000-00-00 00:00:00')
$assign[$key]['deadline'] = Tools::displayDate($virtual_product['date_expiration '], $order->id_lang); $assign[$key]['deadline'] = Tools::displayDate($virtual_product['download_deadline'], $order->id_lang);
if ($product_download->nb_downloadable != 0) if ($product_download->nb_downloadable != 0)
$assign[$key]['downloadable'] = (int)$product_download->nb_downloadable; $assign[$key]['downloadable'] = $product_download->nb_downloadable;
} }
} }
$customer = new Customer((int)$order->id_customer); $customer = new Customer((int)$order->id_customer);
$context->smarty->assign('virtualProducts', $assign);
$links = '<ul>'; $context->smarty->assign('id_order', $order->id);
foreach($assign as $product) $iso = Language::getIsoById((int)($order->id_lang));
{ $links = $context->smarty->fetch(_PS_MAIL_DIR_.$iso.'/download-product.tpl');
$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( $data = array(
'{lastname}' => $customer->lastname, '{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname, '{firstname}' => $customer->firstname,
+6 -7
View File
@@ -384,22 +384,21 @@ class OrderInvoiceCore extends ObjectModel
*/ */
public function getEcoTaxTaxesBreakdown() public function getEcoTaxTaxesBreakdown()
{ {
$result = Db::getInstance()->executeS(' $res = Db::getInstance()->executeS('
SELECT `ecotax_tax_rate` as `rate`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_excl`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_incl` SELECT `ecotax_tax_rate` as `rate`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_excl`, SUM(`ecotax` * `product_quantity`) as `ecotax_tax_incl`
FROM `'._DB_PREFIX_.'order_detail` FROM `'._DB_PREFIX_.'order_detail`
WHERE `id_order` = '.(int)$this->id_order.' WHERE `id_order` = '.(int)$this->id_order.'
AND `id_order_invoice` = '.(int)$this->id.' AND `id_order_invoice` = '.(int)$this->id.'
GROUP BY `ecotax_tax_rate`'); GROUP BY `ecotax_tax_rate`'
);
$taxes = array(); if ($res)
foreach ($result as $row) foreach ($res as &$row)
if ($row['ecotax_tax_excl'] > 0)
{ {
$row['ecotax_tax_incl'] = Tools::ps_round($row['ecotax_tax_excl'] + ($row['ecotax_tax_excl'] * $row['rate'] / 100), 2); $row['ecotax_tax_incl'] = Tools::ps_round($row['ecotax_tax_excl'] + ($row['ecotax_tax_excl'] * $row['rate'] / 100), 2);
$row['ecotax_tax_excl'] = Tools::ps_round($row['ecotax_tax_excl'], 2); $row['ecotax_tax_excl'] = Tools::ps_round($row['ecotax_tax_excl'], 2);
$taxes[] = $row;
} }
return $taxes; return $res;
} }
/** /**
+1 -1
View File
@@ -308,7 +308,7 @@ class ShopCore extends ObjectModel
WHERE (su.domain = \''.$host.'\' OR su.domain_ssl = \''.$host.'\') WHERE (su.domain = \''.$host.'\' OR su.domain_ssl = \''.$host.'\')
AND s.active = 1 AND s.active = 1
AND s.deleted = 0 AND s.deleted = 0
ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC'; ORDER BY LENGTH(uri) DESC';
$id_shop = ''; $id_shop = '';
$found_uri = ''; $found_uri = '';
@@ -33,7 +33,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
/** /**
* @var string The extension of the image to display * @var string The extension of the image to display
*/ */
protected $imgExtension; protected $imgExtension = 'jpg';
/** /**
* @var array The type of images (general, categories, manufacturers, suppliers, stores...) * @var array The type of images (general, categories, manufacturers, suppliers, stores...)
@@ -119,18 +119,10 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
// display image content if needed // display image content if needed
else if ($this->imgToDisplay) else if ($this->imgToDisplay)
{ {
if(empty($this->imgExtension)){
$imginfo = getimagesize($this->imgToDisplay);
$this->imgExtension = image_type_to_extension($imginfo[2],false);
}
$imageResource = false; $imageResource = false;
$types = array( $types = array('jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'),
'jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), 'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif')
'jpeg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), );
'png' => array('function' => 'imagecreatefrompng', 'Content-Type' => 'image/png'),
'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif')
);
if (array_key_exists($this->imgExtension, $types)) if (array_key_exists($this->imgExtension, $types))
$imageResource = @$types[$this->imgExtension]['function']($this->imgToDisplay); $imageResource = @$types[$this->imgExtension]['function']($this->imgToDisplay);
+2 -2
View File
@@ -71,11 +71,11 @@ define('_THEME_LANG_DIR_', _PS_IMG_.'l/');
define('_THEME_COL_DIR_', _PS_IMG_.'co/'); define('_THEME_COL_DIR_', _PS_IMG_.'co/');
define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/'); define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/');
define('_SUPP_DIR_', _PS_IMG_.'su/'); define('_SUPP_DIR_', _PS_IMG_.'su/');
define('_PS_PROD_IMG_', _PS_IMG_.'p/'); define('_PS_PROD_IMG_', 'img/p/');
/* Other URLs */ /* Other URLs */
define('_PS_JS_DIR_', __PS_BASE_URI__.'js/'); define('_PS_JS_DIR_', __PS_BASE_URI__.'js/');
define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/'); define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/');
define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/'); define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/');
define('_MAIL_DIR_', __PS_BASE_URI__.'mails/'); define('_MAIL_DIR_', __PS_BASE_URI__.'mails/');
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/'); define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');
-2
View File
@@ -32,8 +32,6 @@ global $smarty;
$smarty = new Smarty(); $smarty = new Smarty();
$smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); $smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile');
$smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); $smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache');
if (!Tools::getSafeModeStatus())
$smarty->use_sub_dirs = true;
$smarty->setConfigDir(_PS_SMARTY_DIR_.'configs'); $smarty->setConfigDir(_PS_SMARTY_DIR_.'configs');
$smarty->caching = false; $smarty->caching = false;
$smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false; $smarty->force_compile = (Configuration::get('PS_SMARTY_FORCE_COMPILE') == _PS_SMARTY_FORCE_COMPILE_) ? true : false;
+2 -3
View File
@@ -101,15 +101,15 @@ class AdminCartsControllerCore extends AdminController
{ {
if (!($cart = $this->loadObject(true))) if (!($cart = $this->loadObject(true)))
return; return;
$customer = new Customer($cart->id_customer); $customer = new Customer($cart->id_customer);
$currency = new Currency($cart->id_currency);
$this->context->cart = $cart; $this->context->cart = $cart;
$this->context->currency = $currency;
$this->context->customer = $customer; $this->context->customer = $customer;
$products = $cart->getProducts(); $products = $cart->getProducts();
$customized_datas = Product::getAllCustomizedDatas((int)$cart->id); $customized_datas = Product::getAllCustomizedDatas((int)$cart->id);
Product::addCustomizationPrice($products, $customized_datas); Product::addCustomizationPrice($products, $customized_datas);
$summary = $cart->getSummaryDetails(); $summary = $cart->getSummaryDetails();
$currency = new Currency($cart->id_currency);
/* Display order information */ /* Display order information */
$id_order = (int)Order::getOrderByCartId($cart->id); $id_order = (int)Order::getOrderByCartId($cart->id);
@@ -739,7 +739,6 @@ class AdminCartsControllerCore extends AdminController
{ {
$context = Context::getContext(); $context = Context::getContext();
$context->cart = new Cart($id_cart); $context->cart = new Cart($id_cart);
$context->currency = new Currency((int)$context->cart->id_currency);
$context->customer = new Customer((int)$context->cart->id_customer); $context->customer = new Customer((int)$context->cart->id_customer);
return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING); return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING);
} }
@@ -542,14 +542,9 @@ class AdminCategoriesControllerCore extends AdminController
{ {
$id_category = (int)Tools::getValue('id_category'); $id_category = (int)Tools::getValue('id_category');
$id_parent = (int)Tools::getValue('id_parent'); $id_parent = (int)Tools::getValue('id_parent');
// if true, we are in a root category creation // if true, we are in a root category creation
if (!$id_parent && !Tools::isSubmit('is_root_category')) 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)
{ {
if ($id_category != $id_parent) if ($id_category != $id_parent)
+14 -4
View File
@@ -219,12 +219,22 @@ class AdminCmsControllerCore extends AdminController
/* Close list table and submit button */ /* Close list table and submit button */
$this->displayListFooter($token); $this->displayListFooter($token);
} }
/**
* Modifying initial getList method to display position feature (drag and drop)
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
if ($order_by && $this->context->cookie->__get($this->table.'Orderby'))
$order_by = $this->context->cookie->__get($this->table.'Orderby');
else
$order_by = 'position';
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
}
public function postProcess() public function postProcess()
{ {
if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway'))
$this->filter = true;
if (Tools::isSubmit('viewcms') && ($id_cms = (int)Tools::getValue('id_cms')) && ($cms = new CMS($id_cms, $this->context->language->id)) && Validate::isLoadedObject($cms)) if (Tools::isSubmit('viewcms') && ($id_cms = (int)Tools::getValue('id_cms')) && ($cms = new CMS($id_cms, $this->context->language->id)) && Validate::isLoadedObject($cms))
{ {
$redir = $this->context->link->getCMSLink($cms); $redir = $this->context->link->getCMSLink($cms);
@@ -442,7 +442,7 @@ class AdminCountriesControllerCore extends AdminController
$html .= '<li> $html .= '<li>
<a href="javascript:void(0);" onClick="displayAvailableFields(\''.$class_name.'\')">'.$class_name.'</a>'; <a href="javascript:void(0);" onClick="displayAvailableFields(\''.$class_name.'\')">'.$class_name.'</a>';
foreach (AddressFormat::getValidateFields($class_name) as $name) foreach (AddressFormat::getValidateFields($class_name) as $name)
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" id="'.($class_name == 'Address' ? $name : $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>'; '.$name.'</a>';
$html .= ' $html .= '
<div class="availableFieldsList" id="availableListFieldsFor_'.$class_name.'" style="width:300px;"> <div class="availableFieldsList" id="availableListFieldsFor_'.$class_name.'" style="width:300px;">
@@ -458,7 +458,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
$extension = false; $extension = false;
foreach ($extensions as $key => $val) foreach ($extensions as $key => $val)
if (substr(Tools::strtolower($filename), -4) == $key || substr(Tools::strtolower($filename), -5) == $key) if (substr($filename, -4) == $key || substr($filename, -5) == $key)
{ {
$extension = $val; $extension = $val;
break; break;
@@ -227,7 +227,7 @@ class AdminEmployeesControllerCore extends AdminController
'name' => 'id_lang', 'name' => 'id_lang',
'required' => true, 'required' => true,
'options' => array( 'options' => array(
'query' => Language::getLanguages(false), 'query' => Language::getLanguages(),
'id' => 'id_lang', 'id' => 'id_lang',
'name' => 'name' 'name' => 'name'
) )
+11 -17
View File
@@ -28,7 +28,6 @@ class AdminImagesControllerCore extends AdminController
{ {
protected $start_time = 0; protected $start_time = 0;
protected $max_execution_time = 7200; protected $max_execution_time = 7200;
protected $display_move;
public function __construct() public function __construct()
{ {
@@ -51,9 +50,6 @@ class AdminImagesControllerCore extends AdminController
'scenes' => array('title' => $this->l('Scenes'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false), 'scenes' => array('title' => $this->l('Scenes'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false) 'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false)
); );
// No need to display the old image system if the install has been made later than 2013-03-26
$this->display_move = (defined('_PS_CREATION_DATE_') && strtotime(_PS_CREATION_DATE_) > strtotime('2013-03-26')) ? false : true;
$this->fields_options = array( $this->fields_options = array(
'images' => array( 'images' => array(
@@ -145,22 +141,20 @@ class AdminImagesControllerCore extends AdminController
'type' => 'text', 'type' => 'text',
'height' => 'px', 'height' => 'px',
'visibility' => Shop::CONTEXT_ALL 'visibility' => Shop::CONTEXT_ALL
) ),
'PS_LEGACY_IMAGES' => array(
'title' => $this->l('Use the legacy image filesystem'),
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'visibility' => Shop::CONTEXT_ALL
),
), ),
'submit' => array('title' => $this->l('Save '), 'class' => 'button'), 'submit' => array('title' => $this->l('Save '), 'class' => 'button'),
), ),
); );
if ($this->display_move)
$this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array(
'title' => $this->l('Use the legacy image filesystem'),
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
'validation' => 'isBool',
'cast' => 'intval',
'required' => false,
'type' => 'bool',
'visibility' => Shop::CONTEXT_ALL
);
$this->fields_form = array( $this->fields_form = array(
'legend' => array( 'legend' => array(
@@ -676,7 +670,7 @@ class AdminImagesControllerCore extends AdminController
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'display_regenerate' => true, 'display_regenerate' => true,
'display_move' => $this->display_move 'display_move' => true
)); ));
} }
+5 -10
View File
@@ -70,23 +70,18 @@ class AdminLoginControllerCore extends AdminController
if (file_exists(_PS_ADMIN_DIR_.'/../install')) if (file_exists(_PS_ADMIN_DIR_.'/../install'))
$this->context->smarty->assign('wrong_install_name', true); $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 = 'admin'.sprintf('%04d', rand(0, 9999)).'/'; $rand = sprintf('%04d', rand(0, 9999));
if (@rename(_PS_ADMIN_DIR_.'/../admin/', _PS_ADMIN_DIR_.'/../'.$rand)) if (@rename(_PS_ADMIN_DIR_.'/../admin', _PS_ADMIN_DIR_.'/../admin'.$rand))
Tools::redirectAdmin('../'.$rand); Tools::redirectAdmin('../admin'.$rand);
else else
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'wrong_folder_name' => true 'wrong_folder_name' => true
)); ));
} }
else
$rand = basename(_PS_ADMIN_DIR_).'/';
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'randomNb' => $rand, 'randomNb' => rand(0, 9999)
'adminUrl' => Tools::getCurrentUrlProtocolPrefix().Tools::getShopDomain().__PS_BASE_URI__.$rand
)); ));
// Redirect to admin panel // Redirect to admin panel
+1 -1
View File
@@ -66,7 +66,7 @@ class AdminMetaControllerCore extends AdminController
), ),
'PS_ALLOW_ACCENTED_CHARS_URL' => array( 'PS_ALLOW_ACCENTED_CHARS_URL' => array(
'title' => $this->l('Accented URL'), 'title' => $this->l('Accented URL'),
'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.').' '.$this->l('You should only activate this option if you are using non-latin characters ; for all the latin charsets, your SEO will be better without this option.'), 'desc' => $this->l('Enable if you want to allow accented characters in your friendly URLs.'),
'validation' => 'isBool', 'validation' => 'isBool',
'cast' => 'intval', 'cast' => 'intval',
'type' => 'bool' 'type' => 'bool'
+19 -21
View File
@@ -391,8 +391,6 @@ class AdminModulesControllerCore extends AdminController
$this->recursiveDeleteOnDisk($tmp_folder); $this->recursiveDeleteOnDisk($tmp_folder);
if ($success && $redirect) if ($success && $redirect)
Tools::redirectAdmin(self::$currentIndex.'&conf=8&anchor=anchor'.ucfirst($folder).'&token='.$this->token); Tools::redirectAdmin(self::$currentIndex.'&conf=8&anchor=anchor'.ucfirst($folder).'&token='.$this->token);
return $success;
} }
protected function recursiveDeleteOnDisk($dir) protected function recursiveDeleteOnDisk($dir)
@@ -602,14 +600,25 @@ class AdminModulesControllerCore extends AdminController
foreach ($modules as $name) foreach ($modules as $name)
{ {
$full_report = null; $full_report = null;
if ($key == 'update')
{
if (ConfigurationTest::test_dir('modules/'.$name, true, $full_report))
Tools::deleteDirectory('../modules/'.$name.'/');
else
{
$module = Module::getInstanceByName(urldecode($name));
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded : ", $module->displayName)).$full_report;
continue;
}
}
// If Addons module, download and unzip it before installing it // If Addons module, download and unzip it before installing it
if (!file_exists('../modules/'.$name.'/'.$name.'.php') || $key == 'update') if (!file_exists('../modules/'.$name.'/'.$name.'.php'))
{ {
$filesList = array( $filesList = array(
array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
); );
foreach ($filesList as $f) foreach ($filesList as $f)
if (file_exists(_PS_ROOT_DIR_.$f['file'])) if (file_exists(_PS_ROOT_DIR_.$f['file']))
{ {
@@ -619,19 +628,12 @@ class AdminModulesControllerCore extends AdminController
foreach ($xml->module as $modaddons) foreach ($xml->module as $modaddons)
if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0)) if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0))
{ {
$download_ok = false;
if ($f['loggedOnAddons'] == 0) if ($f['loggedOnAddons'] == 0)
if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id))))) if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id)))))
$download_ok = true; $this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
elseif ($f['loggedOnAddons'] == 1 && $this->logged_on_addons) if ($f['loggedOnAddons'] == 1 && $this->logged_on_addons)
if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons)))))) if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons))))))
$download_ok = true; $this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
if (!$download_ok)
$this->errors[] = $this->l('Error on downloading the lastest version');
else
if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
} }
} }
} }
@@ -1003,7 +1005,6 @@ class AdminModulesControllerCore extends AdminController
$this->nb_modules_total = count($modules); $this->nb_modules_total = count($modules);
$module_errors = array(); $module_errors = array();
$module_success = array(); $module_success = array();
$upgrade_available = array();
// Browse modules list // Browse modules list
foreach ($modules as $km => $module) foreach ($modules as $km => $module)
@@ -1014,7 +1015,7 @@ class AdminModulesControllerCore extends AdminController
unset($modules[$km]); unset($modules[$km]);
continue; continue;
} }
// Upgrade Module process, init check if a module could be upgraded // Upgrade Module process, init check if a module could be upgraded
if (Module::initUpgradeModule($module)) if (Module::initUpgradeModule($module))
{ {
@@ -1084,8 +1085,6 @@ class AdminModulesControllerCore extends AdminController
$modules[$km]->preferences = $modules_preferences[$modules[$km]->name]; $modules[$km]->preferences = $modules_preferences[$modules[$km]->name];
} }
unset($object); unset($object);
if (isset($module->version_addons))
$upgrade_available[] = array('anchor' => ucfirst($module->name), 'name' => $module->displayName);;
} }
// Don't display categories without modules // Don't display categories without modules
@@ -1110,7 +1109,6 @@ class AdminModulesControllerCore extends AdminController
$tpl_vars = array(); $tpl_vars = array();
$tpl_vars['token'] = $this->token; $tpl_vars['token'] = $this->token;
$tpl_vars['upgrade_available'] = $upgrade_available;
$tpl_vars['currentIndex'] = self::$currentIndex; $tpl_vars['currentIndex'] = self::$currentIndex;
$tpl_vars['dirNameCurrentIndex'] = dirname(self::$currentIndex); $tpl_vars['dirNameCurrentIndex'] = dirname(self::$currentIndex);
$tpl_vars['ajaxCurrentIndex'] = str_replace('index', 'ajax-tab', self::$currentIndex); $tpl_vars['ajaxCurrentIndex'] = str_replace('index', 'ajax-tab', self::$currentIndex);
@@ -303,7 +303,7 @@ class AdminModulesPositionsControllerCore extends AdminController
{ {
$url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params); $url = $this->context->shop->getBaseURL().Dispatcher::getInstance()->createUrl('index', (int)$this->context->language->id, $live_edit_params);
if (Configuration::get('PS_REWRITING_SETTINGS')) if (Configuration::get('PS_REWRITING_SETTINGS'))
$url = str_replace('index.php', ((count(Language::getLanguages(true)) > 1)? Language::getIsoById($this->context->employee->id_lang).'/' : ''), $url); $url = str_replace('index.php', Language::getIsoById($this->context->employee->id_lang).'/', $url);
return $url; return $url;
} }
+3 -4
View File
@@ -568,9 +568,9 @@ class AdminOrdersControllerCore extends AdminController
{ {
if ($this->tabAccess['delete'] === '1') if ($this->tabAccess['delete'] === '1')
{ {
if (!Tools::isSubmit('id_order_detail') && !Tools::isSubmit('id_customization')) if (!Tools::isSubmit('id_order_detail'))
$this->errors[] = Tools::displayError('You must select a product.'); $this->errors[] = Tools::displayError('You must select a product.');
elseif (!Tools::isSubmit('cancelQuantity') && !Tools::isSubmit('cancelCustomizationQuantity')) elseif (!Tools::isSubmit('cancelQuantity'))
$this->errors[] = Tools::displayError('You must enter a quantity.'); $this->errors[] = Tools::displayError('You must enter a quantity.');
else else
{ {
@@ -597,8 +597,7 @@ class AdminOrdersControllerCore extends AdminController
foreach ($customizationList as $key => $id_order_detail) foreach ($customizationList as $key => $id_order_detail)
{ {
$full_product_list[(int)$id_order_detail] = $id_order_detail; $full_product_list[(int)$id_order_detail] = $id_order_detail;
if (isset($customizationQtyList[$key])) $full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
$full_quantity_list[(int)$id_order_detail] += $customizationQtyList[$key];
} }
if ($productList || $customizationList) if ($productList || $customizationList)
@@ -223,7 +223,7 @@ class AdminPPreferencesControllerCore extends AdminController
public function beforeUpdateOptions() public function beforeUpdateOptions()
{ {
if (!Tools::getValue('PS_STOCK_MANAGEMENT', true)) if (!Tools::getValue('PS_STOCK_MANAGEMENT'))
{ {
$_POST['PS_ORDER_OUT_OF_STOCK'] = 1; $_POST['PS_ORDER_OUT_OF_STOCK'] = 1;
$_POST['PS_DISPLAY_QTIES'] = 0; $_POST['PS_DISPLAY_QTIES'] = 0;
@@ -26,13 +26,6 @@
class AdminPerformanceControllerCore extends AdminController class AdminPerformanceControllerCore extends AdminController
{ {
public function __construct()
{
$this->className = 'Configuration';
parent::__construct();
}
public function initFieldsetSmarty() public function initFieldsetSmarty()
{ {
$this->fields_form[0]['form'] = array( $this->fields_form[0]['form'] = array(
@@ -548,7 +541,6 @@ class AdminPerformanceControllerCore extends AdminController
public function postProcess() public function postProcess()
{ {
/* PrestaShop demo mode */ /* PrestaShop demo mode */
if (_PS_MODE_DEMO_) if (_PS_MODE_DEMO_)
{ {
@@ -625,9 +617,6 @@ class AdminPerformanceControllerCore extends AdminController
{ {
if ($this->tabAccess['edit'] === '1') if ($this->tabAccess['edit'] === '1')
{ {
$theme_cache_directory = _PS_ALL_THEMES_DIR_.$this->context->shop->theme_directory.'/cache/';
if (((bool)Tools::getValue('PS_CSS_THEME_CACHE') || (bool)Tools::getValue('PS_JS_THEME_CACHE')) && !is_writable($theme_cache_directory))
$this->errors[] = Tools::displayError(sprintf($this->l('To use Smart Cache directory %s must be writable.'), realpath($theme_cache_directory)));
if (!Configuration::updateValue('PS_CSS_THEME_CACHE', (int)Tools::getValue('PS_CSS_THEME_CACHE')) || if (!Configuration::updateValue('PS_CSS_THEME_CACHE', (int)Tools::getValue('PS_CSS_THEME_CACHE')) ||
!Configuration::updateValue('PS_JS_THEME_CACHE', (int)Tools::getValue('PS_JS_THEME_CACHE')) || !Configuration::updateValue('PS_JS_THEME_CACHE', (int)Tools::getValue('PS_JS_THEME_CACHE')) ||
!Configuration::updateValue('PS_HTML_THEME_COMPRESSION', (int)Tools::getValue('PS_HTML_THEME_COMPRESSION')) || !Configuration::updateValue('PS_HTML_THEME_COMPRESSION', (int)Tools::getValue('PS_HTML_THEME_COMPRESSION')) ||
@@ -676,8 +665,9 @@ class AdminPerformanceControllerCore extends AdminController
else else
$this->errors[] = Tools::displayError('You do not have permission to edit this.'); $this->errors[] = Tools::displayError('You do not have permission to edit this.');
} }
if ((bool)Tools::getValue('ciphering_up') && Configuration::get('PS_CIPHER_ALGORITHM') != (int)Tools::getValue('PS_CIPHER_ALGORITHM')) if ((bool)Tools::getValue('ciphering_up') && Configuration::get('PS_CIPHER_ALGORITHM') != (int)Tools::getValue('PS_CIPHER_ALGORITHM'))
{ {
if ($this->tabAccess['edit'] === '1') if ($this->tabAccess['edit'] === '1')
{ {
$algo = (int)Tools::getValue('PS_CIPHER_ALGORITHM'); $algo = (int)Tools::getValue('PS_CIPHER_ALGORITHM');
@@ -803,6 +793,8 @@ class AdminPerformanceControllerCore extends AdminController
Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => '')); Hook::exec('action'.get_class($this).ucfirst($this->action).'After', array('controller' => $this, 'return' => ''));
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4'); Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
} }
else
return parent::postProcess();
} }
public function ajaxProcess() public function ajaxProcess()
@@ -193,7 +193,7 @@ class AdminProductsControllerCore extends AdminController
$this->_join .= ($join_category ? 'INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.')' : '').' $this->_join .= ($join_category ? 'INNER JOIN `'._DB_PREFIX_.'category_product` cp ON (cp.`id_product` = a.`id_product` AND cp.`id_category` = '.(int)$this->_category->id.')' : '').'
LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0 LEFT JOIN `'._DB_PREFIX_.'stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0
'.StockAvailable::addSqlShopRestriction(null, null, 'sav').') '; '.StockAvailable::addSqlShopRestriction(null, null, 'sav').') ';
$this->_select .= 'cl.name `name_category` '.($join_category ? ', cp.`position`' : '').', '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`'; $this->_select .= 'cl.name `name_category` '.($join_category ? ', cp.`position`' : '').', '.$alias_image.'.`id_image`, '.$alias.'.`price`, 0 AS price_final, sav.`quantity` as sav_quantity, '.$alias.'.`active`';
$this->_group = 'GROUP BY '.$alias.'.id_product'; $this->_group = 'GROUP BY '.$alias.'.id_product';
+1 -1
View File
@@ -206,7 +206,7 @@ class AdminScenesControllerCore extends AdminController
$this->addJqueryPlugin('autocomplete'); $this->addJqueryPlugin('autocomplete');
$this->addJqueryPlugin('imgareaselect'); $this->addJqueryPlugin('imgareaselect');
$this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' ); $this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' );
$image_to_map_desc .= '<br /><img id="large_scene_image" alt="" src="'. $image_to_map_desc .= '<br /><img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'.
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg" /><br />'; _THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg" /><br />';
$image_to_map_desc .= ' $image_to_map_desc .= '
+94 -102
View File
@@ -52,6 +52,9 @@ class AdminTranslationsControllerCore extends AdminController
/** @var array : List of theme by translation type : FRONT, BACK, ERRORS... */ /** @var array : List of theme by translation type : FRONT, BACK, ERRORS... */
protected $translations_informations = array(); protected $translations_informations = array();
/** @var array : List of theme by translation type : FRONT, BACK, ERRORS... */
protected $translations_type_for_theme = array('front', 'modules', 'pdf', 'mails');
/** @var array : List of all languages */ /** @var array : List of all languages */
protected $languages; protected $languages;
@@ -196,6 +199,7 @@ class AdminTranslationsControllerCore extends AdminController
'token' => $this->token, 'token' => $this->token,
'languages' => $this->languages, 'languages' => $this->languages,
'translations_type' => $this->translations_informations, 'translations_type' => $this->translations_informations,
'translations_type_for_theme' => $this->translations_type_for_theme,
'packs_to_install' => $packs_to_install, 'packs_to_install' => $packs_to_install,
'packs_to_update' => $packs_to_update, 'packs_to_update' => $packs_to_update,
'url_submit' => self::$currentIndex.'&token='.$this->token, 'url_submit' => self::$currentIndex.'&token='.$this->token,
@@ -582,6 +586,7 @@ class AdminTranslationsControllerCore extends AdminController
{ {
// Get instance of this tab by class name // Get instance of this tab by class name
$tab = Tab::getInstanceFromClassName($class_name); $tab = Tab::getInstanceFromClassName($class_name);
//Check if class name exists //Check if class name exists
if (isset($tab->class_name) && !empty($tab->class_name)) if (isset($tab->class_name) && !empty($tab->class_name))
{ {
@@ -682,9 +687,6 @@ class AdminTranslationsControllerCore extends AdminController
if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php' && file_put_contents(_PS_TRANSLATIONS_DIR_.'../'.$file2check['filename'], Tools::getDefaultIndexContent())) if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php' && file_put_contents(_PS_TRANSLATIONS_DIR_.'../'.$file2check['filename'], Tools::getDefaultIndexContent()))
continue; continue;
// Clear smarty modules cache
Tools::clearCache();
if (Validate::isLanguageFileName($filename)) if (Validate::isLanguageFileName($filename))
{ {
if (!Language::checkAndAddLanguage($iso_code)) if (!Language::checkAndAddLanguage($iso_code))
@@ -734,14 +736,13 @@ class AdminTranslationsControllerCore extends AdminController
$this->errors[] = Tools::displayError('The archive cannot be extracted.'). ' '.$error->message; $this->errors[] = Tools::displayError('The archive cannot be extracted.'). ' '.$error->message;
else else
{ {
if (!Language::checkAndAddLanguage($arr_import_lang[0])) if (!Language::checkAndAddLanguage($arr_import_lang[0]))
$conf = 20; $conf = 20;
else else
{ {
// Reset cache // Reset cache
Language::loadLanguages(); Language::loadLanguages();
// Clear smarty modules cache
Tools::clearCache();
AdminTranslationsController::checkAndAddMailsFiles($arr_import_lang[0], $files_list); AdminTranslationsController::checkAndAddMailsFiles($arr_import_lang[0], $files_list);
if ($tab_errors = AdminTranslationsController::addNewTabs($arr_import_lang[0], $files_list)) if ($tab_errors = AdminTranslationsController::addNewTabs($arr_import_lang[0], $files_list))
@@ -757,7 +758,7 @@ class AdminTranslationsControllerCore extends AdminController
$this->errors[] = sprintf(Tools::displayError('Cannot delete the archive %s.'), $file); $this->errors[] = sprintf(Tools::displayError('Cannot delete the archive %s.'), $file);
} }
else else
$this->errors[] = Tools::displayError('The server does not have permissions for writing.').' '.sprintf(Tools::displayError('Please check rights for %s'), dirname($file)); $this->errors[] = Tools::displayError('The server does not have permissions for writing.'. ' '.sprintf(Tools::displayError('Please check rights for %s'), dirname($file)));
} }
else else
$this->errors[] = Tools::displayError('Language not found.'); $this->errors[] = Tools::displayError('Language not found.');
@@ -784,13 +785,14 @@ class AdminTranslationsControllerCore extends AdminController
static $str_write = ''; static $str_write = '';
static $array_check_duplicate = array(); static $array_check_duplicate = array();
// Default translations and Prestashop overriding themes are distinguish
$is_default = $theme_name === self::DEFAULT_THEME_NAME ? true : false;
// Set file_name in static var, this allow to open and wright the file just one time // Set file_name in static var, this allow to open and wright the file just one time
if (!isset($cache_file[$theme_name.'-'.$file_name])) if (!isset($cache_file[$theme_name.'-'.$file_name]))
{ {
$str_write = ''; $str_write = '';
$cache_file[$theme_name.'-'.$file_name] = true; $cache_file[$theme_name.'-'.$file_name] = true;
if (!Tools::file_exists_cache(dirname($file_name)))
mkdir(dirname($file_name), 0777, true);
if (!Tools::file_exists_cache($file_name)) if (!Tools::file_exists_cache($file_name))
file_put_contents($file_name, ''); file_put_contents($file_name, '');
if (!is_writable($file_name)) if (!is_writable($file_name))
@@ -806,10 +808,10 @@ class AdminTranslationsControllerCore extends AdminController
foreach ($files as $file) foreach ($files as $file)
{ {
if (preg_match('/^(.*).(tpl|php)$/', $file) && Tools::file_exists_cache($dir.$file) && !in_array($file, self::$ignore_folder)) if (preg_match('/^(.*).(tpl|php)$/', $file) && Tools::file_exists_cache($file_path = $dir.$file) && !in_array($file, self::$ignore_folder))
{ {
// Get content for this file // Get content for this file
$content = file_get_contents($dir.$file); $content = file_get_contents($file_path);
// Get file type // Get file type
$type_file = substr($file, -4) == '.tpl' ? 'tpl' : 'php'; $type_file = substr($file, -4) == '.tpl' ? 'tpl' : 'php';
@@ -822,15 +824,15 @@ class AdminTranslationsControllerCore extends AdminController
foreach ($matches as $key) foreach ($matches as $key)
{ {
if ($theme_name) if ($is_default)
{ {
$post_key = md5(strtolower($module_name).'_'.strtolower($theme_name).'_'.strtolower($template_name).'_'.md5($key)); $post_key = md5(strtolower($module_name).'_'.self::DEFAULT_THEME_NAME.'_'.strtolower($template_name).'_'.md5($key));
$pattern = '\'<{'.strtolower($module_name).'}'.strtolower($theme_name).'>'.strtolower($template_name).'_'.md5($key).'\''; $pattern = '\'<{'.strtolower($module_name).'}prestashop>'.strtolower($template_name).'_'.md5($key).'\'';
} }
else else
{ {
$post_key = md5(strtolower($module_name).'_'.strtolower($template_name).'_'.md5($key)); $post_key = md5(strtolower($module_name).'_'.strtolower($theme_name).'_'.strtolower($template_name).'_'.md5($key));
$pattern = '\'<{'.strtolower($module_name).'}prestashop>'.strtolower($template_name).'_'.md5($key).'\''; $pattern = '\'<{'.strtolower($module_name).'}'.strtolower($theme_name).'>'.strtolower($template_name).'_'.md5($key).'\'';
} }
if (array_key_exists($post_key, $_POST) && !empty($_POST[$post_key]) && !in_array($pattern, $array_check_duplicate)) if (array_key_exists($post_key, $_POST) && !empty($_POST[$post_key]) && !in_array($pattern, $array_check_duplicate))
@@ -895,6 +897,9 @@ class AdminTranslationsControllerCore extends AdminController
// added for compatibility // added for compatibility
$GLOBALS[$name_var] = array_change_key_case($GLOBALS[$name_var]); $GLOBALS[$name_var] = array_change_key_case($GLOBALS[$name_var]);
// Default translations and Prestashop overriding themes are distinguish
$is_default = $theme_name === self::DEFAULT_THEME_NAME ? true : false;
// Thank to this var similar keys are not duplicate // Thank to this var similar keys are not duplicate
// in AndminTranslation::modules_translations array // in AndminTranslation::modules_translations array
// see below // see below
@@ -921,22 +926,19 @@ class AdminTranslationsControllerCore extends AdminController
foreach ($matches as $key) foreach ($matches as $key)
{ {
$md5_key = md5($key); $module_key = '<{'.Tools::strtolower($module_name).'}'.
$module_key = '<{'.Tools::strtolower($module_name).'}'.strtolower($theme_name).'>'.Tools::strtolower($template_name).'_'.$md5_key; strtolower($is_default ? 'prestashop' : $theme_name).'>'.Tools::strtolower($template_name).'_'.md5($key);
$default_key = '<{'.Tools::strtolower($module_name).'}prestashop>'.Tools::strtolower($template_name).'_'.$md5_key;
// to avoid duplicate entry // to avoid duplicate entry
if (!in_array($module_key, $array_check_duplicate)) if (!in_array($module_key, $array_check_duplicate))
{ {
$array_check_duplicate[] = $module_key; $array_check_duplicate[] = $module_key;
if (!isset($this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'])) if (!isset($this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad']))
$this->total_expression++; $this->total_expression++;
if ($theme_name && array_key_exists($module_key, $GLOBALS[$name_var]))
if (array_key_exists($module_key, $GLOBALS[$name_var]))
$this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$module_key], ENT_COMPAT, 'UTF-8'); $this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$module_key], ENT_COMPAT, 'UTF-8');
elseif (array_key_exists($default_key, $GLOBALS[$name_var]))
$this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$default_key], ENT_COMPAT, 'UTF-8');
else else
{ {
//d(array($module_key, $default_key, $key, $GLOBALS[$name_var]));
$this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = ''; $this->modules_translations[$theme_name][$module_name][$template_name][$key]['trad'] = '';
$this->missing_translations++; $this->missing_translations++;
} }
@@ -1123,7 +1125,7 @@ class AdminTranslationsControllerCore extends AdminController
'front' => array( 'front' => array(
'name' => $this->l('Front Office translations'), 'name' => $this->l('Front Office translations'),
'var' => '_LANG', 'var' => '_LANG',
'dir' => defined('_PS_THEME_SELECTED_DIR_') ? _PS_THEME_SELECTED_DIR_.'lang/' : '', 'dir' => _PS_THEME_SELECTED_DIR_.'lang/',
'file' => $this->lang_selected->iso_code.'.php' 'file' => $this->lang_selected->iso_code.'.php'
), ),
'back' => array( 'back' => array(
@@ -1148,28 +1150,33 @@ class AdminTranslationsControllerCore extends AdminController
'name' => $this->l('Installed modules translations'), 'name' => $this->l('Installed modules translations'),
'var' => '_MODULES', 'var' => '_MODULES',
'dir' => _PS_MODULE_DIR_, 'dir' => _PS_MODULE_DIR_,
'file' => '' 'file' => '',
'override' => array(
'dir' => _PS_THEME_SELECTED_DIR_.'modules/',
'file' => ''
)
), ),
'pdf' => array( 'pdf' => array(
'name' => $this->l('PDF translations'), 'name' => $this->l('PDF translations'),
'var' => '_LANGPDF', 'var' => '_LANGPDF',
'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/', 'dir' => _PS_TRANSLATIONS_DIR_.$this->lang_selected->iso_code.'/',
'file' => 'pdf.php' 'file' => 'pdf.php',
'override' => array(
'dir' => _PS_THEME_SELECTED_DIR_.'pdf/lang/',
'file' => $this->lang_selected->iso_code.'.php'
)
), ),
'mails' => array( 'mails' => array(
'name' => $this->l('Email templates translations'), 'name' => $this->l('Email templates translations'),
'var' => '_LANGMAIL', 'var' => '_LANGMAIL',
'dir' => _PS_MAIL_DIR_.$this->lang_selected->iso_code.'/', 'dir' => _PS_MAIL_DIR_.$this->lang_selected->iso_code.'/',
'file' => 'lang.php' 'file' => 'lang.php',
'override' => array(
'dir' => _PS_THEME_SELECTED_DIR_.'mails/'.$this->lang_selected->iso_code.'/',
'file' => 'lang.php'
)
) )
); );
if (defined('_PS_THEME_SELECTED_DIR_'))
{
$this->translations_informations['modules']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'modules/', 'file' => '');
$this->translations_informations['pdf']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'pdf/lang/', 'file' => $this->lang_selected->iso_code.'.php');
$this->translations_informations['mails']['override'] = array('dir' => _PS_THEME_SELECTED_DIR_.'mails/'.$this->lang_selected->iso_code.'/', 'file' => 'lang.php');
}
} }
/** /**
@@ -1190,15 +1197,20 @@ class AdminTranslationsControllerCore extends AdminController
// Get folder name of theme // Get folder name of theme
if (($theme = Tools::getValue('theme')) && !is_array($theme)) if (($theme = Tools::getValue('theme')) && !is_array($theme))
{ {
$theme_exists = $this->theme_exists($theme); $theme_exists = false;
if (!$theme_exists) foreach ($this->themes as $existing_theme)
if ($existing_theme->directory == $theme)
$theme_exists = true;
if ($theme_exists)
$this->theme_selected = Tools::safeOutput($theme);
else
throw new PrestaShopException(sprintf(Tools::displayError('Invalid theme "%s"'), $theme)); throw new PrestaShopException(sprintf(Tools::displayError('Invalid theme "%s"'), $theme));
$this->theme_selected = Tools::safeOutput($theme);
} }
else
$this->theme_selected = self::DEFAULT_THEME_NAME;
// Set the path of selected theme // Set the path of selected theme
if ($this->theme_selected) define('_PS_THEME_SELECTED_DIR_', _PS_ROOT_DIR_.'/themes/'.$this->theme_selected.'/');
define('_PS_THEME_SELECTED_DIR_', _PS_ROOT_DIR_.'/themes/'.$this->theme_selected.'/');
// Get type of translation // Get type of translation
if (($type = Tools::getValue('type')) && !is_array($type)) if (($type = Tools::getValue('type')) && !is_array($type))
@@ -1279,7 +1291,7 @@ class AdminTranslationsControllerCore extends AdminController
{ {
if ($this->tabAccess['edit'] === '1') if ($this->tabAccess['edit'] === '1')
// Only the PrestaShop team should write the translations into the _PS_TRANSLATIONS_DIR_ // Only the PrestaShop team should write the translations into the _PS_TRANSLATIONS_DIR_
if (!$this->theme_selected) if (($this->theme_selected == self::DEFAULT_THEME_NAME) && _PS_MODE_DEV_)
$this->writeTranslationFile(); $this->writeTranslationFile();
else else
$this->writeTranslationFile(true); $this->writeTranslationFile(true);
@@ -1319,19 +1331,22 @@ class AdminTranslationsControllerCore extends AdminController
{ {
if ($this->tabAccess['edit'] === '1') 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 // Get list of modules
if ($modules = $this->getListModules()) if ($modules = $this->getListModules())
{ {
// Get files of all modules // Get files of all modules
$arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true); $arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
// Find and write all translation modules files // Find and write all translation modules files
foreach ($arr_files as $value) foreach ($arr_files as $value)
$this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']); $this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']);
// Clear modules cache
Tools::clearCache();
// Redirect // Redirect
if (Tools::getValue('submitTranslationsModulesAndStay')) if (Tools::getValue('submitTranslationsModulesAndStay'))
$this->redirect(true); $this->redirect(true);
@@ -1394,7 +1409,7 @@ class AdminTranslationsControllerCore extends AdminController
$arr_mail_content['core_mail'] = Tools::getValue('core_mail'); $arr_mail_content['core_mail'] = Tools::getValue('core_mail');
// Get path of directory for find a good path of translation file // Get path of directory for find a good path of translation file
if (!$this->theme_selected) if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['dir']; $arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['dir'];
else else
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['override']['dir']; $arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['override']['dir'];
@@ -1405,7 +1420,7 @@ class AdminTranslationsControllerCore extends AdminController
$arr_mail_content['module_mail'] = Tools::getValue('module_mail'); $arr_mail_content['module_mail'] = Tools::getValue('module_mail');
// Get path of directory for find a good path of translation file // Get path of directory for find a good path of translation file
if (!$this->theme_selected) if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/'; $arr_mail_path['module_mail'] = $this->translations_informations['modules']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
else else
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['override']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/'; $arr_mail_path['module_mail'] = $this->translations_informations['modules']['override']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
@@ -1586,12 +1601,6 @@ class AdminTranslationsControllerCore extends AdminController
*/ */
public function initFormFront() public function initFormFront()
{ {
if (!$this->theme_exists(Tools::getValue('theme')))
{
$this->errors[] = sprintf(Tools::displayError('Invalid theme "%s"'), Tools::getValue('theme'));
return;
}
$missing_translations_front = array(); $missing_translations_front = array();
$name_var = $this->translations_informations[$this->type_selected]['var']; $name_var = $this->translations_informations[$this->type_selected]['var'];
$GLOBALS[$name_var] = $this->fileExists(); $GLOBALS[$name_var] = $this->fileExists();
@@ -1873,10 +1882,24 @@ class AdminTranslationsControllerCore extends AdminController
throw new PrestaShopException(Tools::displayError('The module directory must be writable.')); throw new PrestaShopException(Tools::displayError('The module directory must be writable.'));
$modules = array(); $modules = array();
// Get all module which are installed for to have a minimum of POST if (!_PS_MODE_DEV_ && $this->theme_selected == self::DEFAULT_THEME_NAME)
$modules = Module::getModulesInstalled(); {
foreach ($modules as &$module) // Get all module which are installed for to have a minimum of POST
$module = $module['name']; $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.'));
return $modules; return $modules;
} }
@@ -2291,7 +2314,7 @@ class AdminTranslationsControllerCore extends AdminController
if (!in_array($module_dir, self::$ignore_folder)) if (!in_array($module_dir, self::$ignore_folder))
{ {
$dir = false; $dir = false;
if ($this->theme_selected && Tools::file_exists_cache($this->translations_informations['modules']['override']['dir'].$module_dir.'/mails/')) if (($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_) && Tools::file_exists_cache($this->translations_informations['modules']['override']['dir'].$module_dir.'/mails/'))
$dir = $this->translations_informations['modules']['override']['dir'].$module_dir.'/'; $dir = $this->translations_informations['modules']['override']['dir'].$module_dir.'/';
elseif (Tools::file_exists_cache($this->translations_informations['modules']['dir'].$module_dir.'/mails/')) elseif (Tools::file_exists_cache($this->translations_informations['modules']['dir'].$module_dir.'/mails/'))
$dir = $this->translations_informations['modules']['dir'].$module_dir.'/'; $dir = $this->translations_informations['modules']['dir'].$module_dir.'/';
@@ -2350,7 +2373,7 @@ class AdminTranslationsControllerCore extends AdminController
$subject_mail = $this->getSubjectMail($dir, $file, $subject_mail); $subject_mail = $this->getSubjectMail($dir, $file, $subject_mail);
// Get path of directory for find a good path of translation file // Get path of directory for find a good path of translation file
if ($this->theme_selected && @filemtime($this->translations_informations[$this->type_selected]['override']['dir'])) if (($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_) && @filemtime($this->translations_informations[$this->type_selected]['override']['dir']))
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir']; $i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
else else
$i18n_dir = $this->translations_informations[$this->type_selected]['dir']; $i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
@@ -2516,46 +2539,19 @@ class AdminTranslationsControllerCore extends AdminController
* @param boolean $is_default set it if modules are located in root/prestashop/modules folder * @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 * This allow to distinguish overrided prestashop theme and original module
*/ */
protected function getAllModuleFiles($modules, $root_dir = null, $lang, $is_default = false) protected function getAllModuleFiles($modules, $root_dir, $lang, $is_default = false)
{ {
$array_files = array(); $array_files = array();
$initial_root_dir = $root_dir;
foreach ($modules as $module) foreach ($modules as $module)
{ {
$root_dir = $initial_root_dir; if ($module{0} != '.' && is_dir($root_dir.$module))
if ($module{0} == '.')
continue;
// First we load the default translation file
if ($root_dir == null)
{ {
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
if (is_dir($i18n_dir.$module))
$root_dir = $i18n_dir;
$lang_file = $root_dir.$module.'/translations/'.$lang.'.php';
if (!Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php') && Tools::file_exists_cache($root_dir.$module.'/'.$lang.'.php'))
$lang_file = $root_dir.$module.'/'.$lang.'.php';
@include($lang_file);
$this->getModuleTranslations();
// If a theme is selected, then the destination translation file must be in the theme
if ($this->theme_selected)
$lang_file = $this->translations_informations[$this->type_selected]['override']['dir'].$module.'/translations/'.$lang.'.php';
$this->recursiveGetModuleFiles($root_dir.$module.'/', $array_files, $module, $lang_file, $is_default);
}
$root_dir = $initial_root_dir;
// Then we load the overriden translation file
if ($this->theme_selected && isset($this->translations_informations[$this->type_selected]['override']))
{
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
if (is_dir($i18n_dir.$module))
$root_dir = $i18n_dir;
if (Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php')) if (Tools::file_exists_cache($root_dir.$module.'/translations/'.$lang.'.php'))
$lang_file = $root_dir.$module.'/translations/'.$lang.'.php'; $lang_file = $root_dir.$module.'/translations/'.$lang.'.php';
elseif (Tools::file_exists_cache($root_dir.$module.'/'.$lang.'.php')) else
$lang_file = $root_dir.$module.'/'.$lang.'.php'; $lang_file = $root_dir.$module.'/'.$lang.'.php';
@include($lang_file); @include($lang_file);
$this->getModuleTranslations(); $this->getModuleTranslations();
$this->recursiveGetModuleFiles($root_dir.$module.'/', $array_files, $module, $lang_file, $is_default); $this->recursiveGetModuleFiles($root_dir.$module.'/', $array_files, $module, $lang_file, $is_default);
} }
@@ -2568,13 +2564,20 @@ class AdminTranslationsControllerCore extends AdminController
*/ */
public function initFormModules() 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 // Get list of modules
$modules = $this->getListModules(); $modules = $this->getListModules();
if (!empty($modules)) if (!empty($modules))
{ {
// Get all modules files and include all translation files // Get all modules files and include all translation files
$arr_files = $this->getAllModuleFiles($modules, null, $this->lang_selected->iso_code, true); $arr_files = $this->getAllModuleFiles($modules, $i18n_dir, $this->lang_selected->iso_code, true);
foreach ($arr_files as $value) foreach ($arr_files as $value)
$this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir']); $this->findAndFillTranslations($value['files'], $value['theme'], $value['module'], $value['dir']);
@@ -2641,7 +2644,7 @@ class AdminTranslationsControllerCore extends AdminController
$i18n_dir = $this->translations_informations[$this->type_selected]['dir']; $i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
$default_i18n_file = $i18n_dir.$this->translations_informations[$this->type_selected]['file']; $default_i18n_file = $i18n_dir.$this->translations_informations[$this->type_selected]['file'];
if (!$this->theme_selected) if (($this->theme_selected == self::DEFAULT_THEME_NAME) && _PS_MODE_DEV_)
$i18n_file = $default_i18n_file; $i18n_file = $default_i18n_file;
else else
{ {
@@ -2736,16 +2739,5 @@ class AdminTranslationsControllerCore extends AdminController
} }
return $list; return $list;
} }
protected function theme_exists($theme)
{
if (!is_array($this->themes))
$this->themes = Theme::getThemes();
$theme_exists = false;
foreach ($this->themes as $existing_theme)
if ($existing_theme->directory == $theme)
return true;
return false;
}
} }
+5 -14
View File
@@ -104,21 +104,12 @@ class AuthControllerCore extends FrontController
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true); $countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
else else
$countries = Country::getCountries($this->context->language->id, true); $countries = Country::getCountries($this->context->language->id, true);
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
$sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
}
else
$sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT'));
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'inOrderProcess' => true, 'inOrderProcess' => true,
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'), 'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'), 'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
'sl_country' => (int)$sl_country, 'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
'countries' => $countries 'countries' => $countries
)); ));
} }
@@ -316,7 +307,7 @@ class AuthControllerCore extends FrontController
$this->context->cart->secure_key = $customer->secure_key; $this->context->cart->secure_key = $customer->secure_key;
$this->context->cart->save(); $this->context->cart->save();
$this->context->cookie->id_cart = (int)$this->context->cart->id; $this->context->cookie->id_cart = (int)$this->context->cart->id;
$this->context->cookie->write(); $this->context->cookie->update();
$this->context->cart->autosetProductAddress(); $this->context->cart->autosetProductAddress();
Hook::exec('actionAuthentication'); Hook::exec('actionAuthentication');
@@ -388,8 +379,8 @@ class AuthControllerCore extends FrontController
$this->errors[] = Tools::displayError('An account using this email address has already been registered.', false); $this->errors[] = Tools::displayError('An account using this email address has already been registered.', false);
// Preparing customer // Preparing customer
$customer = new Customer(); $customer = new Customer();
$lastnameAddress = Tools::getValue('lastname'); $lastnameAddress = $_POST['lastname'];
$firstnameAddress = Tools::getValue('firstname'); $firstnameAddress = $_POST['firstname'];
$_POST['lastname'] = Tools::getValue('customer_lastname'); $_POST['lastname'] = Tools::getValue('customer_lastname');
$_POST['firstname'] = Tools::getValue('customer_firstname'); $_POST['firstname'] = Tools::getValue('customer_firstname');
+1 -1
View File
@@ -31,7 +31,7 @@ class CompareControllerCore extends FrontController
public function setMedia() public function setMedia()
{ {
parent::setMedia(); parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'comparator.css'); $this->addCSS(_THEME_CSS_DIR_.'/comparator.css');
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
$this->addJS(_THEME_JS_DIR_.'products-comparison.js'); $this->addJS(_THEME_JS_DIR_.'products-comparison.js');
+1 -1
View File
@@ -57,7 +57,7 @@ class ContactControllerCore extends FrontController
$this->errors[] = Tools::displayError('Please select a subject from the list provided. '); $this->errors[] = Tools::displayError('Please select a subject from the list provided. ');
else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0) else if (!empty($_FILES['fileUpload']['name']) && $_FILES['fileUpload']['error'] != 0)
$this->errors[] = Tools::displayError('An error occurred during the file-upload process.'); $this->errors[] = Tools::displayError('An error occurred during the file-upload process.');
else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -4), $extension) && !in_array(substr(Tools::strtolower($_FILES['fileUpload']['name']), -5), $extension)) else if (!empty($_FILES['fileUpload']['name']) && !in_array(substr($_FILES['fileUpload']['name'], -4), $extension) && !in_array(substr($_FILES['fileUpload']['name'], -5), $extension))
$this->errors[] = Tools::displayError('Bad file extension'); $this->errors[] = Tools::displayError('Bad file extension');
else else
{ {
+1
View File
@@ -347,6 +347,7 @@ class OrderControllerCore extends ParentOrderController
$this->context->smarty->assign( $this->context->smarty->assign(
array( array(
'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0) 'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0)
)); ));
} }
+3 -26
View File
@@ -190,13 +190,6 @@ class OrderOpcControllerCore extends ParentOrderController
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); $this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice'));
if (!$this->context->cart->update()) if (!$this->context->cart->update())
$this->errors[] = Tools::displayError('An error occurred while updating your cart.'); $this->errors[] = Tools::displayError('An error occurred while updating your cart.');
$infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery));
if (isset($infos['id_country']) && $infos['id_country'])
{
$country = new Country((int)$infos['id_country']);
$this->context->country = $country;
}
// Address has changed, so we check if the cart rules still apply // Address has changed, so we check if the cart rules still apply
CartRule::autoRemoveFromCart($this->context); CartRule::autoRemoveFromCart($this->context);
@@ -323,7 +316,7 @@ class OrderOpcControllerCore extends ParentOrderController
// If a rule offer free-shipping, force hidding shipping prices // If a rule offer free-shipping, force hidding shipping prices
$free_shipping = false; $free_shipping = false;
foreach ($this->context->cart->getCartRules() as $rule) foreach ($this->context->cart->getCartRules() as $rule)
if ($rule['free_shipping'] && !$rule['carrier_restriction']) if ($rule['free_shipping'])
{ {
$free_shipping = true; $free_shipping = true;
break; break;
@@ -364,8 +357,7 @@ class OrderOpcControllerCore extends ParentOrderController
$this->_assignPayment(); $this->_assignPayment();
Tools::safePostVars(); Tools::safePostVars();
$blocknewsletter = Module::getInstanceByName('blocknewsletter'); $this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active);
$this->context->smarty->assign('newsletter', (bool)($blocknewsletter && $blocknewsletter->active));
$this->_processAddressFormat(); $this->_processAddressFormat();
$this->setTemplate(_PS_THEME_DIR_.'order-opc.tpl'); $this->setTemplate(_PS_THEME_DIR_.'order-opc.tpl');
@@ -413,11 +405,9 @@ class OrderOpcControllerCore extends ParentOrderController
if (!$this->isLogged) if (!$this->isLogged)
{ {
$carriers = $this->context->cart->simulateCarriersOutput(); $carriers = $this->context->cart->simulateCarriersOutput();
$oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'HOOK_EXTRACARRIER' => null, 'HOOK_EXTRACARRIER' => null,
'HOOK_EXTRACARRIER_ADDR' => null, 'HOOK_EXTRACARRIER_ADDR' => null,
'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
'carriers' => $carriers, 'carriers' => $carriers,
'checked' => $this->context->cart->simulateCarrierSelectedOutput(), 'checked' => $this->context->cart->simulateCarrierSelectedOutput(),
@@ -504,20 +494,9 @@ class OrderOpcControllerCore extends ParentOrderController
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false); $wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice(); $wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
$oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
$free_shipping = false;
foreach ($this->context->cart->getCartRules() as $rule)
{
if ($rule['free_shipping'] && !$rule['carrier_restriction'])
{
$free_shipping = true;
break;
}
}
$vars = array( $vars = array(
'free_shipping' => $free_shipping, 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
'checkedTOS' => (int)($this->context->cookie->checkedTOS), 'checkedTOS' => (int)($this->context->cookie->checkedTOS),
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
@@ -534,7 +513,6 @@ class OrderOpcControllerCore extends ParentOrderController
'delivery_option' => $delivery_option, 'delivery_option' => $delivery_option,
'address_collection' => $this->context->cart->getAddressCollection(), 'address_collection' => $this->context->cart->getAddressCollection(),
'opc' => true, 'opc' => true,
'oldMessage' => isset($oldMessage['message'])? $oldMessage['message'] : '',
'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array( 'HOOK_BEFORECARRIER' => Hook::exec('displayBeforeCarrier', array(
'carriers' => $carriers, 'carriers' => $carriers,
'delivery_option_list' => $this->context->cart->getDeliveryOptionList(), 'delivery_option_list' => $this->context->cart->getDeliveryOptionList(),
@@ -560,7 +538,6 @@ class OrderOpcControllerCore extends ParentOrderController
)), )),
'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl') 'carrier_block' => $this->context->smarty->fetch(_PS_THEME_DIR_.'order-carrier.tpl')
); );
Cart::addExtraCarriers($result); Cart::addExtraCarriers($result);
return $result; return $result;
} }
+4 -16
View File
@@ -30,8 +30,6 @@
class FreeOrder extends PaymentModule class FreeOrder extends PaymentModule
{ {
public $active = 1; public $active = 1;
public $name = 'free_order';
public $displayName = 'free_order';
} }
class ParentOrderControllerCore extends FrontController class ParentOrderControllerCore extends FrontController
@@ -456,15 +454,15 @@ class ParentOrderControllerCore extends FrontController
} }
protected function _assignCarrier() protected function _assignCarrier()
{ {
$address = new Address($this->context->cart->id_address_delivery); $address = new Address($this->context->cart->id_address_delivery);
$id_zone = Address::getZoneById($address->id); $id_zone = Address::getZoneById($address->id);
$carriers = $this->context->cart->simulateCarriersOutput(); $carriers = $this->context->cart->simulateCarriersOutput();
$checked = $this->context->cart->simulateCarrierSelectedOutput(); $checked = $this->context->cart->simulateCarrierSelectedOutput();
$delivery_option_list = $this->context->cart->getDeliveryOptionList(); $delivery_option_list = $this->context->cart->getDeliveryOptionList();
$this->setDefaultCarrierSelection($delivery_option_list); $this->setDefaultCarrierSelection($delivery_option_list);
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'address_collection' => $this->context->cart->getAddressCollection(), 'address_collection' => $this->context->cart->getAddressCollection(),
'delivery_option_list' => $delivery_option_list, 'delivery_option_list' => $delivery_option_list,
'carriers' => $carriers, 'carriers' => $carriers,
@@ -499,18 +497,8 @@ class ParentOrderControllerCore extends FrontController
$this->link_conditions .= '?content_only=1'; $this->link_conditions .= '?content_only=1';
else else
$this->link_conditions .= '&content_only=1'; $this->link_conditions .= '&content_only=1';
$free_shipping = false;
foreach ($this->context->cart->getCartRules() as $rule)
{
if ($rule['free_shipping'] && !$rule['carrier_restriction'])
{
$free_shipping = true;
break;
}
}
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'free_shipping' => $free_shipping,
'checkedTOS' => (int)($this->context->cookie->checkedTOS), 'checkedTOS' => (int)($this->context->cookie->checkedTOS),
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
+13 -52
View File
@@ -257,9 +257,9 @@ class ProductControllerCore extends FrontController
'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'), 'HOOK_EXTRA_LEFT' => Hook::exec('displayLeftColumnProduct'),
'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'), 'HOOK_EXTRA_RIGHT' => Hook::exec('displayRightColumnProduct'),
'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)), 'HOOK_PRODUCT_OOS' => Hook::exec('actionProductOutOfStock', array('product' => $this->product)),
'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons', array('product' => $this->product)), 'HOOK_PRODUCT_ACTIONS' => Hook::exec('displayProductButtons'),
'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab', array('product' => $this->product)), 'HOOK_PRODUCT_TAB' => Hook::exec('displayProductTab'),
'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent', array('product' => $this->product)), 'HOOK_PRODUCT_TAB_CONTENT' => Hook::exec('displayProductTabContent'),
'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'), 'display_qties' => (int)Configuration::get('PS_DISPLAY_QTIES'),
'display_ht' => !Tax::excludeTaxeOption(), 'display_ht' => !Tax::excludeTaxeOption(),
'currencySign' => $this->context->currency->sign, 'currencySign' => $this->context->currency->sign,
@@ -340,39 +340,26 @@ class ProductControllerCore extends FrontController
{ {
$images = $this->product->getImages((int)$this->context->cookie->id_lang); $images = $this->product->getImages((int)$this->context->cookie->id_lang);
$product_images = array(); $product_images = array();
if(isset($images[0]))
$this->context->smarty->assign('mainImage', $images[0]);
foreach ($images as $k => $image) foreach ($images as $k => $image)
{ {
if ($image['cover']) if ($image['cover'])
{ {
$this->context->smarty->assign('mainImage', $image); $this->context->smarty->assign('mainImage', $images[0]);
$cover = $image; $cover = $image;
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']); $cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$image['id_image']) : $image['id_image']);
$cover['id_image_only'] = (int)$image['id_image']; $cover['id_image_only'] = (int)$image['id_image'];
} }
$product_images[(int)$image['id_image']] = $image; $product_images[(int)$image['id_image']] = $image;
} }
if (!isset($cover)) if (!isset($cover))
{ $cover = array(
if(isset($images[0])) 'id_image' => $this->context->language->iso_code.'-default',
{ 'legend' => 'No picture',
$cover = $images[0]; 'title' => 'No picture'
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$images[0]['id_image']) : $images[0]['id_image']);
$cover['id_image_only'] = (int)$images[0]['id_image'];
}
else
$cover = array(
'id_image' => $this->context->language->iso_code.'-default',
'legend' => 'No picture',
'title' => 'No picture'
); );
}
$size = Image::getSize(ImageType::getFormatedName('large')); $size = Image::getSize(ImageType::getFormatedName('large'));
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'have_image' => isset($cover['id_image'])? array((int)$cover['id_image']) : Product::getCover((int)Tools::getValue('id_product')), 'have_image' => Product::getCover((int)Tools::getValue('id_product')),
'cover' => $cover, 'cover' => $cover,
'imgWidth' => (int)$size['width'], 'imgWidth' => (int)$size['width'],
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')), 'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
@@ -445,37 +432,11 @@ class ProductControllerCore extends FrontController
else else
$combinations[$row['id_product_attribute']]['available_date'] = ''; $combinations[$row['id_product_attribute']]['available_date'] = '';
if (!isset($combination_images[$row['id_product_attribute']][0]['id_image'])) if (isset($combination_images[$row['id_product_attribute']][0]['id_image']))
$combinations[$row['id_product_attribute']]['id_image'] = -1; $combinations[$row['id_product_attribute']]['id_image'] = $combination_images[$row['id_product_attribute']][0]['id_image'];
else else
{ $combinations[$row['id_product_attribute']]['id_image'] = -1;
$combinations[$row['id_product_attribute']]['id_image'] = $id_image = (int)$combination_images[$row['id_product_attribute']][0]['id_image'];
if ($row['default_on'] && $id_image > 0)
{
if (isset($this->context->smarty->tpl_vars['images']->value))
$product_images = $this->context->smarty->tpl_vars['images']->value;
if (is_array($product_images) && isset($product_images[$id_image]))
{
$product_images[$id_image]['cover'] = 1;
$this->context->smarty->assign('mainImage', $product_images[$id_image]);
if (count($product_images))
$this->context->smarty->assign('images', $product_images);
}
if (isset($this->context->smarty->tpl_vars['cover']->value))
$cover = $this->context->smarty->tpl_vars['cover']->value;
if (is_array($cover) && is_array($product_images))
{
$product_images[$cover['id_image']]['cover'] = 0;
if (isset($product_images[$id_image]))
$cover = $product_images[$id_image];
$cover['id_image'] = (Configuration::get('PS_LEGACY_IMAGES') ? ($this->product->id.'-'.$id_image) : (int)$id_image);
$cover['id_image_only'] = (int)$id_image;
$this->context->smarty->assign('cover', $cover);
}
}
}
} }
// wash attributes list (if some attributes are unavailables and if allowed to wash it) // wash attributes list (if some attributes are unavailables and if allowed to wash it)
if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock) && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0) if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock) && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0)
{ {
@@ -655,4 +616,4 @@ class ProductControllerCore extends FrontController
} }
return $specific_prices; return $specific_prices;
} }
} }
+1 -5
View File
@@ -199,8 +199,6 @@ background: -moz-linear-gradient(center top , #F9F9F9, #ECECEC) repeat-x scroll
color: #7F7F7F; color: #7F7F7F;
font-size: 0.85em; font-size: 0.85em;
} }
.margin-form .normal-text { .margin-form .normal-text {
display: block; display: block;
padding-top: 0.2em; padding-top: 0.2em;
@@ -763,6 +761,7 @@ tr.deleted td {
} }
.row { .row {
background: #F4E6C9 url(../img/admin/news-bg.gif) repeat-x top left;
} }
.uppercase { .uppercase {
@@ -845,9 +844,6 @@ tr.deleted td {
font-weight:bold; font-weight:bold;
font-size:16px; font-size:16px;
} }
span.hint {position: relative;}
div.hint { div.hint {
position: relative; position: relative;
} }
Executable → Regular
-129
View File
@@ -23,135 +23,6 @@ International Registred Trademark & Property of PrestaShop SA
Release Notes for PrestaShop 1.5 Release Notes for PrestaShop 1.5
-------------------------------- --------------------------------
####################################
# v1.5.4.1 - (2013-04-25) #
####################################
Fixed bugs:
[-] Installer: installer now work even if no settings.inc.php file is created with an installer session already here
[-] Installer : do not select activity if not defined
[-] INSTALLER : add counter loop in update_order_messages
[-] Installer : Fix bug #PSCFV-8606 bad performance when updating messages
[-] INSTALLER : fix bug #PSCFV-7688 mailalert_customer_oos not existing in database
[-] Installer: fix installer in PT languahe
[-] Installer : Missing directory separator when upgrading images types
[-] Installer: Switch test of session.save_path to optional test
[-] INSTALLER : Fix bug, can not check rights on theme folders
[-] INSTALLER : Fix bug #PSCFV-8167 duplicates product_sqlstock INDEX
[-] FO : do not use dispatcher routes for static files
[-] FO : invoice: do not display taxes table if there is not tax to display
[-] FO : Fixed product comparator CSS
[-] Fo : Remove additionnal space in phone field value
[-] FO : fix bug #PSCFV-8684, phone not required in guest checkout when not set in BO
[-] FO: send current product to some hook like displayProductTabContent on product page #PSCFV-8825
[-] FO : Fix bug #PSCFV-8728 context country not updated after changing delivery address in OPC
[-] FO: fixed some css bug for ie7
[-] FO: Add the protocol content to the cache id of modules #PSCFV-8810
[-] FO : empty cache getContextualValue_ when updating cart quantity
[-] FO : Disable confirm order when already clicked
[-] FO : address alias lost
[-] FO : Undefined free_shipping in POC when updateQty
[-] Fo : Fix big pic alt with jqzoom
[-] FO : Class free order name for validateOrder
[-] FO : First part of fix #PSCFV-8636, cart rule on specifice carrier / all carriers
[-] FO : Fix bug #PSCFV-8623 : Cart rule without code is applied automatically
[-] FO : add cart rul when cart rul has several groups
[-] FO: Fix bug too much call of updateCartSummary when OPC and cart rule
[-] Fo : Fix undefined var in cart-summary when updating id_address_delivery
[-] FO : Fix login cookie issues
[-] FO: fixed bug #PSCFV-3238 - compareController typo
[-] FO: Fix #PSCFV-8722 displayed specific prices on product page was sometimes wrong
[-] FO : Fix bug #PSCFV-8589 do not loose max level depth when upgrading
[-] FO : standardize behavior of selected country in the list when create a new address
[-] FO: fixed bug DOCTYPE line - #PSCFV-8602
[-] FO: Fix htaccess generation when disable mod_security is selected #PSCFV-8675
[-] FO: Don't display vat_number field if not required for the country on address.tpl
[-] FO: Extension test on file attachment for contact form should not be case sensitive #PSCFV-8616
[-] FO : Do not fade out on bigpic source change
[-] FO : Fix bug #PSCFV-7743 and #PSCFV-8286, bigpic source change
[-] FO: fixed bug Cart Summery Borders - #PSCFV-8421
[-] FO : Fix bug #PSCFV-8286, displayImage bad selector called
[-] FO: fixed bug Solved a problem with JSON.stringify problem with IE8 - #PSCFV-8340
[-] FO : Fix bug #PSCFV-7825 removing import of grid_prestashop.css and displaying errors in AdminPerformances
[-] FO: fixed bug missing <div class="clear"></div> in product.tpl - #PSCFV-8164
[-] FO : Add ccs and js to frontcontroller for old modules
[-] FO: change logo position
[-] FO : Fix bug #PSCFV-8183 lost order message in OPC
[-] BO: Fix htaccess generation for subfolders installation
[-] BO : Fix bug witth shop address and no state in country
[-] BO : Fix bug for csv export
[-] BO : Can not set PS_ORDER_OUT_OF_STOCK in one shop
[-] BO : Bad gender image when no gender
[-] BO: Fix #PSCFV-8827 fixed price of specific price rules should be a float
[-] BO: Fix admin carts currency prices on view and listing
[-] BO : Remove typo in address formating fields links
[-] BO : Remove undefined name when module can not be installed
[-] BO: Don't delete the directory of modules before upgrade them
[-] BO: fixed bug css - #PSCFV-8737 - AdminScenes.php ~~ remove inline css forcing a border to #large_scene_image
[-] BO: Fix #PSCFV-8730 display of selected dates on the backoffice listings header - thank to pitt phunsanit for the patch
[-] BO : Deactivate backwardcompatibility module
[-] BO: PSCFV-7685 parent category for root categories after upgrade
[-] BO : Fix bug #PSCFV-8626 rename actual admin folder
[-] BO: fixed bug Cart rules - Javascript error - #PSCFV-5045
[-] BO : Fix bug #PSCFV-8620 returns with customized product
[-] BO: Fix #PSCFV-8683 order_way collusion on listing between 2 tabs
[-] BO : Fix bug : #PSCFV-8631 no download-product.tpl in languages packs
[-] BO : Fix bug #PSCFV-8540 setting cookie key in cache key
[-] BO: fixed bug In back office, in product modification page, image pane, the image list appears broken in IE8 - #PSCFV-8024
[-] BO: Fix the Htaccess rewriting generation when one shop has the rewriting enabled and the last one on the same domain not
[-] BO: fixed bug #PSCFV-8258
[-] BO: Clear cart when customer is changed in back office orders #PSCFV-8520
[-] BO : Remove warning on ProductDownload
[-] BO : fixed field value saving when value is equal to 0 #PSCFV-8530
[-] BO : Fix bug #PSCFV-8481 no live edit on index when one language is active only
[-] BO : fixed bug #PSCFV-8095 now maximum weigh for carrier is float
[-] Classes : Bug fix : OrderOpcController, check instance of blocknewsletter module
[-] Classes : Bug fix : Mobile hooks, check PayPal for payments only
[-] Core: fix redirection loop for bugged versions of mysql using column name aliases on order by
[-] CORE : Fix bug #PSCFV-8636 again, cart rule with a reduction and free shipping
[-] CORE : Fix bug last part #PSCFV-8636, cart rule with a reduction and free shipping
[-] CORE : Fix bug #PSCFV-5624 set order reference to CHAR(10)
[-] CORE : fixed bug #PSCFV-8475 - Email templates with {shop_url} append url with index.php
[-] Core: Cache of Cart::getPackageList is now per cart
[-] Core: Local cache could never be totally cleaned
[-] MO: homefeatured - numbers are now the same
[-] MO: Fix product cover image on blockviewed with multishop
[-] MO : Fix rand parameter in favorite module js
[-] MO : Fix bug #PSCFV-8430 bad post type ajax request, thanks to maofree
[-] MO : Fix bug #PSCFV-8399 dictinct categegories in module blockcategories
Improved/changed features:
[*] Installer : Set context in upgrader
[*] Installer: Add PHP CLI installer
[*] FO : one_phone_at_least should be set
[*] FO : add steps to authentication pull request 002f468958 thanks to radovanx
[*] FO: use subdirectory per template for smarty cache
[*] FO : Check if grid_prestashop.css is available in theme before including
[*] FO : Retrocompat for default theme 1.4.10
[*] BO : Add block "close_td" in list_content.tpl [*] BO : Add block "close_td" in list_content.tpl {block name="td_content"} ..... {/block} {block name="close_td"} {/block} So now we can override "td" and "/td" tags. So we can create "td" "a" ... content.... "/a" "/td" when overriding the block open-td and close-td and we can use "a" tag with "href" rather than "onclick" to create view links in the list. And the user can choose to open the link in another tab or window.
[*] BO: The translation of modules are now made in the theme if modules are overrided or directly in the module folder
[*] BO: List all modules with an upgrade available on AdminModules header
[*] TR : Removed hard-coded dot in history.tpl
[*] TR : Improved English text of installer
[*] TR : added russian installer tabs
[*] TR : Fixed wrong use of translation functions in AdminTranslationsController
[*] TR : Added tab translations for installer languages
Added Features:
[+] BO: show all languages in setting of employee
#################################### ####################################
# v1.5.4.0 - (2013-03-26) # # v1.5.4.0 - (2013-03-26) #
#################################### ####################################
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.5.4.1 NAME: Prestashop 1.5.4.0
VERSION: 1.5.4.1 VERSION: 1.5.4.0
VORBEREITUNG VORBEREITUNG
=========== ===========
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.5.4.1 NAME: Prestashop 1.5.4.0
VERSION: 1.5.4.1 VERSION: 1.5.4.0
PREPARATION PREPARATION
=========== ===========
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.5.4.1 NAME: Prestashop 1.5.4.0
VERSION: 1.5.4.1 VERSION: 1.5.4.0
PREPARACI�N PREPARACI�N
=========== ===========
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.5.4.1 NAME: Prestashop 1.5.4.0
VERSION: 1.5.4.1 VERSION: 1.5.4.0
PREPARATION PREPARATION
=========== ===========
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.5.4.1 NAME: Prestashop 1.5.4.0
VERSION: 1.5.4.1 VERSION: 1.5.4.0
PREPARAZIONE PREPARAZIONE
=========== ===========
-18
View File
@@ -1,18 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Boutique propuls&eacute;e par PrestaShop" />
<link rel="shortcut icon" href="/img/favicon.ico" />
</head>
<body>
<div id="maintenance" style="margin:0 auto;width:940px;font:normal 30px Arial, Verdana, sans-serif;color:#333;">
<p><img src="/img/logo.jpg" width="209" height="52" alt="logo" /><br /><br /></p>
<p id="message" style="margin:0 20px;padding:50px 310px 0 0;height:360px;background:url(/img/bg_500.png) no-repeat 100% 0 #fff">
Oops, something went wrong.<br /><br />
Try to refresh this page or feel free to contact us if the problem persists.
</p>
<span style="clear:both;">&nbsp;</span>
</div>
</body>
</html>
-1
View File
@@ -34,7 +34,6 @@ else
{ {
$controller = new FrontController(); $controller = new FrontController();
$controller->init(); $controller->init();
$controller->setMedia();
} }
Tools::displayFileAsDeprecated(); Tools::displayFileAsDeprecated();
$controller->displayHeader(); $controller->displayHeader();
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

-176
View File
@@ -1,176 +0,0 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
abstract class InstallControllerConsole
{
/**
* @var array List of installer steps
*/
protected static $steps = array('process');
protected static $instances = array();
/**
* @var string Current step
*/
public $step;
/**
* @var array List of errors
*/
public $errors = array();
/**
* @var InstallController
*/
public $controller;
/**
* @var InstallSession
*/
public $session;
/**
* @var InstallLanguages
*/
public $language;
/**
* @var InstallAbstractModel
*/
public $model;
/**
* Validate current step
*/
abstract public function validate();
final public static function execute($argc, $argv)
{
if (!($argc-1))
{
$available_arguments = Datas::getInstance()->getArgs();
echo 'Arguments available:'."\n";
foreach ($available_arguments as $key => $arg)
{
$name = isset($arg['name']) ? $arg['name'] : $key;
echo '--'.$name."\t".(isset($arg['help']) ? $arg['help'] : '').(isset($arg['default']) ? "\t".'(Default: '.$arg['default'].')' : '')."\n";
}
exit;
}
$errors = Datas::getInstance()->getAndCheckArgs($argv);
if (Datas::getInstance()->show_license)
{
echo strip_tags(file_get_contents(_PS_INSTALL_PATH_.'theme/views/license_content.phtml'));
exit;
}
if ($errors !== true)
{
if (count($errors))
foreach ($errors as $error)
echo $error."\n";
exit;
}
// Include all controllers
foreach (self::$steps as $step)
{
if (!file_exists(_PS_INSTALL_CONTROLLERS_PATH_.'console/'.$step.'.php'))
throw new PrestashopInstallerException("Controller file 'console/{$step}.php' not found");
require_once _PS_INSTALL_CONTROLLERS_PATH_.'console/'.$step.'.php';
$classname = 'InstallControllerConsole'.$step;
self::$instances[$step] = new $classname($step);
}
$datas = Datas::getInstance();
/* redefine HTTP_HOST */
$_SERVER['HTTP_HOST'] = $datas->http_host;
@date_default_timezone_set($datas->timezone);
if (!$current_step = $datas->step)
return false;
self::$instances[$current_step]->process();
}
final public function __construct($step)
{
$this->step = $step;
$this->datas = Datas::getInstance();
// Set current language
$this->language = InstallLanguages::getInstance();
if (!$this->datas->language)
die('No language defined');
$this->language->setLanguage($this->datas->language);
$this->init();
}
/**
* Initialize model
*/
public function init()
{
}
public function printErrors()
{
$errors = $this->model_install->getErrors();
if (count($errors))
{
if (!is_array($errors))
$errors = array($errors);
echo 'Errors :'."\n";
foreach ($errors as $error_process)
foreach ($error_process as $error)
echo $error."\n";
die;
}
}
/**
* Get translated string
*
* @param string $str String to translate
* @param ... All other params will be used with sprintf
* @return string
*/
public function l($str)
{
$args = func_get_args();
return call_user_func_array(array($this->language, 'l'), $args);
}
public function process()
{
}
}
-203
View File
@@ -1,203 +0,0 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class Datas
{
private static $instance = null;
protected static $available_args = array(
'step' => array(
'name' => 'step',
'default' => 'process',
'validate' => 'isGenericName',
),
'language' => array(
'default' => 'en',
'validate' => 'isLanguageIsoCode',
'alias' => 'l',
'help' => 'language iso code',
),
'timezone' => array(
'default' => 'Europe/Paris',
'alias' => 't',
),
'http_host' => array(
'name' => 'domain',
'validate' => 'isGenericName',
'default' => 'localhost',
),
'database_server' => array(
'name' => 'db_server',
'default' => 'localhost',
'validate' => 'isGenericName',
'alias' => 'h',
),
'database_login' => array(
'name' => 'db_user',
'alias' => 'u',
'default' => 'root',
'validate' => 'isGenericName',
),
'database_password' => array(
'name' => 'db_password',
'alias' => 'p',
'default' => '',
),
'database_name' => array(
'name' => 'db_name',
'alias' => 'd',
'default' => 'prestashop',
'validate' => 'isGenericName',
),
'database_clear' => array(
'name' => 'db_clear',
'default' => '1',
'validate' => 'isInt',
'help' => 'Drop existing tables'
),
'database_prefix' => array(
'name' => 'prefix',
'default' => 'ps_',
'validate' => 'isGenericName',
),
'database_engine' => array(
'name' => 'engine',
'validate' => 'isMySQLEngine',
'default' => 'InnoDB',
'help' => 'InnoDB/MyISAM',
),
'shop_name' => array(
'name' => 'name',
'validate' => 'isGenericName',
'default' => 'PrestaShop',
),
'shop_activity' => array(
'name' => 'activity',
'default' => 0,
'validate' => 'isInt',
),
'shop_country' => array(
'name' => 'country',
'validate' => 'isLanguageIsoCode',
'default' => 'fr',
),
'admin_firstname' => array(
'name' => 'firstname',
'validate' => 'isName',
'default' => 'John',
),
'admin_lastname' => array(
'name' => 'lastname',
'validate' => 'isName',
'default' => 'Doe',
),
'admin_password' => array(
'name' => 'password',
'validate' => 'isPasswd',
'default' => '0123456789',
),
'admin_email' => array(
'name' => 'email',
'validate' => 'isEmail',
'default' => 'pub@prestashop.com'
),
'show_license' => array(
'name' => 'license',
'default' => 0,
'help' => 'show PrestaShop license'
),
'newsletter' => array(
'name' => 'newsletter',
'default' => 1,
'help' => 'get news from PrestaShop',
),
);
protected $datas = array();
public function __get($key)
{
if (isset($this->datas[$key]))
return $this->datas[$key];
return false;
}
public function __set($key, $value)
{
$this->datas[$key] = $value;
}
public static function getInstance()
{
if (Datas::$instance === null)
Datas::$instance = new Datas();
return Datas::$instance;
}
public static function getArgs()
{
return Datas::$available_args;
}
public function getAndCheckArgs($argv)
{
if (!$argv)
return false;
$args_ok = array();
foreach ($argv as $arg)
{
if (!preg_match('/^--([^=\'"><|`]+)(?:=([^=\'"><|`]+)|(?!license))/i', trim($arg), $res))
continue;
if ($res[1] == 'license' && !isset($res[2]))
$res[2] = 1;
$args_ok[$res[1]] = $res[2];
}
$errors = array();
foreach (Datas::getArgs() as $key => $row)
{
if (isset($row['name']))
$name = $row['name'];
else
$name = $key;
if (!isset($args_ok[$name]))
{
if (!isset($row['default']))
$errors[] = 'Field '.$row['name'].' is empty';
else
$this->$key = $row['default'];
}
elseif (isset($row['validate']) && !call_user_func(array('Validate', $row['validate']), $args_ok[$name]))
$errors[] = 'Field '.$row['name'].' is not valid';
else
$this->$key = $args_ok[$name];
}
return count($errors) ? $errors : true;
}
}
-288
View File
@@ -1,288 +0,0 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class InstallControllerConsoleProcess extends InstallControllerConsole
{
const SETTINGS_FILE = 'config/settings.inc.php';
/**
* @var InstallModelInstall
*/
protected $model_install;
public $process_steps = array();
public $previous_button = false;
public function init()
{
require_once _PS_INSTALL_MODELS_PATH_.'install.php';
require_once _PS_INSTALL_MODELS_PATH_.'database.php';
$this->model_install = new InstallModelInstall();
$this->model_database = new InstallModelDatabase();
}
/**
* @see InstallAbstractModel::processNextStep()
*/
public function processNextStep()
{
}
/**
* @see InstallAbstractModel::validate()
*/
public function validate()
{
return false;
}
public function initializeContext()
{
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;
}
public function process()
{
/*if (file_exists(_PS_ROOT_DIR_.'/'.self::SETTINGS_FILE))
@require_once _PS_ROOT_DIR_.'/'.self::SETTINGS_FILE;*/
if (!$this->processGenerateSettingsFile())
$this->printErrors();
if (!$this->model_database->testDatabaseSettings($this->datas->database_server, $this->datas->database_name, $this->datas->database_login, $this->datas->database_password, $this->datas->database_prefix, $this->datas->database_engine, $this->datas->database_clear))
$this->printErrors();
if (!$this->processInstallDatabase())
$this->printErrors();
if (!$this->processInstallDefaultData())
$this->printErrors();
if (!$this->processPopulateDatabase())
$this->printErrors();
if (!$this->processConfigureShop())
$this->printErrors();
if (!$this->processInstallModules())
$this->printErrors();
if (!$this->processInstallAddonsModules())
$this->printErrors();
if (!$this->processInstallFixtures())
$this->printErrors();
if (!$this->processInstallTheme())
$this->printErrors();
if (!$this->processSendEmail())
$this->printErrors();
$params = http_build_query(array(
'email' => $this->datas->admin_email,
'method' => 'addMemberToNewsletter',
'language' => $this->datas->lang,
'visitorType' => 1,
'source' => 'installer'
));
Tools::file_get_contents('http://www.prestashop.com/ajax/controller.php?'.$params);
}
/**
* PROCESS : generateSettingsFile
*/
public function processGenerateSettingsFile()
{
return $this->model_install->generateSettingsFile(
$this->datas->database_server,
$this->datas->database_login,
$this->datas->database_password,
$this->datas->database_name,
$this->datas->database_prefix,
$this->datas->database_engine
);
}
/**
* PROCESS : installDatabase
* Create database structure
*/
public function processInstallDatabase()
{
$this->initializeContext();
return $this->model_install->installDatabase($this->datas->database_clear);
}
/**
* PROCESS : installDefaultData
* Create default shop and languages
*/
public function processInstallDefaultData()
{
$this->initializeContext();
return $this->model_install->installDefaultData($this->datas->shop_name, true);
}
/**
* PROCESS : populateDatabase
* Populate database with default data
*/
public function processPopulateDatabase()
{
$this->initializeContext();
$this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
$result = $this->model_install->populateDatabase();
$this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
return $result;
}
/**
* PROCESS : configureShop
* Set default shop configuration
*/
public function processConfigureShop()
{
$this->initializeContext();
return $this->model_install->configureShop(array(
'shop_name' => $this->datas->shop_name,
'shop_activity' => $this->datas->shop_activity,
'shop_country' => $this->datas->shop_country,
'shop_timezone' => $this->datas->timezone,
'use_smtp' => false,
'smtp_server' => null,
'smtp_login' => null,
'smtp_password' => null,
'smtp_encryption' => null,
'smtp_port' => null,
'admin_firstname' => $this->datas->admin_firstname,
'admin_lastname' => $this->datas->admin_lastname,
'admin_password' => $this->datas->admin_password,
'admin_email' => $this->datas->admin_email,
'configuration_agrement' => true,
));
}
/**
* PROCESS : installModules
* Install all modules in ~/modules/ directory
*/
public function processInstallModules()
{
$this->initializeContext();
return $this->model_install->installModules();
}
/**
* PROCESS : installFixtures
* Install fixtures (E.g. demo products)
*/
public function processInstallFixtures()
{
$this->initializeContext();
$this->model_install->xml_loader_ids = $this->datas->xml_loader_ids;
$result = $this->model_install->installFixtures();
$this->datas->xml_loader_ids = $this->model_install->xml_loader_ids;
return $result;
}
/**
* PROCESS : installTheme
* Install theme
*/
public function processInstallTheme()
{
$this->initializeContext();
return $this->model_install->installTheme();
}
/**
* PROCESS : sendEmail
* Send information e-mail
*/
public function processSendEmail()
{
require_once _PS_INSTALL_MODELS_PATH_.'mail.php';
$mail = new InstallModelMail(
$this->datas->use_smtp,
$this->datas->smtp_server,
$this->datas->smtp_login,
$this->datas->smtp_password,
$this->datas->smtp_port,
$this->datas->smtp_encryption,
$this->datas->admin_email
);
if (file_exists(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt'))
$content = file_get_contents(_PS_INSTALL_LANGS_PATH_.$this->language->getLanguageIso().'/mail_identifiers.txt');
else
$content = file_get_contents(_PS_INSTALL_LANGS_PATH_.InstallLanguages::DEFAULT_ISO.'/mail_identifiers.txt');
$vars = array(
'{firstname}' => $this->datas->admin_firstname,
'{lastname}' => $this->datas->admin_lastname,
'{shop_name}' => $this->datas->shop_name,
'{passwd}' => $this->datas->admin_password,
'{email}' => $this->datas->admin_email,
'{shop_url}' => Tools::getHttpHost(true).__PS_BASE_URI__,
);
$content = str_replace(array_keys($vars), array_values($vars), $content);
$mail->send(
$this->l('%s - Login information', $this->datas->shop_name),
$content
);
return true;
}
/**
* PROCESS : installModulesAddons
* Install modules from addons
*/
public function processInstallAddonsModules()
{
return $this->model_install->installModulesAddons();
}
}
+21 -22
View File
@@ -227,29 +227,28 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
{ {
// List of activities // List of activities
$list_activities = array( $list_activities = array(
1 => $this->l('Lingerie and Adult'), $this->l('Lingerie and Adult'),
2 => $this->l('Animals and Pets'), $this->l('Animals and Pets'),
3 => $this->l('Art and Culture'), $this->l('Art and Culture'),
4 => $this->l('Babies'), $this->l('Babies'),
5 => $this->l('Beauty and Personal Care'), $this->l('Beauty and Personal Care'),
6 => $this->l('Cars'), $this->l('Cars'),
7 => $this->l('Computer Hardware and Software'), $this->l('Computer Hardware and Software'),
8 => $this->l('Download'), $this->l('Download'),
9 => $this->l('Fashion and accessories'), $this->l('Fashion and accessories'),
10 => $this->l('Flowers, Gifts and Crafts'), $this->l('Flowers, Gifts and Crafts'),
11 => $this->l('Food and beverage'), $this->l('Food and beverage'),
12 => $this->l('HiFi, Photo and Video'), $this->l('HiFi, Photo and Video'),
13 => $this->l('Home and Garden'), $this->l('Home and Garden'),
14 => $this->l('Home Appliances'), $this->l('Home Appliances'),
15 => $this->l('Jewelry'), $this->l('Jewelry'),
16 => $this->l('Mobile and Telecom'), $this->l('Mobile and Telecom'),
17 => $this->l('Services'), $this->l('Services'),
18 => $this->l('Shoes and accessories'), $this->l('Shoes and accessories'),
19 => $this->l('Sports and Entertainment'), $this->l('Sports and Entertainment'),
20 => $this->l('Travel'), $this->l('Travel'),
); );
sort($list_activities);
asort($list_activities);
$this->list_activities = $list_activities; $this->list_activities = $list_activities;
// Countries list // Countries list
+3 -34
View File
@@ -66,7 +66,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp
Shop::setContext(Shop::CONTEXT_SHOP, 1); Shop::setContext(Shop::CONTEXT_SHOP, 1);
Configuration::loadConfiguration(); Configuration::loadConfiguration();
Context::getContext()->language = new Language(Configuration::get('PS_LANG_DEFAULT')); Context::getContext()->language = new Language(Configuration::get('PS_LANG_DEFAULT'));
Context::getContext()->country = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); Context::getContext()->country = new Country('PS_COUNTRY_DEFAULT');
Context::getContext()->cart = new Cart(); Context::getContext()->cart = new Cart();
Context::getContext()->employee = new Employee(1); Context::getContext()->employee = new Employee(1);
define('_PS_SMARTY_FAST_LOAD_', true); define('_PS_SMARTY_FAST_LOAD_', true);
@@ -95,9 +95,7 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->processConfigureShop(); $this->processConfigureShop();
elseif (Tools::getValue('installModules') && !empty($this->session->process_validated['configureShop'])) elseif (Tools::getValue('installModules') && !empty($this->session->process_validated['configureShop']))
$this->processInstallModules(); $this->processInstallModules();
elseif (Tools::getValue('installModulesAddons') && !empty($this->session->process_validated['installModules'])) elseif (Tools::getValue('installFixtures') && !empty($this->session->process_validated['installModules']))
$this->processInstallAddonsModules();
elseif (Tools::getValue('installFixtures') && !empty($this->session->process_validated['installModulesAddons']))
$this->processInstallFixtures(); $this->processInstallFixtures();
elseif (Tools::getValue('installTheme') && !empty($this->session->process_validated['installModules'])) elseif (Tools::getValue('installTheme') && !empty($this->session->process_validated['installModules']))
$this->processInstallTheme(); $this->processInstallTheme();
@@ -233,23 +231,6 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true)); $this->session->process_validated = array_merge($this->session->process_validated, array('installModules' => true));
$this->ajaxJsonAnswer(true); $this->ajaxJsonAnswer(true);
} }
/**
* PROCESS : installModulesAddons
* Install modules from addons
*/
public function processInstallAddonsModules()
{
$this->initializeContext();
if ($module = Tools::getValue('module') && $id_module = Tools::getValue('id_module'))
$result = $this->model_install->installModulesAddons(array('name' => $module, 'id_module' => $id_module));
else
$result = $this->model_install->installModulesAddons();
if (!$result || $this->model_install->getErrors())
$this->ajaxJsonAnswer(false, $this->model_install->getErrors());
$this->session->process_validated = array_merge($this->session->process_validated, array('installModulesAddons' => true));
$this->ajaxJsonAnswer(true);
}
/** /**
* PROCESS : installFixtures * PROCESS : installFixtures
@@ -352,24 +333,12 @@ class InstallControllerHttpProcess extends InstallControllerHttp
$this->process_steps[] = $populate_step; $this->process_steps[] = $populate_step;
$this->process_steps[] = array('key' => 'configureShop', 'lang' => $this->l('Configure shop information')); $this->process_steps[] = array('key' => 'configureShop', 'lang' => $this->l('Configure shop information'));
$install_modules = array('key' => 'installModules', 'lang' => $this->l('Install modules')); $install_modules = array('key' => 'installModules', 'lang' => $this->l('Install modules'));
if ($low_memory) if ($low_memory)
foreach ($this->model_install->getModulesList() as $module) foreach ($this->model_install->getModulesList() as $module)
$install_modules['subtasks'][] = array('module' => $module); $install_modules['subtasks'][] = array('module' => $module);
$this->process_steps[] = $install_modules; $this->process_steps[] = $install_modules;
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install modules Addons'));
$params = array('iso_lang' => $this->language->getLanguageIso(),
'iso_country' => $this->session->shop_country,
'email' => $this->session->admin_email,
'shop_url' => Tools::getHttpHost(),
'version' => _PS_INSTALL_VERSION_);
if ($low_memory)
foreach ($this->model_install->getAddonsModulesList($params) as $module)
$install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
$this->process_steps[] = $install_modules;
// Fixtures are installed only if option is selected // Fixtures are installed only if option is selected
if ($this->session->install_type == 'full') if ($this->session->install_type == 'full')
+4 -1
View File
@@ -74,6 +74,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
if (!isset($this->tests['optional'])) if (!isset($this->tests['optional']))
$this->tests['optional'] = $this->model_system->checkOptionalTests(); $this->tests['optional'] = $this->model_system->checkOptionalTests();
$session_path = @ini_get('session.save_path');
// Generate display array // Generate display array
$this->tests_render = array( $this->tests_render = array(
'required' => array( 'required' => array(
@@ -86,6 +87,7 @@ class InstallControllerHttpSystem extends InstallControllerHttp
'system' => $this->l('Cannot create new files and folders'), 'system' => $this->l('Cannot create new files and folders'),
'gd' => $this->l('GD Library is not installed'), 'gd' => $this->l('GD Library is not installed'),
'mysql_support' => $this->l('MySQL support is not activated'), 'mysql_support' => $this->l('MySQL support is not activated'),
'sessions' => $this->l('Your PHP sessions path is not writable - check with your hosting provider:').' '.$session_path,
) )
), ),
array( array(
@@ -137,4 +139,5 @@ class InstallControllerHttpSystem extends InstallControllerHttp
$this->displayTemplate('system'); $this->displayTemplate('system');
} }
} }
+1 -1
View File
@@ -144,7 +144,7 @@ CREATE TABLE `PREFIX_carrier` (
`max_width` int(10) DEFAULT 0, `max_width` int(10) DEFAULT 0,
`max_height` int(10) DEFAULT 0, `max_height` int(10) DEFAULT 0,
`max_depth` int(10) DEFAULT 0, `max_depth` int(10) DEFAULT 0,
`max_weight` DECIMAL(20,6) DEFAULT 0, `max_weight` int(10) DEFAULT 0,
`grade` int(10) DEFAULT 0, `grade` int(10) DEFAULT 0,
PRIMARY KEY (`id_carrier`), PRIMARY KEY (`id_carrier`),
KEY `deleted` (`deleted`,`active`), KEY `deleted` (`deleted`,`active`),
@@ -42,13 +42,13 @@
<attribute id="Black"> <attribute id="Black">
<name>Black</name> <name>Black</name>
</attribute> </attribute>
<attribute id="8GB"> <attribute id="8Go">
<name>8Go</name> <name>8Go</name>
</attribute> </attribute>
<attribute id="16GB"> <attribute id="16Go">
<name>16Go</name> <name>16Go</name>
</attribute> </attribute>
<attribute id="32GB"> <attribute id="32Go">
<name>32Go</name> <name>32Go</name>
</attribute> </attribute>
<attribute id="Purple"> <attribute id="Purple">
+1 -1
View File
@@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
define('_PS_INSTALL_VERSION_', '1.5.4.1'); define('_PS_INSTALL_VERSION_', '1.5.4.0');
+96 -96
View File
@@ -1,105 +1,105 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entity_tab> <entity_tab>
<tab id="Addresses" name="Endere&#xE7;os"/> <tab id="Home" name="Home"/>
<tab id="Administration" name="Administra&#xE7;&#xE3;o"/> <tab id="CMS_Pages" name="CMS Pages"/>
<tab id="Advanced_Parameters" name="Par&#xE2;metros Avan&#xE7;ados"/> <tab id="CMS_Categories" name="CMS Categories"/>
<tab id="Attachments" name="Anexos"/> <tab id="Combinations_Generator" name="Combinations Generator"/>
<tab id="Attributes_and_Values" name="Atributos e Valores"/> <tab id="Search" name="Search"/>
<tab id="Carriers" name="Transportadoras"/> <tab id="Login" name="Login"/>
<tab id="Cart_Rules" name="Regras do Carrinho"/> <tab id="Shops" name="Shops"/>
<tab id="Shop_URLs" name="Shop URLs"/>
<tab id="Catalog" name="Cat&#xE1;logo"/> <tab id="Catalog" name="Cat&#xE1;logo"/>
<tab id="Catalog_Price_Rules" name="Regras de pre&#xE7;o do cat&#xE1;logo"/> <tab id="Orders" name="Pedidos"/>
<tab id="Categories" name="Categorias"/>
<tab id="CMS" name="CMS"/>
<tab id="CMS_Categories" name="Categorias CMS"/>
<tab id="CMS_Pages" name="P&#xE1;ginas CMS"/>
<tab id="Combinations_Generator" name="Gerador de Combina&#xE7;&#xF5;es"/>
<tab id="Configuration" name="Configura&#xE7;&#xE3;o"/>
<tab id="Configuration_Information" name="Informa&#xE7;&#xF5;es da Configura&#xE7;&#xE3;o"/>
<tab id="Contacts" name="Contatos"/>
<tab id="Countries" name="Pa&#xED;ses"/>
<tab id="Credit_Slips" name="Cr&#xE9;ditos"/>
<tab id="CSV_Import" name="Importar CSV"/>
<tab id="Currencies" name="Moedas"/>
<tab id="Customer_Service" name="Atendimento ao Cliente"/>
<tab id="Customers" name="Clientes"/> <tab id="Customers" name="Clientes"/>
<tab id="Customers_2" name="Clientes"/> <tab id="Price_Rules" name="Regras para pre&#xE7;o"/>
<tab id="Customers_1" name="Clientes"/> <tab id="Shipping" name="Entrega"/>
<tab id="DB_Backup" name="Backup do Banco de Dados"/>
<tab id="Delivery_Slips" name="Recibos de Envio"/>
<tab id="E-mail" name="E-mail"/>
<tab id="Employees" name="Empregados"/>
<tab id="Features" name="Caracter&#xED;sticas"/>
<tab id="General" name="Geral"/>
<tab id="Geolocation" name="Geolocaliza&#xE7;&#xE3;o"/>
<tab id="Groups" name="Grupos"/>
<tab id="Home" name="In&#xED;cio"/>
<tab id="Image_Mapping" name="Mapeamento de Imagem"/>
<tab id="Images" name="Imagens"/>
<tab id="Instant_Stock_Status" name="Status atual do estoque"/>
<tab id="Invoices" name="Faturas"/>
<tab id="Languages" name="Idiomas"/>
<tab id="Localization" name="Localiza&#xE7;&#xE3;o"/> <tab id="Localization" name="Localiza&#xE7;&#xE3;o"/>
<tab id="Localization_1" name="Localiza&#xE7;&#xE3;o"/>
<tab id="Login" name="Entrar"/>
<tab id="Logs" name="Logs"/>
<tab id="Maintenance" name="Manuten&#xE7;&#xE3;o"/>
<tab id="Manufacturers" name="Fabricantes"/>
<tab id="Marketing" name="Marketing"/>
<tab id="Menus" name="Abas"/>
<tab id="Merchandise_Returns" name="Devolu&#xE7;&#xE3;o de mercadoria"/>
<tab id="Modules_1" name="M&#xF3;dulos"/>
<tab id="Modules" name="M&#xF3;dulos"/> <tab id="Modules" name="M&#xF3;dulos"/>
<tab id="Modules_Themes_Catalog" name="Cat&#xE1;logo de M&#xF3;dulos &amp; Temas"/>
<tab id="Monitoring" name="Monitoramento"/>
<tab id="Multistore" name="Multiloja"/>
<tab id="Order_Messages" name="Mensagens de compras"/>
<tab id="Orders_2" name="Compras"/>
<tab id="Orders" name="Compras"/>
<tab id="Orders_1" name="Compras"/>
<tab id="Outstanding" name="Pendente"/>
<tab id="Payment" name="Pagamento"/>
<tab id="Performance" name="Desempenho"/>
<tab id="Permissions" name="Permiss&#xF5;es"/>
<tab id="Positions" name="Posi&#xE7;&#xF5;es"/>
<tab id="Preferences_1" name="Prefer&#xEA;ncias"/>
<tab id="Preferences" name="Prefer&#xEA;ncias"/> <tab id="Preferences" name="Prefer&#xEA;ncias"/>
<tab id="Price_Ranges" name="Faixas de pre&#xE7;os"/> <tab id="Advanced_Parameters" name="Par&#xE2;metros Avan&#xE7;ados"/>
<tab id="Price_Rules" name="Regras de Pre&#xE7;os"/> <tab id="Administration" name="Administra&#xE7;&#xE3;o"/>
<tab id="Products_1" name="Produtos"/>
<tab id="Products" name="Produtos"/>
<tab id="Profiles" name="Perfis"/>
<tab id="Quick_Access" name="Acesso R&#xE1;pido"/>
<tab id="Referrers" name="Refer&#xEA;ncias"/>
<tab id="Search_1" name="Pesquisar"/>
<tab id="Search" name="Pesquisar"/>
<tab id="Search_Engines" name="Ferramentas de Pesquisa"/>
<tab id="SEO_URLs" name="SEO e URLs"/>
<tab id="Shipping" name="Envio"/>
<tab id="Shipping_1" name="Envio"/>
<tab id="Shop_URLs" name="URL da loja"/>
<tab id="Shopping_Carts" name="Carrinhos de Compras"/>
<tab id="Shops" name="Lojas"/>
<tab id="SQL_Manager" name="Gerenciador SQL"/>
<tab id="States" name="Estados"/>
<tab id="Stats" name="Estat&#xED;sticas"/> <tab id="Stats" name="Estat&#xED;sticas"/>
<tab id="Stats_1" name="Estat&#xED;sticas"/> <tab id="Estoque" name="Estoque"/>
<tab id="Statuses" name="Status"/> <tab id="Products" name="Products"/>
<tab id="Stock" name="Estoque"/> <tab id="Categories" name="Categories"/>
<tab id="Stock_Coverage" name="Cobertura do estoque"/> <tab id="Monitoring" name="Monitoring"/>
<tab id="Stock_Management" name="Gest&#xE3;o de estoque"/> <tab id="Attributes_and_Values" name="Attributes and Values"/>
<tab id="Stock_Movement" name="Movimenta&#xE7;&#xE3;o do estoque"/> <tab id="Features" name="Features"/>
<tab id="Store_Contacts" name="Contatos da loja"/> <tab id="Manufacturers" name="Manufacturers"/>
<tab id="Suppliers" name="Fornecedores"/> <tab id="Suppliers" name="Suppliers"/>
<tab id="Supply_orders" name="Ordens de fornecimento"/> <tab id="Image_Mapping" name="Image Mapping"/>
<tab id="Tags" name="Etiquetas"/> <tab id="Tags" name="Tags"/>
<tab id="Tax_Rules" name="Regras de impostos"/> <tab id="Attachments" name="Attachments"/>
<tab id="Taxes" name="Taxas"/> <tab id="Orders_1" name="Orders"/>
<tab id="Themes" name="Temas"/> <tab id="Invoices" name="Invoices"/>
<tab id="Titles" name="T&#xED;tulos"/> <tab id="Merchandise_Returns" name="Merchandise Returns"/>
<tab id="Translations" name="Tradu&#xE7;&#xF5;es"/> <tab id="Delivery_Slips" name="Delivery Slips"/>
<tab id="Warehouses" name="Armaz&#xE9;ns"/> <tab id="Credit_Slips" name="Credit Slips"/>
<tab id="Webservice" name="Servi&#xE7;o Web"/> <tab id="Statuses" name="Statuses"/>
<tab id="Weight_Ranges" name="Faixas de peso"/> <tab id="Order_Messages" name="Order Messages"/>
<tab id="Zones" name="Regi&#xF5;es"/> <tab id="Customers_1" name="Customers"/>
<tab id="Addresses" name="Addresses"/>
<tab id="Groups" name="Groups"/>
<tab id="Shopping_Carts" name="Shopping Carts"/>
<tab id="Customer_Service" name="Customer Service"/>
<tab id="Contacts" name="Contacts"/>
<tab id="Titles" name="Titles"/>
<tab id="Outstanding" name="Outstanding"/>
<tab id="Cart_Rules" name="Cart Rules"/>
<tab id="Catalog_Price_Rules" name="Catalog Price Rules"/>
<tab id="Marketing" name="Marketing"/>
<tab id="Shipping_1" name="Shipping"/>
<tab id="Carriers" name="Carriers"/>
<tab id="Price_Ranges" name="Price Ranges"/>
<tab id="Weight_Ranges" name="Weight Ranges"/>
<tab id="Localization_1" name="Localization"/>
<tab id="Languages" name="Languages"/>
<tab id="Zones" name="Zones"/>
<tab id="Countries" name="Countries"/>
<tab id="States" name="States"/>
<tab id="Currencies" name="Currencies"/>
<tab id="Taxes" name="Taxes"/>
<tab id="Tax_Rules" name="Tax Rules"/>
<tab id="Translations" name="Translations"/>
<tab id="Modules_1" name="Modules"/>
<tab id="Modules_Themes_Catalog" name="Modules &amp; Themes Catalog"/>
<tab id="Positions" name="Positions"/>
<tab id="Payment" name="Payment"/>
<tab id="General" name="General"/>
<tab id="Orders_2" name="Orders"/>
<tab id="Products_1" name="Products"/>
<tab id="Customers_2" name="Customers"/>
<tab id="Themes" name="Themes"/>
<tab id="SEO_URLs" name="SEO &amp; URLs"/>
<tab id="CMS" name="CMS"/>
<tab id="Images" name="Images"/>
<tab id="Store_Contacts" name="Store Contacts"/>
<tab id="Search_1" name="Search"/>
<tab id="Maintenance" name="Maintenance"/>
<tab id="Geolocation" name="Geolocation"/>
<tab id="Configuration_Information" name="Configuration Information"/>
<tab id="Performance" name="Performance"/>
<tab id="E-mail" name="E-mail"/>
<tab id="Multistore" name="Multistore"/>
<tab id="CSV_Import" name="CSV Import"/>
<tab id="DB_Backup" name="DB Backup"/>
<tab id="SQL_Manager" name="SQL Manager"/>
<tab id="Logs" name="Logs"/>
<tab id="Webservice" name="Webservice"/>
<tab id="Preferences_1" name="Preferences"/>
<tab id="Quick_Access" name="Quick Access"/>
<tab id="Employees" name="Employees"/>
<tab id="Profiles" name="Profiles"/>
<tab id="Permissions" name="Permissions"/>
<tab id="Menus" name="Menus"/>
<tab id="Stats_1" name="Stats"/>
<tab id="Search_Engines" name="Search Engines"/>
<tab id="Referrers" name="Referrers"/>
<tab id="Warehouses" name="Warehouses"/>
<tab id="Stock_Management" name="Stock Management"/>
<tab id="Stock_Movement" name="Stock Movement"/>
<tab id="Instant_Stock_Status" name="Instant Stock Status"/>
<tab id="Stock_Coverage" name="Stock Coverage"/>
<tab id="Supply_orders" name="Supply orders"/>
<tab id="Configuration" name="Configuration"/>
</entity_tab> </entity_tab>

Some files were not shown because too many files have changed in this diff Show More