Jump to content
thirty bees forum

Recommended Posts

Posted

Hi,
I want to show the supplier reference on my product page. I cant find anywhere in back office to turn this on. I also tested some code for earlier versions, but with no luck. Does anyone have the code to add to product.tpl to add this function?
Im using tb 1.0.8

BR

Daniel

Posted

Every product can have multiple suppliers, so there's no one reference. Also, every combination can have different reference as well. So, in general, you'll get supplier reference matrix. This code should help you start, put it somewhere into your product.tpl:

<table class="mt-4 mb-4 table table-striped">
  <thead>
    <tr>
      <td>Id supplier</td>
      <th>Attribute</th>
      <th>Supplier reference</th>
    </tr>
  </thead>
  <tbody>
  {foreach from=ProductSupplier::getSupplierCollection($product->id|intval, false) item=sup}
    <tr>
      <td>{$sup->id_supplier}</td>
      <td>{$sup->id_product_attribute}</td>
      <td>{$sup->product_supplier_reference}</td>
    </tr>
  {/foreach}
  </tbody>
</table>

 

  • Like 1

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