kassimi.hn Posted April 18, 2016 Share Posted April 18, 2016 Hi, I hope that I am posting in the right place. I have a problem when I try to test my web site on mobile device, when I get to products of a category I see their pictures so far every thing is good . but when I click on a product to see the detail and I click on previous to return back ,pictures doesn't show up any more I got picture with question mark. thanks all Link to comment Share on other sites More sharing options...
wayne_f Posted April 18, 2016 Share Posted April 18, 2016 Have you cleared the PrestaShop cache? Go to - Advanced Parameters / Performance the clear cache button is on the top right If you have changed the images it may be trying to display the non existent previous one. Also be sure that your phone's cache is clear. I like to turn off my cache in Desktop Firefox and using the developer's tools to view my sites in responsive mode. This way if you replicate the problem on different devices it will help you track down the actual problem. W- Link to comment Share on other sites More sharing options...
kassimi.hn Posted April 19, 2016 Author Share Posted April 19, 2016 (edited) Hi, thank you for your answer but unfortunately it doesn't solve my problem , I cleared the cache in BO and on my mobile but in vain. Below the error that I get thank you for helping me Edited April 19, 2016 by kassimi.hn (see edit history) Link to comment Share on other sites More sharing options...
kassimi.hn Posted April 19, 2016 Author Share Posted April 19, 2016 (edited) I found that the format small_default2x doesn't exist in performances ->images that's why I got this errors. Now I'm facing an other problem when I try to generate thumbnails of this new format i get this error : Original image is corrupt (/home/orchidee/public_html/img/p/5/0/1/501.jpg) for product ID 298 or bad permission on folder Or it will be better to change the javascript ?? but I'm not good with js. thanks for helping me if($('.replace-2x').css('font-size') == "1px") { var els = $("img.replace-2x").get(); for(var i = 0; i < els.length; i++) { src = els[i].src; extension = src.substr( (src.lastIndexOf('.') +1) ); src = src.replace("." + extension, "2x." + extension); var img = new Image(); img.src = src; img.height != 0 ? els[i].src = src : els[i].src = els[i].src; } } Edited April 19, 2016 by kassimi.hn (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2016 Share Posted April 19, 2016 I found that the format small_default2x doesn't exist in performances ->images that's why I got this errors. Now I'm facing an other problem when I try to generate thumbnails of this new format i get this error : Original image is corrupt (/home/orchidee/public_html/img/p/5/0/1/501.jpg) for product ID 298 or bad permission on folder Or it will be better to change the javascript ?? but I'm not good with js. thanks for helping me if($('.replace-2x').css('font-size') == "1px") { var els = $("img.replace-2x").get(); for(var i = 0; i < els.length; i++) { src = els[i].src; extension = src.substr( (src.lastIndexOf('.') +1) ); src = src.replace("." + extension, "2x." + extension); var img = new Image(); img.src = src; img.height != 0 ? els[i].src = src : els[i].src = els[i].src; } } You better change the original image for this product ID 298 /home/orchidee/public_html/img/p/5/0/1/501.jpg if the image is really corrupt Link to comment Share on other sites More sharing options...
kassimi.hn Posted April 19, 2016 Author Share Posted April 19, 2016 thank you for your answer what I did is i change this line and now it works src = src.replace("." + extension, "2x." + extension); I put this src = src.replace("." + extension, "." + extension); what do u think ? Link to comment Share on other sites More sharing options...
wayne_f Posted April 19, 2016 Share Posted April 19, 2016 I would speak to the person who created the Theme They should have included small_default2x in preferences ->images with the install I also agree that Tweb in that you should try replacing the image for that product then check the folder/directory permissions Using the replace command should not be needed and will most likely cause you problems down the road. Link to comment Share on other sites More sharing options...
kassimi.hn Posted April 20, 2016 Author Share Posted April 20, 2016 ok I will see with the person who created the theme, thank you all for your time and your advises 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