public function testCfg() { // System / Configuration $this->assertTrue(is_array(Praxigento_Quickorder_Config::cfgCustomerGroupsAllowed())); $this->assertTrue(is_array(Praxigento_Quickorder_Config::cfgSearchAttributes())); $this->assertTrue(is_bool(Praxigento_Quickorder_Config::cfgOutOfStockEnabled())); $this->assertTrue(is_bool(Praxigento_Quickorder_Config::cfgInvisibleIncluded())); $this->assertTrue(is_bool(Praxigento_Quickorder_Config::cfgComplexProdsIncluded())); $this->assertTrue(is_string(Praxigento_Quickorder_Config::cfgSortAttr())); $this->assertTrue(is_string(Praxigento_Quickorder_Config::cfgSortOrder())); }
public function canSeeQuickOrderForm() { $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId(); $allowedGroupIds = Praxigento_Quickorder_Config::cfgCustomerGroupsAllowed(); if (count($allowedGroupIds) == 0) { /** QOF-15 there is no configiration setup yet - enable all groups*/ $result = true; } else { $result = in_array($groupId, $allowedGroupIds); } return $result; }