Site Posted September 29, 2011 Share Posted September 29, 2011 Hi, Is their a way of showing the accessories in the product description, like the screenshot attached?. I understand its on the "product.tpl" <div id="more_info_sheets" class="sheets align_justify"> {if $product->description} <!-- full description --> <div id="idTab1" class="rte">{$product->description}<br><br>123<br><br>$accessories</div> {/if} Link to comment Share on other sites More sharing options...
hulk Posted September 29, 2011 Share Posted September 29, 2011 you can do this in product.tpl : place after L340 : <!-- full description--> <div id=idTab1" class="rte">{$product->description}</div> like this : <!-- full description--> <div id=idTab1" class="rte">{$product->description}</div> {if isset($accessories) AND $accessories} <!-- accessories --> <ul id="idTab4" class="bullet"> <div class="block products_block accessories_block"> <div class="block_content"> <ul> {foreach from=$accessories item=accessory name=accessories_list} {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} <li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description"> <h5 class="align_center"><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:22:'...'|escape:'htmlall':'UTF-8'}</a></h5> <p class="product_desc"> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" /></a> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:100:'...'}</a> </p> <p class="product_accessories_price"> <span class="price">{displayWtPrice p=$accessory.price}</span> <a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> <a class="button ajax_add_to_cart_button" href="{$base_dir}cart.php?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> </p> </li> {/foreach} </ul> </div> </div> <div class="clear"></div> </ul> {/if} 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now