Jump to content

Display Categories on top horizontal menu but not in left hand side category list


Recommended Posts

Hi,

 

I've been using prestashop for a few months now and just want to know if there is a way to display some of my categories in the top horizontal menu ONLY, and not in the left hand category column. I still want to display the bulk of my categories in the left hand side column but I want a select few to appear in the top horizontal menu only. I hope that was clear.

 

Any help would be much appreciated.

Link to comment
Share on other sites

Well, it is possible but in this case you have to make some modification of tpl file, i mean that you have to add some {if} conditions, where you will check the id of category. If id == id category which you want to hide - then don't display it, hope it is clear

Link to comment
Share on other sites

  • 3 weeks later...

please let me know the ID of categories you want to hide,

what presatashop version you use and give me some info about your theme - it is default? or some external solution?

 

waiting for your reply - then i will prepare code for U

  • Like 1
Link to comment
Share on other sites

thanks for quick reply.

I'm using prestashop 1.5.3.1 with the default theme.

 

My categories are 'mens watches' and 'ladies watches'.

 

many thanks for your help

 

ps this is my shop you can see where i'm trying to take those categories of the main category list on the left: http://saysales.co.uk/index.php

 

you need to provide the actual ID's not the name, in the admin area, go to your categories, you will see a list of your categories, to the left of the names of the categories, you will see a number, each one has it's own unique number, these are ID's, and these are what you will need to use in the IF statements.

 

EDIT: Having said that, I looked at your site, and went to mens watches and ladies watches, and realised that the ID number is actually in the URL.

 

Men's watches ID is 17

Ladies watches ID is 18

Edited by jd.creative (see edit history)
Link to comment
Share on other sites

I've only be working with Prestashop for 2 days, so I'm not a pro, but I believe this should work:

 

go to 'modules/blockcategories'

find the file called 'blockcategories.tpl' and open it

 

find the bit that looks like this:

 

 {foreach from=$blockCategTree.children item=child name=blockCategTree}
  {if $smarty.foreach.blockCategTree.last}
   {include file="$branche_tpl_path" node=$child last='true'}
  {else}
   {include file="$branche_tpl_path" node=$child}
  {/if}
 {/foreach}

 

And change it to this:

 {foreach from=$blockCategTree.children item=child name=blockCategTree}
  {if $category->id != 17 and $category->id != 18}
   {if $smarty.foreach.blockCategTree.last}
 {include file="$branche_tpl_path" node=$child last='true'}
   {else}
 {include file="$branche_tpl_path" node=$child}
   {/if}
  {/if}
 {/foreach}

Link to comment
Share on other sites

  • 3 months later...

Hi. I had this problem and i think I found the solution without any coding work. Is not 100% as I wished but this is what I have done.

 

I am selling goods for the home and on the left I wanted to have the product categories and on the top I wanted to Have search By room, and Your style ( still adding these on) and on those I wanted subcategories to show under by room the hallway, living room etc. Right! It doesn't show the subcategories when we scroll the mouse over the top menu but at least my categories are showing on top menu only.

 

The way I did it was to create a test category under Home (root category) Under that I created Search By room Category and Under that I am still creating my sub categories they are sub-sub categories but looking at the front end no one will tell. With the test category activated to display, on the front end I copied the sub category URL (search By room) then on the CMS under preferences (sorry I meant on the top category module under modules) i created a link and called it the same Search By Room and entered the URL. Then Back to categories I hidden the test category. Et voila! Working!

 

I am so glad with my today achievement that I thought sharing could save some other lives ;)

 

http://94.136.40.103...mhome.co.uk/en/

Edited by SweetDreamHome (see edit history)
Link to comment
Share on other sites

Hi. I had this problem and i think I found the solution without any coding work. Is not 100% as I wished but this is what I have done.

 

I am selling goods for the home and on the left I wanted to have the product categories and on the top I wanted to Have search By room, and Your style ( still adding these on) and on those I wanted subcategories to show under by room the hallway, living room etc. Right! It doesn't show the subcategories when we scroll the mouse over the top menu but at least my categories are showing on top menu only.

 

The way I did it was to create a test category under Home (root category) Under that I created Search By room Category and Under that I am still creating my sub categories they are sub-sub categories but looking at the front end no one will tell. With the test category activated to display, on the front end I copied the sub category URL (search By room) then on the CMS under preferences i created a link and called it the same Search By Room and entered the URL. Then Back to categories I hidden the test category. Et voila! Working!

 

I am so glad with my today achievement that I thought sharing could save some other lives ;)

 

http://94.136.40.103...mhome.co.uk/en/

 

Hello Friend,

 

I went to your website. You have put that ipad slideshow still in your shop. Your's is a home shop - I do not think you want it there.

 

You can remove it by uninstalling the module HomeSlider or by unhooking the HomeSlider module.

 

Best of luck.

Link to comment
Share on other sites

Thank you. If you see the link that is not the live version. As I am still editing the website so those images will change in due course. So by the time it is accessible to general public (when I change the name servers) it will look better with the offers I will run at the time eheh. But thank you very much all suggestions are appreciated ;)

  • Like 1
Link to comment
Share on other sites

Hi SweetDreamHome that was very clever i like it!!! I may be a bit too far down the line to re-categorise my shop like that but I understand how you did it and will consider it thanks.

 

PS i really like the top logo graphic and the purple colour that you have added to change the look of the top of the page. Would love to know how you did that.(although it probably doesn't fit in with this topic ^_^ .

Link to comment
Share on other sites

Hi EdC thank you for the compliments. It is very rewarding as I am not a developer at all so I am learning at each step and I am loving it ;) The way I have changed the header was on the global.css do ctl + f find Header (on mine is on line 545) and where it says header {position: relative} add another line inside the comment so it shows like this

 

#header {position:relative;

background: transparent url('http://94.136.40.103/~sweetdreamhome.co.uk/themes/default/img/header.png');

}

 

I added an image but you can add a colour instead if you want to then you just need to enter background: #fff or any other colour code you want ;)

 

I hope this helps. Even thought it is a separate topic. ;)

 

Cheers

Edited by SweetDreamHome (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...