Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
{* Generate HTML code for printing Invoice Icon with link *}
|
{* Generate HTML code for printing Invoice Icon with link *}
|
||||||
<span style="width:20px; margin-right:5px;">
|
<span style="width:20px; margin-right:5px;">
|
||||||
{if ($order_state->invoice || $order->invoice_number)}
|
{if ($order_state->invoice || $order->invoice_number)}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}"><img src="../img/admin/tab-invoice.gif" alt="invoice" /></a>
|
||||||
{else}
|
{else}
|
||||||
-
|
-
|
||||||
{/if}
|
{/if}
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
{* Generate HTML code for printing Delivery Icon with link *}
|
{* Generate HTML code for printing Delivery Icon with link *}
|
||||||
<span style="width:20px;">
|
<span style="width:20px;">
|
||||||
{if ($order_state->delivery || $order->delivery_number)}
|
{if ($order_state->delivery || $order->delivery_number)}
|
||||||
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}"><img src="../img/admin/delivery.gif" alt="delivery" /></a>
|
||||||
{else}
|
{else}
|
||||||
-
|
-
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<div class="bloc-command">
|
<div class="bloc-command">
|
||||||
<div class="button-command">
|
<div class="button-command">
|
||||||
{if (count($invoices_collection))}
|
{if (count($invoices_collection))}
|
||||||
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}" target="_blank">
|
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateInvoicePDF&id_order={$order->id}">
|
||||||
<img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}
|
<img src="../img/admin/charged_ok.gif" alt="{l s='View invoice'}" /> {l s='View invoice'}
|
||||||
</a>
|
</a>
|
||||||
{else}
|
{else}
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
|
|
||||||
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
{if (($currentState && $currentState->delivery) || $order->delivery_number)}
|
||||||
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}" target="_blank">
|
<a class="button" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}">
|
||||||
<img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}
|
<img src="../img/admin/delivery.gif" alt="{l s='View delivery slip'}" /> {l s='View delivery slip'}
|
||||||
</a>
|
</a>
|
||||||
{else}
|
{else}
|
||||||
@@ -124,10 +124,10 @@
|
|||||||
<!-- History of status -->
|
<!-- History of status -->
|
||||||
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
|
<table cellspacing="0" cellpadding="0" class="table history-status" style="width: 100%;">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="1%">
|
<col width="1%"/>
|
||||||
<col width="">
|
<col width=""/>
|
||||||
<col width="20%">
|
<col width="20%"/>
|
||||||
<col width="20%">
|
<col width="20%"/>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
{foreach from=$history item=row key=key}
|
{foreach from=$history item=row key=key}
|
||||||
{if ($key == 0)}
|
{if ($key == 0)}
|
||||||
@@ -299,12 +299,12 @@
|
|||||||
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
<form id="formAddPayment" method="post" action="{$current_index}&vieworder&id_order={$order->id}&token={$smarty.get.token|escape:'htmlall':'UTF-8'}">
|
||||||
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
<table class="table" width="100%" cellspacing="0" cellpadding="0">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col width="15%">
|
<col width="15%"/>
|
||||||
<col width="">
|
<col width=""/>
|
||||||
<col width="20%">
|
<col width="20%"/>
|
||||||
<col width="10%">
|
<col width="10%"/>
|
||||||
<col width="10%">
|
<col width="10%"/>
|
||||||
<col width="1%">
|
<col width="1%"/>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -787,8 +787,6 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="clear"> </div>
|
<div class="clear"> </div>
|
||||||
<br /><br /><a href="{$current_index}&token={$smarty.get.token}"><img src="../img/admin/arrow2.gif" /> {l s='Back to list'}</a><br />
|
<br /><br /><a href="{$current_index}&token={$smarty.get.token}"><img src="../img/admin/arrow2.gif" /> {l s='Back to list'}</a><br />
|
||||||
{/block}
|
{/block}
|
||||||
+2
-2
@@ -85,11 +85,11 @@ class MetaCore extends ObjectModel
|
|||||||
// Add modules controllers to list (this function is cool !)
|
// Add modules controllers to list (this function is cool !)
|
||||||
foreach (glob(_PS_MODULE_DIR_.'*/controllers/front/*.php') as $file)
|
foreach (glob(_PS_MODULE_DIR_.'*/controllers/front/*.php') as $file)
|
||||||
{
|
{
|
||||||
$filename = basename($file, '.php');
|
$filename = Tools::strtolower(basename($file, '.php'));
|
||||||
if ($filename == 'index')
|
if ($filename == 'index')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$module = basename(dirname(dirname(dirname($file))));
|
$module = Tools::strtolower(basename(dirname(dirname(dirname($file)))));
|
||||||
$selected_pages[$module.' - '.$filename] = 'module-'.$module.'-'.$filename;
|
$selected_pages[$module.' - '.$filename] = 'module-'.$module.'-'.$filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1162,7 +1162,7 @@ class ToolsCore
|
|||||||
|
|
||||||
$replacements = array(
|
$replacements = array(
|
||||||
'a', 'c', 'd', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r', 's', 'ss', 't', 'u', 'y', 'w', 'z', 'ae', 'oe',
|
'a', 'c', 'd', 'e', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'o', 'r', 's', 'ss', 't', 'u', 'y', 'w', 'z', 'ae', 'oe',
|
||||||
'A', 'C', 'D', 'E', 'G', 'H', 'I', 'J', 'K', 'L', 'N', 'O', 'R', 'S', 'T', 'U', 'Z', 'AE', 'OE'
|
'A', 'C', 'D', 'E', 'G', 'H', 'I', 'J', 'K', 'L', 'N', 'O', 'R', 'S', 'T', 'U', 'W', 'Y', 'Z', 'AE', 'OE'
|
||||||
);
|
);
|
||||||
|
|
||||||
return preg_replace($patterns, $replacements, $str);
|
return preg_replace($patterns, $replacements, $str);
|
||||||
|
|||||||
@@ -3042,4 +3042,4 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,13 +444,13 @@ class HelperListCore extends Helper
|
|||||||
self::$cache_lang['Delete'] = $this->l('Delete', 'Helper');
|
self::$cache_lang['Delete'] = $this->l('Delete', 'Helper');
|
||||||
|
|
||||||
if (!array_key_exists('DeleteItem', self::$cache_lang))
|
if (!array_key_exists('DeleteItem', self::$cache_lang))
|
||||||
self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper', false, false);
|
self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper', true, false);
|
||||||
|
|
||||||
if (!array_key_exists('Name', self::$cache_lang))
|
if (!array_key_exists('Name', self::$cache_lang))
|
||||||
self::$cache_lang['Name'] = $this->l('Name:', 'Helper', false, false);
|
self::$cache_lang['Name'] = $this->l('Name:', 'Helper', true, false);
|
||||||
|
|
||||||
if (!is_null($name))
|
if (!is_null($name))
|
||||||
$name = '\n\n'.self::$cache_lang['Name'].' '.$name;
|
$name = addcslashes('\n\n'.self::$cache_lang['Name'].' '.$name, '\'');
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
$this->identifier => $id,
|
$this->identifier => $id,
|
||||||
@@ -459,7 +459,7 @@ class HelperListCore extends Helper
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($this->specificConfirmDelete !== false)
|
if ($this->specificConfirmDelete !== false)
|
||||||
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : Tools::safeOutput(addcslashes(self::$cache_lang['DeleteItem'].$name, '\''));
|
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : Tools::safeOutput(self::$cache_lang['DeleteItem'].$name);
|
||||||
|
|
||||||
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
|
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
|
||||||
|
|
||||||
@@ -513,7 +513,7 @@ class HelperListCore extends Helper
|
|||||||
if (Tools::getIsset($this->table.'Orderby'))
|
if (Tools::getIsset($this->table.'Orderby'))
|
||||||
$order = '&'.$this->table.'Orderby='.urlencode($this->orderBy).'&'.$this->table.'Orderway='.urlencode(strtolower($this->orderWay));
|
$order = '&'.$this->table.'Orderby='.urlencode($this->orderBy).'&'.$this->table.'Orderway='.urlencode(strtolower($this->orderWay));
|
||||||
|
|
||||||
$action = $this->currentIndex.$identifier.'&token='.$token.$order.'#'.$this->table;
|
$action = $this->currentIndex.$identifier.'&token='.$token.'#'.$this->table;
|
||||||
|
|
||||||
/* Determine current page number */
|
/* Determine current page number */
|
||||||
$page = (int)Tools::getValue('submitFilter'.$this->list_id);
|
$page = (int)Tools::getValue('submitFilter'.$this->list_id);
|
||||||
|
|||||||
@@ -1234,11 +1234,7 @@ abstract class ModuleCore
|
|||||||
$module->interest = 0;
|
$module->interest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
usort($module_list, create_function('$a,$b', '
|
usort($module_list, create_function('$a,$b', 'return strnatcasecmp($a->displayName, $b->displayName);'));
|
||||||
if ($a->displayName == $b->displayName)
|
|
||||||
return 0;
|
|
||||||
return ($a->displayName < $b->displayName) ? -1 : 1;
|
|
||||||
'));
|
|
||||||
|
|
||||||
if ($errors)
|
if ($errors)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -236,7 +236,10 @@ class StockMvtCore extends ObjectModel
|
|||||||
$query->innerJoin('stock', 's', 's.id_stock = sm.id_stock');
|
$query->innerJoin('stock', 's', 's.id_stock = sm.id_stock');
|
||||||
$query->innerJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse');
|
$query->innerJoin('warehouse', 'w', 'w.id_warehouse = s.id_warehouse');
|
||||||
$query->where('sm.sign = 1');
|
$query->where('sm.sign = 1');
|
||||||
$query->where('s.id_product = '.(int)$id_product.' OR s.id_product_attribute = '.(int)$id_product_attribute);
|
if ($id_product_attribute)
|
||||||
|
$query->where('s.id_product = '.(int)$id_product.' AND s.id_product_attribute = '.(int)$id_product_attribute);
|
||||||
|
else
|
||||||
|
$query->where('s.id_product = '.(int)$id_product);
|
||||||
$query->orderBy('date_add DESC');
|
$query->orderBy('date_add DESC');
|
||||||
|
|
||||||
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
$res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query);
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
|
|
||||||
public function getMonthlyStatistics()
|
public function getMonthlyStatistics()
|
||||||
{
|
{
|
||||||
$currency = Tools::setCurrency($this->context->cookie);
|
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders
|
SELECT IFNULL(SUM(`total_paid_real` / conversion_rate), "0") as total_sales, COUNT(*) as total_orders
|
||||||
FROM `'._DB_PREFIX_.'orders`
|
FROM `'._DB_PREFIX_.'orders`
|
||||||
@@ -400,7 +400,7 @@ class AdminHomeControllerCore extends AdminController
|
|||||||
$chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']);
|
$chart->getCurve(1)->setPoint(strtotime($row['invoice_date'].' 02:00:00'), $row['total_converted']);
|
||||||
$chart->setSize(580, 170);
|
$chart->setSize(580, 170);
|
||||||
$chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd');
|
$chart->setTimeMode(strtotime('-7 DAYS', time()), time(), 'd');
|
||||||
$currency = Tools::setCurrency($this->context->cookie);
|
$currency = Tools::setCurrency((object)array('id_currency' => null));
|
||||||
$chart->getCurve(1)->setLabel($this->l('Sales + Tax').' ('.strtoupper($currency->iso_code).')');
|
$chart->getCurve(1)->setLabel($this->l('Sales + Tax').' ('.strtoupper($currency->iso_code).')');
|
||||||
|
|
||||||
$content .= $chart->fetch();
|
$content .= $chart->fetch();
|
||||||
|
|||||||
@@ -455,8 +455,8 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->separator = substr(strval(trim(Tools::getValue('separator', ';'))), 0, 1);
|
$this->separator = Tools::substr(strval(trim(Tools::getValue('separator', ';'))), 0, 1);
|
||||||
$this->multiple_value_separator = substr(strval(trim(Tools::getValue('multiple_value_separator', ','))), 0, 1);
|
$this->multiple_value_separator = Tools::substr(strval(trim(Tools::getValue('multiple_value_separator', ','))), 0, 1);
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@@ -632,7 +632,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$html .= '<tr id="table_'.$current_table.'_line_'.$current_line.'" style="padding: 4px">';
|
$html .= '<tr id="table_'.$current_table.'_line_'.$current_line.'" style="padding: 4px">';
|
||||||
foreach ($line as $nb_c => $column)
|
foreach ($line as $nb_c => $column)
|
||||||
if ((MAX_COLUMNS * (int)$current_table <= $nb_c) && ((int)$nb_c < MAX_COLUMNS * ((int)$current_table + 1)))
|
if ((MAX_COLUMNS * (int)$current_table <= $nb_c) && ((int)$nb_c < MAX_COLUMNS * ((int)$current_table + 1)))
|
||||||
$html .= '<td>'.htmlentities(substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>';
|
$html .= '<td>'.htmlentities(Tools::substr($column, 0, 200), ENT_QUOTES, 'UTF-8').'</td>';
|
||||||
$html .= '</tr>';
|
$html .= '</tr>';
|
||||||
}
|
}
|
||||||
$html .= '</table>';
|
$html .= '</table>';
|
||||||
@@ -2111,7 +2111,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$country->active = 1;
|
$country->active = 1;
|
||||||
$country->name = AdminImportController::createMultiLangField($address->country);
|
$country->name = AdminImportController::createMultiLangField($address->country);
|
||||||
$country->id_zone = 0; // Default zone for country to create
|
$country->id_zone = 0; // Default zone for country to create
|
||||||
$country->iso_code = strtoupper(substr($address->country, 0, 2)); // Default iso for country to create
|
$country->iso_code = Tools::strtoupper(Tools::substr($address->country, 0, 2)); // Default iso for country to create
|
||||||
$country->contains_states = 0; // Default value for country to create
|
$country->contains_states = 0; // Default value for country to create
|
||||||
$lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true);
|
$lang_field_error = $country->validateFieldsLang(UNFRIENDLY_ERROR, true);
|
||||||
if (($field_error = $country->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
if (($field_error = $country->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||||
@@ -2142,7 +2142,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$state->name = $address->state;
|
$state->name = $address->state;
|
||||||
$state->id_country = isset($country->id) ? (int)$country->id : 0;
|
$state->id_country = isset($country->id) ? (int)$country->id : 0;
|
||||||
$state->id_zone = 0; // Default zone for state to create
|
$state->id_zone = 0; // Default zone for state to create
|
||||||
$state->iso_code = strtoupper(substr($address->state, 0, 2)); // Default iso for state to create
|
$state->iso_code = Tools::strtoupper(Tools::substr($address->state, 0, 2)); // Default iso for state to create
|
||||||
$state->tax_behavior = 0;
|
$state->tax_behavior = 0;
|
||||||
if (($field_error = $state->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
if (($field_error = $state->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||||
($lang_field_error = $state->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $state->add())
|
($lang_field_error = $state->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $state->add())
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ class AdminMetaControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
fwrite($write_fd, "# Directories\n");
|
fwrite($write_fd, "# Directories\n");
|
||||||
foreach ($this->rb_data['Directories'] as $dir)
|
foreach ($this->rb_data['Directories'] as $dir)
|
||||||
fwrite($write_fd, 'Disallow: /*'.$dir."\n");
|
fwrite($write_fd, 'Disallow: */'.$dir."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Files
|
// Files
|
||||||
|
|||||||
@@ -367,9 +367,9 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
if (is_array($default_product->$field_name))
|
if (is_array($default_product->$field_name))
|
||||||
foreach ($default_product->$field_name as $key => $value)
|
foreach ($default_product->$field_name as $key => $value)
|
||||||
$this->object->{$field_name}[$key] = ObjectModel::formatValue($value, $def['fields'][$field_name]['type']);
|
$this->object->{$field_name}[$key] = $value;
|
||||||
else
|
else
|
||||||
$this->object->$field_name = ObjectModel::formatValue($default_product->$field_name, $def['fields'][$field_name]['type']);
|
$this->object->$field_name = $default_product->$field_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->object->loadStockData();
|
$this->object->loadStockData();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<title>Адреса</title>
|
<title>Адреса</title>
|
||||||
<description/>
|
<description/>
|
||||||
<keywords/>
|
<keywords/>
|
||||||
<url_rewrite>address</url_rewrite>
|
<url_rewrite>addresses</url_rewrite>
|
||||||
</meta>
|
</meta>
|
||||||
<meta id="authentication" id_shop="1">
|
<meta id="authentication" id_shop="1">
|
||||||
<title>Аутентификация</title>
|
<title>Аутентификация</title>
|
||||||
|
|||||||
@@ -171,10 +171,13 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="delivery_option_price">
|
<div class="delivery_option_price">
|
||||||
{if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))}
|
{if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))}
|
||||||
|
|
||||||
{if $use_taxes == 1}
|
{if $use_taxes == 1}
|
||||||
{convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'}
|
{if $priceDisplay == 1}
|
||||||
{else}
|
{convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'}
|
||||||
{convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'}
|
{else}
|
||||||
|
{convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'}
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
{l s='Free'}
|
{l s='Free'}
|
||||||
|
|||||||
Reference in New Issue
Block a user