- Class name: PaymentModuleCore
- This is an abstract class
- Parent class: Module
- Source: classes/PaymentModule.php line 28
- $currencies
- $currencies_mode
- $currentOrder
- $_INSTANCE
- $_confirmations
- $_errors
- $_generate_config_xml_mode
- $_lang
- $_path
- $active
- $author
- $cache_permissions
- $classInModule
- $context
- $dependencies
- $description
- $displayName
- $exceptionsCache
- $id
- $identifier
- $l_cache
- $limited_countries
- $local_path
- $modules_cache
- $name
- $need_instance
- $ps_versions_compliancy
- $registered_version
- $smarty
- $tab
- $table
- $version
- $warning
- __construct
- _clearCache
- _generateConfigXml
- _getApplicableTemplateDir
- _getFormatedAddress
- _getTxtFormatedAddress
- _isTemplateOverloaded
- _isTemplateOverloadedStatic
- addCurrencyPermissions
- cleanPositions
- configXmlStringFormat
- disable
- disableByName
- display
- displayConfirmation
- displayError
- displayFlags
- editExceptions
- enable
- enableByName
- findTranslation
- getAuthorizedModules
- getConfirmations
- getCurrency
- getErrors
- getExceptions
- getInstalledPaymentModules
- getInstanceById
- getInstanceByName
- getLocalPath
- getModuleIdByName
- getModuleName
- getModuleNameFromClass
- getModulesDirOnDisk
- getModulesInstalled
- getModulesOnDisk
- getNonNativeModuleList
- getPathUri
- getPaymentModules
- getPermission
- getPermissionStatic
- getTemplatePath
- hookExec
- hookExecPayment
- initUpgradeModule
- install
- isCached
- isHookableOn
- isInstalled
- isRegisteredInHook
- l
- loadUpgradeVersionList
- needUpgrade
- preCall
- registerExceptions
- registerHook
- runUpgradeModule
- setUpgradeMessage
- sqlShopRestriction
- uninstall
- unregisterExceptions
- unregisterHook
- updatePosition
- validateOrder
public mixed $currencies = true
- Visibility: public
- Source: classes/PaymentModule.php line 32.
public mixed $currencies_mode = 'checkbox'
- Visibility: public
- Source: classes/PaymentModule.php line 33.
public integer $currentOrder
- Visibility: public
- Source: classes/PaymentModule.php line 31.
protected \protected $_INSTANCE = array()
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 105.
protected \protected $_confirmations = array()
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 93.
protected \protected $_errors = array()
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 90.
protected \protected $_generate_config_xml_mode = false
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 108.
protected array $_lang = array()
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 79.
protected string $_path = null
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 82.
public boolean $active = false
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 67.
public string $author
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 58.
protected \protected $cache_permissions = array()
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 114.
public array $classInModule = array()
- Visibility: public
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 76.
protected \Context $context
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 117.
public array $dependencies = array()
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 46.
public string $description
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 55.
public string $displayName
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 52.
protected mixed $exceptionsCache = null
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 1395.
public integer $id = null
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 31.
protected \protected $identifier = 'id_module'
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 99.
protected \protected $l_cache = array()
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 111.
public array $limited_countries = array()
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 73.
protected string $local_path = null
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 87.
protected \protected $modules_cache
- Visibility: protected
- This property is static.
- This property is defined by ModuleCore.
- Source: classes/Module.php line 102.
public string $name
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 49.
public integer $need_instance = 1
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 61.
public array $ps_versions_compliancy = array('min' => '1.4', 'max' => '1.6')
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 43.
public string $registered_version
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 40.
protected \Smarty_Data $smarty
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 120.
public string $tab = null
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 64.
protected \protected $table = 'module'
- Visibility: protected
- This property is defined by ModuleCore.
- Source: classes/Module.php line 96.
public float $version
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 34.
public string $warning
- Visibility: public
- This property is defined by ModuleCore.
- Source: classes/Module.php line 70.
mixed ModuleCore::__construct(string $name, \Context $context)
Constructor
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 128
- $name string - Module unique name
- $context Context
mixed ModuleCore::_clearCache($template, $cacheId, $compileId)
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1530
- $template mixed
- $cacheId mixed
- $compileId mixed
mixed ModuleCore::_generateConfigXml()
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1535
mixed ModuleCore::_getApplicableTemplateDir($template)
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1518
- $template mixed
String PaymentModuleCore::_getFormatedAddress(\Address $the_address, $line_sep, $fields_style)
- Visibility: protected
- Source: classes/PaymentModule.php line 536
- $the_address Address
- $line_sep mixed
- $fields_style mixed
String PaymentModuleCore::_getTxtFormatedAddress($the_address)
- Visibility: protected
- Source: classes/PaymentModule.php line 512
- $the_address mixed
mixed ModuleCore::_isTemplateOverloaded($template)
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1470
- $template mixed
mixed ModuleCore::_isTemplateOverloadedStatic($module_name, $template)
- Visibility: protected
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1459
- $module_name mixed
- $template mixed
boolean PaymentModuleCore::addCurrencyPermissions(integer $id_currency, array $id_module_list)
Allows specified payment modules to be used by a specific currency
- Visibility: public
- This method is static.
- Source: classes/PaymentModule.php line 581
- $id_currency integer
- $id_module_list array
mixed ModuleCore::cleanPositions($id_hook, $shop_list)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1345
- $id_hook mixed
- $shop_list mixed
mixed ModuleCore::configXmlStringFormat($string)
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 832
- $string mixed
mixed ModuleCore::disable(boolean $forceAll)
Desactivate current module.
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 536
- $forceAll boolean - If true, disable module for all shop
true ModuleCore::disableByName(array|string $name)
This function disable module $name. If an $name is an array, this will disable all of them
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 518
- $name array|string
mixed ModuleCore::display($file, $template, $cacheId, $compileId)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1475
- $file mixed
- $template mixed
- $cacheId mixed
- $compileId mixed
mixed ModuleCore::displayConfirmation($string)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1380
- $string mixed
mixed ModuleCore::displayError($error)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1370
- $error mixed
mixed ModuleCore::displayFlags(array $languages, integer $default_language, string $ids, string $id, boolean $return, boolean $use_vars_instead_of_ids)
Display flags in forms for translations
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 553
- $languages array - All languages available
- $default_language integer - Default language id
- $ids string - Multilingual div ids in form
- $id string - Current div id]
- $return boolean - define the return way : false for a display, true for a return
- $use_vars_instead_of_ids boolean - use an js vars instead of ids seperate by "¤"
boolean ModuleCore::editExceptions($id_hook, array $excepts)
Edit exceptions for module->Hook
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 731
- $id_hook mixed
- $excepts array - List of shopID and file name
mixed ModuleCore::enable(boolean $forceAll)
Activate current module.
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 487
- $forceAll boolean - If true, enable module for all shop
true ModuleCore::enableByName(array|string $name)
This function enable module $name. If an $name is an array, this will enable all of them
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 471
- $name array|string
string ModuleCore::findTranslation(string $name, string $string, string $source)
find translation from $_MODULES and put it in self::$l_cache if not already exist and return it.
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1228
- $name string - name of the module
- $string string - term to find
- $source string - additional param for building translation key
mixed ModuleCore::getAuthorizedModules($group_id)
Get Unauthorized modules for a client group
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1608
- $group_id mixed
array ModuleCore::getConfirmations()
Get module messages confirmation
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1643
\Currency PaymentModuleCore::getCurrency($current_id_currency)
- Visibility: public
- Source: classes/PaymentModule.php line 545
- $current_id_currency mixed
array ModuleCore::getErrors()
Get module errors
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1632
mixed ModuleCore::getExceptions($hookID, $dispatch)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1396
- $hookID mixed
- $dispatch mixed
array PaymentModuleCore::getInstalledPaymentModules()
List all installed and active payment modules
- Visibility: public
- This method is static.
- Source: classes/PaymentModule.php line 613
\Module ModuleCore::getInstanceById(integer $id_module)
Return an instance of the specified module
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 813
- $id_module integer - Module ID
\Module ModuleCore::getInstanceByName(string $module_name)
Return an instance of the specified module
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 791
- $module_name string - Module name
string ModuleCore::getLocalPath()
Get local path for module
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1654
integer ModuleCore::getModuleIdByName($name)
Get id module by name
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1621
- $name mixed
mixed ModuleCore::getModuleName($module)
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 838
- $module mixed
boolean|string ModuleCore::getModuleNameFromClass(mixed $currentClass)
This function is used to determine the module name of an AdminTab which belongs to a module, in order to keep translation related to a module in its directory (instead of $_LANGADM)
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 753
- $currentClass mixed - the
array ModuleCore::getModulesDirOnDisk()
Return modules directory list
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1098
array ModuleCore::getModulesInstalled(integer $position)
Return installed modules
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1145
- $position integer - Take only positionnables modules
array ModuleCore::getModulesOnDisk(boolean $useConfig, $loggedOnAddons)
Return available modules
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 873
- $useConfig boolean - in order to use config.xml file in module dir
- $loggedOnAddons mixed
array ModuleCore::getNonNativeModuleList()
Return non native module
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1121
string ModuleCore::getPathUri()
Get uri path for module
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1665
array ModuleCore::getPaymentModules()
Returns the list of the payment module associated to the current customer
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1186
boolean ModuleCore::getPermission(array $variable, object $employee)
Check employee permission for module
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1569
- $variable array - (action)
- $employee object
boolean ModuleCore::getPermissionStatic(integer $id_module, array $variable, object $employee)
Check employee permission for module (static method)
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1581
- $id_module integer
- $variable array - (action)
- $employee object
string ModuleCore::getTemplatePath(string $template)
Get realpath of a template of current module (check if template is overriden too)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1505
- $template string
string ModuleCore::hookExec(string $hook_name, array $hookArgs, $id_module)
Execute modules for specified hook
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1163
- $hook_name string - Hook Name
- $hookArgs array - Parameters for the functions
- $id_module mixed
mixed ModuleCore::hookExecPayment()
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1169
boolean ModuleCore::initUpgradeModule($module_name, $module_version)
Init the upgrade module
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 293
- $module_name mixed
- $module_version mixed
mixed PaymentModuleCore::install()
- Visibility: public
- Source: classes/PaymentModule.php line 35
mixed ModuleCore::isCached($template, $cacheId, $compileId)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1523
- $template mixed
- $cacheId mixed
- $compileId mixed
boolean ModuleCore::isHookableOn(string $hook_name)
Check if the module is transplantable on the hook in parameter
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1557
- $hook_name string
mixed ModuleCore::isInstalled($module_name)
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1438
- $module_name mixed
mixed ModuleCore::isRegisteredInHook($hook)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1444
- $hook mixed
string ModuleCore::l(string $string, boolean|string $specific, $id_lang)
Get translation for a given module text
Note: $specific parameter is mandatory for library files. Otherwise, translation key will not match for Module library when module is loaded with eval() Module::getModulesOnDisk()
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1269
- $string string - String to translate
- $specific boolean|string - filename to use in translation key
- $id_lang mixed
boolean ModuleCore::loadUpgradeVersionList($module_name, $module_version, $registered_version)
Load the available list of upgrade of a specified module with an associated version
- Visibility: protected
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 392
- $module_name mixed
- $module_version mixed
- $registered_version mixed
boolean ModuleCore::needUpgrade($module_name, $module_version)
Check if a module need to be upgraded.
This method modify the module_cache adding an upgrade list file
- Visibility: public
- This method is static.
- This method is defined by ModuleCore.
- Source: classes/Module.php line 371
- $module_name mixed
- $module_version mixed
mixed PaymentModuleCore::preCall($module_name)
- Visibility: public
- This method is static.
- Source: classes/PaymentModule.php line 630
- $module_name mixed
boolean ModuleCore::registerExceptions(integer $id_hook, array $excepts, array $shop_list)
Add exceptions for module->Hook
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 697
- $id_hook integer - Hook id
- $excepts array - List of file name
- $shop_list array - List of shop
boolean ModuleCore::registerHook(string $hook_name, array $shop_list)
Connect module to a hook
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 583
- $hook_name string - Hook name
- $shop_list array - List of shop linked to the hook (if null, link hook to all shops)
array ModuleCore::runUpgradeModule()
Run the upgrade for a given module name and version
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 316
mixed ModuleCore::setUpgradeMessage($upgrade_detail)
Set errors, warning or success message of a module upgrade
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 259
- $upgrade_detail mixed
mixed ModuleCore::sqlShopRestriction($share, $alias)
Get SQL modules restriction by shop
- Visibility: protected
- This method is defined by ModuleCore.
- Source: classes/Module.php line 176
- $share mixed
- $alias mixed
mixed PaymentModuleCore::uninstall()
- Visibility: public
- Source: classes/PaymentModule.php line 66
boolean ModuleCore::unregisterExceptions($hook_id, array $shop_list)
Unregister exceptions linked to module
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 681
- $hook_id mixed
- $shop_list array - List of shop
boolean ModuleCore::unregisterHook($hook_id, array $shop_list)
Unregister module from hook
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 651
- $hook_id mixed
- $shop_list array - List of shop
mixed ModuleCore::updatePosition($id_hook, $way, $position)
- Visibility: public
- This method is defined by ModuleCore.
- Source: classes/Module.php line 1298
- $id_hook mixed
- $way mixed
- $position mixed
mixed PaymentModuleCore::validateOrder(integer $id_cart, integer $id_order_state, float $amount_paid, string $payment_method, string $message, $extra_vars, $currency_special, $dont_touch_amount, $secure_key, \Shop $shop)
Validate an order in database Function called from a payment module
- Visibility: public
- Source: classes/PaymentModule.php line 85
- $id_cart integer - Value
- $id_order_state integer - Value
- $amount_paid float - Amount really paid by customer (in the default currency)
- $payment_method string - Payment method (eg. 'Credit card')
- $message string - Message to attach to order
- $extra_vars mixed
- $currency_special mixed
- $dont_touch_amount mixed
- $secure_key mixed
- $shop Shop