Răsfoiți Sursa

#259 - Payment system: Core changes.

AntonLV 10 ani în urmă
părinte
comite
4fae00fe38

+ 3 - 3
cart.php

@@ -14,11 +14,11 @@ bx_import('BxDolLanguages');
 
 check_logged();
 
-$sUrl = BxDolPayments::getInstance()->getCartUrl();
-if(empty($sUrl))
+$sLink = BxDolPayments::getInstance()->getCartLink();
+if(empty($sLink))
 	BxDolTemplate::getInstance()->displayPageNotFound();
 
-header('Location: ' . $sUrl);
+header('Location: ' . $sLink);
 exit;
 
 /** @} */

+ 1 - 28
inc/classes/BxDolAcl.php

@@ -541,33 +541,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton
         return true;
     }
 
-    /**
-     * Define action, defining all names are translated the following way:
-     *  my action => BX_MY_ACTION
-     *
-     * @param $aActions array of actions from sys_acl_actions table, with default array keys (starting from 0) and text values
-     */
-    function defineMembershipActions($mixedActions, $sPrefix = 'BX_')
-    {
-        if (is_array($mixedActions))
-            $aActions = $mixedActions;
-        else
-            $aActions = array($mixedActions);
-
-        $aNames = array();
-        foreach ($aActions as $sName)
-            if(!defined($sPrefix . strtoupper(str_replace(' ', '_', $sName))))
-                $aNames[] = $sName;
-
-        if(!$aNames)
-            return;
-
-        $aActions = array();
-        $this->oDb->getActions(array('type' => 'by_names', 'value' => $aNames), $aActions, false);
-        foreach($aActions as $aAction)
-            define($sPrefix . strtoupper(str_replace(' ', '_', $aAction['name'])), $aAction['id']);
-    }
-
     /**
      * get action id by module and name
      * @param $sAction action name
@@ -699,7 +672,7 @@ function checkActionModule($iProfileId, $sActionName, $sModuleName, $bPerformAct
 
     $iActionId = $oACL->getMembershipActionId($sActionName, $sModuleName);
 
-    return BxDolAcl::getInstance()->checkAction($iProfileId, $iActionId, $bPerformAction);
+    return $oACL->checkAction($iProfileId, $iActionId, $bPerformAction);
 }
 
 /** @} */

+ 25 - 24
inc/classes/BxDolPayments.php

@@ -85,73 +85,74 @@ class BxDolPayments extends BxDol implements iBxDolSingleton
     	return BxDolService::call($this->_sActive, 'get_option', array($sOption));
     }
 
-    public function getOrdersUrl()
+    public function getOrdersLink()
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_orders_url'))
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_orders_link', 'Orders'))
     		return '';
 
-    	return BxDolService::call($this->_sActive, 'get_orders_url');
+    	return BxDolService::call($this->_sActive, 'get_orders_link', array(), 'Orders');
     }
 
-    public function getCartUrl()
+    public function getOrdersCount($sType)
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_url'))
-    		return '';
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_orders_count_new', 'Orders'))
+    		return array();
 
-    	return BxDolService::call($this->_sActive, 'get_cart_url');
+		$aSrvParams = array($sType);
+		return BxDolService::call($this->_sActive, 'get_orders_count_new', $aSrvParams, 'Orders');
     }
 
-    public function getCartItems()
+    public function getCartLink()
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_items'))
-    		return MsgBox(_t('_sys_txt_empty'));
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_link', 'Cart'))
+    		return '';
 
-    	return BxDolService::call($this->_sActive, 'get_cart_items');
+    	return BxDolService::call($this->_sActive, 'get_cart_link', array(), 'Cart');
     }
 
-    public function getCartItemCount($iUserId, $iOldCount = 0)
+    public function getCartItemsCount()
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_item_count'))
-    		return array('count' => 0, 'messages' => array());
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_items_count', 'Cart'))
+    		return array();
 
-		$aSrvParams = array($iUserId, $iOldCount);
-    	return BxDolService::call($this->_sActive, 'get_cart_item_count', $aSrvParams);
+		$aSrvParams = array();
+		return BxDolService::call($this->_sActive, 'get_cart_items_count', $aSrvParams, 'Cart');
     }
 
     public function getCartItemDescriptor($iVendorId, $iModuleId, $iItemId, $iItemCount)
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_item_descriptor'))
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_item_descriptor', 'Cart'))
     		return '';
 
     	$aSrvParams = array($iVendorId, $iModuleId, $iItemId, $iItemCount);
-		return BxDolService::call($this->_sActive, 'get_cart_item_descriptor', $aSrvParams);
+		return BxDolService::call($this->_sActive, 'get_cart_item_descriptor', $aSrvParams, 'Cart');
     }
     
     public function getCartJs($bWrapped = true)
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_js'))
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_cart_js', 'Cart'))
 			return '';
 
 		$aSrvParams = array($bWrapped);
-		return BxDolService::call($this->_sActive, 'get_cart_js', $aSrvParams);
+		return BxDolService::call($this->_sActive, 'get_cart_js', $aSrvParams, 'Cart');
     }
 
     public function getAddToCartJs($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect = false, $bWrapped = true)
     {
-    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_js'))
+    	if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_js', 'Cart'))
 			return array();
 
 		$aSrvParams = array($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect, $bWrapped);
-		return BxDolService::call($this->_sActive, 'get_add_to_cart_js', $aSrvParams);
+		return BxDolService::call($this->_sActive, 'get_add_to_cart_js', $aSrvParams, 'Cart');
     }
 
     public function getAddToCartLink($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect = false)
     {
-		if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_link'))
+		if(!BxDolRequest::serviceExists($this->_sActive, 'get_add_to_cart_link', 'Cart'))
 			return '';
 
 		$aSrvParams = array($iVendorId, $mixedModuleId, $iItemId, $iItemCount, $bNeedRedirect);
-		return BxDolService::call($this->_sActive, 'get_add_to_cart_link', $aSrvParams);
+		return BxDolService::call($this->_sActive, 'get_add_to_cart_link', $aSrvParams, 'Cart');
     }
 
     public function initializeCheckout($iVendorId, $sProvider, $aItems = array())

+ 5 - 1
inc/js/classes/BxDolGrid.js

@@ -16,7 +16,11 @@ function BxDolGrid (sObject, oOptions) {
     this._sOrderField = undefined == oOptions.order_field ? '' : oOptions.order_field;
     this._sOrderDir = undefined == oOptions.order_dir ? 'ASC' : oOptions.order_dir;
     this._sSearchInputText = undefined == oOptions.text_search_input ? '' : oOptions.text_search_input;
-    this._oPopupOptions = oOptions.popup_options || {};
+    this._oPopupOptions = $.extend({
+    	onBeforeShow: function(oElement) {
+    		jQuery(oElement).bxTime();
+    	}
+    }, oOptions.popup_options);
     this._oQueryAppend = oOptions.query_append;
     this._oConfirmMessages = oOptions.confirm_messages;
 

+ 5 - 0
install/sql/system.sql

@@ -2831,6 +2831,11 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 ('sys_account_links', 'system', 'studio', '_sys_menu_item_title_system_studio', '_sys_menu_item_title_studio', '{studio_url}', '', '', 'wrench', '', 2147483646, 1, 0, 5),
 ('sys_account_links', 'system', 'logout', '_sys_menu_item_title_system_logout', '_sys_menu_item_title_logout', 'logout.php', '', '', 'sign-out', '', 2147483646, 1, 1, 6);
 
+-- notifications menu in account popup
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_account_notifications', 'system', 'cart', '_sys_menu_item_title_system_cart', '_sys_menu_item_title_cart', 'cart.php', '', '', 'cart-plus col-red3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_cart_items_count";s:6:"params";a:0:{}s:5:"class";s:21:"TemplPaymentsServices";}', '', 2147483646, 1, 1, 1),
+('sys_account_notifications', 'system', 'orders', '_sys_menu_item_title_system_orders', '_sys_menu_item_title_orders', 'orders.php', '', '', 'cart-arrow-down col-green3', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_orders_count";s:6:"params";a:1:{i:0;s:3:"new";}s:5:"class";s:21:"TemplPaymentsServices";}', '', 2147483646, 1, 1, 2);
+
 -- account settings menu
 INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
 ('sys_account_settings', 'system', 'account-settings-profile-context', '_sys_menu_item_title_system_account_profile_context', '_sys_menu_item_title_account_profile_context', 'page.php?i=account-profile-switcher', '', '', 'user', '', 2147483646, 1, 1, 1),

+ 3 - 3
modules/base/general/classes/BxBaseModGeneralConfig.php

@@ -15,7 +15,7 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
 
     protected $_aObjects;
     protected $_aPrefixes;
-    protected $_aJsClass;
+    protected $_aJsClasses;
     protected $_aJsObjects;
     protected $_aGridObjects;
 
@@ -25,7 +25,7 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
 
         $this->_aObjects = array();
         $this->_aPrefixes = array();
-        $this->_aJsClass = array();
+        $this->_aJsClasses = array();
         $this->_aJsObjects = array();
         $this->_aGridObjects = array();
     }
@@ -48,7 +48,7 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
 
 	public function getJsClass($sType)
     {
-        return isset($this->_aJsClass[$sType]) ? $this->_aJsClass[$sType] : '';
+        return isset($this->_aJsClasses[$sType]) ? $this->_aJsClasses[$sType] : '';
     }
 
     public function getJsObject($sType)

+ 1 - 1
modules/base/notifications/classes/BxBaseModNotificationsConfig.php

@@ -46,7 +46,7 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
         $this->_aHandlersHidden = array();
         $this->_aHandlers = array();
 
-		$this->_aJsClass = array();
+		$this->_aJsClasses = array();
 		$this->_aJsObjects = array();
 
 		$this->_aPerPage = array();

+ 1 - 1
modules/boonex/accounts/classes/BxAccntConfig.php

@@ -45,7 +45,7 @@ class BxAccntConfig extends BxBaseModGeneralConfig
         	'alert' => $this->_sName,
         );
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'manage_tools' => 'BxAccntManageTools'
         );
 

+ 1 - 1
modules/boonex/albums/classes/BxAlbumsConfig.php

@@ -128,7 +128,7 @@ class BxAlbumsConfig extends BxBaseModTextConfig
             ),
         );
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'manage_tools' => 'BxAlbumsManageTools'
         );
 

+ 4 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -1819,6 +1819,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_menu_item_title_account_settings_info"><![CDATA[Account]]></string>
 	<string name="_sys_menu_item_title_account_settings_pwd"><![CDATA[Password]]></string>
 	<string name="_sys_menu_item_title_add_content"><![CDATA[Add...]]></string>
+	<string name="_sys_menu_item_title_cart"><![CDATA[Cart]]></string>
 	<string name="_sys_menu_item_title_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_cmts_item_edit"><![CDATA[Edit]]></string>
 	<string name="_sys_menu_item_title_cmts_item_reply"><![CDATA[Reply]]></string>
@@ -1827,6 +1828,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_menu_item_title_home"><![CDATA[Home]]></string>
 	<string name="_sys_menu_item_title_logout"><![CDATA[Sign out]]></string>
 	<string name="_sys_menu_item_title_more"><![CDATA[More]]></string>
+	<string name="_sys_menu_item_title_orders"><![CDATA[Orders]]></string>
 	<string name="_sys_menu_item_title_profile"><![CDATA[Profile]]></string>
 	<string name="_sys_menu_item_title_set_acl_level"><![CDATA[Set membership]]></string>
 	<string name="_sys_menu_item_title_studio"><![CDATA[Studio]]></string>
@@ -1842,6 +1844,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_menu_item_title_system_account_settings_info"><![CDATA[Account]]></string>
 	<string name="_sys_menu_item_title_system_account_settings_pwd"><![CDATA[Password]]></string>
 	<string name="_sys_menu_item_title_system_add_content"><![CDATA[Add Content]]></string>
+	<string name="_sys_menu_item_title_system_cart"><![CDATA[Cart]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_delete"><![CDATA[Delete]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_edit"><![CDATA[Edit]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_reply"><![CDATA[Reply]]></string>
@@ -1852,6 +1855,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_menu_item_title_system_logout"><![CDATA[Sign out]]></string>
 	<string name="_sys_menu_item_title_system_main_menu"><![CDATA[Main Menu]]></string>
 	<string name="_sys_menu_item_title_system_more"><![CDATA[More]]></string>
+	<string name="_sys_menu_item_title_system_orders"><![CDATA[Orders]]></string>
 	<string name="_sys_menu_item_title_system_profile"><![CDATA[Profile]]></string>
 	<string name="_sys_menu_item_title_system_search"><![CDATA[Search]]></string>
 	<string name="_sys_menu_item_title_system_set_acl_level"><![CDATA[Set membership]]></string>

+ 1 - 1
modules/boonex/invites/classes/BxInvConfig.php

@@ -53,7 +53,7 @@ class BxInvConfig extends BxBaseModGeneralConfig
         $this->_sRequestsEmail = '';
         $this->_bRegistrationByInvitation = true;
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'main' => 'BxInvMain',
         );
         $this->_aJsObjects = array(

+ 1 - 1
modules/boonex/notifications/classes/BxNtfsConfig.php

@@ -35,7 +35,7 @@ class BxNtfsConfig extends BxBaseModNotificationsConfig
         $this->_aHandlerDescriptor = array('module_name' => '', 'module_method' => '', 'module_class' => '');
         $this->_sHandlersMethod = 'get_notifications_data';
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
             'main' => 'BxNtfsMain',
         	'view' => 'BxNtfsView',
         );

+ 1 - 1
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -134,7 +134,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
 
         );
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'manage_tools' => 'BxOrgsManageTools'
         );
 

+ 1 - 1
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -134,7 +134,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
 
         );
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'manage_tools' => 'BxPersonsManageTools'
         );
 

+ 1 - 1
modules/boonex/posts/classes/BxPostsConfig.php

@@ -113,7 +113,7 @@ class BxPostsConfig extends BxBaseModTextConfig
             ),
         );
 
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
         	'manage_tools' => 'BxPostsManageTools'
         );
 

+ 4 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -1819,6 +1819,7 @@
 	<string name="_sys_menu_item_title_account_settings_info"><![CDATA[Аккаунт]]></string>
 	<string name="_sys_menu_item_title_account_settings_pwd"><![CDATA[Пароль]]></string>
 	<string name="_sys_menu_item_title_add_content"><![CDATA[Добавить...]]></string>
+	<string name="_sys_menu_item_title_cart"><![CDATA[Корзина]]></string>
 	<string name="_sys_menu_item_title_cmts_item_delete"><![CDATA[Удалить]]></string>
 	<string name="_sys_menu_item_title_cmts_item_edit"><![CDATA[Редактировать]]></string>
 	<string name="_sys_menu_item_title_cmts_item_reply"><![CDATA[Ответить]]></string>
@@ -1827,6 +1828,7 @@
 	<string name="_sys_menu_item_title_home"><![CDATA[Домой]]></string>
 	<string name="_sys_menu_item_title_logout"><![CDATA[Выйти]]></string>
 	<string name="_sys_menu_item_title_more"><![CDATA[Ещё]]></string>
+	<string name="_sys_menu_item_title_orders"><![CDATA[Заказы]]></string>
 	<string name="_sys_menu_item_title_profile"><![CDATA[Профиль]]></string>
 	<string name="_sys_menu_item_title_set_acl_level"><![CDATA[Назначить членство]]></string>
 	<string name="_sys_menu_item_title_studio"><![CDATA[Студия]]></string>
@@ -1842,6 +1844,7 @@
 	<string name="_sys_menu_item_title_system_account_settings_info"><![CDATA[Аккаунт]]></string>
 	<string name="_sys_menu_item_title_system_account_settings_pwd"><![CDATA[Пароль]]></string>
 	<string name="_sys_menu_item_title_system_add_content"><![CDATA[Добавить Содержимое]]></string>
+	<string name="_sys_menu_item_title_system_cart"><![CDATA[Корзина]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_delete"><![CDATA[Удалить]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_edit"><![CDATA[Редактировать]]></string>
 	<string name="_sys_menu_item_title_system_cmts_item_reply"><![CDATA[Ответить]]></string>
@@ -1852,6 +1855,7 @@
 	<string name="_sys_menu_item_title_system_logout"><![CDATA[Выйти]]></string>
 	<string name="_sys_menu_item_title_system_main_menu"><![CDATA[Главное Меню]]></string>
 	<string name="_sys_menu_item_title_system_more"><![CDATA[Ещё]]></string>
+	<string name="_sys_menu_item_title_system_orders"><![CDATA[Заказы]]></string>
 	<string name="_sys_menu_item_title_system_profile"><![CDATA[Профиль]]></string>
 	<string name="_sys_menu_item_title_system_search"><![CDATA[Поиск]]></string>
 	<string name="_sys_menu_item_title_system_set_acl_level"><![CDATA[Назначить членство]]></string>

+ 1 - 1
modules/boonex/timeline/classes/BxTimelineConfig.php

@@ -96,7 +96,7 @@ class BxTimelineConfig extends BxBaseModNotificationsConfig
         $this->_aVideoUploaders = array($this->_sName . '_simple_video');
 
         $this->_bJsMode = false;
-        $this->_aJsClass = array(
+        $this->_aJsClasses = array(
             'main' => 'BxTimelineMain',
             'view' => 'BxTimelineView',
             'post' => 'BxTimelinePost',

+ 3 - 3
orders.php

@@ -14,11 +14,11 @@ bx_import('BxDolLanguages');
 
 check_logged();
 
-$sUrl = BxDolPayments::getInstance()->getOrdersUrl();
-if(empty($sUrl))
+$sLink = BxDolPayments::getInstance()->getOrdersLink();
+if(empty($sLink))
 	BxDolTemplate::getInstance()->displayPageNotFound();
 
-header('Location: ' . $sUrl);
+header('Location: ' . $sLink);
 exit;
 
 /** @} */

+ 2 - 2
template/scripts/BxBaseAccountForms.php

@@ -38,7 +38,7 @@ class BxBaseAccountForms extends BxDolProfileForms
         return BxDolForm::getObjectInstance('sys_account', 'sys_account_settings_del_account');
     }
 
-    public function createAccountForm ()
+    public function createAccountForm ($aParams = array())
     {
         // check access
         if (CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = BxDolAccount::isAllowedCreate (0)))
@@ -49,7 +49,7 @@ class BxBaseAccountForms extends BxDolProfileForms
         if (!$oForm)
             return MsgBox(_t('_sys_txt_error_occured'));
 
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
+        $oForm->aFormAttrs['action'] = !empty($aParams['action']) ? $aParams['action'] : BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
         $oForm->initChecker(self::$PROFILE_FIELDS);
 
         if (!$oForm->isSubmittedAndValid()) {

+ 20 - 6
template/scripts/BxBaseMenuAccountNotifications.php

@@ -29,12 +29,26 @@ class BxBaseMenuAccountNotifications extends BxTemplMenu
         if (!BxDolAcl::getInstance()->isMemberLevelInSet($a['visible_for_levels']))
             return false;
 
-        // show only friends for currently active profile for friend request notification
-        if ('notifications-friend-requests' == $a['name'] || 'profile-stats-friend-requests' == $a['name']) {
-            $oProfile = BxDolProfile::getInstance();
-            $aInfo = $oProfile->getInfo();
-            if ($a['module'] != $aInfo['type'])
-                return false;
+        switch ($a['name']) {
+        	case 'cart':
+        		$oPayments = BxDolPayments::getInstance();
+        		if(!$oPayments->isActive())
+        			return false;
+        		break;
+
+        	case 'orders':
+        		$oPayments = BxDolPayments::getInstance();
+        		if(!$oPayments->isActive())
+        			return false;
+        		break;
+
+			// show only friends for currently active profile for friend request notification
+        	case 'notifications-friend-requests':
+        	case 'profile-stats-friend-requests':
+	            $aInfo = BxDolProfile::getInstance()->getInfo();
+	            if($a['module'] != $aInfo['type'])
+	                return false;
+				break;
         }
 
         return true;

+ 10 - 0
template/scripts/BxBasePaymentsServices.php

@@ -21,6 +21,16 @@ class BxBasePaymentsServices extends BxDol
     {
         return BxDolPayments::getInstance()->getPayments();
     }
+
+    public function serviceGetCartItemsCount()
+    {
+    	return BxDolPayments::getInstance()->getCartItemsCount();
+    }
+
+    public function serviceGetOrdersCount($sType)
+    {
+    	return BxDolPayments::getInstance()->getOrdersCount($sType);
+    }
 }
 
 /** @} */

+ 2 - 2
template/scripts/BxBaseServiceAccount.php

@@ -23,9 +23,9 @@ class BxBaseServiceAccount extends BxDol
         $this->_oAccountQuery = BxDolAccountQuery::getInstance();
     }
 
-    public function serviceCreateAccountForm ()
+    public function serviceCreateAccountForm ($aParams = array())
     {
-        return $this->_oAccountForms->createAccountForm();
+        return $this->_oAccountForms->createAccountForm($aParams);
     }
 
     public function serviceAccountSettingsEmail ($iAccountId = false)