edit: SOLVED
Hello,
This is my first post on this forum, I have been reading alot of posts that helped me alot, thanks to all.
I want to add product-reference to product list, I read this thread: https://www.prestashop.com/forums/topic/247597-solved-show-product-reference-in-categories/ and it helped me to show it on products in "Feature Products", well the products showing on my "home" page, but in product list they only show when the page is loading or just before the products are done loading. when the page is loaded it turns to "undefined".
Im new at coding, with actually no skills but interest,
This is the code im using;
in product-list.tpl
<p id="product_reference" {if isset($product.reference) && $product.reference}
<p id="product_reference">
<label>{l s='Reference:'} </label>
<span class="editable" itemprop="sku"> {$product.reference|escape:'html':'UTF-8'}</span>
</p>
and in global.js, I use this following one, that I found from another thread, I use it twice:
html += '<p id="product_reference">'+ $(element).find('.product_reference').html() + '</p>';
Anyone with the same issue?
I attach one screenshot of how it look like before it turns to undefined, during loading.
Many thanks in advance.