Whispar1 Posted February 7, 2013 Share Posted February 7, 2013 (edited) Prestashop 1.5.3.1 Is there a way to have two different images for categories? 1) One for sub-category view (150x150) 2) One for main category view (in my case 150x750) Fore reference you can view subcategory 150x150 here: http://69.36.191.225/index.php?id_category=6&controller=category Then click on Pillows and throws for 150x750 category image Edited February 7, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 8, 2013 Share Posted February 8, 2013 Don't really know what you mean Whispar1. Best to take a screen shot and make that look like what you want. It would help. Link to comment Share on other sites More sharing options...
Whispar1 Posted February 8, 2013 Author Share Posted February 8, 2013 (edited) Thanks Bill. Okay, here are two screens. Main Pillow Category with 150x750 category image: http://69.36.191.225...ws-category.jpg Pillow listed as sub-category under Home Decor: http://69.36.191.225...ub-category.jpg I am assuming that what I need is to be able to add a secondary image in the BO for the category Pillows (for example) One image 150x750 for the Pillow Page and a separate image 150x150 that shows when viewing it as a sub-category under the Main category Home Decor. Attached are two sample images for the pillow category. One for the 150x750 banner and one for the 150x150 sub-category image. Does this make better sense? Edited February 8, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 8, 2013 Share Posted February 8, 2013 I'm not usually this slow, and perhaps its just me, but I still have no idea what you want. But lets get back to this in a minute. I'm looking at this page, and you have something funky happening with your images. http://69.36.191.225/index.php?id_category=7&controller=category The images with the "New" overlay appear to be about 138 X 140, but if you right click and save they are actually 500 x 500. This is increasing your download and bandwidth unnecessarily. So you need to track that problem down. Basically your setting for images in the category view is set to 500 x 500, but your theme is resizing the display of the images and that is very inefficient. No back to what you want to do. You want to do what? Link to comment Share on other sites More sharing options...
yaniv14 Posted February 8, 2013 Share Posted February 8, 2013 Hi Whispar, You are getting it wrong, in the demo's you send there is one image for each category. that image is being resized in back office for different dimensions (category, sub-category... more like small,medium..etc) In the 1st example that you sent, the Pillows and throw is a category that placed inside another category, in this case 'Home Decor Collections'. which sort of make it a Sub-Category.... but where you go inside the so called sub-category you get the cateegory main page where you have the items related to that category. so.... if the category have more categories inside it will show them has thumbnails with smaller images all of this is standard in Prestashop. If you look at the pillows and throws you will see that the small (sub-category) image is identical to the big (category) image, of course beside the size. I hope I'm cleared with that. 2 Link to comment Share on other sites More sharing options...
Whispar1 Posted February 8, 2013 Author Share Posted February 8, 2013 First, the scaled image thing. I fully understand this and on my static site I do not serve scaled images. That being said, with PrestaShop, you are only given one option in the BO for product images. Therefore I uploaded the larger version 500x500 (the one that is actually seen on the actual product page with the zoom function). I don't like this scaling at all with Prestashop. You can only upload one image size, then Prestashop scales that image for whatever category it falls under. For example in the demo store: Default Demo Store: http://demo-store.prestashop.com/en/ Look at the Visconti Evening Gown on the front page: Under featured the image is 126x126 On product page its 252x252 The zoom image is 534x534 Thumbnail is 58x58 Unless I am really stupid or blind, the image is getting scaled somewhere because you can't enter an image of the correct size for every single instance in which it will appear??? Link to comment Share on other sites More sharing options...
Whispar1 Posted February 8, 2013 Author Share Posted February 8, 2013 (edited) Hi Whispar, You are getting it wrong, in the demo's you send there is one image for each category. that image is being resized in back office for different dimensions (category, sub-category... more like small,medium..etc) In the 1st example that you sent, the Pillows and throw is a category that placed inside another category, in this case 'Home Decor Collections'. which sort of make it a Sub-Category.... but where you go inside the so called sub-category you get the cateegory main page where you have the items related to that category. so.... if the category have more categories inside it will show them has thumbnails with smaller images all of this is standard in Prestashop. If you look at the pillows and throws you will see that the small (sub-category) image is identical to the big (category) image, of course beside the size. I hope I'm cleared with that. hello yaniv Yes, I do understand what is happening - that is why I am trying to find a way to change that. I am not a developer but something like: If category displayed- use image 1 (like first example) if sub-category displayed - use image 2 (like second example) It does no good to have a thumbnail on the subcategory that you can not see. Edited February 8, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 8, 2013 Share Posted February 8, 2013 This is a time saving feature. Not a bug. First, you can create as many sizes that are needed. You then change your theme/module to display the size you want to use. What is happening right now with the current setup has nothing to do with Prestashop. This is the way all shopping carts handle images. Besides ... if the shopping cart did not make the various sizes you need, then you would need to make them yourself. And you still can. After you enter an image, PS generates the images, but after that you can replace that image, just use the same name as used by PS. Adjust your theme/module to display and you can have exactly what you want. I think yaniv14 explained it very well, let me know if that matched what you want to do. 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 8, 2013 Share Posted February 8, 2013 This page here, http://69.36.191.225...roller=category Is it displaying the way you want? Other than the image sizes? Link to comment Share on other sites More sharing options...
Whispar1 Posted February 8, 2013 Author Share Posted February 8, 2013 This page here, http://69.36.191.225...roller=category Is it displaying the way you want? Other than the image sizes? I think we are missing each other. And I confess, my transformation from static to eCommerce is killing me and probably getting in the way of me grasping what you two are trying to help with :\ Yes that page is how I want it to look. That is not the problem. The problem is the subcategory thumbnail If you go back to the pillows: http://69.36.191.225/index.php?id_category=11&controller=category The image is fine. But pillows as a subcategory of Home Decor http://69.36.191.225/index.php?id_category=6&controller=category I get why is it scaling. I thought the only workaround for that would be to have a separate image for the sub-category view. Now, with regarding to the very valid scaling issue you brought up... Where would I adjust the theme/module to display image1 at size1, then image1 at size2, image1 at size3, etc... I thought everything was controlled by the tpl pages and function calls and little squirrels... I am very good with html/css- the rest not so much... can you tell? Link to comment Share on other sites More sharing options...
Whispar1 Posted February 8, 2013 Author Share Posted February 8, 2013 (edited) Maybe the light is turning on for me. Attached is a screen of the ftp directory for the pillow category image. The source code for the main category image is this: http://<img src="http://69.36.191.225/img/c/11-category_default.jpg" alt="Pillows & Throws" title="Pillows & Throws" id="categoryImage" width="" height=""> The source code for the same image but on the sub-category page is this: <img src="http://69.36.191.225/img/c/11-medium_default.jpg" alt="" width="" height=""> So I go to my server and pull over 11-medium_default.jpg changed the image and reuploaded it with the same file name. And it works: http://69.36.191.225...roller=category I now have a different, non-scaled image that you can actually see. Is this the correct method for doing this? It is not so bad for the category pics because there are only two instances where they show up and I only have 8-12 sub-categories. However, is this how its done for products too? This seems rather tedious if I have to go in and change each one of them for however many hundreds of products we will be stocking. And while we are on the subject of images (taking the product #64 from the screen shot) The image names are not very SEO friendly. The original image I uploaded in the BO is called duvet-belgravia-white1.jpg but the keywords in the name are not carrying over to the various image versions (64-home_default.jpg , etc...) Additionally, the width/height/alt attributes are not passing through either... why might that be? Edited February 8, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 Lets use this cat as an example, http://69.36.191.225/index.php?id_category=6&controller=category As you have discovered your category is using medium_default. Go to your Preferences > Images and change the size from 500 x 500 to 150 x 150 then scroll down the page until you see Regenerate thumbnails. You will need to Regenerate your thumbnails. Hopefully that will take care of that. Please let me know. It should end up looking the same, but the images should be the correct size. You may need to clear cache site and browser. Link to comment Share on other sites More sharing options...
Whispar1 Posted February 9, 2013 Author Share Posted February 9, 2013 Thanks for the help Bill. Here is a screen of my BO The medium_default is already set at 150x150 Defaults shown in the screenie are defaults for the theme. The only one two I changed last week were: medium_default (was 58x58 - changed to 150x150) category_default (was 150x500 - changed to 150x750) I regenerated thumbnails after changing these and cleared my cache. Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 The images are now the correct 150 x 150. So all is well that ends well. However, this page is using something else, and it is using home_default for its images, http://69.36.191.225/index.php?id_category=7&controller=category Link to comment Share on other sites More sharing options...
Whispar1 Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) Bill - Wanna log into my shop manager and see what is going on? LOL Now the 11-medium_default.jpg that worked flawlessly has somehow now been overwritten with the category default image I'm going to get my towel and throw it in... Edited February 9, 2013 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 Whispar1, this page, cat 7 uses a control that allows for a grid and list view. http://69.36.191.225/index.php?id_category=7&controller=category All your other cat pages do not have that control, for example cat 6 http://69.36.191.225/index.php?id_category=6&controller=category This is the way your theme is designed, it has nothing to do with PS. You just need to contact your theme designer and ask them why they created cat 7 the way they did. At the same time I'd explain to them what you want it to look like and instead of throwing a towel at them, throw a few bucks and move forward. Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 Ok, I think I just figured out the problem you were describing but I wasn't getting. When you enter a Category header image, The big one at the top, your theme uses that same image for the small image on a category list page, which is completely useless ... is that correct? If so, again, this is bad "theme" design. Link to comment Share on other sites More sharing options...
Whispar1 Posted February 9, 2013 Author Share Posted February 9, 2013 Yeah well that is part of the problem. I have tried contacting the developer with these questions and have heard nothing. That was five days ago. Got plenty of responses before the sale. But so far, support has been non existent. I am assuming the examples you gave.... cat 7 is for a page that has no sub-categories and cat 6 is for a page with sub-categories (based on the menu navigation) I still don't understand why image attributes are not transferring to the images url (alt, width, height) but I guess that is a topic for another thread. Thanks Bill - I appreciate the effort. Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 You have a real nice theme, these problems can be easily and quickly fixed. I'll PM you the name of the person I turn to when my time costs more than the problem. Link to comment Share on other sites More sharing options...
Whispar1 Posted February 9, 2013 Author Share Posted February 9, 2013 Bingo - that is exactly what I was trying to say in the beginning - just didn't do a very good job of it. It is useless. That is why I took the 11-medium_default.jpg version of the header image (which what renders on the subcategory page) put a different image in its place, kept the file 11-medium_default.jpg and uploaded that back into the image folder. It worked but after a thumbnail regeneration and cache clear, its now back to the same useless image.... Link to comment Share on other sites More sharing options...
Bill Dalton Posted February 9, 2013 Share Posted February 9, 2013 Yeah, keep a copy of the image file structure on your hard drive, keep only your replaceable images in that. If you ever regenerate thumbnails, you then just need to upload your copy and that quickly and efficiently replaces your custom images. Link to comment Share on other sites More sharing options...
Recommended Posts