Pressed0024 Posted March 15, 2014 Share Posted March 15, 2014 How to show Supplier Reference column at BO product listing page? /index.php?controller=AdminProducts&token Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2014 Share Posted March 15, 2014 You must edit (extend) the constructor for AdminProductsController Add your new field like $this->fields_list['price'] = array( 'title' => $this->l('Base price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'filter_key' => 'a!price' ); BUt using a!supplier_reference instead of price, and changing texts and type accordingly Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 15, 2014 Author Share Posted March 15, 2014 You must edit (extend) the constructor for AdminProductsController Add your new field like $this->fields_list['price'] = array( 'title' => $this->l('Base price'), 'width' => 90, 'type' => 'price', 'align' => 'right', 'filter_key' => 'a!price' ); BUt using a!supplier_reference instead of price, and changing texts and type accordingly I used the below but it didn't work. Only displayed the Supplier Reference column without data values. I checked the products, they have Supplier Reference values saved: $this->fields_list['supplier_reference'] = array( 'title' => $this->l('Supplier Reference'), 'width' => 90, 'type' => 'texts', 'align' => 'right', 'filter_key' => 'a!supplier_reference' ); Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2014 Share Posted March 15, 2014 weird, turn on error reporting and see if you have any, perhaps the field is not being grabbed by the select statement (weird though, it should grab everything from ps_product) Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 detailed guide here: http://www.prestashop.com/forums/topic/275522-solved-add-backoffice-columns-products-list/ Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 15, 2014 Author Share Posted March 15, 2014 product_supplier_reference or supplier_reference? I checked my db and found the supplier_reference in ps_product table empty. The values are stored in product_supplier_reference field of the ps_product_supplier table. I tested swapping to product_supplier_reference, it still didnt work. Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 18, 2014 Author Share Posted March 18, 2014 (edited) Didn't manage to find a solution. Any help would be great Edited March 18, 2014 by Pressed0024 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted March 18, 2014 Share Posted March 18, 2014 In that case, you can try using $this->select..= 'ps.supplier_reference'; and also $this->join .= 'ps_product_supplier ps' before that Link to comment Share on other sites More sharing options...
Pressed0024 Posted March 18, 2014 Author Share Posted March 18, 2014 In that case, you can try using $this->select..= 'ps.supplier_reference'; and also $this->join .= 'ps_product_supplier ps' before that Use this: $this->select .= 'ps.supplier_reference'; $this->join .= 'ps_product_supplier ps'; $this->fields_list['supplier_reference'] = array( 'title' => $this->l('Supplier Reference'), 'width' => 90, 'type' => 'texts', 'align' => 'right', 'filter_key' => 'a!supplier_reference' ); Didnt quite work for me. Supplier Reference column still empty Link to comment Share on other sites More sharing options...
Willem Posted April 3, 2014 Share Posted April 3, 2014 I've solved it by changing the code for the file informations.tpl at/admin****/themes/default/template/controllers/products/ The file informations.tpl missing the lines for the supplier_reference. From supplier they (PS) went to EAN13. So it's missing a bit. These lines, at line 158 can solved this problem. <div class="form-group"> <label class="control-label col-lg-3" for="_supplier_reference"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='You supplier Referentie.'} {l s='Allowed special characters:'} .-_#\"> {$bullet_common_field} {l s='Supplier Reference'} </span> </label> <div class="col-lg-5"> <input type="text" id="supplier_reference" name="supplier_reference" value="{$product->supplier_reference|htmlentitiesUTF8}" /> </div> </div> I've added the correct file Suc6 Link to comment Share on other sites More sharing options...
Willem Posted April 3, 2014 Share Posted April 3, 2014 informations.zipThe file Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 3, 2014 Author Share Posted April 3, 2014 What did you use at your AdminProductsController file then? Link to comment Share on other sites More sharing options...
Willem Posted April 5, 2014 Share Posted April 5, 2014 What did you use at your AdminProductsController file then? nothing. Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 5, 2014 Author Share Posted April 5, 2014 which PS version are you on? Link to comment Share on other sites More sharing options...
Pressed0024 Posted April 5, 2014 Author Share Posted April 5, 2014 Didn't quite work for me. The codes are different on 1.5.6.1 Link to comment Share on other sites More sharing options...
Recommended Posts