Commit 4dd27bf1 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Fix issues with VM3 (errors are removed)

parent 259b0ae6
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment