Jump to content
jhnstcks

[Free Module] Homepage Categories Module

Recommended Posts

Is that possible to show products of certain category on homepage with this module? or any way to change its code to work like that ?

Share this post


Link to post
Share on other sites

So what is the last version working ?

 

And is possile to configure the module from the backoffice ?

 

Thanks

Share this post


Link to post
Share on other sites

The template was moved to comply with PrestaShop's standards. Here's an update:

attachicon.gifhomecategories.zip

I have install that but i see the categories only in live edit, and not when i'm out of the live edit.

 

Prestashop 1.6.3

 

Thanks

Share this post


Link to post
Share on other sites

Hi guys

 

Can somebody please tell me what this module is supposed to actually do?

 

I installed it on my 1.6.0.9 test system and don't see any change...and yes, I cleared cache etc...

 

Cheers

Greg

Share this post


Link to post
Share on other sites

OK, absolute newbie here...

Is there a way to translate the header 'categories' to my local language? I'm setting up the shop in two languages and it would be nice if the header changed with the chosen language. Or, if it is difficult, maybe it's possible to remove the header?

Edited by arjena (see edit history)

Share this post


Link to post
Share on other sites

The template was moved to comply with PrestaShop's standards. Here's an update:

attachicon.gifhomecategories.zip

I installed the last version posted, it works, but i can't place the categories above the best sold products

post-935083-0-90962400-1452110216_thumb.png

 

I tried the live editor, but i was unable to place the categories above the best sold products, i got an red rectangle.

 

Prestashop Version & Info

post-935083-0-18371300-1452110296_thumb.png

Share this post


Link to post
Share on other sites

@mdekker: thanks for solving the problem, with the hooks of the Homecategory module.

 

changing the pic size within the file homeCategories.tpl from medium_default to large_default ​did the trick as well.

Share this post


Link to post
Share on other sites

Hi Friend , does this works for  v 1.6 also ??

 

Yes it works for version 1.6*

 

I'm using v1.6.1.4, and no probs found so far, after installing the version with the new hook

Share this post


Link to post
Share on other sites

Sorry friends, I have a problem!!

My manual added categories as MY VIDEOS or else, added to megamenU. cant see with this module... any help please?? I mean, Ive created 2 extra categories (really liinks) to show at upper megamenu, and logically don´t appears as categories with this module... can anyone help me please??

Using Prestashop 1.6.1.4 works perfect!!

Edited by LED IBERICA (see edit history)

Share this post


Link to post
Share on other sites

Íf anyone's wondering what @BDohmen is talking about. We made a new version.

 

It has an extra hook: homeTab

 

Here it is:

attachicon.gifhomecategories.zip

 

Very good module works perfect in P1.6 me.

Only a modification if possible, need to show the image of the categories with product image

  • Like 1

Share this post


Link to post
Share on other sites

This is awesome. Thanks so much for the contribution to the community.

 

Is there any way to display specific categories?

Share this post


Link to post
Share on other sites

Is it possible, to show sub-categories under categories and hook it to homepage tabs?

Share this post


Link to post
Share on other sites

Well the module installed fine in 1.6.1.5 but any reason it uses the Category Cover Image for the thumbnail instead of the thumbnail image that can be uploaded?  This makes a mess since the images are resized from 870-217

Edited by DeadDred (see edit history)

Share this post


Link to post
Share on other sites

Well the module installed fine in 1.6.1.5 but any reason it uses the Category Cover Image for the thumbnail instead of the thumbnail image that can be uploaded?  This makes a mess since the images are resized from 870-217

 

Ok so user error here but the Presta category image system is not that user friendly. In order to not have the main image be used a a scale down thumbnail you have to first upload the main image, a new thumbnail will be created from it and it'll show in the category thumbnail icon. You replace it by uploading a new thumbnail that you want.

post-1258723-0-22471500-1465023842_thumb.png

Share this post


Link to post
Share on other sites

tnx for moudle

 

my category bad display

 

i want display 4 image in col

sample col-lg-3 col-md-3

 

plz help mepost-899480-0-62857200-1468813170_thumb.png

Share this post


Link to post
Share on other sites

Hi all,

 

Thanks for great module.

 

Can anybody have idea how to manage category display limit as i want to show only 6 category in home page.

 

Please help.

 

Thanks

Edited by chirag_0110 (see edit history)

Share this post


Link to post
Share on other sites

Hi I am using this module

But there is a problem

I want to my store Product Categories

Categories its Newest First

 

But in this module

Older products will be displayed at First

 

how can i fix it ?

 

plz help me / sorry for my Language

 

Share this post


Link to post
Share on other sites

The module display the categorys in the same orders as you set them in your prestashop back-office.

 

So if you change the categorys order in your back office, it will change on your homepage too :)

  • Like 1

Share this post


Link to post
Share on other sites

this working fine image are good, but when i add en product as special price it don`t show the image any more

Share this post


Link to post
Share on other sites

Hello,

 

You can edit the pictures size in homecategories.css

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

Share this post


Link to post
Share on other sites

                                Categories Page Styles
************************************************************************************************ */
.content_scene_cat {
  border-top: 5px solid #333;
  color: #d7d7d7;
  line-height: 19px;
  margin: 1 1 26px 0; }
  .content_scene_cat .content_scene_cat_bg {
    padding: 18px 10px 10px 42px;
    background-color: #464646 !important; }
    @media (max-width: 1199px) {
      .content_scene_cat .content_scene_cat_bg {
        padding: 10px 10px 10px 15px; } }
  .content_scene_cat span.category-name {
    font: 600 42px/51px "Open Sans", sans-serif;
    color: #fff;
    margin-bottom: 12px; }
    @media (max-width: 1199px) {
      .content_scene_cat span.category-name {
        font-size: 25px;
        line-height: 30px; } }
  .content_scene_cat p {
    margin-bottom: 0; }
  .content_scene_cat a {
    color: #fff; }
    .content_scene_cat a:hover {
      text-decoration: underline; }
  .content_scene_cat .content_scene {
    color: #777; }
    .content_scene_cat .content_scene .cat_desc {
      padding-top: 20px; }
      .content_scene_cat .content_scene .cat_desc a {
        color: #777; }
        .content_scene_cat .content_scene .cat_desc a:hover {
          color: #515151; }

 

 

 

don`t have that line....

Share this post


Link to post
Share on other sites

Sorry, I use the 1.5 version, can you PM me your website url and disable smart cache for css so I can take a look ?

Share this post


Link to post
Share on other sites

Hello!

Tell me, can not understand, where you can swap the display of images on the main categories?

 

Prestashop 1.5, module 1.5

 

Thank you in advance!

 

 

post-1325169-0-09356400-1476269225_thumb.jpg

Share this post


Link to post
Share on other sites

tnx for moudle

 

my category bad display

 

i want display 4 image in col

sample col-lg-3 col-md-3

 

plz help meattachicon.gif3.PNG

-----------> file    prestashop\themes\default-bootstrap\css\category.css   
                   #subcategories ul li {
                    float: left;
                     width: 145px;
line   53      margin: 0 0 13px 33px;  ( change to ---> margin: 0 0 13px 26px )
                      text-align: center;
                      height: 202px; }
                      #subcategories ul li .subcategory-image {
 
                         with this change display 4 categories by line
  • Like 1

Share this post


Link to post
Share on other sites

How can I add the "ALT" tag in the 1.6 version module if there is not a TPL file??

 

The images have not ALT and that's a problem...

Share this post


Link to post
Share on other sites

Hi, does a module like this exists for 1.7?

 

I've been looking for hours...

 

Almost regret not starting with 1.6 but I'm not sure I will know how to upgrade to 1.7 in October next year so...

 

Thanks in advance for your help.  :) 

Share this post


Link to post
Share on other sites

Hello what should i change in the module code to display categories in main page and dont show subcategories anymore. Thank You for the answers

Share this post


Link to post
Share on other sites

Homecategories in  prestashop 1.7

post-1332184-0-37188900-1504554889_thumb.jpg

Once installed, it does not display category images because the category images

Let's replace "medium_default" with "category_default" in the “/modules/homecategories/views/templates/hooks/homecategories.tpl” file as we see below.

**********************************************

{if $subcategory.id_image}

<img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>

  {else}

<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-category_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>

 {/if}

**********************************************

 

post-1332184-0-43974200-1504555071_thumb.jpg

That's the home page with that change, where we already see the image of the category

 

Now we have to add the styles we had in "category.css" from  prestashop 1.6 at the end of the file:

“/themes/classic/assets/css/theme.css”

 

/* ****************************************************************

                  Sub Categories Styles

*****************************************************************/

#subcategories {

 /* border-top: 1px solid #d6d4d4; */

  padding: 15px 0 0px 0; }

  #subcategories p.subcategory-heading {

    font-weight: bold;

    color: #333;

    margin: 0 0 15px 0; }

  #subcategories ul {

    margin: 0 0 0 -20px; }

    #subcategories ul li {

      float: left;

      width: 145px;

      margin: 0 0 13px 26px;

      text-align: center;

      height: 202px; }

      #subcategories ul li .subcategory-image {

        padding: 0 0 8px 0; }

        #subcategories ul li .subcategory-image a {

          display: block;

          padding: 9px;

          border: 1px solid #d6d4d4; }

          #subcategories ul li .subcategory-image a img {

            max-width: 100%;

            vertical-align: top; }

      #subcategories ul li .subcategory-name {

        font: 600 18px/22px "Open Sans", sans-serif;

        color: #555454;

        text-transform: uppercase; }

        #subcategories ul li .subcategory-name:hover {

          color: #515151; }

      #subcategories ul li .cat_desc {

        display: none; }

      #subcategories ul li:hover .subcategory-image a {

        border: 5px solid #333;

        padding: 5px; }

/*# sourceMappingURL=category.css.map */

**********************************************

 

post-1332184-0-08855200-1504554603_thumb.jpg

Here is the result of css styles.

 

 If you want to show the subcategories, in this link explain how to do it

http://nemops.com/prestashop-1-7-add-subcategories/#.WZ952GhLddh

Replacing the file "/themes/classic/templates/catalog/listing/category.tpl" with the file "category.tpl" that we find in this link:

 https://mypresta.eu/prestashop-17/display-available-subcategories.html,

 we will see the subcategories as in the image below.

 

post-1332184-0-94812400-1504554821_thumb.jpg

 

These changes in the module I only tried them in prestashop 1.7.0.6

Edited by lamparasmogalux (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

Hi,

 

I tried to install your modul to the newest version of Prestashop (De Language) V1.7.2.2

 I have made the changes as you showed above.

Pictures in the Categories are installe.

After all i cannot see any Category Images on the start page. What happened is, that under the customer text block the category names will now be shown.

 

Could you please help me to find out what's going wrong?????

 

My Shop is here: www.aqb-aquaristik.de

 

Thanks a lot

 

 

Kind Regards

 

Frank

Edited by aqb (see edit history)

Share this post


Link to post
Share on other sites

Homecategories in  prestashop 1.7

 

Another way to install the module while preserving the view you have in Prestashop 1.6.

 

After installing without altering any file of homecategories.zip, select Design -> Image Adjustment and mark the medium_default box in the category column.

 

Below we upload images of all categories and subcategories.

 

post-1332184-0-23303700-1505683952_thumb.jpg

Now we have to add the styles we had in "category.css" from  prestashop 1.6 at the end of the file “/themes/classic/assets/css/theme.css”

 

/* ****************************************************************

                  Sub Categories Styles

*****************************************************************/

#subcategories {

 /* border-top: 1px solid #d6d4d4; */

  padding: 15px 0 0px 0; }

  #subcategories p.subcategory-heading {

    font-weight: bold;

    color: #333;

    margin: 0 0 15px 0; }

  #subcategories ul {

    margin: 0 0 0 -20px; }

    #subcategories ul li {

      float: left;

      width: 145px;

      margin: 0 0 13px 26px;

      text-align: center;

      height: 202px; }

      #subcategories ul li .subcategory-image {

        padding: 0 0 8px 0; }

        #subcategories ul li .subcategory-image a {

          display: block;

          padding: 9px;

          border: 1px solid #d6d4d4; }

          #subcategories ul li .subcategory-image a img {

            max-width: 100%;

            vertical-align: top; }

      #subcategories ul li .subcategory-name {

        font: 600 18px/22px "Open Sans", sans-serif;

        color: #555454;

        text-transform: uppercase; }

        #subcategories ul li .subcategory-name:hover {

          color: #515151; }

      #subcategories ul li .cat_desc {

        display: none; }

      #subcategories ul li:hover .subcategory-image a {

        border: 5px solid #333;

        padding: 5px; }

/*# sourceMappingURL=category.css.map */

Here is the result of css styles

 

post-1332184-0-57704700-1505683862_thumb.jpg

 

If you want to show the subcategories, in this link explain how to do it

http://nemops.com/prestashop-1-7-add-subcategories/#.WZ952GhLddh

Replacing the file "/themes/classic/templates/catalog/listing/category.tpl" with the file "category.tpl" that we find in this link: https://mypresta.eu/prestashop-17/display-available-subcategories.html,

We will replace in the file "category.tpl" that we have downloaded, "category_default" by "medium_default"

*******************************************************

{if $subcategory.id_image}
<img class="replace-2x"    src="{$link>getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default'
)|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
  {else}
<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
  {/if}
*****************************************************

we will see the subcategories as in the image below. 

post-1332184-0-65945500-1505683984_thumb.jpg

 

These changes in the module I only tried them in prestashop 1.7.0.6

Edited by lamparasmogalux (see edit history)

Share this post


Link to post
Share on other sites

Hi and thanks for your fast reply.

 

It seems i have just forgotten to renew the thumbs  :blush:.

 

 

 

But now i have another question.

 

Is it possible to turn off the Categoriepictures for smartphones only. It looks good on PC, Notebook and Tablet, but on Smartphones it is much to scroll.

Edited by aqb (see edit history)

Share this post


Link to post
Share on other sites

Hi and thanks for your fast reply.

 

It seems i have just forgotten to renew the thumbs  :blush:.

 

 

 

But now i have another question.

 

Is it possible to turn off the Categoriepictures for smartphones only. It looks good on PC, Notebook and Tablet, but on Smartphones it is much to scroll.

This link can help you

https://www.hostinet.com/formacion/prestashop/ocultar-modulos-de-prestashop-en-dispositivos-moviles/

 

post-1332184-0-34872200-1505771845_thumb.jpg

Edited by lamparasmogalux (see edit history)

Share this post


Link to post
Share on other sites

OK, (sorry the modules are not really mine yet - but hopefully for future. I worked for several years with a german created shop system and everything about design changes only worked by the hard way). To turn it of solved my problem with the smartphone. Picture Menu is away and there is a pulldown menu on the top. Looks fine.

But on tablets the picture menu is also gone away and there is only the horizontal menu like on laptops or workstations. If i disable the horizontal menu for mobile there will be no menu on tablet or smartphone. Only on subcategory pages (with tablet, not smartphone) there appears the tree menu. Is it possible to activate the picture menu for PC and Tablet only or, if not to change on tablets to the pulldown menu instead of the horizontal menu?

Share this post


Link to post
Share on other sites

OK, (sorry the modules are not really mine yet - but hopefully for future. I worked for several years with a german created shop system and everything about design changes only worked by the hard way). To turn it of solved my problem with the smartphone. Picture Menu is away and there is a pulldown menu on the top. Looks fine.

But on tablets the picture menu is also gone away and there is only the horizontal menu like on laptops or workstations. If i disable the horizontal menu for mobile there will be no menu on tablet or smartphone. Only on subcategory pages (with tablet, not smartphone) there appears the tree menu. Is it possible to activate the picture menu for PC and Tablet only or, if not to change on tablets to the pulldown menu instead of the horizontal menu?

It could be hidden for smartphone by adding in the file "/themes/classic/assets/css/custom.css",  something like this:

 

@media screen and (max-width: 600px) {

. layer_to_hide{

display: none;

}

}

 

Edited by lamparasmogalux (see edit history)

Share this post


Link to post
Share on other sites

Thanks for your module. I wish to display all categories on an other page than the homepage. Is it possible with it ?

Thanks

Share this post


Link to post
Share on other sites

Hi, little problem. It seems it is not possible to change my Category Pictures. In BO->Catalog->Category->select category->edit->add file. 

The new picture is shown after saving in the BO but not in Front. I tried to clear cache and new compiling, deaktivate and reaktivate smart cache. Nothing happend. Checking the webspace in folder /img/c/ shows only the new files i just uploaded.

 

Any help ???

 

Kind regards

Frank

 

Share this post


Link to post
Share on other sites
On 06/12/2017 at 6:15 PM, info@happyracerstore said:

 

It has an extra hook: homeTab

 

Here it is:

homecategories.zip

 

I downloaded this module for mine PS 1.7.2.4 , it didn't show categories images. then I replaced image link in module file "homecategories.tpl":
from 

{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}

to 

{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}

found on THIS website. I also borrowed some of the styles and it seems that it works just fine :) Hope you'll sort it out
 

Share this post


Link to post
Share on other sites

It's work in prestashop 1.7.2 - thanks but i Have question.

How to display subcategory of main category?

I'd like to show subcategory from category ID 231 - how to edit this?

    {if isset($categories) AND $categories}
        <div id="subcategories">
            <ul class="clearfix">
                {foreach from=$categories item=subcategory name=homeCategories}<li>
                        <div class="subcategory-image">
                            <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}"
                               title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
                                {if $subcategory.id_image}
                                    <img class="replace-2x"
                                         src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}"
                                         alt="" width="{$mediumSize.width|escape:'htmlall':'UTF-8'}" height="{$mediumSize.height|escape:'htmlall':'UTF-8'}"/>
                                {else}
                                    <img class="replace-2x" src="{$img_cat_dir|escape:'htmlall':'UTF-8'}{$lang_iso|escape:'htmlall':'UTF-8'}-default-medium_default.jpg"
                                         alt="" width="{$mediumSize.width|escape:'htmlall':'UTF-8'}" height="{$mediumSize.height|escape:'htmlall':'UTF-8'}"/>
                                {/if}
                            </a>
                        </div>
                        <h5><a class="subcategory-name"
                               href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:60:'...'|escape:'html':'UTF-8'}</a>
                        </h5>
                    </li>{/foreach}
            </ul class="clearfix">
        </div>
    {else}
        <p>{l s='No categories' mod='homecategories'}</p>
    {/if}

 

Edited by Miroo (see edit history)

Share this post


Link to post
Share on other sites

Hi I made the following changes but still the images shows horizontal as appose to vertically.

Any help would be glady appreciated. I'm using v1.7

Thanks

Shaun

 

horizontal alignment - homecategories.JPG

Edited by Shaun (see edit history)

Share this post


Link to post
Share on other sites
On 1/25/2016 at 7:39 PM, mdekker said:

Íf anyone's wondering what @BDohmen is talking about. We made a new version.

 

It has an extra hook: homeTab

 

Here it is:

homecategories.zip

The link it's not working anymore. @mdekker (or anyone that has downloaded it), could you please repost?

Thank you

Edited by david.martins
Now it's working again :) (see edit history)

Share this post


Link to post
Share on other sites

custom.css

/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */
 #footer{
background: #BDBDBD;
}
#header{
background: #BDBDBD;
}
/* ************************************************************************************************
                                    Sub Categories Styles
************************************************************************************************ */
#subcategories {
  border-top: 1px solid #d6d4d4;
  padding: 15px 0 0px 0; }
  #subcategories p.subcategory-heading {
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0; }
  #subcategories ul {
    margin: 0 -10px 0 -20px; }
    #subcategories ul li {
      float: left;
      width: 145px;
      margin: 0 0 43px 33px;
      text-align: center;
      height: 202px; }
      #subcategories ul li .subcategory-image {
        padding: 0 0 8px 0; }
        #subcategories ul li .subcategory-image a {
          display: block;
          padding: 9px;
          border: 1px solid #A4A4A4; }
          #subcategories ul li .subcategory-image a img {
            max-width: 100%;
            vertical-align: top; }
      #subcategories ul li .subcategory-name {
        font: 600 18px/22px "Open Sans", sans-serif;
        color: #555454;
        text-transform: uppercase; }
        #subcategories ul li .subcategory-name:hover {
          color: #515151; }
      #subcategories ul li .cat_desc {
        display: none; }
      #subcategories ul li:hover .subcategory-image a {
       background: #A4A4A4;}

/*# sourceMappingURL=category.css.map Aquaris 720 x 1280  */
/*resoluciones 576 768 992 1200 */
@media (max-width: 767px) and (orientation: portrait){
 #subcategories ul {
   margin: 0 -15px 0 -45px;}
 
 @media (max-width: 767px) and (orientation: landscape) {
 #subcategories ul {
   margin: 0 -15px 0 -45px; }
 

@media (min-width: 768px) and (orientation: portrait) {
 #subcategories ul {
   margin: 0 -15px 0 -45px; }
 

@media (min-width:768px) and (orientation: landscape){
 #subcategories ul {
   margin: 0 -15px 0 -45px; }
 


@media (min-width:1024px){
 #subcategories ul {
   margin: 0 -10px 0 -20px; }

Share this post


Link to post
Share on other sites

category.tpl

{**
 * 2007-2018 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2018 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list_header'}
    <div class="block-category card card-block hidden-sm-down">
      <h1 class="h1">{$category.name}</h1>
      {if $category.description}
        <div id="category-description" class="text-muted">{$category.description nofilter}</div>
      {/if}
      {if $category.image.large.url}
        <div class="category-cover">
          <img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
        </div>
      {/if}
    </div>
    <div class="text-sm-center hidden-md-up">
      <h1 class="h1">{$category.name}</h1>
    </div>
    {if isset($subcategories)}
        <!-- Subcategories -->
        <div id="subcategories">
            <p class="subcategory-heading">{l s='Subcategories'}</p>
            <ul class="clearfix">
                {foreach from=$subcategories item=subcategory}
                    <li>
                        <div class="subcategory-image">
                            <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
                                {if $subcategory.id_image}
                                    <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
                                {else}
                                    <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-category_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
                                {/if}
                            </a>
                        </div>
                        <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}</a></h5>
                        {if $subcategory.description}
                            <div class="cat_desc">{$subcategory.description}</div>
                        {/if}
                    </li>
                {/foreach}
            </ul>
        </div>
    {/if}
{/block}

 

Share this post


Link to post
Share on other sites

hello,

 

where can I dowload a version of this module for prestashop 1.7.4??

 

it seems that the download link isn't working.

 

thanks

Share this post


Link to post
Share on other sites

Thank you for the module.

Works well in 1.7.4.2 except does not show sub (to home) category images on home page only text links and borders.
Main menu not not dispayed.

On local server for real site to be built, default content, htmlbox installed but disabled.

I have changed category.tpl and custom.css, flushed dns, refreshed browser and cleared cache in 'Performance', what am I missing please?

 

Share this post


Link to post
Share on other sites

Got the main menu back.

Still cannot get category images and links on home page.

Any ideas please?

Share this post


Link to post
Share on other sites
En 5/5/2018 a las 5:37 PM, Shaun dijo:

Hola, realicé los siguientes cambios, pero las imágenes siguen siendo horizontales, como apostar a verticalmente.

Cualquier ayuda sería glady apreciada. Estoy usando v1.7

Gracias

Shaun

 

alineación horizontal - homecategories.JPG

 

 

Tengo este problema, ¿puedes resolverlo? Tengo 1.6

Edited by Jessy (see edit history)

Share this post


Link to post
Share on other sites
On 4/9/2017 at 8:58 PM, lamparasmogalux said:

Homecategories in  prestashop 1.7

post-1332184-0-37188900-1504554889_thumb.jpg

Once installed, it does not display category images because the category images

Let's replace "medium_default" with "category_default" in the “/modules/homecategories/views/templates/hooks/homecategories.tpl” file as we see below.

**********************************************

{if $subcategory.id_image}

<img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>

  {else}

<img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-category_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>

 {/if}

**********************************************

 

post-1332184-0-43974200-1504555071_thumb.jpg

That's the home page with that change, where we already see the image of the category

 

Now we have to add the styles we had in "category.css" from  prestashop 1.6 at the end of the file:

“/themes/classic/assets/css/theme.css”

 

/* ****************************************************************

                  Sub Categories Styles

*****************************************************************/

#subcategories {

 /* border-top: 1px solid #d6d4d4; */

  padding: 15px 0 0px 0; }

  #subcategories p.subcategory-heading {

    font-weight: bold;

    color: #333;

    margin: 0 0 15px 0; }

  #subcategories ul {

    margin: 0 0 0 -20px; }

    #subcategories ul li {

      float: left;

      width: 145px;

      margin: 0 0 13px 26px;

      text-align: center;

      height: 202px; }

      #subcategories ul li .subcategory-image {

        padding: 0 0 8px 0; }

        #subcategories ul li .subcategory-image a {

          display: block;

          padding: 9px;

          border: 1px solid #d6d4d4; }

          #subcategories ul li .subcategory-image a img {

            max-width: 100%;

            vertical-align: top; }

      #subcategories ul li .subcategory-name {

        font: 600 18px/22px "Open Sans", sans-serif;

        color: #555454;

        text-transform: uppercase; }

        #subcategories ul li .subcategory-name:hover {

          color: #515151; }

      #subcategories ul li .cat_desc {

        display: none; }

      #subcategories ul li:hover .subcategory-image a {

        border: 5px solid #333;

        padding: 5px; }

/*# sourceMappingURL=category.css.map */

**********************************************

 

post-1332184-0-08855200-1504554603_thumb.jpg

Here is the result of css styles.

 

 If you want to show the subcategories, in this link explain how to do it

http://nemops.com/prestashop-1-7-add-subcategories/#.WZ952GhLddh

Replacing the file "/themes/classic/templates/catalog/listing/category.tpl" with the file "category.tpl" that we find in this link:

 https://mypresta.eu/prestashop-17/display-available-subcategories.html,

 we will see the subcategories as in the image below.

 

post-1332184-0-94812400-1504554821_thumb.jpg

 

These changes in the module I only tried them in prestashop 1.7.0.6

Hi,  @lamparasmogalux

it's a good solution, I've tried it with 1.7.4.2
regards

Edited by aixos (see edit history)

Share this post


Link to post
Share on other sites

Hi 

i'm using PS 1.7.4.2 i installed Categories on the homepage module v1.4.0 - by zapalm and it's working perfectly however categories images not showing and

it's displaying No image available while categories images available.

Taking into consideration that the module is working perfectly in 1.7.1.1 and it's displaying categories images 

Share this post


Link to post
Share on other sites

 

On 12/19/2018 at 12:29 AM, Maria del Pino said:

I downloaded the zip, but there is no Views folder inside. Can anyone post it or send it to me please? Many thanks, María

could you please post link to 1.7 version?

Share this post


Link to post
Share on other sites
2 minutes ago, Piwniczne said:

 

could you please post link to 1.7 version?

Sorry Piwniczne, there is no link for 1.7, I download the module and there is no Views folder in the zip,  what I want is the module v. 1.5 but with view folder to modify /modules/homecategories/views/templates/hooks/homecategories.tpl to make it work for 1.7 😪

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More