Jump to content

Need to reference supplier_id in tpl file


MichalT

Recommended Posts

Hello,

Say I need to reference product qty in if statement within a tpl file. I would write the following: {if $product.quantity > 0} etc. That means, the quantity for a product is called using variable $product.quantity.

Can someone tell me name of the variable for supplier ID? I tried $suplier.id_supplier, $id_supplier, etc, but nothing works. 

Presta version 1.7.5.1

 

Thanks

Link to comment
Share on other sites

Yes, but did not work. I asked someone else to look into it and was told that the supplier id in the ps_product table is not populated with the supplier data even though the supplier was created and selected in BO product page. The data actually flows into different table "product supplier". So as a work around a code will be added which will ensure that if supplier is added to the product in BO, this will update table ps_product. That will then allow me to use $product.id_supplier.

Link to comment
Share on other sites

I was not thinking along these lines because from the outset I thought of using supplier id, which is an integer. What you suggest is supplier reference.

But I tried it now and ps_product table in the database does not get updated with the data (column supplier_reference) therefore $product.id_supplier will not return any value if used in tpl file.

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...