mikajaxxxx Posted July 25, 2015 Share Posted July 25, 2015 (edited) Hello everyone I have some problem with the new prestashop 1.6.1 !!!! i used a theme which shows the second image of product on hover ! the codes related to this are here: //first image {if isset($productimg[$product.id_product]) && !empty($productimg[$product.id_product])} <img class="replace-2x img-responsive img_0" src="{$link->getImageLink($product.link_rewrite,$product.id_product|cat:"-"|cat:$productimg[$product.id_product].0.id_image, 'home_default_btt')|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" /> //second image {if isset($productimg[$product.id_product].1) && !empty($productimg[$product.id_product].1)} <img class="replace-2x img-responsive img_1" src="{$link->getImageLink($product.link_rewrite,$product.id_product|cat:"-"|cat:$productimg[$product.id_product].1.id_image, 'home_default_btt')|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} /> {/if} {else} <img class="replace-2x img-responsive img_0" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default_btt')|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" />{/if} the format of "getImageLink()" function is this: public function getImageLink($name, $ids, $type ) { } after upgrading to prestashop 1.6.1 it doesn't work anymore. just the first image shown. the second image doesnt work! the link to my website is here: http://www.rytoon.com/en the effect is for product sliders! on mouse hover it should change to second image . in previous version of prestashop it works perfectly like this one : http://warehouse.iqit-commerce.com/en/ Best regards Edited July 25, 2015 by mikajaxxxx (see edit history) Link to comment Share on other sites More sharing options...
mikajaxxxx Posted July 25, 2015 Author Share Posted July 25, 2015 (edited) Ok no answer!!!!!!!!!! I solved my problem.. the problem is about that in prestashop 1.6.1 cover image can be null! i found this great tutorial and it solve my problem http://pelechano.es/efecto-rollover-listados-prestashop-1-5-y-1-6/ use chrome to translate it to english.. you should just change WHERE id_product="'.$product_id.'" and cover=0 ORDER BY `position` LIMIT 0,1 ) to WHERE id_product="'.$product_id.'" and ( cover=0 OR cover IS NULL ) ORDER BY `position` LIMIT 0,1 ) Edited July 25, 2015 by mikajaxxxx (see edit history) 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