Constants

DEBUG_MODE

DEBUG_MODE

Properties

$currentOrder

$currentOrder : integer

Type

integer — Current order's id

$currencies

$currencies : 

Type

$currencies_mode

$currencies_mode : 

Type

Methods

install()

install() 

uninstall()

uninstall() 

addCheckboxCurrencyRestrictionsForModule()

addCheckboxCurrencyRestrictionsForModule(array  $shops = array()) : boolean

Add checkbox currency restrictions for a new module

Parameters

array $shops

Returns

boolean

addRadioCurrencyRestrictionsForModule()

addRadioCurrencyRestrictionsForModule(array  $shops = array()) : boolean

Add radio currency restrictions for a new module

Parameters

array $shops

Returns

boolean

addCheckboxCountryRestrictionsForModule()

addCheckboxCountryRestrictionsForModule(array  $shops = array()) : boolean

Add checkbox country restrictions for a new module

Parameters

array $shops

Returns

boolean

validateOrder()

validateOrder(integer  $id_cart, integer  $id_order_state, float  $amount_paid, string  $payment_method = 'Unknown', null  $message = null, array  $extra_vars = array(), null  $currency_special = null, boolean  $dont_touch_amount = false, boolean  $secure_key = false, \Shop  $shop = null) : boolean

Validate an order in database Function called from a payment module

Parameters

integer $id_cart
integer $id_order_state
float $amount_paid

Amount really paid by customer (in the default currency)

string $payment_method

Payment method (eg. 'Credit card')

null $message

Message to attach to order

array $extra_vars
null $currency_special
boolean $dont_touch_amount
boolean $secure_key
\Shop $shop

Throws

\PrestaShopException

Returns

boolean

formatProductAndVoucherForEmail()

formatProductAndVoucherForEmail(  $content) 

Parameters

$content

getCurrency()

getCurrency(  $current_id_currency = null) : \Currency

Parameters

$current_id_currency

Returns

\Currency

addCurrencyPermissions()

addCurrencyPermissions(integer  $id_currency, array  $id_module_list = array()) : boolean

Allows specified payment modules to be used by a specific currency

Parameters

integer $id_currency
array $id_module_list

Returns

boolean

getInstalledPaymentModules()

getInstalledPaymentModules() : array

List all installed and active payment modules

Returns

array —

module informations

preCall()

preCall(  $module_name) 

Parameters

$module_name

_getTxtFormatedAddress()

_getTxtFormatedAddress(  $the_address) : String

Parameters

$the_address

Returns

String —

the txt formated address block

_getFormatedAddress()

_getFormatedAddress(\Address  $the_address,   $line_sep,   $fields_style = array()) : String

Parameters

\Address $the_address
$line_sep
$fields_style

Returns

String —

the txt formated address block

getEmailTemplateContent()

getEmailTemplateContent(string  $template_name, integer  $mail_type, array  $var) : string

Fetch the content of $template_name inside the folder current_theme/mails/current_iso_lang/ if found, otherwise in mails/current_iso_lang

Parameters

string $template_name

template name with extension

integer $mail_type

Mail::TYPE_HTML or Mail::TYPE_TXT

array $var

list send to smarty

Returns

string