DARKF3D3 Posted November 9, 2015 Share Posted November 9, 2015 (edited) Hello, do you know how can I remove or simply hide a column into the orders backoffice page? In particular I want to hide the country page because since I sell only to one country it's useless to have that column. Edited November 10, 2015 by DARKF3D3 (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted November 9, 2015 Share Posted November 9, 2015 You would edit the AdminOrdersController and try to comment this section out 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); } Link to comment Share on other sites More sharing options...
DARKF3D3 Posted November 10, 2015 Author Share Posted November 10, 2015 Thank you, it worked! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now