Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
@@ -527,6 +527,10 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'desc' => $this->l('Add New Attributes')
|
||||
);
|
||||
}
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=combinations',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
|
||||
@@ -60,8 +60,11 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$titles_array[$gender->id_gender] = $gender->name;
|
||||
|
||||
$this->_select = '
|
||||
a.date_add, gl.name as title,
|
||||
IF (YEAR(`birthday`) = 0, "-", (YEAR(CURRENT_DATE)-YEAR(`birthday`)) - (RIGHT(CURRENT_DATE, 5) < RIGHT(birthday, 5))) AS `age`, (
|
||||
a.date_add, gl.name as title, (
|
||||
SELECT SUM(total_paid_tax_excl / conversion_rate) FROM '._DB_PREFIX_.'orders o
|
||||
WHERE o.id_customer = a.id_customer
|
||||
AND active = 1
|
||||
) as total_spent, (
|
||||
SELECT c.date_add FROM '._DB_PREFIX_.'guest g
|
||||
LEFT JOIN '._DB_PREFIX_.'connections c ON c.id_guest = g.id_guest
|
||||
WHERE g.id_customer = a.id_customer
|
||||
@@ -92,10 +95,12 @@ class AdminCustomersControllerCore extends AdminController
|
||||
'email' => array(
|
||||
'title' => $this->l('Email address')
|
||||
),
|
||||
'age' => array(
|
||||
'title' => $this->l('Age'),
|
||||
'total_spent' => array(
|
||||
'title' => $this->l('Sales'),
|
||||
'type' => 'price',
|
||||
'search' => false,
|
||||
'align' => 'center'
|
||||
'havingFilter' => true,
|
||||
'align' => 'right'
|
||||
),
|
||||
'active' => array(
|
||||
'title' => $this->l('Enabled'),
|
||||
|
||||
@@ -236,6 +236,7 @@ class AdminDashboardControllerCore extends AdminController
|
||||
'new_version_url' => Tools::getCurrentUrlProtocolPrefix().'api.prestashop.com/version/check_version.php?v='._PS_VERSION_.'&lang='.$this->context->language->iso_code,
|
||||
'dashboard_use_push' => Configuration::get('PS_DASHBOARD_USE_PUSH'),
|
||||
'calendar' => $calendar_helper->generate(),
|
||||
'PS_DASHBOARD_SIMULATION' => Configuration::get('PS_DASHBOARD_SIMULATION'),
|
||||
'datepickerFrom' => Tools::getValue('datepickerFrom', $this->context->employee->stats_date_from),
|
||||
'datepickerTo' => Tools::getValue('datepickerTo', $this->context->employee->stats_date_to)
|
||||
);
|
||||
|
||||
@@ -46,10 +46,14 @@ class AdminOrdersControllerCore extends AdminController
|
||||
CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`,
|
||||
osl.`name` AS `osname`,
|
||||
os.`color`,
|
||||
IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new';
|
||||
IF((SELECT COUNT(so.id_order) FROM `'._DB_PREFIX_.'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new,
|
||||
country_lang.name as cname';
|
||||
|
||||
$this->_join = '
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)
|
||||
INNER JOIN `'._DB_PREFIX_.'address` address ON address.id_address = a.id_address_delivery
|
||||
INNER JOIN `'._DB_PREFIX_.'country` country ON address.id_country = country.id_country
|
||||
INNER JOIN `'._DB_PREFIX_.'country_lang` country_lang ON (country.`id_country` = country_lang.`id_country` AND country_lang.`id_lang` = '.(int)$this->context->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state` os ON (os.`id_order_state` = a.`current_state`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = '.(int)$this->context->language->id.')';
|
||||
$this->_orderBy = 'id_order';
|
||||
@@ -115,6 +119,34 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'search' => false,
|
||||
'remove_onclick' => true)
|
||||
);
|
||||
|
||||
if (Country::isCurrentlyUsed('country', true))
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT DISTINCT c.id_country, cl.`name`
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
'.Shop::addSqlAssociation('orders', 'o').'
|
||||
INNER JOIN `'._DB_PREFIX_.'address` a ON a.id_address = o.id_address_delivery
|
||||
INNER JOIN `'._DB_PREFIX_.'country` c ON a.id_country = c.id_country
|
||||
INNER JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.')
|
||||
ORDER BY cl.name ASC');
|
||||
|
||||
$country_array = array();
|
||||
foreach ($result as $row)
|
||||
$country_array[$row['id_country']] = $row['name'];
|
||||
|
||||
$part1 = array_slice($this->fields_list, 0, 3);
|
||||
$part2 = array_slice($this->fields_list, 3);
|
||||
$part1['cname'] = array(
|
||||
'title' => $this->l('Delivery'),
|
||||
'type' => 'select',
|
||||
'list' => $country_array,
|
||||
'filter_key' => 'country!id_country',
|
||||
'filter_type' => 'int',
|
||||
'order_key' => 'cname'
|
||||
);
|
||||
$this->fields_list = array_merge($part1, $part2);
|
||||
}
|
||||
|
||||
$this->shopLinkType = 'shop';
|
||||
$this->shopShareDatas = Shop::SHARE_ORDER;
|
||||
|
||||
@@ -2479,6 +2479,11 @@ class AdminProductsControllerCore extends AdminController
|
||||
'class' => 'toolbar-new'
|
||||
);
|
||||
}
|
||||
else
|
||||
$this->toolbar_btn['import'] = array(
|
||||
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=products',
|
||||
'desc' => $this->l('Import')
|
||||
);
|
||||
|
||||
$this->context->smarty->assign('toolbar_scroll', 1);
|
||||
$this->context->smarty->assign('show_toolbar', 1);
|
||||
|
||||
@@ -203,8 +203,9 @@ class AdminShopControllerCore extends AdminController
|
||||
$children = Category::getChildren($root_category['id_category'], $this->context->language->id);
|
||||
foreach ($children as $child)
|
||||
$selected_cat[] = $child['id_category'];
|
||||
$helper = new Helper();
|
||||
$this->content = $helper->renderCategoryTree($root_category, $selected_cat);
|
||||
|
||||
$helper = new HelperTreeCategories('categories-tree', null, $root_category['id_category']);
|
||||
$this->content = $helper->setSelectedCategories($selected_cat)->setUseSearch(true)->setUseCheckBox(true)->render();
|
||||
}
|
||||
parent::displayAjax();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user