phil56 Posted July 1, 2011 Share Posted July 1, 2011 Bonjour,<br/><br/>J'ai le plaisir de vous faire partager une solution simple pour choisir son image par défait dans la page produit<br/><br/>Remplacer <br/><br/> <div id="image-block"><br/> {if $have_image}<br/> <img >getImageLink($product->link_rewrite, $cover.id_image, 'large')}"<br/> {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" /><br/> {else}<br/> <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="">name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" /><br/> {/if}<br/> </div> <br/><br/>Par <br/><br/><div id="image-block"><br/> {if $have_image}<br/>{foreach from=$images item=image name=bigimage} {if $smarty.foreach.bigimage.index==1} <img id="bigpic">getImageLink($product->link_rewrite, $image.id_image,'large')}" <br/>title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" > <br/> {/if} {/foreach}<br/> {else}<br/> <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="">name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" /><br/> {/if}<br/> <br/> </div><br/><br/>Changer l'ordre des Thumbnails dans la BO pour choisir votre image par défaut.<br/><br/>Cette solution est sûrement perfectible et vos avis sont les bienvenus !<br/><br/>Voilou Non résolu depuis basculement vers 1.4.4.1 ! Link to comment Share on other sites More sharing options...
phil56 Posted September 2, 2011 Author Share Posted September 2, 2011 Image dans product.tpl différente de l'image par défaut Voici la maj pour 1.4.4.1 {if $have_image} {foreach from=$images item=image name=bigimage} {assign var=imageIds value="`$product->id`-`$image.id_image`"} {if $smarty.foreach.bigimage.index==1} <img id="bigpic" src="{$link->getImageLink($product->link_rewrite, $imageIds,'large')}" title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" /> {/if} {/foreach} {else} <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" /> {/if} Cordialement, Link to comment Share on other sites More sharing options...
jujutte24 Posted April 15, 2012 Share Posted April 15, 2012 Bonjour, je n'ai pas compris l'intérêt de ce code ? si quelqu'un peut m’expliquer ? Et il n’existerait pas la possibilité d'appliquer une image par défaut différente d'une catégorie à l'autre ? 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