1RONMAN© Posted April 9, 2014 Share Posted April 9, 2014 (edited) Hi everybody! I've used this module from jhnstcks which shows categories at homepage as a grid with 1.5.x versions, and it was great, but at 1.6 everything works, except images. I think that there might be some kind of a problem with code, but I don't know where it can be. Please help! I think this line of code need to be edited, it's around line 18 in homecategories.tpl: <div><a href="{$categoryLink}" title="{$category.legend}" class="categoryImage"><img src="{$img_cat_dir}{$category.id_category}-large.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /></a></div> basically I think that we should change this: <img src="{$img_cat_dir}{$category.id_category}-large.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> to smth like this (I found this in category.tpl from 1.6): url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) 0 bottom no-repeat; background-size:contain; min-height:{$categorySize.height}px; It's around line 48, here's the full part: <!-- Category image --> <div class="content_scene_cat_bg" {if $category->id_image}style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) 0 bottom no-repeat; background-size:contain; min-height:{$categorySize.height}px;" {/if}> I tried to do it in a few ways, but it's not working. I'm not really understand what I'm doing, so... Any help would be hugely appreciated! Edited April 9, 2014 by 1RONMAN© (see edit history) Link to comment Share on other sites More sharing options...
1RONMAN© Posted April 12, 2014 Author Share Posted April 12, 2014 (edited) Okay, I've partially solved this issue with a help of another module. Basically I found module which works but shows categories as a list, without a grid. I'm modifying it at the moment so that it can show them as a grid. I'll post a link here when I'll finish it. Update: grid works. Now I'm trying to make it responsive. Edited April 18, 2014 by 1RONMAN© (see edit history) 1 Link to comment Share on other sites More sharing options...
Scott J Posted July 8, 2014 Share Posted July 8, 2014 How did you go with this 1RONMAN© ? I am trying to do the same in ps1.6 , as I am sure many other people are. 1 Link to comment Share on other sites More sharing options...
vekia Posted July 8, 2014 Share Posted July 8, 2014 i maffraid that "large" imagetype doesnt exist. it's necessary to change it to some other that exist under preferences > images (images for category) Link to comment Share on other sites More sharing options...
kandykidd Posted August 28, 2014 Share Posted August 28, 2014 Replace your homecategories.tpl img line with this <img src="/c/{$category.id_category}-medium_default/{$category.id_category}-large.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> 1 Link to comment Share on other sites More sharing options...
marco78 Posted September 12, 2014 Share Posted September 12, 2014 kandykidd in home page this module wont display category thumbs neither with your fix, have you other suggests? Link to comment Share on other sites More sharing options...
kandykidd Posted September 12, 2014 Share Posted September 12, 2014 kandykidd in home page this module wont display category thumbs neither with your fix, have you other suggests? Can i see your shop? Link to comment Share on other sites More sharing options...
marco78 Posted September 12, 2014 Share Posted September 12, 2014 (edited) that's my preview: http://www.italia-ecommerce.it/psh/index.php ---------------- 17:20 - I think i've solved: watching the html code i saw the images filename pe. "6-large.jpg" while inside the path directory i found the same file called:"6-large_default.jpg" so i changed homecategories.tpl in the images row <img src="{$img_cat_dir}{$category.id_category}-large_default.jpg" (adding only default) thank you Edited September 12, 2014 by marco78 (see edit history) 1 Link to comment Share on other sites More sharing options...
kandykidd Posted September 12, 2014 Share Posted September 12, 2014 Try to modify your homecategories.tpl img line with this --> <img src="/img/c/{$category.id_category}.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> 1 Link to comment Share on other sites More sharing options...
marco78 Posted September 29, 2014 Share Posted September 29, 2014 (edited) Hi, in prestashop 1,5 i've istalled homepage category module, it allow to upload a single image for each category, this ìmage will be the home page thumb for this category but when will open the category page appear the same squared image (think is called scene header image or something similar) i thought to edit admin page for category so i could upload 2 or more images for category, but the second step will be to create mysql table for the second largest image and allow the category tpl to fit this image in top (just under the menu) i've searched in forum and found only similar requests without answers- could someone help me thanx see related post http://www.prestashop.com/forums/topic/162609-displaying-images-on-category-page-and-custom-thumbnails/ as in joomla or wordpress when article images are uploaded they will be resized/cropped for article preview, while the same image is wide open reading the full article - uploadning in prestashop will not in the categoty page (scene?) Edited September 29, 2014 by marco78 (see edit history) Link to comment Share on other sites More sharing options...
Scott J Posted October 1, 2014 Share Posted October 1, 2014 Topic name is " HomeCategories in 1.6" !!!Hi, in prestashop 1,5 i've istalled homepage category module, Link to comment Share on other sites More sharing options...
marco78 Posted October 1, 2014 Share Posted October 1, 2014 sorry scott, i was searching suggestions, not picky teachers barking whenever small mistake. enjoy you the forum Link to comment Share on other sites More sharing options...
Recommended Posts