It seems that this doesnt work now with 2.0.21g.
I cannot find the shopper group using $this->product->virtuemart_shoppergroup_id
Now. Does anyone know what has changed and how to get the ID?
OK scouring the code i found this.
$usermodel = VmModel::getModel ('user');
$currentVMuser = $usermodel->getCurrentUser ();
and to get the groups attached to a user I can use this.
$currentVMuser->shopper_groups;
this wont change anytime soon yes?
I dont understand your problem, but
$product->shoppergroups
Use vmdebug('my product',$this->product); to see what your product has for data
I am working inside default_showprices.php
$this->product->shoppergroups
is ahowing an empty array
vmdebug did nothing so maybe im doing it wrong?
I can copy and paste output from
echo "<pre>";
print_r($this->product);
echo "</pre>";
if you like.
vmdebug is doing a print_r for you.
If the array is emtpy, it means the product has no shoppergroups set.