diff --git a/buyer_assign_group.php b/buyer_assign_group.php index 5b9752cd006ed203f9953287bc62ed04aaeab74c..ebe8344d25c3d0ac5268f67afc921604398e2705 100644 --- a/buyer_assign_group.php +++ b/buyer_assign_group.php @@ -164,11 +164,15 @@ class plgVmCustomBuyer_Assign_Group extends vmCustomPlugin { 'virtuemart_shoppergroup_id'=>$groups); $user_shoppergroups_table = $userModel->getTable('vmuser_shoppergroups'); $shoppergroupData = $user_shoppergroups_table -> bindChecknStore($shoppergroupData); - $errors = $user_shoppergroups_table->getErrors(); - foreach($errors as $error){ - $this->setError($error); - vmError('Set shoppergroup '.$error); - $noError = false; + + if(!defined('VM_VERSION') or VM_VERSION < 3){ + // getErrors was removed in VM3! + $errors = $user_shoppergroups_table->getErrors(); + foreach($errors as $error){ + $this->setError($error); + vmError('Set shoppergroup '.$error); + $noError = false; + } } $user_shoppergroups_table->emptyCache(); return $noError;