Jump to content

product name not working in tpl file


Recommended Posts

HI

 

I have created a sample module and want to display product category name and product name on the tab.

 

<h1>{$category->name|escape:'htmlall':'UTF-8'}</h1>

 

displays the category name but

 

 

<h1>{$product.name|escape:'htmlall':'UTF-8'}</h1>\

 

 

does not show anything. Just blank.

 

Whats wring with the above code.

 

 

 

 

Link to comment
Share on other sites

Actually I want to pass the category name and product name to a one of the function which shows prices of product. to test this I was trying to print category name and product name.

 

I want to display this on product page in a tab.

 

 

Here is the linke to sample website: http://www.tawlar.com/index.php?id_product=1&controller=product

 

 

here is the code

 

<div id="belvg_product_tab"> 
    {*call the content, sent by producttab.php script to this template :*}
    {$contant}
<table id="priceTable"></table>
<script type="text/javascript" src="http://cdn.test.com/compare.js"></script>
<script type="text/javascript"> $(document).ready(function(){
initComparison('{$category->name|escape:'htmlall':'UTF-8'}','{$product.name|escape:'htmlall':'UTF-8'}','testu','testp');
});</script>
 
<h1>{$category->name|escape:'htmlall':'UTF-8'}</h1>
<h1>{$product.name|escape:'htmlall':'UTF-8'}</h1>
</div>
Edited by kuldeepchitrakar (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...