Jump to content

How to show Supplier Reference at BO product listing page?


Recommended Posts

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

 

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

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

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

  • 3 weeks later...

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

×
×
  • Create New...