Jump to content



Photo
- - - - -

Differents products by customer groups


  • Please log in to reply
8 replies to this topic

#1   goutbouyo

goutbouyo
  • Members
  • 18 posts
  • Real Name:caroline

Posted 08 March 2005 - 21:27

Hello,

I have installed the contribution B2B whose allow to set differents prices by customers groups.

But I would like that all my products are not visible by all the customers.

For example:

the professional group can see the product "xxx" but the default can't do it.

#2 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 08 March 2005 - 21:46

There is a contribution for exactly that, for B2B: Hide products from groups of customers

#3   goutbouyo

goutbouyo
  • Members
  • 18 posts
  • Real Name:caroline

Posted 09 March 2005 - 13:28

Thank you !!!

I have installed this contribution but I have this error :

1054 - Champ 'customers_group_id' inconnu dans field list

select customers_group_id from customers where customers_id = ''


#4 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 09 March 2005 - 13:35

Then it sure looks like you didn't install B2B correctly, because your customers having a customer_group_id connected with it is essential for this contribution....

#5   goutbouyo

goutbouyo
  • Members
  • 18 posts
  • Real Name:caroline

Posted 09 March 2005 - 13:39

Ok but I have this error in the admin part :
1054 - Champ 'customers_group_id' inconnu dans field list

select distinct customers_group_id, customers_group_name from customers_groups where customers_group_id != '0' order by customers_group_id


#6 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 09 March 2005 - 14:12

The sql from installing this contribution says in part:
DROP TABLE IF EXISTS customers_groups;
CREATE TABLE `customers_groups` (
  `customers_group_id` int(11) NOT NULL auto_increment,
  `customers_group_name` varchar(32) NOT NULL default '',
  `customers_group_discount` decimal(11,2) NOT NULL default '0.00',
  `color_bar` varchar(8) NOT NULL default '#FFFFFF',
  `group_payment_unallowed` varchar(255) NOT NULL default 'cc',
  `group_tax` varchar(5) NOT NULL default 'false',
  PRIMARY KEY  (`customers_group_id`)
) TYPE=MyISAM;
The error says that there is no customers_group_id in the table customers_groups and since that is not possible if you ran the install I can only conclude that the contribution is installed incorrectly (or you changed the name of that column into something else....)

#7   goutbouyo

goutbouyo
  • Members
  • 18 posts
  • Real Name:caroline

Posted 09 March 2005 - 14:15

I have found the solution.

With my B2B version there is : CUSTOMER_GROUPS
In this contribution it's : CUSTOMER_GROUP

#8   goutbouyo

goutbouyo
  • Members
  • 18 posts
  • Real Name:caroline

Posted 09 March 2005 - 14:28

I have another problem in the admin part when I edit the product :

Warning: Invalid argument supplied for foreach() in c:\web\easyphp1-8\www\catalog\admin\categories.php on line 558

It's near "Select groups to hide"

My code :
foreach($hide as $h){
  if($h == $customers_groups['customers_groups_id']){
   $check_hidden = true;
    break;
  }else{
    $check_hidden = false;
  }
 }


#9 ONLINE   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,095 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 09 March 2005 - 14:55

Better put this question in the support thread for TotalB2B. On first sight nothing seems wrong with that piece of PHP code.