News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

virtuemart_shoppergroup_id missing now?

Started by rayge, July 03, 2013, 21:56:23 PM

Previous topic - Next topic

rayge

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?
I Use: Joomla 3.4.1 & VM 3.0.9

rayge

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 Use: Joomla 3.4.1 & VM 3.0.9

Milbo

I dont understand your problem, but

$product->shoppergroups


Use vmdebug('my product',$this->product); to see what your product has for data
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rayge

#3
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.
I Use: Joomla 3.4.1 & VM 3.0.9

Milbo

vmdebug is doing a print_r for you.

If the array is emtpy, it means the product has no shoppergroups set.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/