Jump to content

Hide or Disable categories based on customer group


Recommended Posts

Once customer groups are set up, is it possible to display only selected categories for that group?

 

The store would have items that are not yet available for public purchase, but I would like to have only wholesalers/distributors browse those and order those items.

 

I am thinking of a wholesale/distributor group where only that group will be able to see/buy items from a category(ies).

 

I would not be averse to an alternative solution or buying a module.

Link to comment
Share on other sites

This is ok for existing customers, the problem starts when a customer registers, they are set to 'default' group, or '1'. Then you have to modify from the back office which groups they are assigned to. The only modules I've seen allow the customer to assign themselves to a group after registration or via their account set up. Which I have never understood how that add's any value.

 

Suerte!

Link to comment
Share on other sites

@elpatron

 

Thanks for the additional input.

 

I could see how this would be a problem. However I wouldn't want everyone being able to register as a wholesaler, so it is actually better in my case that I manually assign groups.

Link to comment
Share on other sites

@elpatron

 

Thanks for the additional input.

 

I could see how this would be a problem. However I wouldn't want everyone being able to register as a wholesaler, so it is actually better in my case that I manually assign groups.

 

We (I) am going to address this in the very near future...it would be nice to run a 20% discount coupon for new registrants...etc..

not to toot my own horn, we do have a couple modules for private shop...http://www.etiendas.co/en/13-prestashop-private-store and we running a discount, coupon kickstart on our modules..cheers and happy prestashopping

Link to comment
Share on other sites

TIP: modify and install this override in override/classes/Customer.php to change what group people are assigned at registration:

 

<?php
class Customer extends CustomerCore
{
public function add($autodate = true, $nullValues = true)
{
 if (empty($this->id_default_group))
  $this->id_default_group = 'some group ID');
 return parent::add();
}
}
?>

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

  • 3 months later...

@elpatron

Your solution is simple and elegant to change the default user group.

But how to autoassign the user group based on customer country provided when customer create account?

Something like:

 

If new customer create account, fill the addres form, dropdown select country ex:SPAIN.

After register customer to be assignet to one specific group

 

Thank you

Link to comment
Share on other sites

@elpatron

Your solution is simple and elegant to change the default user group.

But how to autoassign the user group based on customer country provided when customer create account?

Something like:

 

If new customer create account, fill the addres form, dropdown select country ex:SPAIN.

After register customer to be assignet to one specific group

 

Thank you

 

We solved this with our MultiShop module which allows you assign 'default group' by country (domain) i.e. country. For example you create group 'Spain', when www.example.es enters your shop, they are assigned to default country 'Spain'. And any categories that are not assigned to group 'Spain' will not be shown.(*1)

 

(*1)..if your menu module does not check that the category is allowed for the group of the visitor...it will display the category menu, when the visitor clicks that category they will receive 'no products in category'.

 

I have planned for some time to create a standalone module allowing manipulation of group assignment...but it keeps getting pushed down the list. (currently creating a antivirus module for ps :))

 

Hope this helps

Link to comment
Share on other sites

  • 1 year later...

Hello friends,

I was wondering, how to hide specific products for visitors. 

I found out how to hide categories, but it turned our it will hide lots of products this way.

So I want to hide only some specific products to visitors.

how can I do that?

Thank you in advance and sorry for my not so good english:)

Link to comment
Share on other sites

  • 1 year later...

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...