[*] BO : Add reduction groups in the categories, and bug fix: reduction that is not an integer or a percentage (TD001 - TD002 - TD003)
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8536 b9a71923-0436-4b27-9f14-aed3839534dd
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