babyewok Posted June 18, 2010 Share Posted June 18, 2010 I would like to be able to show a different image for the category page and another for when it is listed as a subcategory. For example, you would go to the clothing category and "women" would be listed as a subcategory (image 1), when you click on "women" to open that category, you would see different image (image 2) at the top of the page, rather than the same one.Currently, you can only upload one image to a category. If you choose an image of a wide product, then this looks good at the top of the category, but in the subcategory picture (which is square) it gets reduced to a tiny size.I would like to keep the sub category pictures as a square, so there's no easy way out there. As a last resort, I could disable the image at the top of a category so that images are specifically picked to look good at a small size.I figure if I can somehow change the back office to allow two images to be uploaded to a category - one for subcategory pics and one for the main pic and then edit the category page to show the first pic for the main pic and the second as the subcategory pic......all very well said and done, except I have no idea how to do any of this!!Can anyone help? Link to comment Share on other sites More sharing options...
rocky Posted June 19, 2010 Share Posted June 19, 2010 This can be done using image mapping. Upload the image you want to be the category's thumbnail under Catalog > Category > Edit, then go to Catalog > Image mapping, upload the bigger image you want for the category, then link it to the category. Link to comment Share on other sites More sharing options...
babyewok Posted June 19, 2010 Author Share Posted June 19, 2010 And once again you come to my rescue rocky - thankyou! Link to comment Share on other sites More sharing options...
rocky Posted June 19, 2010 Share Posted June 19, 2010 You're welcome. Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
gbaby Posted June 25, 2010 Share Posted June 25, 2010 I'm trying to do this with 1.2.4. Is it possible? I don't see any where to link the category to the image map. I can't figure out how to activate it. When I upload a picture I get the screen below. There's no info to link it to a category, etc.I'd like to do the same as this guy: http://www.prestashop.com/forums/viewthread/43972/integration/subcategory_image__thumbnail_on_category_page___different_heading_image_on_subcat_page/ Link to comment Share on other sites More sharing options...
bartman Posted June 25, 2010 Share Posted June 25, 2010 this is prestashop quirk, upload your image then save, after doing this go back in and edit again, you can then assign the category to the image, why you can not do it all in one go, I do not know Link to comment Share on other sites More sharing options...
gbaby Posted June 25, 2010 Share Posted June 25, 2010 That didn't work. You can see in the screen-shot I don't even have a "save" button. It says "update successful" but there's no image uploaded on the screen nor any of the map details such as link to category.ETA. It does work in 1.2.4 as it works in my test cart. Does anyone know what files the Image Mapping uses? I tried AdminScenes but it didn't make a difference. Link to comment Share on other sites More sharing options...
rocky Posted June 26, 2010 Share Posted June 26, 2010 Do you have problems uploading product images too? Your server configuration may be preventing PrestaShop from uploading images. You are right that it is admin/tabs/AdminScenes.php that contains the code for the image mapping tab. Link to comment Share on other sites More sharing options...
gbaby Posted June 26, 2010 Share Posted June 26, 2010 I have no problems uploading pictures for products. Does it call any other files that I could double-check? Link to comment Share on other sites More sharing options...
rocky Posted June 26, 2010 Share Posted June 26, 2010 The only thing I can think of is to check that img, img/scenes and img/scenes/thumbs directories have chmod 755 permissions (or 777 on older servers). Link to comment Share on other sites More sharing options...
gbaby Posted June 30, 2010 Share Posted June 30, 2010 The images are uploaded in my directory but in my BO there is no image (as seen in screenshot above).Any one what other files I could check other than Adminscenes? Link to comment Share on other sites More sharing options...
gbaby Posted June 30, 2010 Share Posted June 30, 2010 OK, I figured out that I didn't have the table ps_scene_category . Does anyone know the SQL prompt to create this table? Thanks in advance and thanks Rocky, I can see you're a great help to many by all your posts! Link to comment Share on other sites More sharing options...
rocky Posted July 1, 2010 Share Posted July 1, 2010 I'm not sure why that table is missing from your database. The SQL query to create the table is in install/sql/db.sql: CREATE TABLE `PREFIX_scene_category` ( `id_scene` int(10) unsigned NOT NULL, `id_category` int(10) unsigned NOT NULL, PRIMARY KEY (`id_scene`,`id_category`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; and the SQL query to insert the default scene category data is in install/sql/db_settings_extends.sql: INSERT INTO `PREFIX_scene_category` (`id_scene`, `id_category`) VALUES (1, 2),(2, 2),(3, 4); Change PREFIX to your database prefix in these queries. Link to comment Share on other sites More sharing options...
gbaby Posted July 1, 2010 Share Posted July 1, 2010 You're right Rocky, that didn't work either... I'm completely stumped. Link to comment Share on other sites More sharing options...
gbaby Posted July 7, 2010 Share Posted July 7, 2010 Argh, you know what it was? After many, many hours of playing around with code I realized that my image name was large-scene instead of large_scene. Duh! It works now 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