I can't figure out how to access the shopper group of a user. I tried print_r($user) and it has no reference to shopper group.
I've searched google for hours and the forum for hours, and the documentation, but none of it seems to answer this. At least as far as I found.
Any help would be much appreciated.
The Shopper Group is displayed in domain/administrator/index.php?option=com_virtuemart&view=user
I meant in code, we have certain functions we want to run when a user of a specific shopper group buys specific items etc.
In virtuemart 1.5 we used
$_SESSION['auth']['shopper_group_id']
A print out of $_SESSION now shows this blurb " [_authGroups:protected] => Array (
- => 1 [1] => 2 ) [_authLevels:protected] => Array (
- => 1 [1] => 1 [2] => 2 )"
In the Virtuemart -> Orders & Shoppers -> Shoppers tab, the account I was using for testing is listed as
Group: shopper
Shopper Group: Wholesale (which has an ID of 5)
So I'm not sure how I can pull the user's shopper group? Unless I'm just supposed to do a sql query ?
http://forum.virtuemart.net/index.php?topic=101901.msg339146#msg339146
Of course I would search shopper group with a space and not find it...
In that case something went wrong with my migration because I started working on some sql of my own but only the admin shows up in the #__virtuemart_vmuser_shoppergroups
Awesome.