Marie18 Posted February 2, 2013 Share Posted February 2, 2013 (edited) Hello, I need your help please. I have just upgraded my website from 1.4.7.0 to 1.5.3.1 and i have a problem with the images mapping. In back office "catalog/image mapping", i can see the pictures. BUT when i see my website, it is doesn't work (( Can somebody help me please ? Thanks Edited March 9, 2013 by Marie18 (see edit history) Link to comment Share on other sites More sharing options...
Marie18 Posted February 3, 2013 Author Share Posted February 3, 2013 help !!! pleaseeee !!!! Link to comment Share on other sites More sharing options...
perusi Posted February 20, 2013 Share Posted February 20, 2013 lol... prestashop boys done it again ...check out the Height and Width of the Scenes... they are ZERO, because the scene names were changed again Link to comment Share on other sites More sharing options...
Marie18 Posted February 24, 2013 Author Share Posted February 24, 2013 (edited) Thank you Perusi ! i have changed the height & width of the scenes on scenes.tpl and it works ! THANK YOU VERY MUCH !!! Edited February 25, 2013 by Marie18 (see edit history) Link to comment Share on other sites More sharing options...
peeke Posted March 1, 2013 Share Posted March 1, 2013 lol... prestashop boys done it again ...check out the Height and Width of the Scenes... they are ZERO, because the scene names were changed again Perusi, where do I have to change this? Link to comment Share on other sites More sharing options...
Anoushka Posted March 3, 2013 Share Posted March 3, 2013 Perusi, where do I have to change this? Look for the following rule: <div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url(img/scenes/{$scene->id}-large_scene.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$smarty.foreach.scenes.first} display:none;{/if}"> Replace it with your scene images height and width Link to comment Share on other sites More sharing options...
Marie18 Posted March 8, 2013 Author Share Posted March 8, 2013 (edited) Great ! Thanks Edited March 9, 2013 by Marie18 (see edit history) Link to comment Share on other sites More sharing options...
obewanz Posted April 15, 2015 Share Posted April 15, 2015 (edited) Where are the following variables set? $largeSceneImageType.height$largeSceneImageType.width I just upgraded from 1.5.6.2 to 1.6.0.11 (forced to because of theme) and now my scenes are not being displayed... I am getting a value of 710 for the width when viewed in my chrome elements inspector, but the following code is produced: <div id="scenes"> <div> <div class="screen_scene" id="screen_scene_12" style="background:transparent url(/img/scenes/12-large_scene_default.jpg); height:px; width:px; "> </div> </div> </div> FIXED!! Ok, in /controllers/front/CategoryController.php the values above are pulled as an array from the db... the problem was - my theme was using this code: <div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url({$base_dir}img/scenes/{$scene->id}-large_scene_default.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$smarty.foreach.scenes.first} display:none;{/if}"> for the image (notice the large_scene_default.jpg string?) well the controller uses ImageType::getFormatedName('scene') to assign the information to the variable which means the array assumes the scene name will be scene_default.jpg or scene.jpg... NOT large_scene_default.jpg as the theme was looking for. I changed the theme code (since it will likely not be upgraded as often - I hope) to match the default core db value scene_default... but it would be nice if the controller would pull the filename from the database field [name] in table ps_image_type table instead of being hardcoded... or at least provide a warning in the admin panel that changing this will break the code - since it is simple to change in the admin panel. This fix is truly NOT ideal - but I call what prestashop has done here a "kludge"... this should be part of the API structure and the file name should not be hardcoded into the controller - it should be called from the db as outlined above, either that or make this variable non-changeable and document that in the API documents... oh wait - there is no API document - well.... Edited April 15, 2015 by obewanz (see edit history) Link to comment Share on other sites More sharing options...
obewanz Posted April 15, 2015 Share Posted April 15, 2015 (edited) Look for the following rule: <div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url(img/scenes/{$scene->id}-large_scene.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$smarty.foreach.scenes.first} display:none;{/if}"> Replace it with your scene images height and width Edit the scenes.tpl file and replace the above code line with this... <div class="screen_scene" id="screen_scene_{$scene->id}" style="background:transparent url(img/scenes/{$scene->id}-scene_default.jpg); height:{$largeSceneImageType.height}px; width:{$largeSceneImageType.width}px; {if !$smarty.foreach.scenes.first} display:none;{/if}"> ...also make sure in your admin panel [preferences/images] setting that the name for the large scene file is "scene_default" and it will work without hardcoding the image dimensions. (see my other post in this thread) Edited April 15, 2015 by obewanz (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