vekia 8,966 Posted August 23, 2013 Posted August 23, 2013 make sure that you've got image defined under the preferences > images tab in your back office Share this post Link to post Share on other sites
bitmess 0 Posted August 23, 2013 Posted August 23, 2013 Vekia - I know where to configure images in the back office but which image are you referring to? Sorry for my ignorance Bitmess Share this post Link to post Share on other sites
vekia 8,966 Posted August 23, 2013 Posted August 23, 2013 you need to define / change image named "large" if this image type doesnt exist on your list there, you have to define it. Share this post Link to post Share on other sites
bitmess 0 Posted August 23, 2013 Posted August 23, 2013 I have large_default Is this the same? Thanks Bitmess Share this post Link to post Share on other sites
vekia 8,966 Posted August 23, 2013 Posted August 23, 2013 nope, "large_default" isn't the same. You have to define this image type (large) and then - regenerate thumbnails for this image type 1 Share this post Link to post Share on other sites
bitmess 0 Posted August 23, 2013 Posted August 23, 2013 nope, "large_default" isn't the same. You have to define this image type (large) and then - regenerate thumbnails for this image type Perfect, You saved me again Thank you! Share this post Link to post Share on other sites
bitmess 0 Posted August 24, 2013 Posted August 24, 2013 Is there any way to make this module sort the categories alphabetically? Share this post Link to post Share on other sites
vekia 8,966 Posted August 24, 2013 Posted August 24, 2013 $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT c.*, cl.* FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE level_depth > 1 And level_depth < 3 AND c.`active` = 1 AND cg.`id_group` = '.$id_group.' ORDER BY `level_depth` ASC, c.`position` ASC'); change c.`position` ASC to cl.`name` ASC 1 Share this post Link to post Share on other sites
mzelecom 0 Posted September 3, 2013 Posted September 3, 2013 hi i wanted to change medium image to large. i changed homecategories.tpl but not work. after that i delete all line in homecategories.tpl file and see that it worked i think that it must not work. please help me to change medium image. ??????? Share this post Link to post Share on other sites
vekia 8,966 Posted September 3, 2013 Posted September 3, 2013 can you show what you changed exactly and why "it doesnt work?" you've got some error messages? Share this post Link to post Share on other sites
vankata.be 7 Posted September 23, 2013 Posted September 23, 2013 A LOT.. of people can find their solution if they have will to read and understand, not only wait for someone to help them. Instead of posting same questions again and again, read this: http://www.prestashop.com/forums/topic/121735-free-module-homepage-categories-module/?view=findpost&p=1158460 Share this post Link to post Share on other sites
zoomtronic 2 Posted October 21, 2013 Posted October 21, 2013 still any solution to display subcategories? Share this post Link to post Share on other sites
Microame 1 Posted October 24, 2013 Posted October 24, 2013 A LOT.. of people can find their solution if they have will to read and understand, not only wait for someone to help them. Instead of posting same questions again and again, read this: http://www.prestashop.com/forums/topic/121735-free-module-homepage-categories-module/?view=findpost&p=1158460 Hi Vankata, Thanks for your solution. Could you please share the end result? Thanks Share this post Link to post Share on other sites
vankata.be 7 Posted November 7, 2013 Posted November 7, 2013 Hi Vankata, Thanks for your solution. Could you please share the end result? Thanks Hi there! The website where you an see the module working is http://crewstockings.com Share this post Link to post Share on other sites
Microame 1 Posted November 7, 2013 Posted November 7, 2013 Thanks Vankata, looks Great. Share this post Link to post Share on other sites
Soumya Swain 0 Posted November 23, 2013 Posted November 23, 2013 i am using prestashop 1.5.5.0 hook not work in backend.plz help me.......... Share this post Link to post Share on other sites
vekia 8,966 Posted November 24, 2013 Posted November 24, 2013 hook not work in backend can you shed some more light on this please? what you exactly mean by "hook not work in backend" ? Share this post Link to post Share on other sites
ekomiejsce 0 Posted November 25, 2013 Posted November 25, 2013 (edited) Hi, i've got a problem with order of the category images. I want them to be sorted by ID (or position in Prestashop categories section) of category (ascending). Everything is fine except for that first three categories are in the last row. How can i fix it? Here is a link to my website: http://ekomiejsce.com/ And homecategories.php : SELECT c.*, cl.* FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE level_depth > 1 And level_depth < 3 AND c.`active` = 1 AND cg.`id_group` = '.$id_group.' ORDER BY `level_depth` ASC, c.`position` ASC'); Anyone has an idea how to fix it? Regards Edited November 25, 2013 by ekomiejsce (see edit history) Share this post Link to post Share on other sites
PeteFF 1 Posted December 17, 2013 Posted December 17, 2013 Hi Have installed and edited module and all works well with one exception. I have 2 rows of 4 columns and want to increase the spacing between the rows, anyone have any suggestions? Thanks Share this post Link to post Share on other sites
vekia 8,966 Posted December 17, 2013 Posted December 17, 2013 Hi Have installed and edited module and all works well with one exception. I have 2 rows of 4 columns and want to increase the spacing between the rows, anyone have any suggestions? Thanks if your website is online - please share url it will be helpfull in this case due to the fact that this is related to css styles. Share this post Link to post Share on other sites
PeteFF 1 Posted December 18, 2013 Posted December 18, 2013 Hi Site can be found here http://fotograaf-noord-brabant.com Thanks 1 Share this post Link to post Share on other sites
vekia 8,966 Posted December 18, 2013 Posted December 18, 2013 in module directory you've got homeceategories.css file there is a code: div.home_categories li { float: left; position: relative; width: 240px; } you can add there padding param, then you will increase spacing 1 Share this post Link to post Share on other sites
PeteFF 1 Posted December 18, 2013 Posted December 18, 2013 It worked a treat............ Thank you Share this post Link to post Share on other sites
PeteFF 1 Posted December 21, 2013 Posted December 21, 2013 Hey Just one more thing I cant figure out.............. How to increase the spacing between the photos and the Titles, if someone could assist please? http://fotograaf-noord-brabant.com Thanks Share this post Link to post Share on other sites
vekia 8,966 Posted December 21, 2013 Posted December 21, 2013 you can use this simple code: .ajax_block_category a {margin-top:10px!important; display:block;} where the margin-top:10px; is a value of spacing 1 Share this post Link to post Share on other sites
PeteFF 1 Posted December 21, 2013 Posted December 21, 2013 As always, worked perfectly, thanks................ and Merry Christmas Share this post Link to post Share on other sites
FrenchMaster 30 Posted December 23, 2013 Posted December 23, 2013 Hello I installed the module on my shop www.tabakado.net unfortunately, I get all categories doubled. I think the problem comes from the multishop function that is activated (I have 2 shops) How can I define the Shop ID in the php code ? Thank you for your help and Happy Christmas to all ! 1 Share this post Link to post Share on other sites
PeteFF 1 Posted December 23, 2013 Posted December 23, 2013 After installing the free module homecategories ( which i highly recommend as a great module) is it possible to have a different picture on the actual category page than is displayed on the home page? Home page http://fotograaf-noord-brabant.com/ Wanting to display a different picture at top of this page http://fotograaf-noo...en/9-huisdieren Thanks Share this post Link to post Share on other sites
vekia 8,966 Posted December 24, 2013 Posted December 24, 2013 this module displays category cover image, the same file as you uploaded in category definition page in back office. unfortunately, there is no feature to upload different picture. you can modify category.tpl file (remove there code for display image) and in category edit page you can add picture in description. it will appear on page you mentioned Share this post Link to post Share on other sites
petr.muller 1 Posted January 1, 2014 Posted January 1, 2014 I have updated this module so that you dont need to alter any core modules and have also added CCC compatibility for prestashop v1.4. There is now a css file that contains all the formatting for the module. Images are currently set to display at 100px x 100px, but that is easily changeable by altering the css at lines 3,4 + 6. Also if any wants to provide translations, send them to me or post them here and i will update the module. Module updated v1.2 - Uploadable through the modules import on back-office. Category titles added. Css included in the module folder and NOT in themes/css/module/homecategories folder. Positioning improved (thanks to @itsallgood ) Module updated v.1.3 - Compatible with Prestashop v1.5.* Note: You will need to uninstall the old module first and then upload the new module and reinstall it to update the module on your server. homecategories for v1.4.zip homecategories for v1.5.zip For better ordering (if you make your ordering in 1.5.6, than you need my modification) please use this select in file "homecategories.php": $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT c.*, cl.* FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) LEFT JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category`) WHERE level_depth > 1 And level_depth < 3 AND c.`active` = 1 AND cg.`id_group` = '.$id_group.' ORDER BY `level_depth` ASC, cs.`position` ASC'); 1 Share this post Link to post Share on other sites
Soumya Swain 0 Posted January 7, 2014 Posted January 7, 2014 i am using prestashop 1.5.5.0 hook not work in backend.plz help me.......... Share this post Link to post Share on other sites
Soumya Swain 0 Posted January 7, 2014 Posted January 7, 2014 i am using prestashop version 1.5.5 i con not edit header dropdown menu like flipkart.com header menu... plz.help me....kindly Share this post Link to post Share on other sites
vekia 8,966 Posted January 7, 2014 Posted January 7, 2014 and how it is related to homepge categories module? Share this post Link to post Share on other sites
PeteFF 1 Posted January 18, 2014 Posted January 18, 2014 Hi Is it possible to hide a specific category from the module whilst still displaying in top menu? Pete Share this post Link to post Share on other sites
Ph4razon 0 Posted January 20, 2014 Posted January 20, 2014 This module is avalaible for PS 1.5.6.1 ? Best regards! Share this post Link to post Share on other sites
PeteFF 1 Posted January 21, 2014 Posted January 21, 2014 Anyone able to help? Share this post Link to post Share on other sites
hzolika 0 Posted January 23, 2014 Posted January 23, 2014 (edited) Anyone able to help? {foreach from=$categories item=category name=homeCategories} {if $category.id_category != 32} {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)} <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}"> <div> <a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}-large_default.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /></a> </div> <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> </li> {/if} {/foreach} Hi Pete, Add the highlighted lines to homecategories.tpl. Replace 32 with the category's ID you don't want to appear. Sorry, code doesn't highlight, it's the 2nd and the last but one line, with the IF. Edited January 23, 2014 by hzolika (see edit history) Share this post Link to post Share on other sites
hzolika 0 Posted January 23, 2014 Posted January 23, 2014 This module is avalaible for PS 1.5.6.1 ? Best regards! Yes, it works fine on 1.5.6.1 Share this post Link to post Share on other sites
PeteFF 1 Posted January 24, 2014 Posted January 24, 2014 Thx, worked perfect Share this post Link to post Share on other sites
Kouros 0 Posted January 26, 2014 Posted January 26, 2014 thank you for module! But on my site, this module does not work properly. Module shifted to the left. How to place it in the middle? http://steel-and-style.ru/ Share this post Link to post Share on other sites
vekia 8,966 Posted January 26, 2014 Posted January 26, 2014 increase width of div.home_categories li element (to width:123px;) 1 Share this post Link to post Share on other sites
Kouros 0 Posted January 26, 2014 Posted January 26, 2014 increase width of div.home_categories li element (to width:123px;) thank you wary mutch!) im chenge different sizes, bat not 123 px) how do you calculate it? Share this post Link to post Share on other sites
Epuyao 3 Posted February 6, 2014 Posted February 6, 2014 Hi! Sorry, i'm learning english. I installed the module., But does not show categories. Once, I installed it and it worked fine, but then uninstalled it. Today I installed it but it says: No Categories. Note: I have not made any changes to module's code Share this post Link to post Share on other sites
vekia 8,966 Posted February 6, 2014 Posted February 6, 2014 maybe it's related to some caching problems, try to clear cache in your shop (adv. paramters > performance tab) Share this post Link to post Share on other sites
Epuyao 3 Posted February 6, 2014 Posted February 6, 2014 Thanks for your reply Vekia,Ready, I cleared the cache (adv. paramters > performance tab), but now disappeared categories = ONow I can not create categories. Disappeared in the category tree, I can not see the category Home. Attach a image. PLEASE!!!! HELP ME! Share this post Link to post Share on other sites
vekia 8,966 Posted February 6, 2014 Posted February 6, 2014 it's definitely not default behaviour in prestashop. have you changed something in catalog categories tree? also, when you click on [+] do you see subcategories? Share this post Link to post Share on other sites
Epuyao 3 Posted February 6, 2014 Posted February 6, 2014 Thanks for your reply, again. . 1 - I have not changed anything in the categories tree. 2.- when I click on (+) I can't see categories. This occurred when I cleaned the cache Share this post Link to post Share on other sites
vekia 8,966 Posted February 6, 2014 Posted February 6, 2014 more than strange. you've got cache ON? if so, try to disable it and also turn on force compile under adv. paramters > performance tab in your bo Share this post Link to post Share on other sites
Epuyao 3 Posted February 7, 2014 Posted February 7, 2014 Hey Vekia, After disabling the cache, force compilation, and sleep 8 hours xD, I can create categories. But not displayed in BO. However, in FO I can see the category created, in the module Home Categories too. When I want to create a category, I can see categories tree: Example: - Home |- Category 1 But, not displayed in BO. What can I do? Share this post Link to post Share on other sites
Epuyao 3 Posted February 11, 2014 Posted February 11, 2014 Hi, Now, I'm re-creating the categories tree. Homecategories Module is working fine, but in landing page, show an error: Warning: Function addCSS() is deprecated in /home/xxxx/public_html/store/modules/homecategories/homecategories.php on line 34in /home/xxxx/public_html/store/classes/Tools.php on line 2137 Somebody help me? Share this post Link to post Share on other sites
Epuyao 3 Posted February 13, 2014 Posted February 13, 2014 Hello? Share this post Link to post Share on other sites
vekia 8,966 Posted February 13, 2014 Posted February 13, 2014 Hi, Now, I'm re-creating the categories tree. Homecategories Module is working fine, but in landing page, show an error: Warning: Function addCSS() is deprecated in /home/xxxx/public_html/store/modules/homecategories/homecategories.php on line 34 in /home/xxxx/public_html/store/classes/Tools.php on line 2137 Somebody help me? this is only internal prestashop message, it doesn't cause any "crash" problems, turn off error reporting, and this message will disappear this message means that your module isn't fully compatibile with 1.5 version (it just uses old method to include css files) but in fact, old method also works in 1.5. Share this post Link to post Share on other sites
Epuyao 3 Posted February 13, 2014 Posted February 13, 2014 Hey Vekia, you're a good man! +10 pts. Thanks for everything. See you! Share this post Link to post Share on other sites
Revy94 0 Posted February 24, 2014 Posted February 24, 2014 Hi, i have a problem with the module, the images of the categories are smaller than they had to be and i want to hide the category name, is this possible? Thanks! Share this post Link to post Share on other sites
bleede 0 Posted February 25, 2014 Posted February 25, 2014 Hi, I faced with a problem. I have installed this module, but as I create a category and upload an image it doesnt show any images on the homepage. It should show these categories images, but instead it shows like this (what could be the problem?) : Share this post Link to post Share on other sites
Epuyao 3 Posted February 25, 2014 Posted February 25, 2014 Hi, I faced with a problem. I have installed this module, but as I create a category and upload an image it doesnt show any images on the homepage. It should show these categories images, but instead it shows like this (what could be the problem?) : Hi, Sorry for my english. This issue happens because homecategories.tpl refers to incorrect image category folder. Please check this: in .../modules/homecategories/homecategories.tpl <!-- MODULE Home categories --> <div class="home_categories"> <h2>{l s='Categories' mod='homecategories'}</h2> {if isset($categories) AND $categories} <ul> {foreach from=$categories item=category name=homeCategories} {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)} <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}"> <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> </li> {/foreach} </ul> {else} <p>{l s='No categories' mod='homecategories'}</p> {/if} <div class="cr"></div> </div> <!-- /MODULE Home categories --> Around, line 9: <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> This line refers image category. In my case, I changed this: {$category.id_category}-large.jpg -------> {$category.id_category}.jpg I just eliminated -large.jpg Try it! I hope that you could understand me. 1 Share this post Link to post Share on other sites
bleede 0 Posted February 25, 2014 Posted February 25, 2014 Hi, Sorry for my english. This issue happens because homecategories.tpl refers to incorrect image category folder. Please check this: in .../modules/homecategories/homecategories.tpl <!-- MODULE Home categories --> <div class="home_categories"> <h2>{l s='Categories' mod='homecategories'}</h2> {if isset($categories) AND $categories} <ul> {foreach from=$categories item=category name=homeCategories} {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)} <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}"> <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> </li> {/foreach} </ul> {else} <p>{l s='No categories' mod='homecategories'}</p> {/if} <div class="cr"></div> </div> <!-- /MODULE Home categories --> Around, line 9: <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> This line refers image category. In my case, I changed this: {$category.id_category}-large.jpg -------> {$category.id_category}.jpg I just eliminated -large.jpg Try it! I hope that you could understand me. It helped. Now everything works properly, thanks Share this post Link to post Share on other sites
Revy94 0 Posted February 26, 2014 Posted February 26, 2014 Can someone help me? i have a problem with the module, the images of the categories are smaller than they had to be and i want to hide the category name, is this possible? Thanks! Share this post Link to post Share on other sites
Epuyao 3 Posted February 26, 2014 Posted February 26, 2014 Hey Revy94, 1.- Can you attach a screenshot of the module? or show the url of your store. 2.- Do you want hide the categorie's name and show only categorie's image? Share this post Link to post Share on other sites
Revy94 0 Posted February 26, 2014 Posted February 26, 2014 (edited) The url is www.promore.it/shop Yes i want to show pictures and hide the names Edited February 26, 2014 by Revy94 (see edit history) Share this post Link to post Share on other sites
Epuyao 3 Posted February 27, 2014 Posted February 27, 2014 (edited) Hey Revy, I'm sorry for late answer 1.- To change image size, set values in css file. div.home_categories img{width:100px;height:100px} div.home_categories li{float:left;margin:5px;width:100px;height:130px;} div.home_categories h5 a:hover{text-decoration:underline;color:#444} div.home_categories div{width:100px;border:1px outset black} 2.- To show pictures and hide names, try it: In homecategories.tpl delete next line: <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> Try it! Edited February 27, 2014 by Epuyao (see edit history) Share this post Link to post Share on other sites
mfsilva 0 Posted February 28, 2014 Posted February 28, 2014 Great module. Works perfectly. But (there's always a 'but') what if I have too many categories and wish to implement some sort of Ajax pagination? Would that be possible? Share this post Link to post Share on other sites
thejackal 3 Posted March 5, 2014 Posted March 5, 2014 hi i have a problem get duplicated categories To solve the duplicate categories showing up in multi-shop configurations, modify in /modules/homecategories/homecategories.php: Replace function hookHome($params) { global $smarty, $cookie, $link; $id_customer = (int)$params['cookie']->id_customer; $id_group = $id_customer ? Customer::getDefaultGroupId($id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_; $id_lang = (int)$params['cookie']->id_lang; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT c.*, cl.* FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE level_depth > 1 And level_depth < 3 AND c.`active` = 1 AND cg.`id_group` = '.$id_group.' With function hookHome($params) { global $smarty, $cookie, $link; $shop_id = (int)$this->context->shop->id; $id_customer = (int)$params['cookie']->id_customer; $id_group = $id_customer ? Customer::getDefaultGroupId($id_customer) : _PS_DEFAULT_CUSTOMER_GROUP_; $id_lang = (int)$params['cookie']->id_lang; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS(' SELECT c.*, cl.* FROM `'._DB_PREFIX_.'category` c LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$id_lang.') LEFT JOIN `'._DB_PREFIX_.'category_group` cg ON (cg.`id_category` = c.`id_category`) WHERE level_depth > 1 And level_depth < 3 AND c.`active` = 1 AND cg.`id_group` = '.$id_group.' AND cl.`id_shop` = '.$shop_id.' 3 Share this post Link to post Share on other sites
isi09 0 Posted March 13, 2014 Posted March 13, 2014 I'd like to move it to the center. any idea¿ thx Share this post Link to post Share on other sites
rjanic 1 Posted March 20, 2014 Posted March 20, 2014 (edited) This module is working on version 1.6 ? I think not Edited March 20, 2014 by rjanic (see edit history) 1 Share this post Link to post Share on other sites
chochocho 3 Posted March 23, 2014 Posted March 23, 2014 I hope it will be working for 1.6 1 Share this post Link to post Share on other sites
xtended02 0 Posted March 25, 2014 Posted March 25, 2014 Hi, firstly thanks for a great module and its free too ! I'm a newbie to prestashop and sorry for probably overlooking the answer in the umpteen pages beforehand but I just dont understand it. I am using 1.5.4 but the images come out as question marks on the home page but display correctly on the next page after selection. Here is my url http://xtended.co.uk Click on the amor capelli category and you will see the image displays ok, I just want the same image on the home page. I know I'm probably doing something wrong. Please help. Thanks again for your patience. Colin Share this post Link to post Share on other sites
Epuyao 3 Posted March 25, 2014 Posted March 25, 2014 Hi! Uhhmmmm.....Please, can you paste the code of homecategories.tpl here? Share this post Link to post Share on other sites
xtended02 0 Posted March 25, 2014 Posted March 25, 2014 Hi, took me a while to find the .tpl file, I did say I was a newbie lol. Here it is : <!-- MODULE Home categories --><div class="home_categories"> <h2>{l s='Categories' mod='homecategories'}</h2> {if isset($categories) AND $categories} <ul> {foreach from=$categories item=category name=homeCategories} {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)} <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}"> <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> </li> {/foreach} </ul> {else} <p>{l s='No categories' mod='homecategories'}</p> {/if} <div class="cr"></div></div><!-- /MODULE Home categories --> Thanks for assisting. Colin Share this post Link to post Share on other sites
Epuyao 3 Posted March 25, 2014 Posted March 25, 2014 Hey colin, Try it, <!-- MODULE Home categories --> <div class="home_categories"> <h2>{l s='Categories' mod='homecategories'}</h2> {if isset($categories) AND $categories} <ul> {foreach from=$categories item=category name=homeCategories} {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)} <li class="ajax_block_category {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}"> <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> <a href="{$categoryLink}" title="{$category.legend}">{$category.name|truncate:35}</a> </li> {/foreach} </ul> {else} <p>{l s='No categories' mod='homecategories'}</p> {/if} <div class="cr"></div> </div> <!-- /MODULE Home categories --> Around, line 9: <div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><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> This line refers image category. In my case, I changed this: {$category.id_category}-large.jpg -------> {$category.id_category}.jpg I just eliminated -large.jpg Try it!!! 1 Share this post Link to post Share on other sites
xtended02 0 Posted March 25, 2014 Posted March 25, 2014 Hiya Epuyao Thanks for the swift response. It worked perfectly. Thank you so much for your help. Its much appreciated. Kind Regards Colin Share this post Link to post Share on other sites
Epuyao 3 Posted March 25, 2014 Posted March 25, 2014 Great!!!!!!! You're welcome Share this post Link to post Share on other sites
xtended02 0 Posted March 26, 2014 Posted March 26, 2014 I have three more queries and then I'm done I think - sorry but I'm new to this but learning fast ! 1. I want to change the category titles to capitals. Where do I change that and what do I change? 2. I want to change the text colour from the default grey to another colour. How do I do that please? 3. The category titles are too close underneath the image. How can I increase the gap between them? Thanks for your help as always. Kind regards Colin Share this post Link to post Share on other sites
xtended02 0 Posted March 28, 2014 Posted March 28, 2014 Anyone out there who can help please ? Thank you. Share this post Link to post Share on other sites
mfsilva 0 Posted March 28, 2014 Posted March 28, 2014 I have three more queries and then I'm done I think - sorry but I'm new to this but learning fast ! 1. I want to change the category titles to capitals. Where do I change that and what do I change? 2. I want to change the text colour from the default grey to another colour. How do I do that please? 3. The category titles are too close underneath the image. How can I increase the gap between them? Thanks for your help as always. Kind regards Colin Hi, here are the answers to your questions: First of all, look for the global.css file of your theme. 1. Search for the line responsible for adjusting the links and add "text-transform:uppercase;"; 2. On the same line you should see that it sets the color, changing that info it should alter the title color; 3. Open the file homecategories.css and search for the line 6. Over there you can add a "margin-bottom:5px;" and it should be enough; Hope it helps. Share this post Link to post Share on other sites
xtended02 0 Posted March 29, 2014 Posted March 29, 2014 Hi mfsilva, Many thanks for your help. Took me a while to do it but its working well. Thanks again Share this post Link to post Share on other sites
karlobrien 0 Posted March 31, 2014 Posted March 31, 2014 Hi All, I have been using this module on 1.5 but I need to build a 1.6 shop.. anyone know is this will work? It install ok but it doesn't display right.. it overlaps with other modules below it. Share this post Link to post Share on other sites
Epuyao 3 Posted March 31, 2014 Posted March 31, 2014 Hey!!! I'm not sure that it work perfectly on 1.6, but I saw this web: 'http://xtended.co.uk/' and apparently works ok. 1 Share this post Link to post Share on other sites
dmg286 0 Posted April 7, 2014 Posted April 7, 2014 Hi , thanks for good module, I wan to have categories in home page with picture, and when you click one category you see subcategories with pictures, if it's possible how to translate in persian. Share this post Link to post Share on other sites
Oktay 7 Posted April 7, 2014 Posted April 7, 2014 Thanks Share this post Link to post Share on other sites
1RONMAN© 1 Posted April 9, 2014 Posted April 9, 2014 (edited) Hi everybody! First of all, thanks for a good module. I've used this module with 1.5.x versions, and it's 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) Share this post Link to post Share on other sites
1RONMAN© 1 Posted April 9, 2014 Posted April 9, 2014 (edited) Update for my last post. I've found that when I use this code: <div><a href="{$categoryLink}" title="{$category.legend}" class="categoryImage"><img src="{$link->getCatImageLink($category->id_image, 'category_default')|escape:'html':'UTF-8'}" /></a></div> Images are not shown, but I found one thing, chrome dev tools show error 404 for images and link look like this: ../yoursite/img/c/category_default.jpg But it should look like this: ../yoursite/c/12-category_default/category_name.jpg Don't know what to do. I'm just a noob in Prestashop development..)) But maybe it'll be helpful for those who know how it works and what to do..) Edited April 9, 2014 by 1RONMAN© (see edit history) Share this post Link to post Share on other sites
vicef 0 Posted April 10, 2014 Posted April 10, 2014 Hello, I'm using prestashop 1.5.6.2 and I tried to install this interesting module. However, I get a repetition of these errors. I use a purchased template, but this can not cause the error I suppose. My site is not online yet but on localhost. I have cleared the cache repeatedly, both in back end as manually bu deleting the files in the cache folder. But this does not help. Is there somebody who could help me out? Thanks Vicef Errors: Undefined index: legend in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 54PHP Notice: Undefined index: categorySize in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 59PHP Notice: Trying to get property of non-object in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 59PHP Notice: Undefined index: categorySize in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 60PHP Notice: Trying to get property of non-object in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 60PHP Notice: Undefined index: legend in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 63PHP Notice: Undefined index: legend in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 54PHP Notice: Undefined index: categorySize in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 59PHP Notice: Trying to get property of non-object in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 59PHP Notice: Undefined index: categorySize in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 60PHP Notice: Trying to get property of non-object in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 60PHP Notice: Undefined index: legend in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 63PHP Notice: Undefined index: legend in C:\inetpub\wwwroot\loulechien_ps\cache\smarty\compile\c2\a7\e6\c2a7e69bc817dafa48ae092c28aa454559e913d9.file.homecategories.tpl.php on line 54 Share this post Link to post Share on other sites
1RONMAN© 1 Posted April 12, 2014 Posted April 12, 2014 First of all try to activate default template and install the module again. Share this post Link to post Share on other sites
flamaster 3 Posted April 23, 2014 Posted April 23, 2014 Hi, I'm looking for home categories to prestashop v1.6. If You have, could You attach here ? 1 Share this post Link to post Share on other sites
Rich Walker 3 Posted April 29, 2014 Posted April 29, 2014 (edited) Hello folks If you are still having a problem with images. Download the attached tpl and upload it into the homecategories folder & your pictures will work. HERE Edited April 29, 2014 by Rich Walker (see edit history) 1 Share this post Link to post Share on other sites
KevinNash 119 Posted April 29, 2014 Posted April 29, 2014 Can you explain what you did in this tpl please ? Share this post Link to post Share on other sites
Rich Walker 3 Posted April 29, 2014 Posted April 29, 2014 Sure open the tpl file and look at line 9. <a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}-medium_default.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /></a> Swap the code that is in bold above to the image name ( you can find this under Preferences - > Images ) Make sure you have Categories enable for that name. If you have it will work. If it doesn't, enable it and then hit Regenerate Thumbnails. Shout if you need anything else 1 Share this post Link to post Share on other sites
KevinNash 119 Posted April 29, 2014 Posted April 29, 2014 Thank you very much for the explanation Share this post Link to post Share on other sites
cloudsidea 0 Posted May 13, 2014 Posted May 13, 2014 Hello. First let me say thank you for your module - HOMEPAGE CATEGORIES. I instaled this module in PrestaShop™ 1.6.0.6 . But the images from CATEGORIES doesn't show, is there something in the homecategories.tpl that I need to change to be compatible. You can view a preview here:http://cloudsidea-design.com/fbi-store/index.php. Thank you. Cloudsidea Share this post Link to post Share on other sites
Nash64 2 Posted May 15, 2014 Posted May 15, 2014 Hi, I have a problem.Multistore turned on and display a duplicated categories.Has anyone had this problem? How to fix it?Thank you!! Share this post Link to post Share on other sites
frenchbench 0 Posted May 30, 2014 Posted May 30, 2014 Hello. Thank you for the great module. I installed version 1.5 and it works great. I have one question: How do I change the order in which categories are displayed on the front page? They are in correct order on the top nav menu and at the back end all categories set in correct order, but they are not displayed that way on the home page. Thanks a lot for your help. Share this post Link to post Share on ot
Recommended Posts