Jump to content
jhnstcks

[Free Module] Homepage Categories Module

Recommended Posts

I don't think your problem is related to that module, it just show your category on homepage, nothing else.

 

In my opinion, this module has nothing to do with enabled/disabled products ;)

Share this post


Link to post
Share on other sites

hello

 

what can i do to stop the module from displaying product marked as out of stock?

 

thanks

 

The module display categorys, not the products ;)

Share this post


Link to post
Share on other sites

Hi jhnstcks,

This is a good module ,

But thus these have disable and enable option for categories.

 

Thank you

Share this post


Link to post
Share on other sites

Hi,

These is a good module but can i show the qunatity of products in that category on the image.

Share this post


Link to post
Share on other sites

hi

Is there a chance to display the number of products(count) in these module.

Can any one please help me out

Share this post


Link to post
Share on other sites

Hello, and thanks for this great module.
I want to change the size of the category titles and separate image . how could I do this.

I read in the forum

. ajax_block_category the { margin - top : 10px ! important ; display: block ; }

but not to put it .

thank you

Share this post


Link to post
Share on other sites

Really thanks for this module it was very usefull for me.

 

I've made some changes to fit with prestashop 1.6 and with my own desires. maybe anyone will like this way of showing categories:

Thre columns of image categories. Actually is not responsive, but you just need to add media Queries to CSS.

 

TPL:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

<!-- MODULE Home categories -->
<div class="home_categories">    
    {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.iteration is div by 3} last_column{/if} {if $smarty.foreach.homeCategories.first}first_item{elseif $smarty.foreach.homeCategories.last}last_item{else}item{/if}">
                    <a href="{$categoryLink}" title="{$category.legend}" class="category_image">                                          
                         <img src="{$img_cat_dir}{$category.id_category}.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />                         
                        <div class="category-name">
                            <h2>{$category.name|truncate:35}</h2>
                        </div>
                    </a>

                </li>
            {/foreach}
            </ul>
    {else}
        <p>{l s='No categories' mod='homecategories'}</p>
  {/if}
    <div class="cr"></div>
</div>
<!-- /MODULE Home categories -->

 

CSS:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

div.home_categories {
    margin-top: 15px;    
}
div.home_categories .cr {
    clear: both;
    border: 0px none
}
div.home_categories ul {
    text-align:center;
    list-style:none
}
div.home_categories li {
    float: left;
    margin-right: 5%;
    margin-bottom: 30px;
    width: 30%;
    height: 245px;
    position: relative;
}
div.home_categories li.last_column {    
    margin-right: 0;    
}
div.home_categories a {    
    position: relative;
    color: #333333;
}
div.home_categories img {
    max-width: 100%;
    height: auto;
    opacity: 0.8;
}
div.home_categories img:hover {
    opacity: 1;
}
div.home_categories .category-name {    
    position: absolute;
    left: 0px;
    width: 100%;
    text-align: center;
    top: -20px;
}
div.home_categories .category-name h2 {    
    padding: 10px 20px;
    border-bottom: 1px solid #333333;    
    margin: auto;
    width: 70%;
}
 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Thanks for your help!!

Share this post


Link to post
Share on other sites

Hello,

 

I've updated the module for PS1.6, using ergates css and made it responsive with media queries: 3 columns and only one column for mobile.

CSS and code can be improved, do not hesitate to do it and share.

homecategories_for_PS1.6.zip

Edited by jolvil (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

Thank you for this module. I'm using PS1.6 version and it's working ok. One problem: it looks like if CSS module doesn't exist (I see categories as a vertical list, with no column) could you help me?

Could you also please tell me how to change the categories order? I don't need a specific order, I would like to avoid random appearance.

Thank you very much

Edited by Piemant (see edit history)

Share this post


Link to post
Share on other sites

I modified the code for version 1.6.0.9 which is attached below.

 

 - the categories are arranged according to the arrangement of the back-office.

 - shadow effect when you hover the category

 - responsive

 

The changes are made after reading all the posts. So, thank you all! 

 

 

post-535628-0-88103800-1418650384_thumb.png

homecategories_v1.6.0.9.zip

  • Like 2

Share this post


Link to post
Share on other sites

Hi

Thanks for this module.

Is there anyway to show categories at the bottom of slider and top of "featured products and new products"?

this module loads in "displayHome" position at the bottom of "featured products" and "new products"

Share this post


Link to post
Share on other sites

I modified the code for version 1.6.0.9 which is attached below.

 

 - the categories are arranged according to the arrangement of the back-office.

 - shadow effect when you hover the category

 - responsive

 

The changes are made after reading all the posts. So, thank you all! 

 

Hi, thanks for upgrading for v1.6. Can you help me with css? How to make category icons centered about the content? As you can see in screenshot all icons displaced to left. This is clearly seen on mobile view. If I move them to the right they begin to move down to the next line.

post-541242-0-95594400-1421839082_thumb.png

Share this post


Link to post
Share on other sites

Hi friends, thanks for the module and updates!!! I just have one question: how can I make the module to show only the SUB-categories from a specific SUB-category??

 

For example, the main (root) category is 'Products', where all the products and sub-categories are listed, then comes the sub-category 'Seeds' and then many sub-categories inside 'Seeds'. I want the module to show only the sub-categories that are inside the sub-category Seeds. I took a look at the php file and had read all the thread but can't realize what changes i need to make. Thanks

Edited by reinoplantae (see edit history)

Share this post


Link to post
Share on other sites

Hi

Thanks for this module.

Is there anyway to show categories at the bottom of slider and top of "featured products and new products"?

this module loads in "displayHome" position at the bottom of "featured products" and "new products"

 

Same question here. Does anybody has the answer to the above question? I've tried to change the code of the .php file to alter the hooks. 

Share this post


Link to post
Share on other sites

Helle everyone, i want to know how to modify the module to display sub-categories instead of categories.

Anyone knows how to de that?

Share this post


Link to post
Share on other sites

Same question here. Does anybody has the answer to the above question? I've tried to change the code of the .php file to alter the hooks. 

Hello,

got the same problem. I also change the code, but when i hook it , the categories are shown in one column. Any help will be appreciated.

Share this post


Link to post
Share on other sites

Great module! But...

 

How can I make category images display? They are setup and showing correctly in the back end.

 

Site: http://forestcomputers.co.uk/

 

Runnig Prestashop 1.6.0.11 standard template

Thanks!

Hello,

did you change homecategories.tpl from this:

div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}-medium.jpg" alt="{$category.name}" title="{$category.name}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}"></a></div>

 

to this:

div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}.jpg" alt="{$category.name}" title="{$category.name}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}"></a></div>

Share this post


Link to post
Share on other sites
Hello everyone and sorry for my bad English.

I installed the module, cute, just what I wanted, but I can not display images of the categories despite having made the change to the file homecategories.tpl also would like to know if it is possible to display only certain categories and not all, or only categories mothers and not categories daughters.

thanks to all

Share this post


Link to post
Share on other sites

 

Hello everyone and sorry for my bad English.
I installed the module, cute, just what I wanted, but I can not display images of the categories despite having made the change to the file homecategories.tpl also would like to know if it is possible to display only certain categories and not all, or only categories mothers and not categories daughters.
thanks to all

 

Hello,

if you can't change homecategories.tpl then try to rename the image files like *-medium.jpg, or whatever is in the tpl file. About displayin' categories maybe someone else can help you, because on my web it only displays categories, not subcategories. Here you can see how it's looks like - http://elsoft2001.com/index.php - bottom of the page.

If you want i can send you my homecategories.tpl

Sorry for my english too :)

Share this post


Link to post
Share on other sites

My home homecategories.tpl already had the mod from installation.

It looks like this:

========================================                                  
                
               <!-- 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}.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />                         
               </div>
                <p></p>
                <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 -->
                </li>

         {/foreach}
            </ul>
    {else}
        <p>{l s='No categories' mod='homecategories'}</p>
  {/if}
    <div class="cr"></div>

</div>

<!-- /MODULE Home categories -->

===============================================================

 

Still - no category images showing.

 

Thanks for all your replies!

Share this post


Link to post
Share on other sites

Had a look in Firefox Inspect:

 

Category image file in the category listing is looking at is different to what the category header looks at (once opened)?Once Category is clicked on  - the image appears.

 

Please see attached screenshots. screenshot1 - categories list, incategory - with actual category displayed.

 

Any help much appreciated

 

 

post-949958-0-89688000-1427143562_thumb.png

post-949958-0-60684300-1427143605_thumb.png

Share this post


Link to post
Share on other sites

Had a look in Firefox Inspect:

 

Category image file in the category listing is looking at is different to what the category header looks at (once opened)?Once Category is clicked on  - the image appears.

 

Please see attached screenshots. screenshot1 - categories list, incategory - with actual category displayed.

 

Any help much appreciated

Hello,

your tpl looks like good. Please delete content of /cache/smarty/compile and /cache/smarty/cache. DO NOT DELETE index.php in the folders compile and cache, only folders and other content. Then go to backoffice - Preferences - Images and regenerate thumbnails. Hope this helps. 

Share this post


Link to post
Share on other sites

And one question from me. Can anyone tell me how to change the title Categories to whatever i need. I try to follow the instruction from a previous (4 or 5 page) post with ID.php but nothing happens.

Thanks

Share this post


Link to post
Share on other sites

pr0m1nd

 

You're a hero!

 

IT WORKS!

 

Deleted cache(s) and regenerated thumbnauils as you said - -and all working now!

 

Thank you!

Share this post


Link to post
Share on other sites
emptied the chace and regenerate thumbnails now everything works .... or better .... I see the images of the categories but have multiplied

But how do I do if I wanted to choose which categories to show ??

Or better yet, maybe it's easier, how come I see all categories? both mothers daughters ??

HELP ME

Edited by Colli (see edit history)

Share this post


Link to post
Share on other sites

pr0m1nd

 

You're a hero!

 

IT WORKS!

 

Deleted cache(s) and regenerated thumbnauils as you said - -and all working now!

 

Thank you!

Glad to help you. :)

Share this post


Link to post
Share on other sites

 

emptied the chace and regenerate thumbnails now everything works .... or better .... I see the images of the categories but have multiplied
But how do I do if I wanted to choose which categories to show ??
Or better yet, maybe it's easier, how come I see all categories? both mothers daughters ??
HELP ME

 

Hello,

please refer to post on ckarone https://www.prestashop.com/forums/topic/121735-free-module-homepage-categories-module/page-8?do=findComment&comment=1037925 for showing both categories and subcategories. I don't think there is any way to select which category to display but if you want you can disable them and they will dissappear from the list.

Share this post


Link to post
Share on other sites
Hello everyone, I'm back here.

I fixed some things regarding subcategories, say that I was wrong in what I had long ago adjusted the various categories by disabling some and not others .... I fixed it, now I like, that's correct, I only displays categories mothers and not daughters but ..... each category shows me 4 times, why? solved this should be ok

Share this post


Link to post
Share on other sites

 

Hello everyone, I'm back here.
I fixed some things regarding subcategories, say that I was wrong in what I had long ago adjusted the various categories by disabling some and not others .... I fixed it, now I like, that's correct, I only displays categories mothers and not daughters but ..... each category shows me 4 times, why? solved this should be ok

 

Are you using multishop?

Share this post


Link to post
Share on other sites

I wanted to try it once, and I played a bit with the settings but did not activate it definitely and without a second site, the MultiShop is set to no

Share this post


Link to post
Share on other sites

I wanted to try it once, and I played a bit with the settings but did not activate it definitely and without a second site, the MultiShop is set to no

Can you provide a link to your web to see what's happen' exactly.

Share this post


Link to post
Share on other sites
Hello, I disabled everything because it was aesthetically ugly, just want you to take a look and I'll reactivated, just answer the post so as not to leave it too long the site in less than optimal conditions.

thank you very much

Share this post


Link to post
Share on other sites

 

Hello, I disabled everything because it was aesthetically ugly, just want you to take a look and I'll reactivated, just answer the post so as not to leave it too long the site in less than optimal conditions.
thank you very much

 

Sorry but i can't understand your post. In this moment i can't help you with the problem because i can't see the problem. If you provide a link to your webpage, maybe me or other guy can find the problem.

Thanks :)

Share this post


Link to post
Share on other sites

try to look  my site

www.otticacolli.it

Hello,

i can't see the module. Did you disable it? Please enable module to see what happens.

Share this post


Link to post
Share on other sites

hello, try again

 

Hello,

i can't see the module. Did you disable it? Please enable module to see what happens.

 

hello, try again

Share this post


Link to post
Share on other sites

hello, try again

 

 

hello, try again

Hello,

why don't you try to uninstall it and install it again. I try to replicate your problem on my webpage but unsuccesfully. Have you change module .php file? There is a strange (maybe not closed) div. Please check it and correct it. Maybe this will fix it.

Share this post


Link to post
Share on other sites

Hello, I reinstalled the form yesterday to publish it and make you take a look, I have made no changes, however, I try to take a look at the php file hoping not to do damage :)


this is my file .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}.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />                                                                                                 </div>                <p></p>
                <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 -->

Share this post


Link to post
Share on other sites

Hello, I reinstalled the form yesterday to publish it and make you take a look, I have made no changes, however, I try to take a look at the php file hoping not to do damage :)

As you see there is unclosed div somewhere in the file. I hope correcting it will resolve the problem. Maybe someone else could find smth else.

Share this post


Link to post
Share on other sites

 

Hello, I reinstalled the form yesterday to publish it and make you take a look, I have made no changes, however, I try to take a look at the php file hoping not to do damage :)

this is my file .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}.jpg" alt="{$category.name}" title="{$category.name}" class="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />                                                                                                 </div>                <p></p>
                <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 -->

 

Did you remove the cache?

Share this post


Link to post
Share on other sites
Ok, I put your files, emptied the cache, but the problem is still there, I see more than one image in the same category!

the fact that you do not see the picture is normal, I removed I

Share this post


Link to post
Share on other sites

 

Ok, I put your files, emptied the cache, but the problem is still there, I see more than one image in the same category!
the fact that you do not see the picture is normal, I removed I

 

Can you paste your homecategories.css please.

Share this post


Link to post
Share on other sites
div.home_categories{ margin-bottom: 5px}

div.home_categories .cr{ clear: both; border: 0px none}div.home_categories ul{ text-align:center; list-style:none }

div.home_categories img{ width:150px; height:150px }

div.home_categories li{ float:left; position: relative; margin:5px; margin-bottom: 40px; width:155px; height:155px; font-size: 17px; font-weight: bold;}

div.home_categories h5 a:hover{ text-decoration:underline; color:#F1B50E}

div.home_categories div{ width:152px; border:1.7px outset #5B5B5B}

div.home_categories div:hover{ -moz-box-shadow: 0 0 12px #5B5B5B; -webkit-box-shadow: 0 0 12px #5B5B5B; box-shadow: 0 0 12px #5B5B5B; }

Share this post


Link to post
Share on other sites

 

Ok, I put your files, emptied the cache, but the problem is still there, I see more than one image in the same category!
the fact that you do not see the picture is normal, I removed I

 

Nice. Now looks better. I try to make your problem on my web but i cant. Keep looking.

Share this post


Link to post
Share on other sites

Nice. Now looks better. I try to make your problem on my web but i cant. Keep looking.

practically everything is correct and should work ..... ..... right?

Share this post


Link to post
Share on other sites

practically everything is correct and should work ..... ..... right?

Right. I can't find where the problem is. Maybe someone else from the guys could help. :)

Share this post


Link to post
Share on other sites

practically everything is correct and should work ..... ..... right?

We can try else. I can send you my .tpl .php and .css files to replace yours to see what will happen.

Share this post


Link to post
Share on other sites

We can try else. I can send you my .tpl .php and .css files to replace yours to see what will happen.

ok, give it to me as well, you want to email them to me or write here?

Share this post


Link to post
Share on other sites

ok, give it to me as well, you want to email them to me or write here?

Provide me an email to send you the files.

Share this post


Link to post
Share on other sites

I put your files, something has changed but still seeing double categories

Share this post


Link to post
Share on other sites

I put your files, something has changed but still seeing double categories

Did you clean the cache and regenerate thumbnails after putting my files? Try.

Share this post


Link to post
Share on other sites

I put your files, something has changed but still seeing double categories

I think smth messed up with the categories. Maybe You can try to delete them and recreate it.

Share this post


Link to post
Share on other sites

I put your files, something has changed but still seeing double categories

Also, when i change the language from it to en, the categories are messed. In it version everything seems ok, but in en version in first cat appear one VISTA about 10 times. Maybe there is your problem somewhere.

Share this post


Link to post
Share on other sites

Also, when i change the language from it to en, the categories are messed. In it version everything seems ok, but in en version in first cat appear one VISTA about 10 times. Maybe there is your problem somewhere.

If I try to change the language from Italian to English are always double .... I do not understand, I emptied the cache and regenerate the thumbnails but nothing
I do not want to delete and re-create the categories, I have over a thousand articles available on the site and others not available, I am afraid to do harm

Share this post


Link to post
Share on other sites

Hello,

 

I've installed the module in my prestashop 1.6, but i cant see any category on home page. Its seems that the module dont appear.

Share this post


Link to post
Share on other sites

Hello,

 

I've installed the module in my prestashop 1.6, but i cant see any category on home page. Its seems that the module dont appear.

Hello,

do you have any categories created? Check if the module is enabled.

Share this post


Link to post
Share on other sites

Hello,

i still can't change the title of the module. Any help will be appreciated.

Thanks

I found the way. Thanks :)

Edited by pr0m1nd (see edit history)

Share this post


Link to post
Share on other sites

When I install this It disappears in the module list...

 

Any Advice??

Maybe problem with install. Any errors when install the module?

Share this post


Link to post
Share on other sites

Hi 

 

This module show my categories, but only title, not image, although i set image in category back office.

 

This module have configuration in back office ?

Share this post


Link to post
Share on other sites

Hi 

 

This module show my categories, but only title, not image, although i set image in category back office.

 

This module have configuration in back office ?

Hello,

did you change homecategories.tpl from this:

div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}-medium.jpg" alt="{$category.name}" title="{$category.name}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}"></a></div>

 

to this:

div><a href="{$categoryLink}" title="{$category.legend}" class="category_image"><img src="{$img_cat_dir}{$category.id_category}.jpg" alt="{$category.name}" title="{$category.name}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}"></a></div>

Share this post


Link to post
Share on other sites

This file is in theme/modules directory ? 

theme/modules/homecategories/homecategories.tpl

Share this post


Link to post
Share on other sites

i try your module on 1.6.0.14 with multi boutique on (3 shop)

i have 3 same cat for each real cat ... can you help me ?

you can see it here => http://www.bijouxclement.fr/ (display ? image)

Hello yberges,

for duplicate categories, please refer to https://www.prestashop.com/forums/topic/121735-free-module-homepage-categories-module/?view=findpost&p=1582242 There is an excplanation how to fix it.

About images, on page 17 i explain what to replace in homecategories.tpl to fix it.

Best regards.

Share this post


Link to post
Share on other sites

Ican not even get my categories to show on front page

Did you activate the plugin. It may be disabled.

Share this post


Link to post
Share on other sites
I need to clear the name of category, leaving only the image of the category clickable. I deleted in homecategories.tpl line: <a href="{$categoryLink}" title="{$category.legend}"> {$ category.name | truncate: 35} </a>

 

but this command has no effect. Anyone can help?

Share this post


Link to post
Share on other sites

How to display like below.

 

 

Mobile Phone

 

Sony x1 mobile    Sony x2 mobile  Micromax Mobile

 

Computer Cabinet

 

Circle 820 Cabinet       Zebronics M1 Cabinet

 

Printer

 

HP 1115 Printer           HP 3545 Printer

 

All should have randomised product feature. With view product from that category feature.

 

Anyone have any idea about it?

Share this post


Link to post
Share on other sites