Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -1187,7 +1187,7 @@ class WebserviceRequestCore
|
||||
else
|
||||
{
|
||||
$object = new $this->resourceConfiguration['retrieveData']['className']();
|
||||
if ($object->isMultiShopField($this->resourceConfiguration['fields'][$fieldName]['sqlId']))
|
||||
if ($object->isMultiShopField($this->resourceConfiguration['fields'][$fieldName]['sqlId']) || $fieldName == 'id')
|
||||
$table_alias = 'multi_shop_'.$this->resourceConfiguration['retrieveData']['table'];
|
||||
else
|
||||
$table_alias = '';
|
||||
|
||||
@@ -30,6 +30,7 @@ class AdminGroupsControllerCore extends AdminController
|
||||
{
|
||||
$this->table = 'group';
|
||||
$this->className = 'Group';
|
||||
$this->list_id = 'group';
|
||||
$this->lang = true;
|
||||
$this->addRowAction('edit');
|
||||
$this->addRowAction('view');
|
||||
@@ -153,6 +154,16 @@ class AdminGroupsControllerCore extends AdminController
|
||||
if (Tools::isSubmit('changeShowPricesVal') && $this->id_object)
|
||||
$this->action = 'change_show_prices_val';
|
||||
|
||||
if (Tools::getIsset('viewgroup'))
|
||||
{
|
||||
$this->list_id = 'customer_group';
|
||||
|
||||
if (isset($_POST['submitReset'.$this->list_id]))
|
||||
$this->processResetFilters();
|
||||
}
|
||||
else
|
||||
$this->list_id = 'group';
|
||||
|
||||
parent::initProcess();
|
||||
}
|
||||
|
||||
@@ -181,30 +192,29 @@ class AdminGroupsControllerCore extends AdminController
|
||||
$genders_icon[$gender->id] = '../genders/'.(int)$gender->id.'.jpg';
|
||||
$genders[$gender->id] = $gender->name;
|
||||
}
|
||||
$customer_fields_display = (array(
|
||||
'id_customer' => array('title' => $this->l('ID'), 'width' => 15, 'align' => 'center'),
|
||||
$this->table = 'customer_group';
|
||||
$this->lang = false;
|
||||
$this->list_id = 'customer_group';
|
||||
$this->actions = array();
|
||||
$this->bulk_actions = false;
|
||||
$this->no_link = true;
|
||||
$this->fields_list = (array(
|
||||
'id_customer' => array('title' => $this->l('ID'), 'width' => 15, 'align' => 'center', 'filter_key' => 'c!id_customer'),
|
||||
'id_gender' => array('title' => $this->l('Titles'), 'align' => 'center', 'width' => 50,'icon' => $genders_icon, 'list' => $genders),
|
||||
'firstname' => array('title' => $this->l('Name'), 'align' => 'center'),
|
||||
'lastname' => array('title' => $this->l('Name'), 'align' => 'center'),
|
||||
'email' => array('title' => $this->l('Email address'), 'width' => 150, 'align' => 'center'),
|
||||
'firstname' => array('title' => $this->l('First name'), 'align' => 'center'),
|
||||
'lastname' => array('title' => $this->l('Last name'), 'align' => 'center'),
|
||||
'email' => array('title' => $this->l('Email address'), 'width' => 150, 'align' => 'center', 'filter_key' => 'c!email', 'orderby' => true),
|
||||
'birthday' => array('title' => $this->l('Birth date'), 'width' => 150, 'align' => 'right', 'type' => 'date'),
|
||||
'date_add' => array('title' => $this->l('Register date'), 'width' => 150, 'align' => 'right', 'type' => 'date'),
|
||||
'orders' => array('title' => $this->l('Orders'), 'align' => 'center'),
|
||||
'active' => array('title' => $this->l('Enabled'),'align' => 'center','width' => 20, 'active' => 'status','type' => 'bool')
|
||||
));
|
||||
|
||||
$customer_list = $group->getCustomers(false, 0, 100, true);
|
||||
|
||||
$helper = new HelperList();
|
||||
$helper->currentIndex = Context::getContext()->link->getAdminLink('AdminCustomers', false);
|
||||
$helper->token = Tools::getAdminTokenLite('AdminCustomers');
|
||||
$helper->shopLinkType = '';
|
||||
$helper->table = 'customer';
|
||||
$helper->identifier = 'id_customer';
|
||||
$helper->actions = array('edit', 'view');
|
||||
$helper->show_toolbar = false;
|
||||
|
||||
return $helper->generateList($customer_list, $customer_fields_display);
|
||||
$this->_select = 'c.*';
|
||||
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (a.`id_customer` = c.`id_customer`)';
|
||||
$this->_where = 'AND a.`id_group` = '.(int)$group->id.' AND c.`deleted` != 1';
|
||||
self::$currentIndex = self::$currentIndex.'&viewgroup';
|
||||
$this->processFilter();
|
||||
return parent::renderList();
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
|
||||
@@ -1067,13 +1067,23 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
if (Tools::getValue('forceIDs') && isset($info['id']) && (int)$info['id'])
|
||||
$product = new Product((int)$info['id']);
|
||||
else
|
||||
elseif (Tools::getValue('match_ref') && array_key_exists('reference', $info))
|
||||
{
|
||||
if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product'))
|
||||
$product = new Product((int)$info['id']);
|
||||
else
|
||||
$product = new Product();
|
||||
$datas = Db::getInstance()->getRow('
|
||||
SELECT p.`id_product`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.Shop::addSqlAssociation('product', 'p').'
|
||||
WHERE p.`reference` = "'.pSQL($info['reference']).'"
|
||||
');
|
||||
if (isset($datas['id_product']) && $datas['id_product'])
|
||||
$product = new Product((int)$datas['id_product']);
|
||||
else
|
||||
$product = new Product();
|
||||
}
|
||||
elseif (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product'))
|
||||
$product = new Product((int)$info['id']);
|
||||
else
|
||||
$product = new Product();
|
||||
|
||||
if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product'))
|
||||
{
|
||||
@@ -1311,7 +1321,7 @@ class AdminImportControllerCore extends AdminController
|
||||
SELECT product_shop.`date_add`, p.`id_product`
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.Shop::addSqlAssociation('product', 'p').'
|
||||
WHERE p.`reference` = "'.$product->reference.'"
|
||||
WHERE p.`reference` = "'.pSQL($product->reference).'"
|
||||
');
|
||||
$product->id = (int)$datas['id_product'];
|
||||
$product->date_add = pSQL($datas['date_add']);
|
||||
|
||||
@@ -35,7 +35,7 @@ class AdminLogsControllerCore extends AdminController
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_log' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||
'employee' => array('title' => $this->l('Employee'), 'align' => 'center', 'width' => 100),
|
||||
'employee' => array('title' => $this->l('Employee'), 'align' => 'center', 'width' => 100, 'havingFilter' => true),
|
||||
'severity' => array('title' => $this->l('Severity (1-4)'), 'align' => 'center', 'width' => 50),
|
||||
'message' => array('title' => $this->l('Message')),
|
||||
'object_type' => array('title' => $this->l('Object type'), 'width' => 75),
|
||||
|
||||
Reference in New Issue
Block a user