weraw Posted August 31, 2010 Share Posted August 31, 2010 Hi,I have a special intregretion four my shop. I want to hide a status in the admin like it is hidden four my costumers.!!!!The status should not be showd in the Orders tab!!!!!Any tips in witch file and witch part of code i should play with! Link to comment Share on other sites More sharing options...
rocky Posted September 1, 2010 Share Posted September 1, 2010 See my post here. Link to comment Share on other sites More sharing options...
Patric Posted September 1, 2010 Share Posted September 1, 2010 Topic moved. Link to comment Share on other sites More sharing options...
weraw Posted September 4, 2010 Author Share Posted September 4, 2010 Hmm you must have miss understod me!i want to hide the status in the tab where all new income orders is showed.With the code in the topic i was hiding the status in the dropdown list when opening a order! Link to comment Share on other sites More sharing options...
rocky Posted September 4, 2010 Share Posted September 4, 2010 You should always be as clear as possible when you post to avoid confusion. If that is difficult for you, post a screenshot to make it clear which area you are talking about.So you want to hide the order status column on the Orders tab? You can do that by changing lines 44-52 of admin/tabs/AdminOrders.php from: 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => 140, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => 100), 'osname' => array('title' => $this->l('Status'), 'widthColumn' => 250, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 90, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false)); to: $this->fieldsDisplay = array( 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), 'customer' => array('title' => $this->l('Customer'), 'widthColumn' => 160, 'width' => /*140*/240, 'filter_key' => 'customer', 'tmpTableFilter' => true), 'total_paid' => array('title' => $this->l('Total'), 'width' => /*70*/120, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'price' => true, 'currency' => true), 'payment' => array('title' => $this->l('Payment'), 'width' => /*100*/146), //'osname' => array('title' => $this->l('Status'), 'widthColumn' => 250, 'type' => 'select', 'select' => $statesArray, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int', 'width' => 200), 'date_add' => array('title' => $this->l('Date'), 'width' => 90, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), 'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false)); Link to comment Share on other sites More sharing options...
weraw Posted September 5, 2010 Author Share Posted September 5, 2010 Sorry four my bad description.How can i hide id_order_state 12 in that list because it is what i am searchin with this topic.I want to hide id_order_state 12 in the list and show the last order state!I have tried to play with the code from the topic you post but i cant get it. And i have tried to play with the sql querry but no results. Link to comment Share on other sites More sharing options...
weraw Posted September 6, 2010 Author Share Posted September 6, 2010 If you have a solution four this please let me know! Link to comment Share on other sites More sharing options...
rocky Posted September 6, 2010 Share Posted September 6, 2010 I think I understand now. Try changing line 37 of admin/tabs/AdminOrder.php from: $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` GROUP BY moh.`id_order`)'; to: $this->_where = 'AND oh.`id_order_history` = (SELECT MAX(`id_order_history`) FROM `'._DB_PREFIX_.'order_history` moh WHERE moh.`id_order` = a.`id_order` AND moh.`id_order_state` != 12 GROUP BY moh.`id_order`)'; This should exclude order state 12 when selecting the last selected order state. Link to comment Share on other sites More sharing options...
weraw Posted September 7, 2010 Author Share Posted September 7, 2010 Thx rocky! 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