예제 #1
0
 static function registerEvents()
 {
     $db = JFactory::getDbo();
     $db->setQuery("select * from `#__" . APP_PREFIX . "_pricing` where `enabled`=1");
     $items = $db->loadObjectList();
     foreach ($items as $item) {
         JTheFactoryEventsHelper::registerEvents(JPATH_ADMINISTRATOR . DS . 'components' . DS . APP_EXTENSION . DS . 'pricing' . DS . $item->itemname . DS . 'events');
     }
 }
예제 #2
0
 static function registerModule($app = null)
 {
     if (!$app) {
         $app = JTheFactoryApplication::getInstance();
     }
     if ($app->getIniValue('use_events')) {
         JLoader::register('JTheFactoryEvents', $app->app_path_admin . 'events/events.class.php');
         JLoader::register('JTheFactoryEventsHelper', $app->app_path_admin . 'events/events.helper.php');
         JLoader::register('JTheFactoryDispatcher', $app->app_path_admin . 'events/events.dispatcher.php');
         if ($app->frontpage) {
             JTheFactoryEventsHelper::registerEvents(JPATH_SITE . DS . 'components' . DS . APP_EXTENSION . DS . 'events');
         } else {
             JTheFactoryEventsHelper::registerEvents(JPATH_ADMINISTRATOR . DS . 'components' . DS . APP_EXTENSION . DS . 'events');
         }
     }
 }
예제 #3
0
  static function registerModule($app=null)
  {
      if (!$app)
  	   $app= JTheFactoryApplication::getInstance();
       if ($app->getIniValue('use_payment_gateways')){
          JLoader::register('JTheFactoryPricingHelper',$app->app_path_admin.'payments'.DS.'helper'.DS.'pricing.php');
          JLoader::register('JTheFactoryBalanceController',$app->app_path_front.'payments'.DS.'controllers'.DS.'balance.php');
          JLoader::register('JTheFactoryOrderProcessorController',$app->app_path_front.'payments'.DS.'controllers'.DS.'processor.php');
          JLoader::register('JTheFactoryOrder',$app->app_path_admin.'payments'.DS.'classes'.DS.'orders.php');
          if ($app->getIniValue('use_events')){
              JTheFactoryPricingHelper::registerEvents();
              JTheFactoryEventsHelper::registerEvents($app->app_path_admin.'payments'.DS.'events');
          }
          $lang=JFactory::getLanguage();
          $lang->load('thefactory.payments',JPATH_ADMINISTRATOR);
      }
 }
예제 #4
0
 static function registerModule($app = null)
 {
     if (!$app) {
         $app = JTheFactoryApplication::getInstance();
     }
     if ($app->getIniValue('use_payment_gateways')) {
         JLoader::register('JTheFactoryPricingHelper', $app->app_path_admin . 'payments' . DS . 'helper' . DS . 'pricing.php');
         JLoader::register('JTheFactoryPaymentsHtmlHelper', $app->app_path_admin . 'payments' . DS . 'helper' . DS . 'paymentshtml.php');
         JLoader::register('JTheFactoryBalancesController', $app->app_path_admin . 'payments' . DS . 'controllers' . DS . 'balances.php');
         JLoader::register('JTheFactoryCurrenciesController', $app->app_path_admin . 'payments' . DS . 'controllers' . DS . 'currencies.php');
         JLoader::register('JTheFactoryGatewaysController', $app->app_path_admin . 'payments' . DS . 'controllers' . DS . 'gateways.php');
         JLoader::register('JTheFactoryOrdersController', $app->app_path_admin . 'payments' . DS . 'controllers' . DS . 'orders.php');
         JLoader::register('JTheFactoryPricingController', $app->app_path_admin . 'payments' . DS . 'controllers' . DS . 'pricing.php');
         if ($app->getIniValue('use_events')) {
             JTheFactoryPricingHelper::registerEvents();
             JTheFactoryEventsHelper::registerEvents($app->app_path_admin . 'payments' . DS . 'events');
         }
     }
 }