Aumanz Posted July 26, 2017 Share Posted July 26, 2017 (edited) Hi there, first have to say sorry if this was duplicated or solved on other topic, but i didnt find the correct way to solve it reading around. i will explain what i do, I like to add Position field to manufacturer list on back office, or if posible in other parts, for customizing positions everywhere i need. Using 1.6.1.5 PS version, so later of much trying, and receiving errors finally i have visible the "position" button with drag and drop movement, also change number, but dindnt save changes.. I've modifyed "AdminManufacturersController.php" also adding new table to _manufacturer SQL tables called "position" in adminmanufacturerscontroller.php i've added protected $position_identifier = 'id_manufacturer'; at first line later the first class call.. Changed (inside the first public function __construct() $this->_defaultOrderBy = 'name'; by $this->_defaultOrderBy = 'position'; Also added , 'position' => array( 'title' => $this->l('Posicion'), 'filter_key' => 'position', 'align' => 'center', 'position' => 'position', 'orderby' => true ) just later of 'active' => array( 'title' => $this->l('Enabled'), 'active' => 'status', 'type' => 'bool', 'align' => 'center', 'class' => 'fixed-width-xs', 'orderby' => false ) With a security copy of adminmanufacturerscontroller.php, saved and uploaded, then im able to change position and all seems to be ok, but dindt save changes, can please anyone help me on this? Im really stucked on this and im studing for try to make it works. Thanks, best regards. Edited July 27, 2017 by Aumanz (see edit history) Link to comment Share on other sites More sharing options...
Aumanz Posted July 27, 2017 Author Share Posted July 27, 2017 Still trying to solve it.. i've added public $position; to Manufacturer.php first class and 'position' => array('type' => self::TYPE_INT), also in Manufacturer.php inside the first public static $definition = array( Still doesn't save changes.. please can someone help? Thanks, regards. Link to comment Share on other sites More sharing options...
Aumanz Posted July 27, 2017 Author Share Posted July 27, 2017 Getting crazy trying to change, modify or adapt some code.. i think solution for this was between https://www.reussir-mon-ecommerce.fr/gestion-des-positions-dans-un-module-prestashop/ https://stackoverflow.com/questions/29221564/prestashop-custom-admin-module-draggable-sort-order-not-working But im stucked and doesnt get more progress. Please anyone can take a look and help me? Regards. Link to comment Share on other sites More sharing options...
jugalfas Posted August 19, 2021 Share Posted August 19, 2021 Hello Aumanz! Did you solved that problem? if yes can you explain how you solve that? 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