News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Hide category from non logged-in user?

Started by imugli, August 08, 2012, 05:27:33 AM

Previous topic - Next topic

imugli

Hi Guys,

Newbie here, so please be kind. Have searched for an answer for this and cannot seem to find it.

My client needs to hide certain categories from the "Public" with only his wholesale customers able to see them.

I have used

$user = JFactory::getUser();
$status = $user->guest;
    if ($status == 1)

to change the "Price" text as needed, but can I use this to also hide specific categories somehow?

Perhaps by defining an array (I only need to block 4 or 5 categories)?

Cheers,

Justin.

John2400

#1
I have done this by not putting the category menu in the front page.

* then using the wrapper field in joomla make the front page a wrapped website with your own links and don't include the category you want to hide.

Then using simple html just use hot links to jump to your categories. 

then send you wholesalers a different link - with all categories showing - use joomla to set up menus.
eg:    http://www.cathscookie.com

yes I have them on the left but you could just send them to another menu or position and hide them.


imugli

Thanks John,

Just to confirm I have this correct (for my circumstances)...

If a guest clicks on the "Our Range" link, they get taken to a page that, rather than display categories directly from Virtuemart, shows a simple html page with links (minus the categories I'm trying to hide) that THEN take the user to the product range.

When a wholesale customer clicks on say, a "Login" link, they get taken to the ACTUAL virtuemart category page, showing all categories.

That could just work. Thanks heaps for the suggestion!

Cheers,

Justin.

John2400

lets just say - the public can see the front page -

the wholesalers could see a different page -  and with a bit of careful menu links I think you could hide that category from the public-

Yes may be you could have a menu that is set that says only show to registered users - that would work.