Slumdog Posted June 15, 2011 Share Posted June 15, 2011 I have a product with more combinations. It is possible to display by default only the images(thumbs) which belongs to default combination?Thank you Link to comment Share on other sites More sharing options...
alexidro Posted February 22, 2012 Share Posted February 22, 2012 you must go into the product.js of your theme folder and find the following code: if(typeof(firstTime) != 'undefined' && firstTime) refreshProductImages(0); else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; then comment or delete the following lines like here: //if(typeof(firstTime) != 'undefined' && firstTime) // refreshProductImages(0); //else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; Tested and working on version 1.4.7 Hope this helps Alessandro 1 Link to comment Share on other sites More sharing options...
s33m0n Posted June 5, 2012 Share Posted June 5, 2012 WOW! thank you Alessndro! You are the men!! Link to comment Share on other sites More sharing options...
fredekac Posted January 30, 2013 Share Posted January 30, 2013 A worked for me in 1.4.4.0 thank you Link to comment Share on other sites More sharing options...
cicada_021 Posted February 15, 2013 Share Posted February 15, 2013 I have This Prob too and the #2 answer didnt work I use Presta v1.5.2 Please look at the attachments to check if did this wrong Link to comment Share on other sites More sharing options...
cicada_021 Posted February 16, 2013 Share Posted February 16, 2013 this topic on Prestashop.com live demo is solved ! Please some programmer help me on this issue... Link to comment Share on other sites More sharing options...
James_oe Posted April 1, 2013 Share Posted April 1, 2013 Huge help!! Thank you! (Prestashop vers. 1.5.4.0) Link to comment Share on other sites More sharing options...
raptor44 Posted May 20, 2014 Share Posted May 20, 2014 Hi ! I just tried that solution on Prestashop 1.6.0.6 and it is not working, all product images are displayed when opening product page Anyone has a solution ? Many thanks ! you must go into the product.js of your theme folder and find the following code: if(typeof(firstTime) != 'undefined' && firstTime) refreshProductImages(0); else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; then comment or delete the following lines like here: //if(typeof(firstTime) != 'undefined' && firstTime) // refreshProductImages(0); //else refreshProductImages(combinations[combination]['idCombination']); //leave the function because combination has been found return; Tested and working on version 1.4.7Hope this helpsAlessandro Link to comment Share on other sites More sharing options...
drolex Posted October 18, 2014 Share Posted October 18, 2014 Solution: http://addons.prestashop.com/en/front-office-features-prestashop-modules/17936-default-combination-images.html Link to comment Share on other sites More sharing options...
mielnicki Posted June 13, 2015 Share Posted June 13, 2015 hello, how about prodlem with fancybox, that is showing all images when navigating left to right arrows? Link to comment Share on other sites More sharing options...
2dm Posted December 16, 2015 Share Posted December 16, 2015 in 1.6 have to comment this lines in product.js of your theme: //if (firstTime) // { // refreshProductImages(0); // firstTime = false; // } // else 1 Link to comment Share on other sites More sharing options...
spaceman Posted January 8, 2016 Share Posted January 8, 2016 in 1.6 have to comment this lines in product.js of your theme: //if (firstTime) // { // refreshProductImages(0); // firstTime = false; // } // else Excellent, thanks 2DM, that worked for me on v1.6.1. Link to comment Share on other sites More sharing options...
Guest locen Posted April 13, 2016 Share Posted April 13, 2016 in 1.6 have to comment this lines in product.js of your theme: //if (firstTime) // { // refreshProductImages(0); // firstTime = false; // } // else It works for me. prestashop 1.6.1.3 Link to comment Share on other sites More sharing options...
nethel Posted July 5, 2016 Share Posted July 5, 2016 (edited) Hello everyone, Sorry to ask the same question again several months later but I bought a template and I believe my product.js is different from the ones you describe because when I comment the lines for the 1.6 version, it does not work for me (I implemented the 1.6.1.5 version). My problems : - when a combination is selected from the category page (color different from default), it displays a product with the good big image but with default thumbnails. I really need this default behavior not to happen. - Worse, when I check my product pages on a mobile (using chrome) : when you are on a product combination, default thumbnails appear after sliding (after showing first the good thumbnails, which can be a good thing) I had a try with the ones who created the template but I had 3 different people asking and asking again for what can be my problem... I know guys here are willing to help so I have a try asking if someone have the kindness to look at my website (still not opened to public but online) Edited July 5, 2016 by nethel (see edit history) Link to comment Share on other sites More sharing options...
Tatort Posted November 15, 2016 Share Posted November 15, 2016 (edited) Hello, thank it's working on initial clic... but you have always on one combination all the pictures... so Anyone have en idea ? Thank you update: //// weird it's seems to be working now ! sorry Edited November 15, 2016 by Tatort (see edit history) Link to comment Share on other sites More sharing options...
Lucardo Posted February 19, 2017 Share Posted February 19, 2017 (edited) I encountered this problem at version 1.6.1.11 when the combination has the product main image. In that case, when the combination is selected, the main image is applied. I made this change to overcome the problem. This will use the first image of the combination instead of the main image, and if no combination is selected, it will use the main combination with the product main image. At the product.js around line 482, I'd replaced this: if (combination['image'] && combination['image'] != -1) displayImage($('#thumb_' + combination['image']).parent()); with this: if (!combinationImages.indexOf(combination['idCombination']) || combinationImages[combination['idCombination']].length === 0) { if (combination['image'] && combination['image'] != -1) displayImage($('#thumb_' + combination['image']).parent()); } else { displayImage($('#thumb_' + combinationImages[combination['idCombination']][0]).parent()); } hopefully, this afternoon I'll make a PR at github with this. Edited February 19, 2017 by Lucardo (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