Jump to content
thirty bees forum

Show supplier reference on product page


smorjkompaniet

Recommended Posts

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