[*] 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:
lLefevre
2011-09-13 13:17:32 +00:00
parent fc7612f010
commit 5cae5358fa
5 changed files with 40 additions and 7 deletions
+12
View File
@@ -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.