m3w Posted September 17, 2013 Share Posted September 17, 2013 Hi, i need help to add custom columns in product list in backoffice, what i'd like is get Features value and Manufacturer beside Category column. I'm editing AdminProductsController.php and found: $this->fields_list['id_manufacturer'] = array( 'title' => $this->l('Manufacturer'), 'align' => 'left', 'width' => 40 ); With this code i get the id of manufacturer, how can i get the name? Hope someone can help to figured it out 1 Link to comment Share on other sites More sharing options...
Jiten rash (away) Posted September 17, 2013 Share Posted September 17, 2013 <a href="{$manufacturer.link}"> on tpl php $manufacturers = Manufacturer::getManufacturers(false,$language['id_lang'], true); Link to comment Share on other sites More sharing options...
m3w Posted September 17, 2013 Author Share Posted September 17, 2013 <a href="{$manufacturer.link}"> on tpl php $manufacturers = Manufacturer::getManufacturers(false,$language['id_lang'], true); I'm talking in backoffice not in frontend, how can i impement it on my code above? Link to comment Share on other sites More sharing options...
vekia Posted September 17, 2013 Share Posted September 17, 2013 what ps version you use? everything depends on it 1 Link to comment Share on other sites More sharing options...
m3w Posted September 17, 2013 Author Share Posted September 17, 2013 what ps version you use? everything depends on it You're right... 1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted September 17, 2013 Share Posted September 17, 2013 open file: controllers/admin/AdminProductsController.php you've got there $this->field_list definition: $this->fields_list = array(); $this->fields_list['id_product'] = array( 'title' => $this->l('ID'), 'align' => 'center', 'type' => 'int', 'width' => 40 ); $this->fields_list['image'] = array( 'title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'width' => 70, 'orderby' => false, 'filter' => false, 'search' => false ); $this->fields_list['name'] = array( 'title' => $this->l('Name'), 'filter_key' => 'b!name' ); $this->fields_list['reference'] = array( 'title' => $this->l('Reference'), 'align' => 'left', 'width' => 80 ); if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) $this->fields_list['shopname'] = array( 'title' => $this->l('Default shop:'), 'width' => 230, 'filter_key' => 'shop!name', ); else $this->fields_list['name_category'] = array( 'title' => $this->l('Category'), 'width' => 'auto', 'filter_key' => 'cl!name', ); $this->fields_list['price'] = array( 'title' => $this->l('Base price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'filter_key' => 'a!price' ); $this->fields_list['price_final'] = array( 'title' => $this->l('Final price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'havingFilter' => true, 'orderby' => false ); if (Configuration::get('PS_STOCK_MANAGEMENT')) $this->fields_list['sav_quantity'] = array( 'title' => $this->l('Quantity'), 'width' => 90, 'type' => 'int', 'align' => 'right', 'filter_key' => 'sav!quantity', 'orderby' => true, 'hint' => $this->l('This is the quantity available in the current shop/group.'), ); $this->fields_list['active'] = array( 'title' => $this->l('Status'), 'width' => 70, 'active' => 'status', 'filter_key' => $alias.'!active', 'align' => 'center', 'type' => 'bool', 'orderby' => false ); if ($join_category && (int)$this->id_current_category) $this->fields_list['position'] = array( 'title' => $this->l('Position'), 'width' => 70, 'filter_key' => 'cp!position', 'align' => 'center', 'position' => 'position' ); you can edit it, just remove / add new fields. everything depends on you best regarads 2 2 Link to comment Share on other sites More sharing options...
m3w Posted September 18, 2013 Author Share Posted September 18, 2013 open file: controllers/admin/AdminProductsController.php you've got there $this->field_list definition: $this->fields_list = array(); $this->fields_list['id_product'] = array( 'title' => $this->l('ID'), 'align' => 'center', 'type' => 'int', 'width' => 40 ); $this->fields_list['image'] = array( 'title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'width' => 70, 'orderby' => false, 'filter' => false, 'search' => false ); $this->fields_list['name'] = array( 'title' => $this->l('Name'), 'filter_key' => 'b!name' ); $this->fields_list['reference'] = array( 'title' => $this->l('Reference'), 'align' => 'left', 'width' => 80 ); if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_SHOP) $this->fields_list['shopname'] = array( 'title' => $this->l('Default shop:'), 'width' => 230, 'filter_key' => 'shop!name', ); else $this->fields_list['name_category'] = array( 'title' => $this->l('Category'), 'width' => 'auto', 'filter_key' => 'cl!name', ); $this->fields_list['price'] = array( 'title' => $this->l('Base price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'filter_key' => 'a!price' ); $this->fields_list['price_final'] = array( 'title' => $this->l('Final price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'havingFilter' => true, 'orderby' => false ); if (Configuration::get('PS_STOCK_MANAGEMENT')) $this->fields_list['sav_quantity'] = array( 'title' => $this->l('Quantity'), 'width' => 90, 'type' => 'int', 'align' => 'right', 'filter_key' => 'sav!quantity', 'orderby' => true, 'hint' => $this->l('This is the quantity available in the current shop/group.'), ); $this->fields_list['active'] = array( 'title' => $this->l('Status'), 'width' => 70, 'active' => 'status', 'filter_key' => $alias.'!active', 'align' => 'center', 'type' => 'bool', 'orderby' => false ); if ($join_category && (int)$this->id_current_category) $this->fields_list['position'] = array( 'title' => $this->l('Position'), 'width' => 70, 'filter_key' => 'cp!position', 'align' => 'center', 'position' => 'position' ); you can edit it, just remove / add new fields. everything depends on you best regarads 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? Link to comment Share on other sites More sharing options...
vekia Posted September 18, 2013 Share Posted September 18, 2013 so in this case you have to add new join to this: $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')'; LEFT JOIN manufacturers table (join based on id_manufacturer) then in field definition use 'filter_key' => 'ALIAS!name', where ALIAS is manufacturers table alias 1 Link to comment Share on other sites More sharing options...
m3w Posted September 18, 2013 Author Share Posted September 18, 2013 so in this case you have to add new join to this: $this->_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.') LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')'; LEFT JOIN manufacturers table (join based on id_manufacturer) then in field definition use 'filter_key' => 'ALIAS!name', where ALIAS is manufacturers table alias i tried but with no luck.... can you please write me the correct LEFT JOIN? Link to comment Share on other sites More sharing options...
vekia Posted September 18, 2013 Share Posted September 18, 2013 $this->_join .= ' INNER JOIN `'._DB_PREFIX_.'manufacturer` AS manu ON (manu.`id_manufacturer` = a.`id_manufacturer`) '; + $this->fields_list['manufacturer'] = array( 'title' => $this->l('Manufacturer name:'), 'width' => 230, 'filter_key' => 'manu!name', ); = 7 Link to comment Share on other sites More sharing options...
m3w Posted September 18, 2013 Author Share Posted September 18, 2013 Thanks!! It works! Link to comment Share on other sites More sharing options...
vekia Posted September 18, 2013 Share Posted September 18, 2013 glad to hear that it works as you expected im goign to mark this topic as [solved] best regards 1 Link to comment Share on other sites More sharing options...
m3w Posted September 18, 2013 Author Share Posted September 18, 2013 Ok, just a little question: if a product hasn't a manufacturer, you can't see it in the list! Do you know how solve this problem? Link to comment Share on other sites More sharing options...
vekia Posted September 18, 2013 Share Posted September 18, 2013 instead of INNER JOIN use LEFT JOIN $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'manufacturer` AS manu ON (manu.`id_manufacturer` = a.`id_manufacturer`) '; 5 1 Link to comment Share on other sites More sharing options...
coradyne Posted October 31, 2013 Share Posted October 31, 2013 Hi, I have a similar problem, but I am using the 1.4.8.2 version, and I can't find the AdminProductsController.php file anywhere. My problem is that I have to add a column in which you can check or uncheck (like the one for "displayed"), in order to make a product available or unavailable. (view image to see what settings I am talking about). Is that possible? Link to comment Share on other sites More sharing options...
franco.pentangeli Posted October 31, 2013 Share Posted October 31, 2013 Hi! thanks for the istruction. I want to add also carriers. How can I do it?thanks! Link to comment Share on other sites More sharing options...
vekia Posted October 31, 2013 Share Posted October 31, 2013 Hi! thanks for the istruction. I want to add also carriers. How can I do it? thanks! where you want to add carriers? Link to comment Share on other sites More sharing options...
franco.pentangeli Posted November 1, 2013 Share Posted November 1, 2013 where you want to add carriers? I have already added a column for manufactures. Now I want to add another column for carrier. How can I do it? thanks! Link to comment Share on other sites More sharing options...
coradyne Posted November 1, 2013 Share Posted November 1, 2013 Hi, I have a similar problem, but I am using the 1.4.8.2 version, and I can't find the AdminProductsController.php file anywhere. My problem is that I have to add a column in which you can check or uncheck (like the one for "displayed"), in order to make a product available or unavailable. (view image to see what settings I am talking about). Is that possible? I know this is not my topic, but please don't ignore my question. Link to comment Share on other sites More sharing options...
coradyne Posted November 4, 2013 Share Posted November 4, 2013 pretty please ? Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 your question is not related to main case in this topic, this is why no replies here. please follow forum rules Link to comment Share on other sites More sharing options...
coradyne Posted November 4, 2013 Share Posted November 4, 2013 Sorry about that. It really seemed a very similar problem to me... I created a new topic about that. Link to comment Share on other sites More sharing options...
franco.pentangeli Posted November 5, 2013 Share Posted November 5, 2013 How can I add suppliers column? thanks Link to comment Share on other sites More sharing options...
vekia Posted November 5, 2013 Share Posted November 5, 2013 How can I add suppliers column? thanks http://www.prestashop.com/forums/topic/282723-solved-how-to-filter-back-office-product-list-by-supplier-id/ Link to comment Share on other sites More sharing options...
franco.pentangeli Posted November 7, 2013 Share Posted November 7, 2013 http://www.prestashop.com/forums/topic/282723-solved-how-to-filter-back-office-product-list-by-supplier-id/ Thanks! Is it possible to add "Carrier" columns? How can I do it? Thanks a lot vekia! Link to comment Share on other sites More sharing options...
vekia Posted November 7, 2013 Share Posted November 7, 2013 what you want to have in this column? selected carrier? Link to comment Share on other sites More sharing options...
franco.pentangeli Posted November 9, 2013 Share Posted November 9, 2013 what you want to have in this column? selected carrier? Yes!!! Can you help me? Link to comment Share on other sites More sharing options...
vekia Posted November 9, 2013 Share Posted November 9, 2013 ok i will write guide for this, but efore i will do that please share information about your prestashop version Link to comment Share on other sites More sharing options...
franco.pentangeli Posted November 11, 2013 Share Posted November 11, 2013 ok i will write guide for this, but efore i will do that please share information about your prestashop version Hi vekia. Thank you! I have PrestaShop™ 1.5.4.1. Thanks! Link to comment Share on other sites More sharing options...
nikczemnik Posted November 24, 2013 Share Posted November 24, 2013 Hi vekia! I tried to add Producers column to my BO as you describe, but nothing change:-/ I have Prestashop 1.5.4.1. What could be wrong? I would like to column producers, and column with regular price or something which show me is this price is regular or pricedrop. Can you help me please? Regards Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 Hi vekia! I tried to add Producers column to my BO as you describe, but nothing change:-/ I have Prestashop 1.5.4.1. What could be wrong? I would like to column producers, and column with regular price or something which show me is this price is regular or pricedrop. Can you help me please? Regards sorry it is a bit old thread, may i know what you exactly did? Link to comment Share on other sites More sharing options...
nikczemnik Posted November 25, 2013 Share Posted November 25, 2013 Hi vekia, thanks for your answer. I would like to add producers tab in my BO as you describe in this topic. I've put this code: $this->fields_list['manufacturer'] = array('title' => $this->l('Manufacturer name:'),'width' => 230,'filter_key' => 'manu!name',); to controllers/admin/AdminProductsController.php but nothing was changed:-/ Can you tell me what should I do? I would like to add also tab which will show regular price (without price drop) or something like that. Is there a chance to do that? Regards Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2013 Share Posted November 25, 2013 have you also extended the query ? there is a part to add queries ($this->_join) Link to comment Share on other sites More sharing options...
nikczemnik Posted November 25, 2013 Share Posted November 25, 2013 No, I don't know how can I do that:-/. Can you help me with this? Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2013 Share Posted November 25, 2013 post #14 here $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'manufacturer` AS manu ON (manu.`id_manufacturer` = a.`id_manufacturer`) '; Link to comment Share on other sites More sharing options...
nikczemnik Posted November 25, 2013 Share Posted November 25, 2013 $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = a.id_shop_default) LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = a.id_shop_default) LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = a.id_shop_default) LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop=a.id_shop_default)'; } $this->_select .= 'shop.name as shopname, '; } else { $alias = 'a'; $alias_image = 'i'; $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = 1)'; } $this->_select .= 'MAX('.$alias_image.'.id_image) id_image,'; Somewhere there?:-) Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2013 Share Posted November 25, 2013 yesss exactly there, hope that this will work for you, have you tried? Link to comment Share on other sites More sharing options...
nikczemnik Posted November 25, 2013 Share Posted November 25, 2013 (edited) It works:-) Thank you:-). But there is one issue, if a product is not related to a producer is does not display in BO. Can it be fixed somehow? And can you help me with one more tab? I would like to add tab that will show if the product is in pricedrop or regular price. Or maybe table with regular price. I need to see which products are in pricedrop. Best regards! Edited November 25, 2013 by nikczemnik (see edit history) Link to comment Share on other sites More sharing options...
perusi Posted January 16, 2014 Share Posted January 16, 2014 (edited) How can you do this, but instead of Manufacturer to show AVAILABLE FOR ORDER and ONLINE ONLY in BO Product Listing? Thanks Edited January 16, 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 How can you do this, but instead of Manufacturer to show AVAILABLE FOR ORDER and ONLINE ONLY in BO Product Listing? Thanks already replied on your thread: http://www.prestashop.com/forums/topic/302007-bo-product-listing-available-for-order-online-only-fields-to-show-in-column-listing/?do=findComment&comment=1527101 1 Link to comment Share on other sites More sharing options...
perusi Posted January 16, 2014 Share Posted January 16, 2014 anyone? thanks Link to comment Share on other sites More sharing options...
www.exclusivepen.eu Posted January 31, 2014 Share Posted January 31, 2014 Hi all. I would like to add the manufacturer name in front of product in Back office/order detail tab/product line. It is the line which shows what product customer bought. Please see attachment. I run PS 1.5.3. Thank you very much for help. Link to comment Share on other sites More sharing options...
ben mbarek afef Posted February 28, 2014 Share Posted February 28, 2014 hello, please how can i add a field in my fields_list with a type URL (link type). Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 16, 2014 Share Posted March 16, 2014 How to get Supplier Reference to show in BO product listing page? Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 18, 2014 Share Posted March 18, 2014 How to get Supplier Reference to show in BO product listing page? Any help? Link to comment Share on other sites More sharing options...
vekia Posted March 18, 2014 Share Posted March 18, 2014 Any help? to fields list add $this->fields_list['product_supplier_reference'] = array( 'title' => $this->l('Suuplier Reference'), 'filter_key' => 'supp!product_supplier_reference' ); and extend query with this left join: LEFT JOIN `'._DB_PREFIX_.'product_supplier` supp ON sa.id_product = supp.id_product effect: Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 19, 2014 Share Posted March 19, 2014 to fields list add $this->fields_list['product_supplier_reference'] = array( 'title' => $this->l('Suuplier Reference'), 'filter_key' => 'supp!product_supplier_reference' ); and extend query with this left join: LEFT JOIN `'._DB_PREFIX_.'product_supplier` supp ON sa.id_product = supp.id_product effect: Thank you so much! That worked! Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 19, 2014 Share Posted March 19, 2014 (edited) I realize this table don't always store all supplier reference because some attributes are 0. There is another table which contains more accurate data. How do I get supplier_reference field of ps_product_attribute table instead? I tried replacing the table and fields using your solution but keep getting Bad SQL queryColumn 'reference' in field list is ambiguous Any help would be great! Edited March 19, 2014 by Pressed0024 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted March 21, 2014 Share Posted March 21, 2014 hello it just mean that you have to define alias for table you included may i know what code you used to include ps_product_attribute ? Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 26, 2014 Share Posted March 26, 2014 The exact same code you recommended, just that I swap the table and fields accordingly. That apparently didn't work. $this->fields_list['supplier_reference'] = array( 'title' => $this->l('Suplier Reference'), 'filter_key' => 'supp!supplier_reference' ); LEFT JOIN `'._DB_PREFIX_.'product_attribute` supp ON sa.id_product = supp.id_product Link to comment Share on other sites More sharing options...
giorinsrl Posted March 31, 2014 Share Posted March 31, 2014 Ehi Vekia!Sorry for the question, but if i want to show an icon if in the order there is a NOTE, how can i do?!$this->fields_list['herewhatdoIput?!'] = array( 'title' => $this->l('herewhatdoIput?!'), 'width' => 40 ); Link to comment Share on other sites More sharing options...
ajnglagla Posted April 5, 2014 Share Posted April 5, 2014 (edited) I have a area "bigimage" in my database (ps_image) "bigimage" is tinyint(1), inside have just "0" or "1". And basicly i use that value to make photo bigger size (1) or normal size (0). I just want to change the "bigimage" value in database from that product-list on backoffice. Just like green "status" button. I know how to add a column to show a data but i dont know how to do that. Do you know? Edited April 6, 2014 by ajnglagla (see edit history) Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 6, 2014 Share Posted April 6, 2014 This thread is about Products List. Please keep to topic. Start a new thread if needed. Link to comment Share on other sites More sharing options...
ajnglagla Posted April 6, 2014 Share Posted April 6, 2014 (edited) I want to add to product list. I just showed the photo to explain what i want. (please check inside the red box) Edited April 6, 2014 by ajnglagla (see edit history) Link to comment Share on other sites More sharing options...
roz Posted April 22, 2014 Share Posted April 22, 2014 how can i add product features in the list? Link to comment Share on other sites More sharing options...
odeen Posted April 30, 2014 Share Posted April 30, 2014 Hello, I would like to ask you for extending your solution. I am using Prestashop 1.5.6 with products combinations. So for one product with ID 18 for example i have 3 supplier_references and i would like to see all of them in product list and best way to show them also in search list. Thank you very much to fields list add $this->fields_list['product_supplier_reference'] = array( 'title' => $this->l('Suuplier Reference'), 'filter_key' => 'supp!product_supplier_reference' ); and extend query with this left join: LEFT JOIN `'._DB_PREFIX_.'product_supplier` supp ON sa.id_product = supp.id_product effect: Link to comment Share on other sites More sharing options...
giorinsrl Posted May 9, 2014 Share Posted May 9, 2014 (edited) Hi guys, i am successful to integrate the column CATEGORY, with this code in AdminOrderController: $this->_select = ' a.id_currency, a.id_order AS id_pdf, CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) AS `customer`, osl.`name` AS `osname`, os.`color`, od.`product_reference`, cl.`name` AS `cat_name`, IF((SELECT COUNT(so.id_order) FROM `' . _DB_PREFIX_ . 'orders` so WHERE so.id_customer = a.id_customer) > 1, 0, 1) as new, GROUP_CONCAT(od.product_name separator \', \') as products'; $this->_join = ' LEFT JOIN `' . _DB_PREFIX_ . 'customer` c ON (c.`id_customer` = a.`id_customer`) LEFT JOIN `' . _DB_PREFIX_ . 'order_state` os ON (os.`id_order_state` = a.`current_state`) LEFT JOIN `' . _DB_PREFIX_ . 'order_state_lang` osl ON (os.`id_order_state` = osl.`id_order_state` AND osl.`id_lang` = ' . (int)$this->context->language->id . ') LEFT JOIN `'._DB_PREFIX_. 'order_detail` od ON (od.id_order = a.id_order ) LEFT JOIN `'._DB_PREFIX_. 'product` p ON (p.id_product = od.product_id ) LEFT JOIN `'._DB_PREFIX_. 'category_lang` cl ON (cl.id_category = p.id_category_default )'; $this->_orderBy = 'id_order'; $this->_orderWay = 'DESC'; $this->_group = 'GROUP BY a.id_order'; $statuses_array = array(); $statuses = OrderState::getOrderStates((int)$this->context->language->id); foreach ($statuses as $status) $statuses_array[$status['id_order_state']] = $status['name']; $this->fields_list = array( 'id_order' => array( 'title' => $this->l('ID'), 'align' => 'center', 'width' => 25 ), 'reference' => array( 'title' => $this->l('Reference'), 'align' => 'center', 'width' => 65 ), 'product_reference' => array( 'title' => $this->l('Reference'), 'align' => 'center', 'width' => 65 ), 'new' => array( 'title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'tmpTableFilter' => true, 'icon' => array( 0 => 'blank.gif', 1 => array( 'src' => 'note.png', 'alt' => $this->l('First customer order'), ) ), 'orderby' => false ), 'customer' => array( 'title' => $this->l('Customer'), 'havingFilter' => true, ), //viewproductsoforder 'products' => array( 'title' => $this->l('Products'), 'align' => 'center', 'width' => 150, 'filter_key' => 'od!product_name' ), 'cat_name' => array( 'title' => $this->l('Categoria'), 'align' => 'center', 'width' => 100 ), 'gift' => array( 'title' => $this->l('Fattura'), 'havingFilter' => true, 'align' => 'center', 'icon' => array( 0 => 'blank.gif', 1 => array( 'src' => 'note.png', 'alt' => $this->l('Richiede Fattura'), ) ), 'width' => 35 ), 'total_paid_tax_incl' => array( 'title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '<b>', 'suffix' => '</b>', 'type' => 'price', 'currency' => true ), 'payment' => array( 'title' => $this->l('Payment: '), 'width' => 100 ), 'osname' => array( 'title' => $this->l('Status'), 'color' => 'color', 'width' => 280, 'type' => 'select', 'list' => $statuses_array, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int' ), 'date_add' => array( 'title' => $this->l('Date'), 'width' => 130, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add' ), 'id_pdf' => array( 'title' => $this->l('PDF'), 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false, 'remove_onclick' => true), ); But in the order list, the product is repeated 6 times!Where is my error? Edited May 9, 2014 by giorinsrl (see edit history) Link to comment Share on other sites More sharing options...
giorinsrl Posted May 9, 2014 Share Posted May 9, 2014 Thank you, but it doesn't work!look forward to great leaders.. it prints 6 times the same product name!!! Link to comment Share on other sites More sharing options...
kaamyi Posted June 12, 2014 Share Posted June 12, 2014 (edited) Sorry for digging up this topic but i'm trying to do the same on PS 1.6 but the width parameter is not working. Whatever i put as width is not taken into account.You can find below my code as i can't seem to find anything related to this for PS 1.6. class AdminFormulaireController extends ModuleAdminController { public function __construct() { $this->table = 'formulaire'; $this->className = 'Formulaire'; $this->fields_list = array(); $this->fields_list['id_formulaire']= array( 'title' => 'id_formulaire', 'width' => 25); $this->fields_list['id_customer']= array( 'title' => 'ID Client', 'width' => 'auto'); $this->fields_list['Prix']= array( 'title' => 'Prix HT', 'width' => 40); $this->fields_list['desc']= array( 'title' => 'Description', 'width' => 50); $this->identifier='id_formulaire'; $this->simple_header=false; $this->actions = array('delete','view','edit'); parent::__construct(); } } And when i look into AdminProductsController.php, i cannot find any width parameter for the fields_list. Here's part of the code $this->fields_list = array(); $this->fields_list['id_product'] = array( 'title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs', 'type' => 'int' ); $this->fields_list['image'] = array( 'title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'orderby' => false, 'filter' => false, 'search' => false ); Found the solution here in french. Now we have to use bootstrap classes to do it. Edited June 13, 2014 by kaamyi (see edit history) Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted July 15, 2014 Share Posted July 15, 2014 Hi vekia, How to sort the product listing page using reference ? in the reference field i am giving the number only, but it is not sorting properly. i have attached the screen shot. in the screen shot you can see after the number 1 it shows the product with the number 10 not 2 . whether i need to change the reference field type to int ? Link to comment Share on other sites More sharing options...
vekia Posted July 15, 2014 Share Posted July 15, 2014 can you show a part of your code where you defined reference field? how it looks like? Link to comment Share on other sites More sharing options...
karthiiiiiiiiiik Posted July 16, 2014 Share Posted July 16, 2014 i have not modified any code in adminproductscontroller, the sorting through reference no is already part of prestashop. i have found out the reference datatype is varchar so that it is not sorting while giving numbers, and i changed the datatype of reference field to int and it sorts correctly, if i am not filling the reference field i am getting 0 filled automatically, how to avoid that ? is this method correct or through coding i need to change ? Link to comment Share on other sites More sharing options...
marioschubert Posted July 24, 2014 Share Posted July 24, 2014 glad to hear that it works as you expected im goign to mark this topic as [solved] best regards How to add new fields in product back office for prestashop 1.6.0.8. Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2014 Share Posted July 24, 2014 im affraid that you have to shed some more light on your question Link to comment Share on other sites More sharing options...
vister Posted September 8, 2014 Share Posted September 8, 2014 Hello,And how do I make a column eg supplier are linked to the website supplier ???Regards Link to comment Share on other sites More sharing options...
sportivo147 Posted September 11, 2014 Share Posted September 11, 2014 How to add new fields in product back office for prestashop 1.6.0.8. Any ideas ??? Link to comment Share on other sites More sharing options...
Andron777 Posted September 16, 2014 Share Posted September 16, 2014 Hello, I need to bring in the list "Condition" but if i add this code: $this->fields_list['condition'] = array( 'title' => $this->l('Condition'), 'align' => 'left', 'width' => 40 ); its not workin! Any idea? Link to comment Share on other sites More sharing options...
vekia Posted September 16, 2014 Share Posted September 16, 2014 Hello, I need to bring in the list "Condition" but if i add this code: $this->fields_list['condition'] = array( 'title' => $this->l('Condition'), 'align' => 'left', 'width' => 40 ); its not workin! Any idea? can you show a whole part of fields_list ? how it looks like with code that you applied? Link to comment Share on other sites More sharing options...
ABANGWEB Posted September 27, 2014 Share Posted September 27, 2014 Please vekia help. If we add product with no selected manufacturers. and go to product list, we cant see the new added product. Can modification something to get it work, because some product with no selected manufacturers cant viewed in product list. Link to comment Share on other sites More sharing options...
vekia Posted September 27, 2014 Share Posted September 27, 2014 Please vekia help. If we add product with no selected manufacturers. and go to product list, we cant see the new added product. Can modification something to get it work, because some product with no selected manufacturers cant viewed in product list. can you please show what exactly you modified? and also in what ps verison Link to comment Share on other sites More sharing options...
ABANGWEB Posted October 3, 2014 Share Posted October 3, 2014 can you please show what exactly you modified? and also in what ps verison Thanks Vekia. im use prestashop 1.6.0.8 and in backoffice we adding manufacturer on product list and last update product with display time, Did you try for adding new product with no manufacturers selected and you can see product list in admin product? Link to comment Share on other sites More sharing options...
vekia Posted October 3, 2014 Share Posted October 3, 2014 yes i see because there is LEFT JOIN, not inner join Link to comment Share on other sites More sharing options...
ukwyspa Posted November 20, 2014 Share Posted November 20, 2014 (edited) Hi, @vekia how can i add product features in the list? PS1.6.0.9 Edited November 20, 2014 by ukwyspa (see edit history) Link to comment Share on other sites More sharing options...
mk1_salami Posted March 30, 2015 Share Posted March 30, 2015 Sorry to bring up and old topic, but this was the closest match to what I want to accomplish, but can't quite get it to work. I would like to add a column in the back office products section to search and filter by EAN13 code. I've successfully tried and added the Supplier column, but not sure what code I need to enter to show the EAN13 column. Can you help? Version 1.5.6.1 Link to comment Share on other sites More sharing options...
Leov88 Posted June 3, 2015 Share Posted June 3, 2015 Sorry Guys, but for add column products in order list (backoffice) - Prestashop 1.6 ? Thanks Link to comment Share on other sites More sharing options...
fpopiku Posted June 29, 2015 Share Posted June 29, 2015 (edited) hello, I hope I'm in the right topic. I'm looking at my BO catalog > products, and I would like to see the Suppliers name in there, for every product. When I've imported the products, I have named the supplier in Supplier reference as: ABCDATA, NOD, ROYAL and so on. Can I display this field in the desired area, and if so, how ?, attached an image in order for a better understanding. P.S. - the shop is in Romanian Language. Thank you Edited June 29, 2015 by fpopiku (see edit history) Link to comment Share on other sites More sharing options...
NewIntern Posted August 4, 2015 Share Posted August 4, 2015 Hi, I having a problem after adding a new column to my product list. I'm using prestashop 1.5.4.0. For the new column, I edited the AdminProductsController.php file and I manage to get the column that I want, but then I realise that after save new product details, my screen goes blank, reload page will give same blank page and I need to go back one page for the product list page. I figured that my AdminProductsController.php file cannot be edited, even a space added to the file will cause the same blank space after save new product detail. Only when I inserted the original file that i didn't encountered the blank page. Hope you can help with my problem. Thank You. Link to comment Share on other sites More sharing options...
mowax Posted August 5, 2015 Share Posted August 5, 2015 Hi all I'm trying to add a column with Supplier reference to the products table in AdminSearchController, to be displayed when you search for a product in the BO (using the search box at the top of the panel). I have successfully added the column, but the column only shows '--' where i want the values to be displayed. I have modified AdminSearchController.php to add the column, but I don't know what to modify for displaying the values. I'm guessing AdminProductsController.php? Vekia provided some code for adding the supplier reference to product_list, but I need it in the search results page. Please can someone help? Link to comment Share on other sites More sharing options...
m2net Posted October 21, 2015 Share Posted October 21, 2015 Hi, i need to add to my backoffice the column with the field date_add of the table ps_product. but when i try to do this i receive the message: " prestashop Column 'date_add' in field list is ambiguous " what can i do? thank you Link to comment Share on other sites More sharing options...
Recommended Posts