jokerstar Posted February 28, 2014 Share Posted February 28, 2014 Hello, I would like ask you how can I add sorting arrows into stock managemet in back office? path: back office/stock/stock management I think it will be something in php but its difficult for me. Please check attachment. Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 /controllers/admin/AdminStockManagement.php there is a code like: public function __construct() { $this->context = Context::getContext(); $this->table = 'product'; $this->className = 'Product'; $this->lang = true; $this->multishop_context = Shop::CONTEXT_ALL; $this->fields_list = array( 'reference' => array( 'title' => $this->l('Product reference'), 'align' => 'center', 'filter_key' => 'a!reference', 'width' => 200 ), 'ean13' => array( 'title' => $this->l('EAN13'), 'align' => 'center', 'filter_key' => 'a!ean13', 'width' => 100 ), 'upc' => array( 'title' => $this->l('UPC'), 'align' => 'center', 'filter_key' => 'a!upc', 'width' => 100 ), 'name' => array( 'title' => $this->l('Name'), ), 'stock' => array( 'title' => $this->l('Quantity'), 'hint' => $this->l('Quantitity total for all warehouses.'), 'width' => 100, 'orderby' => false, 'filter' => false, 'search' => false, ), ); from this part: 'stock' => array( 'title' => $this->l('Quantity'), 'hint' => $this->l('Quantitity total for all warehouses.'), 'width' => 100, 'orderby' => false, 'filter' => false, 'search' => false, ), remove 'orderby' => false, effect: Link to comment Share on other sites More sharing options...
jokerstar Posted February 28, 2014 Author Share Posted February 28, 2014 Hello Vekia thanks for quick answer. I edit what you wrote but it added arrows, but if I click on them it doesnt work, it returns one line with zero. Link to comment Share on other sites More sharing options...
vekia Posted February 28, 2014 Share Posted February 28, 2014 add there also this: 'filter_key' => 'a!quantity', Link to comment Share on other sites More sharing options...
jokerstar Posted February 28, 2014 Author Share Posted February 28, 2014 add there also this: 'filter_key' => 'a!quantity', now it reloads page, but dont sort. I tried both arrows but nothing happens Link to comment Share on other sites More sharing options...
jokerstar Posted March 1, 2014 Author Share Posted March 1, 2014 Vekia do you have any idea? It looks like that this arrows dont use quantity value, but it is only my guess Link to comment Share on other sites More sharing options...
Recommended Posts