Jump to content

how to get variable product_supplier_reference in HelperList.php file


easymar

Recommended Posts

Hello.

I want to create products links dynamically in back office product list with product_supplier_reference variable.

 

It works for product_id ($id) but if I want to get product_supplier_reference its is empty.

 

To do this I change HelperList.php file and this is the last issue - get the product_supplier_reference.

 

 

Can someone give me an advice how to do this?

Link to comment
Share on other sites

Solution is:

 

 $ref = (int)Db::getInstance()->getValue('
               SELECT reference
               FROM `'._DB_PREFIX_.'product`
                WHERE `id_product` = '.$id
               );
 
 
$ref - gives supplier_reference
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...