Jump to content

How to display ID of product on product page?


Karol Krakowiak

Recommended Posts

			<p>
					<label>Numer produktu: </label>
					<span class="editable">{$product.id_product}</span>
			</p>
			<p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
				<label>{l s='Reference:'} </label>
				<span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
			</p>

Like this? because it doesn't work. Product page is broken then.

Edited by Karol Krakowiak (see edit history)
Link to comment
Share on other sites

56 minutes ago, Karol Krakowiak said:

			<p>
					<label>Numer produktu: </label>
					<span class="editable">{$product.id_product}</span>
			</p>
			<p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
				<label>{l s='Reference:'} </label>
				<span class="editable" itemprop="sku"{if !empty($product->reference) && $product->reference} content="{$product->reference}"{/if}>{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
			</p>

Like this? because it doesn't work. Product page is broken then.

I this you should use:

{$product->id}

 

Best regards

Link to comment
Share on other sites

  • 3 years later...

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