jgriff89 Posted March 22, 2016 Share Posted March 22, 2016 Hi, I've been following this topic: https://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/page-5 I'm trying to add the product description and all the categories products are listed under to the product list in the back office, but I'm struggling to do it. I've added the following to controllers/admin/AdminProductController.php: on line 185: LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.id_product = pl.id_product.') Then I've added this at line 238: $this->fields_list['description'] = array( 'title' => $this->l('description'), 'type' => 'description', 'align' => 'text-right', 'filter_key' => 'a!description' ); But I can't get it to work. Does anybody have any pointers? I'm also trying to add to the categories column all the categories a product is listed under, if anybody has any information on that at all? Best wishes, Jamie Link to comment Share on other sites More sharing options...
NemoPS Posted March 23, 2016 Share Posted March 23, 2016 Product lang should be there already as b.Try using b!description for the filter. The rest should be okay, I believe it grabs everything out of that table. If not, add this$this->_select .= 'b.description, ';Before the fields list 1 Link to comment Share on other sites More sharing options...
jgriff89 Posted March 23, 2016 Author Share Posted March 23, 2016 Fantastic, that worked a treat! Any pointers on getting all of a products categories to show at all?? Thanks! Link to comment Share on other sites More sharing options...
NemoPS Posted March 25, 2016 Share Posted March 25, 2016 All of the categories? There? you can try to adapt this: http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/#.VvUluOIgvmgInstead of the manufacturer, join the category_product table. It's a bit complex as you have to use a subquery. I am not a sql [spam-filter] so I'd probably go wrong on the first attempt if I were to tell you the query now. In any case, use GROUP_CONCAT like in this tut: http://nemops.com/bought-products-prestashop-order-list/#.VvUmFOIgvmg 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