Пример #1
0
 /**
  * Read the sidebars from our modules table into an array for use in our main.php template
  * @param none
  * @return none
  */
 protected function buildSidebars()
 {
     $this->arrSidebars = Modules::getModulesByCategory();
 }
Пример #2
0
 /**
  * Check if the necessary checkout modules are active.
  *
  * @return array $errors - messages of the errors based on the module.
  */
 public static function checkAllModulesConfigured()
 {
     $errors = array();
     if (count(Modules::getModulesByCategory(true, 'payment')) === 0) {
         array_push($errors, 'There are no active payment methods.');
     }
     if (count(Modules::getModulesByCategory(true, 'shipping')) === 0) {
         array_push($errors, 'There are no active shipping methods.');
     }
     if (count(Destination::model()->findAll()) === 0) {
         array_push($errors, 'Destinations are not configured.');
     }
     return $errors;
 }