[Free Module] Homepage Categories Module - Free Modules & Themes - PrestaShop

Jump to content

Photo

[Free Module] Homepage Categories Module

categories home homepage frontpage module free v1.4 v1.5

#1

Posted 24 May 2011 - 08:59 AM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts

*
POPULAR

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.

Attached File  homecategories for v1.4.zip   3.99KB   2062 downloads
Attached File  homecategories for v1.5.zip   8.25KB   10902 downloads

 

Added by mdekker - DO NOT REMOVE

There is one issue with this module:

- Not compatible with PrestaShop 1.6

Correction: I made a version for PS1.6 myself, haha! It can be found in this post: https://www.prestash...dule/?p=2240501

This warning can be removed if the OP is updated


Edited by mdekker, 15 March 2016 - 11:13 PM.
I was wrong :/

Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#2

Posted 27 May 2011 - 04:41 AM

dambie

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 127 Active Posts
You can add a display of subcategories?

And if\else the default image if the category has no image :)

Remember to brush your teeth !
biuro rachunkowe w poznaniu w rozsądnej cenie.


#3

Posted 27 May 2011 - 07:18 AM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts
If the category has no image, then add one? I'm not sure why you would want this module if your categories don't have images set.

I'm not too sure about adding sub-categories as that would need some javascript or ajax coding.
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#4

Posted 27 May 2011 - 07:29 AM

dambie

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 127 Active Posts
But what ajax? maybe a simple list:


  • category

    • subcategory

Remember to brush your teeth !
biuro rachunkowe w poznaniu w rozsądnej cenie.


#5

Posted 05 June 2011 - 10:14 PM

ckrina

    PrestaShop Newbie

  • Members
  • Pip
  • 2 Active Posts
Hello, first of all, thanks for the module and all the work you've done.
I installed this last version correctly and I would like to display category description too.
I founded a version of this module that uses "{$category.description}" to call this info, but it doesn't work here.
Do you know if I should call anything else in the .php file?

<!-- MODULE Home categories -->{if isset($categoryHome) AND $categoryHome}<div id="home-cat-container">{assign var='count' value=0} {foreach from=$categoryHome item=category name=homeCategories}           {assign var='count' value=$count+1}            {assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)|escape:'htmlall':'UTF-8'}               <div class="home-cat-item {if ($count%3 == 0)}last{/if}">                        <a href="{$categoryLink}" title="{$category.name}">        <img >getCatImageLink($category.link_rewrite, $category.id_image,'category-on-home')}" alt="{$category.name|escape:'htmlall':'UTF-8'}" />    </a>    <h5><a href="{$categoryLink}" title="{$category.name}">{$category.name}</a></h5>    <p class="home-cat-description">{$category.description}</p>            </div>{/foreach}</div>{else}<p>{l s='No categories' mod='homecategories'}</p>{/if}<!-- END MODULE Home categories -->


Thank you so much!

#6

Posted 11 June 2011 - 06:32 PM

genotip

    PrestaShop Newbie

  • Members
  • Pip
  • 1 Active Posts
Thank's for good module!
Should it show only pictures?
I took your may's version, everything is OK, but there are no names of categories, only pictures.

#7

Posted 02 July 2011 - 05:40 PM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts
To add the category name to your homepage add
{$category.name|truncate:35}

into the tpl file. Change truncate:35 to whatever length yu need.
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#8

Posted 19 August 2011 - 10:13 AM

cronotempo

    PrestaShop Apprentice

  • Members
  • PipPip
  • 34 Active Posts
Lo he instalado sin ningún problema en prestashop v1.4.
En /viajes/modules/homecategories.

Pero al intentar modificar el .css, no veo ningún cambio, no sé que estoy haciendo mal.
En las imágenes que adjunto os enseño como me aparece en el home, y en la siguiente imagen lo que intento integrar modificando el estilo.

Alguien me puede ayudar?

-------------------------------------------------------
I've installed without any problem prestashop v1.4.
In / travel / modules / homecategories.

But in trying to modify. Css, I see no change, I know I'm doing wrong.
The pictures attached you how I get on the home and in the next picture I'm trying to integrate changing the style.

Someone can help me?

Attached Files



#9

Posted 19 August 2011 - 07:58 PM

ScubaLessonsInc

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 373 Active Posts
There is not a module that will do those buttons currently, however I cheated by just using HTML, Photoshop and the WContentMaker module I found on here to do this: see: www.dieselsurplusstore.com main page. See attached image and the module I used. Just transplant the module to the homepage content and move in the positions tab under modules.

The html is just the images side by side created equally in photoshop and saved as .png's
Each image just links to the catgory URL.. just click on the categories bar and copy the URL from that categories page to get each URL. Simple and gives you that control your looking for. I would keep the images very small or use a .png image compressor to keep the page loading time fast.

Good luck.

Attached Files


Tina O'Connell, Email: info@scubalessonsinc.com
Sites: www.ScubaLessonsInc.com or www.Stuff4Scuba.com


#10

Posted 26 August 2011 - 10:39 PM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts

There is not a module that will do those buttons currently, however I cheated by just using HTML, Photoshop and the WContentMaker module I found on here to do this: see: www.dieselsurplusstore.com main page. See attached image and the module I used. Just transplant the module to the homepage content and move in the positions tab under modules.

The html is just the images side by side created equally in photoshop and saved as .png's
Each image just links to the catgory URL.. just click on the categories bar and copy the URL from that categories page to get each URL. Simple and gives you that control your looking for. I would keep the images very small or use a .png image compressor to keep the page loading time fast.

Good luck.



Actually with some css coding it would probably be possible to do that layout.


Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#11

Posted 07 September 2011 - 08:22 PM

itsallgood

    PrestaShop Newbie

  • Members
  • Pip
  • 5 Active Posts
Got to say i love this module :)

I did find one little problem though -- because the height is set in the CSS, and the pictures make it taller than that set height, any modules below the "home categories" box end up behind the box :(


To fix this, i made the following changes:

In the CSS file (homecategories.css), i change this:

div.home_categories{height:220px}


to this (added 1 new line):

div.home_categories{margin-bottom: 5px}
div.home_categories .cr{clear: both;border: 0px none}


And in the template file (homecategories.tpl)

Changed this...

    {/if}
</div>
<br /><br /><br />
<!-- /MODULE Home categories -->

To this...

	 {/if}
    <div class="cr"></div>
</div>
<!-- /MODULE Home categories -->


This means no matter how big the pictures are, the box will just resize, and any modules below will just be pushed down.

#12

Posted 13 September 2011 - 03:47 AM

thaiguy03

    PrestaShop Newbie

  • Members
  • Pip
  • 5 Active Posts
Just wanted to say thanks to
jhnstcks

for a great module. This should be included in all default installs as I'm sure others would find this module helpful.
Or maybe include it in the modules list for download. Took some time and searching to find this thread, but now I have it, well worth the time. Keep up the great work guys.

#13

Posted 14 September 2011 - 11:20 AM

mastabrail

    PrestaShop Newbie

  • Members
  • Pip
  • 1 Active Posts

Hello, first of all, thanks for the module and all the work you've done.
I installed this last version correctly and I would like to display category description too.
I founded a version of this module that uses "{$category.description}" to call this info, but it doesn't work here.
Do you know if I should call anything else in the .php file?

<!-- MODULE Home categories -->
{if isset($categoryHome) AND $categoryHome}
 
{assign var='count' value=0}
{foreach from=$categoryHome item=category name=homeCategories}	  
	{assign var='count' value=$count+1}		
	{assign var='categoryLink' value=$link->getcategoryLink($category.id_category, $category.link_rewrite)|escape:'htmlall':'UTF-8'}		  
	
					
	[url="{$categoryLink}"]
		<img />getCatImageLink($category.link_rewrite, $category.id_image,'category-on-home')}" alt="{$category.name|escape:'htmlall':'UTF-8'}" />
	[/url]
	
[b]	[url="{$categoryLink}"]{$category.name}[/url][/b]
 
	
{$category.description}		
	
{/foreach}
 
{else}
{l s='No categories' mod='homecategories'}
 
{/if}
<!-- END MODULE Home categories -->

Thank you so much!


Hi,
I'm not a programmer but I have modified the file "homecategories.php" to make it display the description of the categories.
You must add in the file "homecategories.tpl" this: {$category.description}

I hope that it works for you and invite developers to correct any problems in the code.

Sorry for my english :)

Greetings, Mastabrail

Attached Files



#14

Posted 19 September 2011 - 02:28 PM

mandrin

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 208 Active Posts
HI there,

I know it's a long shot , but will this module work with PS 1.2.5?

#15

Posted 19 September 2011 - 07:33 PM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts
Probably not but this one does http://www.prestasho...__fromsearch__1
Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#16

Posted 25 September 2011 - 09:18 AM

xSpikeRx

    PrestaShop Newbie

  • Members
  • Pip
  • 20 Active Posts
good module
for presta 1.4.4.1 i installed it without problem
screenshot:
http://prntscr.com/36xov

I read one article that search engines love to index more sites at which the main page often changes. Tell me how i can do thatevery time categories were displays randomly?

#17

Posted 30 September 2011 - 05:23 PM

bkat52

    PrestaShop Newbie

  • Members
  • Pip
  • 7 Active Posts

To add the category name to your homepage add

[b]	[url="{$categoryLink}"]{$category.name|truncate:35}[/url][/b]



into the tpl file. Change truncate:35 to whatever length yu need.


John - where at in the code do you put this? I tried it at the very end but i still cant see the category names. Is there somewhere specific in the tpl file this needs to go?

#18

Posted 04 October 2011 - 08:22 AM

jhnstcks

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 2050 Active Posts


John - where at in the code do you put this? I tried it at the very end but i still cant see the category names. Is there somewhere specific in the tpl file this needs to go?


This is a copy of my .tpl file
<!-- MODULE Home categories -->
<div class="home_categories">
    <h2>{l s='Shop by Brand' 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}-catsmall.jpg" alt="{$category.name}" title="{$category.name}" id="categoryImage"></a></div>
{$category.name}            
    </li>
            {/foreach}
            </ul>
    {else}
        <p>{l s='No categories' mod='homecategories'}</p>
        {/if}
    <div class="cr"></div>
</div>
<!-- /MODULE Home categories -->

Don't forget, if you find a post particularly helpful, click the like button to show other members it is helpful.

#19

Posted 24 October 2011 - 04:07 PM

zamarley

    PrestaShop Newbie

  • Members
  • Pip
  • 21 Active Posts
Hello, I am new to the forum, thank you for this module, it saves me a lot of time, i installed it and works like a charm in 1.4 version, but i have one question, is it possible to get the lower price inside one category? ex : in category ipod i would have the lowest price from it and display in frontpage category as : start at 25$ for example.

Thank you

#20

Posted 24 October 2011 - 05:03 PM

zamarley

    PrestaShop Newbie

  • Members
  • Pip
  • 21 Active Posts
I think it requires to get the lowest price of product inside ipod category but i don't know how to extract it from the database, any one have an idea?



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more