Jump to content

[Solved] Show quantity available in product-list.tpl


Recommended Posts

just use {$product.quantity} variable

use it there, where you want to display quantity value.

 

for example, right below the product name:

					<h5 itemprop="name">
						{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
						<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
							{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
						</a>
					</h5>
Link to comment
Share on other sites

 

just use {$product.quantity} variable

use it there, where you want to display quantity value.

 

for example, right below the product name:

					<h5 itemprop="name">
						{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
						<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
							{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
						</a>
					</h5>

 

Solved! Thanks

<h5 itemprop="name">
   {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
   <a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
      {$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
   </a>
   <BR/>
   Stock: {$product.quantity}
</h5>
Link to comment
Share on other sites

×
×
  • Create New...