[*] BO : Add reduction groups in the categories, and bug fix: reduction that is not an integer or a percentage (TD001 - TD002 - TD003)
This commit is contained in:
@@ -849,6 +849,18 @@ class CategoryCore extends ObjectModel
|
||||
$groups[] = $group['id_group'];
|
||||
return $groups;
|
||||
}
|
||||
|
||||
public function addGroupsIfNoExist($id_group)
|
||||
{
|
||||
$groups = $this->getGroups();
|
||||
p($groups);
|
||||
foreach($groups as $group){
|
||||
if($group != $id_group)
|
||||
return false;
|
||||
else
|
||||
$this->addGroups(array((int)($id_group)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* checkAccess return true if id_customer is in a group allowed to see this category.
|
||||
|
||||
Reference in New Issue
Block a user