ELITIV Posted November 6, 2016 Share Posted November 6, 2016 Hi. Any solution for - Available for order (status in list) P.S. This, only show statuses but, filter_key and enable\disable not working. $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' ); Thank you for help. Link to comment Share on other sites More sharing options...
exeeld Posted November 18, 2016 Share Posted November 18, 2016 (edited) bump Edited November 18, 2016 by exeeld (see edit history) Link to comment Share on other sites More sharing options...
noodles57 Posted January 2, 2017 Share Posted January 2, 2017 Great topic. Thanks for sharing. How would I add fields to show shipping costs, Supplier reference and wholesale pricing? Link to comment Share on other sites More sharing options...
ZikmaSolutions Posted February 13, 2017 Share Posted February 13, 2017 Hi there, I have one Idea. So let's do this I want to add custom filter in Back Office products list for images. How to filter them in this way (YES / NO) . If you set NO, prestashop will list products WITHOUT image. Else, if you set YES, ps will list products with images. What you think? Link to comment Share on other sites More sharing options...
jailani2k Posted March 21, 2017 Share Posted March 21, 2017 Hi, In Backoffice I want to show Product attributes in prouct listing in after Product name, I want to add the new column attribute and show the all attribute values seperated By comma How I should achieve this. I tried last two days but nothing happen. Link to comment Share on other sites More sharing options...
misi_11 Posted May 5, 2017 Share Posted May 5, 2017 how to add "date_update" to product page? i put this code: $this->fields_list['date_upd'] = array( 'title' => $this->l('Ultima Modificare'), 'align' => 'left', but i have this message: Interogare SQL gresitaColumn 'date_upd' in field list is ambiguous Link to comment Share on other sites More sharing options...
valentin.g Posted May 6, 2017 Share Posted May 6, 2017 how to add "date_update" to product page? i put this code: $this->fields_list['date_upd'] = array( 'title' => $this->l('Ultima Modificare'), 'align' => 'left', but i have this message: Interogare SQL gresita Column 'date_upd' in field list is ambiguous $this->fields_list['date_upd'] = array( 'title' => $this->l('Data actualizarii'), 'align' => 'right', 'class' => 'fixed-width-xs', 'filter_key' => 'a!date_upd' ); 1 Link to comment Share on other sites More sharing options...
siderio2 Posted May 19, 2017 Share Posted May 19, 2017 Hi there!! I'm a new user, working for the first time on a store. I'm using version 1.7.0.6, and in my back-office, the product list doesn't shows final price, only price before taxes. I've been reading some of the posts in this thread, but it looks like there has been a huge modification in the last Prestashop's release. When I check the AdminProcuctsController.php file to find the fields_list array, this is how it looks like: $this->fields_list = array( 'attributes' => array('title' => $this->l('Attribute - value pair'), 'align' => 'left'), 'price' => array('title' => $this->l('Impact on price'), 'type' => 'price', 'align' => 'left'), 'weight' => array('title' => $this->l('Impact on weight'), 'align' => 'left'), 'reference' => array('title' => $this->trans('Reference', array(), 'Admin.Global'), 'align' => 'left'), 'ean13' => array('title' => $this->l('EAN-13'), 'align' => 'left'), 'isbn' => array('title' => $this->l('ISBN'), 'align' => 'left'), 'upc' => array('title' => $this->l('UPC'), 'align' => 'left') ); So, what should I do to show final price in the list?? Where could I do it?? Thanks for the help!! Link to comment Share on other sites More sharing options...
Kaper Posted July 11, 2017 Share Posted July 11, 2017 Please can anyone help how we can add column VISIBILITY ? And i am also looking for solution to add column "Backorder allowed or not" . Thanks for help Link to comment Share on other sites More sharing options...
MrGun Posted July 14, 2017 Share Posted July 14, 2017 (edited) Hi there, how can I add invoice number in the admin order list? I tried with this code but doesn't work: $this->fields_list['id_invoice'] = array( 'title' => $this->l('Invoice'), 'align' => 'left', 'width' => 40 ); Thank you! Edited July 14, 2017 by MrGun (see edit history) Link to comment Share on other sites More sharing options...
François38 Posted July 17, 2017 Share Posted July 17, 2017 (edited) Please can anyone help how we can add column VISIBILITY ? Hi Kaper, In AdminProductsController.php Add this line on SQL select : $this->_select .= ', a.`visibility` as `visibility_state`'; And add this on Fields list : $this->fields_list['visibility_state'] = array( 'title' => $this->l('Visibility'), 'align' => 'left', 'class' => 'fixed-width-xs', 'align' => center, 'havingFilter' => true, 'filter_key' => 'visibility_state' ); Edited July 17, 2017 by François38 (see edit history) Link to comment Share on other sites More sharing options...
François38 Posted July 17, 2017 Share Posted July 17, 2017 how can I add invoice number in the admin order list? HI MrGun, In AdminOrdersController.php Add this line on SQL select : $this->_select .= ', oi.`number` AS `invoice_number"; Add this line under the first, or under other line starting with $this->_join $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'order_invoice` oi ON (oi.`id_order` = a.`id_order`)'; And add this on fields list : $this->fields_list['invoice_number'] = array( 'title' => $this->l('Invoice Number'), 'align' => 'center', 'width' => 100, 'havingFilter' => true, 'filter_key' => 'invoice_number' ); Link to comment Share on other sites More sharing options...
Kaper Posted July 17, 2017 Share Posted July 17, 2017 (edited) Hi Kaper, In AdminProductsController.php Add this line on SQL select : $this->_select .= ', a.`visibility` as `visibility_state`'; And add this on Fields list : $this->fields_list['visibility_state'] = array( 'title' => $this->l('Visibility'), 'align' => 'left', 'class' => 'fixed-width-xs', 'align' => center, 'havingFilter' => true, 'filter_key' => 'visibility_state' ); Thank you so much, appreciate, but can you help how make it work with "filter" option too? Another thing -> can be "none / both / catalog " translated as it is in the admin -> catalog -> product -> TAB information ? Thank youuu EDIT: i got this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'visibility_state`, sa.`active` AS `active` , , a.`visibility` as `visibility_' at line 2 Edit2: here is working code: $this->_select .= $alias.'.`visibility` AS my_visibility, '; $this->fields_list['my_visibility'] = array( 'title' => $this->l('Visibility'), 'align' => 'left', 'class' => 'fixed-width-xs', 'align' => center, 'havingFilter' => true, 'filter_key' => 'my_visibility' ); I just need to translate fields both, none etc... Edited July 17, 2017 by Kaper (see edit history) Link to comment Share on other sites More sharing options...
François38 Posted July 18, 2017 Share Posted July 18, 2017 Thank you so much, appreciate, but can you help how make it work with "filter" option too? Another thing -> can be "none / both / catalog " translated as it is in the admin -> catalog -> product -> TAB information ? Thank youuu EDIT: i got this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'visibility_state`, sa.`active` AS `active` , , a.`visibility` as `visibility_' at line 2 Edit2: here is working code: $this->_select .= $alias.'.`visibility` AS my_visibility, '; $this->fields_list['my_visibility'] = array( 'title' => $this->l('Visibility'), 'align' => 'left', 'class' => 'fixed-width-xs', 'align' => center, 'havingFilter' => true, 'filter_key' => 'my_visibility' ); I just need to translate fields both, none etc... Ok, in fact, there was just one extra "," in my code, before a.`visibility` For translate, use this fields_list : $this->fields_list['my_visibility'] = array( 'title' => $this->l('Visibility'), 'align' => 'left', 'class' => 'fixed-width-xs', 'align' => center, 'havingFilter' => true, 'filter_key' => 'my_visibility', 'callback' => 'my_visibility_function' ); And add this function under the fields list : public static function my_visibility_function($my_visibility_function) { if ($visibility_state_lang == 'both') return '<span style="background-color : #0b9819; color : #ffffff; border-radius : 4px/4px"> všade </span>'; elseif ($visibility_state_lang == 'catalog') return '<span style="background-color : #009adf; color : #ffffff; border-radius : 4px/4px"> katalóg </span>'; elseif ($visibility_state_lang == 'search') return '<span style="background-color : #0020df; color : #ffffff; border-radius : 4px/4px"> vyhľadávanie </span>'; else return '<span style="background-color : #6c6c6c; color : #ffffff; border-radius : 4px/4px"> nikde </span>'; } You can update the traduction because it is google translate for Slovensko. The best would be to use the translation files but I could not use the variables. Regards, Link to comment Share on other sites More sharing options...
Kaper Posted July 18, 2017 Share Posted July 18, 2017 Thank you so much François38 for your time! I tried your code, but in the new column i see only "NIKDE" with grey backgr. (NONE in english) is there something wrong iin the code ? Link to comment Share on other sites More sharing options...
François38 Posted July 18, 2017 Share Posted July 18, 2017 Yes, my mistake ! Use this function : public static function my_visibility_function($my_visibility_function) { if ($my_visibility_function == 'both') return '<span style="background-color : #0b9819; color : #ffffff; border-radius : 4px/4px"> všade </span>'; elseif ($my_visibility_function == 'catalog') return '<span style="background-color : #009adf; color : #ffffff; border-radius : 4px/4px"> katalóg </span>'; elseif ($my_visibility_function == 'search') return '<span style="background-color : #0020df; color : #ffffff; border-radius : 4px/4px"> vyhľadávanie </span>'; else return '<span style="background-color : #6c6c6c; color : #ffffff; border-radius : 4px/4px"> nikde </span>'; } Link to comment Share on other sites More sharing options...
Kaper Posted July 18, 2017 Share Posted July 18, 2017 Hey Bro, you are just GENIUS, so many thanks to you ))... It works like a CHARM! If it is possible, it would still have one improvement. If I want to filter the status, I have to type the word as it is in the database, ie "None, both ... etc" But if this change is more complicated, it does not matter, I'm glad, even for this . Link to comment Share on other sites More sharing options...
François38 Posted July 18, 2017 Share Posted July 18, 2017 Yes, I wanted to do the same thing, but I do not know how to do it. Sorry. Link to comment Share on other sites More sharing options...
quentino.cz Posted August 9, 2017 Share Posted August 9, 2017 Hi, I need to do a similar thing in PS 1.7.0.2 I would like to have a column with a carrier name in the orders list. Can anybody help me? Thanks! Link to comment Share on other sites More sharing options...
vdonadio Posted January 22, 2018 Share Posted January 22, 2018 (edited) To add the carrier column to the Product List in Backoffice, you need to add the following to /controllers/admin/ProductController.php: $this->_join.= 'INNER JOIN `'._DB_PREFIX_.'product_carrier` pc ON (pc.`id_product` = a.`id_product`) LEFT JOIN `'._DB_PREFIX_.'carrier` carrier ON (carrier.`id_carrier` = pc.`id_carrier_reference`)'; $this->fields_list['carrier'] = array( 'title' => $this->l('Transportista'), 'align' => 'text-right', 'filter_key' => 'carrier!name' ); The only problem I can't solve witht his, is when I export products, I get an empty CSV file. If I remove this code, the exported file is perfect. Any idea? Help please Edited January 22, 2018 by vdonadio (see edit history) Link to comment Share on other sites More sharing options...
europaul Posted April 29, 2018 Share Posted April 29, 2018 On 7/11/2016 at 12:09 AM, ELITIV said: Hi. Any solution for - Available for order (status in list) P.S. This, only show statuses but, filter_key and enable\disable not working. $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' ); Thank you for help. Hello, were you able to solve that? I mean check or unckeck the available for order option in the product list? Thanks? Link to comment Share on other sites More sharing options...
ineszekri Posted July 23, 2018 Share Posted July 23, 2018 On 01/11/2013 at 12:38 PM, franco.pentangeli said: On 18/09/2013 at 9:06 AM, m3w said: Thanks for the reply. I know that is that part of code i have to work, infact i added this part of code inside it: $this->fields_list['id_manufacturer'] = array( 'title' => $this->l('Manufacturer'), 'align' => 'left', 'width' => 40 ); This works, but print only the ID number, how can i show the manufacturer's name? hi , i want to filtre my product list in backoffice by manufacturer current after create a profil and permission for this manufacture , in backoffice i want to show just the product List for this manuafcture . any help plz and thnks Link to comment Share on other sites More sharing options...
cduduc Posted November 8, 2018 Share Posted November 8, 2018 Hello, I have PS 1.6.1.19. I have added: $this->fields_list['location'] = array( 'title' => $this->l('Location'), 'width' => 30 ); For the Location column to be visible in the Products list but the column is empty with no values. How exactly the syntax for $this->_join should be? I know I need to add that query as well in order for the column to get values. Or not? Thank you in advance! Link to comment Share on other sites More sharing options...
Massimo333 Posted March 13, 2019 Share Posted March 13, 2019 How can I display final price in BO product list for Prestashop 1.7? Link to comment Share on other sites More sharing options...
Kaper Posted February 26, 2020 Share Posted February 26, 2020 (edited) Hello Guys, i need to add 2 custom COLUMNs with 2 buttons with different links ... I need just button with href="#id_product..." . Can you please help me how? I need link with ID product for example: https://page.com/adminer/...../ID_PRODUCT/... I need it as a shortcut to MYSQL querry trigger for OFF/ON product for backorder. OR: Another solution is, i need to help how can i add define variable -> ID_PRODUCT here in this function: public static function my_visibility_function($my_visibility_function) { if ($my_visibility_function == 'both') return '<span style="background-color : #0b9819; color : #ffffff; border-radius : 4px/4px; padding: 2px 3px 2px 3px;"> Dostupné '.$id_product.'</span>HERE WILL BE PRODUCT_ID'; elseif ($my_visibility_function == 'catalog') return '<span style="background-color : #009adf; color : #ffffff; border-radius : 4px/4px; padding: 2px 3px 2px 3px;"> katalóg </span>'; elseif ($my_visibility_function == 'search') return '<span style="background-color : #0020df; color : #ffffff; border-radius : 4px/4px; padding: 2px 3px 2px 3px;"> vyhľadávanie </span>'; else return '<span style="background-color : #6c6c6c; color : #ffffff; border-radius : 4px/4px; padding: 2px 3px 2px 3px;"> Vypredané </span>'; } Appreciate ♥ Edited February 26, 2020 by Kaper (see edit history) Link to comment Share on other sites More sharing options...
ruisonika Posted June 2, 2021 Share Posted June 2, 2021 Hello i think i'm on spot I need some help (running 1.6 version) in backoffice catalog product list i've implemented a field like active (0/1) and all works well (in ps_product i've created the field) but i don't know what is the file to make same action trigger like active...in backoffice in products list when i click on product active green check, it auto upgrade the ps_product.active field and i wanna do the same behaviour with new field. Hope some 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