Jump to content

Adding Details on Product List 1.6.0.14


marissacooper

Recommended Posts

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.

post-962364-0-49961300-1464171173_thumb.jpg

Many thanks in advance.

Edited by marissacooper (see edit history)
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...