marketplace Posted December 29, 2012 Share Posted December 29, 2012 (edited) Hi, I have downloaded and I have installed on my localhost server a fresh Prestashop 1.5.3 version. All nice and good. After I have installed my own theme (which was working perfectly under Prestashop 1.5.2) all the images for products, categories, featured, newproducts, etc are missing under Internet Explorer. I have looked into the code and I have found that the sizes for height and width for images are empty (when I look at the source code on mozilla and chrome) but on internet explorer are showing only 1px for height and 1px for width. I went on Prestashop B.O - and I had a look at how the images are setup. They are setup exactly as it was on the Prestashop 1.5.2 version. I have regenerated them but with no success. The only work around I could find was to go to the tpl files and add the actual sizes I have setup them on Prestashop back office. This is the only solution I could find for now. I think this is a Prestashop bug, because I have tried to copy all the tpl files from the default Prestashop theme and add them to my theme folder. I've added all tpl files from the root of the default theme to my root theme, including some folders (i.e - js folder). Also because I did had some modified tpl files from modules, I have removed this folder from my theme folder to make sure I will use only the default Prestashop modules. Can someone have an idea what is missing here. I see a lot of peoples are complaining of Prestashop 1.5.3 and I was wondering why Prestashop are releasing so often new releases that are with more bugs then the previous versions Also, when I have installed the theme with the installator module I got this error (althrough the theme got installed): "Fatal error in module themeinstallator: trim() expects parameter 1 to be string, array given" Any help will be much appriciated. Edited December 29, 2012 by marketplace (see edit history) Link to comment Share on other sites More sharing options...
Radek100 Posted December 29, 2012 Share Posted December 29, 2012 I have the same problem for Internet Explorer. No pictures - I have only homefeatured products pictures and full size product image. But under Firefox, Chrome, Safari is everything ok, I have all pictures. Do you have this problem only with Explorer as I? This happend only for edited theme from 1.5.2. Deafault 1.5.3. theme show all picutres also in Internet Explorer Link to comment Share on other sites More sharing options...
stevell Posted December 30, 2012 Share Posted December 30, 2012 (edited) I have the same issue since upgrading to 1.5.3. The images show correctly in Firefox and safari but do not show in Internet Explorer. They all worked fine in 1.5.2 Edited December 30, 2012 by stevell (see edit history) Link to comment Share on other sites More sharing options...
dwilden Posted December 30, 2012 Share Posted December 30, 2012 (edited) Is same issue like Cross Selling Block http://www.prestasho...nt-show-ps-153/ You have three options. 1) Create a new image property named "home" 2) Roolback the homefeatured.php from PS 1.5.2 version 3) Change the next lines homefeatured.php : LINE 111 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), TO 'homeSize' => Image::getSize(ImageType::getFormatedName('home_default')), Some Prestashop Developers have drink too many Champagne this days and have renamed again the default images to old alias. Good Luck Edited December 30, 2012 by Dreamguard (see edit history) Link to comment Share on other sites More sharing options...
Agmagor Posted December 30, 2012 Share Posted December 30, 2012 Hi, since I upgraded to 1.5.3, I have the same problem everywhere (homefeatured, category page, product page) with IE. I use overridden modules, so I think that the problem is caused by Prestashop Core. Maybe having a stable release these days was to hopeful. Thanks & Good Luck 1 Link to comment Share on other sites More sharing options...
Radek100 Posted December 30, 2012 Share Posted December 30, 2012 Hi, since I upgraded to 1.5.3, I have the same problem everywhere (homefeatured, category page, product page) with IE. I use overridden modules, so I think that the problem is caused by Prestashop Core. Maybe having a stable release these days was to hopeful. Thanks & Good Luck It is caused with theme, use default 1.5.3. theme. Other browsers display your pictures also in 1.5.2. theme, only IE has this problem. Link to comment Share on other sites More sharing options...
j0a0r Posted December 31, 2012 Share Posted December 31, 2012 (edited) I get this issue, I'm not an expert and my solution may be useful for the ones that replicate the default theme and customized it. I changed the folder name of my customized theme to default, worked for me, hope it's useful for you to! This versions seems to have some issues managing images, I had a minor problem updating the logo. Good Luck Edited December 31, 2012 by j0a0r (see edit history) 1 Link to comment Share on other sites More sharing options...
Gomlers Posted January 1, 2013 Share Posted January 1, 2013 I am also having this problem. Will prestashop launch some kind of patch or something from 1.5 -> 1.5.3.0 and above, to fix this issue? Link to comment Share on other sites More sharing options...
Alldo Group Posted January 1, 2013 Share Posted January 1, 2013 What is causing this IE image problem? Is there any solution to this problem? I can't find where to make changes go get IE to display the images again. I'm using a modified theme from 1.5.2- Thanks! Link to comment Share on other sites More sharing options...
hsyong Posted January 2, 2013 Share Posted January 2, 2013 (edited) It's still the same problem with PrestaShop 1.5.3.1. Only the default theme works properly. For all custom themes, the product images do not have height and width defined in the html, like this >>> height="" width="" This happens to ALL browsers. Other browsers still display the images even with this error, but IE9 displays as zero height/width. A bug report already created here. Maybe you guys want to add your comment: http://forge.prestas...owse/PSCFV-6435 Edited January 2, 2013 by hsyong (see edit history) 2 Link to comment Share on other sites More sharing options...
Anat Kitithamrong Posted January 2, 2013 Share Posted January 2, 2013 (edited) I use custom image type for biger product image in PS 1.5.2 with some overriding module. On IE8 (1) I have product image shown but the thumbnail of the other pictures missing when upgrade to 1.5.3 (2) There is CMS block appear above footer. first, I prefer to modify CSS or inline CSS The solution below can be use other way to add fixed size directly to the width="" height="" of <img> My solution added: Product thumbnails under product image in product detail page File: /themes/mytheme/css/product.css under this line: #thumbs_list li img add 2 lines below: width:58px; height:58px; ------------------------------------------------------------------------ Categories pictures when File: /themes/mytheme/category.tpl find this line: {if $subcategory.id_image} add this code : style="width:58px; height:58px" to to the below line: <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" style="width:58px; height:58px" /> Tested on IE8 works for me Edited January 11, 2013 by Anat Kitithamrong (see edit history) Link to comment Share on other sites More sharing options...
marketplace Posted January 2, 2013 Author Share Posted January 2, 2013 (edited) Unfortunately the 1.5.3.1 version did not fixed the problem...and it looks like I'm not the only one witch is completing about this... Edited January 2, 2013 by marketplace (see edit history) Link to comment Share on other sites More sharing options...
romast Posted January 2, 2013 Share Posted January 2, 2013 I have the same problem with my theme... if I did not seen this post I wouldn't have noticed. Link to comment Share on other sites More sharing options...
Anat Kitithamrong Posted January 2, 2013 Share Posted January 2, 2013 There is a comment in global.css about this problem below : /******* IMPORTANT - Internet Explorer can read 31 CSS files max. Some CSS have been put here and erased from their own module folder.************/ may be because this limitation a source of trouble? Link to comment Share on other sites More sharing options...
hsyong Posted January 2, 2013 Share Posted January 2, 2013 (edited) @Anat Kitithamrong, I think it is not the global.css because default theme is okay. ------------------------------------------------------------------------------------------------------------------ If you copy files from the default theme and rename it (example: default2) and activate this new theme, the product images will not be displayed in IE9. Meaning, even a theme with the EXACT same files with default theme will have problem. Strange. I think the problem is not in the theme files. It is in the module or core files. Please see the bug report here and make comments or vote if possible, so that the developers may take notice sooner: http://forge.prestas...owse/PSCFV-6435 Edited January 2, 2013 by hsyong (see edit history) 1 Link to comment Share on other sites More sharing options...
romast Posted January 2, 2013 Share Posted January 2, 2013 so renaming the custom theme to "default" can be a temporary solution? I am too lazy to upload back my backup Link to comment Share on other sites More sharing options...
j0a0r Posted January 2, 2013 Share Posted January 2, 2013 I romast, it solved me the issue I had width the images, but I'm rolling back to 1.4.9, for now. Because of the that I'm facing width images in CSV import and combinations... Good luck. Link to comment Share on other sites More sharing options...
romast Posted January 2, 2013 Share Posted January 2, 2013 thanks, it works. I renamed folder and theme's name, but I see only theme name in BO is necessary. Link to comment Share on other sites More sharing options...
Anat Kitithamrong Posted January 2, 2013 Share Posted January 2, 2013 @Anat Kitithamrong, I think it is not the global.css because default theme is okay. ------------------------------------------------------------------------------------------------------------------ If you copy files from the default theme and rename it (example: default2) and activate this new theme, the product images will not be displayed in IE9. Meaning, even a theme with the EXACT same files with default theme will have problem. Strange. I think the problem is not in the theme files. It is in the module or core files. Please see the bug report here and make comments or vote if possible, so that the developers may take notice sooner: http://forge.prestas...owse/PSCFV-6435 Yes, I already done this and got the same result. I'll check that bug report link thanks hsyong Hope to have a new bug fix soon. Link to comment Share on other sites More sharing options...
LarsR Posted January 3, 2013 Share Posted January 3, 2013 I've found a solution to the problem. With Prestashop 1.5.3, they changed the way image sizes are loaded. I found the following code in homefeatures.php: Image::getSize(ImageType::getFormatedName('home')) I looked at the code which finds the name of the image type to use: ImageType::getFormatedName('home') This, for my theme called "mytheme", returns "mytheme_home". This image name doesn't exist, since all the normal names are called ex "home_default" or something like it. Internet Explorer renders images with empty width/height properties at 1x1 images, which will make them show up at simple "dots". So the solution is to copy all the "Preferences -> Images"-settings and name them like mytheme_small mytheme_home mytheme_category etc. 2 Link to comment Share on other sites More sharing options...
dwilden Posted January 3, 2013 Share Posted January 3, 2013 (edited) This solution is posted here http://forge.prestas...l#comment-66427 and here http://www.prestasho...ost__p__1051860 http://www.prestasho...nt-show-ps-153/ but prestashop developers must fix this issue at the next version Edited January 3, 2013 by dwilden (see edit history) Link to comment Share on other sites More sharing options...
webplus Posted January 3, 2013 Share Posted January 3, 2013 (edited) I've found a solution to the problem. With Prestashop 1.5.3, they changed the way image sizes are loaded. I found the following code in homefeatures.php: Image::getSize(ImageType::getFormatedName('home')) I looked at the code which finds the name of the image type to use: ImageType::getFormatedName('home') This, for my theme called "mytheme", returns "mytheme_home". This image name doesn't exist, since all the normal names are called ex "home_default" or something like it. Internet Explorer renders images with empty width/height properties at 1x1 images, which will make them show up at simple "dots". So the solution is to copy all the "Preferences -> Images"-settings and name them like mytheme_small mytheme_home mytheme_category etc. Thanks for the tip. But do you have images displayed in theme with correct size? I tried, the width and height values in code are correct, but the images are generated still in incorrect size (default) so they are blurry if my image sizes are different (bigger). Can you confirm? EDIT: the only working solution (except renaming the theme to default or hacking core files) seems to be to create those image types with theme name prefix and also change the default image types to required value. I believe this is a bug. Hopefully someone from Prestashop team will respond in bug tracker soon. EDIT2: just notice that another version 1.5.3.1 was released. I didn't notice :-)) Half day lost... Edited January 3, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
Alldo Group Posted January 3, 2013 Share Posted January 3, 2013 EDIT2: just notice that another version 1.5.3.1 was released. I didn't notice :-)) Half day lost... In my case, version 1.5.3.1 does not solve the image problem. 1 Link to comment Share on other sites More sharing options...
marketplace Posted January 3, 2013 Author Share Posted January 3, 2013 In my case also! I think this is a bug wich needs to be fixed ASAP! I think most of the users wich are using third party themes with Prestashop 1.5.3 are not aware of this problem. In my case, version 1.5.3.1 does not solve the image problem. 1 Link to comment Share on other sites More sharing options...
webplus Posted January 3, 2013 Share Posted January 3, 2013 (edited) You are right, it wasn't solved in 1.5.3.1. I'm just testing it. I wonder if it's really bug or new "feature". Because if I define my own image types in preferences and then edit all tpl files and change all _default to my new type, then it works ok everywhere and also such theme exported back to zip, works great for theme installer (no need to rewrite default image types anymore). Edited January 3, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
hsyong Posted January 3, 2013 Share Posted January 3, 2013 webplus, If this is a "feature" then it is not so convenient? Some of use would just like to copy the default theme and make a bit of color changes to the CSS. We expect it to work "seamlessly"... just copy the default theme and make a few CSS edits and it's good to go. Now we have to worry about the image settings and display in Internet Explorer. Anyway, there is still no official comment from the PrestaShop team on the bug report. 1 Link to comment Share on other sites More sharing options...
Radek100 Posted January 3, 2013 Share Posted January 3, 2013 (edited) I couldn't see also my picutres, with version 1.5.3.1. shouldn't be problem. Only is necessary to go in BO - Prefereneces - Images - Regenerate thumbnails (let checked erase previous images, select image: all). I did it on localhost, all pictures are loaded after that. In other way the problem should be with version 1.5.3. where isn't 1.5.2. edited theme compatible with the version 1.5.3. - I had problem to view pictures in IE with edited theme. Edited January 3, 2013 by Radek100 (see edit history) Link to comment Share on other sites More sharing options...
hsyong Posted January 3, 2013 Share Posted January 3, 2013 Radek100, Regenerating thumbnails did not work for me on 1.5.3.1. If I don't rename my theme to "default", the only way to make image appear in IE is to create new image type preference, small_mytheme, medium_mytheme etc etc. 1 Link to comment Share on other sites More sharing options...
Alldo Group Posted January 3, 2013 Share Posted January 3, 2013 Radek100, Regenerating thumbnails did not work for me on 1.5.3.1. If I don't rename my theme to "default", the only way to make image appear in IE is to create new image type preference, small_mytheme, medium_mytheme etc etc. Same here! Running 1.5.3.1. Using modified theme from 1.5.2.0. 1 Link to comment Share on other sites More sharing options...
webplus Posted January 3, 2013 Share Posted January 3, 2013 (edited) webplus, If this is a "feature" then it is not so convenient? Some of use would just like to copy the default theme and make a bit of color changes to the CSS. We expect it to work "seamlessly"... just copy the default theme and make a few CSS edits and it's good to go. Now we have to worry about the image settings and display in Internet Explorer. Anyway, there is still no official comment from the PrestaShop team on the bug report. I defenitelly agree with you. If this was implemented as feature, it's not a good solution. It should be as easy as it was in 1.4 version. If themeinstallator found that the images in theme had same image types, you could rewrite them according to theme Config.xml during the installation. Also there is still quite a chance that this is a bug. Maybe QA couldn't see it during testing if they test only with default theme.... And yes, the official Prestashop statement (here or on forge) would help a lot :-) Edited January 3, 2013 by webplus (see edit history) 1 Link to comment Share on other sites More sharing options...
Alldo Group Posted January 3, 2013 Share Posted January 3, 2013 And yes, the official Prestashop statement (here or on forge) would help a lot :-) Would love that! 1 Link to comment Share on other sites More sharing options...
webplus Posted January 3, 2013 Share Posted January 3, 2013 (edited) Radek100, Regenerating thumbnails did not work for me on 1.5.3.1. If I don't rename my theme to "default", the only way to make image appear in IE is to create new image type preference, small_mytheme, medium_mytheme etc etc. If you create these new types, it will ONLY set the image attributes to proper width and height (which will make it visible in IE). But the image itself (in the path) will be still the default size (blurry if yours is bigger), so even this is not fully working solution. You also have to edit tpl files and replace e.g. small_default with small_mytheme etc. Or has anyone found easier solution? Edited January 3, 2013 by webplus (see edit history) 1 Link to comment Share on other sites More sharing options...
webplus Posted January 3, 2013 Share Posted January 3, 2013 (edited) It's also impossible to use theme variations feature (as I reported here http://forge.prestas.../browse/PNM-611). Also with such approach you would have to override all image types in all tpl modules files (those you are using) within the theme. Now I really think this is more or less unusable (outside default theme) without too much of hacking and it's a bug which should be fixed asap. Any feedback appreciated. Edited January 4, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
iggywebprom Posted January 3, 2013 Share Posted January 3, 2013 I renamed all img_default to image_mytheme and Explorer now shows them. But in other browsers still no image sizes. Link to comment Share on other sites More sharing options...
Porpoise Posted January 3, 2013 Share Posted January 3, 2013 I just tried the renaming the directories, and I just got a blank window in all browsers from the default and and "myTheme" and I don't seem to be able to get either theme to work now (having renamed the folders back to what they were originally) - just a blank window!!!???!!! Link to comment Share on other sites More sharing options...
Porpoise Posted January 5, 2013 Share Posted January 5, 2013 OK. Like many other people who have had their ass bitten by this fiasco, I have now reverted to my 1.5.2.0 backup and am sticking with it until there is a REAL fit for release version which FIXES ALL THE CURRENT ISSUES WITHOUT ADDING ANY ADDITIONAL FEATURES! In the meantime, I have hit the "unable to add or edit products" issue with my reverted to 1.5.2.0!!!!!!!!!! 1 Link to comment Share on other sites More sharing options...
TuKo Posted January 6, 2013 Share Posted January 6, 2013 I renamed all img_default to image_mytheme and Explorer now shows them. But in other browsers still no image sizes. Please, could you try adding a new image to a product and tell me if it works fine? Thanks! Link to comment Share on other sites More sharing options...
iggywebprom Posted January 6, 2013 Share Posted January 6, 2013 (edited) Please, could you try adding a new image to a product and tell me if it works fine? Thanks! Oh, no!! the path of added image is wrong ( Actually image name is wrong, right, expected Edited January 6, 2013 by iggywebprom (see edit history) Link to comment Share on other sites More sharing options...
tannerS Posted January 7, 2013 Share Posted January 7, 2013 (edited) I get this issue, I'm not an expert and my solution may be useful for the ones that replicate the default theme and customized it. I changed the folder name of my customized theme to default, worked for me, hope it's useful for you to! This versions seems to have some issues managing images, I had a minor problem updating the logo. Good Luck Thanks, that solved the missing cart picture issue for me at least in IE and firefox. Edited January 7, 2013 by Sages Outdoors (see edit history) 1 Link to comment Share on other sites More sharing options...
templatin Posted January 8, 2013 Share Posted January 8, 2013 (edited) I have got a simple solution which solved this problem in all browsers. Just follow this steps.. 1) Suppose your theme name is "river". 2) Under Back-Office > Preferences > Images, edit all image names as home_river, small_river, medium_river and so on... 3) Regenerate all the thumbnails. 4) Now edit the tpl files of your theme and change the image names. Eg. For product-list.tpl, replace the below code <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} /> by <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_river')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> I hope this will help you all. And according to me its not a bug or error by PS, they (PS) have added this feature so as to have the customized thumbnails for different themes under single PS installation. Edited January 8, 2013 by templatin (see edit history) Link to comment Share on other sites More sharing options...
webplus Posted January 8, 2013 Share Posted January 8, 2013 (edited) I have got a simple solution which solved this problem in all browsers. Just follow this steps.. 1) Suppose your theme name is "river". 2) Under Back-Office > Preferences > Images, edit all image names as home_river, small_river, medium_river and so on... 3) Regenerate all the thumbnails. 4) Now edit the tpl files of your theme and change the image names. Eg. For product-list.tpl, replace the below code <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} /> by <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_river')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> I hope this will help you all. And according to me its not a bug or error by PS, they (PS) have added this feature so as to have the customized thumbnails for different themes under single PS installation. Thanks for joining us and posting your solution. I'm aware of this approach, however as I described above, there are few issues related to this "feature": 1) it makes cloning the default theme in order to make custom changes much harder 2) theme variations now doesn't work at all because of another bug reported here http://forge.prestas.../browse/PNM-611 3) it's wasting free space on server because now the images are generated twice for each image type (unless you delete defaults) 4) using this way, you have to override each tpl file within your theme (themes/yourtheme/modules/ ) in order to make it possible to use any module where images are defined. Again bunch of extra work for developers to make their themes flexible and fully compatible. I think the installator should support overriding the default image types as it was in 1.4 I can't see any benefit in this way. What do you think? :-) Edited January 8, 2013 by webplus (see edit history) 2 Link to comment Share on other sites More sharing options...
hsyong Posted January 9, 2013 Share Posted January 9, 2013 webplus, I absolutely agree with you there. Even if I don't add custom image types or override the tpl files, my theme should be able to display the product image with the default image types and sizes. I just want to clone the default theme and make simple color changes for myself.... I don't want to be forced to override the module tpl files or create custom image types. 3 Link to comment Share on other sites More sharing options...
templatin Posted January 9, 2013 Share Posted January 9, 2013 I totally agree with webplus. But i think the PS team have some kind of idea in mind which i mentioned in previous post And according to me its not a bug or error by PS, they (PS) have added this feature so as to have the customized thumbnails for different themes under single PS installation. . 1 Link to comment Share on other sites More sharing options...
webplus Posted January 9, 2013 Share Posted January 9, 2013 (edited) I totally agree with webplus. But i think the PS team have some kind of idea in mind which i mentioned in previous post Yes I think so, but maybe they didn't realize all these issues for custom themes. I posted my comments also to bug tracker so I hope they will consider some improovements. By the way, using the custom image types, are scenes (image mapping) working OK for you (are the images visibles?) I also had to fix manufacturer-list and supplier-list where images were not visible... Still not 100% sure which way to go. I can also keep using _default image types and simply delete extra widht and height variables in all the tpl files to make it visible in IE. But the question is what Prestashop consider as best practise. If this is really change and not bug, they should announce it somewhere (e.g. blog) or update it in documentation. I didn't find it anywhere... I've spent sooooo much time on this :-( Edited January 9, 2013 by webplus (see edit history) 1 Link to comment Share on other sites More sharing options...
templatin Posted January 9, 2013 Share Posted January 9, 2013 (edited) Yes, all the custom image types are working for me and are visible in all browsers. i just followed the steps which i mentioned earlier. In fact, i am also adjusting with removing extra width and height variables from tpl to make visible in IE. Edited January 9, 2013 by templatin (see edit history) Link to comment Share on other sites More sharing options...
elena.ant.gr Posted January 10, 2013 Share Posted January 10, 2013 (edited) I get this issue, I'm not an expert and my solution may be useful for the ones that replicate the default theme and customized it. I changed the folder name of my customized theme to default, worked for me, hope it's useful for you to! This versions seems to have some issues managing images, I had a minor problem updating the logo. Good Luck I don't know why but this also worked for me! I will never thought it myself! thank you! Edit: I must say that I didn't replicated the default theme. I used a bought theme which I edited. I saw this post, I renamed the bought theme to "default" and everything worked out just like a charm! Edited January 10, 2013 by elena.ant.gr (see edit history) 1 Link to comment Share on other sites More sharing options...
iggywebprom Posted January 10, 2013 Share Posted January 10, 2013 I think we went with the wrong path probably, the problem is only in defining width and height of images in explorer, there should be some script which controls them, we must find it and to fix it there maybe. Then everything else can be default. Any ideas where is the script? 1 Link to comment Share on other sites More sharing options...
dwilden Posted January 10, 2013 Share Posted January 10, 2013 For me, is not posible rename my theme to default, because I have multistore activated and have diferent theme for each store :-( Link to comment Share on other sites More sharing options...
Porpoise Posted January 10, 2013 Share Posted January 10, 2013 (edited) Indeed! That's why this approach is totally unacceptable Edited January 11, 2013 by Porpoise (see edit history) 1 Link to comment Share on other sites More sharing options...
webplus Posted January 10, 2013 Share Posted January 10, 2013 (edited) Those who renamed folder of custom theme to default should be careful during autoupgrades (using module), otherwise Prestashop will override their files with default theme. It's only assumption, I didn't test but I guess it works like this ... Edited January 10, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
PrestaCoder.com Posted January 10, 2013 Share Posted January 10, 2013 (edited) Hi, For those who do not want to rename the theme to default or just don't want to add the images with their theme name within Prestashop back office, a quick fix can be the file attached on this post. Just upload it to /override/classes/ and you problem will get solved. :-) ImageType.php Edited January 10, 2013 by PrestaCoder.com (see edit history) 2 Link to comment Share on other sites More sharing options...
dwilden Posted January 10, 2013 Share Posted January 10, 2013 (edited) no works for me :-( I have found because prestashop dev, have add this featured... http://forge.prestashop.com/browse/PSCFV-4754 but not a good feature for most users. Edited January 10, 2013 by dwilden (see edit history) Link to comment Share on other sites More sharing options...
iggywebprom Posted January 12, 2013 Share Posted January 12, 2013 Hi, For those who do not want to rename the theme to default or just don't want to add the images with their theme name within Prestashop back office, a quick fix can be the file attached on this post. Just upload it to /override/classes/ and you problem will get solved. :-) this didn't worked for me I use names like large_default etc. in my theme. Link to comment Share on other sites More sharing options...
iggywebprom Posted January 12, 2013 Share Posted January 12, 2013 (edited) great, I made override like mentioned above by @PrestaCoder.com, just used this solution from http://www.prestasho...ost__p__1054172 - so my code is: <?php class ImageType extends ImageTypeCore { public static function getFormatedName($name) { $theme_name = Context::getContext()->shop->theme_name; $theme_name ='default'; /* only this line added to call default image type */ $name_without_theme_name = str_replace(array('_'.$theme_name, $theme_name.'_'), '', $name); //check if the theme name is already in $name if yes only return $name if (strstr($name, $theme_name) && self::getByNameNType($name)) return $name; else if (self::getByNameNType($name_without_theme_name.'_'.$theme_name)) return $name_without_theme_name.'_'.$theme_name; else return $theme_name.'_'.$name_without_theme_name; } } ImageType.php Now it all works with my default image type + no problem on uploading images Edited January 12, 2013 by iggywebprom (see edit history) 4 Link to comment Share on other sites More sharing options...
tannerS Posted January 12, 2013 Share Posted January 12, 2013 I had the same troubles when I tried changing themes, even just slightly custom themes based on the 1.5 default. For the last couple days I used a new theme from the Theme Maker site and it works perfectly. I've downloaded 3 themes from the site so far. I like the layout options, the single column index page works well with my previous layout. Pics showed with zero issues and even product pics at 245 x 245 sized very well. I only had to re-size two pics since the layout was almost the same. So just a FYI, the Theme Maker service works very well and my images showed correctly. Link to comment Share on other sites More sharing options...
anabel.co Posted January 12, 2013 Share Posted January 12, 2013 Now it all works with my default image type + no problem on uploading images I tried it and it worked in most of the modules. At the end, I decided to disable the width and height in the .tpl files. I do think its a PS issue for these smart guys to take care of. Yair Link to comment Share on other sites More sharing options...
happy Posted January 13, 2013 Share Posted January 13, 2013 (edited) #54 iggywebprom! Thank You Edited January 13, 2013 by happy (see edit history) 1 Link to comment Share on other sites More sharing options...
shacker Posted January 25, 2013 Share Posted January 25, 2013 this module solve the problem and dont need to modify core of prestashop http://catalogo-onlinersi.net/en/add-ons-prestashop-modules/402-image-fix-for-ie-prestashop.html Link to comment Share on other sites More sharing options...
ardi85 Posted January 28, 2013 Share Posted January 28, 2013 this module solve the problem and dont need to modify core of prestashop http://catalogo-onli...prestashop.html when i add to the cart has error message Link to comment Share on other sites More sharing options...
shacker Posted January 28, 2013 Share Posted January 28, 2013 what error? Link to comment Share on other sites More sharing options...
balburl Posted February 6, 2013 Share Posted February 6, 2013 I applied the image fix, but in IE the pictures are too large and blurry. Any idea how to "fix" the image fixer?!! Thanks! Link to comment Share on other sites More sharing options...
shacker Posted February 6, 2013 Share Posted February 6, 2013 site url to check it? Link to comment Share on other sites More sharing options...
balburl Posted February 6, 2013 Share Posted February 6, 2013 Hi Shacker, Thanks for the reply. Just got it corrected by adding the ImageType.php file. Thanks again! Brenda Link to comment Share on other sites More sharing options...
shacker Posted February 7, 2013 Share Posted February 7, 2013 ok Link to comment Share on other sites More sharing options...
Kiseki Posted February 9, 2013 Share Posted February 9, 2013 I've used the preferences > images method by changing the names from default_large to mytheme_large which has solved the problem in all browers, however I now have an issue that when I upload any new images they are not showing correctly as the file paths appear to be wrong, has anyone else had this issue? Cheers (my first post so be gentle please). Link to comment Share on other sites More sharing options...
jorgemartin Posted March 1, 2013 Share Posted March 1, 2013 Hi have solve this problem with the standard names and the new file ImageType.php that you can find in the prestashop github https://github.com/PrestaShop/PrestaShop/blob/master/classes/ImageType.php 2 Link to comment Share on other sites More sharing options...
zberg007 Posted March 1, 2013 Share Posted March 1, 2013 (edited) Here's how I fixed it. I applied the fix from jorgemartin (Post #66) first and nothing... so I followed it up with the post from iggywebprom (Post #54) and it worked right away. For reference... I did leave the jorgemartin post applied to the server as well. So far, so good. Thanks! Edited March 1, 2013 by zberg007 (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted March 1, 2013 Share Posted March 1, 2013 thanks for sharing Link to comment Share on other sites More sharing options...
Mike prestazilla Posted March 2, 2013 Share Posted March 2, 2013 Hi .. Developing an theme for prestashop and I want to share the solution .. This is not a mistake !!! to do to after the new template to apply the new dimensions otherwise html values are empty, especially in IE it will be noticeable. In order to apply sufficient size in the admin panel, create new values with the name of your template .. Example, if your template is called MY then create a Preferences> Images medium_my 250px - 230px Link to comment Share on other sites More sharing options...
webplus Posted March 4, 2013 Share Posted March 4, 2013 (edited) Hi .. Developing an theme for prestashop and I want to share the solution .. This is not a mistake !!! But you have to also edit all the tpl files and change the image types from _default to _my right? I believe that Prestashop introduced this feature to allow to use different themes for each store in multistore mode. But the problem is that if using the custom image types, the developer must rewrite ALL tpl files (including tpl files of all existing modules!) otherwise your theme will not work OK when your client for example install some module for which you didn't rewrite it (_default will not work). This is lots of extra work and big problem for common users who only need to make few changes in their theme. What do you think? Edited March 4, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
Mike prestazilla Posted March 5, 2013 Share Posted March 5, 2013 I agree with you what you need to rename all the pictures are not very good .. I will solve this problem on its own As soon as i have more free time .. Link to comment Share on other sites More sharing options...
webplus Posted March 6, 2013 Share Posted March 6, 2013 (edited) I agree with you what you need to rename all the pictures are not very good .. I will solve this problem on its own As soon as i have more free time .. yes, there are more related issues, for example in crossselling module the image name is hardcoded into themename_medium so medium_my will probably not work here. There is another bug that the suffix can't be more than 4 characters - medium_my works but medium_mytheme not. Images for theme variations doesn't work as well, due to another related bug (directory name of variations are not exported correctly). All / most of these issues were reported so I hope Prestashop will improove the feature in next release. I'm using _default untill it's improoved and I delete widht/height attributes in tpl files to fix IE. This has disadvantage that _default types can't be overwriten by theme installer so user must change them manually. I noticed that some developers already use medium_my or just medium, some use _default etc. There probably isn't approach which would work 100% in 1.5.3.1 version. It would be usefull if Prestashop team publish some official recommandation for using image preferences, after making such major change. Edited March 6, 2013 by webplus (see edit history) Link to comment Share on other sites More sharing options...
Mike prestazilla Posted March 6, 2013 Share Posted March 6, 2013 Yes, I also now have to shorten the name of the new theme .. It's not very nice with a long name .. Let's hope that the prestashop team will do the job picture is 100% in the next version Link to comment Share on other sites More sharing options...
tannerS Posted March 7, 2013 Share Posted March 7, 2013 As I've said before on the forums, I had the same issues with images using various themes for 1.5 that where "free". I had to rename the theme file to default etc. It must be a theme issue in my case, because when I use one from the Theme Maker site, the images show correctly, the theme works with no tweaks. Theme Maker shows the images correctly site wide and it does not use the default image sizes either. I have not tried multi-shop mode though. Link to comment Share on other sites More sharing options...
Pramus Posted March 8, 2013 Share Posted March 8, 2013 (edited) I've been looking for days and cannnot find a solution please someone help, my array in the images is missing a subfolder, then no image is showing anywhere, all arrays are coming from <imgsrc="{$link->getImageLink($product.link_rewrite......However it ios translating into the site url and the subfolders, but missing the IMG subfolder that comes between the root and the categories or product, or what ever else. Defines_uri.inc.php, config.php, and other config files have been checked, there seems to be no issue in the definitions. anyone can help? anyone with the same issue? img array is http://photo.kolevski.co.uk/520-large_default/building-in-building.jpg should be http://photo.kolevski.co.uk/img/520-large_default/building-in-building.jpg It got fixed one I changed arrays for the ones in my old prestashop1.1 theme strange but true Edited March 12, 2013 by Pramus (see edit history) Link to comment Share on other sites More sharing options...
Setu Posted April 2, 2013 Share Posted April 2, 2013 Hi, For those who do not want to rename the theme to default or just don't want to add the images with their theme name within Prestashop back office, a quick fix can be the file attached on this post. Just upload it to /override/classes/ and you problem will get solved. :-) it worked for me , and for that i had buy a cute theme from u , was cheap and super nice . ty Link to comment Share on other sites More sharing options...
shoulders Posted July 26, 2013 Share Posted July 26, 2013 (edited) try this solution , it worked for me http://www.prestasho...ost__p__1101141 Edited July 26, 2013 by shoulders (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts