Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/templates/shop/pages/product_template.tpl
<table width="100%" border="0" cellspacing="0" cellpadding="0">  <tr>
    <td>
    {section name=productData loop=$productData}
   
    {section name=allBrands loop=$allBrands}
{if $allBrands[allBrands].brand_id == $productData[productData].brand_id}
<img src="../brand_images/{$allBrands[allBrands].brand_logo}" title="{$allBrands[allBrands].brand_name}" width="70" /><br />{/if}
{/section}


<div id="product_image_box">
        {section name=productImages loop=$productImages}
        {if $productData[productData].product_id == $productImages[productImages].product_id}
        <a href="#" onClick="changeProductImage('{$productImages[productImages].image_filename}')"><img src="../product_images/{$productImages[productImages].image_filename}" border="0" width="60" /></a> {/if}
        {/section}
</div>
        
        
        
{section name=productMainImage loop=$productMainImage}
{if $productMainImage[productMainImage].product_id == $productData[productData].product_id}
<a href="product.php?product_id={$productData[productData].product_id}&product_name={$productData[productData].product_name}"><img src="../product_images/{$productMainImage[productMainImage].image_filename}" width="150" height="150" border="0" alt="{$productData[productData].product_name}" title="{$productData[productData].product_name}"/></a><br />{/if}
{/section}

<a href="product.php?product_id={$productData[productData].product_id}&product_name={$productData[productData].product_name}" title="{$productData[productData].product_name}">{$productData[productData].product_name}</a>



{$productData[productData].product_overview}
 {section name=productAttributes loop=$productAttributes}
{if $productAttributes[productAttributes].product_id == $productData[productData].product_id}
	
	<br />&raquo;&nbsp;{$productAttributes[productAttributes].attribute_name}: {$productAttributes[productAttributes].attribute_value}
{/if}
{/section}


    {if $productData[productData].product_deal_price>0}
    	Was: <span style="text-decoration:line-through">AU ${$productData[productData].product_price}</span><br />
        Now: <span style="text-decoration:none; font-weight:bold;">AU ${$productData[productData].product_deal_price}</span><br />
        Save: <span style="text-decoration:none; font-weight:bold; color:red;">AU ${$productData[productData].product_price-$productData[productData].product_deal_price|string_format:"%.2f"}</span>
    {else}
        AU$ {$productData[productData].product_price}<br />
        <span class="gst">incl GST</span>
    {/if}


{if $productData[productData].is_new=="yes"}{php}$this->assign('productTag','New Arrival'); $this->assign('productTagStyle','new_arrival');{/php}{/if}
    {if $productData[productData].is_special=="yes"}{php}$this->assign('productTag','Special Item'); $this->assign('productTagStyle','on_special');{/php}{/if}
    {if $productData[productData].is_clearence=="yes"}{php}$this->assign('productTag','Clearence Item'); $this->assign('productTagStyle','clearence_item');{/php}{/if}    
    <div style="padding-top:5px;"></div><span class="{$productTagStyle}">{$productTag}</span>
    {php}$this->assign('productTag',''); $this->assign('productTagStyle','');{/php}
    
    
    <a href="add_to_cart.php?mode=add&product_id={$productData[productData].product_id}&product_name={$productData[productData].product_name}"><img src="images/btns/add_to_cart_btn.gif" border="0" /></a>
{/section}

<br />
<br />
<br />
<!--
{section name=crossSellingProducts loop=$crossSellingProducts}
{$crossSellingProducts[crossSellingProducts].product_id}<br />
{/section}
-->
</td>
</tr>
  <tr>
    <td>
    {if $totalRelatedProducts>0}
    <div id="section_heading">Related product</div>
    {section name=relatedProducts loop=$relatedProducts}
    <div id="product_info_box" align="left">
		<div id="inner_pro_info_box">
            <div>
            {section name=productMainImage loop=$productMainImage}
            {if $productMainImage[productMainImage].product_id == $relatedProducts[relatedProducts].product_id}
            <a href="product.php?product_id={$relatedProducts[relatedProducts].product_id}&product_name={$relatedProducts[relatedProducts].product_name}"><img src="../product_images/{$productMainImage[productMainImage].image_filename}" width="150" height="150" border="0" alt="{$relatedProducts[relatedProducts].product_name}" title="{$relatedProducts[relatedProducts].product_name}"/></a><br />
<br />{/if}
            {/section}
            </div>
			<div><a href="product.php?product_id={$relatedProducts[relatedProducts].product_id}&product_name={$relatedProducts[relatedProducts].product_name}">{$relatedProducts[relatedProducts].product_name|truncate:60:"..."}</a><br /><br /></div>
            <div class="price_text">
            {if $relatedProducts[relatedProducts].product_deal_price>0}
                Was: <span style="text-decoration:line-through">AU ${$relatedProducts[relatedProducts].product_price}</span><br />
                Now: <span style="text-decoration:none; font-weight:bold;">AU ${$relatedProducts[relatedProducts].product_deal_price}</span><br />
                Save: <span style="text-decoration:none; font-weight:bold; color:red;">AU ${$relatedProducts[relatedProducts].product_price-$relatedProducts[relatedProducts].product_deal_price|string_format:"%.2f"}</span>
            {else}
                AU$ {$relatedProducts[relatedProducts].product_price}<br />
                <span class="gst">incl GST</span>
            {/if}
            <br /><br />
                {if $relatedProducts[relatedProducts].is_new=="yes"}{php}$this->assign('productTag','New Arrival'); $this->assign('productTagStyle','new_arrival');{/php}{/if}
        {if $relatedProducts[relatedProducts].is_special=="yes"}{php}$this->assign('productTag','Special Item'); $this->assign('productTagStyle','on_special');{/php}{/if}
        {if $relatedProducts[relatedProducts].is_clearence=="yes"}{php}$this->assign('productTag','Clearence Item'); $this->assign('productTagStyle','clearence_item');{/php}{/if}    
        <div style="padding-top:5px;"></div><span class="{$productTagStyle}">{$productTag}</span>
        {php}$this->assign('productTag',''); $this->assign('productTagStyle','');{/php}
            </div>
        </div>
    </div>
    {/section}
    {/if}
<div style="clear:both; padding:7px;"></div>
    </td>
  </tr>
</table>
Return current item: Simple PHP Shopping cart - asaancart