Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -72,7 +72,8 @@
|
||||
{$module->optionsHtml}
|
||||
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">Valider</a>
|
||||
{else}
|
||||
<a href="{$module->options.install_url}" class="button action_tab_module">{l s='Install'}</a>
|
||||
|
||||
<a href="{$module->options.install_url}" class="button">{l s='Install'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<tr>
|
||||
<td>{dateFormat date=$line.date_add full=true}</td>
|
||||
<td>{$line.type}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td>{$line.carrier_name}</td>
|
||||
<td>{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</td>
|
||||
<td>
|
||||
{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}
|
||||
|
||||
@@ -312,16 +312,16 @@ class FeatureCore extends ObjectModel
|
||||
*/
|
||||
public static function cleanPositions()
|
||||
{
|
||||
$return = true;
|
||||
$sql = '
|
||||
UPDATE `'._DB_PREFIX_.'feature` f LEFT JOIN
|
||||
(SELECT @i := @i +1 AS rank, id_feature, position
|
||||
FROM `'._DB_PREFIX_.'feature` JOIN (SELECT @i :=1) dummy
|
||||
ORDER by position) AS f2
|
||||
USING(id_feature)
|
||||
SET f.position = f2.rank-1';
|
||||
$return = Db::getInstance()->executeS($sql);
|
||||
return $return;
|
||||
return Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'feature` f
|
||||
LEFT JOIN (
|
||||
SELECT @i := @i +1 AS rank, id_feature, position
|
||||
FROM `'._DB_PREFIX_.'feature`
|
||||
JOIN (SELECT @i :=1) dummy
|
||||
ORDER by position
|
||||
) AS f2
|
||||
USING (id_feature)
|
||||
SET f.position = f2.rank - 1');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -859,6 +859,8 @@ abstract class ObjectModelCore
|
||||
$values = $this->$field;
|
||||
if (!is_array($values))
|
||||
$values = array($this->id_lang => $values);
|
||||
if (!isset($values[Configuration::get('PS_LANG_DEFAULT')]))
|
||||
$values[Configuration::get('PS_LANG_DEFAULT')] = '';
|
||||
|
||||
foreach ($values as $id_lang => $value)
|
||||
{
|
||||
|
||||
@@ -1514,6 +1514,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
public function renderModulesList()
|
||||
{
|
||||
|
||||
if ($this->getModulesList($this->filter_modules_list))
|
||||
{
|
||||
$helper = new Helper();
|
||||
@@ -2214,7 +2215,18 @@ class AdminControllerCore extends Controller
|
||||
$this->modules_list = array();
|
||||
foreach($all_modules as $module)
|
||||
{
|
||||
if (in_array($module->name, $filter_modules_list))
|
||||
$perm = true;
|
||||
if ($module->id)
|
||||
$perm &= Module::getPermissionStatic($module->id, 'configure');
|
||||
else
|
||||
{
|
||||
$id_admin_module = Tab::getIdFromClassName('AdminModules');
|
||||
$access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module);
|
||||
if (!$access['edit'])
|
||||
$perm &= false;
|
||||
}
|
||||
|
||||
if (in_array($module->name, $filter_modules_list) && $perm)
|
||||
{
|
||||
$this->fillModuleData($module, 'select');
|
||||
$this->modules_list[] = $module;
|
||||
|
||||
@@ -1510,11 +1510,12 @@ class OrderCore extends ObjectModel
|
||||
|
||||
/**
|
||||
* @return array return all shipping method for the current order
|
||||
* state_name sql var is now deprecated - use order_state_name for the state name and carrier_name for the carrier_name
|
||||
*/
|
||||
public function getShipping()
|
||||
{
|
||||
return Db::getInstance()->executeS('
|
||||
SELECT DISTINCT oc.`id_order_invoice`, oc.`weight`, oc.`shipping_cost_tax_excl`, oc.`shipping_cost_tax_incl`, c.`url`, oc.`id_carrier`, c.`name` as `state_name`, oc.`date_add`, "Delivery" as `type`, "true" as `can_edit`, oc.`tracking_number`, oc.`id_order_carrier`
|
||||
SELECT DISTINCT oc.`id_order_invoice`, oc.`weight`, oc.`shipping_cost_tax_excl`, oc.`shipping_cost_tax_incl`, c.`url`, oc.`id_carrier`, c.`name` as `carrier_name`, oc.`date_add`, "Delivery" as `type`, "true" as `can_edit`, oc.`tracking_number`, oc.`id_order_carrier`, osl.`name` as order_state_name, c.`name` as state_name
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_history` oh
|
||||
ON (o.`id_order` = oh.`id_order`)
|
||||
@@ -1524,7 +1525,8 @@ class OrderCore extends ObjectModel
|
||||
ON (oc.`id_carrier` = c.`id_carrier`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl
|
||||
ON (oh.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE oc.`id_order` = '.(int)$this->id);
|
||||
WHERE o.`id_order` = '.(int)$this->id.'
|
||||
GROUP BY c.id_carrier');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -645,7 +645,7 @@ class AdminImportControllerCore extends AdminController
|
||||
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
||||
file_put_contents($uniqid_path, $field);
|
||||
$tab = '';
|
||||
if(!empty($uniqid_path))
|
||||
if (!empty($uniqid_path))
|
||||
{
|
||||
$fd = fopen($uniqid_path, 'r');
|
||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||
|
||||
@@ -250,11 +250,25 @@ class AdminModulesControllerCore extends AdminController
|
||||
{
|
||||
if (in_array($module->name, $tab_modules_list))
|
||||
{
|
||||
$this->fillModuleData($module, 'select', $back);
|
||||
$perm = true;
|
||||
if ($module->id)
|
||||
$modules_list['installed'][] = $module;
|
||||
$perm &= Module::getPermissionStatic($module->id, 'configure');
|
||||
else
|
||||
$modules_list['not_installed'][] = $module;
|
||||
{
|
||||
$id_admin_module = Tab::getIdFromClassName('AdminModules');
|
||||
$access = Profile::getProfileAccess($this->context->employee->id_profile, $id_admin_module);
|
||||
if (!$access['edit'])
|
||||
$perm &= false;
|
||||
}
|
||||
if ($perm)
|
||||
{
|
||||
$this->fillModuleData($module, 'select', $back);
|
||||
if ($module->id)
|
||||
$modules_list['installed'][] = $module;
|
||||
else
|
||||
$modules_list['not_installed'][] = $module;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -781,7 +795,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
// Call appropriate module callback
|
||||
if (!isset($ppmReturn))
|
||||
$this->postProcessCallback();
|
||||
|
||||
|
||||
if ($back = Tools::getValue('back'))
|
||||
Tools::redirectAdmin($back);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
<ul data-role="listview" >
|
||||
{foreach from=$order->getShipping() item=line}
|
||||
<li>
|
||||
<h3>{$line.state_name}</h3>
|
||||
<h3>{$line.carrier_name}</h3>
|
||||
<p><strong>{l s='Weight'}</strong> {$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</p>
|
||||
<p><strong>{l s='Shipping cost'}</strong> {if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if}</p>
|
||||
<p><strong>{l s='Tracking number'}</strong> {if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}" data-ajax="false">{$line.tracking_number}</a>{elseif $line.tracking_number != ''}{$line.tracking_number}{else}----{/if}</p>
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
{foreach from=$order->getShipping() item=line}
|
||||
<tr class="item">
|
||||
<td>{$line.date_add}</td>
|
||||
<td>{$line.state_name}</td>
|
||||
<td>{$line.carrier_name}</td>
|
||||
<td>{if $line.weight > 0}{$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}{else}-{/if}</td>
|
||||
<td>{if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if}</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user