bruce-rez Posted May 16, 2013 Share Posted May 16, 2013 (edited) Hi, Prestashop 1.5.4.1 How can I show/display only a small image in jpeg format in Short description section in Product List page, not in Product detail page? I want to show my "Free Shipping" image in Product list page. Thank you for any help. Edited June 19, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 16, 2013 Share Posted May 16, 2013 you want to show free shipping image on product list page, like the little icon show new or bellow the details. if you want to add all product that you have to edit product-list.tpl and add your image there. Link to comment Share on other sites More sharing options...
bruce-rez Posted May 16, 2013 Author Share Posted May 16, 2013 (edited) smartdatasoft, Thank you for fast reply. I want to show my image "Free Shipping" bellow the product title or above the price for certain products in my store. I don't want to show "Free Shipping" for entire store's products, please see the screen shots. Thanks. Edited May 16, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 17, 2013 Share Posted May 17, 2013 If you want to show bellow product name than you can put that image here in product-list.tpl line no 39 <div class="center_block"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} </a> <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}</a></h3> [u]<img src=".........imageurl"/>[/u] <p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p> </div> if you want to show that image to the right side line no 47 <div class="right_block"> {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="on_sale">{l s='On sale!'}</span> {elseif isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE}<span class="discount">{l s='Reduced price!'}</span>{/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price"> and hope your problem will solved. let me inform if you need any help. Link to comment Share on other sites More sharing options...
bruce-rez Posted May 17, 2013 Author Share Posted May 17, 2013 (edited) smartdatasoft, Thank you for the explanation. My question is if I change the code as yours in product-list.tpl, the "Free Shipping" image will be imbedded to all products? What I would like to do is that I want to show this image for only some of my products that are set to "Free Shipping" and I do not want to show this image in the products that are not applied for 'Free Shipping". I hope this makes sense for you. Thanks. Edited May 17, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 17, 2013 Share Posted May 17, 2013 yes that will show all product, so you have to display that with some condition, is that image show in all of your product details page, or some product, if all product details show that than you have to find how you manage free shipping from back office, than need to write smarty tag for that. Link to comment Share on other sites More sharing options...
bruce-rez Posted May 17, 2013 Author Share Posted May 17, 2013 smartdatasoft, As I mentioned in my previous reply I want to show this "Free Shipping" image in only some of my products and in Product List and Product detail pages. if all product details show that than you have to find how you manage free shipping from back office I know we can show "Free Shipping" in Short description section in Back Office by using the text editor and HTML. This does not resolve the problem, the "Free Shipping" image wont be shown in Product List page. than need to write smarty tag for that. How we can write smarty tag? Thank you Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 17, 2013 Share Posted May 17, 2013 yes this is a problem, this can be done by other way, all the free shipping will assign to a free shipping category than by that category we can show the image Link to comment Share on other sites More sharing options...
bruce-rez Posted May 17, 2013 Author Share Posted May 17, 2013 That sounds interesting if we can show free shipping by category. all the free shipping will assign to a free shipping category than by that category we can show the image Could you explain please how? Thanks. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 18, 2013 Share Posted May 18, 2013 suppose i have product a,b,c,d ,e i create category r,t,f and all free shipping product i will assign on category f. in the tpl we will find its category, so when we find category f than we will show the free shipping image. do you understand Link to comment Share on other sites More sharing options...
bruce-rez Posted May 18, 2013 Author Share Posted May 18, 2013 (edited) smartdatasoft, Sorry I didn't understand your explanation. Let's do it easier and real. I have already my category (Tablecloth category) set with with Free Shipping in Back Office of my store. Example; When customers place an order in one the product in Tablecloth category the shipping is free, they don't pay shipping. The free shipping does not apply to other products in my store except the Tablecloth products.That means if customers place an order for example Chiffon product, they pay for shipping. You can go to the above link and test it. Thank you for your help and your time. Edited June 19, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 18, 2013 Share Posted May 18, 2013 (edited) you can achive this by product-list.tpl as your shop have your http://site.com/16-tablecloth-products which means that this is on category 16. so you can put by this. {if $product.id_category_default == 16} <img src="shiping image."> {/if} than it will solve your solution . inform me if that work Edited July 27, 2013 by smartdatasoft (see edit history) Link to comment Share on other sites More sharing options...
bruce-rez Posted May 18, 2013 Author Share Posted May 18, 2013 (edited) smartdatasoft, Where should I exactly insert your code in product-list.tpl? Edited May 19, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 18, 2013 Share Posted May 18, 2013 hello, if you want to put that in the left site put in side this block <div class="center_block"> <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} </a> <h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'|truncate:35:'...'}</a></h3> <p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p> </div> [color=#343943][font=Arial, Helvetica, sans-serif][size=3]{if $product.id_category_default == 16}[/size][/font][/color] [color=#343943][font=Arial, Helvetica, sans-serif][size=3]<img src="shiping image."/>[/size][/font][/color] [color=#343943][font=Arial, Helvetica, sans-serif][size=3]{/if}[/size][/font][/color] and in this way it will work Link to comment Share on other sites More sharing options...
bruce-rez Posted May 19, 2013 Author Share Posted May 19, 2013 (edited) Thank you for the codes. It works fine but It shows to only one product (Bridal Satin Tablecloth) in Tablecloth category. PS: just I noticed your codes are different here with what I have in my email, could be filtering of forum. Edited June 19, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 19, 2013 Share Posted May 19, 2013 hello, bruce-rez this must not happen, if you put this inside category for each loop that it must be show all other product. did you other product on tablecloth is assign different category. as here we give condition to match default category assign. if a product is assign multiple category that may be the problem. if you have not problem you can send me your site ftp by personal message i will take a look and fix your issue. 1 Link to comment Share on other sites More sharing options...
bruce-rez Posted May 19, 2013 Author Share Posted May 19, 2013 (edited) smartdatasoft, It worked. You were right the tablecloth products were assigned to Home and Tablecloth categories at the same time. So I changed and assigned them only to their relative category. I am going to click on "Like This" for you and I thank you very much for support and help. Best regard Edited June 19, 2013 by bruce-rez (see edit history) Link to comment Share on other sites More sharing options...
dpfdtn Posted May 16, 2016 Share Posted May 16, 2016 Hijoin the conversation ...question: what do we do want the image to appear on postage free shipping only on products more expensive 100€?? Thank you for your reply Dalibor Link to comment Share on other sites More sharing options...
Recommended Posts