romnatt Posted March 29, 2012 Share Posted March 29, 2012 Bonjour, Afin de finaliser la fiche produit, je dois intégrer le titre de la catégorie de mon accessoires (en plus du nom et du prix) Mais impossible d'y arriver.. que dois je rajouter? Merci d'avance <!-- MODULE Accessories --> {if isset($accessories) AND $accessories} <style> ul#idTab4 {ldelim} display: none; {rdelim} </style> <script type="text/javascript"> $(document).ready(function () {ldelim} $("#more_info_tabs a").each(function() {ldelim} if ($(this).attr('href') == "#idTab4") $(this).css('display','none'); {rdelim}); {rdelim}); </script> <div id="pa_container" style="width: 600px; margin-top: 15px;" class="block_content{if $accessories|@count > 4} pa_er_height{/if}"> <div style="margin-bottom: 15px; margin-left: 22px;" class="pa_er_header">SUGGESTIONS D'ASSOCIATIONS :</div> <div style="margin-bottom: 15px; margin-left: 22px;" class="pa_er_product_container{if $accessories|@count > 6} scroll-pane{/if}{if $accessories|@count > 4} pa_erp_height{/if}"> {foreach from=$accessories item=accessory name=accessories_list} <div style="width: 165px; float: left; border: 1px solid #BAB5B2; border-radius: 10px 10px 10px 10px; margin-left: 5px; margin-right: 5px;" class="ajax_block_product pa_er_block{if $accessories|@count > 6}_scroll{/if}"> {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} <div class="pa_er_image"><p><a href="{$node.link_rewrite|escape:htmlall:'UTF-8'}" title="{$node.description|escape:htmlall:'UTF-8'}"> {$node.name|truncate:18:'...'|escape:htmlall:'UTF-8'} </a></p> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" target="_blank" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{if $pa_old_img}{$img_prod_dir}{$accessory.id_image}-home.jpg{else}{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home')}{/if}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" /></a> </div> <h5 class="align_center" style="text-align:center; background:#d5d1d0;"><a style="text-align:center; background:#d5d1d0;" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" target="_blank">{$accessory.name|truncate:20:'...'|escape:'htmlall':'UTF-8'}</a></h5> <div class="pa_er_accessories_price"> <div class="price" style="text-align:center; background:#d5d1d0;">{if !$priceDisplay}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</div> <div class="pa_er_atc" style="margin-right:auto; margin-left:auto;"><a style="margin-right:auto; margin-left:auto;" class="button_small exclusive_small 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' mod='productaccessories'}">{l s='Add' mod='productaccessories'}</a></div> </div> </div> {if $smarty.foreach.accessories_list.iteration % 2 == 0} {/if} {/foreach} </div> </div> {if $accessories|@count > 6} <script type="text/javascript"> $('document').ready( function() {ldelim} $('.pa_er_product_container').jScrollPane(); {rdelim}); </script> {/if} {/if} <!-- / MODULE Accessories --> Link to comment Share on other sites More sharing options...
cmsxpert Posted January 28, 2013 Share Posted January 28, 2013 (edited) Bonsoir ce post est un peu vieux mais bon...vue que j'ai travaillé sur la problématique et si ma contribution peut aider : Pour afficher le titre de la catégorie d'un produit accessoire : {$accessory.category|regex_replace:"/[\-]/":" "|escape:'htmlall':'UTF-8'|truncate:65:'…'} Edited February 5, 2013 by cmsxpert (see edit history) 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