Davidh Posted November 3, 2010 Share Posted November 3, 2010 I sell ink cartridges and have hundreds of products. How do I remove the image from the product pages?My site is : www.aftermarketcartridges.com Link to comment Share on other sites More sharing options...
rocky Posted November 4, 2010 Share Posted November 4, 2010 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 More sharing options...
rocky Posted November 4, 2010 Share Posted November 4, 2010 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 More sharing options...
Davidh Posted November 4, 2010 Author Share Posted November 4, 2010 Thanks Rocky, the second one did the trick. Link to comment Share on other sites More sharing options...
pepekmentul Posted February 6, 2011 Share Posted February 6, 2011 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 More sharing options...
rocky Posted February 8, 2011 Share Posted February 8, 2011 Edit product.tpl in your theme's directory and move line 123 (in PrestaShop v1.3.6): {$product->name|escape:'htmlall':'UTF-8'} down to just above line 178: <!-- usefull links--> Link to comment Share on other sites More sharing options...
pepekmentul Posted February 8, 2011 Share Posted February 8, 2011 Edit product.tpl in your theme's directory and move line 123 (in PrestaShop v1.3.6): {$product->name|escape:'htmlall':'UTF-8'} down to just above line 178: <!-- usefull links--> thank you rocky rock Link to comment Share on other sites More sharing options...
ScubaLessonsInc Posted April 20, 2011 Share Posted April 20, 2011 I just want a list view.. have items like 300 with no images.. don't want a list of Product image not found.. Tried the second method for list view but not working in Prestashop 1.4 any other suggestions? 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