smorjkompaniet Posted March 11, 2019 Posted March 11, 2019 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
datakick Posted March 12, 2019 Posted March 12, 2019 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> 1
smorjkompaniet Posted March 12, 2019 Author Posted March 12, 2019 Thank you! Working great! Now I just need to get the search engine to be able to search for this value too! Thank You! /Daniel
DRMasterChief Posted March 13, 2019 Posted March 13, 2019 Hi, is there a screenshot to see the look of this? Would be great, thank you.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now