Hello, I had the same problem after upgrading 1.1.9 to 2.0.2
I got the Info "Attention no standard shopper group set";
also the Notice: Notice: Trying to get property of non-object in /home/tkuschel/workspaces/cms/joomla/administrator/components/com_virtuemart/views/user/view.html.php on line 232
In the backend, I got only my three Shopper Groups from the 1.1.9 version, but no -anonymous- group there.
First I reordered my table with the following SQL:
UPDATE `jos_virtuemart_shoppergroups` SET `virtuemart_shoppergroup_id` = `virtuemart_shoppergroup_id` +1 WHERE 1 ORDER BY `virtuemart_shoppergroup_id` DESC;
Now all other shopper groups are incremented by 1, then I added an "-anonymous-" group with the values
virtuemart_shoppergroup_id = 1, virtuemart_vendor_id = 1, shopper_group_name = "-anonymous-", and default=2;
INSERT INTO `cms`.`jos_virtuemart_shoppergroups` (`virtuemart_shoppergroup_id` ,`virtuemart_vendor_id` ,`shopper_group_name` ,`shopper_group_desc` ,`custom_price_display` ,`price_display` ,
`default` ,`ordering` ,`shared` ,`published` ,`created_on` ,`created_by` ,`modified_on` ,`modified_by` ,`locked_on` ,`locked_by`)
VALUES ('1', '1', '-anonymous-', 'This is an anonymous group.', '0', NULL , '2', '0', '0', '0', '2012-02-29 14:00:00', '42', '2012-02-29 14:00:00', '42', '0000-00-00 00:00:00', '0');
So I got rid off these messages, any further steps?
The postings before, to change the line 133 in shoppergroup.php would have side effects. The function getDefault() is used to get either the default or the anonymous shopper group.
BUT: there may be done a REWORK inside the shoppergroup.php; There is in line 153 / 159 also a bug??
$defaultSgId = $this->getDefault(0);
$anonymSgId = $this->getDefault(1);
foreach($ids as $id){
//Test if shoppergroup is default
if($id == $defaultId->virtuemart_shoppergroup_id){
The first generated object $defaultSgId is never used in this function / and the test is with an object $defaultId :-(
Seen in Version VM 2.0.2
Regards
Thomas