Jump to content

[SOLVED] Remove image from product line


Recommended Posts

To remove the images from the product page, you will need to edit product.tpl and change lines 98-137 from:

<!-- right infos-->

   <!-- product img-->

   {if $have_image}
           <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {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"/>
   {else}
       <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" />
   {/if}


   {if count($images) > 0}
   <!-- thumbnails -->

   {if count($images) > 3}<a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Previous'}{/if}


           {foreach from=$images item=image name=thumbnails}
           {assign var=imageIds value=`$product->id`-`$image.id_image`}

               <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">
getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />


           {/foreach}


   {if count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Next'}{/if}

   {/if}
   {if count($images) > 1}
<a id="resetImages" href="{$link->getProductLink($product)}" style="display:none;" onclick="$('a#resetImages').hide('slow');return (false);">{l s='Display all pictures'}{/if}
   <!-- usefull links-->

       {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
{l s='Print'}

       {if $have_image && !$jqZoomEnabled}
{l s='View full size'}
       {/if}




to:

<!-- right infos-->

{*    <!-- product img-->

   {if $have_image}
           <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {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"/>
   {else}
       <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" />
   {/if}


   {if count($images) > 0}
   <!-- thumbnails -->

   {if count($images) > 3}<a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Previous'}{/if}


           {foreach from=$images item=image name=thumbnails}
           {assign var=imageIds value=`$product->id`-`$image.id_image`}

               <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">
getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />


           {/foreach}


   {if count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Next'}{/if}

   {/if}
   {if count($images) > 1}
<a id="resetImages" href="{$link->getProductLink($product)}" style="display:none;" onclick="$('a#resetImages').hide('slow');return (false);">{l s='Display all pictures'}{/if}
*}    <!-- usefull links-->

       {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
{l s='Print'}

       {if $have_image && !$jqZoomEnabled}
{l s='View full size'}
       {/if}


Link to comment
Share on other sites

and to remove the product images from the listing pages, you will need to change line 7 of product-list.tpl in your theme's directory from:

<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />



to:

{*<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}">getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />*}

Link to comment
Share on other sites

  • 3 months later...
To remove the images from the product page, you will need to edit product.tpl and change lines 98-137 from:

<!-- right infos-->

   <!-- product img-->

   {if $have_image}
           <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {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"/>
   {else}
       <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" />
   {/if}


   {if count($images) > 0}
   <!-- thumbnails -->

   {if count($images) > 3}<a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Previous'}{/if}


           {foreach from=$images item=image name=thumbnails}
           {assign var=imageIds value=`$product->id`-`$image.id_image`}

               <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">
getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />


           {/foreach}


   {if count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Next'}{/if}

   {/if}
   {if count($images) > 1}
<a id="resetImages" href="{$link->getProductLink($product)}" style="display:none;" onclick="$('a#resetImages').hide('slow');return (false);">{l s='Display all pictures'}{/if}
   <!-- usefull links-->

       {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
{l s='Print'}

       {if $have_image && !$jqZoomEnabled}
{l s='View full size'}
       {/if}




to:

<!-- right infos-->

{*    <!-- product img-->

   {if $have_image}
           <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {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"/>
   {else}
       <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" alt="" title="{$product->name|escape:'htmlall':'UTF-8'}" />
   {/if}


   {if count($images) > 0}
   <!-- thumbnails -->

   {if count($images) > 3}<a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Previous'}{/if}


           {foreach from=$images item=image name=thumbnails}
           {assign var=imageIds value=`$product->id`-`$image.id_image`}

               <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if $smarty.foreach.thumbnails.first}shown{/if}" title="{$image.legend|htmlspecialchars}">
getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" />


           {/foreach}


   {if count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="[removed]{ldelim}{rdelim}">{l s='Next'}{/if}

   {/if}
   {if count($images) > 1}
<a id="resetImages" href="{$link->getProductLink($product)}" style="display:none;" onclick="$('a#resetImages').hide('slow');return (false);">{l s='Display all pictures'}{/if}
*}    <!-- usefull links-->

       {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
{l s='Print'}

       {if $have_image && !$jqZoomEnabled}
{l s='View full size'}
       {/if}




if i want to put the product name under the product pic, how can i do that? i will only use pic and product name.
Link to comment
Share on other sites

  • 2 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...