perusi Posted January 16, 2014 Share Posted January 16, 2014 (edited) Hello, How can i add in the BackOffice Product Listing two new columns with the "Available for Order" field and "Online Only" field? Something like this was done in this thread: http://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/ But how can it be done with Available for Order field and Online Only field? Thanks Edited January 24, 2014 by perusi (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 16, 2014 Share Posted January 16, 2014 what prestashop version you use? everything depends on it. Link to comment Share on other sites More sharing options...
perusi Posted January 16, 2014 Author Share Posted January 16, 2014 1.5.3.1 thanks Vekia Link to comment Share on other sites More sharing options...
perusi Posted January 20, 2014 Author Share Posted January 20, 2014 anyone? or... any idea? Link to comment Share on other sites More sharing options...
perusi Posted January 20, 2014 Author Share Posted January 20, 2014 Vekia you are the master on this forum, could you please tell me if it can be done? 1 Link to comment Share on other sites More sharing options...
perusi Posted January 24, 2014 Author Share Posted January 24, 2014 any idea? i`m struggling with this thing, i can't get it to work Link to comment Share on other sites More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 sorry i missed your replies, here is the solution: in adminProductsController.php file extend object definition with these fields: $this->fields_list['online_only'] = array( 'title' => $this->l('Online Only'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'online_only', 'filter_key' => $alias.'!online_only' ); $this->fields_list['Available_for_order'] = array( 'title' => $this->l('Available For order'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'available_for_order', 'filter_key' => $alias.'!available_for_order' ); effect: 1 Link to comment Share on other sites More sharing options...
perusi Posted January 24, 2014 Author Share Posted January 24, 2014 Thanks Vekia, thanks thanks thanks Link to comment Share on other sites More sharing options...
vekia Posted January 24, 2014 Share Posted January 24, 2014 you're welcome does it work as you expect? Link to comment Share on other sites More sharing options...
ajnglagla Posted April 7, 2014 Share Posted April 7, 2014 (edited) what if i want to change (in another database table) "Cover Image" status? and, i tried this code, its showing the status of field but its not changeable :/ Edited April 7, 2014 by ajnglagla (see edit history) Link to comment Share on other sites More sharing options...
ajnglagla Posted April 8, 2014 Share Posted April 8, 2014 (edited) this is very important for me. :/ any idea? Edited April 8, 2014 by ajnglagla (see edit history) Link to comment Share on other sites More sharing options...
Spanner Posted October 8, 2014 Share Posted October 8, 2014 sorry i missed your replies, here is the solution: in adminProductsController.php file extend object definition with these fields: $this->fields_list['online_only'] = array( 'title' => $this->l('Online Only'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'online_only', 'filter_key' => $alias.'!online_only' ); $this->fields_list['Available_for_order'] = array( 'title' => $this->l('Available For order'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'available_for_order', 'filter_key' => $alias.'!available_for_order' ); effect: Hi Vekia Please can you tell me how this works in v1.6.0.5 for 'Available for order' appears in product/search lists? Much appreciated. Kaye Link to comment Share on other sites More sharing options...
vekia Posted October 9, 2014 Share Posted October 9, 2014 hello it should work also for ps 1.6 have you tried to alter class i mentioned in short guide you pasted above? Link to comment Share on other sites More sharing options...
Spanner Posted October 10, 2014 Share Posted October 10, 2014 Thank you so much Vekia - it worked a treat! Link to comment Share on other sites More sharing options...
Spanner Posted October 10, 2014 Share Posted October 10, 2014 (edited) Sorry to be a pain, but which file do I need to edit to repeat the same in my product search results? Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see my product lists anymore: Bad SQL queryColumn 'Available_for_order' in where clause is ambiguous Is there another tweak I need to do? Regards Kaye Edited October 11, 2014 by Spanner (see edit history) Link to comment Share on other sites More sharing options...
Spanner Posted October 16, 2014 Share Posted October 16, 2014 Hi there I followed the instructions quoted as I also wanted to the 'Available for order' option to my product lists and searches, but which file do I need to edit to repeat the same in my product search results? Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see any product lists anymore, other than searches: Bad SQL queryColumn 'Available_for_order' in where clause is ambiguous Is there another tweak I need to do? Regards Kaye Hello, How can i add in the BackOffice Product Listing two new columns with the "Available for Order" field and "Online Only" field? Something like this was done in this thread: http://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/ But how can it be done with Available for Order field and Online Only field? Thanks sorry i missed your replies, here is the solution: in adminProductsController.php file extend object definition with these fields: $this->fields_list['online_only'] = array( 'title' => $this->l('Online Only'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'online_only', 'filter_key' => $alias.'!online_only' ); $this->fields_list['Available_for_order'] = array( 'title' => $this->l('Available For order'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'available_for_order', 'filter_key' => $alias.'!available_for_order' ); effect: Link to comment Share on other sites More sharing options...
ELITIV Posted November 6, 2016 Share Posted November 6, 2016 Hi there I followed the instructions quoted as I also wanted to the 'Available for order' option to my product lists and searches, but which file do I need to edit to repeat the same in my product search results? Also, I just tried to filter by 'Available of order', and then to click the field to change the status, and each time I got this error and I am unable to see any product lists anymore, other than searches: Bad SQL queryColumn 'Available_for_order' in where clause is ambiguous Is there another tweak I need to do? Regards Kaye Have you found any solution? Bad SQL query Column 'Available_for_order' in where clause is ambiguous. It's work only for view. Change status (available for order) from product list not working only with this one. Have any solution. Link to comment Share on other sites More sharing options...
ELITIV Posted November 6, 2016 Share Posted November 6, 2016 sorry i missed your replies, here is the solution: in adminProductsController.php file extend object definition with these fields: $this->fields_list['online_only'] = array( 'title' => $this->l('Online Only'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'online_only', 'filter_key' => $alias.'!online_only' ); $this->fields_list['Available_for_order'] = array( 'title' => $this->l('Available For order'), 'width' => 90, 'type' => 'bool', 'align' => 'right', 'active' => 'available_for_order', 'filter_key' => $alias.'!available_for_order' ); effect: Hi vekia. Thank you for your solution. I try your solution for (Available for order) and all it's ok for view only, but filter_key and enable\disable from the list not working. 1. For filter_key problem is in SQL Query (WHERE 1 AND available_for_order = 0/1), but i can't find a solution. 2. How can solve enable\disable from list? Like as Status (green/red icons ). Thank you for your suggestion and help. 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