KenFranklin Posted February 6, 2015 Share Posted February 6, 2015 How add more 1 pictures in product list? Part of product-list.tpl <a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url"> <img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" /> </a> it is 1 picture. 1. how to make a loop for all pictures? 2. how to shop 2-3 pictures? Link to comment Share on other sites More sharing options...
las3r Posted February 7, 2015 Share Posted February 7, 2015 Are you trying to show all the product images that are associated with a product in the product overview (category view) ? These images are probably (my first guess) not available there so you'd need to override the category view to grab the related images as well. Let me know if this is right, I'll try and find this out for you (if someone doesn't know the answer right away) Link to comment Share on other sites More sharing options...
KenFranklin Posted February 9, 2015 Author Share Posted February 9, 2015 Thank U. Most likely. And how to do it? Link to comment Share on other sites More sharing options...
tuk66 Posted February 9, 2015 Share Posted February 9, 2015 The product list page looks well with one image per product. I can imagine to add another one image but not more. The product-list.tpl template is used by ProductController.php (initContent method) and more modules. You need to add the second image data to all of them. Link to comment Share on other sites More sharing options...
vekia Posted February 9, 2015 Share Posted February 9, 2015 you can do it with some module if you're on ps at least 1.6.0.10 you can use hook: displayProductDeliveryTime you will avoid core and theme files modification i use it in this module: https://www.prestashop.com/forums/topic/383792-module-product-list-attributes-pictures-gallery-photos-switcher/ 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